diff --git a/.gitignore b/.gitignore index 9511e9ede..f41862895 100644 --- a/.gitignore +++ b/.gitignore @@ -59,10 +59,10 @@ tools/cli/build/ *.iso *.tar.gz *.tgz +target-eclipse awsapi/modules/* !.gitignore .classpath -.project .settings.xml .settings/ db.properties.override @@ -73,4 +73,13 @@ docs/tmp docs/publish docs/runbook/tmp docs/runbook/publish +.project Gemfile.lock +debian/tmp +debian/files +debian/cloudstack-*/* +debian/*.substvars +debian/*.debhelper +replace.properties.tmp +build-indep-stamp +configure-stamp diff --git a/CHANGES b/CHANGES index a745a467c..a1edfdac5 100644 --- a/CHANGES +++ b/CHANGES @@ -1,7 +1,7 @@ Apache CloudStack (Incubating) CHANGES ====================================== -Full release notes for each release are located in the project's documentation website: http://incubator.apache.org/cloudstack/docs +Full release notes for each release are located in the project's documentation website: http://cloudstack.apache.org/docs Version 4.0.0-incubating ------------------------ diff --git a/DISCLAIMER b/DISCLAIMER deleted file mode 100644 index fa1e9261a..000000000 --- a/DISCLAIMER +++ /dev/null @@ -1,7 +0,0 @@ -Apache CloudStack is an effort undergoing incubation at The Apache Software Foundation (ASF), -sponsored by the Apache Incubator. Incubation is required of all newly accepted -projects until a further review indicates that the infrastructure, communications, and -decision making process have stabilized in a manner consistent with other successful ASF -projects. While incubation status is not necessarily a reflection of the completeness or -stability of the code, it does indicate that the project has yet to be fully endorsed by -the ASF. diff --git a/INSTALL.md b/INSTALL.md index 00c724b11..4f93900dd 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,7 +1,7 @@ This document describes how to develop, build, package and install Apache CloudStack (Incubating). For more information please refer to the project's website: - http://incubator.apache.org/cloudstack + http://cloudstack.apache.org Apache CloudStack developers use various platforms for development, this guide was tested against a CentOS 6.2 x86_64 setup. @@ -51,19 +51,21 @@ Apache CloudStack uses some ports, make sure at least those used by the manageme server are available and not blocked by any local firewall. Following ports are used by Apache CloudStack and its entities: - 8787: Apache CloudStack (Tomcat) debug socket - 9090, 8250, 8080: Apache CloudStack Management Server, User/Client API - 8096: User/Client to CloudStack Management Server (unauthenticated) - 7080: AWS API Server - 3306: MySQL Server - 3922, 8250, 80/443, 111/2049, 53: Secondary Storage VM - 3922, 8250, 53: Console Proxy VM - 3922, 8250, 53: Virtual Router + 8080: API Server (authenticated), browser or CLI client to management server + 8096: API Server (unauthenticated), browser or CLI client to management server + 8787: Remote java debug debugging port, from IDE to management server + 9090: Management server to management server (cluster) + 7080: AWS API Server to which an AWS client can connect + 80/443: HTTP client to Secondary Storage VM (template download) + 111/2049: Secondary Storage to NFS server + 3922: Port used to ssh/scp into system vms (SSVM, CPVM, VR) + 8250: Agent (SSVM, CPVM, VR) to management server 22, 80, 443: XenServer, XAPI 22: KVM 443: vCenter - DNS: 53 - NFS: 111/2049 + 53: DNS + 111/2049: NFS + 3306: MySQL Server to which the management server connects ### Configuring MySQL Server @@ -75,7 +77,7 @@ Start the MySQL service: 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 + $ git clone https://git-wip-us.apache.org/repos/asf/cloudstack.git Or, you may fork a repository from the official Apache CloudStack mirror by Apache on [Github](https://github.com/apache/incubator-cloudstack) @@ -93,8 +95,7 @@ For example, for master: Clean and build: - $ mvn clean - $ mvn install + $ mvn clean install -P systemvm,developer In case you want support for VMWare, SRX and other non-Apache (referred to as nonoss) compliant libs, you may download the following jar artifacts from respective vendors: @@ -112,9 +113,9 @@ Install them to ~/.m2 so maven can get them as dependencies: $ cd deps $ ./install-non-oss.sh -And build them with the nonoss flag: +To build with nonoss components, use the build command with the nonoss flag: - $ mvn install -Dnonoss + $ mvn clean install -P systemvm,developer -Dnonoss Clear old database (if any) and deploy the database schema: @@ -122,7 +123,7 @@ Clear old database (if any) and deploy the database schema: Export the following variable if you need to run and debug the management server: - $ export MAVEN_OPTS="-Xmx1024m -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n" + $ export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=500m -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n" Start the management server: diff --git a/LICENSE b/LICENSE index 73bc73839..2094d029e 100644 --- a/LICENSE +++ b/LICENSE @@ -180,73 +180,6 @@ Copyright (c) 2013 The Apache Software Foundation This distribution contains third party resources. - -Within the . directory - licensed under the BSD (3-clause) http://www.opensource.org/licenses/BSD-3-Clause (as follows) - - Copyright (c) 2005-2010 Thomas Nagy - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - THE POSSIBILITY OF SUCH DAMAGE. - - from Thomas Nagy http://code.google.com/p/waf/ - waf - - -Within the awsapi directory - licensed under the BSD (3-clause) http://www.opensource.org/licenses/BSD-3-Clause (as follows) - - Copyright (c) 2005-2010 Thomas Nagy - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - 1. Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - 2. Redistributions in binary form must reproduce the above copyright - notice, this list of conditions and the following disclaimer in the - documentation and/or other materials provided with the distribution. - 3. Neither the name of the copyright holders nor the names of its - contributors may be used to endorse or promote products derived from - this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" - AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE - LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR - CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF - SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS - INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN - CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF - THE POSSIBILITY OF SUCH DAMAGE. - - from Thomas Nagy http://code.google.com/p/waf/ - waf - - Within the console-proxy/js directory licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) @@ -270,10 +203,9 @@ Within the console-proxy/js directory LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - + from John Resig - jquery.js - + jquery.js Within the deps directory licensed under the BSD (2-clause) for XenServerJava http://www.opensource.org/licenses/BSD-2-Clause (as follows) @@ -304,28 +236,27 @@ Within the deps directory THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + from Citrix Systems, Inc http://www.citrix.com/ - XenServerJava http://community.citrix.com/cdn/xs/sdks/ - + XenServerJava from http://community.citrix.com/cdn/xs/sdks/ 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 - + dnsmasq.conf + vpcdnsmasq.conf Within the patches/systemvm/debian/config/etc/apache2 directory licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above) Copyright (c) 2012 The Apache Software Foundation from The Apache Software Foundation http://www.apache.org/ - httpd.conf - ports.conf - sites-available/default - sites-available/default-ssl - vhostexample.conf - + httpd.conf + ports.conf + sites-available/default + sites-available/default-ssl + vhostexample.conf Within the patches/systemvm/debian/config/etc/ssh/ directory licensed under the BSD (2-clause) http://www.opensource.org/licenses/BSD-2-Clause (as follows) @@ -354,40 +285,95 @@ Within the patches/systemvm/debian/config/etc/ssh/ directory ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + from OpenSSH Project http://www.openssh.org/ - sshd_config - + sshd_config Within the patches/systemvm/debian/config/root/redundant_router directory placed in the public domain by The netfilter.org project http://www.netfilter.org/ - conntrackd.conf.templ - + conntrackd.conf.templ Within the scripts/storage/secondary directory licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above) Copyright (c) 2010-2011 OpenStack, LLC. from OpenStack, LLC http://www.openstack.org - swift - + swift Within the scripts/vm/hypervisor/xenserver directory licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above) Copyright (c) 2010-2011 OpenStack, LLC. from OpenStack, LLC http://www.openstack.org - swift + swift +Within the tools/appliance/definitions/{devcloud,systemvmtemplate,systemvmtemplate64} directories + licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) + + Copyright (c) 2010-2012 Patrick Debois + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + from Patrick Debois http://www.jedi.be/blog/ + base.sh from https://github.com/jedi4ever/veewee + cleanup.sh from https://github.com/jedi4ever/veewee + definition.rb from https://github.com/jedi4ever/veewee + preseed.cfg from https://github.com/jedi4ever/veewee + zerodisk.sh from https://github.com/jedi4ever/veewee + +Within the tools/devcloud/src/deps/boxes/basebox-build directory + licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) + + Copyright (c) 2010-2012 Patrick Debois + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + from Patrick Debois http://www.jedi.be/blog/ + definition.rb from https://github.com/jedi4ever/veewee + preseed.cfg from https://github.com/jedi4ever/veewee Within the ui/lib directory placed in the public domain by Eric Meyer http://meyerweb.com/eric/ - reset.css + reset.css from http://meyerweb.com/eric/tools/css/reset/ licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above) Copyright (c) 2006 Google Inc. from Google Inc. http://google.com - excanvas.js http://code.google.com/p/explorercanvas/ + excanvas.js from http://code.google.com/p/explorercanvas/ licensed under the BSD (2-clause) http://www.opensource.org/licenses/BSD-2-Clause (as follows) @@ -417,9 +403,34 @@ Within the ui/lib directory ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - + from George McGinley Smith - jquery.easing.js + jquery.easing.js + + licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) + + + Permission is hereby granted, free of charge, to any person obtaining + a copy of this software and associated documentation files (the + "Software"), to deal in the Software without restriction, including + without limitation the rights to use, copy, modify, merge, publish, + distribute, sublicense, and/or sell copies of the Software, and to + permit persons to whom the Software is furnished to do so, subject to + the following conditions: + + The above copyright notice and this permission notice shall be + included in all copies or substantial portions of the Software. + + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, + EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND + NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE + LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION + OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION + WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + from The Dojo Foundation http://dojofoundation.org/ + require.js from http://github.com/jrburke/requirejs licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) @@ -443,9 +454,9 @@ Within the ui/lib directory LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - + from John Resig - jquery.js + jquery.js licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) @@ -469,9 +480,9 @@ Within the ui/lib directory LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - + from Jorn Zaefferer - jquery.validate.js + jquery.validate.js licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) @@ -495,9 +506,9 @@ Within the ui/lib directory LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - + from Sebastian Tschan https://blueimp.net - jquery.md5.js + jquery.md5.js licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) @@ -521,10 +532,9 @@ Within the ui/lib directory LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - + from Klaus Hartl http://stilbuero.de - jquery.cookies.js - + jquery.cookies.js Within the ui/lib/flot directory licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) @@ -549,18 +559,18 @@ Within the ui/lib/flot directory LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - + from IOLA http://www.iola.dk/ - jquery.flot.crosshair.js - jquery.flot.fillbetween.js - jquery.flot.image.js - jquery.flot.js - jquery.flot.navigate.js - jquery.flot.resize.js - jquery.flot.selection.js - jquery.flot.stack.js - jquery.flot.symbol.js - jquery.flot.threshold.js + jquery.flot.crosshair.js + jquery.flot.fillbetween.js + jquery.flot.image.js + jquery.flot.js + jquery.flot.navigate.js + jquery.flot.resize.js + jquery.flot.selection.js + jquery.flot.stack.js + jquery.flot.symbol.js + jquery.flot.threshold.js licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) @@ -585,9 +595,9 @@ Within the ui/lib/flot directory LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - + from Brian Medendorp - jquery.pie.js + jquery.pie.js licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) @@ -610,10 +620,9 @@ Within the ui/lib/flot directory LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - + from Ole Laursen - jquery.colorhelpers.js - + jquery.colorhelpers.js Within the ui/lib/jquery-ui directory licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) @@ -637,12 +646,11 @@ Within the ui/lib/jquery-ui directory LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - + from jQuery UI Developers http://jqueryui.com/about - css/jquery-ui.css - index.html - js/jquery-ui.js - + css/jquery-ui.css + index.html + js/jquery-ui.js Within the ui/lib/qunit directory licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) @@ -667,14 +675,14 @@ Within the ui/lib/qunit directory LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - + from Jorn Zaefferer - qunit.css http://docs.jquery.com/QUnit - qunit.js http://docs.jquery.com/QUnit - + qunit.css from http://docs.jquery.com/QUnit + qunit.js from http://docs.jquery.com/QUnit Within the utils/src/com/cloud/utils/db directory licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above) Copyright (c) 2004 Clinton Begin from Clinton Begin http://code.google.com/p/mybatis/ - ScriptRunner.java http://code.google.com/p/mybatis/ + ScriptRunner.java from http://code.google.com/p/mybatis/ + diff --git a/NOTICE b/NOTICE index 5cdd9fcee..d36048aab 100644 --- a/NOTICE +++ b/NOTICE @@ -6,30 +6,7 @@ - Source code distribution if this software contains third party resources requiring - the following notices: - - - For - jquery.md5.js - - - jQuery MD5 Plugin 1.2.1 - https://github.com/blueimp/jQuery-MD5 - - Copyright 2010, Sebastian Tschan - https://blueimp.net - - Licensed under the MIT license: - http://creativecommons.org/licenses/MIT/ - - Based on - A JavaScript implementation of the RSA Data Security, Inc. MD5 Message - Digest Algorithm, as defined in RFC 1321. - Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 - Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet - Distributed under the BSD License - See http://pajhome.org.uk/crypt/md5 for more info. + This distribution contains third party resources requiring the following notices: For @@ -66,6 +43,28 @@ Date: Thu May 12 15:04:36 2011 -0400 + For + jquery.md5.js + + + jQuery MD5 Plugin 1.2.1 + https://github.com/blueimp/jQuery-MD5 + + Copyright 2010, Sebastian Tschan + https://blueimp.net + + Licensed under the MIT license: + http://creativecommons.org/licenses/MIT/ + + Based on + A JavaScript implementation of the RSA Data Security, Inc. MD5 Message + Digest Algorithm, as defined in RFC 1321. + Version 2.2 Copyright (C) Paul Johnston 1999 - 2009 + Other contributors: Greg Holt, Andrew Kepert, Ydnar, Lostinet + Distributed under the BSD License + See http://pajhome.org.uk/crypt/md5 for more info. + + For jquery.colorhelpers.js @@ -76,4 +75,4 @@ Inspiration from jQuery color animation plugin by John Resig. - Released under the MIT license by Ole Laursen, October 2009. \ No newline at end of file + Released under the MIT license by Ole Laursen, October 2009. diff --git a/README.md b/README.md index 7b4d97366..7fb9b57c5 100644 --- a/README.md +++ b/README.md @@ -17,12 +17,14 @@ Apache CloudStack offers three methods for managing cloud computing environments: an easy to use Web interface, command line tools, and a full-featured RESTful API. -Visit us at [cloudstack.org](http://incubator.apache.org/cloudstack). +Visit us at [Apache CloudStack](http://cloudstack.apache.org). ## Mailing lists -[Development Mailing List](mailto:cloudstack-dev-subscribe@incubator.apache.org) -[Users Mailing list](mailto:cloudstack-users-subscribe@incubator.apache.org) -[Commits mailing list](mailto:cloudstack-commits-subscribe@incubator.apache.org) +[Development Mailing List](mailto:dev-subscribe@cloudstack.apache.org) +[Users Mailing List](mailto:users-subscribe@cloudstack.apache.org) +[Commits Mailing List](mailto:commits-subscribe@cloudstack.apache.org) +[Issues Mailing List](mailto:issues-subscribe@cloudstack.apache.org) +[Marketing Mailing List](mailto:marketing-subscribe@cloudstack.apache.org) # License diff --git a/README.tools.md b/README.tools.md index f743c8927..069c34269 100644 --- a/README.tools.md +++ b/README.tools.md @@ -61,7 +61,7 @@ Once installed per the Vagrant installation process, run: $ vagrant box add devcloud [path to devcloud.box] Then, either go into the devcloudbox folder of your checked out version of the -CloudStack code (incubator-cloudstack/tools/devcloud/devcloudbox), or copy the +CloudStack code (cloudstack/tools/devcloud/devcloudbox), or copy the contents of that folder to another location. Assuming the patched Vagrant installation is working, you then diff --git a/agent/conf/agent.properties b/agent/conf/agent.properties index 74cfd1c21..e49afbf2a 100644 --- a/agent/conf/agent.properties +++ b/agent/conf/agent.properties @@ -79,4 +79,13 @@ domr.scripts.dir=scripts/network/domr/kvm # be overridden here. # native = com.cloud.hypervisor.kvm.resource.BridgeVifDriver # openvswitch = com.cloud.hypervisor.kvm.resource.OvsBridgeDriver -#libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.BridgeVifDriver \ No newline at end of file +#libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.BridgeVifDriver + +# set the hypervisor type, values are: kvm, lxc +# hypervisor.type=kvm + +# settings to enable direct networking in libvirt, should not be used +# on hosts that run system vms, values for mode are: private, bridge, vepa +# libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.DirectVifDriver +# network.direct.source.mode=private +# network.direct.device=eth0 diff --git a/agent/pom.xml b/agent/pom.xml index 810f33fc5..0f44c1aa2 100644 --- a/agent/pom.xml +++ b/agent/pom.xml @@ -23,7 +23,7 @@ org.apache.cloudstack cloudstack - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT @@ -35,8 +35,6 @@ org.apache.cloudstack cloud-utils ${project.version} - tests - test @@ -83,7 +81,7 @@ + value="${cs.replace.properties}" /> @@ -97,7 +95,7 @@ + value="${cs.replace.properties}" /> @@ -106,6 +104,24 @@ + + org.apache.maven.plugins + maven-dependency-plugin + 2.5.1 + + + copy-dependencies + package + + copy-dependencies + + + ${project.build.directory}/dependencies + runtime + + + + diff --git a/agent/src/com/cloud/agent/AgentShell.java b/agent/src/com/cloud/agent/AgentShell.java index e3d1063e6..73b3950e7 100644 --- a/agent/src/com/cloud/agent/AgentShell.java +++ b/agent/src/com/cloud/agent/AgentShell.java @@ -42,21 +42,20 @@ import org.apache.commons.httpclient.MultiThreadedHttpConnectionManager; import org.apache.commons.httpclient.methods.GetMethod; import org.apache.log4j.Logger; +import org.apache.log4j.xml.DOMConfigurator; import com.cloud.agent.Agent.ExitStatus; import com.cloud.agent.dao.StorageComponent; import com.cloud.agent.dao.impl.PropertiesStorage; import com.cloud.host.Host; import com.cloud.resource.ServerResource; +import com.cloud.utils.LogUtils; import com.cloud.utils.NumbersUtil; import com.cloud.utils.ProcessUtil; import com.cloud.utils.PropertiesUtil; import com.cloud.utils.backoff.BackoffAlgorithm; import com.cloud.utils.backoff.impl.ConstantTimeBackoff; -import com.cloud.utils.component.Adapters; -import com.cloud.utils.component.ComponentLocator; import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.net.MacAddress; import com.cloud.utils.script.Script; public class AgentShell implements IAgentShell { @@ -146,6 +145,7 @@ public String getGuid() { return _guid; } + @Override public Map getCmdLineProperties() { return _cmdLineProperties; } @@ -371,6 +371,7 @@ protected boolean parseCommand(final String[] args) throw new ConfigurationException("Unable to find the guid"); } _guid = UUID.randomUUID().toString(); + _properties.setProperty("guid", _guid); } return true; @@ -378,8 +379,18 @@ protected boolean parseCommand(final String[] args) public void init(String[] args) throws ConfigurationException { - final ComponentLocator locator = ComponentLocator.getLocator("agent"); - + // PropertiesUtil is used both in management server and agent packages, + // it searches path under class path and common J2EE containers + // For KVM agent, do it specially here + + File file = new File("/etc/cloudstack/agent/log4j-cloud.xml"); + if(file == null || !file.exists()) { + file = PropertiesUtil.findConfigFile("log4j-cloud.xml"); + } + DOMConfigurator.configureAndWatch(file.getAbsolutePath()); + + s_logger.info("Agent started"); + final Class c = this.getClass(); _version = c.getPackage().getImplementationVersion(); if (_version == null) { @@ -396,12 +407,9 @@ public void init(String[] args) throws ConfigurationException { s_logger.debug("Found property: " + property); } - _storage = locator.getManager(StorageComponent.class); - if (_storage == null) { - s_logger.info("Defaulting to using properties file for storage"); - _storage = new PropertiesStorage(); - _storage.configure("Storage", new HashMap()); - } + s_logger.info("Defaulting to using properties file for storage"); + _storage = new PropertiesStorage(); + _storage.configure("Storage", new HashMap()); // merge with properties from command line to let resource access // command line parameters @@ -410,22 +418,9 @@ public void init(String[] args) throws ConfigurationException { _properties.put(cmdLineProp.getKey(), cmdLineProp.getValue()); } - final Adapters adapters = locator.getAdapters(BackoffAlgorithm.class); - final Enumeration en = adapters.enumeration(); - while (en.hasMoreElements()) { - _backoff = (BackoffAlgorithm) en.nextElement(); - break; - } - if (en.hasMoreElements()) { - s_logger.info("More than one backoff algorithm specified. Using the first one "); - } - - if (_backoff == null) { - s_logger.info("Defaulting to the constant time backoff algorithm"); - _backoff = new ConstantTimeBackoff(); - _backoff.configure("ConstantTimeBackoff", - new HashMap()); - } + s_logger.info("Defaulting to the constant time backoff algorithm"); + _backoff = new ConstantTimeBackoff(); + _backoff.configure("ConstantTimeBackoff", new HashMap()); } private void launchAgent() throws ConfigurationException { @@ -469,6 +464,7 @@ private void launchConsoleProxy() throws ConfigurationException { openPortWithIptables(port); _consoleProxyMain = new Thread(new Runnable() { + @Override public void run() { try { Class consoleProxyClazz = Class.forName("com.cloud.consoleproxy.ConsoleProxy"); @@ -522,7 +518,7 @@ private void launchAgentFromClassInfo(String resourceClassNames) } catch (final SecurityException e) { throw new ConfigurationException( "Security excetion when loading resource: " + name - + " due to: " + e.toString()); + + " due to: " + e.toString()); } catch (final NoSuchMethodException e) { throw new ConfigurationException( "Method not found excetion when loading resource: " @@ -534,7 +530,7 @@ private void launchAgentFromClassInfo(String resourceClassNames) } catch (final InstantiationException e) { throw new ConfigurationException( "Instantiation excetion when loading resource: " + name - + " due to: " + e.toString()); + + " due to: " + e.toString()); } catch (final IllegalAccessException e) { throw new ConfigurationException( "Illegal access exception when loading resource: " @@ -571,6 +567,9 @@ public synchronized int getNextAgentId() { public void start() { try { + /* By default we only search for log4j.xml */ + LogUtils.initLog4j("log4j-cloud.xml"); + System.setProperty("java.net.preferIPv4Stack", "true"); String instance = getProperty(null, "instance"); diff --git a/agent/src/com/cloud/agent/VmmAgentShell.java b/agent/src/com/cloud/agent/VmmAgentShell.java index ef2ef0f32..190d11682 100644 --- a/agent/src/com/cloud/agent/VmmAgentShell.java +++ b/agent/src/com/cloud/agent/VmmAgentShell.java @@ -23,7 +23,6 @@ import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import java.util.ArrayList; -import java.util.Enumeration; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -41,19 +40,15 @@ import com.cloud.agent.transport.Request; import com.cloud.resource.ServerResource; import com.cloud.utils.NumbersUtil; -import com.cloud.utils.ProcessUtil; import com.cloud.utils.PropertiesUtil; import com.cloud.utils.backoff.BackoffAlgorithm; import com.cloud.utils.backoff.impl.ConstantTimeBackoff; -import com.cloud.utils.component.Adapters; -import com.cloud.utils.component.ComponentLocator; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.net.MacAddress; import com.cloud.utils.nio.HandlerFactory; import com.cloud.utils.nio.Link; import com.cloud.utils.nio.NioServer; import com.cloud.utils.nio.Task; -import com.cloud.utils.nio.Task.Type; /** * Implementation of agent shell to run the agents on System Center Virtual Machine manager @@ -61,7 +56,7 @@ public class VmmAgentShell implements IAgentShell, HandlerFactory { - private static final Logger s_logger = Logger.getLogger(VmmAgentShell.class.getName()); + private static final Logger s_logger = Logger.getLogger(VmmAgentShell.class.getName()); private final Properties _properties = new Properties(); private final Map _cmdLineProperties = new HashMap(); private StorageComponent _storage; @@ -76,112 +71,112 @@ public class VmmAgentShell implements IAgentShell, HandlerFactory { private int _proxyPort; private int _workers; private String _guid; - static private NioServer _connection; - static private int _listenerPort=9000; + static private NioServer _connection; + static private int _listenerPort=9000; private int _nextAgentId = 1; private volatile boolean _exit = false; private int _pingRetries; - private Thread _consoleProxyMain = null; + private final Thread _consoleProxyMain = null; private final List _agents = new ArrayList(); public VmmAgentShell() { } - + @Override public Properties getProperties() { - return _properties; + return _properties; } - + @Override public BackoffAlgorithm getBackoffAlgorithm() { - return _backoff; + return _backoff; } - + @Override public int getPingRetries() { - return _pingRetries; + return _pingRetries; } - + @Override public String getZone() { - return _zone; + return _zone; } - + @Override public String getPod() { - return _pod; + return _pod; } - + @Override public String getHost() { - return _host; + return _host; } - + @Override public String getPrivateIp() { - return _privateIp; + return _privateIp; } - + @Override public int getPort() { - return _port; + return _port; } - + @Override public int getProxyPort() { - return _proxyPort; + return _proxyPort; } - + @Override public int getWorkers() { - return _workers; + return _workers; } - + @Override public String getGuid() { - return _guid; + return _guid; } - @Override - public void upgradeAgent(String url) { - // TODO Auto-generated method stub - - } + @Override + public void upgradeAgent(String url) { + // TODO Auto-generated method stub - @Override + } + + @Override public String getVersion() { - return _version; + return _version; + } + + @Override + public Map getCmdLineProperties() { + // TODO Auto-generated method stub + return _cmdLineProperties; + } + + public String getProperty(String prefix, String name) { + if(prefix != null) + return _properties.getProperty(prefix + "." + name); + + return _properties.getProperty(name); } - @Override - public Map getCmdLineProperties() { - // TODO Auto-generated method stub - return _cmdLineProperties; - } - - public String getProperty(String prefix, String name) { - if(prefix != null) - return _properties.getProperty(prefix + "." + name); - - return _properties.getProperty(name); + @Override + public String getPersistentProperty(String prefix, String name) { + if(prefix != null) + return _storage.get(prefix + "." + name); + return _storage.get(name); + } + + @Override + public void setPersistentProperty(String prefix, String name, String value) { + if(prefix != null) + _storage.persist(prefix + "." + name, value); + else + _storage.persist(name, value); } - - @Override - public String getPersistentProperty(String prefix, String name) { - if(prefix != null) - return _storage.get(prefix + "." + name); - return _storage.get(name); - } - - @Override - public void setPersistentProperty(String prefix, String name, String value) { - if(prefix != null) - _storage.persist(prefix + "." + name, value); - else - _storage.persist(name, value); - } - - private void loadProperties() throws ConfigurationException { + + private void loadProperties() throws ConfigurationException { final File file = PropertiesUtil.findConfigFile("agent.properties"); if (file == null) { throw new ConfigurationException("Unable to find agent.properties."); @@ -197,7 +192,7 @@ private void loadProperties() throws ConfigurationException { throw new CloudRuntimeException("IOException in reading " + file.getAbsolutePath(), ex); } } - + protected boolean parseCommand(final String[] args) throws ConfigurationException { String host = null; String workers = null; @@ -211,7 +206,7 @@ protected boolean parseCommand(final String[] args) throws ConfigurationExceptio System.out.println("Invalid Parameter: " + args[i]); continue; } - + // save command line properties _cmdLineProperties.put(tokens[0], tokens[1]); @@ -222,14 +217,14 @@ protected boolean parseCommand(final String[] args) throws ConfigurationExceptio } else if (tokens[0].equalsIgnoreCase("host")) { host = tokens[1]; } else if(tokens[0].equalsIgnoreCase("zone")) { - zone = tokens[1]; + zone = tokens[1]; } else if(tokens[0].equalsIgnoreCase("pod")) { - pod = tokens[1]; + pod = tokens[1]; } else if(tokens[0].equalsIgnoreCase("guid")) { - guid = tokens[1]; - } else if(tokens[0].equalsIgnoreCase("eth1ip")) { - _privateIp = tokens[1]; - } + guid = tokens[1]; + } else if(tokens[0].equalsIgnoreCase("eth1ip")) { + _privateIp = tokens[1]; + } } if (port == null) { @@ -237,7 +232,7 @@ protected boolean parseCommand(final String[] args) throws ConfigurationExceptio } _port = NumbersUtil.parseInt(port, 8250); - + _proxyPort = NumbersUtil.parseInt(getProperty(null, "consoleproxy.httpListenPort"), 443); if (workers == null) { @@ -254,42 +249,42 @@ protected boolean parseCommand(final String[] args) throws ConfigurationExceptio host = "localhost"; } _host = host; - + if(zone != null) - _zone = zone; + _zone = zone; else - _zone = getProperty(null, "zone"); + _zone = getProperty(null, "zone"); if (_zone == null || (_zone.startsWith("@") && _zone.endsWith("@"))) { - _zone = "default"; + _zone = "default"; } if(pod != null) - _pod = pod; + _pod = pod; else - _pod = getProperty(null, "pod"); + _pod = getProperty(null, "pod"); if (_pod == null || (_pod.startsWith("@") && _pod.endsWith("@"))) { - _pod = "default"; + _pod = "default"; } if (_host == null || (_host.startsWith("@") && _host.endsWith("@"))) { throw new ConfigurationException("Host is not configured correctly: " + _host); } - + final String retries = getProperty(null, "ping.retries"); _pingRetries = NumbersUtil.parseInt(retries, 5); String value = getProperty(null, "developer"); boolean developer = Boolean.parseBoolean(value); - + if(guid != null) - _guid = guid; + _guid = guid; else - _guid = getProperty(null, "guid"); + _guid = getProperty(null, "guid"); if (_guid == null) { - if (!developer) { - throw new ConfigurationException("Unable to find the guid"); - } - _guid = MacAddress.getMacAddress().toString(":"); + if (!developer) { + throw new ConfigurationException("Unable to find the guid"); + } + _guid = MacAddress.getMacAddress().toString(":"); } return true; @@ -303,63 +298,46 @@ private void launchAgentFromTypeInfo() throws ConfigurationException { } s_logger.trace("Launching agent based on type=" + typeInfo); } - + private void launchAgent() throws ConfigurationException { String resourceClassNames = getProperty(null, "resource"); s_logger.trace("resource=" + resourceClassNames); if(resourceClassNames != null) { - launchAgentFromClassInfo(resourceClassNames); - return; + launchAgentFromClassInfo(resourceClassNames); + return; } - + launchAgentFromTypeInfo(); } - + private void init(String[] args) throws ConfigurationException{ - - final ComponentLocator locator = ComponentLocator.getLocator("agent"); - + final Class c = this.getClass(); _version = c.getPackage().getImplementationVersion(); if (_version == null) { throw new CloudRuntimeException("Unable to find the implementation version of this agent"); } s_logger.info("Implementation Version is " + _version); - + parseCommand(args); - - _storage = locator.getManager(StorageComponent.class); - if (_storage == null) { - s_logger.info("Defaulting to using properties file for storage"); - _storage = new PropertiesStorage(); - _storage.configure("Storage", new HashMap()); - } + + s_logger.info("Defaulting to using properties file for storage"); + _storage = new PropertiesStorage(); + _storage.configure("Storage", new HashMap()); // merge with properties from command line to let resource access command line parameters for(Map.Entry cmdLineProp : getCmdLineProperties().entrySet()) { - _properties.put(cmdLineProp.getKey(), cmdLineProp.getValue()); - } - - final Adapters adapters = locator.getAdapters(BackoffAlgorithm.class); - final Enumeration en = adapters.enumeration(); - while (en.hasMoreElements()) { - _backoff = (BackoffAlgorithm)en.nextElement(); - break; - } - if (en.hasMoreElements()) { - s_logger.info("More than one backoff algorithm specified. Using the first one "); + _properties.put(cmdLineProp.getKey(), cmdLineProp.getValue()); } - if (_backoff == null) { - s_logger.info("Defaulting to the constant time backoff algorithm"); - _backoff = new ConstantTimeBackoff(); - _backoff.configure("ConstantTimeBackoff", new HashMap()); - } + s_logger.info("Defaulting to the constant time backoff algorithm"); + _backoff = new ConstantTimeBackoff(); + _backoff.configure("ConstantTimeBackoff", new HashMap()); } private void launchAgentFromClassInfo(String resourceClassNames) throws ConfigurationException { - String[] names = resourceClassNames.split("\\|"); - for(String name: names) { + String[] names = resourceClassNames.split("\\|"); + for(String name: names) { Class impl; try { impl = Class.forName(name); @@ -368,41 +346,41 @@ private void launchAgentFromClassInfo(String resourceClassNames) throws Configur ServerResource resource = (ServerResource)constructor.newInstance(); launchAgent(getNextAgentId(), resource); } catch (final ClassNotFoundException e) { - throw new ConfigurationException("Resource class not found: " + name); + throw new ConfigurationException("Resource class not found: " + name); } catch (final SecurityException e) { - throw new ConfigurationException("Security excetion when loading resource: " + name); + throw new ConfigurationException("Security excetion when loading resource: " + name); } catch (final NoSuchMethodException e) { - throw new ConfigurationException("Method not found excetion when loading resource: " + name); + throw new ConfigurationException("Method not found excetion when loading resource: " + name); } catch (final IllegalArgumentException e) { - throw new ConfigurationException("Illegal argument excetion when loading resource: " + name); + throw new ConfigurationException("Illegal argument excetion when loading resource: " + name); } catch (final InstantiationException e) { - throw new ConfigurationException("Instantiation excetion when loading resource: " + name); + throw new ConfigurationException("Instantiation excetion when loading resource: " + name); } catch (final IllegalAccessException e) { - throw new ConfigurationException("Illegal access exception when loading resource: " + name); + throw new ConfigurationException("Illegal access exception when loading resource: " + name); } catch (final InvocationTargetException e) { - throw new ConfigurationException("Invocation target exception when loading resource: " + name); + throw new ConfigurationException("Invocation target exception when loading resource: " + name); } - } + } } private void launchAgent(int localAgentId, ServerResource resource) throws ConfigurationException { - // we don't track agent after it is launched for now - Agent agent = new Agent(this, localAgentId, resource); - _agents.add(agent); - agent.start(); + // we don't track agent after it is launched for now + Agent agent = new Agent(this, localAgentId, resource); + _agents.add(agent); + agent.start(); } public synchronized int getNextAgentId() { - return _nextAgentId++; + return _nextAgentId++; } - - private void run(String[] args) { - - try { + + private void run(String[] args) { + + try { System.setProperty("java.net.preferIPv4Stack","true"); - loadProperties(); - init(args); - + loadProperties(); + init(args); + String instance = getProperty(null, "instance"); if (instance == null) { instance = ""; @@ -413,22 +391,22 @@ private void run(String[] args) { // TODO need to do this check. For Agentshell running on windows needs different approach //final String run = "agent." + instance + "pid"; //s_logger.debug("Checking to see if " + run + "exists."); - //ProcessUtil.pidCheck(run); - - + //ProcessUtil.pidCheck(run); + + // TODO: For Hyper-V agent.properties need to be revamped to support multiple agents // corresponding to multiple clusters but running on a SCVMM host - + // read the persistent storage and launch the agents - //launchAgent(); + //launchAgent(); // FIXME get rid of this approach of agent listening for boot strap commands from the management server - // now listen for bootstrap request from the management server and launch agents - _connection = new NioServer("VmmAgentShell", _listenerPort, 1, this); - _connection.start(); - s_logger.info("SCVMM agent is listening on port " +_listenerPort + " for bootstrap command from management server"); - while(_connection.isRunning()); + // now listen for bootstrap request from the management server and launch agents + _connection = new NioServer("VmmAgentShell", _listenerPort, 1, this); + _connection.start(); + s_logger.info("SCVMM agent is listening on port " +_listenerPort + " for bootstrap command from management server"); + while(_connection.isRunning()); } catch(final ConfigurationException e) { s_logger.error("Unable to start agent: " + e.getMessage()); System.out.println("Unable to start agent: " + e.getMessage()); @@ -438,89 +416,89 @@ private void run(String[] args) { System.out.println("Unable to start agent: " + e.getMessage()); System.exit(ExitStatus.Error.value()); } - } - - @Override - public Task create(com.cloud.utils.nio.Task.Type type, Link link, - byte[] data) { - return new AgentBootStrapHandler(type, link, data); - } - - public void stop() { - _exit = true; - if(_consoleProxyMain != null) { - _consoleProxyMain.interrupt(); - } - } - - public static void main(String[] args) { - - VmmAgentShell shell = new VmmAgentShell(); - Runtime.getRuntime().addShutdownHook(new ShutdownThread(shell)); - shell.run(args); - } - - // class to handle the bootstrap command from the management server - private class AgentBootStrapHandler extends Task { - - public AgentBootStrapHandler(Task.Type type, Link link, byte[] data) { - super(type, link, data); - } - - @Override - protected void doTask(Task task) throws Exception { - final Type type = task.getType(); - s_logger.info("recieved task of type "+ type.toString() +" to handle in BootStrapTakHandler"); - if (type == Task.Type.DATA) - { - final byte[] data = task.getData(); - final Request request = Request.parse(data); - final Command cmd = request.getCommand(); - - if (cmd instanceof StartupVMMAgentCommand) { - - StartupVMMAgentCommand vmmCmd = (StartupVMMAgentCommand) cmd; - - _zone = Long.toString(vmmCmd.getDataCenter()); - _cmdLineProperties.put("zone", _zone); - - _pod = Long.toString(vmmCmd.getPod()); - _cmdLineProperties.put("pod", _pod); - - _cluster = vmmCmd.getClusterName(); - _cmdLineProperties.put("cluster", _cluster); - - _guid = vmmCmd.getGuid(); - _cmdLineProperties.put("guid", _guid); - - _host = vmmCmd.getManagementServerIP(); - _port = NumbersUtil.parseInt(vmmCmd.getport(), 8250); - - s_logger.info("Recieved boot strap command from management server with parameters " + - " Zone:"+ _zone + " "+ - " Cluster:"+ _cluster + " "+ - " pod:"+_pod + " "+ - " host:"+ _host +" "+ - " port:"+_port); - - launchAgentFromClassInfo("com.cloud.hypervisor.hyperv.resource.HypervResource"); - - // TODO: persist the info in agent.properties for agent restarts - } - } - } - } + } + + @Override + public Task create(com.cloud.utils.nio.Task.Type type, Link link, + byte[] data) { + return new AgentBootStrapHandler(type, link, data); + } + + public void stop() { + _exit = true; + if(_consoleProxyMain != null) { + _consoleProxyMain.interrupt(); + } + } + + public static void main(String[] args) { + + VmmAgentShell shell = new VmmAgentShell(); + Runtime.getRuntime().addShutdownHook(new ShutdownThread(shell)); + shell.run(args); + } + + // class to handle the bootstrap command from the management server + private class AgentBootStrapHandler extends Task { + + public AgentBootStrapHandler(Task.Type type, Link link, byte[] data) { + super(type, link, data); + } + + @Override + protected void doTask(Task task) throws Exception { + final Type type = task.getType(); + s_logger.info("recieved task of type "+ type.toString() +" to handle in BootStrapTakHandler"); + if (type == Task.Type.DATA) + { + final byte[] data = task.getData(); + final Request request = Request.parse(data); + final Command cmd = request.getCommand(); + + if (cmd instanceof StartupVMMAgentCommand) { + + StartupVMMAgentCommand vmmCmd = (StartupVMMAgentCommand) cmd; + + _zone = Long.toString(vmmCmd.getDataCenter()); + _cmdLineProperties.put("zone", _zone); + + _pod = Long.toString(vmmCmd.getPod()); + _cmdLineProperties.put("pod", _pod); + + _cluster = vmmCmd.getClusterName(); + _cmdLineProperties.put("cluster", _cluster); + + _guid = vmmCmd.getGuid(); + _cmdLineProperties.put("guid", _guid); + + _host = vmmCmd.getManagementServerIP(); + _port = NumbersUtil.parseInt(vmmCmd.getport(), 8250); + + s_logger.info("Recieved boot strap command from management server with parameters " + + " Zone:"+ _zone + " "+ + " Cluster:"+ _cluster + " "+ + " pod:"+_pod + " "+ + " host:"+ _host +" "+ + " port:"+_port); + + launchAgentFromClassInfo("com.cloud.hypervisor.hyperv.resource.HypervResource"); + + // TODO: persist the info in agent.properties for agent restarts + } + } + } + } private static class ShutdownThread extends Thread { - VmmAgentShell _shell; + VmmAgentShell _shell; public ShutdownThread(VmmAgentShell shell) { this._shell = shell; } - + @Override public void run() { _shell.stop(); } } - + } \ No newline at end of file diff --git a/agent/src/com/cloud/agent/configuration/AgentComponentLibraryBase.java b/agent/src/com/cloud/agent/configuration/AgentComponentLibraryBase.java deleted file mode 100755 index 058aefa92..000000000 --- a/agent/src/com/cloud/agent/configuration/AgentComponentLibraryBase.java +++ /dev/null @@ -1,76 +0,0 @@ -// 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.agent.configuration; - -import java.util.List; -import java.util.Map; - -import com.cloud.utils.component.Adapter; -import com.cloud.utils.component.ComponentLibraryBase; -import com.cloud.utils.component.ComponentLocator.ComponentInfo; -import com.cloud.utils.component.Manager; -import com.cloud.utils.component.PluggableService; -import com.cloud.utils.db.GenericDao; - -public class AgentComponentLibraryBase extends ComponentLibraryBase { - @Override - public Map>> getDaos() { - return null; - } - - @Override - public Map> getManagers() { - if (_managers.size() == 0) { - populateManagers(); - } - return _managers; - } - - @Override - public Map>> getAdapters() { - if (_adapters.size() == 0) { - populateAdapters(); - } - return _adapters; - } - - @Override - public Map, Class> getFactories() { - return null; - } - - protected void populateManagers() { - // addManager("StackMaidManager", StackMaidManagerImpl.class); - } - - protected void populateAdapters() { - - } - - protected void populateServices() { - - } - - @Override - public Map> getPluggableServices() { - if (_pluggableServices.size() == 0) { - populateServices(); - } - return _pluggableServices; - } - -} diff --git a/agent/src/com/cloud/agent/dao/impl/PropertiesStorage.java b/agent/src/com/cloud/agent/dao/impl/PropertiesStorage.java index b94ae83fd..2bf26f486 100755 --- a/agent/src/com/cloud/agent/dao/impl/PropertiesStorage.java +++ b/agent/src/com/cloud/agent/dao/impl/PropertiesStorage.java @@ -127,4 +127,34 @@ public boolean stop() { return true; } + @Override + public void setName(String name) { + // TODO Auto-generated method stub + + } + + @Override + public void setConfigParams(Map params) { + // TODO Auto-generated method stub + + } + + @Override + public Map getConfigParams() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getRunLevel() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void setRunLevel(int level) { + // TODO Auto-generated method stub + + } + } diff --git a/agent/src/com/cloud/agent/dhcp/FakeDhcpSnooper.java b/agent/src/com/cloud/agent/dhcp/FakeDhcpSnooper.java index 11ea82490..73a994e8b 100644 --- a/agent/src/com/cloud/agent/dhcp/FakeDhcpSnooper.java +++ b/agent/src/com/cloud/agent/dhcp/FakeDhcpSnooper.java @@ -139,4 +139,34 @@ public InetAddress getDhcpServerIP() { return null; } + @Override + public void setName(String name) { + // TODO Auto-generated method stub + + } + + @Override + public void setConfigParams(Map params) { + // TODO Auto-generated method stub + + } + + @Override + public Map getConfigParams() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getRunLevel() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void setRunLevel(int level) { + // TODO Auto-generated method stub + + } + } diff --git a/agent/src/com/cloud/agent/resource/DummyResource.java b/agent/src/com/cloud/agent/resource/DummyResource.java index 573f639b0..37a8b3d67 100755 --- a/agent/src/com/cloud/agent/resource/DummyResource.java +++ b/agent/src/com/cloud/agent/resource/DummyResource.java @@ -224,4 +224,34 @@ public IAgentControl getAgentControl() { public void setAgentControl(IAgentControl agentControl) { _agentControl = agentControl; } + + @Override + public void setName(String name) { + // TODO Auto-generated method stub + + } + + @Override + public void setConfigParams(Map params) { + // TODO Auto-generated method stub + + } + + @Override + public Map getConfigParams() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getRunLevel() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void setRunLevel(int level) { + // TODO Auto-generated method stub + + } } diff --git a/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java b/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java index 48f507900..991764c53 100644 --- a/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java +++ b/agent/src/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java @@ -26,6 +26,7 @@ import java.lang.reflect.Method; import java.net.URL; import java.net.URLConnection; +import java.util.HashMap; import java.util.Map; import java.util.Properties; @@ -234,14 +235,14 @@ public boolean configure(String name, Map params) if (_eth1ip != null) { params.put("private.network.device", "eth1"); } else { - s_logger.warn("WARNING: eth1ip parameter is not found!"); + s_logger.info("eth1ip parameter has not been configured, assuming that we are not inside a system vm"); } String eth2ip = (String) params.get("eth2ip"); if (eth2ip != null) { params.put("public.network.device", "eth2"); } else { - s_logger.warn("WARNING: eth2ip parameter is not found!"); + s_logger.info("eth2ip parameter is not found, assuming that we are not inside a system vm"); } super.configure(name, params); @@ -489,4 +490,26 @@ public void ensureRoute(String address) { } } } + + @Override + public void setName(String name) { + } + + @Override + public void setConfigParams(Map params) { + } + + @Override + public Map getConfigParams() { + return new HashMap(); + } + + @Override + public int getRunLevel() { + return 0; + } + + @Override + public void setRunLevel(int level) { + } } diff --git a/agent/test/com/cloud/agent/TestAgentShell.java b/agent/test/com/cloud/agent/TestAgentShell.java index d7210acbe..b0f748067 100644 --- a/agent/test/com/cloud/agent/TestAgentShell.java +++ b/agent/test/com/cloud/agent/TestAgentShell.java @@ -19,24 +19,23 @@ import java.io.File; import java.io.IOException; -import org.apache.log4j.Logger; +import junit.framework.TestCase; -import com.cloud.agent.AgentShell; -import com.cloud.utils.testcase.Log4jEnabledTestCase; +import org.apache.log4j.Logger; -public class TestAgentShell extends Log4jEnabledTestCase { +public class TestAgentShell extends TestCase { protected final static Logger s_logger = Logger.getLogger(TestAgentShell.class); - + public void testWget() { File file = null; try { file = File.createTempFile("wget", ".html"); - AgentShell.wget("http://www.google.com/", file); - + AgentShell.wget("http://www.apache.org/", file); + if (s_logger.isDebugEnabled()) { s_logger.debug("file saved to " + file.getAbsolutePath()); } - + } catch (final IOException e) { s_logger.warn("Exception while downloading agent update package, ", e); } diff --git a/api/pom.xml b/api/pom.xml index 7461c67aa..8ca258f12 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -23,7 +23,7 @@ org.apache.cloudstack cloudstack - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT diff --git a/api/src/com/cloud/agent/api/BackupSnapshotCommand.java b/api/src/com/cloud/agent/api/BackupSnapshotCommand.java index a0ac8d7ad..cac686dc0 100644 --- a/api/src/com/cloud/agent/api/BackupSnapshotCommand.java +++ b/api/src/com/cloud/agent/api/BackupSnapshotCommand.java @@ -35,6 +35,7 @@ public class BackupSnapshotCommand extends SnapshotCommand { private SwiftTO swift; private S3TO s3; StorageFilerTO pool; + private Long secHostId; protected BackupSnapshotCommand() { @@ -49,12 +50,14 @@ protected BackupSnapshotCommand() { * @param firstBackupUuid This is the backup of the first ever snapshot taken by the volume. * @param isFirstSnapshotOfRootVolume true if this is the first snapshot of a root volume. Set the parent of the backup to null. * @param isVolumeInactive True if the volume belongs to a VM that is not running or is detached. + * @param secHostId This is the Id of the secondary storage. */ public BackupSnapshotCommand(String secondaryStoragePoolURL, Long dcId, Long accountId, Long volumeId, Long snapshotId, + Long secHostId, String volumePath, StoragePool pool, String snapshotUuid, @@ -71,6 +74,7 @@ public BackupSnapshotCommand(String secondaryStoragePoolURL, this.prevBackupUuid = prevBackupUuid; this.isVolumeInactive = isVolumeInactive; this.vmName = vmName; + this.secHostId = secHostId; setVolumePath(volumePath); setWait(wait); } @@ -111,4 +115,7 @@ public Long getSnapshotId() { return snapshotId; } + public Long getSecHostId() { + return secHostId; + } } diff --git a/api/src/com/cloud/agent/api/Command.java b/api/src/com/cloud/agent/api/Command.java index 9cd67495e..aadbeaf0d 100755 --- a/api/src/com/cloud/agent/api/Command.java +++ b/api/src/com/cloud/agent/api/Command.java @@ -27,6 +27,8 @@ */ public abstract class Command { + public static final String HYPERVISOR_TYPE = "hypervisorType"; + // allow command to carry over hypervisor or other environment related context info @LogLevel(Log4jLevel.Trace) protected Map contextMap = new HashMap(); diff --git a/api/src/com/cloud/agent/api/CreateVMSnapshotAnswer.java b/api/src/com/cloud/agent/api/CreateVMSnapshotAnswer.java new file mode 100644 index 000000000..f9fb1642b --- /dev/null +++ b/api/src/com/cloud/agent/api/CreateVMSnapshotAnswer.java @@ -0,0 +1,62 @@ +// 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.agent.api; + +import java.util.List; + +import com.cloud.agent.api.to.VolumeTO; + +public class CreateVMSnapshotAnswer extends Answer { + + private List volumeTOs; + private VMSnapshotTO vmSnapshotTo; + + + public List getVolumeTOs() { + return volumeTOs; + } + + public void setVolumeTOs(List volumeTOs) { + this.volumeTOs = volumeTOs; + } + + public VMSnapshotTO getVmSnapshotTo() { + return vmSnapshotTo; + } + + public void setVmSnapshotTo(VMSnapshotTO vmSnapshotTo) { + this.vmSnapshotTo = vmSnapshotTo; + } + + public CreateVMSnapshotAnswer() { + + } + + public CreateVMSnapshotAnswer(CreateVMSnapshotCommand cmd, boolean success, + String result) { + super(cmd, success, result); + } + + public CreateVMSnapshotAnswer(CreateVMSnapshotCommand cmd, + VMSnapshotTO vmSnapshotTo, List volumeTOs) { + super(cmd, true, ""); + this.vmSnapshotTo = vmSnapshotTo; + this.volumeTOs = volumeTOs; + } + +} diff --git a/api/src/com/cloud/agent/api/CreateVMSnapshotCommand.java b/api/src/com/cloud/agent/api/CreateVMSnapshotCommand.java new file mode 100644 index 000000000..478987d99 --- /dev/null +++ b/api/src/com/cloud/agent/api/CreateVMSnapshotCommand.java @@ -0,0 +1,42 @@ +// 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.agent.api; + +import java.util.List; + +import com.cloud.agent.api.to.VolumeTO; +import com.cloud.vm.VirtualMachine; + +public class CreateVMSnapshotCommand extends VMSnapshotBaseCommand { + + public CreateVMSnapshotCommand(String vmName, VMSnapshotTO snapshot, List volumeTOs, String guestOSType, VirtualMachine.State vmState) { + super(vmName, snapshot, volumeTOs, guestOSType); + this.vmState = vmState; + } + + private VirtualMachine.State vmState; + + + public VirtualMachine.State getVmState() { + return vmState; + } + + public void setVmState(VirtualMachine.State vmState) { + this.vmState = vmState; + } + +} diff --git a/api/src/com/cloud/agent/api/CreateVolumeFromSnapshotCommand.java b/api/src/com/cloud/agent/api/CreateVolumeFromSnapshotCommand.java index a19d34436..fbf6121f5 100644 --- a/api/src/com/cloud/agent/api/CreateVolumeFromSnapshotCommand.java +++ b/api/src/com/cloud/agent/api/CreateVolumeFromSnapshotCommand.java @@ -18,6 +18,7 @@ import com.cloud.storage.StoragePool; + /** * This currently assumes that both primary and secondary storage are mounted on the XenServer. */ diff --git a/api/src/com/cloud/agent/api/CreateVolumeFromVMSnapshotAnswer.java b/api/src/com/cloud/agent/api/CreateVolumeFromVMSnapshotAnswer.java new file mode 100644 index 000000000..ed3bc62cc --- /dev/null +++ b/api/src/com/cloud/agent/api/CreateVolumeFromVMSnapshotAnswer.java @@ -0,0 +1,54 @@ +// 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.agent.api; + +import com.cloud.agent.api.to.VolumeTO; + +public class CreateVolumeFromVMSnapshotAnswer extends Answer { + private String path; + private VolumeTO volumeTo; + + public VolumeTO getVolumeTo() { + return volumeTo; + } + + public CreateVolumeFromVMSnapshotAnswer( + CreateVolumeFromVMSnapshotCommand cmd, VolumeTO volumeTo) { + super(cmd, true, ""); + this.volumeTo = volumeTo; + } + + public String getPath() { + return path; + } + + protected CreateVolumeFromVMSnapshotAnswer() { + + } + + public CreateVolumeFromVMSnapshotAnswer( + CreateVolumeFromVMSnapshotCommand cmd, String path) { + super(cmd, true, ""); + this.path = path; + } + + public CreateVolumeFromVMSnapshotAnswer( + CreateVolumeFromVMSnapshotCommand cmd, boolean result, String string) { + super(cmd, result, string); + } +} diff --git a/api/src/com/cloud/agent/api/CreateVolumeFromVMSnapshotCommand.java b/api/src/com/cloud/agent/api/CreateVolumeFromVMSnapshotCommand.java new file mode 100644 index 000000000..634e15c9f --- /dev/null +++ b/api/src/com/cloud/agent/api/CreateVolumeFromVMSnapshotCommand.java @@ -0,0 +1,88 @@ +// 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.agent.api; + +import com.cloud.agent.api.to.StorageFilerTO; +import com.cloud.vm.DiskProfile; + +public class CreateVolumeFromVMSnapshotCommand extends Command { + + protected String path; + protected String name; + protected Boolean fullClone; + protected String storagePoolUuid; + private StorageFilerTO pool; + private DiskProfile diskProfile; + private Long volumeId; + + public DiskProfile getDskch() { + return diskProfile; + } + + public String getPath() { + return path; + } + + public Long getVolumeId() { + return volumeId; + } + + protected CreateVolumeFromVMSnapshotCommand() { + + } + + public CreateVolumeFromVMSnapshotCommand(String path, String name, + Boolean fullClone, String storagePoolUuid) { + this.path = path; + this.name = name; + this.fullClone = fullClone; + this.storagePoolUuid = storagePoolUuid; + } + + public CreateVolumeFromVMSnapshotCommand(String path, String name, + Boolean fullClone, String storagePoolUuid, StorageFilerTO pool, + DiskProfile diskProfile, Long volumeId) { + this.path = path; + this.name = name; + this.fullClone = fullClone; + this.storagePoolUuid = storagePoolUuid; + this.pool = pool; + this.diskProfile = diskProfile; + this.volumeId = volumeId; + } + + @Override + public boolean executeInSequence() { + return false; + } + + public String getName() { + return name; + } + + public Boolean getFullClone() { + return fullClone; + } + + public String getStoragePoolUuid() { + return storagePoolUuid; + } + + public StorageFilerTO getPool() { + return pool; + } +} diff --git a/api/src/com/cloud/agent/api/DeleteSnapshotBackupCommand.java b/api/src/com/cloud/agent/api/DeleteSnapshotBackupCommand.java index 611414895..128df84c7 100644 --- a/api/src/com/cloud/agent/api/DeleteSnapshotBackupCommand.java +++ b/api/src/com/cloud/agent/api/DeleteSnapshotBackupCommand.java @@ -19,6 +19,7 @@ import com.cloud.agent.api.LogLevel.Log4jLevel; import com.cloud.agent.api.to.S3TO; import com.cloud.agent.api.to.SwiftTO; +import com.cloud.storage.StoragePool; /** * This command encapsulates a primitive operation which enables coalescing the backed up VHD snapshots on the secondary server @@ -78,7 +79,8 @@ protected DeleteSnapshotBackupCommand() { * @param backupUUID The VHD which has to be deleted * @param childUUID The child VHD file of the backup whose parent is reset to its grandparent. */ - public DeleteSnapshotBackupCommand(SwiftTO swift, + public DeleteSnapshotBackupCommand(StoragePool pool, + SwiftTO swift, S3TO s3, String secondaryStoragePoolURL, Long dcId, @@ -86,7 +88,7 @@ public DeleteSnapshotBackupCommand(SwiftTO swift, Long volumeId, String backupUUID, Boolean all) { - super(null, secondaryStoragePoolURL, backupUUID, null, dcId, accountId, volumeId); + super(pool, secondaryStoragePoolURL, backupUUID, null, dcId, accountId, volumeId); setSwift(swift); this.s3 = s3; setAll(all); diff --git a/api/src/com/cloud/agent/api/DeleteVMSnapshotAnswer.java b/api/src/com/cloud/agent/api/DeleteVMSnapshotAnswer.java new file mode 100644 index 000000000..8f4ecad3d --- /dev/null +++ b/api/src/com/cloud/agent/api/DeleteVMSnapshotAnswer.java @@ -0,0 +1,49 @@ +// 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.agent.api; + +import java.util.List; + +import com.cloud.agent.api.to.VolumeTO; + +public class DeleteVMSnapshotAnswer extends Answer { + private List volumeTOs; + + public DeleteVMSnapshotAnswer() { + } + + public DeleteVMSnapshotAnswer(DeleteVMSnapshotCommand cmd, boolean result, + String message) { + super(cmd, result, message); + } + + public DeleteVMSnapshotAnswer(DeleteVMSnapshotCommand cmd, + List volumeTOs) { + super(cmd, true, ""); + this.volumeTOs = volumeTOs; + } + + public List getVolumeTOs() { + return volumeTOs; + } + + public void setVolumeTOs(List volumeTOs) { + this.volumeTOs = volumeTOs; + } + + +} diff --git a/api/src/com/cloud/agent/api/DeleteVMSnapshotCommand.java b/api/src/com/cloud/agent/api/DeleteVMSnapshotCommand.java new file mode 100644 index 000000000..c213448bf --- /dev/null +++ b/api/src/com/cloud/agent/api/DeleteVMSnapshotCommand.java @@ -0,0 +1,28 @@ +// 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.agent.api; + +import java.util.List; + +import com.cloud.agent.api.to.VolumeTO; + + +public class DeleteVMSnapshotCommand extends VMSnapshotBaseCommand { + public DeleteVMSnapshotCommand(String vmName, VMSnapshotTO snapshot, List volumeTOs, String guestOSType) { + super( vmName, snapshot, volumeTOs, guestOSType); + } +} diff --git a/api/src/com/cloud/agent/api/RebootCommand.java b/api/src/com/cloud/agent/api/RebootCommand.java index 299e61b76..49712b6fc 100755 --- a/api/src/com/cloud/agent/api/RebootCommand.java +++ b/api/src/com/cloud/agent/api/RebootCommand.java @@ -16,6 +16,7 @@ // under the License. package com.cloud.agent.api; +import com.cloud.hypervisor.Hypervisor; import com.cloud.vm.VirtualMachine; public class RebootCommand extends Command { diff --git a/api/src/com/cloud/agent/api/RevertToVMSnapshotAnswer.java b/api/src/com/cloud/agent/api/RevertToVMSnapshotAnswer.java new file mode 100644 index 000000000..848ffc0eb --- /dev/null +++ b/api/src/com/cloud/agent/api/RevertToVMSnapshotAnswer.java @@ -0,0 +1,63 @@ +// 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.agent.api; + +import java.util.List; + +import com.cloud.agent.api.to.VolumeTO; +import com.cloud.vm.VirtualMachine; + +public class RevertToVMSnapshotAnswer extends Answer { + + private List volumeTOs; + private VirtualMachine.State vmState; + + public RevertToVMSnapshotAnswer(RevertToVMSnapshotCommand cmd, boolean result, + String message) { + super(cmd, result, message); + } + + public RevertToVMSnapshotAnswer() { + super(); + } + + public RevertToVMSnapshotAnswer(RevertToVMSnapshotCommand cmd, + List volumeTOs, + VirtualMachine.State vmState) { + super(cmd, true, ""); + this.volumeTOs = volumeTOs; + this.vmState = vmState; + } + + public VirtualMachine.State getVmState() { + return vmState; + } + + public List getVolumeTOs() { + return volumeTOs; + } + + public void setVolumeTOs(List volumeTOs) { + this.volumeTOs = volumeTOs; + } + + public void setVmState(VirtualMachine.State vmState) { + this.vmState = vmState; + } + +} diff --git a/api/src/com/cloud/agent/api/RevertToVMSnapshotCommand.java b/api/src/com/cloud/agent/api/RevertToVMSnapshotCommand.java new file mode 100644 index 000000000..429a186e0 --- /dev/null +++ b/api/src/com/cloud/agent/api/RevertToVMSnapshotCommand.java @@ -0,0 +1,29 @@ +// 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.agent.api; + +import java.util.List; + +import com.cloud.agent.api.to.VolumeTO; + +public class RevertToVMSnapshotCommand extends VMSnapshotBaseCommand { + + public RevertToVMSnapshotCommand(String vmName, VMSnapshotTO snapshot, List volumeTOs, String guestOSType) { + super(vmName, snapshot, volumeTOs, guestOSType); + } + +} diff --git a/api/src/com/cloud/agent/api/ScaleVmAnswer.java b/api/src/com/cloud/agent/api/ScaleVmAnswer.java new file mode 100644 index 000000000..31d6e4415 --- /dev/null +++ b/api/src/com/cloud/agent/api/ScaleVmAnswer.java @@ -0,0 +1,28 @@ +// 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.agent.api; + +public class ScaleVmAnswer extends Answer { + + protected ScaleVmAnswer() { + } + + public ScaleVmAnswer(ScaleVmCommand cmd, boolean result, String detail) { + super(cmd, result, detail); + } + +} diff --git a/api/src/com/cloud/agent/api/ScaleVmCommand.java b/api/src/com/cloud/agent/api/ScaleVmCommand.java new file mode 100644 index 000000000..35d22ad9d --- /dev/null +++ b/api/src/com/cloud/agent/api/ScaleVmCommand.java @@ -0,0 +1,113 @@ +// 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.agent.api; + +import com.cloud.agent.api.to.VirtualMachineTO; + +public class ScaleVmCommand extends Command { + + VirtualMachineTO vm; + String vmName; + int cpus; + Integer speed; + long minRam; + long maxRam; + + public VirtualMachineTO getVm() { + return vm; + } + + public void setVm(VirtualMachineTO vm) { + this.vm = vm; + } + + public int getCpus() { + return cpus; + } + + public ScaleVmCommand(String vmName, int cpus, + Integer speed, long minRam, long maxRam, boolean limitCpuUse) { + super(); + this.vmName = vmName; + this.cpus = cpus; + this.speed = speed; + this.minRam = minRam; + this.maxRam = maxRam; + this.vm = new VirtualMachineTO(1L, vmName, null, cpus, speed, minRam, maxRam, null, null, false, false, null); + /*vm.setName(vmName); + vm.setCpus(cpus); + vm.setRam(minRam, maxRam);*/ + } + + public void setCpus(int cpus) { + this.cpus = cpus; + } + + public Integer getSpeed() { + return speed; + } + + public void setSpeed(Integer speed) { + this.speed = speed; + } + + public long getMinRam() { + return minRam; + } + + public void setMinRam(long minRam) { + this.minRam = minRam; + } + + public long getMaxRam() { + return maxRam; + } + + public void setMaxRam(long maxRam) { + this.maxRam = maxRam; + } + + public String getVmName() { + return vmName; + } + + public void setVmName(String vmName) { + this.vmName = vmName; + } + + public VirtualMachineTO getVirtualMachine() { + return vm; + } + + @Override + public boolean executeInSequence() { + return true; + } + + protected ScaleVmCommand() { + } + + public ScaleVmCommand(VirtualMachineTO vm) { + this.vm = vm; + } + + public boolean getLimitCpuUse() { + // TODO Auto-generated method stub + return false; + } + +} diff --git a/api/src/com/cloud/agent/api/ScheduleHostScanTaskCommand.java b/api/src/com/cloud/agent/api/ScheduleHostScanTaskCommand.java new file mode 100755 index 000000000..e938de73f --- /dev/null +++ b/api/src/com/cloud/agent/api/ScheduleHostScanTaskCommand.java @@ -0,0 +1,32 @@ +// 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.agent.api; + +/* + * This is used to schedule an explicit host scan in MS peers. Currently used during + * add host operation so that correct MS can take host ownership. On receiving the + * command the scan is scheduled immediately. + */ +public class ScheduleHostScanTaskCommand extends Command { + public ScheduleHostScanTaskCommand() { + } + + @Override + public boolean executeInSequence() { + return false; // standalone command and can be executed independent of other commands + } +} diff --git a/api/src/com/cloud/agent/api/SecurityGroupRulesCmd.java b/api/src/com/cloud/agent/api/SecurityGroupRulesCmd.java index affad1f9b..4336b4c32 100644 --- a/api/src/com/cloud/agent/api/SecurityGroupRulesCmd.java +++ b/api/src/com/cloud/agent/api/SecurityGroupRulesCmd.java @@ -18,6 +18,7 @@ import java.io.ByteArrayOutputStream; import java.io.IOException; +import java.util.List; import java.util.zip.DeflaterOutputStream; import org.apache.commons.codec.binary.Base64; @@ -80,6 +81,7 @@ public int getEndPort() { Long msId; IpPortAndProto [] ingressRuleSet; IpPortAndProto [] egressRuleSet; + private List secIps; public SecurityGroupRulesCmd() { super(); @@ -103,6 +105,23 @@ public SecurityGroupRulesCmd(String guestIp, String guestMac, String vmName, Lon } + public SecurityGroupRulesCmd(String guestIp, String guestMac, String vmName, Long vmId, String signature, Long seqNum, IpPortAndProto[] ingressRuleSet, IpPortAndProto[] egressRuleSet, List secIps) { + super(); + this.guestIp = guestIp; + this.vmName = vmName; + this.ingressRuleSet = ingressRuleSet; + this.egressRuleSet = egressRuleSet; + this.guestMac = guestMac; + this.signature = signature; + this.seqNum = seqNum; + this.vmId = vmId; + if (signature == null) { + String stringified = stringifyRules(); + this.signature = DigestUtils.md5Hex(stringified); + } + this.secIps = secIps; + } + @Override public boolean executeInSequence() { return true; @@ -131,6 +150,10 @@ public String getGuestIp() { return guestIp; } + public List getSecIps() { + return secIps; + } + public String getVmName() { return vmName; @@ -165,6 +188,20 @@ private String compressCidr(String cidr) { } + public String getSecIpsString() { + StringBuilder sb = new StringBuilder(); + List ips = getSecIps(); + if (ips == null) { + return "0:"; + } else { + for (String ip : ips) { + sb.append(ip).append(":"); + } + } + return sb.toString(); + } + + public String stringifyCompressedRules() { StringBuilder ruleBuilder = new StringBuilder(); for (SecurityGroupRulesCmd.IpPortAndProto ipPandP : getIngressRuleSet()) { diff --git a/api/src/com/cloud/agent/api/StopCommand.java b/api/src/com/cloud/agent/api/StopCommand.java index 9ee7ce3c8..1c67f3816 100755 --- a/api/src/com/cloud/agent/api/StopCommand.java +++ b/api/src/com/cloud/agent/api/StopCommand.java @@ -38,10 +38,9 @@ public StopCommand(VirtualMachine vm, String vnet) { super(vm); this.vnet = vnet; } - - public StopCommand(VirtualMachine vm, String vmName, String vnet) { - super(vmName); - this.vnet = vnet; + + public StopCommand(VirtualMachine vm) { + super(vm); } public StopCommand(String vmName) { diff --git a/api/src/com/cloud/agent/api/VMSnapshotBaseCommand.java b/api/src/com/cloud/agent/api/VMSnapshotBaseCommand.java new file mode 100644 index 000000000..2120f2f73 --- /dev/null +++ b/api/src/com/cloud/agent/api/VMSnapshotBaseCommand.java @@ -0,0 +1,74 @@ +// 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.agent.api; + +import java.util.List; + +import com.cloud.agent.api.to.VolumeTO; + +public class VMSnapshotBaseCommand extends Command{ + protected List volumeTOs; + protected VMSnapshotTO target; + protected String vmName; + protected String guestOSType; + + + public VMSnapshotBaseCommand(String vmName, VMSnapshotTO snapshot, List volumeTOs, String guestOSType) { + this.vmName = vmName; + this.target = snapshot; + this.volumeTOs = volumeTOs; + this.guestOSType = guestOSType; + } + + public List getVolumeTOs() { + return volumeTOs; + } + + public void setVolumeTOs(List volumeTOs) { + this.volumeTOs = volumeTOs; + } + + public VMSnapshotTO getTarget() { + return target; + } + + public void setTarget(VMSnapshotTO target) { + this.target = target; + } + + public String getVmName() { + return vmName; + } + + public void setVmName(String vmName) { + this.vmName = vmName; + } + + @Override + public boolean executeInSequence() { + return false; + } + + public String getGuestOSType() { + return guestOSType; + } + + public void setGuestOSType(String guestOSType) { + this.guestOSType = guestOSType; + } +} diff --git a/api/src/com/cloud/agent/api/VMSnapshotTO.java b/api/src/com/cloud/agent/api/VMSnapshotTO.java new file mode 100644 index 000000000..c7b42d25b --- /dev/null +++ b/api/src/com/cloud/agent/api/VMSnapshotTO.java @@ -0,0 +1,90 @@ +// 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.agent.api; + +import com.cloud.vm.snapshot.VMSnapshot; + +public class VMSnapshotTO { + private Long id; + private String snapshotName; + private VMSnapshot.Type type; + private Long createTime; + private Boolean current; + private String description; + private VMSnapshotTO parent; + + public Long getId() { + return id; + } + public void setId(Long id) { + this.id = id; + } + public VMSnapshotTO(Long id, String snapshotName, + VMSnapshot.Type type, Long createTime, + String description, Boolean current, VMSnapshotTO parent) { + super(); + this.id = id; + this.snapshotName = snapshotName; + this.type = type; + this.createTime = createTime; + this.current = current; + this.description = description; + this.parent = parent; + } + public VMSnapshotTO() { + + } + public String getDescription() { + return description; + } + public void setDescription(String description) { + this.description = description; + } + public Boolean getCurrent() { + return current; + } + public void setCurrent(Boolean current) { + this.current = current; + } + public Long getCreateTime() { + return createTime; + } + public void setCreateTime(Long createTime) { + this.createTime = createTime; + } + + public VMSnapshot.Type getType() { + return type; + } + public void setType(VMSnapshot.Type type) { + this.type = type; + } + + public String getSnapshotName() { + return snapshotName; + } + public void setSnapshotName(String snapshotName) { + this.snapshotName = snapshotName; + } + public VMSnapshotTO getParent() { + return parent; + } + public void setParent(VMSnapshotTO parent) { + this.parent = parent; + } + +} diff --git a/api/src/com/cloud/agent/api/proxy/StartConsoleProxyAgentHttpHandlerCommand.java b/api/src/com/cloud/agent/api/proxy/StartConsoleProxyAgentHttpHandlerCommand.java index c5af38eb7..3befc2f6b 100644 --- a/api/src/com/cloud/agent/api/proxy/StartConsoleProxyAgentHttpHandlerCommand.java +++ b/api/src/com/cloud/agent/api/proxy/StartConsoleProxyAgentHttpHandlerCommand.java @@ -17,8 +17,8 @@ package com.cloud.agent.api.proxy; import com.cloud.agent.api.Command; -import com.cloud.agent.api.LogLevel.Log4jLevel; import com.cloud.agent.api.LogLevel; +import com.cloud.agent.api.LogLevel.Log4jLevel; public class StartConsoleProxyAgentHttpHandlerCommand extends Command { @LogLevel(Log4jLevel.Off) diff --git a/api/src/com/cloud/agent/api/routing/DhcpEntryCommand.java b/api/src/com/cloud/agent/api/routing/DhcpEntryCommand.java index f0ce70e9a..fd8d84c8c 100644 --- a/api/src/com/cloud/agent/api/routing/DhcpEntryCommand.java +++ b/api/src/com/cloud/agent/api/routing/DhcpEntryCommand.java @@ -31,6 +31,7 @@ public class DhcpEntryCommand extends NetworkElementCommand { String vmIp6Address; String ip6Gateway; String duid; + private boolean isDefault; protected DhcpEntryCommand() { @@ -46,6 +47,7 @@ public DhcpEntryCommand(String vmMac, String vmIpAddress, String vmName, String this.vmIpAddress = vmIpAddress; this.vmName = vmName; this.vmIp6Address = vmIp6Address; + this.setDefault(true); } public DhcpEntryCommand(String vmMac, String vmIpAddress, String vmName, String vmIp6Address, String dns, String gateway, String ip6Gateway) { @@ -129,4 +131,12 @@ public String getVmIp6Address() { public void setVmIp6Address(String ip6Address) { this.vmIp6Address = ip6Address; } + + public boolean isDefault() { + return isDefault; + } + + public void setDefault(boolean isDefault) { + this.isDefault = isDefault; + } } diff --git a/api/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigAnswer.java b/api/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigAnswer.java new file mode 100644 index 000000000..e5167fede --- /dev/null +++ b/api/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigAnswer.java @@ -0,0 +1,27 @@ +// 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.agent.api.routing; + +import com.cloud.agent.api.Answer; + +public class GlobalLoadBalancerConfigAnswer extends Answer{ + + public GlobalLoadBalancerConfigAnswer(boolean success, String details) { + this.result = success; + this.details = details; + } +} diff --git a/api/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigCommand.java b/api/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigCommand.java new file mode 100644 index 000000000..b3603c8be --- /dev/null +++ b/api/src/com/cloud/agent/api/routing/GlobalLoadBalancerConfigCommand.java @@ -0,0 +1,100 @@ +// 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.agent.api.routing; + +import com.cloud.agent.api.Command; + +import java.util.List; + +/** + * GlobalLoadBalancerConfigCommand used for sending the GSLB configuration to GSLB service provider + */ +public class GlobalLoadBalancerConfigCommand extends Command { + + // FQDN that represents the globally load balanced service + String domainName; + + // type of the globally load balanced service + String serviceType; + + // load balancing method to distribute traffic across the sites participating in global service load balancing + String lbMethod; + + // session persistence type + String persistenceType; + + // unique Id given per gslb rule, that is uniquely represents glsb rule on all participant sites + long gslbId; + + // true if global load balancer rule is being deleted + boolean revoked; + + // list of the site details that are participating in the GSLB service + List siteLoadBalancers; + + public GlobalLoadBalancerConfigCommand(String domainName, + String lbMethod, + String persistenceType, + String serviceType, + long gslbId, + boolean revoked) { + this.domainName = domainName; + this.serviceType = serviceType; + this.lbMethod = lbMethod; + this.persistenceType = persistenceType; + this.gslbId = gslbId; + this.revoked = revoked; + } + + public List getSiteDetails() { + return siteLoadBalancers; + } + + public void setSiteLoadBalancers(List siteLoadBalancers) { + this.siteLoadBalancers = siteLoadBalancers; + } + + public String getServiceType() { + return serviceType; + } + + public String getLoadBalancerMethod() { + return lbMethod; + } + + public String getPersistenceType() { + return persistenceType; + } + + public long getGslbId() { + return this.gslbId; + } + + public String getDomainName() { + return domainName; + } + + public boolean isForRevoke() { + return revoked; + } + + @Override + public boolean executeInSequence() { + return false; + } +} diff --git a/api/src/com/cloud/agent/api/routing/HealthCheckLBConfigAnswer.java b/api/src/com/cloud/agent/api/routing/HealthCheckLBConfigAnswer.java new file mode 100644 index 000000000..dfca4ab59 --- /dev/null +++ b/api/src/com/cloud/agent/api/routing/HealthCheckLBConfigAnswer.java @@ -0,0 +1,42 @@ +// 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.agent.api.routing; + +import java.util.List; + +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.to.LoadBalancerTO; +import com.cloud.agent.api.to.NicTO; + +/** + * LoadBalancerConfigCommand sends the load balancer configuration + */ +public class HealthCheckLBConfigAnswer extends Answer { + List loadBalancers; + + protected HealthCheckLBConfigAnswer() { + } + + public HealthCheckLBConfigAnswer(List loadBalancers) { + this.loadBalancers = loadBalancers; + } + + public List getLoadBalancers() { + return loadBalancers; + } + +} diff --git a/api/src/com/cloud/agent/api/routing/HealthCheckLBConfigCommand.java b/api/src/com/cloud/agent/api/routing/HealthCheckLBConfigCommand.java new file mode 100644 index 000000000..f705f6c97 --- /dev/null +++ b/api/src/com/cloud/agent/api/routing/HealthCheckLBConfigCommand.java @@ -0,0 +1,39 @@ +// 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.agent.api.routing; + +import com.cloud.agent.api.to.LoadBalancerTO; +import com.cloud.agent.api.to.NicTO; + +/** + * LoadBalancerConfigCommand sends the load balancer configuration + */ +public class HealthCheckLBConfigCommand extends NetworkElementCommand { + LoadBalancerTO[] loadBalancers; + + protected HealthCheckLBConfigCommand() { + } + + public HealthCheckLBConfigCommand(LoadBalancerTO[] loadBalancers) { + this.loadBalancers = loadBalancers; + } + + public LoadBalancerTO[] getLoadBalancers() { + return loadBalancers; + } + +} diff --git a/api/src/com/cloud/agent/api/routing/SiteLoadBalancerConfig.java b/api/src/com/cloud/agent/api/routing/SiteLoadBalancerConfig.java new file mode 100644 index 000000000..cca5de831 --- /dev/null +++ b/api/src/com/cloud/agent/api/routing/SiteLoadBalancerConfig.java @@ -0,0 +1,121 @@ +// 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.agent.api.routing; + +// details of site participating in the GLSB service, represents configuration load balancer rule and the zone +// in which the rule is configured +public class SiteLoadBalancerConfig { + + // true if the site details are local to the zone receiving 'GlobalLoadBalancerConfigCommand' + boolean local; + + // true if the site needs to be removed from GSLB service + boolean revoked; + + // service type of the 'site load balanced' service + String serviceType; + + // public IP corresponding to the site load balanced service + String servicePublicIp; + + // port corresponding to the site load balanced service + String servicePort; + + // Private IP corresponding to the GSLB service provider in the site. + String gslbProviderPrivateIp; + + // Public IP corresponding to the GSLB service provider in the site. + String gslbProviderPublicIp; + + // zone id in which site is located + long dataCenterId; + + public SiteLoadBalancerConfig(boolean revoked, String serviceType, String servicePublicIp, String servicePort, + long dataCenterId) { + this.revoked = revoked; + this.serviceType = serviceType; + this.servicePublicIp = servicePublicIp; + this.servicePort = servicePort; + this.dataCenterId = dataCenterId; + } + + public SiteLoadBalancerConfig(String gslbProviderPublicIP, String gslbProviderPrivateIp, boolean local, + boolean revoked, String serviceType, String servicePublicIp, String port, + long dataCenterId) { + this(revoked, serviceType, servicePublicIp, port, dataCenterId); + this.gslbProviderPrivateIp = gslbProviderPrivateIp; + this.gslbProviderPublicIp = gslbProviderPublicIP; + this.local = local; + } + + public String getServiceType() { + return serviceType; + } + + public void setServiceType(String serviceType) { + this.serviceType = serviceType; + } + + public String getServicePublicIp() { + return servicePublicIp; + } + + public void SetServicePublicIp(String servicePublicIp) { + this.servicePublicIp = servicePublicIp; + } + + public String getServicePort() { + return servicePort; + } + + public void setServicePort(String port) { + this.servicePort = port; + } + + public String getGslbProviderPrivateIp() { + return gslbProviderPrivateIp; + } + + public void setGslbProviderPrivateIp(String privateIp) { + this.gslbProviderPrivateIp = privateIp; + } + + public String getGslbProviderPublicIp() { + return gslbProviderPublicIp; + } + + public long getDataCenterId() { + return dataCenterId; + } + + public void setGslbProviderPublicIp(String publicIp) { + this.gslbProviderPublicIp = publicIp; + } + + public boolean isLocal() { + return local; + } + + public void setLocal(boolean local) { + this.local = local; + } + + public boolean forRevoke() { + return revoked; + } +} \ No newline at end of file diff --git a/api/src/com/cloud/agent/api/storage/CreateEntityDownloadURLCommand.java b/api/src/com/cloud/agent/api/storage/CreateEntityDownloadURLCommand.java index c80179a05..d928e0c5b 100755 --- a/api/src/com/cloud/agent/api/storage/CreateEntityDownloadURLCommand.java +++ b/api/src/com/cloud/agent/api/storage/CreateEntityDownloadURLCommand.java @@ -16,7 +16,6 @@ // under the License. package com.cloud.agent.api.storage; -import com.cloud.agent.api.Command; public class CreateEntityDownloadURLCommand extends AbstractDownloadCommand { diff --git a/api/src/com/cloud/agent/api/storage/DownloadCommand.java b/api/src/com/cloud/agent/api/storage/DownloadCommand.java index efb5ecb52..c6ffe45a9 100644 --- a/api/src/com/cloud/agent/api/storage/DownloadCommand.java +++ b/api/src/com/cloud/agent/api/storage/DownloadCommand.java @@ -18,10 +18,11 @@ import java.net.URI; -import com.cloud.storage.Volume; +import org.apache.cloudstack.api.InternalIdentity; + import com.cloud.storage.Storage.ImageFormat; +import com.cloud.storage.Volume; import com.cloud.template.VirtualMachineTemplate; -import org.apache.cloudstack.api.InternalIdentity; public class DownloadCommand extends AbstractDownloadCommand implements InternalIdentity { diff --git a/api/src/com/cloud/agent/api/storage/ListTemplateAnswer.java b/api/src/com/cloud/agent/api/storage/ListTemplateAnswer.java index 06e95fe42..a4e2e2550 100644 --- a/api/src/com/cloud/agent/api/storage/ListTemplateAnswer.java +++ b/api/src/com/cloud/agent/api/storage/ListTemplateAnswer.java @@ -19,7 +19,6 @@ import java.util.Map; import com.cloud.agent.api.Answer; - import com.cloud.storage.template.TemplateInfo; public class ListTemplateAnswer extends Answer { diff --git a/api/src/com/cloud/agent/api/storage/ListVolumeCommand.java b/api/src/com/cloud/agent/api/storage/ListVolumeCommand.java index a2776c2af..63c5b621c 100755 --- a/api/src/com/cloud/agent/api/storage/ListVolumeCommand.java +++ b/api/src/com/cloud/agent/api/storage/ListVolumeCommand.java @@ -16,9 +16,6 @@ // under the License. package com.cloud.agent.api.storage; -import com.cloud.agent.api.LogLevel; -import com.cloud.agent.api.LogLevel.Log4jLevel; -import com.cloud.agent.api.to.SwiftTO; public class ListVolumeCommand extends StorageCommand { diff --git a/api/src/com/cloud/agent/api/storage/PrimaryStorageDownloadCommand.java b/api/src/com/cloud/agent/api/storage/PrimaryStorageDownloadCommand.java index b45004159..8d955bb1c 100644 --- a/api/src/com/cloud/agent/api/storage/PrimaryStorageDownloadCommand.java +++ b/api/src/com/cloud/agent/api/storage/PrimaryStorageDownloadCommand.java @@ -16,8 +16,8 @@ // under the License. package com.cloud.agent.api.storage; -import com.cloud.storage.Storage.ImageFormat; import com.cloud.agent.api.to.StorageFilerTO; +import com.cloud.storage.Storage.ImageFormat; import com.cloud.storage.StoragePool; /** diff --git a/api/src/com/cloud/agent/api/storage/ResizeVolumeCommand.java b/api/src/com/cloud/agent/api/storage/ResizeVolumeCommand.java index 8af23a0ab..82d3ae7b4 100644 --- a/api/src/com/cloud/agent/api/storage/ResizeVolumeCommand.java +++ b/api/src/com/cloud/agent/api/storage/ResizeVolumeCommand.java @@ -18,7 +18,6 @@ import com.cloud.agent.api.Command; import com.cloud.agent.api.to.StorageFilerTO; -import com.cloud.storage.StoragePool; public class ResizeVolumeCommand extends Command { private String path; diff --git a/api/src/com/cloud/agent/api/storage/UploadCommand.java b/api/src/com/cloud/agent/api/storage/UploadCommand.java index 2a7c60a51..473bd5b75 100644 --- a/api/src/com/cloud/agent/api/storage/UploadCommand.java +++ b/api/src/com/cloud/agent/api/storage/UploadCommand.java @@ -16,11 +16,12 @@ // under the License. package com.cloud.agent.api.storage; +import org.apache.cloudstack.api.InternalIdentity; + import com.cloud.agent.api.storage.DownloadCommand.PasswordAuth; import com.cloud.agent.api.to.TemplateTO; import com.cloud.storage.Upload.Type; import com.cloud.template.VirtualMachineTemplate; -import org.apache.cloudstack.api.InternalIdentity; public class UploadCommand extends AbstractUploadCommand implements InternalIdentity { diff --git a/api/src/com/cloud/agent/api/to/FirewallRuleTO.java b/api/src/com/cloud/agent/api/to/FirewallRuleTO.java index 38de8d0b4..f296aa4d1 100644 --- a/api/src/com/cloud/agent/api/to/FirewallRuleTO.java +++ b/api/src/com/cloud/agent/api/to/FirewallRuleTO.java @@ -19,10 +19,12 @@ import java.util.ArrayList; import java.util.List; +import org.apache.cloudstack.api.InternalIdentity; + import com.cloud.network.rules.FirewallRule; import com.cloud.network.rules.FirewallRule.State; +import com.cloud.network.rules.FirewallRule.TrafficType; import com.cloud.utils.net.NetUtils; -import org.apache.cloudstack.api.InternalIdentity; /** * FirewallRuleTO transfers a port range for an ip to be opened. @@ -94,7 +96,7 @@ public FirewallRuleTO(FirewallRule rule, String srcVlanTag, String srcIp) { public FirewallRuleTO(FirewallRule rule, String srcIp) { this(rule.getId(),null, srcIp, rule.getProtocol(), rule.getSourcePortStart(), rule.getSourcePortEnd(), rule.getState()==State.Revoke, rule.getState()==State.Active, rule.getPurpose(),rule.getSourceCidrList(),rule.getIcmpType(),rule.getIcmpCode()); } - + public FirewallRuleTO(FirewallRule rule, String srcVlanTag, String srcIp, FirewallRule.Purpose purpose) { this(rule.getId(),srcVlanTag, srcIp, rule.getProtocol(), rule.getSourcePortStart(), rule.getSourcePortEnd(), rule.getState()==State.Revoke, rule.getState()==State.Active, purpose,rule.getSourceCidrList(),rule.getIcmpType(),rule.getIcmpCode()); } @@ -108,6 +110,11 @@ public FirewallRuleTO(FirewallRule rule, String srcVlanTag, String srcIp, Firewa this(rule.getId(),srcVlanTag, srcIp, rule.getProtocol(), rule.getSourcePortStart(), rule.getSourcePortEnd(), revokeState, alreadyAdded, purpose,rule.getSourceCidrList(),rule.getIcmpType(),rule.getIcmpCode()); } + public FirewallRuleTO(FirewallRule rule, String guestVlanTag, FirewallRule.TrafficType trafficType) { + this(rule.getId(), guestVlanTag, null, rule.getProtocol(), rule.getSourcePortStart(), rule.getSourcePortEnd(), rule.getState()==State.Revoke, rule.getState()==State.Active, rule.getPurpose(), rule.getSourceCidrList(), rule.getIcmpType(), rule.getIcmpCode()); + this.trafficType = trafficType; + } + public FirewallRule.TrafficType getTrafficType(){ return trafficType; } diff --git a/api/src/com/cloud/agent/api/to/LoadBalancerTO.java b/api/src/com/cloud/agent/api/to/LoadBalancerTO.java index 2d166ea1e..df2f8a874 100644 --- a/api/src/com/cloud/agent/api/to/LoadBalancerTO.java +++ b/api/src/com/cloud/agent/api/to/LoadBalancerTO.java @@ -31,6 +31,7 @@ import com.cloud.network.lb.LoadBalancingRule.LbAutoScaleVmProfile; import com.cloud.network.lb.LoadBalancingRule.LbCondition; import com.cloud.network.lb.LoadBalancingRule.LbDestination; +import com.cloud.network.lb.LoadBalancingRule.LbHealthCheckPolicy; import com.cloud.network.lb.LoadBalancingRule.LbStickinessPolicy; import com.cloud.utils.Pair; @@ -46,8 +47,10 @@ public class LoadBalancerTO { boolean inline; DestinationTO[] destinations; private StickinessPolicyTO[] stickinessPolicies; + private HealthCheckPolicyTO[] healthCheckPolicies; private AutoScaleVmGroupTO autoScaleVmGroupTO; final static int MAX_STICKINESS_POLICIES = 1; + final static int MAX_HEALTHCHECK_POLICIES = 1; public LoadBalancerTO(String uuid, String srcIp, int srcPort, String protocol, String algorithm, boolean revoked, boolean alreadyAdded, boolean inline, List destinations) { if (destinations == null) { // for autoscaleconfig destinations will be null; @@ -69,23 +72,52 @@ public LoadBalancerTO(String uuid, String srcIp, int srcPort, String protocol, S } } - public LoadBalancerTO(String id, String srcIp, int srcPort, String protocol, String algorithm, boolean revoked, boolean alreadyAdded, boolean inline, List arg_destinations, List stickinessPolicies) { + public LoadBalancerTO(String id, String srcIp, int srcPort, String protocol, String algorithm, boolean revoked, + boolean alreadyAdded, boolean inline, List arg_destinations, + List stickinessPolicies) { + + this(id, srcIp, srcPort, protocol, algorithm, revoked, alreadyAdded, inline, arg_destinations, + stickinessPolicies, null); + } + + public LoadBalancerTO(String id, String srcIp, int srcPort, String protocol, String algorithm, boolean revoked, + boolean alreadyAdded, boolean inline, List arg_destinations, + List stickinessPolicies, List healthCheckPolicies) { this(id, srcIp, srcPort, protocol, algorithm, revoked, alreadyAdded, inline, arg_destinations); this.stickinessPolicies = null; + this.healthCheckPolicies = null; if (stickinessPolicies != null && stickinessPolicies.size() > 0) { this.stickinessPolicies = new StickinessPolicyTO[MAX_STICKINESS_POLICIES]; int index = 0; for (LbStickinessPolicy stickinesspolicy : stickinessPolicies) { if (!stickinesspolicy.isRevoked()) { - this.stickinessPolicies[index] = new StickinessPolicyTO(stickinesspolicy.getMethodName(), stickinesspolicy.getParams()); + this.stickinessPolicies[index] = new StickinessPolicyTO(stickinesspolicy.getMethodName(), + stickinesspolicy.getParams()); index++; - if (index == MAX_STICKINESS_POLICIES) break; - } + if (index == MAX_STICKINESS_POLICIES) + break; } - if (index == 0) this.stickinessPolicies = null; } + if (index == 0) + this.stickinessPolicies = null; + } + + if (healthCheckPolicies != null && healthCheckPolicies.size() > 0) { + this.healthCheckPolicies = new HealthCheckPolicyTO[MAX_HEALTHCHECK_POLICIES]; + int index = 0; + for (LbHealthCheckPolicy hcp : healthCheckPolicies) { + this.healthCheckPolicies[0] = new HealthCheckPolicyTO(hcp.getpingpath(), hcp.getDescription(), + hcp.getResponseTime(), hcp.getHealthcheckInterval(), hcp.getHealthcheckThresshold(), + hcp.getUnhealthThresshold(), hcp.isRevoked()); + index++; + if (index == MAX_HEALTHCHECK_POLICIES) + break; } + if (index == 0) + this.healthCheckPolicies = null; + } + } protected LoadBalancerTO() { } @@ -126,6 +158,10 @@ public StickinessPolicyTO[] getStickinessPolicies() { return stickinessPolicies; } + public HealthCheckPolicyTO[] getHealthCheckPolicies() { + return healthCheckPolicies; + } + public DestinationTO[] getDestinations() { return destinations; } @@ -158,6 +194,65 @@ public StickinessPolicyTO(String methodName, List> paramsLi this._methodName = methodName; this._paramsList = paramsList; } + } + + public static class HealthCheckPolicyTO { + private String pingPath; + private String description; + private int responseTime; + private int healthcheckInterval; + private int healthcheckThresshold; + private int unhealthThresshold; + private boolean revoke = false; + + public HealthCheckPolicyTO(String pingPath, String description, int responseTime, int healthcheckInterval, + int healthcheckThresshold, int unhealthThresshold, boolean revoke) { + + this.description = description; + this.pingPath = pingPath; + this.responseTime = responseTime; + this.healthcheckInterval = healthcheckInterval; + this.healthcheckThresshold = healthcheckThresshold; + this.unhealthThresshold = unhealthThresshold; + this.revoke = revoke; + } + + public HealthCheckPolicyTO() { + + } + + public String getpingPath() { + return pingPath; + } + + public String getDescription() { + return description; + } + + public int getResponseTime() { + return responseTime; + } + + public int getHealthcheckInterval() { + return healthcheckInterval; + } + + public int getHealthcheckThresshold() { + return healthcheckThresshold; + } + + public int getUnhealthThresshold() { + return unhealthThresshold; + } + + public void setRevoke(boolean revoke) { + this.revoke = revoke; + } + + public boolean isRevoked() { + return revoke; + } + } public static class DestinationTO { @@ -165,6 +260,7 @@ public static class DestinationTO { int destPort; boolean revoked; boolean alreadyAdded; + String monitorState; public DestinationTO(String destIp, int destPort, boolean revoked, boolean alreadyAdded) { this.destIp = destIp; this.destPort = destPort; @@ -190,6 +286,14 @@ public boolean isRevoked() { public boolean isAlreadyAdded() { return alreadyAdded; } + + public void setMonitorState(String state) { + this.monitorState = state; + } + + public String getMonitorState() { + return monitorState; + } } public static class CounterTO implements Serializable { private final String name; diff --git a/api/src/com/cloud/agent/api/to/NetworkACLTO.java b/api/src/com/cloud/agent/api/to/NetworkACLTO.java index 9b1a6296b..8818e13de 100644 --- a/api/src/com/cloud/agent/api/to/NetworkACLTO.java +++ b/api/src/com/cloud/agent/api/to/NetworkACLTO.java @@ -20,10 +20,11 @@ import java.util.ArrayList; import java.util.List; +import org.apache.cloudstack.api.InternalIdentity; + import com.cloud.network.rules.FirewallRule; import com.cloud.network.rules.FirewallRule.TrafficType; import com.cloud.utils.net.NetUtils; -import org.apache.cloudstack.api.InternalIdentity; public class NetworkACLTO implements InternalIdentity { diff --git a/api/src/com/cloud/agent/api/to/NicTO.java b/api/src/com/cloud/agent/api/to/NicTO.java index aa2aa19cc..ccebe115f 100644 --- a/api/src/com/cloud/agent/api/to/NicTO.java +++ b/api/src/com/cloud/agent/api/to/NicTO.java @@ -16,12 +16,15 @@ // under the License. package com.cloud.agent.api.to; +import java.util.List; + public class NicTO extends NetworkTO { int deviceId; Integer networkRateMbps; Integer networkRateMulticastMbps; boolean defaultNic; String uuid; + List nicSecIps; public NicTO() { super(); @@ -69,4 +72,12 @@ public void setUuid(String uuid) { public String toString() { return new StringBuilder("[Nic:").append(type).append("-").append(ip).append("-").append(broadcastUri).append("]").toString(); } + + public void setNicSecIps(List secIps) { + this.nicSecIps = secIps; + } + + public List getNicSecIps() { + return nicSecIps; + } } diff --git a/api/src/com/cloud/agent/api/to/S3TO.java b/api/src/com/cloud/agent/api/to/S3TO.java index 879df229c..d556cb6d0 100644 --- a/api/src/com/cloud/agent/api/to/S3TO.java +++ b/api/src/com/cloud/agent/api/to/S3TO.java @@ -16,10 +16,10 @@ // under the License. package com.cloud.agent.api.to; -import com.cloud.utils.S3Utils; - import java.util.Date; +import com.cloud.utils.S3Utils; + public final class S3TO implements S3Utils.ClientOptions { private Long id; diff --git a/api/src/com/cloud/agent/api/to/TemplateTO.java b/api/src/com/cloud/agent/api/to/TemplateTO.java index d77b80551..45fa57bf3 100644 --- a/api/src/com/cloud/agent/api/to/TemplateTO.java +++ b/api/src/com/cloud/agent/api/to/TemplateTO.java @@ -16,9 +16,10 @@ // under the License. package com.cloud.agent.api.to; +import org.apache.cloudstack.api.InternalIdentity; + import com.cloud.storage.Storage.ImageFormat; import com.cloud.template.VirtualMachineTemplate; -import org.apache.cloudstack.api.InternalIdentity; public class TemplateTO implements InternalIdentity { private long id; diff --git a/api/src/com/cloud/agent/api/to/VirtualMachineTO.java b/api/src/com/cloud/agent/api/to/VirtualMachineTO.java index 8f3f0eb39..b84d20a92 100644 --- a/api/src/com/cloud/agent/api/to/VirtualMachineTO.java +++ b/api/src/com/cloud/agent/api/to/VirtualMachineTO.java @@ -28,7 +28,20 @@ public class VirtualMachineTO { private BootloaderType bootloader; Type type; int cpus; + + /** + 'speed' is still here since 4.0.X/4.1.X management servers do not support + the overcommit feature yet. + + The overcommit feature sends minSpeed and maxSpeed + + So this is here for backwards compatibility with 4.0.X/4.1.X management servers + and newer agents. + */ Integer speed; + Integer minSpeed; + Integer maxSpeed; + long minRam; long maxRam; String hostName; @@ -62,6 +75,22 @@ public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, this.vncPassword = vncPassword; } + public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer minSpeed, Integer maxSpeed, long minRam, long maxRam, BootloaderType bootloader, String os, boolean enableHA, boolean limitCpuUse, String vncPassword) { + this.id = id; + this.name = instanceName; + this.type = type; + this.cpus = cpus; + this.minSpeed = minSpeed; + this.maxSpeed = maxSpeed; + this.minRam = minRam; + this.maxRam = maxRam; + this.bootloader = bootloader; + this.os = os; + this.enableHA = enableHA; + this.limitCpuUse = limitCpuUse; + this.vncPassword = vncPassword; + } + protected VirtualMachineTO() { } @@ -105,6 +134,13 @@ public Integer getSpeed() { return speed; } + public Integer getMinSpeed() { + return minSpeed; + } + + public Integer getMaxSpeed() { + return maxSpeed; + } public boolean getLimitCpuUse() { return limitCpuUse; } diff --git a/api/src/com/cloud/agent/api/to/VolumeTO.java b/api/src/com/cloud/agent/api/to/VolumeTO.java index ff739c58f..4cbe82b35 100644 --- a/api/src/com/cloud/agent/api/to/VolumeTO.java +++ b/api/src/com/cloud/agent/api/to/VolumeTO.java @@ -16,10 +16,11 @@ // under the License. package com.cloud.agent.api.to; +import org.apache.cloudstack.api.InternalIdentity; + import com.cloud.storage.Storage.StoragePoolType; import com.cloud.storage.StoragePool; import com.cloud.storage.Volume; -import org.apache.cloudstack.api.InternalIdentity; public class VolumeTO implements InternalIdentity { protected VolumeTO() { @@ -123,6 +124,10 @@ public String getChainInfo() { public String getOsType() { return guestOsType; } + + public void setPath(String path){ + this.path = path; + } @Override public String toString() { diff --git a/api/src/com/cloud/alert/Alert.java b/api/src/com/cloud/alert/Alert.java index defd15490..31768cf19 100644 --- a/api/src/com/cloud/alert/Alert.java +++ b/api/src/com/cloud/alert/Alert.java @@ -16,11 +16,11 @@ // under the License. package com.cloud.alert; +import java.util.Date; + import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -import java.util.Date; - public interface Alert extends Identity, InternalIdentity { short getType(); String getSubject(); @@ -30,4 +30,5 @@ public interface Alert extends Identity, InternalIdentity { Date getCreatedDate(); Date getLastSent(); Date getResolved(); + boolean getArchived(); } diff --git a/api/src/com/cloud/api/commands/CreatePrivateNetworkCmd.java b/api/src/com/cloud/api/commands/CreatePrivateNetworkCmd.java deleted file mode 100644 index 1cc20d789..000000000 --- a/api/src/com/cloud/api/commands/CreatePrivateNetworkCmd.java +++ /dev/null @@ -1,194 +0,0 @@ -// 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.api.commands; - -import org.apache.cloudstack.api.*; -import org.apache.cloudstack.api.response.DomainResponse; -import org.apache.cloudstack.api.response.PhysicalNetworkResponse; -import org.apache.cloudstack.api.response.ProjectResponse; -import org.apache.log4j.Logger; - -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.NetworkResponse; -import com.cloud.event.EventTypes; -import com.cloud.exception.ConcurrentOperationException; -import com.cloud.exception.InsufficientCapacityException; -import com.cloud.exception.ResourceAllocationException; -import com.cloud.network.Network; -import com.cloud.user.UserContext; - -//@APICommand(description="Creates a private network", responseObject=NetworkResponse.class) -public class CreatePrivateNetworkCmd extends BaseAsyncCreateCmd { - public static final Logger s_logger = Logger.getLogger(CreatePrivateNetworkCmd.class.getName()); - - private static final String s_name = "createnetworkresponse"; - - ///////////////////////////////////////////////////// - //////////////// API parameters ///////////////////// - ///////////////////////////////////////////////////// - - @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, required=true, description="the name of the network") - private String name; - - @Parameter(name=ApiConstants.DISPLAY_TEXT, type=CommandType.STRING, required=true, description="the display text of the network") - private String displayText; - - @Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.UUID, entityType = PhysicalNetworkResponse.class, - required=true, description="the Physical Network ID the network belongs to") - private Long physicalNetworkId; - - @Parameter(name=ApiConstants.GATEWAY, type=CommandType.STRING, required=true, description="the gateway of the network") - private String gateway; - - @Parameter(name=ApiConstants.NETMASK, type=CommandType.STRING, required=true, description="the netmask of the network") - private String netmask; - - @Parameter(name=ApiConstants.START_IP, type=CommandType.STRING, required=true, description="the beginning IP address in the network IP range") - private String startIp; - - @Parameter(name=ApiConstants.END_IP, type=CommandType.STRING, description="the ending IP address in the network IP" + - " range. If not specified, will be defaulted to startIP") - private String endIp; - - @Parameter(name=ApiConstants.VLAN, type=CommandType.STRING, required=true, description="the ID or VID of the network") - private String vlan; - - @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="account who will own the network") - private String accountName; - - @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, entityType = ProjectResponse.class, - description="an optional project for the ssh key") - private Long projectId; - - @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType = DomainResponse.class, - description="domain ID of the account owning a network") - private Long domainId; - - - ///////////////////////////////////////////////////// - /////////////////// Accessors /////////////////////// - ///////////////////////////////////////////////////// - - public String getGateway() { - return gateway; - } - - public String getVlan() { - return vlan; - } - - public String getAccountName() { - return accountName; - } - - public Long getDomainId() { - return domainId; - } - - public String getNetmask() { - return netmask; - } - - public String getStartIp() { - return startIp; - } - - public String getNetworkName() { - return name; - } - - public String getDisplayText() { - return displayText; - } - - public Long getProjectId() { - return projectId; - } - - public long getPhysicalNetworkId() { - return physicalNetworkId; - } - - public String getEndIp() { - return endIp; - } - - ///////////////////////////////////////////////////// - /////////////// API Implementation/////////////////// - ///////////////////////////////////////////////////// - @Override - public String getCommandName() { - return s_name; - } - - - @Override - public void create() throws ResourceAllocationException { - Network result = null; - try { - result = _networkService.createPrivateNetwork(getNetworkName(), getDisplayText(), getPhysicalNetworkId(), getVlan(), - getStartIp(), getEndIp(), getGateway(), getNetmask(), getEntityOwnerId(), null); - } catch (InsufficientCapacityException ex){ - s_logger.info(ex); - s_logger.trace(ex); - throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, ex.getMessage()); - } catch (ConcurrentOperationException ex) { - s_logger.warn("Exception: ", ex); - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage()); - } - - if (result != null) { - this.setEntityId(result.getId()); - this.setEntityUuid(result.getUuid()); - } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create a Private network"); - } - } - - @Override - public void execute() throws InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException{ - Network result = _networkService.getNetwork(getEntityId()); - if (result != null) { - NetworkResponse response = _responseGenerator.createNetworkResponse(result); - response.setResponseName(getCommandName()); - this.setResponseObject(response); - } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create private network"); - } - } - - @Override - public long getEntityOwnerId() { - Long accountId = finalyzeAccountId(accountName, domainId, projectId, true); - if (accountId == null) { - return UserContext.current().getCaller().getId(); - } - return accountId; - } - - @Override - public String getEventType() { - return EventTypes.EVENT_NETWORK_CREATE; - } - - @Override - public String getEventDescription() { - return "creating private network"; - - } - -} diff --git a/api/src/com/cloud/api/commands/DestroyConsoleProxyCmd.java b/api/src/com/cloud/api/commands/DestroyConsoleProxyCmd.java deleted file mode 100644 index e749f2210..000000000 --- a/api/src/com/cloud/api/commands/DestroyConsoleProxyCmd.java +++ /dev/null @@ -1,90 +0,0 @@ -// 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.api.commands; - -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; -import com.cloud.event.EventTypes; -import com.cloud.user.Account; -import com.cloud.user.UserContext; - -//@APICommand(description="Destroys console proxy", responseObject=SuccessResponse.class) -public class DestroyConsoleProxyCmd extends BaseAsyncCmd { - public static final Logger s_logger = Logger.getLogger(DestroyConsoleProxyCmd.class.getName()); - - private static final String s_name = "destroyconsoleproxyresponse"; - - ///////////////////////////////////////////////////// - //////////////// API parameters ///////////////////// - ///////////////////////////////////////////////////// - - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="console proxy ID") - private Long id; - - - ///////////////////////////////////////////////////// - /////////////////// Accessors /////////////////////// - ///////////////////////////////////////////////////// - - public Long getId() { - return id; - } - - - ///////////////////////////////////////////////////// - /////////////// API Implementation/////////////////// - ///////////////////////////////////////////////////// - - @Override - public String getCommandName() { - return s_name; - } - - @Override - public long getEntityOwnerId() { - Account account = (Account)UserContext.current().getCaller(); - if (account != null) { - return account.getId(); - } - - return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked - } - - @Override - public String getEventType() { - return EventTypes.EVENT_PROXY_DESTROY; - } - - @Override - public String getEventDescription() { - return "destroying console proxy: " + getId(); - } - - @Override - public void execute(){ - boolean result = _consoleProxyService.destroyConsoleProxy(this); - if (result) { - SuccessResponse response = new SuccessResponse(getCommandName()); - this.setResponseObject(response); - } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to destroy console proxy"); - } - } -} diff --git a/api/src/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java b/api/src/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java index 709da6af3..3efd4c5ab 100644 --- a/api/src/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java +++ b/api/src/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java @@ -19,12 +19,12 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.SnapshotScheduleResponse; + import com.cloud.storage.snapshot.SnapshotSchedule; //@APICommand(description="Lists recurring snapshot schedule", responseObject=SnapshotScheduleResponse.class) diff --git a/api/src/com/cloud/async/AsyncJob.java b/api/src/com/cloud/async/AsyncJob.java index 034c853e8..866429b65 100644 --- a/api/src/com/cloud/async/AsyncJob.java +++ b/api/src/com/cloud/async/AsyncJob.java @@ -16,11 +16,11 @@ // under the License. package com.cloud.async; -import java.util.Date; - import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; +import java.util.Date; + public interface AsyncJob extends Identity, InternalIdentity { public enum Type { None, @@ -48,7 +48,9 @@ public enum Type { Condition, AutoScalePolicy, AutoScaleVmProfile, - AutoScaleVmGroup + AutoScaleVmGroup, + GlobalLoadBalancerRule, + AffinityGroup } long getUserId(); diff --git a/api/src/com/cloud/configuration/ConfigurationService.java b/api/src/com/cloud/configuration/ConfigurationService.java index 48a060719..6937d0b64 100644 --- a/api/src/com/cloud/configuration/ConfigurationService.java +++ b/api/src/com/cloud/configuration/ConfigurationService.java @@ -20,24 +20,29 @@ import javax.naming.NamingException; +import org.apache.cloudstack.api.command.admin.config.UpdateCfgCmd; +import org.apache.cloudstack.api.command.admin.ldap.LDAPConfigCmd; import org.apache.cloudstack.api.command.admin.ldap.LDAPRemoveCmd; import org.apache.cloudstack.api.command.admin.network.CreateNetworkOfferingCmd; +import org.apache.cloudstack.api.command.admin.network.DeleteNetworkOfferingCmd; +import org.apache.cloudstack.api.command.admin.network.UpdateNetworkOfferingCmd; +import org.apache.cloudstack.api.command.admin.offering.CreateDiskOfferingCmd; import org.apache.cloudstack.api.command.admin.offering.CreateServiceOfferingCmd; -import org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd; -import org.apache.cloudstack.api.command.admin.offering.*; +import org.apache.cloudstack.api.command.admin.offering.DeleteDiskOfferingCmd; +import org.apache.cloudstack.api.command.admin.offering.DeleteServiceOfferingCmd; +import org.apache.cloudstack.api.command.admin.offering.UpdateDiskOfferingCmd; +import org.apache.cloudstack.api.command.admin.offering.UpdateServiceOfferingCmd; import org.apache.cloudstack.api.command.admin.pod.DeletePodCmd; +import org.apache.cloudstack.api.command.admin.pod.UpdatePodCmd; +import org.apache.cloudstack.api.command.admin.vlan.CreateVlanIpRangeCmd; +import org.apache.cloudstack.api.command.admin.vlan.DedicatePublicIpRangeCmd; import org.apache.cloudstack.api.command.admin.vlan.DeleteVlanIpRangeCmd; +import org.apache.cloudstack.api.command.admin.vlan.ReleasePublicIpRangeCmd; import org.apache.cloudstack.api.command.admin.zone.CreateZoneCmd; -import org.apache.cloudstack.api.command.admin.offering.DeleteDiskOfferingCmd; -import org.apache.cloudstack.api.command.admin.network.DeleteNetworkOfferingCmd; import org.apache.cloudstack.api.command.admin.zone.DeleteZoneCmd; -import org.apache.cloudstack.api.command.admin.ldap.LDAPConfigCmd; -import org.apache.cloudstack.api.command.admin.config.UpdateCfgCmd; -import org.apache.cloudstack.api.command.admin.network.UpdateNetworkOfferingCmd; -import org.apache.cloudstack.api.command.admin.pod.UpdatePodCmd; -import org.apache.cloudstack.api.command.user.network.ListNetworkOfferingsCmd; -import org.apache.cloudstack.api.command.admin.offering.UpdateDiskOfferingCmd; import org.apache.cloudstack.api.command.admin.zone.UpdateZoneCmd; +import org.apache.cloudstack.api.command.user.network.ListNetworkOfferingsCmd; + import com.cloud.dc.DataCenter; import com.cloud.dc.Pod; import com.cloud.dc.Vlan; @@ -231,6 +236,10 @@ public interface ConfigurationService { boolean deleteVlanIpRange(DeleteVlanIpRangeCmd cmd); + Vlan dedicatePublicIpRange(DedicatePublicIpRangeCmd cmd) throws ResourceAllocationException; + + boolean releasePublicIpRange(ReleasePublicIpRangeCmd cmd); + NetworkOffering createNetworkOffering(CreateNetworkOfferingCmd cmd); NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd); @@ -261,6 +270,8 @@ public interface ConfigurationService { boolean removeLDAP(LDAPRemoveCmd cmd); + LDAPConfigCmd listLDAPConfig(LDAPConfigCmd cmd); + /** * @param offering * @return diff --git a/api/src/com/cloud/configuration/Resource.java b/api/src/com/cloud/configuration/Resource.java index 7f551d6b5..5550e29ec 100644 --- a/api/src/com/cloud/configuration/Resource.java +++ b/api/src/com/cloud/configuration/Resource.java @@ -20,7 +20,7 @@ public interface Resource { public static final short RESOURCE_UNLIMITED = -1; - public enum ResourceType { + public enum ResourceType { // Primary and Secondary storage are allocated_storage and not the physical storage. user_vm("user_vm", 0, ResourceOwnerType.Account, ResourceOwnerType.Domain), public_ip("public_ip", 1, ResourceOwnerType.Account, ResourceOwnerType.Domain), volume("volume", 2, ResourceOwnerType.Account, ResourceOwnerType.Domain), @@ -28,11 +28,16 @@ public enum ResourceType { template("template", 4, ResourceOwnerType.Account, ResourceOwnerType.Domain), project("project", 5, ResourceOwnerType.Account, ResourceOwnerType.Domain), network("network", 6, ResourceOwnerType.Account, ResourceOwnerType.Domain), - vpc("vpc", 7, ResourceOwnerType.Account, ResourceOwnerType.Domain); + vpc("vpc", 7, ResourceOwnerType.Account, ResourceOwnerType.Domain), + cpu("cpu", 8, ResourceOwnerType.Account, ResourceOwnerType.Domain), + memory("memory", 9, ResourceOwnerType.Account, ResourceOwnerType.Domain), + primary_storage("primary_storage", 10, ResourceOwnerType.Account, ResourceOwnerType.Domain), + secondary_storage("secondary_storage", 11, ResourceOwnerType.Account, ResourceOwnerType.Domain); private String name; private ResourceOwnerType[] supportedOwners; private int ordinal; + public static final long bytesToGiB = 1024 * 1024 * 1024; ResourceType(String name, int ordinal, ResourceOwnerType... supportedOwners) { this.name = name; diff --git a/api/src/com/cloud/dao/EntityManager.java b/api/src/com/cloud/dao/EntityManager.java index b8fdaa7e9..8e6a438d0 100644 --- a/api/src/com/cloud/dao/EntityManager.java +++ b/api/src/com/cloud/dao/EntityManager.java @@ -38,6 +38,16 @@ public interface EntityManager { */ public T findById(Class entityType, K id); + /** + * Finds an entity by its id including removed. + * @param class of the entity you're trying to find. + * @param class of the id that the entity uses. + * @param entityType Type of the entity. + * @param id id value + * @return T if found; null if not. + */ + public T findByIdIncludingRemoved(Class entityType, K id); + /** * Finds a unique entity by uuid string * @param entity class diff --git a/api/src/com/cloud/dc/DataCenter.java b/api/src/com/cloud/dc/DataCenter.java index 946e9ccb5..5f32988da 100644 --- a/api/src/com/cloud/dc/DataCenter.java +++ b/api/src/com/cloud/dc/DataCenter.java @@ -18,11 +18,12 @@ import java.util.Map; -import com.cloud.org.Grouping; import org.apache.cloudstack.acl.InfrastructureEntity; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.org.Grouping; + /** * */ @@ -36,6 +37,10 @@ public enum NetworkType { String getDns2(); + String getIp6Dns1(); + + String getIp6Dns2(); + String getGuestNetworkCidr(); String getName(); diff --git a/api/src/com/cloud/dc/Pod.java b/api/src/com/cloud/dc/Pod.java index 9da5b7e78..1cbab36f3 100644 --- a/api/src/com/cloud/dc/Pod.java +++ b/api/src/com/cloud/dc/Pod.java @@ -16,11 +16,12 @@ // under the License. package com.cloud.dc; -import com.cloud.org.Grouping; import org.apache.cloudstack.acl.InfrastructureEntity; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.org.Grouping; + /** * Represents one pod in the cloud stack. * diff --git a/api/src/com/cloud/domain/Domain.java b/api/src/com/cloud/domain/Domain.java index cfed519ad..befed0730 100644 --- a/api/src/com/cloud/domain/Domain.java +++ b/api/src/com/cloud/domain/Domain.java @@ -18,10 +18,11 @@ import java.util.Date; -import com.cloud.user.OwnedBy; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.user.OwnedBy; + /** * Domain defines the Domain object. */ @@ -58,4 +59,7 @@ enum State { void setState(State state); String getNetworkDomain(); + + public String getUuid(); + } diff --git a/api/src/com/cloud/event/Event.java b/api/src/com/cloud/event/Event.java index 1a6163682..b8def4c62 100644 --- a/api/src/com/cloud/event/Event.java +++ b/api/src/com/cloud/event/Event.java @@ -40,4 +40,5 @@ public enum State { String getLevel(); long getStartId(); String getParameters(); + boolean getArchived(); } diff --git a/api/src/com/cloud/event/EventTypes.java b/api/src/com/cloud/event/EventTypes.java index 0dd97cb43..0ee7f402f 100755 --- a/api/src/com/cloud/event/EventTypes.java +++ b/api/src/com/cloud/event/EventTypes.java @@ -59,6 +59,7 @@ public class EventTypes { public static final String EVENT_VM_REBOOT = "VM.REBOOT"; public static final String EVENT_VM_UPDATE = "VM.UPDATE"; public static final String EVENT_VM_UPGRADE = "VM.UPGRADE"; + public static final String EVENT_VM_SCALE = "VM.SCALE"; public static final String EVENT_VM_RESETPASSWORD = "VM.RESETPASSWORD"; public static final String EVENT_VM_RESETSSHKEY = "VM.RESETSSHKEY"; public static final String EVENT_VM_MIGRATE = "VM.MIGRATE"; @@ -110,12 +111,22 @@ public class EventTypes { public static final String EVENT_LOAD_BALANCER_DELETE = "LB.DELETE"; public static final String EVENT_LB_STICKINESSPOLICY_CREATE = "LB.STICKINESSPOLICY.CREATE"; public static final String EVENT_LB_STICKINESSPOLICY_DELETE = "LB.STICKINESSPOLICY.DELETE"; + public static final String EVENT_LB_HEALTHCHECKPOLICY_CREATE = "LB.HEALTHCHECKPOLICY.CREATE"; + public static final String EVENT_LB_HEALTHCHECKPOLICY_DELETE = "LB.HEALTHCHECKPOLICY.DELETE"; public static final String EVENT_LOAD_BALANCER_UPDATE = "LB.UPDATE"; + // Global Load Balancer rules + public static final String EVENT_ASSIGN_TO_GLOBAL_LOAD_BALANCER_RULE = "GLOBAL.LB.ASSIGN"; + public static final String EVENT_REMOVE_FROM_GLOBAL_LOAD_BALANCER_RULE = "GLOBAL.LB.REMOVE"; + public static final String EVENT_GLOBAL_LOAD_BALANCER_CREATE = "GLOBAL.LB.CREATE"; + public static final String EVENT_GLOBAL_LOAD_BALANCER_DELETE = "GLOBAL.LB.DELETE"; + // Account events + public static final String EVENT_ACCOUNT_ENABLE = "ACCOUNT.ENABLE"; public static final String EVENT_ACCOUNT_DISABLE = "ACCOUNT.DISABLE"; public static final String EVENT_ACCOUNT_CREATE = "ACCOUNT.CREATE"; public static final String EVENT_ACCOUNT_DELETE = "ACCOUNT.DELETE"; + public static final String EVENT_ACCOUNT_UPDATE = "ACCOUNT.UPDATE"; public static final String EVENT_ACCOUNT_MARK_DEFAULT_ZONE = "ACCOUNT.MARK.DEFAULT.ZONE"; // UserVO Events @@ -128,6 +139,12 @@ public class EventTypes { public static final String EVENT_USER_ENABLE = "USER.ENABLE"; public static final String EVENT_USER_LOCK = "USER.LOCK"; + //registering SSH keypair events + public static final String EVENT_REGISTER_SSH_KEYPAIR = "REGISTER.SSH.KEYPAIR"; + + //register for user API and secret keys + public static final String EVENT_REGISTER_FOR_SECRET_API_KEY = "REGISTER.USER.KEY"; + // Template Events public static final String EVENT_TEMPLATE_CREATE = "TEMPLATE.CREATE"; public static final String EVENT_TEMPLATE_DELETE = "TEMPLATE.DELETE"; @@ -209,6 +226,8 @@ public class EventTypes { // VLANs/IP ranges public static final String EVENT_VLAN_IP_RANGE_CREATE = "VLAN.IP.RANGE.CREATE"; public static final String EVENT_VLAN_IP_RANGE_DELETE = "VLAN.IP.RANGE.DELETE"; + public static final String EVENT_VLAN_IP_RANGE_DEDICATE = "VLAN.IP.RANGE.DEDICATE"; + public static final String EVENT_VLAN_IP_RANGE_RELEASE = "VLAN.IP.RANGE.RELEASE"; public static final String EVENT_STORAGE_IP_RANGE_CREATE = "STORAGE.IP.RANGE.CREATE"; public static final String EVENT_STORAGE_IP_RANGE_DELETE = "STORAGE.IP.RANGE.DELETE"; @@ -332,6 +351,11 @@ public class EventTypes { public static final String EVENT_TAGS_CREATE = "CREATE_TAGS"; public static final String EVENT_TAGS_DELETE = "DELETE_TAGS"; + // vm snapshot events + public static final String EVENT_VM_SNAPSHOT_CREATE = "VMSNAPSHOT.CREATE"; + public static final String EVENT_VM_SNAPSHOT_DELETE = "VMSNAPSHOT.DELETE"; + public static final String EVENT_VM_SNAPSHOT_REVERT = "VMSNAPSHOT.REVERTTO"; + // external network device events public static final String EVENT_EXTERNAL_NVP_CONTROLLER_ADD = "PHYSICAL.NVPCONTROLLER.ADD"; public static final String EVENT_EXTERNAL_NVP_CONTROLLER_DELETE = "PHYSICAL.NVPCONTROLLER.DELETE"; @@ -360,6 +384,12 @@ public class EventTypes { public static final String EVENT_BAREMETAL_PXE_SERVER_ADD = "PHYSICAL.PXE.ADD"; public static final String EVENT_BAREMETAL_PXE_SERVER_DELETE = "PHYSICAL.PXE.DELETE"; + public static final String EVENT_AFFINITY_GROUP_CREATE = "AG.CREATE"; + public static final String EVENT_AFFINITY_GROUP_DELETE = "AG.DELETE"; + public static final String EVENT_AFFINITY_GROUP_ASSIGN = "AG.ASSIGN"; + public static final String EVENT_AFFINITY_GROUP_REMOVE = "AG.REMOVE"; + public static final String EVENT_VM_AFFINITY_GROUP_UPDATE = "VM.AG.UPDATE"; + static { // TODO: need a way to force author adding event types to declare the entity details as well, with out braking @@ -517,6 +547,8 @@ public class EventTypes { // VLANs/IP ranges entityEventDetails.put(EVENT_VLAN_IP_RANGE_CREATE, Vlan.class.getName()); entityEventDetails.put(EVENT_VLAN_IP_RANGE_DELETE,Vlan.class.getName()); + entityEventDetails.put(EVENT_VLAN_IP_RANGE_DEDICATE, Vlan.class.getName()); + entityEventDetails.put(EVENT_VLAN_IP_RANGE_RELEASE,Vlan.class.getName()); entityEventDetails.put(EVENT_STORAGE_IP_RANGE_CREATE, StorageNetworkIpRange.class.getName()); entityEventDetails.put(EVENT_STORAGE_IP_RANGE_DELETE, StorageNetworkIpRange.class.getName()); diff --git a/api/src/com/cloud/exception/AffinityConflictException.java b/api/src/com/cloud/exception/AffinityConflictException.java new file mode 100644 index 000000000..8b187783f --- /dev/null +++ b/api/src/com/cloud/exception/AffinityConflictException.java @@ -0,0 +1,34 @@ +// 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.exception; + +import com.cloud.utils.SerialVersionUID; +import com.cloud.utils.exception.CloudRuntimeException; + +public class AffinityConflictException extends CloudRuntimeException { + + private static final long serialVersionUID = SerialVersionUID.AffinityConflictException; + + public AffinityConflictException(String message) { + super(message); + } + + public AffinityConflictException(String message, Throwable th) { + super(message, th); + } + +} diff --git a/api/src/com/cloud/exception/CloudException.java b/api/src/com/cloud/exception/CloudException.java index 732670288..0b71ce89a 100644 --- a/api/src/com/cloud/exception/CloudException.java +++ b/api/src/com/cloud/exception/CloudException.java @@ -17,6 +17,7 @@ package com.cloud.exception; import java.util.ArrayList; + import com.cloud.utils.exception.CSExceptionErrorCode; /** diff --git a/api/src/com/cloud/exception/PermissionDeniedException.java b/api/src/com/cloud/exception/PermissionDeniedException.java index 638b762d4..718de0df7 100644 --- a/api/src/com/cloud/exception/PermissionDeniedException.java +++ b/api/src/com/cloud/exception/PermissionDeniedException.java @@ -19,6 +19,7 @@ import java.util.List; import org.apache.cloudstack.acl.ControlledEntity; + import com.cloud.user.Account; import com.cloud.utils.SerialVersionUID; import com.cloud.utils.exception.CloudRuntimeException; @@ -31,6 +32,10 @@ public PermissionDeniedException(String message) { super(message); } + public PermissionDeniedException(String message, Throwable cause){ + super(message, cause); + } + protected PermissionDeniedException() { super(); } diff --git a/api/src/com/cloud/exception/RequestLimitException.java b/api/src/com/cloud/exception/RequestLimitException.java index 0142f8e87..4d7504ed6 100644 --- a/api/src/com/cloud/exception/RequestLimitException.java +++ b/api/src/com/cloud/exception/RequestLimitException.java @@ -17,14 +17,12 @@ package com.cloud.exception; import com.cloud.utils.SerialVersionUID; -import com.cloud.utils.exception.CloudRuntimeException; /** * Exception thrown if number of requests is over api rate limit set. - * @author minc * */ -public class RequestLimitException extends CloudRuntimeException { +public class RequestLimitException extends PermissionDeniedException { private static final long serialVersionUID = SerialVersionUID.AccountLimitException; diff --git a/api/src/com/cloud/host/Host.java b/api/src/com/cloud/host/Host.java index 7236680fd..17b0ba86f 100755 --- a/api/src/com/cloud/host/Host.java +++ b/api/src/com/cloud/host/Host.java @@ -18,11 +18,12 @@ import java.util.Date; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.resource.ResourceState; import com.cloud.utils.fsm.StateObject; -import org.apache.cloudstack.api.Identity; -import org.apache.cloudstack.api.InternalIdentity; /** diff --git a/api/src/com/cloud/hypervisor/Hypervisor.java b/api/src/com/cloud/hypervisor/Hypervisor.java index 2e0012dca..a4ee5b98f 100644 --- a/api/src/com/cloud/hypervisor/Hypervisor.java +++ b/api/src/com/cloud/hypervisor/Hypervisor.java @@ -29,6 +29,7 @@ public static enum HypervisorType { BareMetal, Simulator, Ovm, + LXC, Any; /*If you don't care about the hypervisor type*/ @@ -54,6 +55,8 @@ public static HypervisorType getType(String hypervisor) { return HypervisorType.Simulator; } else if (hypervisor.equalsIgnoreCase("Ovm")) { return HypervisorType.Ovm; + } else if (hypervisor.equalsIgnoreCase("LXC")) { + return HypervisorType.LXC; } else if (hypervisor.equalsIgnoreCase("Any")) { return HypervisorType.Any; } else { diff --git a/api/src/com/cloud/hypervisor/HypervisorCapabilities.java b/api/src/com/cloud/hypervisor/HypervisorCapabilities.java index efb8a6a20..aff81b001 100644 --- a/api/src/com/cloud/hypervisor/HypervisorCapabilities.java +++ b/api/src/com/cloud/hypervisor/HypervisorCapabilities.java @@ -16,10 +16,11 @@ // under the License. package com.cloud.hypervisor; -import com.cloud.hypervisor.Hypervisor.HypervisorType; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.hypervisor.Hypervisor.HypervisorType; + /** * HypervisorCapability represents one particular hypervisor version's capabilities. @@ -45,4 +46,10 @@ public interface HypervisorCapabilities extends Identity, InternalIdentity{ * @return the max. data volumes per VM supported by hypervisor */ Integer getMaxDataVolumesLimit(); + + /** + * @return the max. hosts per cluster supported by hypervisor + */ + Integer getMaxHostsPerCluster(); + } diff --git a/api/src/com/cloud/network/IpAddress.java b/api/src/com/cloud/network/IpAddress.java index 0ac7f500e..fce8f38c2 100644 --- a/api/src/com/cloud/network/IpAddress.java +++ b/api/src/com/cloud/network/IpAddress.java @@ -19,10 +19,11 @@ import java.util.Date; import org.apache.cloudstack.acl.ControlledEntity; -import com.cloud.utils.net.Ip; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.utils.net.Ip; + /** * * - Allocated = null @@ -86,4 +87,7 @@ enum Purpose { * @param vpcId */ void setVpcId(Long vpcId); + String getVmIp(); + void setVmIp(String vmIp); + } diff --git a/api/src/com/cloud/network/Network.java b/api/src/com/cloud/network/Network.java index a70bf02b2..ffe70d19d 100644 --- a/api/src/com/cloud/network/Network.java +++ b/api/src/com/cloud/network/Network.java @@ -16,11 +16,24 @@ // under the License. package com.cloud.network; +import java.net.URI; +import java.util.ArrayList; +import java.util.List; +import java.util.Set; + +import org.apache.cloudstack.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + +import com.cloud.network.Networks.BroadcastDomainType; +import com.cloud.network.Networks.Mode; +import com.cloud.network.Networks.TrafficType; import com.cloud.network.Networks.BroadcastDomainType; import com.cloud.network.Networks.Mode; import com.cloud.network.Networks.TrafficType; import com.cloud.utils.fsm.StateMachine2; import com.cloud.utils.fsm.StateObject; + import org.apache.cloudstack.acl.ControlledEntity; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; @@ -34,7 +47,7 @@ */ public interface Network extends ControlledEntity, StateObject, InternalIdentity, Identity { - public enum GuestType { + public enum GuestType { Shared, Isolated } @@ -46,7 +59,7 @@ public static class Service { public static final Service Dhcp = new Service("Dhcp"); public static final Service Dns = new Service("Dns", Capability.AllowDnsSuffixModification); public static final Service Gateway = new Service("Gateway"); - public static final Service Firewall = new Service("Firewall", Capability.SupportedProtocols, + public static final Service Firewall = new Service("Firewall", Capability.SupportedProtocols, Capability.MultipleIps, Capability.TrafficStatistics, Capability.SupportedTrafficDirection, Capability.SupportedEgressProtocols); public static final Service Lb = new Service("Lb", Capability.SupportedLBAlgorithms, Capability.SupportedLBIsolation, Capability.SupportedProtocols, Capability.TrafficStatistics, Capability.LoadBalancingSupportedIps, @@ -122,8 +135,9 @@ public static class Provider { public static final Provider SecurityGroupProvider = new Provider("SecurityGroupProvider", false); public static final Provider VPCVirtualRouter = new Provider("VpcVirtualRouter", false); public static final Provider None = new Provider("None", false); - public static final Provider NiciraNvp = new Provider("NiciraNvp", true); - public static final Provider MidokuraMidonet = new Provider("MidokuraMidonet", true); + // NiciraNvp is not an "External" provider, otherwise we get in trouble with NetworkServiceImpl.providersConfiguredForExternalNetworking + public static final Provider NiciraNvp = new Provider("NiciraNvp", false); + public static final Provider CiscoVnmc = new Provider("CiscoVnmc", true); private String name; private boolean isExternal; @@ -174,6 +188,7 @@ public static class Capability { public static final Capability InlineMode = new Capability("InlineMode"); public static final Capability SupportedTrafficDirection = new Capability("SupportedTrafficDirection"); public static final Capability SupportedEgressProtocols = new Capability("SupportedEgressProtocols"); + public static final Capability HealthCheckPolicy = new Capability("HealthCheckPolicy"); private String name; @@ -221,6 +236,8 @@ public enum State { s_fsm.addTransition(State.Implemented, Event.DestroyNetwork, State.Shutdown); s_fsm.addTransition(State.Shutdown, Event.OperationSucceeded, State.Allocated); s_fsm.addTransition(State.Shutdown, Event.OperationFailed, State.Implemented); + s_fsm.addTransition(State.Setup, Event.DestroyNetwork, State.Destroy); + s_fsm.addTransition(State.Allocated, Event.DestroyNetwork, State.Destroy); } public static StateMachine2 getStateMachine() { @@ -232,7 +249,7 @@ private State(String description) { _description = description; } } - + public class IpAddresses { private String ip4Address; private String ip6Address; @@ -269,12 +286,21 @@ public void setIp6Address(String ip6Address) { String getGateway(); + // "cidr" is the Cloudstack managed address space, all CloudStack managed vms get IP address from "cidr", + // In general "cidr" also serves as the network CIDR + // But in case IP reservation is configured for a Guest network, "networkcidr" is the Effective network CIDR for that network, + // "cidr" will still continue to be the effective address space for CloudStack managed vms in that Guest network String getCidr(); - + + // "networkcidr" is the network CIDR of the guest network which uses IP reservation. + // It is the summation of "cidr" and the reservedIPrange(the address space used for non CloudStack purposes). + // For networks not configured with IP reservation, "networkcidr" is always null + String getNetworkCidr(); + String getIp6Gateway(); - + String getIp6Cidr(); - + long getDataCenterId(); long getNetworkOfferingId(); diff --git a/api/src/com/cloud/network/NetworkModel.java b/api/src/com/cloud/network/NetworkModel.java index 7e17405f4..4d7d714a7 100644 --- a/api/src/com/cloud/network/NetworkModel.java +++ b/api/src/com/cloud/network/NetworkModel.java @@ -24,6 +24,7 @@ import com.cloud.dc.Vlan; import com.cloud.exception.InsufficientAddressCapacityException; +import com.cloud.exception.InvalidParameterValueException; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.network.Network.Capability; import com.cloud.network.Network.Provider; @@ -249,5 +250,17 @@ Map> getIpToServices(List getIsolatedNetworksOwnedByAccountInZone(long zoneId, Account owner); - IpAddress allocateIP(Account ipOwner, boolean isSystem, long zoneId) throws ResourceAllocationException, + IpAddress allocateIP(Account ipOwner, long zoneId, Long networkId) throws ResourceAllocationException, InsufficientAddressCapacityException, ConcurrentOperationException; boolean releaseIpAddress(long ipAddressId) throws InsufficientAddressCapacityException; @@ -65,10 +69,8 @@ boolean restartNetwork(RestartNetworkCmd cmd, boolean cleanup) throws Concurrent IpAddress getIp(long id); - Network updateGuestNetwork(long networkId, String name, String displayText, Account callerAccount, User callerUser, - String domainSuffix, Long networkOfferingId, Boolean changeCidr); - + String domainSuffix, Long networkOfferingId, Boolean changeCidr, String guestVmCidr); PhysicalNetwork createPhysicalNetwork(Long zoneId, String vnetRange, String networkSpeed, List isolationMethods, String broadcastDomainRange, Long domainId, List tags, String name); @@ -154,5 +156,13 @@ IpAddress associateIPToNetwork(long ipId, long networkId) throws InsufficientAdd Network createPrivateNetwork(String networkName, String displayText, long physicalNetworkId, String vlan, String startIp, String endIP, String gateway, String netmask, long networkOwnerId, Long vpcId) throws ResourceAllocationException, ConcurrentOperationException, InsufficientCapacityException; - + + /* Requests an IP address for the guest nic */ + String allocateSecondaryGuestIP(Account account, long zoneId, Long nicId, + Long networkId, String ipaddress) throws InsufficientAddressCapacityException; + + boolean releaseSecondaryIpFromNic(long ipAddressId); + + /* lists the nic informaton */ + List listNics(ListNicsCmd listNicsCmd); } diff --git a/api/src/com/cloud/network/NetworkUsageService.java b/api/src/com/cloud/network/NetworkUsageService.java new file mode 100644 index 000000000..1cfea24d0 --- /dev/null +++ b/api/src/com/cloud/network/NetworkUsageService.java @@ -0,0 +1,37 @@ +// 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.network; + +import java.util.List; + +import com.cloud.host.Host; + +import org.apache.cloudstack.api.command.admin.usage.AddTrafficMonitorCmd; +import org.apache.cloudstack.api.command.admin.usage.DeleteTrafficMonitorCmd; +import org.apache.cloudstack.api.command.admin.usage.ListTrafficMonitorsCmd; +import org.apache.cloudstack.api.response.TrafficMonitorResponse; +import com.cloud.utils.component.Manager; + +public interface NetworkUsageService extends Manager { + + Host addTrafficMonitor(AddTrafficMonitorCmd cmd); + + boolean deleteTrafficMonitor(DeleteTrafficMonitorCmd cmd); + + List listTrafficMonitors(ListTrafficMonitorsCmd cmd); + +} diff --git a/api/src/com/cloud/network/Networks.java b/api/src/com/cloud/network/Networks.java index e3d21584a..f085e9f30 100755 --- a/api/src/com/cloud/network/Networks.java +++ b/api/src/com/cloud/network/Networks.java @@ -62,6 +62,7 @@ public enum BroadcastDomainType { Vnet("vnet", Long.class), Storage("storage", Integer.class), Lswitch("lswitch", String.class), + Mido("mido", String.class), UnDecided(null, null); private String scheme; diff --git a/api/src/com/cloud/network/PhysicalNetwork.java b/api/src/com/cloud/network/PhysicalNetwork.java index a49509287..a2044a610 100644 --- a/api/src/com/cloud/network/PhysicalNetwork.java +++ b/api/src/com/cloud/network/PhysicalNetwork.java @@ -16,11 +16,11 @@ // under the License. package com.cloud.network; +import java.util.List; + import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -import java.util.List; - /** * */ @@ -35,7 +35,9 @@ public enum IsolationMethod { VLAN, L3, GRE, - STT; + STT, + VNS, + MIDO; } public enum BroadcastDomainRange { diff --git a/api/src/com/cloud/network/PhysicalNetworkServiceProvider.java b/api/src/com/cloud/network/PhysicalNetworkServiceProvider.java index 0a433dcbc..d67c3c7b1 100644 --- a/api/src/com/cloud/network/PhysicalNetworkServiceProvider.java +++ b/api/src/com/cloud/network/PhysicalNetworkServiceProvider.java @@ -18,9 +18,10 @@ import java.util.List; -import com.cloud.network.Network.Service; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.network.Network.Service; + /** * */ diff --git a/api/src/com/cloud/network/PhysicalNetworkTrafficType.java b/api/src/com/cloud/network/PhysicalNetworkTrafficType.java index 62400e80a..a385b533a 100644 --- a/api/src/com/cloud/network/PhysicalNetworkTrafficType.java +++ b/api/src/com/cloud/network/PhysicalNetworkTrafficType.java @@ -16,10 +16,11 @@ // under the License. package com.cloud.network; -import com.cloud.network.Networks.TrafficType; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.network.Networks.TrafficType; + /** * */ diff --git a/api/src/com/cloud/network/PublicIpAddress.java b/api/src/com/cloud/network/PublicIpAddress.java index 21dae5420..d81e9c1ee 100644 --- a/api/src/com/cloud/network/PublicIpAddress.java +++ b/api/src/com/cloud/network/PublicIpAddress.java @@ -17,9 +17,10 @@ package com.cloud.network; import org.apache.cloudstack.acl.ControlledEntity; -import com.cloud.dc.Vlan; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.dc.Vlan; + /** */ public interface PublicIpAddress extends ControlledEntity, IpAddress, Vlan, InternalIdentity { diff --git a/api/src/com/cloud/network/RemoteAccessVpn.java b/api/src/com/cloud/network/RemoteAccessVpn.java index 1b463309a..058b2f486 100644 --- a/api/src/com/cloud/network/RemoteAccessVpn.java +++ b/api/src/com/cloud/network/RemoteAccessVpn.java @@ -17,8 +17,10 @@ package com.cloud.network; import org.apache.cloudstack.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; -public interface RemoteAccessVpn extends ControlledEntity { +public interface RemoteAccessVpn extends ControlledEntity, InternalIdentity, Identity { enum State { Added, Running, diff --git a/api/src/com/cloud/network/StorageNetworkService.java b/api/src/com/cloud/network/StorageNetworkService.java index 1bda24717..5aae0ca96 100755 --- a/api/src/com/cloud/network/StorageNetworkService.java +++ b/api/src/com/cloud/network/StorageNetworkService.java @@ -19,11 +19,12 @@ import java.sql.SQLException; import java.util.List; -import org.apache.cloudstack.api.command.admin.network.*; -import org.apache.cloudstack.api.command.admin.network.UpdateStorageNetworkIpRangeCmd; +import org.apache.cloudstack.api.command.admin.network.CreateStorageNetworkIpRangeCmd; import org.apache.cloudstack.api.command.admin.network.DeleteStorageNetworkIpRangeCmd; +import org.apache.cloudstack.api.command.admin.network.ListStorageNetworkIpRangeCmd; +import org.apache.cloudstack.api.command.admin.network.UpdateStorageNetworkIpRangeCmd; + import com.cloud.dc.StorageNetworkIpRange; -import org.apache.cloudstack.api.command.admin.network.CreateStorageNetworkIpRangeCmd; public interface StorageNetworkService { StorageNetworkIpRange createIpRange(CreateStorageNetworkIpRangeCmd cmd) throws SQLException; diff --git a/api/src/com/cloud/network/TrafficLabel.java b/api/src/com/cloud/network/TrafficLabel.java new file mode 100644 index 000000000..782df14b7 --- /dev/null +++ b/api/src/com/cloud/network/TrafficLabel.java @@ -0,0 +1,36 @@ +// 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.network; + +import com.cloud.network.Networks.TrafficType; + +/* User can provide a Label, while configuring a zone, to specify + * a physical network that is to be used for a traffic type defined + * by CloudStack. See the enum data type TrafficType. This label is + * called Traffic label. This might encapsulate physical network + * specific properties like VLAN ID, name of virtual network object or more. + * The name of virtual network object is dependent on type of hypervisor. + * For example it is name of xenserver bridge in case of XenServer and + * name of virtual switch in case of VMware hypervisor + */ +public interface TrafficLabel { + + public TrafficType getTrafficType(); + + public String getNetworkLabel(); + +} diff --git a/api/src/com/cloud/network/VirtualNetworkApplianceService.java b/api/src/com/cloud/network/VirtualNetworkApplianceService.java index 7b553b29a..250ecb24e 100644 --- a/api/src/com/cloud/network/VirtualNetworkApplianceService.java +++ b/api/src/com/cloud/network/VirtualNetworkApplianceService.java @@ -17,6 +17,7 @@ package com.cloud.network; import org.apache.cloudstack.api.command.admin.router.UpgradeRouterCmd; + import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.ResourceUnavailableException; diff --git a/api/src/com/cloud/network/as/AutoScaleService.java b/api/src/com/cloud/network/as/AutoScaleService.java index daa8d1913..32d693d7b 100644 --- a/api/src/com/cloud/network/as/AutoScaleService.java +++ b/api/src/com/cloud/network/as/AutoScaleService.java @@ -19,11 +19,19 @@ import java.util.List; import org.apache.cloudstack.api.command.admin.autoscale.CreateCounterCmd; -import org.apache.cloudstack.api.command.user.autoscale.*; import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScalePolicyCmd; +import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScaleVmGroupCmd; import org.apache.cloudstack.api.command.user.autoscale.CreateAutoScaleVmProfileCmd; +import org.apache.cloudstack.api.command.user.autoscale.CreateConditionCmd; import org.apache.cloudstack.api.command.user.autoscale.ListAutoScalePoliciesCmd; +import org.apache.cloudstack.api.command.user.autoscale.ListAutoScaleVmGroupsCmd; +import org.apache.cloudstack.api.command.user.autoscale.ListAutoScaleVmProfilesCmd; +import org.apache.cloudstack.api.command.user.autoscale.ListConditionsCmd; +import org.apache.cloudstack.api.command.user.autoscale.ListCountersCmd; +import org.apache.cloudstack.api.command.user.autoscale.UpdateAutoScalePolicyCmd; import org.apache.cloudstack.api.command.user.autoscale.UpdateAutoScaleVmGroupCmd; +import org.apache.cloudstack.api.command.user.autoscale.UpdateAutoScaleVmProfileCmd; + import com.cloud.exception.ResourceInUseException; import com.cloud.exception.ResourceUnavailableException; diff --git a/api/src/com/cloud/network/as/AutoScaleVmProfile.java b/api/src/com/cloud/network/as/AutoScaleVmProfile.java index 3be5a3e81..9c6a0f2f4 100644 --- a/api/src/com/cloud/network/as/AutoScaleVmProfile.java +++ b/api/src/com/cloud/network/as/AutoScaleVmProfile.java @@ -20,9 +20,10 @@ import java.util.List; import org.apache.cloudstack.acl.ControlledEntity; -import com.cloud.utils.Pair; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.utils.Pair; + /** * AutoScaleVmProfile */ diff --git a/api/src/com/cloud/network/element/LoadBalancingServiceProvider.java b/api/src/com/cloud/network/element/LoadBalancingServiceProvider.java index 879ea0ed6..cb3155f9c 100644 --- a/api/src/com/cloud/network/element/LoadBalancingServiceProvider.java +++ b/api/src/com/cloud/network/element/LoadBalancingServiceProvider.java @@ -18,6 +18,7 @@ import java.util.List; +import com.cloud.agent.api.to.LoadBalancerTO; import com.cloud.exception.ResourceUnavailableException; import com.cloud.network.Network; import com.cloud.network.lb.LoadBalancingRule; @@ -25,6 +26,7 @@ public interface LoadBalancingServiceProvider extends NetworkElement, IpDeployingRequester { /** * Apply rules + * * @param network * @param rules * @return @@ -34,10 +36,14 @@ public interface LoadBalancingServiceProvider extends NetworkElement, IpDeployin /** * Validate rules + * * @param network * @param rule - * @return true/false. true should be return if there are no validations. false should be return if any oneof the validation fails. + * @return true/false. true should be return if there are no validations. + *false should be return if any oneof the validation fails. * @throws */ boolean validateLBRule(Network network, LoadBalancingRule rule); + + List updateHealthChecks(Network network, List lbrules); } diff --git a/api/src/com/cloud/network/element/NetworkElement.java b/api/src/com/cloud/network/element/NetworkElement.java index 1ddd60b27..d89c2a3c4 100644 --- a/api/src/com/cloud/network/element/NetworkElement.java +++ b/api/src/com/cloud/network/element/NetworkElement.java @@ -16,7 +16,6 @@ // under the License. package com.cloud.network.element; -import java.util.List; import java.util.Map; import java.util.Set; @@ -45,19 +44,19 @@ public interface NetworkElement extends Adapter { Map> getCapabilities(); /** - * NOTE: + * NOTE: * NetworkElement -> Network.Provider is a one-to-one mapping. While adding a new NetworkElement, one must add a new Provider name to Network.Provider. */ Provider getProvider(); /** - * Implement the network configuration as specified. + * Implement the network configuration as specified. * @param config fully specified network configuration. * @param offering network offering that originated the network configuration. * @return true if network configuration is now usable; false if not; null if not handled by this element. * @throws InsufficientNetworkCapacityException TODO */ - boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) + boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException; /** @@ -72,8 +71,8 @@ boolean implement(Network network, NetworkOffering offering, DeployDestination d * @throws ResourceUnavailableException * @throws InsufficientNetworkCapacityException */ - boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm, - DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, + boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm, + DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException; /** @@ -86,7 +85,7 @@ boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm, + boolean release(Network network, NicProfile nic, VirtualMachineProfile vm, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException; /** @@ -98,7 +97,7 @@ boolean release(Network network, NicProfile nic, VirtualMachineProfile destinations; private List stickinessPolicies; private LbAutoScaleVmGroup autoScaleVmGroup; + private List healthCheckPolicies; - public LoadBalancingRule(LoadBalancer lb, List destinations, List stickinessPolicies) { + public LoadBalancingRule(LoadBalancer lb, List destinations, + List stickinessPolicies, List healthCheckPolicies) { this.lb = lb; this.destinations = destinations; this.stickinessPolicies = stickinessPolicies; + this.healthCheckPolicies = healthCheckPolicies; } @Override @@ -129,6 +131,10 @@ public LoadBalancer getLb() { return lb; } + public void setDestinations(List destinations) { + this.destinations = destinations; + } + public List getDestinations() { return destinations; } @@ -137,11 +143,21 @@ public List getStickinessPolicies() { return stickinessPolicies; } + public void setHealthCheckPolicies(List healthCheckPolicies) { + this.healthCheckPolicies = healthCheckPolicies; + } + + public List getHealthCheckPolicies() { + return healthCheckPolicies; + } public interface Destination { String getIpAddress(); + int getDestinationPortStart(); + int getDestinationPortEnd(); + boolean isRevoked(); } @@ -175,6 +191,64 @@ public boolean isRevoked() { } } + public static class LbHealthCheckPolicy { + private String pingpath; + private String description; + private int responseTime; + private int healthcheckInterval; + private int healthcheckThresshold; + private int unhealthThresshold; + private boolean _revoke; + + public LbHealthCheckPolicy(String pingpath, String description, int responseTime, int healthcheckInterval, + int healthcheckThresshold, int unhealthThresshold) { + this(pingpath, description, responseTime, healthcheckInterval, healthcheckThresshold, unhealthThresshold, false); + } + + public LbHealthCheckPolicy(String pingpath, String description, int responseTime, int healthcheckInterval, + int healthcheckThresshold, int unhealthThresshold, boolean revoke) { + this.pingpath = pingpath; + this.description = description; + this.responseTime = responseTime; + this.healthcheckInterval = healthcheckInterval; + this.healthcheckThresshold = healthcheckThresshold; + this.unhealthThresshold = unhealthThresshold; + this._revoke = revoke; + } + + public LbHealthCheckPolicy() { + } + + public String getpingpath() { + return pingpath; + } + + public String getDescription() { + return description; + } + + public int getResponseTime() { + return responseTime; + } + + public int getHealthcheckInterval() { + return healthcheckInterval; + } + + public int getHealthcheckThresshold() { + return healthcheckThresshold; + } + + public int getUnhealthThresshold() { + return unhealthThresshold; + } + + public boolean isRevoked() { + return _revoke; + } + + } + public static class LbDestination implements Destination { private int portStart; private int portEnd; @@ -192,10 +266,12 @@ public LbDestination(int portStart, int portEnd, String ip, boolean revoked) { public String getIpAddress() { return ip; } + @Override public int getDestinationPortStart() { return portStart; } + @Override public int getDestinationPortEnd() { return portEnd; @@ -231,15 +307,16 @@ public Long getRelated() { return null; } - @Override public TrafficType getTrafficType() { return null; } + @Override public FirewallRuleType getType() { return FirewallRuleType.User; } + public LbAutoScaleVmGroup getAutoScaleVmGroup() { return autoScaleVmGroup; } @@ -275,8 +352,7 @@ public static class LbAutoScalePolicy { private final AutoScalePolicy policy; private boolean revoked; - public LbAutoScalePolicy(AutoScalePolicy policy, List conditions) - { + public LbAutoScalePolicy(AutoScalePolicy policy, List conditions) { this.policy = policy; this.conditions = conditions; } @@ -310,7 +386,9 @@ public static class LbAutoScaleVmProfile { private final String networkId; private final String vmName; - public LbAutoScaleVmProfile(AutoScaleVmProfile profile, String autoScaleUserApiKey, String autoScaleUserSecretKey, String csUrl, String zoneId, String domainId, String serviceOfferingId, String templateId, String vmName, String networkId) { + public LbAutoScaleVmProfile(AutoScaleVmProfile profile, String autoScaleUserApiKey, + String autoScaleUserSecretKey, String csUrl, String zoneId, String domainId, String serviceOfferingId, + String templateId, String vmName, String networkId) { this.profile = profile; this.autoScaleUserApiKey = autoScaleUserApiKey; this.autoScaleUserSecretKey = autoScaleUserSecretKey; @@ -370,7 +448,8 @@ public static class LbAutoScaleVmGroup { private final LbAutoScaleVmProfile profile; private final String currentState; - public LbAutoScaleVmGroup(AutoScaleVmGroup vmGroup, List policies, LbAutoScaleVmProfile profile, String currentState) { + public LbAutoScaleVmGroup(AutoScaleVmGroup vmGroup, List policies, + LbAutoScaleVmProfile profile, String currentState) { this.vmGroup = vmGroup; this.policies = policies; this.profile = profile; diff --git a/api/src/com/cloud/network/lb/LoadBalancingRulesService.java b/api/src/com/cloud/network/lb/LoadBalancingRulesService.java index 4081f6efc..ed39bedaa 100644 --- a/api/src/com/cloud/network/lb/LoadBalancingRulesService.java +++ b/api/src/com/cloud/network/lb/LoadBalancingRulesService.java @@ -18,12 +18,20 @@ import java.util.List; -import org.apache.cloudstack.api.command.user.loadbalancer.*; +import org.apache.cloudstack.api.command.user.loadbalancer.CreateLBHealthCheckPolicyCmd; import org.apache.cloudstack.api.command.user.loadbalancer.CreateLBStickinessPolicyCmd; +import org.apache.cloudstack.api.command.user.loadbalancer.CreateLoadBalancerRuleCmd; +import org.apache.cloudstack.api.command.user.loadbalancer.ListLBHealthCheckPoliciesCmd; +import org.apache.cloudstack.api.command.user.loadbalancer.ListLBStickinessPoliciesCmd; +import org.apache.cloudstack.api.command.user.loadbalancer.ListLoadBalancerRuleInstancesCmd; +import org.apache.cloudstack.api.command.user.loadbalancer.ListLoadBalancerRulesCmd; import org.apache.cloudstack.api.command.user.loadbalancer.UpdateLoadBalancerRuleCmd; + import com.cloud.exception.InsufficientAddressCapacityException; import com.cloud.exception.NetworkRuleConflictException; import com.cloud.exception.ResourceUnavailableException; +import com.cloud.network.lb.LoadBalancingRule.LbStickinessPolicy; +import com.cloud.network.rules.HealthCheckPolicy; import com.cloud.network.rules.LoadBalancer; import com.cloud.network.rules.StickinessPolicy; import com.cloud.uservm.UserVm; @@ -62,6 +70,22 @@ public interface LoadBalancingRulesService { public boolean applyLBStickinessPolicy(CreateLBStickinessPolicyCmd cmd) throws ResourceUnavailableException; boolean deleteLBStickinessPolicy(long stickinessPolicyId, boolean apply); + + /** + * Create a healthcheck policy to a load balancer from the given healthcheck + * parameters in (name,value) pairs. + * + * @param cmd + * the command specifying the stickiness method name, params + * (name,value pairs), policy name and description. + * @return the newly created stickiness policy if successfull, null + * otherwise + * @thows NetworkRuleConflictException + */ + public HealthCheckPolicy createLBHealthCheckPolicy(CreateLBHealthCheckPolicyCmd cmd); + public boolean applyLBHealthCheckPolicy(CreateLBHealthCheckPolicyCmd cmd) throws ResourceUnavailableException; + boolean deleteLBHealthCheckPolicy(long healthCheckPolicyId, boolean apply); + /** * Assign a virtual machine, or list of virtual machines, to a load balancer. */ @@ -100,8 +124,18 @@ public interface LoadBalancingRulesService { */ List searchForLBStickinessPolicies(ListLBStickinessPoliciesCmd cmd); + /** + * List healthcheck policies based on the given criteria + * + * @param cmd + * the command specifies the load balancing rule id. + * @return list of healthcheck policies that match the criteria. + */ + + List searchForLBHealthCheckPolicies(ListLBHealthCheckPoliciesCmd cmd); + List listByNetworkId(long networkId); LoadBalancer findById(long LoadBalancer); - + public void updateLBHealthChecks() throws ResourceUnavailableException; } diff --git a/api/src/com/cloud/network/rules/HealthCheckPolicy.java b/api/src/com/cloud/network/rules/HealthCheckPolicy.java new file mode 100644 index 000000000..96bb28204 --- /dev/null +++ b/api/src/com/cloud/network/rules/HealthCheckPolicy.java @@ -0,0 +1,45 @@ +// 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.network.rules; + +import java.util.List; + +import com.cloud.utils.Pair; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + +/** + */ +public interface HealthCheckPolicy extends InternalIdentity, Identity { + + public long getLoadBalancerId(); + + public String getpingpath(); + + public String getDescription(); + + public int getResponseTime(); + + public int getHealthcheckInterval(); + + public int getHealthcheckThresshold(); + + public int getUnhealthThresshold(); + + public boolean isRevoke(); + +} diff --git a/api/src/com/cloud/network/rules/LbStickinessMethod.java b/api/src/com/cloud/network/rules/LbStickinessMethod.java index c71b19e3a..1e5a55e6c 100644 --- a/api/src/com/cloud/network/rules/LbStickinessMethod.java +++ b/api/src/com/cloud/network/rules/LbStickinessMethod.java @@ -16,8 +16,9 @@ // under the License. package com.cloud.network.rules; -import java.util.List; import java.util.ArrayList; +import java.util.List; + import com.google.gson.annotations.SerializedName; diff --git a/api/src/com/cloud/network/rules/RulesService.java b/api/src/com/cloud/network/rules/RulesService.java index 80c96d558..d47b38f9d 100644 --- a/api/src/com/cloud/network/rules/RulesService.java +++ b/api/src/com/cloud/network/rules/RulesService.java @@ -19,11 +19,13 @@ import java.util.List; import org.apache.cloudstack.api.command.user.firewall.ListPortForwardingRulesCmd; + import com.cloud.exception.InsufficientAddressCapacityException; import com.cloud.exception.NetworkRuleConflictException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.user.Account; import com.cloud.utils.Pair; +import com.cloud.utils.net.Ip; public interface RulesService { Pair, Integer> searchStaticNatRules(Long ipId, Long id, Long vmId, Long start, Long size, String accountName, Long domainId, Long projectId, boolean isRecursive, boolean listAll); @@ -42,7 +44,7 @@ public interface RulesService { * @throws NetworkRuleConflictException * if conflicts in the network rules are detected. */ - PortForwardingRule createPortForwardingRule(PortForwardingRule rule, Long vmId, boolean openFirewall) throws NetworkRuleConflictException; + PortForwardingRule createPortForwardingRule(PortForwardingRule rule, Long vmId, Ip vmIp, boolean openFirewall) throws NetworkRuleConflictException; /** * Revokes a port forwarding rule @@ -65,7 +67,7 @@ public interface RulesService { boolean applyPortForwardingRules(long ipAdddressId, Account caller) throws ResourceUnavailableException; - boolean enableStaticNat(long ipAddressId, long vmId, long networkId, boolean isSystemVm) throws NetworkRuleConflictException, ResourceUnavailableException; + boolean enableStaticNat(long ipAddressId, long vmId, long networkId, boolean isSystemVm, String vmGuestIp) throws NetworkRuleConflictException, ResourceUnavailableException; PortForwardingRule getPortForwardigRule(long ruleId); diff --git a/api/src/com/cloud/network/rules/StickinessPolicy.java b/api/src/com/cloud/network/rules/StickinessPolicy.java index e23ff828f..da4875466 100644 --- a/api/src/com/cloud/network/rules/StickinessPolicy.java +++ b/api/src/com/cloud/network/rules/StickinessPolicy.java @@ -18,10 +18,11 @@ import java.util.List; -import com.cloud.utils.Pair; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.utils.Pair; + /** */ public interface StickinessPolicy extends InternalIdentity, Identity { diff --git a/api/src/com/cloud/network/security/SecurityGroupRules.java b/api/src/com/cloud/network/security/SecurityGroupRules.java index 0b575e10d..d255e46fd 100644 --- a/api/src/com/cloud/network/security/SecurityGroupRules.java +++ b/api/src/com/cloud/network/security/SecurityGroupRules.java @@ -15,9 +15,10 @@ // specific language governing permissions and limitations // under the License. package com.cloud.network.security; -import com.cloud.network.security.SecurityRule.SecurityRuleType; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.network.security.SecurityRule.SecurityRuleType; + public interface SecurityGroupRules extends InternalIdentity { String getName(); diff --git a/api/src/com/cloud/network/security/SecurityGroupService.java b/api/src/com/cloud/network/security/SecurityGroupService.java index 741f179db..397de1ccb 100644 --- a/api/src/com/cloud/network/security/SecurityGroupService.java +++ b/api/src/com/cloud/network/security/SecurityGroupService.java @@ -18,7 +18,13 @@ import java.util.List; -import org.apache.cloudstack.api.command.user.securitygroup.*; +import org.apache.cloudstack.api.command.user.securitygroup.AuthorizeSecurityGroupEgressCmd; +import org.apache.cloudstack.api.command.user.securitygroup.AuthorizeSecurityGroupIngressCmd; +import org.apache.cloudstack.api.command.user.securitygroup.CreateSecurityGroupCmd; +import org.apache.cloudstack.api.command.user.securitygroup.DeleteSecurityGroupCmd; +import org.apache.cloudstack.api.command.user.securitygroup.RevokeSecurityGroupEgressCmd; +import org.apache.cloudstack.api.command.user.securitygroup.RevokeSecurityGroupIngressCmd; +import org.apache.cloudstack.api.command.user.vm.AddIpToVmNicCmd; import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.PermissionDeniedException; @@ -40,5 +46,6 @@ public interface SecurityGroupService { public List authorizeSecurityGroupIngress(AuthorizeSecurityGroupIngressCmd cmd); public List authorizeSecurityGroupEgress(AuthorizeSecurityGroupEgressCmd cmd); - + public boolean securityGroupRulesForVmSecIp(Long nicId, Long networkId, + String secondaryIp, boolean ruleAction); } diff --git a/api/src/com/cloud/network/security/SecurityRule.java b/api/src/com/cloud/network/security/SecurityRule.java index bd4192d61..350b52dbb 100644 --- a/api/src/com/cloud/network/security/SecurityRule.java +++ b/api/src/com/cloud/network/security/SecurityRule.java @@ -16,10 +16,11 @@ // under the License. package com.cloud.network.security; -import com.cloud.async.AsyncInstanceCreateStatus; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.async.AsyncInstanceCreateStatus; + public interface SecurityRule extends Identity, InternalIdentity { public static class SecurityRuleType { diff --git a/api/src/com/cloud/network/vpc/StaticRouteProfile.java b/api/src/com/cloud/network/vpc/StaticRouteProfile.java index 656355590..54aa6e4dd 100644 --- a/api/src/com/cloud/network/vpc/StaticRouteProfile.java +++ b/api/src/com/cloud/network/vpc/StaticRouteProfile.java @@ -16,7 +16,6 @@ // under the License. package com.cloud.network.vpc; -import org.apache.cloudstack.api.InternalIdentity; public class StaticRouteProfile implements StaticRoute { private long id; diff --git a/api/src/com/cloud/network/vpc/Vpc.java b/api/src/com/cloud/network/vpc/Vpc.java index 9365e56dd..249e80f1a 100644 --- a/api/src/com/cloud/network/vpc/Vpc.java +++ b/api/src/com/cloud/network/vpc/Vpc.java @@ -17,34 +17,66 @@ package com.cloud.network.vpc; import org.apache.cloudstack.acl.ControlledEntity; -import com.cloud.network.Network; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; public interface Vpc extends ControlledEntity, Identity, InternalIdentity { + public enum State { Enabled, Inactive } - public static final String _supportedProviders = Network.Provider.VPCVirtualRouter.getName(); - - boolean readyToUse(); - + /** + * + * @return VPC name + */ String getName(); + + /** + * @return the id of the zone the VPC belongs to + */ long getZoneId(); + + /** + * @return super CIDR of the VPC. All the networks participating in VPC, should have CIDRs that are the part of the super cidr + */ String getCidr(); + /** + * + * @return VPC state + */ State getState(); + + /** + * + * @return VPC offering id - the offering that VPC is created from + */ long getVpcOfferingId(); + + /** + * + * @return VPC display text + */ String getDisplayText(); + + /** + * + * @return VPC network domain. All networks participating in the VPC, become the part of the same network domain + */ String getNetworkDomain(); + + /** + * + * @return true if restart is required for the VPC; false otherwise + */ boolean isRestartRequired(); } diff --git a/api/src/com/cloud/network/vpc/VpcOffering.java b/api/src/com/cloud/network/vpc/VpcOffering.java index 1acfcd214..3961d0aab 100644 --- a/api/src/com/cloud/network/vpc/VpcOffering.java +++ b/api/src/com/cloud/network/vpc/VpcOffering.java @@ -27,18 +27,33 @@ public enum State { public static final String defaultVPCOfferingName = "Default VPC offering"; + /** + * + * @return VPC offering name + */ String getName(); - String getUniqueName(); - + + /** + * @return VPC offering display text + */ String getDisplayText(); + + /** + * + * @return VPC offering state + */ State getState(); + /** + * + * @return true if offering is default - came with the cloudStack fresh install; false otherwise + */ boolean isDefault(); /** - * @return + * @return service offering id used by VPC virutal router */ Long getServiceOfferingId(); diff --git a/api/src/com/cloud/network/vpc/VpcProvisioningService.java b/api/src/com/cloud/network/vpc/VpcProvisioningService.java new file mode 100644 index 000000000..70676ce07 --- /dev/null +++ b/api/src/com/cloud/network/vpc/VpcProvisioningService.java @@ -0,0 +1,46 @@ +// 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.network.vpc; + +import java.util.List; +import java.util.Map; + +public interface VpcProvisioningService { + + public VpcOffering getVpcOffering(long vpcOfferingId); + + public VpcOffering createVpcOffering(String name, String displayText, List supportedServices, Map> serviceProviders); + + List listVpcOfferings(Long id, String name, String displayText, List supportedServicesStr, + Boolean isDefault, String keyword, String state, Long startIndex, Long pageSizeVal); + + /** + * @param offId + * @return + */ + public boolean deleteVpcOffering(long offId); + + /** + * @param vpcOffId + * @param vpcOfferingName + * @param displayText + * @param state + * @return + */ + public VpcOffering updateVpcOffering(long vpcOffId, String vpcOfferingName, String displayText, String state); + +} diff --git a/api/src/com/cloud/network/vpc/VpcService.java b/api/src/com/cloud/network/vpc/VpcService.java index 68e062c7d..07ce89b0a 100644 --- a/api/src/com/cloud/network/vpc/VpcService.java +++ b/api/src/com/cloud/network/vpc/VpcService.java @@ -18,10 +18,10 @@ import java.util.List; import java.util.Map; -import java.util.Set; import org.apache.cloudstack.api.command.user.vpc.ListPrivateGatewaysCmd; import org.apache.cloudstack.api.command.user.vpc.ListStaticRoutesCmd; + import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientAddressCapacityException; import com.cloud.exception.InsufficientCapacityException; @@ -30,45 +30,29 @@ import com.cloud.exception.ResourceUnavailableException; import com.cloud.network.IpAddress; import com.cloud.network.Network; -import com.cloud.network.Network.Provider; -import com.cloud.network.Network.Service; -import com.cloud.user.Account; -import com.cloud.user.User; import com.cloud.utils.Pair; public interface VpcService { - public VpcOffering getVpcOffering(long vpcOfferingId); - - public VpcOffering createVpcOffering(String name, String displayText, List supportedServices); - - public Vpc getVpc(long vpcId); - - public Vpc getActiveVpc(long vpcId); - - public List getVpcNetworks(long vpcId); - - Map> getVpcOffSvcProvidersMap(long vpcOffId); - - List listVpcOfferings(Long id, String name, String displayText, List supportedServicesStr, - Boolean isDefault, String keyword, String state, Long startIndex, Long pageSizeVal); - - /** - * @param offId + /**Returns existing VPC found by id + * + * @param vpcId * @return */ - public boolean deleteVpcOffering(long offId); + public Vpc getVpc(long vpcId); + /** - * @param vpcOffId - * @param vpcOfferingName - * @param displayText - * @param state + * Returns all the Guest networks that are part of VPC + * + * @param vpcId * @return */ - public VpcOffering updateVpcOffering(long vpcOffId, String vpcOfferingName, String displayText, String state); + public List getVpcNetworks(long vpcId); /** + * Persists VPC record in the database + * * @param zoneId * @param vpcOffId * @param vpcOwnerId @@ -82,7 +66,10 @@ List listVpcOfferings(Long id, String name, String displa public Vpc createVpc(long zoneId, long vpcOffId, long vpcOwnerId, String vpcName, String displayText, String cidr, String networkDomain) throws ResourceAllocationException; + /** + * Deletes a VPC + * * @param vpcId * @return * @throws InsufficientCapacityException @@ -91,7 +78,10 @@ public Vpc createVpc(long zoneId, long vpcOffId, long vpcOwnerId, String vpcName */ public boolean deleteVpc(long vpcId) throws ConcurrentOperationException, ResourceUnavailableException; + /** + * Updates VPC with new name/displayText + * * @param vpcId * @param vpcName * @param displayText @@ -99,7 +89,10 @@ public Vpc createVpc(long zoneId, long vpcOffId, long vpcOwnerId, String vpcName */ public Vpc updateVpc(long vpcId, String vpcName, String displayText); + /** + * Lists VPC(s) based on the parameters passed to the method call + * * @param id * @param vpcName * @param displayText @@ -126,6 +119,8 @@ public List listVpcs(Long id, String vpcName, String displayText, Boolean restartRequired, Map tags, Long projectId); /** + * Starts VPC which includes starting VPC provider and applying all the neworking rules on the backend + * * @param vpcId * @param destroyOnFailure TODO * @return @@ -137,6 +132,8 @@ boolean startVpc(long vpcId, boolean destroyOnFailure) throws ConcurrentOperatio ResourceUnavailableException, InsufficientCapacityException; /** + * Shuts down the VPC which includes shutting down all VPC provider and rules cleanup on the backend + * * @param vpcId * @return * @throws ConcurrentOperationException @@ -144,16 +141,28 @@ boolean startVpc(long vpcId, boolean destroyOnFailure) throws ConcurrentOperatio */ boolean shutdownVpc(long vpcId) throws ConcurrentOperationException, ResourceUnavailableException; + /** + * Restarts the VPC. VPC gets shutdown and started as a part of it + * * @param id * @return * @throws InsufficientCapacityException */ boolean restartVpc(long id) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException; + /** + * Returns a Private gateway found in the VPC by id + * + * @param id + * @return + */ PrivateGateway getVpcPrivateGateway(long id); + /** + * Persists VPC private gateway in the Database. + * * @param vpcId TODO * @param physicalNetworkId * @param vlan @@ -171,6 +180,8 @@ public PrivateGateway createVpcPrivateGateway(long vpcId, Long physicalNetworkId ConcurrentOperationException, InsufficientCapacityException; /** + * Applies VPC private gateway on the backend, so it becomes functional + * * @param gatewayId * @param destroyOnFailure TODO * @return @@ -179,7 +190,10 @@ public PrivateGateway createVpcPrivateGateway(long vpcId, Long physicalNetworkId */ public PrivateGateway applyVpcPrivateGateway(long gatewayId, boolean destroyOnFailure) throws ConcurrentOperationException, ResourceUnavailableException; + /** + * Deletes VPC private gateway + * * @param id * @return * @throws ResourceUnavailableException @@ -187,52 +201,76 @@ public PrivateGateway createVpcPrivateGateway(long vpcId, Long physicalNetworkId */ boolean deleteVpcPrivateGateway(long gatewayId) throws ConcurrentOperationException, ResourceUnavailableException; + /** + * Returns the list of Private gateways existing in the VPC + * * @param listPrivateGatewaysCmd * @return */ public Pair, Integer> listPrivateGateway(ListPrivateGatewaysCmd listPrivateGatewaysCmd); + /** + * Returns Static Route found by Id + * * @param routeId * @return */ StaticRoute getStaticRoute(long routeId); + /** + * Applies existing Static Routes to the VPC elements + * * @param vpcId * @return * @throws ResourceUnavailableException */ public boolean applyStaticRoutes(long vpcId) throws ResourceUnavailableException; + /** + * Deletes static route from the backend and the database + * * @param routeId * @return TODO * @throws ResourceUnavailableException */ public boolean revokeStaticRoute(long routeId) throws ResourceUnavailableException; + /** + * Persists static route entry in the Database + * * @param gatewayId * @param cidr * @return */ public StaticRoute createStaticRoute(long gatewayId, String cidr) throws NetworkRuleConflictException; + /** + * Lists static routes based on parameters passed to the call + * * @param listStaticRoutesCmd * @return */ public Pair, Integer> listStaticRoutes(ListStaticRoutesCmd cmd); + /** + * Returns gateway (VPN or Public) existign in the VPC + * * @param id * @return */ VpcGateway getVpcGateway(long id); + /** + * Associates IP address from the Public network, to the VPC + * * @param ipId * @param vpcId * @return @@ -244,6 +282,4 @@ public PrivateGateway createVpcPrivateGateway(long vpcId, Long physicalNetworkId IpAddress associateIPToVpc(long ipId, long vpcId) throws ResourceAllocationException, ResourceUnavailableException, InsufficientAddressCapacityException, ConcurrentOperationException; - public Network updateVpcGuestNetwork(long networkId, String name, String displayText, Account callerAccount, - User callerUser, String domainSuffix, Long ntwkOffId, Boolean changeCidr); } diff --git a/api/src/com/cloud/network/vpn/RemoteAccessVpnService.java b/api/src/com/cloud/network/vpn/RemoteAccessVpnService.java index 81599a0c3..d637da638 100644 --- a/api/src/com/cloud/network/vpn/RemoteAccessVpnService.java +++ b/api/src/com/cloud/network/vpn/RemoteAccessVpnService.java @@ -18,8 +18,9 @@ import java.util.List; -import org.apache.cloudstack.api.command.user.vpn.ListVpnUsersCmd; import org.apache.cloudstack.api.command.user.vpn.ListRemoteAccessVpnsCmd; +import org.apache.cloudstack.api.command.user.vpn.ListVpnUsersCmd; + import com.cloud.exception.NetworkRuleConflictException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.network.RemoteAccessVpn; @@ -44,6 +45,6 @@ RemoteAccessVpn createRemoteAccessVpn(long vpnServerAddressId, String ipRange, b List listRemoteAccessVpns(long networkId); - RemoteAccessVpn getRemoteAccessVpn(long vpnId); + RemoteAccessVpn getRemoteAccessVpn(long vpnAddrId); } diff --git a/api/src/com/cloud/network/vpn/Site2SiteVpnService.java b/api/src/com/cloud/network/vpn/Site2SiteVpnService.java index 7ac567774..d90e3a997 100644 --- a/api/src/com/cloud/network/vpn/Site2SiteVpnService.java +++ b/api/src/com/cloud/network/vpn/Site2SiteVpnService.java @@ -18,7 +18,6 @@ import java.util.List; -import org.apache.cloudstack.api.command.user.vpn.*; import org.apache.cloudstack.api.command.user.vpn.CreateVpnConnectionCmd; import org.apache.cloudstack.api.command.user.vpn.CreateVpnCustomerGatewayCmd; import org.apache.cloudstack.api.command.user.vpn.CreateVpnGatewayCmd; @@ -26,9 +25,11 @@ import org.apache.cloudstack.api.command.user.vpn.DeleteVpnCustomerGatewayCmd; import org.apache.cloudstack.api.command.user.vpn.DeleteVpnGatewayCmd; import org.apache.cloudstack.api.command.user.vpn.ListVpnConnectionsCmd; +import org.apache.cloudstack.api.command.user.vpn.ListVpnCustomerGatewaysCmd; import org.apache.cloudstack.api.command.user.vpn.ListVpnGatewaysCmd; import org.apache.cloudstack.api.command.user.vpn.ResetVpnConnectionCmd; import org.apache.cloudstack.api.command.user.vpn.UpdateVpnCustomerGatewayCmd; + import com.cloud.exception.NetworkRuleConflictException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.network.Site2SiteCustomerGateway; diff --git a/api/src/com/cloud/offering/DiskOffering.java b/api/src/com/cloud/offering/DiskOffering.java index 9a48f4bb6..dd77c70ab 100644 --- a/api/src/com/cloud/offering/DiskOffering.java +++ b/api/src/com/cloud/offering/DiskOffering.java @@ -16,12 +16,12 @@ // under the License. package com.cloud.offering; +import java.util.Date; + import org.apache.cloudstack.acl.InfrastructureEntity; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -import java.util.Date; - /** * Represents a disk offering that specifies what the end user needs in * the disk offering. diff --git a/api/src/com/cloud/offering/NetworkOffering.java b/api/src/com/cloud/offering/NetworkOffering.java index f2c4de520..bd14acd47 100644 --- a/api/src/com/cloud/offering/NetworkOffering.java +++ b/api/src/com/cloud/offering/NetworkOffering.java @@ -16,12 +16,13 @@ // under the License. package com.cloud.offering; -import com.cloud.network.Network.GuestType; -import com.cloud.network.Networks.TrafficType; import org.apache.cloudstack.acl.InfrastructureEntity; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.network.Network.GuestType; +import com.cloud.network.Networks.TrafficType; + /** * Describes network offering * @@ -45,6 +46,7 @@ public enum State { public final static String SystemPrivateGatewayNetworkOffering = "System-Private-Gateway-Network-Offering"; public final static String DefaultSharedNetworkOfferingWithSGService = "DefaultSharedNetworkOfferingWithSGService"; + public final static String QuickCloudNoServices = "QuickCloudNoServices"; public final static String DefaultIsolatedNetworkOfferingWithSourceNatService = "DefaultIsolatedNetworkOfferingWithSourceNatService"; public final static String OvsIsolatedNetworkOfferingWithSourceNatService = "OvsIsolatedNetworkOfferingWithSourceNatService"; public final static String DefaultSharedNetworkOffering = "DefaultSharedNetworkOffering"; @@ -110,4 +112,7 @@ public enum State { boolean getSpecifyIpRanges(); boolean isInline(); + + boolean getIsPersistent(); + } diff --git a/api/src/com/cloud/offering/ServiceOffering.java b/api/src/com/cloud/offering/ServiceOffering.java index b13346cfb..d6c215f42 100755 --- a/api/src/com/cloud/offering/ServiceOffering.java +++ b/api/src/com/cloud/offering/ServiceOffering.java @@ -16,12 +16,12 @@ // under the License. package com.cloud.offering; +import java.util.Date; + import org.apache.cloudstack.acl.InfrastructureEntity; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -import java.util.Date; - /** * offered. */ @@ -77,6 +77,11 @@ public enum StorageType { */ boolean getLimitCpuUse(); + /** + * @return Does this service plan support Volatile VM that is, discard VM's root disk and create a new one on reboot? + */ + boolean getVolatileVm(); + /** * @return the rate in megabits per sec to which a VM's network interface is throttled to */ diff --git a/api/src/com/cloud/org/Cluster.java b/api/src/com/cloud/org/Cluster.java index cb72a70b8..d14f86bcb 100644 --- a/api/src/com/cloud/org/Cluster.java +++ b/api/src/com/cloud/org/Cluster.java @@ -16,11 +16,12 @@ // under the License. package com.cloud.org; -import com.cloud.hypervisor.Hypervisor.HypervisorType; -import com.cloud.org.Managed.ManagedState; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.org.Managed.ManagedState; + public interface Cluster extends Grouping, InternalIdentity, Identity { public static enum ClusterType { CloudManaged, diff --git a/api/src/com/cloud/projects/Project.java b/api/src/com/cloud/projects/Project.java index 78d52574f..9240930c2 100644 --- a/api/src/com/cloud/projects/Project.java +++ b/api/src/com/cloud/projects/Project.java @@ -19,9 +19,10 @@ import java.util.Date; import org.apache.cloudstack.api.Identity; -import com.cloud.domain.PartOf; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.domain.PartOf; + public interface Project extends PartOf, Identity, InternalIdentity { public enum State { Active, Disabled, Suspended diff --git a/api/src/com/cloud/region/ha/GlobalLoadBalancerRule.java b/api/src/com/cloud/region/ha/GlobalLoadBalancerRule.java new file mode 100644 index 000000000..597304fa8 --- /dev/null +++ b/api/src/com/cloud/region/ha/GlobalLoadBalancerRule.java @@ -0,0 +1,89 @@ +// 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.region.ha; + +import org.apache.cloudstack.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + +/** + * GlobalLoadBalancerRule defines a global (multi zone) load balancing configuration. + */ +public interface GlobalLoadBalancerRule extends Identity, InternalIdentity, ControlledEntity { + + enum Algorithm { + + RoundRobin, + LeastConn, + Proximity; + + public static boolean isValidAlgorithm(String algorithm) { + if (RoundRobin.name().equalsIgnoreCase(algorithm) || + LeastConn.name().equalsIgnoreCase(algorithm) || + Proximity.name().equalsIgnoreCase(algorithm)) { + return true; + } + return false; + } + } + enum Persistence { + + sourceip; + + public static boolean isValidPersistence(String persistence) { + if (sourceip.name().equalsIgnoreCase(persistence)) { + return true; + } + return false; + } + } + + enum ServiceType { + tcp, + udp; + public static boolean isValidServiceType(String serviceType) { + if (tcp.name().equalsIgnoreCase(serviceType) || udp.name().equalsIgnoreCase(serviceType)) { + return true; + } + return false; + } + } + enum State { + Staged, + Add, + Active, + Revoke + } + + public String getName(); + + public String getDescription(); + + public String getGslbDomain(); + + public String getAlgorithm(); + + public String getPersistence(); + + public int getRegion(); + + public long getAccountId(); + + public State getState(); + + public String getServiceType(); +} diff --git a/api/src/com/cloud/region/ha/GlobalLoadBalancingRulesService.java b/api/src/com/cloud/region/ha/GlobalLoadBalancingRulesService.java new file mode 100644 index 000000000..e2f097e29 --- /dev/null +++ b/api/src/com/cloud/region/ha/GlobalLoadBalancingRulesService.java @@ -0,0 +1,47 @@ +// 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.region.ha; + +import org.apache.cloudstack.api.command.user.region.ha.gslb.*; + +import java.util.List; + +public interface GlobalLoadBalancingRulesService { + + /* + * methods for managing life cycle of global load balancing rules + */ + GlobalLoadBalancerRule createGlobalLoadBalancerRule(CreateGlobalLoadBalancerRuleCmd createGslbCmd); + + boolean deleteGlobalLoadBalancerRule(DeleteGlobalLoadBalancerRuleCmd deleteGslbCmd); + + GlobalLoadBalancerRule updateGlobalLoadBalancerRule(UpdateGlobalLoadBalancerRuleCmd updateGslbCmd); + + /* + * methods for managing sites participating in global load balancing + */ + boolean assignToGlobalLoadBalancerRule(AssignToGlobalLoadBalancerRuleCmd assignToGslbCmd); + + boolean removeFromGlobalLoadBalancerRule(RemoveFromGlobalLoadBalancerRuleCmd removeFromGslbCmd); + + + GlobalLoadBalancerRule findById(long gslbRuleId); + + List listGlobalLoadBalancerRule(ListGlobalLoadBalancerRuleCmd listGslbCmd); + +} diff --git a/api/src/com/cloud/resource/ResourceService.java b/api/src/com/cloud/resource/ResourceService.java index 7348a5a68..08e2585d1 100755 --- a/api/src/com/cloud/resource/ResourceService.java +++ b/api/src/com/cloud/resource/ResourceService.java @@ -20,12 +20,18 @@ import org.apache.cloudstack.api.command.admin.cluster.AddClusterCmd; import org.apache.cloudstack.api.command.admin.cluster.DeleteClusterCmd; -import org.apache.cloudstack.api.command.admin.host.*; +import org.apache.cloudstack.api.command.admin.host.AddHostCmd; +import org.apache.cloudstack.api.command.admin.host.AddSecondaryStorageCmd; +import org.apache.cloudstack.api.command.admin.host.CancelMaintenanceCmd; +import org.apache.cloudstack.api.command.admin.host.PrepareForMaintenanceCmd; +import org.apache.cloudstack.api.command.admin.host.ReconnectHostCmd; +import org.apache.cloudstack.api.command.admin.host.UpdateHostCmd; +import org.apache.cloudstack.api.command.admin.host.UpdateHostPasswordCmd; import org.apache.cloudstack.api.command.admin.storage.AddS3Cmd; import org.apache.cloudstack.api.command.admin.storage.ListS3sCmd; import org.apache.cloudstack.api.command.admin.swift.AddSwiftCmd; import org.apache.cloudstack.api.command.admin.swift.ListSwiftsCmd; -import org.apache.cloudstack.api.command.admin.host.PrepareForMaintenanceCmd; + import com.cloud.exception.DiscoveryException; import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.ResourceInUseException; @@ -36,7 +42,6 @@ import com.cloud.storage.Swift; import com.cloud.utils.Pair; import com.cloud.utils.fsm.NoTransitionException; -import org.apache.cloudstack.api.command.admin.host.ReconnectHostCmd; public interface ResourceService { /** @@ -66,7 +71,7 @@ public interface ResourceService { boolean deleteCluster(DeleteClusterCmd cmd); - Cluster updateCluster(Cluster cluster, String clusterType, String hypervisor, String allocationState, String managedstate); + Cluster updateCluster(Cluster cluster, String clusterType, String hypervisor, String allocationState, String managedstate,Float memoryOvercommitRatio, Float cpuOvercommitRatio); List discoverHosts(AddHostCmd cmd) throws IllegalArgumentException, DiscoveryException, InvalidParameterValueException; @@ -95,7 +100,7 @@ public interface ResourceService { Swift discoverSwift(AddSwiftCmd addSwiftCmd) throws DiscoveryException; S3 discoverS3(AddS3Cmd cmd) throws DiscoveryException; - + List getSupportedHypervisorTypes(long zoneId, boolean forVirtualRouter, Long podId); Pair, Integer> listSwifts(ListSwiftsCmd cmd); diff --git a/api/src/com/cloud/server/ManagementService.java b/api/src/com/cloud/server/ManagementService.java index 32c2b0530..6e6dbc36f 100755 --- a/api/src/com/cloud/server/ManagementService.java +++ b/api/src/com/cloud/server/ManagementService.java @@ -22,46 +22,45 @@ import java.util.Map; import java.util.Set; -import com.cloud.alert.Alert; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.command.admin.cluster.ListClustersCmd; +import org.apache.cloudstack.api.command.admin.config.ListCfgsByCmd; +import org.apache.cloudstack.api.command.admin.domain.UpdateDomainCmd; import org.apache.cloudstack.api.command.admin.host.ListHostsCmd; import org.apache.cloudstack.api.command.admin.host.UpdateHostPasswordCmd; import org.apache.cloudstack.api.command.admin.pod.ListPodsByCmd; +import org.apache.cloudstack.api.command.admin.resource.ArchiveAlertsCmd; +import org.apache.cloudstack.api.command.admin.resource.DeleteAlertsCmd; import org.apache.cloudstack.api.command.admin.resource.ListAlertsCmd; import org.apache.cloudstack.api.command.admin.resource.ListCapacityCmd; -import org.apache.cloudstack.api.command.admin.domain.UpdateDomainCmd; -import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd; -import org.apache.cloudstack.api.command.admin.systemvm.*; +import org.apache.cloudstack.api.command.admin.resource.UploadCustomCertificateCmd; +import org.apache.cloudstack.api.command.admin.systemvm.DestroySystemVmCmd; +import org.apache.cloudstack.api.command.admin.systemvm.ListSystemVMsCmd; +import org.apache.cloudstack.api.command.admin.systemvm.RebootSystemVmCmd; +import org.apache.cloudstack.api.command.admin.systemvm.StopSystemVmCmd; +import org.apache.cloudstack.api.command.admin.systemvm.UpgradeSystemVMCmd; import org.apache.cloudstack.api.command.admin.vlan.ListVlanIpRangesCmd; import org.apache.cloudstack.api.command.user.address.ListPublicIpAddressesCmd; import org.apache.cloudstack.api.command.user.config.ListCapabilitiesCmd; -import org.apache.cloudstack.api.command.user.guest.ListGuestOsCmd; -import org.apache.cloudstack.api.command.user.offering.ListDiskOfferingsCmd; -import org.apache.cloudstack.api.command.user.offering.ListServiceOfferingsCmd; -import org.apache.cloudstack.api.command.user.ssh.DeleteSSHKeyPairCmd; -import org.apache.cloudstack.api.command.user.ssh.CreateSSHKeyPairCmd; -import org.apache.cloudstack.api.command.user.template.ListTemplatesCmd; -import org.apache.cloudstack.api.command.user.vm.GetVMPasswordCmd; -import org.apache.cloudstack.api.command.user.volume.ExtractVolumeCmd; -import org.apache.cloudstack.api.command.user.template.UpdateTemplateCmd; -import org.apache.cloudstack.api.command.admin.config.ListCfgsByCmd; +import org.apache.cloudstack.api.command.user.event.ArchiveEventsCmd; +import org.apache.cloudstack.api.command.user.event.DeleteEventsCmd; import org.apache.cloudstack.api.command.user.guest.ListGuestOsCategoriesCmd; +import org.apache.cloudstack.api.command.user.guest.ListGuestOsCmd; import org.apache.cloudstack.api.command.user.iso.ListIsosCmd; +import org.apache.cloudstack.api.command.user.iso.UpdateIsoCmd; +import org.apache.cloudstack.api.command.user.ssh.CreateSSHKeyPairCmd; +import org.apache.cloudstack.api.command.user.ssh.DeleteSSHKeyPairCmd; import org.apache.cloudstack.api.command.user.ssh.ListSSHKeyPairsCmd; -import org.apache.cloudstack.api.command.admin.systemvm.ListSystemVMsCmd; -import org.apache.cloudstack.api.command.user.zone.ListZonesByCmd; -import org.apache.cloudstack.api.command.admin.systemvm.RebootSystemVmCmd; import org.apache.cloudstack.api.command.user.ssh.RegisterSSHKeyPairCmd; -import org.apache.cloudstack.api.command.admin.systemvm.StopSystemVmCmd; -import org.apache.cloudstack.api.command.user.iso.UpdateIsoCmd; +import org.apache.cloudstack.api.command.user.template.ListTemplatesCmd; +import org.apache.cloudstack.api.command.user.template.UpdateTemplateCmd; +import org.apache.cloudstack.api.command.user.vm.GetVMPasswordCmd; import org.apache.cloudstack.api.command.user.vmgroup.UpdateVMGroupCmd; -import org.apache.cloudstack.api.command.admin.systemvm.UpgradeSystemVMCmd; -import org.apache.cloudstack.api.command.admin.resource.UploadCustomCertificateCmd; +import org.apache.cloudstack.api.command.user.volume.ExtractVolumeCmd; +import com.cloud.alert.Alert; import com.cloud.capacity.Capacity; import com.cloud.configuration.Configuration; -import com.cloud.dc.DataCenter; import com.cloud.dc.Pod; import com.cloud.dc.Vlan; import com.cloud.domain.Domain; @@ -73,12 +72,9 @@ import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.hypervisor.HypervisorCapabilities; import com.cloud.network.IpAddress; -import com.cloud.offering.DiskOffering; -import com.cloud.offering.ServiceOffering; import com.cloud.org.Cluster; import com.cloud.storage.GuestOS; import com.cloud.storage.GuestOsCategory; -import com.cloud.storage.StoragePool; import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.SSHKeyPair; import com.cloud.utils.Pair; @@ -196,6 +192,34 @@ public interface ManagementService { */ Pair, Integer> searchForAlerts(ListAlertsCmd cmd); + /** + * Archive alerts + * @param cmd + * @return True on success. False otherwise. + */ + boolean archiveAlerts(ArchiveAlertsCmd cmd); + + /** + * Delete alerts + * @param cmd + * @return True on success. False otherwise. + */ + boolean deleteAlerts(DeleteAlertsCmd cmd); + + /** + * Archive events + * @param cmd + * @return True on success. False otherwise. + */ + boolean archiveEvents(ArchiveEventsCmd cmd); + + /** + * Delete events + * @param cmd + * @return True on success. False otherwise. + */ + boolean deleteEvents(DeleteEventsCmd cmd); + /** * list all the capacity rows in capacity operations table * @@ -383,4 +407,6 @@ public interface ManagementService { */ List listTopConsumedResources(ListCapacityCmd cmd); + List listDeploymentPlanners(); + } diff --git a/api/src/com/cloud/server/ResourceTag.java b/api/src/com/cloud/server/ResourceTag.java index 5ec9f0171..9006e305d 100644 --- a/api/src/com/cloud/server/ResourceTag.java +++ b/api/src/com/cloud/server/ResourceTag.java @@ -37,7 +37,9 @@ public enum TaggedResourceType { Project, Vpc, NetworkACL, - StaticRoute + StaticRoute, + VMSnapshot, + RemoteAccessVpn } /** diff --git a/api/src/com/cloud/storage/DataStoreProviderApiService.java b/api/src/com/cloud/storage/DataStoreProviderApiService.java new file mode 100644 index 000000000..f81a9960b --- /dev/null +++ b/api/src/com/cloud/storage/DataStoreProviderApiService.java @@ -0,0 +1,28 @@ +/* + * 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.storage; + +import java.util.List; + +import org.apache.cloudstack.api.response.StorageProviderResponse; + +public interface DataStoreProviderApiService { + public List getDataStoreProviders(String type); + +} diff --git a/api/src/com/cloud/storage/S3.java b/api/src/com/cloud/storage/S3.java index 708e280ca..0c58a9029 100644 --- a/api/src/com/cloud/storage/S3.java +++ b/api/src/com/cloud/storage/S3.java @@ -18,11 +18,12 @@ */ package com.cloud.storage; -import com.cloud.agent.api.to.S3TO; +import java.util.Date; + import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -import java.util.Date; +import com.cloud.agent.api.to.S3TO; public interface S3 extends InternalIdentity, Identity { diff --git a/api/src/com/cloud/storage/Snapshot.java b/api/src/com/cloud/storage/Snapshot.java index 2e2965ae1..f71265cd2 100644 --- a/api/src/com/cloud/storage/Snapshot.java +++ b/api/src/com/cloud/storage/Snapshot.java @@ -16,15 +16,14 @@ // under the License. package com.cloud.storage; +import java.util.Date; + import com.cloud.hypervisor.Hypervisor.HypervisorType; -import com.cloud.utils.fsm.StateMachine2; import com.cloud.utils.fsm.StateObject; import org.apache.cloudstack.acl.ControlledEntity; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -import java.util.Date; - public interface Snapshot extends ControlledEntity, Identity, InternalIdentity, StateObject { public enum Type { MANUAL, @@ -44,6 +43,7 @@ public int getMax() { return max; } + @Override public String toString() { return this.name(); } @@ -54,28 +54,13 @@ public boolean equals(String snapshotType) { } public enum State { + Allocated, Creating, CreatedOnPrimary, BackingUp, BackedUp, Error; - private final static StateMachine2 s_fsm = new StateMachine2(); - - public static StateMachine2 getStateMachine() { - return s_fsm; - } - - static { - s_fsm.addTransition(null, Event.CreateRequested, Creating); - s_fsm.addTransition(Creating, Event.OperationSucceeded, CreatedOnPrimary); - s_fsm.addTransition(Creating, Event.OperationNotPerformed, BackedUp); - s_fsm.addTransition(Creating, Event.OperationFailed, Error); - s_fsm.addTransition(CreatedOnPrimary, Event.BackupToSecondary, BackingUp); - s_fsm.addTransition(BackingUp, Event.OperationSucceeded, BackedUp); - s_fsm.addTransition(BackingUp, Event.OperationFailed, Error); - } - public String toString() { return this.name(); } @@ -106,7 +91,7 @@ enum Event { Date getCreated(); - Type getType(); + Type getRecurringType(); State getState(); diff --git a/api/src/com/cloud/storage/Storage.java b/api/src/com/cloud/storage/Storage.java index fba12b62d..c130fe222 100755 --- a/api/src/com/cloud/storage/Storage.java +++ b/api/src/com/cloud/storage/Storage.java @@ -26,7 +26,8 @@ public static enum ImageFormat { VHD(true, true, true), ISO(false, false, false), OVA(true, true, true, "ova"), - BAREMETAL(false, false, false); + BAREMETAL(false, false, false), + TAR(false, false, false); private final boolean thinProvisioned; private final boolean supportSparse; diff --git a/api/src/com/cloud/storage/StoragePool.java b/api/src/com/cloud/storage/StoragePool.java index 3334da54e..8b95383c5 100644 --- a/api/src/com/cloud/storage/StoragePool.java +++ b/api/src/com/cloud/storage/StoragePool.java @@ -18,10 +18,11 @@ import java.util.Date; -import com.cloud.storage.Storage.StoragePoolType; import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.storage.Storage.StoragePoolType; + public interface StoragePool extends Identity, InternalIdentity { /** @@ -94,4 +95,11 @@ public interface StoragePool extends Identity, InternalIdentity { int getPort(); Long getPodId(); + + /** + * @return + */ + String getStorageProviderName(); + + boolean isInMaintenance(); } diff --git a/api/src/com/cloud/storage/StoragePoolStatus.java b/api/src/com/cloud/storage/StoragePoolStatus.java index 0c9496144..a35f706d7 100644 --- a/api/src/com/cloud/storage/StoragePoolStatus.java +++ b/api/src/com/cloud/storage/StoragePoolStatus.java @@ -17,10 +17,6 @@ package com.cloud.storage; public enum StoragePoolStatus { - Up, - PrepareForMaintenance, - ErrorInMaintenance, - CancelMaintenance, - Maintenance, - Removed; + Initial, Initialized, Creating, Attaching, Up, PrepareForMaintenance, + ErrorInMaintenance, CancelMaintenance, Maintenance, Removed; } diff --git a/api/src/com/cloud/storage/StorageService.java b/api/src/com/cloud/storage/StorageService.java index a06f21380..63c5023ee 100644 --- a/api/src/com/cloud/storage/StorageService.java +++ b/api/src/com/cloud/storage/StorageService.java @@ -18,19 +18,14 @@ import java.net.UnknownHostException; -import org.apache.cloudstack.api.command.admin.storage.*; import org.apache.cloudstack.api.command.admin.storage.CancelPrimaryStorageMaintenanceCmd; +import org.apache.cloudstack.api.command.admin.storage.CreateStoragePoolCmd; +import org.apache.cloudstack.api.command.admin.storage.DeletePoolCmd; import org.apache.cloudstack.api.command.admin.storage.UpdateStoragePoolCmd; -import org.apache.cloudstack.api.command.user.volume.CreateVolumeCmd; -import org.apache.cloudstack.api.command.user.volume.UploadVolumeCmd; -import org.apache.cloudstack.api.command.user.volume.ResizeVolumeCmd; -import com.cloud.exception.ConcurrentOperationException; + import com.cloud.exception.InsufficientCapacityException; -import com.cloud.exception.PermissionDeniedException; -import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceInUseException; import com.cloud.exception.ResourceUnavailableException; -import com.cloud.user.Account; public interface StorageService{ /** @@ -49,37 +44,6 @@ public interface StorageService{ StoragePool createPool(CreateStoragePoolCmd cmd) throws ResourceInUseException, IllegalArgumentException, UnknownHostException, ResourceUnavailableException; - /** - * Creates the database object for a volume based on the given criteria - * - * @param cmd - * the API command wrapping the criteria (account/domainId [admin only], zone, diskOffering, snapshot, - * name) - * @return the volume object - * @throws PermissionDeniedException - */ - Volume allocVolume(CreateVolumeCmd cmd) throws ResourceAllocationException; - - /** - * Creates the volume based on the given criteria - * - * @param cmd - * the API command wrapping the criteria (account/domainId [admin only], zone, diskOffering, snapshot, - * name) - * @return the volume object - */ - Volume createVolume(CreateVolumeCmd cmd); - - - /** - * Resizes the volume based on the given criteria - * - * @param cmd - * the API command wrapping the criteria - * @return the volume object - */ - Volume resizeVolume(ResizeVolumeCmd cmd); - /** * Delete the storage pool * @@ -118,19 +82,4 @@ public StoragePool cancelPrimaryStorageForMaintenance(CancelPrimaryStorageMainte public StoragePool updateStoragePool(UpdateStoragePoolCmd cmd) throws IllegalArgumentException; public StoragePool getStoragePool(long id); - - Volume migrateVolume(Long volumeId, Long storagePoolId) throws ConcurrentOperationException; - - - /** - * Uploads the volume to secondary storage - * - * @param UploadVolumeCmd cmd - * - * @return Volume object - */ - Volume uploadVolume(UploadVolumeCmd cmd) throws ResourceAllocationException; - - boolean deleteVolume(long volumeId, Account caller) throws ConcurrentOperationException; - } diff --git a/api/src/com/cloud/storage/Swift.java b/api/src/com/cloud/storage/Swift.java index 9cd3a34cd..028e96e48 100644 --- a/api/src/com/cloud/storage/Swift.java +++ b/api/src/com/cloud/storage/Swift.java @@ -16,9 +16,10 @@ // under the License. package com.cloud.storage; -import com.cloud.agent.api.to.SwiftTO; import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.agent.api.to.SwiftTO; + public interface Swift extends InternalIdentity { public long getId(); diff --git a/api/src/com/cloud/storage/Upload.java b/api/src/com/cloud/storage/Upload.java index a20faf1dc..ac3836caf 100755 --- a/api/src/com/cloud/storage/Upload.java +++ b/api/src/com/cloud/storage/Upload.java @@ -16,11 +16,11 @@ // under the License. package com.cloud.storage; +import java.util.Date; + import org.apache.cloudstack.api.Identity; import org.apache.cloudstack.api.InternalIdentity; -import java.util.Date; - public interface Upload extends InternalIdentity, Identity { public static enum Status { diff --git a/api/src/com/cloud/storage/VMTemplateStorageResourceAssoc.java b/api/src/com/cloud/storage/VMTemplateStorageResourceAssoc.java index 97baa4b29..d40eafe7a 100644 --- a/api/src/com/cloud/storage/VMTemplateStorageResourceAssoc.java +++ b/api/src/com/cloud/storage/VMTemplateStorageResourceAssoc.java @@ -16,14 +16,13 @@ // under the License. package com.cloud.storage; -import org.apache.cloudstack.api.Identity; -import org.apache.cloudstack.api.InternalIdentity; - import java.util.Date; +import org.apache.cloudstack.api.InternalIdentity; + public interface VMTemplateStorageResourceAssoc extends InternalIdentity { public static enum Status { - UNKNOWN, DOWNLOAD_ERROR, NOT_DOWNLOADED, DOWNLOAD_IN_PROGRESS, DOWNLOADED, ABANDONED, UPLOADED, NOT_UPLOADED, UPLOAD_ERROR, UPLOAD_IN_PROGRESS + UNKNOWN, DOWNLOAD_ERROR, NOT_DOWNLOADED, DOWNLOAD_IN_PROGRESS, DOWNLOADED, ABANDONED, UPLOADED, NOT_UPLOADED, UPLOAD_ERROR, UPLOAD_IN_PROGRESS, CREATING, CREATED } String getInstallPath(); diff --git a/api/src/com/cloud/storage/Volume.java b/api/src/com/cloud/storage/Volume.java index 38ba2d413..4903594f0 100755 --- a/api/src/com/cloud/storage/Volume.java +++ b/api/src/com/cloud/storage/Volume.java @@ -19,11 +19,12 @@ import java.util.Date; import org.apache.cloudstack.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + import com.cloud.template.BasedOn; import com.cloud.utils.fsm.StateMachine2; import com.cloud.utils.fsm.StateObject; -import org.apache.cloudstack.api.Identity; -import org.apache.cloudstack.api.InternalIdentity; public interface Volume extends ControlledEntity, Identity, InternalIdentity, BasedOn, StateObject { enum Type { @@ -38,8 +39,12 @@ enum State { Snapshotting("There is a snapshot created on this volume, not backed up to secondary storage yet"), Resizing("The volume is being resized"), Expunging("The volume is being expunging"), - Destroy("The volume is destroyed, and can't be recovered."), - UploadOp ("The volume upload operation is in progress or in short the volume is on secondary storage"); + Expunged("The volume is being expunging"), + Destroy("The volume is destroyed, and can't be recovered."), + Destroying("The volume is destroying, and can't be recovered."), + UploadOp ("The volume upload operation is in progress or in short the volume is on secondary storage"), + Uploading("volume is uploading"), + Uploaded("volume is uploaded"); String _description; @@ -63,17 +68,20 @@ public String getDescription() { s_fsm.addTransition(Creating, Event.OperationFailed, Allocated); s_fsm.addTransition(Creating, Event.OperationSucceeded, Ready); s_fsm.addTransition(Creating, Event.DestroyRequested, Destroy); - s_fsm.addTransition(Creating, Event.CreateRequested, Creating); + s_fsm.addTransition(Creating, Event.CreateRequested, Creating); s_fsm.addTransition(Ready, Event.ResizeRequested, Resizing); s_fsm.addTransition(Resizing, Event.OperationSucceeded, Ready); s_fsm.addTransition(Resizing, Event.OperationFailed, Ready); s_fsm.addTransition(Allocated, Event.UploadRequested, UploadOp); - s_fsm.addTransition(UploadOp, Event.CopyRequested, Creating);// CopyRequested for volume from sec to primary storage + s_fsm.addTransition(Uploaded, Event.CopyRequested, Creating);// CopyRequested for volume from sec to primary storage s_fsm.addTransition(Creating, Event.CopySucceeded, Ready); - s_fsm.addTransition(Creating, Event.CopyFailed, UploadOp);// Copying volume from sec to primary failed. + s_fsm.addTransition(Creating, Event.CopyFailed, Uploaded);// Copying volume from sec to primary failed. s_fsm.addTransition(UploadOp, Event.DestroyRequested, Destroy); s_fsm.addTransition(Ready, Event.DestroyRequested, Destroy); s_fsm.addTransition(Destroy, Event.ExpungingRequested, Expunging); + s_fsm.addTransition(Expunging, Event.ExpungingRequested, Expunging); + s_fsm.addTransition(Expunging, Event.OperationSucceeded, Expunged); + s_fsm.addTransition(Expunging, Event.OperationFailed, Expunging); s_fsm.addTransition(Ready, Event.SnapshotRequested, Snapshotting); s_fsm.addTransition(Snapshotting, Event.OperationSucceeded, Ready); s_fsm.addTransition(Snapshotting, Event.OperationFailed, Ready); @@ -81,6 +89,9 @@ public String getDescription() { s_fsm.addTransition(Migrating, Event.OperationSucceeded, Ready); s_fsm.addTransition(Migrating, Event.OperationFailed, Ready); s_fsm.addTransition(Destroy, Event.OperationSucceeded, Destroy); + s_fsm.addTransition(UploadOp, Event.OperationSucceeded, Uploaded); + s_fsm.addTransition(UploadOp, Event.OperationFailed, Allocated); + s_fsm.addTransition(Uploaded, Event.DestroyRequested, Destroy); } } @@ -108,7 +119,7 @@ enum Event { /** * @return total size of the partition */ - long getSize(); + Long getSize(); /** * @return the vm instance id @@ -152,4 +163,14 @@ enum Event { public void incrUpdatedCount(); public Date getUpdated(); + + /** + * @return + */ + String getReservationId(); + + /** + * @param reserv + */ + void setReservationId(String reserv); } diff --git a/api/src/com/cloud/storage/VolumeApiService.java b/api/src/com/cloud/storage/VolumeApiService.java new file mode 100644 index 000000000..09a07d4be --- /dev/null +++ b/api/src/com/cloud/storage/VolumeApiService.java @@ -0,0 +1,82 @@ +/* + * 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.storage; + +import org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd; +import org.apache.cloudstack.api.command.user.volume.CreateVolumeCmd; +import org.apache.cloudstack.api.command.user.volume.DetachVolumeCmd; +import org.apache.cloudstack.api.command.user.volume.MigrateVolumeCmd; +import org.apache.cloudstack.api.command.user.volume.ResizeVolumeCmd; +import org.apache.cloudstack.api.command.user.volume.UploadVolumeCmd; + +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.PermissionDeniedException; +import com.cloud.exception.ResourceAllocationException; +import com.cloud.user.Account; + +public interface VolumeApiService { + /** + * Creates the database object for a volume based on the given criteria + * + * @param cmd + * the API command wrapping the criteria (account/domainId [admin only], zone, diskOffering, snapshot, + * name) + * @return the volume object + * @throws PermissionDeniedException + */ + Volume allocVolume(CreateVolumeCmd cmd) throws ResourceAllocationException; + + /** + * Creates the volume based on the given criteria + * + * @param cmd + * the API command wrapping the criteria (account/domainId [admin only], zone, diskOffering, snapshot, + * name) + * @return the volume object + */ + Volume createVolume(CreateVolumeCmd cmd); + + + /** + * Resizes the volume based on the given criteria + * + * @param cmd + * the API command wrapping the criteria + * @return the volume object + * @throws ResourceAllocationException + */ + Volume resizeVolume(ResizeVolumeCmd cmd) throws ResourceAllocationException; + + Volume migrateVolume(MigrateVolumeCmd cmd) throws ConcurrentOperationException; + + /** + * Uploads the volume to secondary storage + * + * @param UploadVolumeCmd cmd + * + * @return Volume object + */ + Volume uploadVolume(UploadVolumeCmd cmd) throws ResourceAllocationException; + + boolean deleteVolume(long volumeId, Account caller) throws ConcurrentOperationException; + + Volume attachVolumeToVM(AttachVolumeCmd command); + + Volume detachVolumeFromVM(DetachVolumeCmd cmmd); +} diff --git a/api/src/com/cloud/storage/snapshot/SnapshotService.java b/api/src/com/cloud/storage/snapshot/SnapshotService.java index 18b850716..b5325f520 100644 --- a/api/src/com/cloud/storage/snapshot/SnapshotService.java +++ b/api/src/com/cloud/storage/snapshot/SnapshotService.java @@ -19,10 +19,11 @@ import java.util.List; import org.apache.cloudstack.api.command.user.snapshot.CreateSnapshotPolicyCmd; -import org.apache.cloudstack.api.command.user.snapshot.ListSnapshotsCmd; import org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotPoliciesCmd; -import com.cloud.api.commands.ListRecurringSnapshotScheduleCmd; import org.apache.cloudstack.api.command.user.snapshot.ListSnapshotPoliciesCmd; +import org.apache.cloudstack.api.command.user.snapshot.ListSnapshotsCmd; + +import com.cloud.api.commands.ListRecurringSnapshotScheduleCmd; import com.cloud.exception.PermissionDeniedException; import com.cloud.exception.ResourceAllocationException; import com.cloud.storage.Snapshot; diff --git a/api/src/com/cloud/template/TemplateService.java b/api/src/com/cloud/template/TemplateService.java index 93e8a2576..7e831fb00 100755 --- a/api/src/com/cloud/template/TemplateService.java +++ b/api/src/com/cloud/template/TemplateService.java @@ -24,13 +24,17 @@ import org.apache.cloudstack.api.command.user.iso.DeleteIsoCmd; import org.apache.cloudstack.api.command.user.iso.ExtractIsoCmd; import org.apache.cloudstack.api.command.user.iso.RegisterIsoCmd; -import org.apache.cloudstack.api.command.user.template.*; import org.apache.cloudstack.api.command.user.template.CopyTemplateCmd; +import org.apache.cloudstack.api.command.user.template.CreateTemplateCmd; +import org.apache.cloudstack.api.command.user.template.DeleteTemplateCmd; import org.apache.cloudstack.api.command.user.template.ExtractTemplateCmd; import org.apache.cloudstack.api.command.user.template.RegisterTemplateCmd; + import com.cloud.exception.InternalErrorException; import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.StorageUnavailableException; +import com.cloud.user.Account; +import com.cloud.utils.exception.CloudRuntimeException; public interface TemplateService { @@ -86,4 +90,11 @@ public interface TemplateService { List listTemplatePermissions(BaseListTemplateOrIsoPermissionsCmd cmd); boolean updateTemplateOrIsoPermissions(BaseUpdateTemplateOrIsoPermissionsCmd cmd); + + VirtualMachineTemplate createPrivateTemplateRecord(CreateTemplateCmd cmd, + Account templateOwner) throws ResourceAllocationException; + + VirtualMachineTemplate createPrivateTemplate(CreateTemplateCmd command) + throws CloudRuntimeException; + } diff --git a/api/src/com/cloud/template/VirtualMachineTemplate.java b/api/src/com/cloud/template/VirtualMachineTemplate.java index 274b7b638..cedc793c1 100755 --- a/api/src/com/cloud/template/VirtualMachineTemplate.java +++ b/api/src/com/cloud/template/VirtualMachineTemplate.java @@ -20,11 +20,12 @@ import java.util.Map; import org.apache.cloudstack.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.storage.Storage.ImageFormat; import com.cloud.storage.Storage.TemplateType; -import org.apache.cloudstack.api.Identity; -import org.apache.cloudstack.api.InternalIdentity; public interface VirtualMachineTemplate extends ControlledEntity, Identity, InternalIdentity { @@ -36,6 +37,7 @@ public enum TemplateFilter { featured, // returns templates that have been marked as featured and public self, // returns templates that have been registered or created by the calling user selfexecutable, // same as self, but only returns templates that are ready to be deployed with + shared, // including templates that have been granted to the calling user by another user sharedexecutable, // ready templates that have been granted to the calling user by another user executable, // templates that are owned by the calling user, or public templates, that can be used to deploy a community, // returns templates that have been marked as public but not featured @@ -89,6 +91,5 @@ public enum TemplateFilter { Long getSourceTemplateId(); String getTemplateTag(); - Map getDetails(); } diff --git a/api/src/com/cloud/user/Account.java b/api/src/com/cloud/user/Account.java index a5b3e8715..5d32fb232 100755 --- a/api/src/com/cloud/user/Account.java +++ b/api/src/com/cloud/user/Account.java @@ -62,5 +62,6 @@ public enum State { public String getNetworkDomain(); public Long getDefaultZoneId(); - + + public String getUuid(); } diff --git a/api/src/com/cloud/user/AccountService.java b/api/src/com/cloud/user/AccountService.java index 9f5f4d225..903eebc5b 100755 --- a/api/src/com/cloud/user/AccountService.java +++ b/api/src/com/cloud/user/AccountService.java @@ -22,16 +22,15 @@ import org.apache.cloudstack.acl.ControlledEntity; import org.apache.cloudstack.acl.RoleType; import org.apache.cloudstack.acl.SecurityChecker.AccessType; - +import org.apache.cloudstack.api.command.admin.account.UpdateAccountCmd; import org.apache.cloudstack.api.command.admin.user.DeleteUserCmd; import org.apache.cloudstack.api.command.admin.user.RegisterCmd; import org.apache.cloudstack.api.command.admin.user.UpdateUserCmd; -import org.apache.cloudstack.api.command.admin.account.UpdateAccountCmd; + +import org.apache.cloudstack.api.command.admin.user.RegisterCmd; import com.cloud.domain.Domain; -import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.PermissionDeniedException; -import com.cloud.exception.ResourceUnavailableException; import com.cloud.utils.Pair; public interface AccountService { @@ -63,35 +62,7 @@ public interface AccountService { * @return the user if created successfully, null otherwise */ UserAccount createUserAccount(String userName, String password, String firstName, String lastName, String email, String timezone, String accountName, short accountType, Long domainId, String networkDomain, - Map details); - - /** - * Deletes a user by userId - * - * @param accountId - * - id of the account do delete - * - * @return true if delete was successful, false otherwise - */ - boolean deleteUserAccount(long accountId); - - /** - * Disables a user by userId - * - * @param userId - * - the userId - * @return UserAccount object - */ - UserAccount disableUser(long userId); - - /** - * Enables a user - * - * @param userId - * - the userId - * @return UserAccount object - */ - UserAccount enableUser(long userId); + Map details, String accountUUID, String userUUID); /** * Locks a user by userId. A locked user cannot access the API, but will still have running VMs/IP addresses @@ -102,71 +73,11 @@ UserAccount createUserAccount(String userName, String password, String firstName */ UserAccount lockUser(long userId); - /** - * Update a user by userId - * - * @param userId - * @return UserAccount object - */ - UserAccount updateUser(UpdateUserCmd cmd); - - /** - * Disables an account by accountName and domainId - * - * @param accountName - * TODO - * @param domainId - * TODO - * @param accountId - * @param disabled - * account if success - * @return true if disable was successful, false otherwise - */ - Account disableAccount(String accountName, Long domainId, Long accountId) throws ConcurrentOperationException, ResourceUnavailableException; - - /** - * Enables an account by accountId - * - * @param accountName - * - the enableAccount command defining the accountId to be deleted. - * @param domainId - * TODO - * @param accountId - * @return account object - */ - Account enableAccount(String accountName, Long domainId, Long accountId); - - /** - * Locks an account by accountId. A locked account cannot access the API, but will still have running VMs/IP - * addresses - * allocated/etc. - * - * @param accountName - * - the LockAccount command defining the accountId to be locked. - * @param domainId - * TODO - * @param accountId - * @return account object - */ - Account lockAccount(String accountName, Long domainId, Long accountId); - - /** - * Updates an account name - * - * @param cmd - * - the parameter containing accountId - * @return updated account object - */ - - Account updateAccount(UpdateAccountCmd cmd); - Account getSystemAccount(); User getSystemUser(); - User createUser(String userName, String password, String firstName, String lastName, String email, String timeZone, String accountName, Long domainId); - - boolean deleteUser(DeleteUserCmd deleteUserCmd); + User createUser(String userName, String password, String firstName, String lastName, String email, String timeZone, String accountName, Long domainId, String userUUID); boolean isAdmin(short accountType); diff --git a/api/src/com/cloud/user/DomainService.java b/api/src/com/cloud/user/DomainService.java index cd20060b7..7c302e377 100644 --- a/api/src/com/cloud/user/DomainService.java +++ b/api/src/com/cloud/user/DomainService.java @@ -20,13 +20,14 @@ import org.apache.cloudstack.api.command.admin.domain.ListDomainChildrenCmd; import org.apache.cloudstack.api.command.admin.domain.ListDomainsCmd; + import com.cloud.domain.Domain; import com.cloud.exception.PermissionDeniedException; import com.cloud.utils.Pair; public interface DomainService { - Domain createDomain(String name, Long parentId, String networkDomain); + Domain createDomain(String name, Long parentId, String networkDomain, String domainUUID); Domain getDomain(long id); @@ -40,12 +41,19 @@ public interface DomainService { */ boolean isChildDomain(Long parentId, Long childId); - boolean deleteDomain(long domainId, Boolean cleanup); - Pair, Integer> searchForDomains(ListDomainsCmd cmd) throws PermissionDeniedException; Pair, Integer> searchForDomainChildren(ListDomainChildrenCmd cmd) throws PermissionDeniedException; + /** + * find the domain by its path + * + * @param domainPath + * the path to use to lookup a domain + * @return domainVO the domain with the matching path, or null if no domain with the given path exists + */ + Domain findDomainByPath(String domainPath); + } diff --git a/api/src/com/cloud/user/User.java b/api/src/com/cloud/user/User.java index 36a7c6543..3742c7bf3 100644 --- a/api/src/com/cloud/user/User.java +++ b/api/src/com/cloud/user/User.java @@ -16,10 +16,10 @@ // under the License. package com.cloud.user; -import org.apache.cloudstack.api.InternalIdentity; - import java.util.Date; +import org.apache.cloudstack.api.InternalIdentity; + public interface User extends OwnedBy, InternalIdentity { public static final long UID_SYSTEM = 1; diff --git a/api/src/com/cloud/user/UserAccount.java b/api/src/com/cloud/user/UserAccount.java index c09b5c0fa..0cb0f697a 100644 --- a/api/src/com/cloud/user/UserAccount.java +++ b/api/src/com/cloud/user/UserAccount.java @@ -16,10 +16,10 @@ // under the License. package com.cloud.user; -import org.apache.cloudstack.api.InternalIdentity; - import java.util.Date; +import org.apache.cloudstack.api.InternalIdentity; + public interface UserAccount extends InternalIdentity { long getId(); diff --git a/api/src/com/cloud/user/UserContext.java b/api/src/com/cloud/user/UserContext.java index 539e11812..bcb33b5ed 100644 --- a/api/src/com/cloud/user/UserContext.java +++ b/api/src/com/cloud/user/UserContext.java @@ -16,14 +16,11 @@ // under the License. package com.cloud.user; -import com.cloud.server.ManagementService; -import com.cloud.utils.component.ComponentLocator; +import com.cloud.utils.component.ComponentContext; +import javax.inject.Inject; public class UserContext { - private static ThreadLocal s_currentContext = new ThreadLocal(); - private static final ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - private static final AccountService _accountMgr = locator.getManager(AccountService.class); private long userId; private String sessionId; @@ -31,10 +28,9 @@ public class UserContext { private long startEventId = 0; private long accountId; private String eventDetails; - private boolean apiServer; - private static UserContext s_adminContext = new UserContext(_accountMgr.getSystemUser().getId(), _accountMgr.getSystemAccount(), null, false); + @Inject private AccountService _accountMgr = null; public UserContext() { } @@ -51,6 +47,9 @@ public long getCallerUserId() { } public User getCallerUser() { + if (_accountMgr == null) { + _accountMgr = ComponentContext.getComponent(AccountService.class); + } return _accountMgr.getActiveUser(userId); } @@ -90,10 +89,10 @@ public static UserContext current() { // however, there are many places that run background jobs assume the system context. // // If there is a security concern, all entry points from user (including the front end that takes HTTP -// request in and + // request in and // the core async-job manager that runs commands from user) have explicitly setup the UserContext. // - return s_adminContext; + return UserContextInitializer.getInstance().getAdminContext(); } return context; } diff --git a/api/src/com/cloud/user/UserContextInitializer.java b/api/src/com/cloud/user/UserContextInitializer.java new file mode 100644 index 000000000..a54596373 --- /dev/null +++ b/api/src/com/cloud/user/UserContextInitializer.java @@ -0,0 +1,40 @@ +// 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.user; + +import javax.inject.Inject; + +import org.springframework.stereotype.Component; + +@Component +public class UserContextInitializer { + @Inject private AccountService _accountMgr; + + private static UserContextInitializer s_instance; + + public UserContextInitializer() { + s_instance = this; + } + + public static UserContextInitializer getInstance() { + return s_instance; + } + + public UserContext getAdminContext() { + return new UserContext(_accountMgr.getSystemUser().getId(), _accountMgr.getSystemAccount(), null, false); + } +} diff --git a/api/src/com/cloud/uservm/UserVm.java b/api/src/com/cloud/uservm/UserVm.java index a587666bc..b1d1712d9 100755 --- a/api/src/com/cloud/uservm/UserVm.java +++ b/api/src/com/cloud/uservm/UserVm.java @@ -17,6 +17,7 @@ package com.cloud.uservm; import org.apache.cloudstack.acl.ControlledEntity; + import com.cloud.vm.VirtualMachine; /** diff --git a/api/src/com/cloud/vm/DiskProfile.java b/api/src/com/cloud/vm/DiskProfile.java index bb74d8483..e3a3386d1 100644 --- a/api/src/com/cloud/vm/DiskProfile.java +++ b/api/src/com/cloud/vm/DiskProfile.java @@ -34,6 +34,7 @@ public class DiskProfile { private long diskOfferingId; private Long templateId; private long volumeId; + private String path; private HypervisorType hyperType; @@ -56,6 +57,10 @@ public DiskProfile(Volume vol, DiskOffering offering, HypervisorType hyperType) this(vol.getId(), vol.getVolumeType(), vol.getName(), offering.getId(), vol.getSize(), offering.getTagsArray(), offering.getUseLocalStorage(), offering.isCustomized(), null); this.hyperType = hyperType; } + + public DiskProfile(DiskProfile dp) { + + } /** * @return size of the disk requested in bytes. @@ -134,7 +139,19 @@ public void setHyperType(HypervisorType hyperType) { this.hyperType = hyperType; } - public HypervisorType getHypersorType() { + public HypervisorType getHypervisorType() { return this.hyperType; } + + public void setPath(String path) { + this.path = path; + } + + public String getPath() { + return this.path; + } + + public void setSize(long size) { + this.size = size; + } } diff --git a/api/src/com/cloud/vm/Nic.java b/api/src/com/cloud/vm/Nic.java index aeae2aed1..b2f697624 100644 --- a/api/src/com/cloud/vm/Nic.java +++ b/api/src/com/cloud/vm/Nic.java @@ -21,12 +21,13 @@ import java.util.List; import java.util.Set; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + import com.cloud.network.Networks.AddressFormat; import com.cloud.network.Networks.Mode; import com.cloud.utils.fsm.FiniteState; import com.cloud.utils.fsm.StateMachine; -import org.apache.cloudstack.api.Identity; -import org.apache.cloudstack.api.InternalIdentity; /** * Nic represents one nic on the VM. @@ -150,4 +151,5 @@ public enum ReservationStrategy { String getIp6Cidr(); String getIp6Address(); + boolean getSecondaryIp(); } diff --git a/api/src/com/cloud/vm/NicProfile.java b/api/src/com/cloud/vm/NicProfile.java index 9a5e781ff..5970ccd24 100644 --- a/api/src/com/cloud/vm/NicProfile.java +++ b/api/src/com/cloud/vm/NicProfile.java @@ -18,13 +18,14 @@ import java.net.URI; +import org.apache.cloudstack.api.InternalIdentity; + import com.cloud.network.Network; import com.cloud.network.Networks.AddressFormat; import com.cloud.network.Networks.BroadcastDomainType; import com.cloud.network.Networks.Mode; import com.cloud.network.Networks.TrafficType; import com.cloud.vm.Nic.ReservationStrategy; -import org.apache.cloudstack.api.InternalIdentity; public class NicProfile implements InternalIdentity { long id; @@ -49,6 +50,8 @@ public class NicProfile implements InternalIdentity { Integer deviceId; String dns1; String dns2; + String ip6Dns1; + String ip6Dns2; Integer networkRate; boolean isSecurityGroupEnabled; String name; @@ -331,4 +334,20 @@ public void setRequestedIpv6(String requestedIpv6) { this.requestedIpv6 = requestedIpv6; } + public String getIp6Dns1() { + return ip6Dns1; + } + + public void setIp6Dns1(String ip6Dns1) { + this.ip6Dns1 = ip6Dns1; + } + + public String getIp6Dns2() { + return ip6Dns2; + } + + public void setIp6Dns2(String ip6Dns2) { + this.ip6Dns2 = ip6Dns2; + } + } diff --git a/api/src/com/cloud/vm/NicSecondaryIp.java b/api/src/com/cloud/vm/NicSecondaryIp.java new file mode 100644 index 000000000..655d172b3 --- /dev/null +++ b/api/src/com/cloud/vm/NicSecondaryIp.java @@ -0,0 +1,36 @@ +// 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.vm; + +import org.apache.cloudstack.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + + +/** + * Nic represents one nic on the VM. + */ +public interface NicSecondaryIp extends ControlledEntity, Identity, InternalIdentity { + /** + * @return id in the CloudStack database + */ + long getId(); + long getNicId(); + String getIp4Address(); + long getNetworkId(); + long getVmId(); +} diff --git a/api/src/com/cloud/vm/UserVmService.java b/api/src/com/cloud/vm/UserVmService.java index 9e7f77788..d963b74b0 100755 --- a/api/src/com/cloud/vm/UserVmService.java +++ b/api/src/com/cloud/vm/UserVmService.java @@ -22,21 +22,10 @@ import javax.naming.InsufficientResourcesException; import org.apache.cloudstack.api.command.admin.vm.AssignVMCmd; -import org.apache.cloudstack.api.command.user.template.CreateTemplateCmd; +import org.apache.cloudstack.api.command.admin.vm.RecoverVMCmd; import org.apache.cloudstack.api.command.user.vm.*; -import org.apache.cloudstack.api.command.user.volume.AttachVolumeCmd; import org.apache.cloudstack.api.command.user.vmgroup.CreateVMGroupCmd; import org.apache.cloudstack.api.command.user.vmgroup.DeleteVMGroupCmd; -import org.apache.cloudstack.api.command.user.vm.DeployVMCmd; -import org.apache.cloudstack.api.command.user.vm.DestroyVMCmd; -import org.apache.cloudstack.api.command.user.volume.DetachVolumeCmd; -import org.apache.cloudstack.api.command.user.vm.RebootVMCmd; -import org.apache.cloudstack.api.command.admin.vm.RecoverVMCmd; -import org.apache.cloudstack.api.command.user.vm.ResetVMPasswordCmd; -import org.apache.cloudstack.api.command.user.vm.ResetVMSSHKeyCmd; -import org.apache.cloudstack.api.command.user.vm.RestoreVMCmd; -import org.apache.cloudstack.api.command.user.vm.UpgradeVMCmd; - import com.cloud.dc.DataCenter; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; @@ -50,7 +39,6 @@ import com.cloud.network.Network.IpAddresses; import com.cloud.offering.ServiceOffering; import com.cloud.storage.StoragePool; -import com.cloud.storage.Volume; import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.Account; import com.cloud.uservm.UserVm; @@ -99,24 +87,6 @@ public interface UserVmService { */ UserVm resetVMSSHKey(ResetVMSSHKeyCmd cmd) throws ResourceUnavailableException, InsufficientCapacityException; - /** - * Attaches the specified volume to the specified VM - * - * @param cmd - * - the command specifying volumeId and vmId - * @return the Volume object if attach worked successfully. - */ - Volume attachVolumeToVM(AttachVolumeCmd cmd); - - /** - * Detaches the specified volume from the VM it is currently attached to. - * - * @param cmd - * - the command specifying volumeId - * @return the Volume object if detach worked successfully. - */ - Volume detachVolumeFromVM(DetachVolumeCmd cmmd); - UserVm startVirtualMachine(StartVMCmd cmd) throws StorageUnavailableException, ExecutionException, ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException, ResourceAllocationException; @@ -130,14 +100,14 @@ UserVm startVirtualMachine(StartVMCmd cmd) throws StorageUnavailableException, E * @return the vm object if successful, null otherwise */ UserVm addNicToVirtualMachine(AddNicToVMCmd cmd); - + /** * Removes a NIC on the given network from the virtual machine * @param cmd the command object that defines the vm and the given network * @return the vm object if successful, null otherwise */ UserVm removeNicFromVirtualMachine(RemoveNicFromVMCmd cmd); - + /** * Updates default Nic to the given network for given virtual machine * @param cmd the command object that defines the vm and the given network @@ -147,31 +117,10 @@ UserVm startVirtualMachine(StartVMCmd cmd) throws StorageUnavailableException, E UserVm recoverVirtualMachine(RecoverVMCmd cmd) throws ResourceAllocationException; - /** - * Create a template database record in preparation for creating a private template. - * - * @param cmd - * the command object that defines the name, display text, snapshot/volume, bits, public/private, etc. - * for the - * private template - * @param templateOwner - * TODO - * @return the vm template object if successful, null otherwise - * @throws ResourceAllocationException - */ - VirtualMachineTemplate createPrivateTemplateRecord(CreateTemplateCmd cmd, Account templateOwner) throws ResourceAllocationException; - - /** - * Creates a private template from a snapshot of a VM - * - * @param cmd - * - the command specifying snapshotId, name, description - * @return a template if successfully created, null otherwise - */ - VirtualMachineTemplate createPrivateTemplate(CreateTemplateCmd cmd); /** - * Creates a Basic Zone User VM in the database and returns the VM to the caller. + * Creates a Basic Zone User VM in the database and returns the VM to the + * caller. * * @param zone * - availability zone for the virtual machine @@ -180,61 +129,69 @@ UserVm startVirtualMachine(StartVMCmd cmd) throws StorageUnavailableException, E * @param template * - the template for the virtual machine * @param securityGroupIdList - * - comma separated list of security groups id that going to be applied to the virtual machine + * - comma separated list of security groups id that going to be + * applied to the virtual machine * @param hostName * - host name for the virtual machine * @param displayName * - an optional user generated name for the virtual machine * @param diskOfferingId - * - the ID of the disk offering for the virtual machine. If the template is of ISO format, the - * diskOfferingId is - * for the root disk volume. Otherwise this parameter is used to indicate the offering for the data disk - * volume. - * If the templateId parameter passed is from a Template object, the diskOfferingId refers to a DATA Disk - * Volume - * created. If the templateId parameter passed is from an ISO object, the diskOfferingId refers to a ROOT - * Disk - * Volume created + * - the ID of the disk offering for the virtual machine. If the + * template is of ISO format, the diskOfferingId is for the root + * disk volume. Otherwise this parameter is used to indicate the + * offering for the data disk volume. If the templateId parameter + * passed is from a Template object, the diskOfferingId refers to + * a DATA Disk Volume created. If the templateId parameter passed + * is from an ISO object, the diskOfferingId refers to a ROOT + * Disk Volume created * @param diskSize - * - the arbitrary size for the DATADISK volume. Mutually exclusive with diskOfferingId + * - the arbitrary size for the DATADISK volume. Mutually + * exclusive with diskOfferingId * @param group * - an optional group for the virtual machine * @param hypervisor * - the hypervisor on which to deploy the virtual machine * @param userData - * - an optional binary data that can be sent to the virtual machine upon a successful deployment. This - * binary - * data must be base64 encoded before adding it to the request. Currently only HTTP GET is supported. - * Using HTTP - * GET (via querystring), you can send up to 2KB of data after base64 encoding + * - an optional binary data that can be sent to the virtual + * machine upon a successful deployment. This binary data must be + * base64 encoded before adding it to the request. Currently only + * HTTP GET is supported. Using HTTP GET (via querystring), you + * can send up to 2KB of data after base64 encoding * @param sshKeyPair - * - name of the ssh key pair used to login to the virtual machine + * - name of the ssh key pair used to login to the virtual + * machine * @param requestedIps * TODO * @param defaultIp * TODO + * @param affinityGroupIdList * @param accountName - * - an optional account for the virtual machine. Must be used with domainId + * - an optional account for the virtual machine. Must be used + * with domainId * @param domainId - * - an optional domainId for the virtual machine. If the account parameter is used, domainId must also - * be used + * - an optional domainId for the virtual machine. If the account + * parameter is used, domainId must also be used * @return UserVm object if successful. * * @throws InsufficientCapacityException * if there is insufficient capacity to deploy the VM. * @throws ConcurrentOperationException - * if there are multiple users working on the same VM or in the same environment. + * if there are multiple users working on the same VM or in the + * same environment. * @throws ResourceUnavailableException - * if the resources required to deploy the VM is not currently available. + * if the resources required to deploy the VM is not currently + * available. * @throws InsufficientResourcesException */ UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List securityGroupIdList, Account owner, String hostName, - String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map requestedIps, IpAddresses defaultIp, String keyboard) + String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, + String userData, String sshKeyPair, Map requestedIps, IpAddresses defaultIp, + String keyboard, List affinityGroupIdList) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException; /** - * Creates a User VM in Advanced Zone (Security Group feature is enabled) in the database and returns the VM to the - * caller. + * Creates a User VM in Advanced Zone (Security Group feature is enabled) in + * the database and returns the VM to the caller. * * @param zone * - availability zone for the virtual machine @@ -245,63 +202,69 @@ UserVm createBasicSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering s * @param networkIdList * - list of network ids used by virtual machine * @param securityGroupIdList - * - comma separated list of security groups id that going to be applied to the virtual machine + * - comma separated list of security groups id that going to be + * applied to the virtual machine * @param hostName * - host name for the virtual machine * @param displayName * - an optional user generated name for the virtual machine * @param diskOfferingId - * - the ID of the disk offering for the virtual machine. If the template is of ISO format, the - * diskOfferingId is - * for the root disk volume. Otherwise this parameter is used to indicate the offering for the data disk - * volume. - * If the templateId parameter passed is from a Template object, the diskOfferingId refers to a DATA Disk - * Volume - * created. If the templateId parameter passed is from an ISO object, the diskOfferingId refers to a ROOT - * Disk - * Volume created + * - the ID of the disk offering for the virtual machine. If the + * template is of ISO format, the diskOfferingId is for the root + * disk volume. Otherwise this parameter is used to indicate the + * offering for the data disk volume. If the templateId parameter + * passed is from a Template object, the diskOfferingId refers to + * a DATA Disk Volume created. If the templateId parameter passed + * is from an ISO object, the diskOfferingId refers to a ROOT + * Disk Volume created * @param diskSize - * - the arbitrary size for the DATADISK volume. Mutually exclusive with diskOfferingId + * - the arbitrary size for the DATADISK volume. Mutually + * exclusive with diskOfferingId * @param group * - an optional group for the virtual machine * @param hypervisor * - the hypervisor on which to deploy the virtual machine * @param userData - * - an optional binary data that can be sent to the virtual machine upon a successful deployment. This - * binary - * data must be base64 encoded before adding it to the request. Currently only HTTP GET is supported. - * Using HTTP - * GET (via querystring), you can send up to 2KB of data after base64 encoding + * - an optional binary data that can be sent to the virtual + * machine upon a successful deployment. This binary data must be + * base64 encoded before adding it to the request. Currently only + * HTTP GET is supported. Using HTTP GET (via querystring), you + * can send up to 2KB of data after base64 encoding * @param sshKeyPair - * - name of the ssh key pair used to login to the virtual machine + * - name of the ssh key pair used to login to the virtual + * machine * @param requestedIps * TODO * @param defaultIps * TODO + * @param affinityGroupIdList * @param accountName - * - an optional account for the virtual machine. Must be used with domainId + * - an optional account for the virtual machine. Must be used + * with domainId * @param domainId - * - an optional domainId for the virtual machine. If the account parameter is used, domainId must also - * be used + * - an optional domainId for the virtual machine. If the account + * parameter is used, domainId must also be used * @return UserVm object if successful. * * @throws InsufficientCapacityException * if there is insufficient capacity to deploy the VM. * @throws ConcurrentOperationException - * if there are multiple users working on the same VM or in the same environment. + * if there are multiple users working on the same VM or in the + * same environment. * @throws ResourceUnavailableException - * if the resources required to deploy the VM is not currently available. + * if the resources required to deploy the VM is not currently + * available. * @throws InsufficientResourcesException */ UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List networkIdList, List securityGroupIdList, Account owner, String hostName, String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map requestedIps, - IpAddresses defaultIps, String keyboard) + IpAddresses defaultIps, String keyboard, List affinityGroupIdList) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException; /** - * Creates a User VM in Advanced Zone (Security Group feature is disabled) in the database and returns the VM to the - * caller. - * + * Creates a User VM in Advanced Zone (Security Group feature is disabled) + * in the database and returns the VM to the caller. + * * @param zone * - availability zone for the virtual machine * @param serviceOffering @@ -315,49 +278,57 @@ UserVm createAdvancedSecurityGroupVirtualMachine(DataCenter zone, ServiceOfferin * @param displayName * - an optional user generated name for the virtual machine * @param diskOfferingId - * - the ID of the disk offering for the virtual machine. If the template is of ISO format, the - * diskOfferingId is - * for the root disk volume. Otherwise this parameter is used to indicate the offering for the data disk - * volume. - * If the templateId parameter passed is from a Template object, the diskOfferingId refers to a DATA Disk - * Volume - * created. If the templateId parameter passed is from an ISO object, the diskOfferingId refers to a ROOT - * Disk - * Volume created + * - the ID of the disk offering for the virtual machine. If the + * template is of ISO format, the diskOfferingId is for the root + * disk volume. Otherwise this parameter is used to indicate the + * offering for the data disk volume. If the templateId parameter + * passed is from a Template object, the diskOfferingId refers to + * a DATA Disk Volume created. If the templateId parameter passed + * is from an ISO object, the diskOfferingId refers to a ROOT + * Disk Volume created * @param diskSize - * - the arbitrary size for the DATADISK volume. Mutually exclusive with diskOfferingId + * - the arbitrary size for the DATADISK volume. Mutually + * exclusive with diskOfferingId * @param group * - an optional group for the virtual machine * @param hypervisor * - the hypervisor on which to deploy the virtual machine * @param userData - * - an optional binary data that can be sent to the virtual machine upon a successful deployment. This - * binary - * data must be base64 encoded before adding it to the request. Currently only HTTP GET is supported. - * Using HTTP - * GET (via querystring), you can send up to 2KB of data after base64 encoding + * - an optional binary data that can be sent to the virtual + * machine upon a successful deployment. This binary data must be + * base64 encoded before adding it to the request. Currently only + * HTTP GET is supported. Using HTTP GET (via querystring), you + * can send up to 2KB of data after base64 encoding * @param sshKeyPair - * - name of the ssh key pair used to login to the virtual machine + * - name of the ssh key pair used to login to the virtual + * machine * @param requestedIps * TODO - * @param defaultIps TODO + * @param defaultIps + * TODO + * @param affinityGroupIdList * @param accountName - * - an optional account for the virtual machine. Must be used with domainId + * - an optional account for the virtual machine. Must be used + * with domainId * @param domainId - * - an optional domainId for the virtual machine. If the account parameter is used, domainId must also - * be used + * - an optional domainId for the virtual machine. If the account + * parameter is used, domainId must also be used * @return UserVm object if successful. - * + * * @throws InsufficientCapacityException * if there is insufficient capacity to deploy the VM. * @throws ConcurrentOperationException - * if there are multiple users working on the same VM or in the same environment. + * if there are multiple users working on the same VM or in the + * same environment. * @throws ResourceUnavailableException - * if the resources required to deploy the VM is not currently available. + * if the resources required to deploy the VM is not currently + * available. * @throws InsufficientResourcesException */ UserVm createAdvancedVirtualMachine(DataCenter zone, ServiceOffering serviceOffering, VirtualMachineTemplate template, List networkIdList, Account owner, String hostName, - String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, String userData, String sshKeyPair, Map requestedIps, IpAddresses defaultIps, String keyboard) + String displayName, Long diskOfferingId, Long diskSize, String group, HypervisorType hypervisor, + String userData, String sshKeyPair, Map requestedIps, IpAddresses defaultIps, + String keyboard, List affinityGroupIdList) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException, StorageUnavailableException, ResourceAllocationException; /** @@ -393,8 +364,9 @@ UserVm createAdvancedVirtualMachine(DataCenter zone, ServiceOffering serviceOffe * @param cmd * - the command specifying vmId and new serviceOfferingId * @return the vm + * @throws ResourceAllocationException */ - UserVm upgradeVirtualMachine(UpgradeVMCmd cmd); + UserVm upgradeVirtualMachine(UpgradeVMCmd cmd) throws ResourceAllocationException; UserVm stopVirtualMachine(long vmId, boolean forced) throws ConcurrentOperationException; @@ -438,4 +410,7 @@ UserVm createVirtualMachine(DeployVMCmd cmd) throws InsufficientCapacityExceptio VirtualMachine vmStorageMigration(Long vmId, StoragePool destPool); UserVm restoreVM(RestoreVMCmd cmd); + + UserVm upgradeVirtualMachine(ScaleVMCmd scaleVMCmd) throws ResourceUnavailableException, ConcurrentOperationException, ManagementServerException, VirtualMachineMigrationException; + } diff --git a/api/src/com/cloud/vm/VirtualMachine.java b/api/src/com/cloud/vm/VirtualMachine.java index cd3057954..8f807d450 100755 --- a/api/src/com/cloud/vm/VirtualMachine.java +++ b/api/src/com/cloud/vm/VirtualMachine.java @@ -21,14 +21,15 @@ import org.apache.cloudstack.acl.ControlledEntity; import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.utils.fsm.StateMachine2; import com.cloud.utils.fsm.StateObject; -import org.apache.cloudstack.api.InternalIdentity; /** * VirtualMachine describes the properties held by a virtual machine - * + * */ public interface VirtualMachine extends RunningOn, ControlledEntity, Identity, InternalIdentity, StateObject { @@ -111,7 +112,7 @@ public static StateMachine2 getStat s_fsm.addTransition(State.Error, VirtualMachine.Event.DestroyRequested, State.Expunging); s_fsm.addTransition(State.Error, VirtualMachine.Event.ExpungeOperation, State.Expunging); } - + public static boolean isVmStarted(State oldState, Event e, State newState) { if (oldState == State.Starting && newState == State.Running) { return true; @@ -173,7 +174,9 @@ public enum Event { OperationFailedToError, OperationRetry, AgentReportShutdowned, - AgentReportMigrated + AgentReportMigrated, + RevertRequested, + SnapshotRequested, }; public enum Type { @@ -239,9 +242,11 @@ public static boolean isSystemVM(VirtualMachine.Type vmtype) { */ public long getTemplateId(); + + /** * returns the guest OS ID - * + * * @return guestOSId */ public long getGuestOSId(); @@ -254,7 +259,7 @@ public static boolean isSystemVM(VirtualMachine.Type vmtype) { /** * @return data center id. */ - public long getDataCenterIdToDeployIn(); + public long getDataCenterId(); /** * @return id of the host it was assigned last time. @@ -280,6 +285,8 @@ public static boolean isSystemVM(VirtualMachine.Type vmtype) { public Date getCreated(); public long getServiceOfferingId(); + + public Long getDiskOfferingId(); Type getType(); @@ -287,5 +294,4 @@ public static boolean isSystemVM(VirtualMachine.Type vmtype) { public Map getDetails(); - boolean canPlugNics(); } diff --git a/api/src/com/cloud/vm/VirtualMachineProfile.java b/api/src/com/cloud/vm/VirtualMachineProfile.java index 0fab44368..33a9171e7 100644 --- a/api/src/com/cloud/vm/VirtualMachineProfile.java +++ b/api/src/com/cloud/vm/VirtualMachineProfile.java @@ -136,4 +136,10 @@ public String getName() { BootloaderType getBootLoaderType(); Map getParameters(); + + Float getCpuOvercommitRatio(); + + Float getMemoryOvercommitRatio(); + + } diff --git a/api/src/com/cloud/vm/snapshot/VMSnapshot.java b/api/src/com/cloud/vm/snapshot/VMSnapshot.java new file mode 100644 index 000000000..f0ee7ee7e --- /dev/null +++ b/api/src/com/cloud/vm/snapshot/VMSnapshot.java @@ -0,0 +1,110 @@ +// 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.vm.snapshot; + +import java.util.Date; + +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + +import org.apache.cloudstack.acl.ControlledEntity; +import com.cloud.utils.fsm.StateMachine2; +import com.cloud.utils.fsm.StateObject; + +public interface VMSnapshot extends ControlledEntity, Identity, InternalIdentity,StateObject { + + enum State { + Allocated("The VM snapshot is allocated but has not been created yet."), + Creating("The VM snapshot is being created."), + Ready("The VM snapshot is ready to be used."), + Reverting("The VM snapshot is being used to revert"), + Expunging("The volume is being expunging"), + Removed("The volume is destroyed, and can't be recovered."), + Error ("The volume is in error state, and can't be recovered"); + + String _description; + + private State(String description) { + _description = description; + } + + public static StateMachine2 getStateMachine() { + return s_fsm; + } + + public String getDescription() { + return _description; + } + + private final static StateMachine2 s_fsm = new StateMachine2(); + static { + s_fsm.addTransition(Allocated, Event.CreateRequested, Creating); + s_fsm.addTransition(Creating, Event.OperationSucceeded, Ready); + s_fsm.addTransition(Creating, Event.OperationFailed, Error); + s_fsm.addTransition(Ready, Event.RevertRequested, Reverting); + s_fsm.addTransition(Reverting, Event.OperationSucceeded, Ready); + s_fsm.addTransition(Reverting, Event.OperationFailed, Ready); + s_fsm.addTransition(Ready, Event.ExpungeRequested, Expunging); + s_fsm.addTransition(Error, Event.ExpungeRequested, Expunging); + s_fsm.addTransition(Expunging, Event.ExpungeRequested, Expunging); + s_fsm.addTransition(Expunging, Event.OperationSucceeded, Removed); + } + } + + enum Type{ + Disk, DiskAndMemory + } + + enum Event { + CreateRequested, + OperationFailed, + OperationSucceeded, + RevertRequested, + ExpungeRequested, + } + + long getId(); + + public String getName(); + + public Long getVmId(); + + public State getState(); + + public Date getCreated(); + + public String getDescription(); + + public String getDisplayName(); + + public Long getParent(); + + public Boolean getCurrent(); + + public Type getType(); + + public long getUpdatedCount(); + + public void incrUpdatedCount(); + + public Date getUpdated(); + + public Date getRemoved(); + + public long getAccountId(); +} diff --git a/api/src/com/cloud/vm/snapshot/VMSnapshotService.java b/api/src/com/cloud/vm/snapshot/VMSnapshotService.java new file mode 100644 index 000000000..83f86bc90 --- /dev/null +++ b/api/src/com/cloud/vm/snapshot/VMSnapshotService.java @@ -0,0 +1,48 @@ +// 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.vm.snapshot; + +import java.util.List; + +import org.apache.cloudstack.api.command.user.vmsnapshot.ListVMSnapshotCmd; + +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.InsufficientServerCapacityException; +import com.cloud.exception.ResourceAllocationException; +import com.cloud.exception.ResourceUnavailableException; +import com.cloud.uservm.UserVm; +import com.cloud.vm.VirtualMachine; + +public interface VMSnapshotService { + + List listVMSnapshots(ListVMSnapshotCmd cmd); + + VMSnapshot getVMSnapshotById(Long id); + + VMSnapshot creatVMSnapshot(Long vmId, Long vmSnapshotId); + + VMSnapshot allocVMSnapshot(Long vmId, String vsDisplayName, String vsDescription, Boolean snapshotMemory) + throws ResourceAllocationException; + + boolean deleteVMSnapshot(Long vmSnapshotId); + + UserVm revertToSnapshot(Long vmSnapshotId) throws InsufficientServerCapacityException, InsufficientCapacityException, ResourceUnavailableException, ConcurrentOperationException; + + VirtualMachine getVMBySnapshotId(Long id); +} diff --git a/api/src/org/apache/cloudstack/acl/APIChecker.java b/api/src/org/apache/cloudstack/acl/APIChecker.java index 2e2b73ba7..0d0dfd1be 100644 --- a/api/src/org/apache/cloudstack/acl/APIChecker.java +++ b/api/src/org/apache/cloudstack/acl/APIChecker.java @@ -17,7 +17,6 @@ package org.apache.cloudstack.acl; import com.cloud.exception.PermissionDeniedException; -import com.cloud.exception.RequestLimitException; import com.cloud.user.User; import com.cloud.utils.component.Adapter; @@ -27,5 +26,5 @@ public interface APIChecker extends Adapter { // If true, apiChecker has checked the operation // If false, apiChecker is unable to handle the operation or not implemented // On exception, checkAccess failed don't allow - boolean checkAccess(User user, String apiCommandName) throws PermissionDeniedException, RequestLimitException; + boolean checkAccess(User user, String apiCommandName) throws PermissionDeniedException; } diff --git a/api/src/org/apache/cloudstack/affinity/AffinityGroup.java b/api/src/org/apache/cloudstack/affinity/AffinityGroup.java new file mode 100644 index 000000000..ac2eb6133 --- /dev/null +++ b/api/src/org/apache/cloudstack/affinity/AffinityGroup.java @@ -0,0 +1,31 @@ +// 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 org.apache.cloudstack.affinity; + +import org.apache.cloudstack.acl.ControlledEntity; +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + +public interface AffinityGroup extends ControlledEntity, InternalIdentity, Identity { + + String getName(); + + String getDescription(); + + String getType(); + +} diff --git a/api/src/org/apache/cloudstack/affinity/AffinityGroupProcessor.java b/api/src/org/apache/cloudstack/affinity/AffinityGroupProcessor.java new file mode 100644 index 000000000..60b8e4c55 --- /dev/null +++ b/api/src/org/apache/cloudstack/affinity/AffinityGroupProcessor.java @@ -0,0 +1,49 @@ +// 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 org.apache.cloudstack.affinity; + +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; +import com.cloud.exception.AffinityConflictException; +import com.cloud.utils.component.Adapter; +import com.cloud.vm.VirtualMachine; +import com.cloud.vm.VirtualMachineProfile; + +public interface AffinityGroupProcessor extends Adapter { + + /** + * process() is called to apply any user preferences to the deployment plan + * and avoid set for the given VM placement. + * + * @param vm + * virtual machine. + * @param plan + * deployment plan that tells you where it's being deployed to. + * @param avoid + * avoid these data centers, pods, clusters, or hosts. + */ + void process(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid) + throws AffinityConflictException; + + /** + * getType() should return the affinity/anti-affinity group being + * implemented + * + * @return String Affinity/Anti-affinity type + */ + String getType(); +} \ No newline at end of file diff --git a/api/src/org/apache/cloudstack/affinity/AffinityGroupResponse.java b/api/src/org/apache/cloudstack/affinity/AffinityGroupResponse.java new file mode 100644 index 000000000..afd33da84 --- /dev/null +++ b/api/src/org/apache/cloudstack/affinity/AffinityGroupResponse.java @@ -0,0 +1,155 @@ +// 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 org.apache.cloudstack.affinity; + +import java.util.ArrayList; +import java.util.HashSet; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Set; + +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; +import org.apache.cloudstack.api.response.ControlledEntityResponse; +import org.apache.cloudstack.api.response.ControlledViewEntityResponse; +import org.apache.cloudstack.api.response.UserVmResponse; + +import com.cloud.network.security.SecurityGroup; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + +@SuppressWarnings("unused") +@EntityReference(value = AffinityGroup.class) +public class AffinityGroupResponse extends BaseResponse implements ControlledViewEntityResponse { + + @SerializedName(ApiConstants.ID) @Param(description="the ID of the affinity group") + private String id; + + @SerializedName(ApiConstants.NAME) @Param(description="the name of the affinity group") + private String name; + + @SerializedName(ApiConstants.DESCRIPTION) @Param(description="the description of the affinity group") + private String description; + + @SerializedName(ApiConstants.ACCOUNT) @Param(description="the account owning the affinity group") + private String accountName; + + @SerializedName(ApiConstants.DOMAIN_ID) @Param(description="the domain ID of the affinity group") + private String domainId; + + @SerializedName(ApiConstants.DOMAIN) @Param(description="the domain name of the affinity group") + private String domainName; + + @SerializedName(ApiConstants.TYPE) + @Param(description = "the type of the affinity group") + private String type; + + @SerializedName("virtualmachineIds") + @Param(description = "virtual machine Ids associated with this affinity group ") + private List vmIdList; + + public AffinityGroupResponse() { + this.vmIdList = new ArrayList(); + } + + @Override + public String getObjectId() { + return this.getId(); + } + + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + + public void setName(String name) { + this.name = name; + } + + public void setDescription(String description) { + this.description = description; + } + + public void setAccountName(String accountName) { + this.accountName = accountName; + } + + public void setType(String type) { + this.type = type; + } + + @Override + public void setDomainId(String domainId) { + this.domainId = domainId; + } + + public void setDomainName(String domainName) { + this.domainName = domainName; + } + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((id == null) ? 0 : id.hashCode()); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + AffinityGroupResponse other = (AffinityGroupResponse) obj; + if (id == null) { + if (other.id != null) + return false; + } else if (!id.equals(other.id)) + return false; + return true; + } + + @Override + public void setProjectId(String projectId) { + // TODO Auto-generated method stub + + } + + @Override + public void setProjectName(String projectName) { + // TODO Auto-generated method stub + + } + + public void setVMIdList(List vmIdList) { + this.vmIdList = vmIdList; + } + + public void addVMId(String vmId) { + this.vmIdList.add(vmId); + } + +} diff --git a/api/src/org/apache/cloudstack/affinity/AffinityGroupService.java b/api/src/org/apache/cloudstack/affinity/AffinityGroupService.java new file mode 100644 index 000000000..26c32c89c --- /dev/null +++ b/api/src/org/apache/cloudstack/affinity/AffinityGroupService.java @@ -0,0 +1,79 @@ +// 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 org.apache.cloudstack.affinity; + +import java.util.List; + +import com.cloud.exception.ResourceInUseException; +import com.cloud.uservm.UserVm; +import com.cloud.utils.Pair; + +public interface AffinityGroupService { + + /** + * Creates an affinity/anti-affinity group for the given account/domain. + * + * @param account + * @param domainId + * @param name + * @param type + * @param description + * @return AffinityGroup + */ + + AffinityGroup createAffinityGroup(String account, Long domainId, String affinityGroupName, + String affinityGroupType, String description); + + /** + * Creates an affinity/anti-affinity group. + * + * @param affinityGroupId + * @param account + * @param domainId + * @param affinityGroupName + * @throws ResourceInUseException + */ + boolean deleteAffinityGroup(Long affinityGroupId, String account, Long domainId, String affinityGroupName) + throws ResourceInUseException; + + /** Lists Affinity Groups in your account + * @param account + * @param domainId + * @param affinityGroupId + * @param affinityGroupName + * @param affinityGroupType + * @param vmId + * @param startIndex + * @param pageSize + * @return + */ + Pair, Integer> listAffinityGroups(Long affinityGroupId, String affinityGroupName, + String affinityGroupType, Long vmId, Long startIndex, Long pageSize); + + + /** + * List group types available in deployment + * + * @return + */ + List listAffinityGroupTypes(); + + AffinityGroup getAffinityGroup(Long groupId); + + UserVm updateVMAffinityGroups(Long vmId, List affinityGroupIds); + +} diff --git a/api/src/org/apache/cloudstack/affinity/AffinityGroupTypeResponse.java b/api/src/org/apache/cloudstack/affinity/AffinityGroupTypeResponse.java new file mode 100644 index 000000000..2d1cd25ed --- /dev/null +++ b/api/src/org/apache/cloudstack/affinity/AffinityGroupTypeResponse.java @@ -0,0 +1,48 @@ +// 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 org.apache.cloudstack.affinity; + +import java.util.HashSet; +import java.util.Set; + +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; +import org.apache.cloudstack.api.response.ControlledEntityResponse; +import org.apache.cloudstack.api.response.ControlledViewEntityResponse; + +import com.cloud.network.security.SecurityGroup; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + +@SuppressWarnings("unused") +@EntityReference(value = AffinityGroup.class) +public class AffinityGroupTypeResponse extends BaseResponse { + + @SerializedName(ApiConstants.TYPE) + @Param(description = "the type of the affinity group") + private String type; + + + public AffinityGroupTypeResponse() { + } + + public void setType(String type) { + this.type = type; + } + +} diff --git a/api/src/org/apache/cloudstack/affinity/AffinityProcessorBase.java b/api/src/org/apache/cloudstack/affinity/AffinityProcessorBase.java new file mode 100644 index 000000000..70ecd0835 --- /dev/null +++ b/api/src/org/apache/cloudstack/affinity/AffinityProcessorBase.java @@ -0,0 +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. +package org.apache.cloudstack.affinity; + +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; +import com.cloud.exception.AffinityConflictException; +import com.cloud.utils.component.AdapterBase; +import com.cloud.vm.VirtualMachine; +import com.cloud.vm.VirtualMachineProfile; + +public class AffinityProcessorBase extends AdapterBase implements AffinityGroupProcessor { + + protected String _type; + + @Override + public void process(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid) + throws AffinityConflictException { + + } + + @Override + public String getType() { + return _type; + } + + public void setType(String type) { + _type = type; + } +} diff --git a/api/src/org/apache/cloudstack/api/ACL.java b/api/src/org/apache/cloudstack/api/ACL.java index 3623d1ac5..ce93b6aa7 100644 --- a/api/src/org/apache/cloudstack/api/ACL.java +++ b/api/src/org/apache/cloudstack/api/ACL.java @@ -22,10 +22,14 @@ import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +import org.apache.cloudstack.acl.SecurityChecker.AccessType; + @Retention(RetentionPolicy.RUNTIME) @Target({ FIELD }) public @interface ACL { + AccessType accessType() default AccessType.ListEntry; + boolean checkKeyAccess() default false; boolean checkValueAccess() default false; } diff --git a/api/src/org/apache/cloudstack/api/ApiConstants.java b/api/src/org/apache/cloudstack/api/ApiConstants.java index 6d2a9a312..37cb59f37 100755 --- a/api/src/org/apache/cloudstack/api/ApiConstants.java +++ b/api/src/org/apache/cloudstack/api/ApiConstants.java @@ -16,7 +16,6 @@ // under the License. package org.apache.cloudstack.api; -import org.omg.CORBA.PUBLIC_MEMBER; public class ApiConstants { public static final String ACCOUNT = "account"; @@ -47,6 +46,7 @@ public class ApiConstants { public static final String COMPONENT = "component"; public static final String CPU_NUMBER = "cpunumber"; public static final String CPU_SPEED = "cpuspeed"; + public static final String CPU_OVERCOMMIT_RATIO="cpuovercommitratio"; public static final String CREATED = "created"; public static final String CUSTOMIZED = "customized"; public static final String DESCRIPTION = "description"; @@ -59,6 +59,8 @@ public class ApiConstants { public static final String DISPLAY_TEXT = "displaytext"; public static final String DNS1 = "dns1"; public static final String DNS2 = "dns2"; + public static final String IP6_DNS1 = "ip6dns1"; + public static final String IP6_DNS2 = "ip6dns2"; public static final String DOMAIN = "domain"; public static final String DOMAIN_ID = "domainid"; public static final String DURATION = "duration"; @@ -78,6 +80,10 @@ public class ApiConstants { public static final String IP6_GATEWAY = "ip6gateway"; public static final String GROUP = "group"; public static final String GROUP_ID = "groupid"; + public static final String GSLB_LB_METHOD = "gslblbmethod"; + public static final String GSLB_SERVICE_DOMAIN_NAME = "gslbdomainname"; + public static final String GSLB_SERVICE_TYPE = "gslbservicetype"; + public static final String GSLB_STICKY_SESSION_METHOD = "gslbstickysessionmethodname"; public static final String GUEST_CIDR_ADDRESS = "guestcidraddress"; public static final String HA_ENABLE = "haenable"; public static final String HOST_ID = "hostid"; @@ -103,6 +109,7 @@ public class ApiConstants { public static final String IS_EXTRACTABLE = "isextractable"; public static final String IS_FEATURED = "isfeatured"; public static final String IS_PUBLIC = "ispublic"; + public static final String IS_PERSISTENT = "ispersistent"; public static final String IS_READY = "isready"; public static final String IS_RECURSIVE = "isrecursive"; public static final String ISO_FILTER = "isofilter"; @@ -119,6 +126,7 @@ public class ApiConstants { public static final String MAX = "max"; public static final String MAX_SNAPS = "maxsnaps"; public static final String MEMORY = "memory"; + public static final String MEMORY_OVERCOMMIT_RATIO="memoryovercommitratio"; public static final String MODE = "mode"; public static final String NAME = "name"; public static final String METHOD_NAME = "methodname"; @@ -218,6 +226,7 @@ public class ApiConstants { public static final String VM_LIMIT = "vmlimit"; public static final String VM_TOTAL = "vmtotal"; public static final String VNET = "vnet"; + public static final String IS_VOLATILE = "isvolatile"; public static final String VOLUME_ID = "volumeid"; public static final String ZONE_ID = "zoneid"; public static final String ZONE_NAME = "zonename"; @@ -324,6 +333,7 @@ public class ApiConstants { public static final String LOAD_BALANCER_DEVICE_STATE = "lbdevicestate"; public static final String LOAD_BALANCER_DEVICE_CAPACITY = "lbdevicecapacity"; public static final String LOAD_BALANCER_DEVICE_DEDICATED = "lbdevicededicated"; + public static final String LOAD_BALANCER_RULE_LIST = "loadbalancerrulelist"; public static final String FIREWALL_DEVICE_ID = "fwdeviceid"; public static final String FIREWALL_DEVICE_NAME = "fwdevicename"; public static final String FIREWALL_DEVICE_STATE = "fwdevicestate"; @@ -355,7 +365,10 @@ public class ApiConstants { public static final String CUSTOM_DISK_OFF_MAX_SIZE = "customdiskofferingmaxsize"; public static final String DEFAULT_ZONE_ID = "defaultzoneid"; public static final String GUID = "guid"; - + public static final String VSWITCH_TYPE_GUEST_TRAFFIC = "guestvswitchtype"; + public static final String VSWITCH_TYPE_PUBLIC_TRAFFIC = "publicvswitchtype"; + public static final String VSWITCH_NAME_GUEST_TRAFFIC = "guestvswitchname"; + public static final String VSWITCH_NAME_PUBLIC_TRAFFIC = "publicvswitchname"; public static final String EXTERNAL_SWITCH_MGMT_DEVICE_ID = "vsmdeviceid"; public static final String EXTERNAL_SWITCH_MGMT_DEVICE_NAME = "vsmdevicename"; public static final String EXTERNAL_SWITCH_MGMT_DEVICE_STATE = "vsmdevicestate"; @@ -374,6 +387,8 @@ public class ApiConstants { public static final String VSM_CONFIG_STATE = "vsmconfigstate"; public static final String VSM_DEVICE_STATE = "vsmdevicestate"; public static final String ADD_VSM_FLAG = "addvsmflag"; + public static final String END_POINT = "endpoint"; + public static final String REGION_ID = "regionid"; public static final String VPC_OFF_ID = "vpcofferingid"; public static final String NETWORK = "network"; public static final String VPC_ID = "vpcid"; @@ -434,13 +449,41 @@ public class ApiConstants { public static final String COUNTERPARAM_LIST = "counterparam"; public static final String AUTOSCALE_USER_ID = "autoscaleuserid"; public static final String BAREMETAL_DISCOVER_NAME = "baremetaldiscovername"; + public static final String UCS_DN = "ucsdn"; + public static final String GSLB_PROVIDER = "gslbprovider"; + public static final String GSLB_PROVIDER_PUBLIC_IP = "gslbproviderpublicip"; + public static final String GSLB_PROVIDER_PRIVATE_IP = "gslbproviderprivateip"; + public static final String VM_SNAPSHOT_DESCRIPTION = "description"; + public static final String VM_SNAPSHOT_DISPLAYNAME = "name"; + public static final String VM_SNAPSHOT_ID = "vmsnapshotid"; + public static final String VM_SNAPSHOT_DISK_IDS = "vmsnapshotdiskids"; + public static final String VM_SNAPSHOT_MEMORY = "snapshotmemory"; + public static final String IMAGE_STORE_UUID = "imagestoreuuid"; + public static final String GUEST_VM_CIDR = "guestvmcidr"; + public static final String NETWORK_CIDR = "networkcidr"; + public static final String RESERVED_IP_RANGE = "reservediprange"; + public static final String UCS_MANAGER_ID = "ucsmanagerid"; + public static final String UCS_PROFILE_DN = "profiledn"; + public static final String UCS_BLADE_DN = "bladedn"; + public static final String UCS_BLADE_ID = "bladeid"; + public static final String VM_GUEST_IP = "vmguestip"; + public static final String OLDER_THAN = "olderthan"; + public static final String HEALTHCHECK_RESPONSE_TIMEOUT = "responsetimeout"; + public static final String HEALTHCHECK_INTERVAL_TIME = "intervaltime"; + public static final String HEALTHCHECK_HEALTHY_THRESHOLD = "healthythreshold"; + public static final String HEALTHCHECK_UNHEALTHY_THRESHOLD = "unhealthythreshold"; + public static final String HEALTHCHECK_PINGPATH = "pingpath"; + public static final String AFFINITY_GROUP_IDS = "affinitygroupids"; + public static final String AFFINITY_GROUP_NAMES = "affinitygroupnames"; + public static final String DEPLOYMENT_PLANNER = "deploymentplanner"; + public static final String ASA_INSIDE_PORT_PROFILE = "insideportprofile"; public enum HostDetails { all, capacity, events, stats, min; } public enum VMDetails { - all, group, nics, stats, secgrp, tmpl, servoff, iso, volume, min; + all, group, nics, stats, secgrp, tmpl, servoff, iso, volume, min, affgrp; } public enum LDAPParams { diff --git a/api/src/org/apache/cloudstack/api/ApiErrorCode.java b/api/src/org/apache/cloudstack/api/ApiErrorCode.java index ee28fa058..69bd0284c 100644 --- a/api/src/org/apache/cloudstack/api/ApiErrorCode.java +++ b/api/src/org/apache/cloudstack/api/ApiErrorCode.java @@ -18,7 +18,6 @@ /** * Enum class for various API error code used in CloudStack - * @author minc * */ public enum ApiErrorCode { diff --git a/api/src/org/apache/cloudstack/api/BaseAsyncCmd.java b/api/src/org/apache/cloudstack/api/BaseAsyncCmd.java index fd67ed896..f3b317044 100644 --- a/api/src/org/apache/cloudstack/api/BaseAsyncCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseAsyncCmd.java @@ -17,6 +17,7 @@ package org.apache.cloudstack.api; import org.apache.cloudstack.api.response.AsyncJobResponse; + import com.cloud.async.AsyncJob; import com.cloud.user.User; import com.cloud.user.UserContext; @@ -30,6 +31,7 @@ public abstract class BaseAsyncCmd extends BaseCmd { public static final String networkSyncObject = "network"; public static final String vpcSyncObject = "vpc"; public static final String snapshotHostSyncObject = "snapshothost"; + public static final String gslbSyncObject = "globalserverloadbalacner"; private AsyncJob job; diff --git a/api/src/org/apache/cloudstack/api/BaseCmd.java b/api/src/org/apache/cloudstack/api/BaseCmd.java index 966e39cc1..42c0680ce 100644 --- a/api/src/org/apache/cloudstack/api/BaseCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseCmd.java @@ -25,11 +25,14 @@ import java.util.Map; import java.util.regex.Pattern; +import javax.inject.Inject; + +import org.apache.cloudstack.affinity.AffinityGroupService; import org.apache.cloudstack.query.QueryService; +import org.apache.cloudstack.usage.UsageService; import org.apache.log4j.Logger; import com.cloud.configuration.ConfigurationService; -import com.cloud.consoleproxy.ConsoleProxyService; import com.cloud.dao.EntityManager; import com.cloud.domain.Domain; import com.cloud.exception.ConcurrentOperationException; @@ -40,6 +43,7 @@ import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.network.NetworkService; +import com.cloud.network.NetworkUsageService; import com.cloud.network.StorageNetworkService; import com.cloud.network.VpcVirtualNetworkApplianceService; import com.cloud.network.as.AutoScaleService; @@ -48,6 +52,7 @@ import com.cloud.network.lb.LoadBalancingRulesService; import com.cloud.network.rules.RulesService; import com.cloud.network.security.SecurityGroupService; +import com.cloud.network.vpc.VpcProvisioningService; import com.cloud.network.vpc.VpcService; import com.cloud.network.vpn.RemoteAccessVpnService; import com.cloud.network.vpn.Site2SiteVpnService; @@ -56,7 +61,9 @@ import com.cloud.resource.ResourceService; import com.cloud.server.ManagementService; import com.cloud.server.TaggedResourceService; +import com.cloud.storage.DataStoreProviderApiService; import com.cloud.storage.StorageService; +import com.cloud.storage.VolumeApiService; import com.cloud.storage.snapshot.SnapshotService; import com.cloud.template.TemplateService; import com.cloud.user.Account; @@ -64,9 +71,8 @@ import com.cloud.user.DomainService; import com.cloud.user.ResourceLimitService; import com.cloud.utils.Pair; -import com.cloud.utils.component.ComponentLocator; -import com.cloud.vm.BareMetalVmService; import com.cloud.vm.UserVmService; +import com.cloud.vm.snapshot.VMSnapshotService; public abstract class BaseCmd { private static final Logger s_logger = Logger.getLogger(BaseCmd.class.getName()); @@ -92,75 +98,48 @@ public enum CommandType { @Parameter(name = "response", type = CommandType.STRING) private String responseType; - public static ComponentLocator s_locator; - public static ConfigurationService _configService; - public static AccountService _accountService; - public static UserVmService _userVmService; - public static ManagementService _mgr; - public static StorageService _storageService; - public static ResourceService _resourceService; - public static NetworkService _networkService; - public static TemplateService _templateService; - public static SecurityGroupService _securityGroupService; - public static SnapshotService _snapshotService; - public static ConsoleProxyService _consoleProxyService; - public static VpcVirtualNetworkApplianceService _routerService; - public static ResponseGenerator _responseGenerator; - public static EntityManager _entityMgr; - public static RulesService _rulesService; - public static AutoScaleService _autoScaleService; - public static LoadBalancingRulesService _lbService; - public static RemoteAccessVpnService _ravService; - public static BareMetalVmService _bareMetalVmService; - public static ProjectService _projectService; - public static FirewallService _firewallService; - public static DomainService _domainService; - public static ResourceLimitService _resourceLimitService; - public static IdentityService _identityService; - public static StorageNetworkService _storageNetworkService; - public static TaggedResourceService _taggedResourceService; - public static VpcService _vpcService; - public static NetworkACLService _networkACLService; - public static Site2SiteVpnService _s2sVpnService; - - public static QueryService _queryService; - - public static void setComponents(ResponseGenerator generator) { - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - _mgr = (ManagementService) ComponentLocator.getComponent(ManagementService.Name); - _accountService = locator.getManager(AccountService.class); - _configService = locator.getManager(ConfigurationService.class); - _userVmService = locator.getManager(UserVmService.class); - _storageService = locator.getManager(StorageService.class); - _resourceService = locator.getManager(ResourceService.class); - _networkService = locator.getManager(NetworkService.class); - _templateService = locator.getManager(TemplateService.class); - _securityGroupService = locator.getManager(SecurityGroupService.class); - _snapshotService = locator.getManager(SnapshotService.class); - _consoleProxyService = locator.getManager(ConsoleProxyService.class); - _routerService = locator.getManager(VpcVirtualNetworkApplianceService.class); - _entityMgr = locator.getManager(EntityManager.class); - _rulesService = locator.getManager(RulesService.class); - _lbService = locator.getManager(LoadBalancingRulesService.class); - _autoScaleService = locator.getManager(AutoScaleService.class); - _ravService = locator.getManager(RemoteAccessVpnService.class); - _responseGenerator = generator; - _bareMetalVmService = locator.getManager(BareMetalVmService.class); - _projectService = locator.getManager(ProjectService.class); - _firewallService = locator.getManager(FirewallService.class); - _domainService = locator.getManager(DomainService.class); - _resourceLimitService = locator.getManager(ResourceLimitService.class); - _identityService = locator.getManager(IdentityService.class); - _storageNetworkService = locator.getManager(StorageNetworkService.class); - _taggedResourceService = locator.getManager(TaggedResourceService.class); - _vpcService = locator.getManager(VpcService.class); - _networkACLService = locator.getManager(NetworkACLService.class); - _s2sVpnService = locator.getManager(Site2SiteVpnService.class); - _queryService = locator.getManager(QueryService.class); - } + @Inject public ConfigurationService _configService; + @Inject public AccountService _accountService; + @Inject public UserVmService _userVmService; + @Inject public ManagementService _mgr; + @Inject public StorageService _storageService; + @Inject public VolumeApiService _volumeService; + @Inject public ResourceService _resourceService; + @Inject public NetworkService _networkService; + @Inject public TemplateService _templateService; + @Inject public SecurityGroupService _securityGroupService; + @Inject public SnapshotService _snapshotService; + @Inject public VpcVirtualNetworkApplianceService _routerService; + @Inject public ResponseGenerator _responseGenerator; + @Inject public EntityManager _entityMgr; + @Inject public RulesService _rulesService; + @Inject public AutoScaleService _autoScaleService; + @Inject public LoadBalancingRulesService _lbService; + @Inject public RemoteAccessVpnService _ravService; + @Inject public ProjectService _projectService; + @Inject public FirewallService _firewallService; + @Inject public DomainService _domainService; + @Inject public ResourceLimitService _resourceLimitService; + @Inject public IdentityService _identityService; + @Inject public StorageNetworkService _storageNetworkService; + @Inject public TaggedResourceService _taggedResourceService; + @Inject public VpcService _vpcService; + @Inject public NetworkACLService _networkACLService; + @Inject public Site2SiteVpnService _s2sVpnService; + + @Inject public QueryService _queryService; + @Inject public UsageService _usageService; + @Inject public NetworkUsageService _networkUsageService; + @Inject public VMSnapshotService _vmSnapshotService; + @Inject public DataStoreProviderApiService dataStoreProviderApiService; + @Inject public VpcProvisioningService _vpcProvSvc; + @Inject public AffinityGroupService _affinityGroupService; public abstract void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException; + public void configure() { + } + public String getResponseType() { if (responseType == null) { return RESPONSE_TYPE_XML; diff --git a/api/src/org/apache/cloudstack/api/BaseListCmd.java b/api/src/org/apache/cloudstack/api/BaseListCmd.java index 58e83f709..bc0b2b8f3 100644 --- a/api/src/org/apache/cloudstack/api/BaseListCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseListCmd.java @@ -42,6 +42,9 @@ public abstract class BaseListCmd extends BaseCmd { // ///////////////// Accessors /////////////////////// // /////////////////////////////////////////////////// + public BaseListCmd() { + } + public String getKeyword() { return keyword; } @@ -62,10 +65,14 @@ public Integer getPageSize() { return pageSize; } - public static void configure() { - if (_configService.getDefaultPageSize().longValue() != PAGESIZE_UNLIMITED) { - MAX_PAGESIZE = _configService.getDefaultPageSize(); - } + public void configure() { + if(MAX_PAGESIZE == null) { + if (_configService.getDefaultPageSize().longValue() != PAGESIZE_UNLIMITED) { + MAX_PAGESIZE = _configService.getDefaultPageSize(); + } else { + MAX_PAGESIZE = PAGESIZE_UNLIMITED; + } + } } @Override diff --git a/api/src/org/apache/cloudstack/api/BaseListTemplateOrIsoPermissionsCmd.java b/api/src/org/apache/cloudstack/api/BaseListTemplateOrIsoPermissionsCmd.java index cde2d9486..47aa67919 100644 --- a/api/src/org/apache/cloudstack/api/BaseListTemplateOrIsoPermissionsCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseListTemplateOrIsoPermissionsCmd.java @@ -18,9 +18,9 @@ import java.util.List; +import org.apache.cloudstack.api.response.TemplatePermissionsResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.response.TemplatePermissionsResponse; import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.Account; import com.cloud.user.UserContext; diff --git a/api/src/org/apache/cloudstack/api/BaseResponse.java b/api/src/org/apache/cloudstack/api/BaseResponse.java index 01f1be325..187ad9456 100644 --- a/api/src/org/apache/cloudstack/api/BaseResponse.java +++ b/api/src/org/apache/cloudstack/api/BaseResponse.java @@ -16,8 +16,6 @@ // under the License. package org.apache.cloudstack.api; -import org.apache.cloudstack.api.ApiConstants; -import org.apache.cloudstack.api.ResponseObject; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; diff --git a/api/src/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoCmd.java b/api/src/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoCmd.java index dd6ae007a..6fd977311 100644 --- a/api/src/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoCmd.java @@ -21,10 +21,6 @@ import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.ApiConstants; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.Parameter; - public abstract class BaseUpdateTemplateOrIsoCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(UpdateIsoCmd.class.getName()); diff --git a/api/src/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoPermissionsCmd.java b/api/src/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoPermissionsCmd.java index 3222c710c..5cd4881e2 100644 --- a/api/src/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoPermissionsCmd.java +++ b/api/src/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoPermissionsCmd.java @@ -19,10 +19,10 @@ import java.util.List; import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.exception.InvalidParameterValueException; public abstract class BaseUpdateTemplateOrIsoPermissionsCmd extends BaseCmd { diff --git a/api/src/org/apache/cloudstack/api/PlugService.java b/api/src/org/apache/cloudstack/api/PlugService.java deleted file mode 100644 index 00032e3ab..000000000 --- a/api/src/org/apache/cloudstack/api/PlugService.java +++ /dev/null @@ -1,31 +0,0 @@ -// 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 org.apache.cloudstack.api; - -import static java.lang.annotation.ElementType.FIELD; -import static java.lang.annotation.RetentionPolicy.RUNTIME; - -import java.lang.annotation.Retention; -import java.lang.annotation.Target; - -import com.cloud.utils.component.PluggableService; - -@Target(FIELD) -@Retention(RUNTIME) -public @interface PlugService { - Class pluggableService() default PluggableService.class; -} diff --git a/api/src/org/apache/cloudstack/api/ResponseGenerator.java b/api/src/org/apache/cloudstack/api/ResponseGenerator.java index 63df4dc55..c0dd57e15 100644 --- a/api/src/org/apache/cloudstack/api/ResponseGenerator.java +++ b/api/src/org/apache/cloudstack/api/ResponseGenerator.java @@ -20,6 +20,8 @@ import java.util.EnumSet; import java.util.List; +import org.apache.cloudstack.affinity.AffinityGroup; +import org.apache.cloudstack.affinity.AffinityGroupResponse; import org.apache.cloudstack.api.ApiConstants.HostDetails; import org.apache.cloudstack.api.ApiConstants.VMDetails; import org.apache.cloudstack.api.command.user.job.QueryAsyncJobResultCmd; @@ -47,12 +49,15 @@ import org.apache.cloudstack.api.response.IPAddressResponse; import org.apache.cloudstack.api.response.InstanceGroupResponse; import org.apache.cloudstack.api.response.IpForwardingRuleResponse; +import org.apache.cloudstack.api.response.LBHealthCheckResponse; import org.apache.cloudstack.api.response.LBStickinessResponse; import org.apache.cloudstack.api.response.LDAPConfigResponse; import org.apache.cloudstack.api.response.LoadBalancerResponse; import org.apache.cloudstack.api.response.NetworkACLResponse; import org.apache.cloudstack.api.response.NetworkOfferingResponse; import org.apache.cloudstack.api.response.NetworkResponse; +import org.apache.cloudstack.api.response.NicResponse; +import org.apache.cloudstack.api.response.NicSecondaryIpResponse; import org.apache.cloudstack.api.response.PhysicalNetworkResponse; import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.response.PrivateGatewayResponse; @@ -60,10 +65,12 @@ import org.apache.cloudstack.api.response.ProjectInvitationResponse; import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.ProviderResponse; +import org.apache.cloudstack.api.response.RegionResponse; import org.apache.cloudstack.api.response.RemoteAccessVpnResponse; import org.apache.cloudstack.api.response.ResourceCountResponse; import org.apache.cloudstack.api.response.ResourceLimitResponse; import org.apache.cloudstack.api.response.ResourceTagResponse; +import org.apache.cloudstack.api.response.S3Response; import org.apache.cloudstack.api.response.SecurityGroupResponse; import org.apache.cloudstack.api.response.ServiceOfferingResponse; import org.apache.cloudstack.api.response.ServiceResponse; @@ -81,9 +88,12 @@ import org.apache.cloudstack.api.response.SystemVmResponse; import org.apache.cloudstack.api.response.TemplatePermissionsResponse; import org.apache.cloudstack.api.response.TemplateResponse; +import org.apache.cloudstack.api.response.TrafficMonitorResponse; import org.apache.cloudstack.api.response.TrafficTypeResponse; +import org.apache.cloudstack.api.response.UsageRecordResponse; import org.apache.cloudstack.api.response.UserResponse; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.cloudstack.api.response.VMSnapshotResponse; import org.apache.cloudstack.api.response.VirtualRouterProviderResponse; import org.apache.cloudstack.api.response.VlanIpRangeResponse; import org.apache.cloudstack.api.response.VolumeResponse; @@ -91,8 +101,8 @@ import org.apache.cloudstack.api.response.VpcResponse; import org.apache.cloudstack.api.response.VpnUsersResponse; import org.apache.cloudstack.api.response.ZoneResponse; - -import org.apache.cloudstack.api.response.S3Response; +import org.apache.cloudstack.region.Region; +import org.apache.cloudstack.usage.Usage; import com.cloud.async.AsyncJob; import com.cloud.capacity.Capacity; @@ -107,25 +117,12 @@ import com.cloud.event.Event; import com.cloud.host.Host; import com.cloud.hypervisor.HypervisorCapabilities; -import com.cloud.network.IpAddress; -import com.cloud.network.Network; +import com.cloud.network.*; import com.cloud.network.Network.Service; -import com.cloud.network.PhysicalNetwork; -import com.cloud.network.PhysicalNetworkServiceProvider; -import com.cloud.network.PhysicalNetworkTrafficType; -import com.cloud.network.RemoteAccessVpn; -import com.cloud.network.Site2SiteCustomerGateway; -import com.cloud.network.Site2SiteVpnConnection; -import com.cloud.network.Site2SiteVpnGateway; -import com.cloud.network.VirtualRouterProvider; -import com.cloud.network.VpnUser; -import com.cloud.network.as.AutoScalePolicy; -import com.cloud.network.as.AutoScaleVmGroup; -import com.cloud.network.as.AutoScaleVmProfile; -import com.cloud.network.as.Condition; -import com.cloud.network.as.Counter; +import com.cloud.network.as.*; import com.cloud.network.router.VirtualRouter; import com.cloud.network.rules.FirewallRule; +import com.cloud.network.rules.HealthCheckPolicy; import com.cloud.network.rules.LoadBalancer; import com.cloud.network.rules.PortForwardingRule; import com.cloud.network.rules.StaticNatRule; @@ -143,13 +140,9 @@ import com.cloud.projects.Project; import com.cloud.projects.ProjectAccount; import com.cloud.projects.ProjectInvitation; +import com.cloud.region.ha.GlobalLoadBalancerRule; import com.cloud.server.ResourceTag; -import com.cloud.storage.GuestOS; -import com.cloud.storage.S3; -import com.cloud.storage.Snapshot; -import com.cloud.storage.StoragePool; -import com.cloud.storage.Swift; -import com.cloud.storage.Volume; +import com.cloud.storage.*; import com.cloud.storage.snapshot.SnapshotPolicy; import com.cloud.storage.snapshot.SnapshotSchedule; import com.cloud.template.VirtualMachineTemplate; @@ -158,7 +151,10 @@ import com.cloud.user.UserAccount; import com.cloud.uservm.UserVm; import com.cloud.vm.InstanceGroup; +import com.cloud.vm.Nic; +import com.cloud.vm.snapshot.VMSnapshot; import com.cloud.vm.VirtualMachine; +import org.apache.cloudstack.api.response.*; public interface ResponseGenerator { UserResponse createUserResponse(UserAccount user); @@ -197,12 +193,19 @@ public interface ResponseGenerator { IPAddressResponse createIPAddressResponse(IpAddress ipAddress); + GlobalLoadBalancerResponse createGlobalLoadBalancerResponse(GlobalLoadBalancerRule globalLoadBalancerRule); + LoadBalancerResponse createLoadBalancerResponse(LoadBalancer loadBalancer); LBStickinessResponse createLBStickinessPolicyResponse(List stickinessPolicies, LoadBalancer lb); LBStickinessResponse createLBStickinessPolicyResponse(StickinessPolicy stickinessPolicy, LoadBalancer lb); + LBHealthCheckResponse createLBHealthCheckPolicyResponse(List healthcheckPolicies, + LoadBalancer lb); + + LBHealthCheckResponse createLBHealthCheckPolicyResponse(HealthCheckPolicy healthcheckPolicy, LoadBalancer lb); + PodResponse createPodResponse(Pod pod, Boolean showCapacities); ZoneResponse createZoneResponse(DataCenter dataCenter, Boolean showCapacities); @@ -314,6 +317,8 @@ public interface ResponseGenerator { StorageNetworkIpRangeResponse createStorageNetworkIpRangeResponse(StorageNetworkIpRange result); + RegionResponse createRegionResponse(Region region); + /** * @param resourceTag * @param keyValueOnly TODO @@ -372,4 +377,17 @@ public interface ResponseGenerator { GuestOSResponse createGuestOSResponse(GuestOS os); SnapshotScheduleResponse createSnapshotScheduleResponse(SnapshotSchedule sched); + + UsageRecordResponse createUsageResponse(Usage usageRecord); + + TrafficMonitorResponse createTrafficMonitorResponse(Host trafficMonitor); + VMSnapshotResponse createVMSnapshotResponse(VMSnapshot vmSnapshot); + + NicSecondaryIpResponse createSecondaryIPToNicResponse(String ip, + Long nicId, Long networkId); + public NicResponse createNicResponse(Nic result); + + AffinityGroupResponse createAffinityGroupResponse(AffinityGroup group); + + Long getAffinityGroupId(String name, long entityOwnerId); } diff --git a/api/src/org/apache/cloudstack/api/ServerApiException.java b/api/src/org/apache/cloudstack/api/ServerApiException.java index 682e5b7e7..4b0fae585 100644 --- a/api/src/org/apache/cloudstack/api/ServerApiException.java +++ b/api/src/org/apache/cloudstack/api/ServerApiException.java @@ -43,7 +43,7 @@ public ServerApiException(ApiErrorCode errorCode, String description, Throwable super(description, cause); _errorCode = errorCode; _description = description; - if (cause instanceof CloudRuntimeException || cause instanceof CloudException ) { + if (cause instanceof CloudRuntimeException) { CloudRuntimeException rt = (CloudRuntimeException) cause; ArrayList idList = rt.getIdProxyList(); if (idList != null) { @@ -52,6 +52,15 @@ public ServerApiException(ApiErrorCode errorCode, String description, Throwable } } setCSErrorCode(rt.getCSErrorCode()); + } else if (cause instanceof CloudException) { + CloudException rt = (CloudException) cause; + ArrayList idList = rt.getIdProxyList(); + if (idList != null) { + for (int i = 0; i < idList.size(); i++) { + addProxyObject(idList.get(i)); + } + } + setCSErrorCode(rt.getCSErrorCode()); } } diff --git a/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java index a13cf6253..95d0d07d9 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java @@ -19,13 +19,17 @@ import java.util.Collection; import java.util.Map; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.UserResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; import com.cloud.user.UserAccount; import com.cloud.user.UserContext; @@ -59,7 +63,7 @@ public class CreateAccountCmd extends BaseCmd { @Parameter(name=ApiConstants.LASTNAME, type=CommandType.STRING, required=true, description="lastname") private String lastName; - @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, required=true, description="Hashed password (Default is MD5). If you wish to use any other hashing algorithm, you would need to write a custom authentication adapter See Docs section.") + @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, required=true, description="Clear text password (Default hashed to SHA256SALT). If you wish to use any other hashing algorithm, you would need to write a custom authentication adapter See Docs section.") private String password; @Parameter(name=ApiConstants.TIMEZONE, type=CommandType.STRING, description="Specifies a timezone for this command. For more information on the timezone parameter, see Time Zone Format.") @@ -74,6 +78,12 @@ public class CreateAccountCmd extends BaseCmd { @Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "details for account used to store specific parameters") private Map details; + @Parameter(name=ApiConstants.ACCOUNT_ID, type=CommandType.STRING, description="Account UUID, required for adding account from external provisioning system") + private String accountUUID; + + @Parameter(name=ApiConstants.USER_ID, type=CommandType.STRING, description="User UUID, required for adding account from external provisioning system") + private String userUUID; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -128,6 +138,14 @@ public Map getDetails() { return params; } + public String getAccountUUID() { + return accountUUID; + } + + public String getUserUUID() { + return userUUID; + } + ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// @@ -145,7 +163,8 @@ public long getEntityOwnerId() { @Override public void execute(){ UserContext.current().setEventDetails("Account Name: "+getAccountName()+", Domain Id:"+getDomainId()); - UserAccount userAccount = _accountService.createUserAccount(getUsername(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimeZone(), getAccountName(), getAccountType(), getDomainId(), getNetworkDomain(), getDetails()); + UserAccount userAccount = _accountService.createUserAccount(getUsername(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimeZone(), getAccountName(), getAccountType(), + getDomainId(), getNetworkDomain(), getDetails(), getAccountUUID(), getUserUUID()); if (userAccount != null) { AccountResponse response = _responseGenerator.createUserAccountResponse(userAccount); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java index 86ccb4ba2..9895da113 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java @@ -16,12 +16,19 @@ // under the License. package org.apache.cloudstack.api.command.admin.account; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; +import javax.inject.Inject; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.cloudstack.region.RegionService; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.user.Account; @@ -41,10 +48,13 @@ public class DeleteAccountCmd extends BaseAsyncCmd { required=true, description="Account id") private Long id; + @Inject RegionService _regionService; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// + public Long getId() { return id; } @@ -86,7 +96,8 @@ public String getEventDescription() { @Override public void execute(){ UserContext.current().setEventDetails("Account Id: "+getId()); - boolean result = _accountService.deleteUserAccount(getId()); + + boolean result = _regionService.deleteUserAccount(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); diff --git a/api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java index 318dfda7d..1f9b8217d 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java @@ -16,12 +16,18 @@ // under the License. package org.apache.cloudstack.api.command.admin.account; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; +import javax.inject.Inject; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.region.RegionService; +import org.apache.log4j.Logger; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; @@ -52,6 +58,8 @@ public class DisableAccountCmd extends BaseAsyncCmd { @Parameter(name=ApiConstants.LOCK, type=CommandType.BOOLEAN, required=true, description="If true, only lock the account; else disable the account") private Boolean lockRequested; + @Inject RegionService _regionService; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -68,6 +76,10 @@ public Long getDomainId() { return domainId; } + public Boolean getLockRequested() { + return lockRequested; + } + ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// @@ -105,11 +117,7 @@ public String getEventDescription() { @Override public void execute() throws ConcurrentOperationException, ResourceUnavailableException{ UserContext.current().setEventDetails("Account Name: "+getAccountName()+", Domain Id:"+getDomainId()); - Account result = null; - if(lockRequested) - result = _accountService.lockAccount(getAccountName(), getDomainId(), getId()); - else - result = _accountService.disableAccount(getAccountName(), getDomainId(), getId()); + Account result = _regionService.disableAccount(this); if (result != null){ AccountResponse response = _responseGenerator.createAccountResponse(result); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/account/EnableAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/account/EnableAccountCmd.java index 2688ef151..b9a9f6d70 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/account/EnableAccountCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/account/EnableAccountCmd.java @@ -16,16 +16,18 @@ // under the License. package org.apache.cloudstack.api.command.admin.account; -import org.apache.log4j.Logger; +import javax.inject.Inject; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.region.RegionService; +import org.apache.log4j.Logger; import com.cloud.user.Account; @@ -48,6 +50,8 @@ public class EnableAccountCmd extends BaseCmd { description="Enables specified account in this domain.") private Long domainId; + @Inject RegionService _regionService; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -90,7 +94,7 @@ public long getEntityOwnerId() { @Override public void execute(){ - Account result = _accountService.enableAccount(getAccountName(), getDomainId(), getId()); + Account result = _regionService.enableAccount(this); if (result != null){ AccountResponse response = _responseGenerator.createAccountResponse(result); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/account/LockAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/account/LockAccountCmd.java index c67e84632..f4aa3afa8 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/account/LockAccountCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/account/LockAccountCmd.java @@ -16,14 +16,13 @@ // under the License. package org.apache.cloudstack.api.command.admin.account; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.log4j.Logger; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java index ea6d9078e..60d1a97ff 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java @@ -19,16 +19,18 @@ import java.util.Collection; import java.util.Map; -import org.apache.log4j.Logger; +import javax.inject.Inject; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.region.RegionService; +import org.apache.log4j.Logger; import com.cloud.user.Account; @@ -61,6 +63,8 @@ public class UpdateAccountCmd extends BaseCmd{ @Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "details for account used to store specific parameters") private Map details; + @Inject RegionService _regionService; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -120,7 +124,7 @@ public long getEntityOwnerId() { @Override public void execute(){ - Account result = _accountService.updateAccount(this); + Account result = _regionService.updateAccount(this); if (result != null){ AccountResponse response = _responseGenerator.createAccountResponse(result); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/autoscale/CreateCounterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/autoscale/CreateCounterCmd.java index 8c9872280..98ffc51f7 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/autoscale/CreateCounterCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/autoscale/CreateCounterCmd.java @@ -17,16 +17,15 @@ package org.apache.cloudstack.api.command.admin.autoscale; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.CounterResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.network.as.Counter; diff --git a/api/src/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java index 2fde06176..35d99bbc9 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java @@ -17,17 +17,16 @@ package org.apache.cloudstack.api.command.admin.autoscale; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.CounterResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ResourceInUseException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java index c64883c16..d55ccd7dd 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java @@ -20,14 +20,21 @@ import java.util.ArrayList; import java.util.List; +import com.cloud.exception.InvalidParameterValueException; import org.apache.cloudstack.api.*; import org.apache.log4j.Logger; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ClusterResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; import com.cloud.exception.DiscoveryException; import com.cloud.exception.ResourceInUseException; @@ -78,6 +85,40 @@ public class AddClusterCmd extends BaseCmd { @Parameter(name = ApiConstants.VSM_IPADDRESS, type = CommandType.STRING, required = false, description = "the ipaddress of the VSM associated with this cluster") private String vsmipaddress; + @Parameter (name=ApiConstants.CPU_OVERCOMMIT_RATIO, type = CommandType.STRING, required = false , description = "value of the cpu overcommit ratio, defaults to 1") + private String cpuovercommitRatio; + + @Parameter(name = ApiConstants.MEMORY_OVERCOMMIT_RATIO, type = CommandType.STRING, required = false ,description = "value of the default ram overcommit ratio, defaults to 1") + private String memoryovercommitratio; + + @Parameter(name = ApiConstants.VSWITCH_TYPE_GUEST_TRAFFIC, type = CommandType.STRING, required = false, description = "Type of virtual switch used for guest traffic in the cluster. Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch)") + private String vSwitchTypeGuestTraffic; + + @Parameter(name = ApiConstants.VSWITCH_TYPE_PUBLIC_TRAFFIC, type = CommandType.STRING, required = false, description = "Type of virtual switch used for public traffic in the cluster. Allowed values are, vmwaresvs (for VMware standard vSwitch) and vmwaredvs (for VMware distributed vSwitch)") + private String vSwitchTypePublicTraffic; + + @Parameter(name = ApiConstants.VSWITCH_TYPE_GUEST_TRAFFIC, type = CommandType.STRING, required = false, description = "Name of virtual switch used for guest traffic in the cluster. This would override zone wide traffic label setting.") + private String vSwitchNameGuestTraffic; + + @Parameter(name = ApiConstants.VSWITCH_TYPE_PUBLIC_TRAFFIC, type = CommandType.STRING, required = false, description = "Name of virtual switch used for public traffic in the cluster. This would override zone wide traffic label setting.") + private String vSwitchNamePublicTraffic; + + public String getVSwitchTypeGuestTraffic() { + return vSwitchTypeGuestTraffic; + } + + public String getVSwitchTypePublicTraffic() { + return vSwitchTypePublicTraffic; + } + + public String getVSwitchNameGuestTraffic() { + return vSwitchNameGuestTraffic; + } + + public String getVSwitchNamePublicTraffic() { + return vSwitchNamePublicTraffic; + } + public String getVSMIpaddress() { return vsmipaddress; } @@ -144,9 +185,26 @@ public void setAllocationState(String allocationState) { this.allocationState = allocationState; } + public Float getCpuOvercommitRatio (){ + if(cpuovercommitRatio != null){ + return Float.parseFloat(cpuovercommitRatio); + } + return 1.0f; + } + + public Float getMemoryOvercommitRaito (){ + if (memoryovercommitratio != null){ + return Float.parseFloat(memoryovercommitratio); + } + return 1.0f; + } + @Override public void execute(){ try { + if ((getMemoryOvercommitRaito().compareTo(1f) < 0) | (getCpuOvercommitRatio().compareTo(1f) < 0)) { + throw new InvalidParameterValueException("Cpu and ram overcommit ratios should not be less than 1"); + } List result = _resourceService.discoverCluster(this); ListResponse response = new ListResponse(); List clusterResponses = new ArrayList(); diff --git a/api/src/org/apache/cloudstack/api/command/admin/cluster/DeleteClusterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/cluster/DeleteClusterCmd.java index 93103d3f6..4fece0c7a 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/cluster/DeleteClusterCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/cluster/DeleteClusterCmd.java @@ -16,16 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.cluster; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ClusterResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; @APICommand(name = "deleteCluster", description="Deletes a cluster.", responseObject=SuccessResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java b/api/src/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java index 95ab0bff4..0417b187e 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java @@ -19,17 +19,16 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.command.user.offering.ListServiceOfferingsCmd; -import org.apache.cloudstack.api.response.PodResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.command.user.offering.ListServiceOfferingsCmd; import org.apache.cloudstack.api.response.ClusterResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; import com.cloud.org.Cluster; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java index d6ec7188d..c5130587e 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java @@ -16,15 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.cluster; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ClusterResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.InvalidParameterValueException; import com.cloud.org.Cluster; import com.cloud.user.Account; @@ -54,6 +54,13 @@ public class UpdateClusterCmd extends BaseCmd { @Parameter(name=ApiConstants.MANAGED_STATE, type=CommandType.STRING, description="whether this cluster is managed by cloudstack") private String managedState; + @Parameter(name=ApiConstants.CPU_OVERCOMMIT_RATIO, type = CommandType.STRING, description = "Value of cpu overcommit ratio") + private String cpuovercommitratio; + + @Parameter(name=ApiConstants.MEMORY_OVERCOMMIT_RATIO, type = CommandType.STRING, description = "Value of ram overcommit ratio") + private String memoryovercommitratio; + + public String getClusterName() { return clusterName; } @@ -100,14 +107,39 @@ public void setManagedstate(String managedstate) { this.managedState = managedstate; } + public Float getCpuOvercommitRatio (){ + if(cpuovercommitratio != null){ + return Float.parseFloat(cpuovercommitratio); + } + return null; + } + + public Float getMemoryOvercommitRaito (){ + if (memoryovercommitratio != null){ + return Float.parseFloat(memoryovercommitratio); + } + return null; + } + @Override public void execute(){ Cluster cluster = _resourceService.getCluster(getId()); if (cluster == null) { throw new InvalidParameterValueException("Unable to find the cluster by id=" + getId()); } + if (getMemoryOvercommitRaito() !=null){ + if ((getMemoryOvercommitRaito().compareTo(1f) < 0)) { + throw new InvalidParameterValueException("Memory overcommit ratio should be greater than or equal to one"); + } + } + + if (getCpuOvercommitRatio() !=null){ + if (getCpuOvercommitRatio().compareTo(1f) < 0) { + throw new InvalidParameterValueException("Cpu overcommit ratio should be greater than or equal to one"); + } + } - Cluster result = _resourceService.updateCluster(cluster, getClusterType(), getHypervisor(), getAllocationState(), getManagedstate()); + Cluster result = _resourceService.updateCluster(cluster, getClusterType(), getHypervisor(), getAllocationState(), getManagedstate(), getMemoryOvercommitRaito(), getCpuOvercommitRatio()); if (result != null) { ClusterResponse clusterResponse = _responseGenerator.createClusterResponse(cluster, false); clusterResponse.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/config/ListCfgsByCmd.java b/api/src/org/apache/cloudstack/api/command/admin/config/ListCfgsByCmd.java index 16010fdb4..aabfd4a62 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/config/ListCfgsByCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/config/ListCfgsByCmd.java @@ -20,13 +20,13 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ConfigurationResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + import com.cloud.configuration.Configuration; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/admin/config/ListDeploymentPlannersCmd.java b/api/src/org/apache/cloudstack/api/command/admin/config/ListDeploymentPlannersCmd.java new file mode 100644 index 000000000..69004de2a --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/admin/config/ListDeploymentPlannersCmd.java @@ -0,0 +1,71 @@ +// 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 org.apache.cloudstack.api.command.admin.config; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.BaseListCmd; +import org.apache.cloudstack.api.response.DeploymentPlannersResponse; +import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + +@APICommand(name = "listDeploymentPlanners", description = "Lists all DeploymentPlanners available.", responseObject = DeploymentPlannersResponse.class) +public class ListDeploymentPlannersCmd extends BaseListCmd { + public static final Logger s_logger = Logger.getLogger(ListDeploymentPlannersCmd.class.getName()); + + private static final String s_name = "listdeploymentplannersresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public void execute(){ + List planners = _mgr.listDeploymentPlanners(); + ListResponse response = new ListResponse(); + List plannerResponses = new ArrayList(); + + for (String planner : planners) { + DeploymentPlannersResponse plannerResponse = new DeploymentPlannersResponse(); + plannerResponse.setName(planner); + plannerResponse.setObjectName("deploymentPlanner"); + plannerResponses.add(plannerResponse); + } + + response.setResponses(plannerResponses); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + + } +} diff --git a/api/src/org/apache/cloudstack/api/command/admin/config/ListHypervisorCapabilitiesCmd.java b/api/src/org/apache/cloudstack/api/command/admin/config/ListHypervisorCapabilitiesCmd.java index b69e9eab5..f22202715 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/config/ListHypervisorCapabilitiesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/config/ListHypervisorCapabilitiesCmd.java @@ -20,13 +20,13 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.HypervisorCapabilitiesResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.hypervisor.HypervisorCapabilities; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmd.java b/api/src/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmd.java index 1c435178e..ffeb58621 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmd.java @@ -16,15 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.config; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ConfigurationResponse; +import org.apache.log4j.Logger; + import com.cloud.configuration.Configuration; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/config/UpdateHypervisorCapabilitiesCmd.java b/api/src/org/apache/cloudstack/api/command/admin/config/UpdateHypervisorCapabilitiesCmd.java index 19587f448..e2fe8a7b1 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/config/UpdateHypervisorCapabilitiesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/config/UpdateHypervisorCapabilitiesCmd.java @@ -16,16 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.config; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.HypervisorCapabilitiesResponse; import org.apache.cloudstack.api.response.ServiceOfferingResponse; +import org.apache.log4j.Logger; + import com.cloud.hypervisor.HypervisorCapabilities; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java b/api/src/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java index 61614d171..91d61ccf5 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java @@ -16,11 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.domain; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.log4j.Logger; + import com.cloud.domain.Domain; import com.cloud.user.Account; import com.cloud.user.UserContext; @@ -45,6 +49,9 @@ public class CreateDomainCmd extends BaseCmd { @Parameter(name=ApiConstants.NETWORK_DOMAIN, type=CommandType.STRING, description="Network domain for networks in the domain") private String networkDomain; + @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.STRING, description="Domain UUID, required for adding domain from another Region") + private String domainUUID; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -61,6 +68,10 @@ public String getNetworkDomain() { return networkDomain; } + public String getDomainUUID() { + return domainUUID; + } + ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// @@ -78,7 +89,7 @@ public long getEntityOwnerId() { @Override public void execute(){ UserContext.current().setEventDetails("Domain Name: "+getDomainName()+((getParentDomainId()!=null)?", Parent DomainId :"+getParentDomainId():"")); - Domain domain = _domainService.createDomain(getDomainName(), getParentDomainId(), getNetworkDomain()); + Domain domain = _domainService.createDomain(getDomainName(), getParentDomainId(), getNetworkDomain(), getDomainUUID()); if (domain != null) { DomainResponse response = _responseGenerator.createDomainResponse(domain); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java b/api/src/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java index 3fda9608c..488a758ca 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java @@ -16,12 +16,19 @@ // under the License. package org.apache.cloudstack.api.command.admin.domain; -import org.apache.cloudstack.api.*; -import org.apache.cloudstack.api.response.DomainResponse; -import org.apache.log4j.Logger; +import javax.inject.Inject; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.cloudstack.region.RegionService; +import org.apache.log4j.Logger; + import com.cloud.domain.Domain; import com.cloud.event.EventTypes; import com.cloud.user.Account; @@ -43,6 +50,7 @@ public class DeleteDomainCmd extends BaseAsyncCmd { @Parameter(name=ApiConstants.CLEANUP, type=CommandType.BOOLEAN, description="true if all domain resources (child domains, accounts) have to be cleaned up, false otherwise") private Boolean cleanup; + @Inject RegionService _regionService; ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// @@ -88,7 +96,7 @@ public String getEventDescription() { @Override public void execute(){ UserContext.current().setEventDetails("Domain Id: "+getId()); - boolean result = _domainService.deleteDomain(id, cleanup); + boolean result = _regionService.deleteDomain(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); diff --git a/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainChildrenCmd.java b/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainChildrenCmd.java index 4bc05d1c0..26d8bbf64 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainChildrenCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainChildrenCmd.java @@ -19,14 +19,14 @@ import java.util.ArrayList; import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + import com.cloud.domain.Domain; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainsCmd.java index 9b9e200ab..ed1419449 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/domain/ListDomainsCmd.java @@ -19,14 +19,14 @@ import java.util.ArrayList; import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + import com.cloud.domain.Domain; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java b/api/src/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java index 607120c18..e658f49ad 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java @@ -16,13 +16,21 @@ // under the License. package org.apache.cloudstack.api.command.admin.domain; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; +import javax.inject.Inject; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.region.RegionService; +import org.apache.log4j.Logger; + import com.cloud.domain.Domain; import com.cloud.user.Account; +import com.cloud.user.UserAccount; import com.cloud.user.UserContext; @APICommand(name = "updateDomain", description="Updates a domain with a new name", responseObject=DomainResponse.class) @@ -44,6 +52,8 @@ public class UpdateDomainCmd extends BaseCmd { @Parameter(name=ApiConstants.NETWORK_DOMAIN, type=CommandType.STRING, description="Network domain for the domain's networks; empty string will update domainName with NULL value") private String networkDomain; + @Inject RegionService _regionService; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -77,7 +87,8 @@ public long getEntityOwnerId() { @Override public void execute(){ UserContext.current().setEventDetails("Domain Id: "+getId()); - Domain domain = _mgr.updateDomain(this); + Domain domain = _regionService.updateDomain(this); + if (domain != null) { DomainResponse response = _responseGenerator.createDomainResponse(domain); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/AddHostCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/AddHostCmd.java index 77296c72a..3a2f41447 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/AddHostCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/AddHostCmd.java @@ -19,12 +19,10 @@ import java.util.ArrayList; import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ClusterResponse; @@ -32,6 +30,8 @@ import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.DiscoveryException; import com.cloud.host.Host; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java index 3bcee8111..f1d12b3b0 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java @@ -18,12 +18,16 @@ import java.util.List; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.HostResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.DiscoveryException; import com.cloud.host.Host; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/CancelMaintenanceCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/CancelMaintenanceCmd.java index 8c617c03c..d9e593462 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/CancelMaintenanceCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/CancelMaintenanceCmd.java @@ -16,16 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.host; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.HostResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.host.Host; diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/DeleteHostCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/DeleteHostCmd.java index c2b731b84..e1cef62e9 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/DeleteHostCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/DeleteHostCmd.java @@ -16,16 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.host; -import org.apache.cloudstack.api.response.HostResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.HostResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; @APICommand(name = "deleteHost", description = "Deletes a host.", responseObject = SuccessResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java index 876da9a6b..29844c311 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java @@ -21,8 +21,6 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiConstants.HostDetails; import org.apache.cloudstack.api.BaseListCmd; @@ -33,6 +31,8 @@ import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.response.UserVmResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.exception.InvalidParameterValueException; import com.cloud.host.Host; diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/PrepareForMaintenanceCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/PrepareForMaintenanceCmd.java index 80b53aa13..c1a83fabe 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/PrepareForMaintenanceCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/PrepareForMaintenanceCmd.java @@ -16,16 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.host; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.HostResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.host.Host; diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java index f42ec4b48..b151865ba 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java @@ -16,16 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.host; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.HostResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.host.Host; diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostCmd.java index c1e374e03..3bf95dbea 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostCmd.java @@ -18,16 +18,16 @@ import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.GuestOSCategoryResponse; import org.apache.cloudstack.api.response.HostResponse; +import org.apache.log4j.Logger; + import com.cloud.host.Host; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java b/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java index dd9e4559b..c4420bd13 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java @@ -16,15 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.host; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ClusterResponse; import org.apache.cloudstack.api.response.HostResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; @APICommand(name = "updateHostPassword", description = "Update password of a host/pool on management server.", responseObject = SuccessResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/admin/ldap/LDAPConfigCmd.java b/api/src/org/apache/cloudstack/api/command/admin/ldap/LDAPConfigCmd.java index b71ba7340..2976de4bf 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/ldap/LDAPConfigCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/ldap/LDAPConfigCmd.java @@ -19,18 +19,19 @@ import javax.naming.NamingException; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.LDAPConfigResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; +import com.cloud.exception.InvalidParameterValueException; import com.cloud.user.Account; @APICommand(name = "ldapConfig", description="Configure the LDAP context for this site.", responseObject=LDAPConfigResponse.class, since="3.0.0") @@ -43,7 +44,10 @@ public class LDAPConfigCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name=ApiConstants.HOST_NAME, type=CommandType.STRING, required=true, description="Hostname or ip address of the ldap server eg: my.ldap.com") + @Parameter(name=ApiConstants.LIST_ALL, type=CommandType.STRING, description="Hostname or ip address of the ldap server eg: my.ldap.com") + private String listall; + + @Parameter(name=ApiConstants.HOST_NAME, type=CommandType.STRING, description="Hostname or ip address of the ldap server eg: my.ldap.com") private String hostname; @Parameter(name=ApiConstants.PORT, type=CommandType.INTEGER, description="Specify the LDAP port if required, default is 389.") @@ -52,10 +56,10 @@ public class LDAPConfigCmd extends BaseCmd { @Parameter(name=ApiConstants.USE_SSL, type=CommandType.BOOLEAN, description="Check Use SSL if the external LDAP server is configured for LDAP over SSL.") private Boolean useSSL; - @Parameter(name=ApiConstants.SEARCH_BASE, type=CommandType.STRING, required=true, description="The search base defines the starting point for the search in the directory tree Example: dc=cloud,dc=com.") + @Parameter(name=ApiConstants.SEARCH_BASE, type=CommandType.STRING, description="The search base defines the starting point for the search in the directory tree Example: dc=cloud,dc=com.") private String searchBase; - @Parameter(name=ApiConstants.QUERY_FILTER, type=CommandType.STRING, required=true, description="You specify a query filter here, which narrows down the users, who can be part of this domain.") + @Parameter(name=ApiConstants.QUERY_FILTER, type=CommandType.STRING, description="You specify a query filter here, which narrows down the users, who can be part of this domain.") private String queryFilter; @Parameter(name=ApiConstants.BIND_DN, type=CommandType.STRING, description="Specify the distinguished name of a user with the search permission on the directory.") @@ -74,6 +78,10 @@ public class LDAPConfigCmd extends BaseCmd { /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// + public String getListAll() { + return listall == null ? "false" : listall; + } + public String getBindPassword() { return bindPassword; } @@ -82,30 +90,56 @@ public String getBindDN() { return bindDN; } + public void setBindDN(String bdn) { + this.bindDN=bdn; + } + public String getQueryFilter() { return queryFilter; } + public void setQueryFilter(String queryFilter) { + this.queryFilter=queryFilter; + } public String getSearchBase() { return searchBase; } + public void setSearchBase(String searchBase) { + this.searchBase=searchBase; + } + public Boolean getUseSSL() { - return useSSL == null ? Boolean.FALSE : Boolean.TRUE; + return useSSL == null ? Boolean.FALSE : useSSL; + } + + public void setUseSSL(Boolean useSSL) { + this.useSSL=useSSL; } public String getHostname() { return hostname; } + public void setHostname(String hostname) { + this.hostname=hostname; + } + public Integer getPort() { return port <= 0 ? 389 : port; } + public void setPort(Integer port) { + this.port=port; + } + public String getTrustStore() { return trustStore; } + public void setTrustStore(String trustStore) { + this.trustStore=trustStore; + } public String getTrustStorePassword() { return trustStorePassword; @@ -122,12 +156,25 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException { try { - boolean result = _configService.updateLDAP(this); - if (result){ - LDAPConfigResponse lr = _responseGenerator.createLDAPConfigResponse(getHostname(), getPort(), getUseSSL(), getQueryFilter(), getSearchBase(), getBindDN()); + if ("true".equalsIgnoreCase(getListAll())){ + // return the existing conf + LDAPConfigCmd cmd = _configService.listLDAPConfig(this); + LDAPConfigResponse lr = _responseGenerator.createLDAPConfigResponse(cmd.getHostname(), cmd.getPort(), cmd.getUseSSL(), + cmd.getQueryFilter(), cmd.getSearchBase(), cmd.getBindDN()); lr.setResponseName(getCommandName()); this.setResponseObject(lr); } + else if (getHostname()==null || getSearchBase() == null || getQueryFilter() == null) { + throw new InvalidParameterValueException("You need to provide hostname, serachbase and queryfilter to configure your LDAP server"); + } + else { + boolean result = _configService.updateLDAP(this); + if (result){ + LDAPConfigResponse lr = _responseGenerator.createLDAPConfigResponse(getHostname(), getPort(), getUseSSL(), getQueryFilter(), getSearchBase(), getBindDN()); + lr.setResponseName(getCommandName()); + this.setResponseObject(lr); + } + } } catch (NamingException ne){ ne.printStackTrace(); diff --git a/api/src/org/apache/cloudstack/api/command/admin/ldap/LDAPRemoveCmd.java b/api/src/org/apache/cloudstack/api/command/admin/ldap/LDAPRemoveCmd.java index 6bf5f4ff8..5159fbadb 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/ldap/LDAPRemoveCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/ldap/LDAPRemoveCmd.java @@ -18,11 +18,11 @@ import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.response.LDAPConfigResponse; import org.apache.cloudstack.api.response.LDAPRemoveResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; @APICommand(name = "ldapRemove", description="Remove the LDAP context for this site.", responseObject=LDAPConfigResponse.class, since="3.0.1") diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/AddNetworkDeviceCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/AddNetworkDeviceCmd.java index b8f98021c..498325538 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/AddNetworkDeviceCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/AddNetworkDeviceCmd.java @@ -18,24 +18,24 @@ import java.util.Map; -import org.apache.log4j.Logger; +import javax.inject.Inject; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.NetworkDeviceResponse; +import org.apache.cloudstack.network.ExternalNetworkDeviceManager; +import org.apache.log4j.Logger; + import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.host.Host; -import org.apache.cloudstack.network.ExternalNetworkDeviceManager; -import com.cloud.server.ManagementService; -import org.apache.cloudstack.api.response.NetworkDeviceResponse; -import com.cloud.utils.component.ComponentLocator; import com.cloud.utils.exception.CloudRuntimeException; @APICommand(name = "addNetworkDevice", description="Adds a network device of one of the following types: ExternalDhcp, ExternalFirewall, ExternalLoadBalancer, PxeServer", responseObject = NetworkDeviceResponse.class) @@ -47,6 +47,7 @@ public class AddNetworkDeviceCmd extends BaseCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// + @Inject ExternalNetworkDeviceManager nwDeviceMgr; @Parameter(name = ApiConstants.NETWORK_DEVICE_TYPE, type = CommandType.STRING, description = "Network device type, now supports ExternalDhcp, PxeServer, NetscalerMPXLoadBalancer, NetscalerVPXLoadBalancer, NetscalerSDXLoadBalancer, F5BigIpLoadBalancer, JuniperSRXFirewall") private String type; @@ -64,11 +65,8 @@ public Map getParamList() { @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, - ResourceAllocationException { + ResourceAllocationException { try { - ExternalNetworkDeviceManager nwDeviceMgr; - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - nwDeviceMgr = locator.getManager(ExternalNetworkDeviceManager.class); Host device = nwDeviceMgr.addNetworkDevice(this); NetworkDeviceResponse response = nwDeviceMgr.getApiResponse(device); response.setObjectName("networkdevice"); diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/AddNetworkServiceProviderCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/AddNetworkServiceProviderCmd.java index 22802f936..2c6cc609e 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/AddNetworkServiceProviderCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/AddNetworkServiceProviderCmd.java @@ -18,17 +18,16 @@ import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.PhysicalNetworkResponse; import org.apache.cloudstack.api.response.ProviderResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ResourceAllocationException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java index 9d3ceb828..b48bf9e76 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java @@ -23,12 +23,17 @@ import java.util.List; import java.util.Map; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.NetworkOfferingResponse; import org.apache.cloudstack.api.response.ServiceOfferingResponse; + import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.NetworkOfferingResponse; import com.cloud.exception.InvalidParameterValueException; import com.cloud.network.Network.Capability; import com.cloud.network.Network.Service; @@ -88,6 +93,9 @@ public class CreateNetworkOfferingCmd extends BaseCmd { @Parameter(name=ApiConstants.SPECIFY_IP_RANGES, type=CommandType.BOOLEAN, description="true if network offering supports specifying ip ranges; defaulted to false if not specified") private Boolean specifyIpRanges; + @Parameter(name=ApiConstants.IS_PERSISTENT, type=CommandType.BOOLEAN, description="true if network offering supports persistent networks; defaulted to false if not specified") + private Boolean isPersistent; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -147,6 +155,10 @@ public Boolean getConserveMode() { return conserveMode; } + public Boolean getIsPersistent() { + return isPersistent == null ? false : isPersistent; + } + public Map> getServiceProviders() { Map> serviceProviderMap = null; if (serviceProviderList != null && !serviceProviderList.isEmpty()) { diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/CreatePhysicalNetworkCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/CreatePhysicalNetworkCmd.java index 1b83a9114..fb6db61f9 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/CreatePhysicalNetworkCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/CreatePhysicalNetworkCmd.java @@ -18,18 +18,17 @@ import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; -import org.apache.cloudstack.api.response.PhysicalNetworkResponse; import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.api.response.PhysicalNetworkResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ResourceAllocationException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/CreateStorageNetworkIpRangeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/CreateStorageNetworkIpRangeCmd.java index 59db3eb17..008fa329f 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/CreateStorageNetworkIpRangeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/CreateStorageNetworkIpRangeCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.network; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.response.StorageNetworkIpRangeResponse; +import org.apache.log4j.Logger; + import com.cloud.dc.StorageNetworkIpRange; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkDeviceCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkDeviceCmd.java index 4d8d18e59..2ca618cd1 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkDeviceCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkDeviceCmd.java @@ -16,24 +16,24 @@ // under the License. package org.apache.cloudstack.api.command.admin.network; -import org.apache.log4j.Logger; +import javax.inject.Inject; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; -import org.apache.cloudstack.network.ExternalNetworkDeviceManager; import org.apache.cloudstack.api.response.HostResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.cloudstack.network.ExternalNetworkDeviceManager; +import org.apache.log4j.Logger; + import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; -import com.cloud.server.ManagementService; -import com.cloud.utils.component.ComponentLocator; import com.cloud.utils.exception.CloudRuntimeException; @APICommand(name = "deleteNetworkDevice", description="Deletes network device.", responseObject=SuccessResponse.class) @@ -41,6 +41,8 @@ public class DeleteNetworkDeviceCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(DeleteNetworkDeviceCmd.class); private static final String s_name = "deletenetworkdeviceresponse"; + @Inject ExternalNetworkDeviceManager nwDeviceMgr; + ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @@ -55,11 +57,8 @@ public Long getId() { @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, - ResourceAllocationException { + ResourceAllocationException { try { - ExternalNetworkDeviceManager nwDeviceMgr; - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - nwDeviceMgr = locator.getManager(ExternalNetworkDeviceManager.class); boolean result = nwDeviceMgr.deleteNetworkDevice(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkOfferingCmd.java index 69f24b419..69f34e871 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkOfferingCmd.java @@ -16,16 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.network; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.NetworkOfferingResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; @APICommand(name = "deleteNetworkOffering", description="Deletes a network offering.", responseObject=SuccessResponse.class, since="3.0.0") diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkServiceProviderCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkServiceProviderCmd.java index f0d2a128a..cbcf29b8f 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkServiceProviderCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/DeleteNetworkServiceProviderCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.network; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ProviderResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/DeletePhysicalNetworkCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/DeletePhysicalNetworkCmd.java index 178ccb8e0..c7dd93c88 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/DeletePhysicalNetworkCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/DeletePhysicalNetworkCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.network; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.PhysicalNetworkResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/DeleteStorageNetworkIpRangeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/DeleteStorageNetworkIpRangeCmd.java index 5fa26f69a..b2dcfa52e 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/DeleteStorageNetworkIpRangeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/DeleteStorageNetworkIpRangeCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.network; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.StorageNetworkIpRangeResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkDeviceCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkDeviceCmd.java index 11e74fbb8..0b7836de3 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkDeviceCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkDeviceCmd.java @@ -20,26 +20,25 @@ import java.util.List; import java.util.Map; -import org.apache.log4j.Logger; +import javax.inject.Inject; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; -import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.BaseListCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; -import org.apache.cloudstack.network.ExternalNetworkDeviceManager; -import org.apache.cloudstack.api.response.NetworkDeviceResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.NetworkDeviceResponse; +import org.apache.cloudstack.network.ExternalNetworkDeviceManager; +import org.apache.log4j.Logger; + import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.host.Host; -import com.cloud.server.ManagementService; -import com.cloud.utils.component.ComponentLocator; import com.cloud.utils.exception.CloudRuntimeException; @APICommand(name = "listNetworkDevice", description="List network devices", responseObject = NetworkDeviceResponse.class) @@ -47,6 +46,7 @@ public class ListNetworkDeviceCmd extends BaseListCmd { public static final Logger s_logger = Logger.getLogger(ListNetworkDeviceCmd.class); private static final String s_name = "listnetworkdevice"; + @Inject ExternalNetworkDeviceManager nwDeviceMgr; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @@ -67,11 +67,8 @@ public Map getParamList() { @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, - ResourceAllocationException { + ResourceAllocationException { try { - ExternalNetworkDeviceManager nwDeviceMgr; - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - nwDeviceMgr = locator.getManager(ExternalNetworkDeviceManager.class); List devices = nwDeviceMgr.listNetworkDevice(this); List nwdeviceResponses = new ArrayList(); ListResponse listResponse = new ListResponse(); diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkServiceProvidersCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkServiceProvidersCmd.java index 06a0518af..e51c47eb6 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkServiceProvidersCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/ListNetworkServiceProvidersCmd.java @@ -19,15 +19,15 @@ import java.util.ArrayList; import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.PhysicalNetworkResponse; import org.apache.cloudstack.api.response.ProviderResponse; +import org.apache.log4j.Logger; + import com.cloud.network.PhysicalNetworkServiceProvider; import com.cloud.user.Account; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/ListPhysicalNetworksCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/ListPhysicalNetworksCmd.java index 3331d4810..f7794c306 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/ListPhysicalNetworksCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/ListPhysicalNetworksCmd.java @@ -19,18 +19,17 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.response.ZoneResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; -import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.BaseListCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.PhysicalNetworkResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.network.PhysicalNetwork; import com.cloud.user.Account; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/ListStorageNetworkIpRangeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/ListStorageNetworkIpRangeCmd.java index b5045bb99..46af6a690 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/ListStorageNetworkIpRangeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/ListStorageNetworkIpRangeCmd.java @@ -19,14 +19,18 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.PodResponse; -import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseListCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.response.StorageNetworkIpRangeResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.dc.StorageNetworkIpRange; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/ListSupportedNetworkServicesCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/ListSupportedNetworkServicesCmd.java index f7407a108..85ae13950 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/ListSupportedNetworkServicesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/ListSupportedNetworkServicesCmd.java @@ -20,13 +20,13 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.ServiceResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.InvalidParameterValueException; import com.cloud.network.Network; import com.cloud.network.Network.Service; diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkOfferingCmd.java index ca4709deb..ba685a949 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkOfferingCmd.java @@ -16,11 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.network; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.NetworkOfferingResponse; +import org.apache.log4j.Logger; + import com.cloud.offering.NetworkOffering; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkServiceProviderCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkServiceProviderCmd.java index d64fd0796..4364b2d7a 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkServiceProviderCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/UpdateNetworkServiceProviderCmd.java @@ -18,16 +18,15 @@ import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ProviderResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.network.PhysicalNetworkServiceProvider; diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/UpdatePhysicalNetworkCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/UpdatePhysicalNetworkCmd.java index d9a3e044c..06cf38dba 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/UpdatePhysicalNetworkCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/UpdatePhysicalNetworkCmd.java @@ -19,12 +19,12 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseAsyncCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.PhysicalNetworkResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.network.PhysicalNetwork; diff --git a/api/src/org/apache/cloudstack/api/command/admin/network/UpdateStorageNetworkIpRangeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/network/UpdateStorageNetworkIpRangeCmd.java index d49d3c4e9..613e4c011 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/network/UpdateStorageNetworkIpRangeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/network/UpdateStorageNetworkIpRangeCmd.java @@ -16,11 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.network; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.StorageNetworkIpRangeResponse; +import org.apache.log4j.Logger; + import com.cloud.dc.StorageNetworkIpRange; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java index 6c3630690..68d5dd466 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java @@ -16,16 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.offering; -import org.apache.cloudstack.api.response.DomainResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DiskOfferingResponse; +import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.log4j.Logger; + import com.cloud.offering.DiskOffering; import com.cloud.offering.ServiceOffering; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java index 54151fe13..74392cd42 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java @@ -16,16 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.offering; -import org.apache.cloudstack.api.response.DomainResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ServiceOfferingResponse; +import org.apache.log4j.Logger; + import com.cloud.offering.ServiceOffering; import com.cloud.user.Account; @@ -59,6 +59,9 @@ public class CreateServiceOfferingCmd extends BaseCmd { @Parameter(name=ApiConstants.LIMIT_CPU_USE, type=CommandType.BOOLEAN, description="restrict the CPU usage to committed service offering") private Boolean limitCpuUse; + @Parameter(name=ApiConstants.IS_VOLATILE, type=CommandType.BOOLEAN, description="true if the virtual machine needs to be volatile so that on every reboot of VM, original root disk is dettached then destroyed and a fresh root disk is created and attached to VM") + private Boolean isVolatile; + @Parameter(name=ApiConstants.STORAGE_TYPE, type=CommandType.STRING, description="the storage type of the service offering. Values are local and shared.") private String storageType; @@ -81,6 +84,9 @@ public class CreateServiceOfferingCmd extends BaseCmd { @Parameter(name=ApiConstants.NETWORKRATE, type=CommandType.INTEGER, description="data transfer rate in megabits per second allowed. Supported only for non-System offering and system offerings having \"domainrouter\" systemvmtype") private Integer networkRate; + @Parameter(name = ApiConstants.DEPLOYMENT_PLANNER, type = CommandType.STRING, description = "The deployment planner heuristics used to deploy a VM of this offering, default \"FirstFitPlanner\".") + private String deploymentPlanner; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -106,11 +112,15 @@ public String getServiceOfferingName() { } public Boolean getOfferHa() { - return offerHa; + return offerHa == null ? false : offerHa; } public Boolean GetLimitCpuUse() { - return limitCpuUse; + return limitCpuUse == null ? false : limitCpuUse; + } + + public Boolean getVolatileVm() { + return isVolatile == null ? false : isVolatile; } public String getStorageType() { @@ -141,6 +151,10 @@ public Integer getNetworkRate() { return networkRate; } + public String getDeploymentPlanner() { + return deploymentPlanner; + } + ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteDiskOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteDiskOfferingCmd.java index 3f854637b..f8e27fb57 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteDiskOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteDiskOfferingCmd.java @@ -16,16 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.offering; -import org.apache.cloudstack.api.response.DiskOfferingResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.DiskOfferingResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; @APICommand(name = "deleteDiskOffering", description="Updates a disk offering.", responseObject=SuccessResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteServiceOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteServiceOfferingCmd.java index 0a8949b90..e3664deee 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteServiceOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/DeleteServiceOfferingCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.offering; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ServiceOfferingResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.user.Account; @APICommand(name = "deleteServiceOffering", description="Deletes a service offering.", responseObject=SuccessResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateDiskOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateDiskOfferingCmd.java index 734b18bfb..1e421a13d 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateDiskOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateDiskOfferingCmd.java @@ -15,15 +15,15 @@ // specific language governing permissions and limitations // under the License. package org.apache.cloudstack.api.command.admin.offering; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DiskOfferingResponse; +import org.apache.log4j.Logger; + import com.cloud.offering.DiskOffering; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateServiceOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateServiceOfferingCmd.java index 9dddd7d67..a8de07418 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateServiceOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/offering/UpdateServiceOfferingCmd.java @@ -16,11 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.offering; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ServiceOfferingResponse; +import org.apache.log4j.Logger; + import com.cloud.offering.ServiceOffering; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/pod/CreatePodCmd.java b/api/src/org/apache/cloudstack/api/command/admin/pod/CreatePodCmd.java index 95d9e53be..a110b5002 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/pod/CreatePodCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/pod/CreatePodCmd.java @@ -16,12 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.pod; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; import com.cloud.dc.Pod; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/pod/DeletePodCmd.java b/api/src/org/apache/cloudstack/api/command/admin/pod/DeletePodCmd.java index 4080a7c46..f663633a6 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/pod/DeletePodCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/pod/DeletePodCmd.java @@ -16,16 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.pod; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/pod/ListPodsByCmd.java b/api/src/org/apache/cloudstack/api/command/admin/pod/ListPodsByCmd.java index a64ecdde9..3dace4244 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/pod/ListPodsByCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/pod/ListPodsByCmd.java @@ -20,14 +20,13 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; import com.cloud.dc.Pod; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/admin/pod/UpdatePodCmd.java b/api/src/org/apache/cloudstack/api/command/admin/pod/UpdatePodCmd.java index c99da9d81..a71c36242 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/pod/UpdatePodCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/pod/UpdatePodCmd.java @@ -16,11 +16,14 @@ // under the License. package org.apache.cloudstack.api.command.admin.pod; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.PodResponse; +import org.apache.log4j.Logger; import com.cloud.dc.Pod; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/region/AddRegionCmd.java b/api/src/org/apache/cloudstack/api/command/admin/region/AddRegionCmd.java new file mode 100644 index 000000000..dce1e8b80 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/admin/region/AddRegionCmd.java @@ -0,0 +1,95 @@ +// 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 org.apache.cloudstack.api.command.admin.region; + +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.RegionResponse; +import org.apache.cloudstack.region.Region; +import org.apache.cloudstack.region.RegionService; +import org.apache.log4j.Logger; + +import com.cloud.user.Account; + +@APICommand(name = "addRegion", description="Adds a Region", responseObject=RegionResponse.class) +public class AddRegionCmd extends BaseCmd { + public static final Logger s_logger = Logger.getLogger(AddRegionCmd.class.getName()); + + private static final String s_name = "addregionresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + @Parameter(name=ApiConstants.ID, type=CommandType.INTEGER, required=true, description="Id of the Region") + private Integer id; + + @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, required=true, description="Name of the region") + private String regionName; + + @Parameter(name=ApiConstants.END_POINT, type=CommandType.STRING, required=true, description="Region service endpoint") + private String endPoint; + + @Inject public RegionService _regionService; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public Integer getId() { + return id; + } + + public String getRegionName() { + return regionName; + } + + public String getEndPoint() { + return endPoint; + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + return Account.ACCOUNT_ID_SYSTEM; + } + + @Override + public void execute(){ + Region region = _regionService.addRegion(getId(), getRegionName(), getEndPoint()); + if (region != null) { + RegionResponse response = _responseGenerator.createRegionResponse(region); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add Region"); + } + } +} diff --git a/api/src/org/apache/cloudstack/api/command/admin/region/RemoveRegionCmd.java b/api/src/org/apache/cloudstack/api/command/admin/region/RemoveRegionCmd.java new file mode 100644 index 000000000..d2b696d2b --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/admin/region/RemoveRegionCmd.java @@ -0,0 +1,79 @@ +// 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 org.apache.cloudstack.api.command.admin.region; + +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.cloudstack.region.RegionService; +import org.apache.log4j.Logger; + +import com.cloud.user.Account; + +@APICommand(name = "removeRegion", description="Removes specified region", responseObject=SuccessResponse.class) +public class RemoveRegionCmd extends BaseCmd { + public static final Logger s_logger = Logger.getLogger(RemoveRegionCmd.class.getName()); + private static final String s_name = "removeregionresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name=ApiConstants.ID, type=CommandType.INTEGER, required=true, description="ID of the region to delete") + private Integer id; + + @Inject RegionService _regionService; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public Integer getId() { + return id; + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + return Account.ACCOUNT_ID_SYSTEM; + } + + @Override + public void execute(){ + boolean result = _regionService.removeRegion(id); + if (result) { + SuccessResponse response = new SuccessResponse(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove region"); + } + } +} diff --git a/api/src/org/apache/cloudstack/api/command/admin/region/UpdateRegionCmd.java b/api/src/org/apache/cloudstack/api/command/admin/region/UpdateRegionCmd.java new file mode 100644 index 000000000..79890d00e --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/admin/region/UpdateRegionCmd.java @@ -0,0 +1,95 @@ +// 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 org.apache.cloudstack.api.command.admin.region; + +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.RegionResponse; +import org.apache.cloudstack.region.Region; +import org.apache.cloudstack.region.RegionService; +import org.apache.log4j.Logger; + +import com.cloud.user.Account; + +@APICommand(name = "updateRegion", description="Updates a region", responseObject=RegionResponse.class) +public class UpdateRegionCmd extends BaseCmd { + public static final Logger s_logger = Logger.getLogger(UpdateRegionCmd.class.getName()); + private static final String s_name = "updateregionresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name=ApiConstants.ID, type=CommandType.INTEGER, required=true, description="Id of region to update") + private Integer id; + + @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="updates region with this name") + private String regionName; + + @Parameter(name=ApiConstants.END_POINT, type=CommandType.STRING, description="updates region with this end point") + private String endPoint; + + @Inject RegionService _regionService; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public Integer getId() { + return id; + } + + public String getRegionName() { + return regionName; + } + + public String getEndPoint() { + return endPoint; + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + return Account.ACCOUNT_ID_SYSTEM; + } + + @Override + public void execute(){ + Region region = _regionService.updateRegion(getId(), getRegionName(), getEndPoint()); + if (region != null) { + RegionResponse response = _responseGenerator.createRegionResponse(region); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update Region"); + } + } +} diff --git a/api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java new file mode 100644 index 000000000..2a1a47a13 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java @@ -0,0 +1,100 @@ +// 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 org.apache.cloudstack.api.command.admin.resource; + +import java.util.Date; +import java.util.List; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.AlertResponse; +import org.apache.cloudstack.api.response.ConditionResponse; +import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.user.Account; + +@APICommand(name = "archiveAlerts", description = "Archive one or more alerts.", responseObject = SuccessResponse.class) +public class ArchiveAlertsCmd extends BaseCmd { + + public static final Logger s_logger = Logger.getLogger(ArchiveAlertsCmd.class.getName()); + + private static final String s_name = "archivealertsresponse"; + + // /////////////////////////////////////////////////// + // ////////////// API parameters ///////////////////// + // /////////////////////////////////////////////////// + + @Parameter(name = ApiConstants.IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = AlertResponse.class, + description = "the IDs of the alerts") + private List ids; + + @Parameter(name=ApiConstants.OLDER_THAN, type=CommandType.DATE, description="archive alerts older than this date (use format \"yyyy-MM-dd\")") + private Date olderThan; + + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "archive by alert type") + private String type; + + // /////////////////////////////////////////////////// + // ///////////////// Accessors /////////////////////// + // /////////////////////////////////////////////////// + + public List getIds() { + return ids; + } + + public Date getOlderThan() { + return olderThan; + } + + public String getType() { + return type; + } + + // /////////////////////////////////////////////////// + // ///////////// API Implementation/////////////////// + // /////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + return Account.ACCOUNT_ID_SYSTEM; + } + + @Override + public void execute() { + if(ids == null && type == null && olderThan == null) { + throw new InvalidParameterValueException("either ids, type or olderthan must be specified"); + } + boolean result = _mgr.archiveAlerts(this); + if (result) { + SuccessResponse response = new SuccessResponse(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Unable to archive Alerts, one or more parameters has invalid values"); + } + } +} diff --git a/api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java new file mode 100644 index 000000000..f03793c4f --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java @@ -0,0 +1,99 @@ +// 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 org.apache.cloudstack.api.command.admin.resource; + +import java.util.Date; +import java.util.List; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.AlertResponse; +import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.user.Account; + +@APICommand(name = "deleteAlerts", description = "Delete one or more alerts.", responseObject = SuccessResponse.class) +public class DeleteAlertsCmd extends BaseCmd { + + public static final Logger s_logger = Logger.getLogger(DeleteAlertsCmd.class.getName()); + + private static final String s_name = "deletealertsresponse"; + + // /////////////////////////////////////////////////// + // ////////////// API parameters ///////////////////// + // /////////////////////////////////////////////////// + + @Parameter(name = ApiConstants.IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = AlertResponse.class, + description = "the IDs of the alerts") + private List ids; + + @Parameter(name=ApiConstants.OLDER_THAN, type=CommandType.DATE, description="delete alerts older than (including) this date (use format \"yyyy-MM-dd\")") + private Date olderThan; + + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "delete by alert type") + private String type; + + // /////////////////////////////////////////////////// + // ///////////////// Accessors /////////////////////// + // /////////////////////////////////////////////////// + + public List getIds() { + return ids; + } + + public Date getOlderThan() { + return olderThan; + } + + public String getType() { + return type; + } + + // /////////////////////////////////////////////////// + // ///////////// API Implementation/////////////////// + // /////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + return Account.ACCOUNT_ID_SYSTEM; + } + + @Override + public void execute() { + if(ids == null && type == null && olderThan == null) { + throw new InvalidParameterValueException("either ids, type or olderthan must be specified"); + } + boolean result = _mgr.deleteAlerts(this); + if (result) { + SuccessResponse response = new SuccessResponse(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Unable to delete Alerts, one or more parameters has invalid values"); + } + } +} diff --git a/api/src/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java index db7a20b02..015d82bcc 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java @@ -20,14 +20,14 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - -import com.cloud.alert.Alert; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.AlertResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + +import com.cloud.alert.Alert; import com.cloud.utils.Pair; @APICommand(name = "listAlerts", description = "Lists all alerts.", responseObject = AlertResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java b/api/src/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java index ce20a3e27..b0badb8bb 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java @@ -20,16 +20,16 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.CapacityResponse; +import org.apache.cloudstack.api.response.ClusterResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.PodResponse; -import org.apache.cloudstack.api.response.ClusterResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.capacity.Capacity; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/resource/UploadCustomCertificateCmd.java b/api/src/org/apache/cloudstack/api/command/admin/resource/UploadCustomCertificateCmd.java index 97ec1dcee..9704c640f 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/resource/UploadCustomCertificateCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/resource/UploadCustomCertificateCmd.java @@ -16,11 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.resource; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.CustomCertificateResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/ConfigureVirtualRouterElementCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/ConfigureVirtualRouterElementCmd.java index 766e19cbe..f19e0fae7 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/router/ConfigureVirtualRouterElementCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/router/ConfigureVirtualRouterElementCmd.java @@ -16,24 +16,26 @@ // under the License. package org.apache.cloudstack.api.command.admin.router; -import org.apache.log4j.Logger; +import java.util.List; + +import javax.inject.Inject; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; -import org.apache.cloudstack.api.PlugService; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.VirtualRouterProviderResponse; -import com.cloud.network.VirtualRouterProvider; -import com.cloud.network.element.VirtualRouterElementService; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.ResourceUnavailableException; +import com.cloud.network.VirtualRouterProvider; +import com.cloud.network.element.VirtualRouterElementService; import com.cloud.user.Account; import com.cloud.user.UserContext; @@ -42,8 +44,8 @@ public class ConfigureVirtualRouterElementCmd extends BaseAsyncCmd { public static final Logger s_logger = Logger.getLogger(ConfigureVirtualRouterElementCmd.class.getName()); private static final String s_name = "configurevirtualrouterelementresponse"; - @PlugService - private VirtualRouterElementService _service; + @Inject + private List _service; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -115,7 +117,7 @@ public Long getInstanceId() { @Override public void execute() throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException{ UserContext.current().setEventDetails("Virtual router element: " + id); - VirtualRouterProvider result = _service.configure(this); + VirtualRouterProvider result = _service.get(0).configure(this); if (result != null){ VirtualRouterProviderResponse routerResponse = _responseGenerator.createVirtualRouterProviderResponse(result); routerResponse.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/CreateVirtualRouterElementCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/CreateVirtualRouterElementCmd.java index 54a840987..39fac1362 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/router/CreateVirtualRouterElementCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/router/CreateVirtualRouterElementCmd.java @@ -16,12 +16,20 @@ // under the License. package org.apache.cloudstack.api.command.admin.router; -import org.apache.cloudstack.api.*; -import org.apache.cloudstack.api.response.ProviderResponse; -import org.apache.log4j.Logger; +import java.util.List; + +import javax.inject.Inject; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCreateCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.ProviderResponse; import org.apache.cloudstack.api.response.VirtualRouterProviderResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.ResourceAllocationException; import com.cloud.network.VirtualRouterProvider; @@ -35,8 +43,8 @@ public class CreateVirtualRouterElementCmd extends BaseAsyncCreateCmd { public static final Logger s_logger = Logger.getLogger(CreateVirtualRouterElementCmd.class.getName()); private static final String s_name = "createvirtualrouterelementresponse"; - @PlugService - private VirtualRouterElementService _service; + @Inject + private List _service; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -76,7 +84,7 @@ public long getEntityOwnerId() { @Override public void execute(){ UserContext.current().setEventDetails("Virtual router element Id: "+getEntityId()); - VirtualRouterProvider result = _service.getCreatedElement(getEntityId()); + VirtualRouterProvider result = _service.get(0).getCreatedElement(getEntityId()); if (result != null) { VirtualRouterProviderResponse response = _responseGenerator.createVirtualRouterProviderResponse(result); response.setResponseName(getCommandName()); @@ -88,7 +96,7 @@ public void execute(){ @Override public void create() throws ResourceAllocationException { - VirtualRouterProvider result = _service.addElement(getNspId(), VirtualRouterProviderType.VirtualRouter); + VirtualRouterProvider result = _service.get(0).addElement(getNspId(), VirtualRouterProviderType.VirtualRouter); if (result != null) { setEntityId(result.getId()); setEntityUuid(result.getUuid()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/DestroyRouterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/DestroyRouterCmd.java index 1645456bf..3efc865e4 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/router/DestroyRouterCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/router/DestroyRouterCmd.java @@ -16,16 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.router; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainRouterResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java index 198d8766b..d2b26c0ac 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java @@ -16,20 +16,19 @@ // under the License. package org.apache.cloudstack.api.command.admin.router; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.DomainRouterResponse; import org.apache.cloudstack.api.response.HostResponse; import org.apache.cloudstack.api.response.ListResponse; -import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.response.NetworkResponse; +import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.response.UserVmResponse; import org.apache.cloudstack.api.response.VpcResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; import com.cloud.async.AsyncJob; diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java index 0a93ea5ab..9420473a5 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java @@ -19,18 +19,19 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.command.user.network.ListNetworkOfferingsCmd; -import org.apache.cloudstack.api.response.ProviderResponse; -import org.apache.log4j.Logger; +import javax.inject.Inject; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; -import org.apache.cloudstack.api.PlugService; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.command.user.network.ListNetworkOfferingsCmd; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.ProviderResponse; import org.apache.cloudstack.api.response.VirtualRouterProviderResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.ResourceAllocationException; @@ -43,8 +44,9 @@ public class ListVirtualRouterElementsCmd extends BaseListCmd { public static final Logger s_logger = Logger.getLogger(ListNetworkOfferingsCmd.class.getName()); private static final String _name = "listvirtualrouterelementsresponse"; - @PlugService - private VirtualRouterElementService _service; + // TODO, VirtualRouterElementServer is not singleton in system! + @Inject + private List _service; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// @@ -95,7 +97,7 @@ public String getCommandName() { @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException { - List providers = _service.searchForVirtualRouterElement(this); + List providers = _service.get(0).searchForVirtualRouterElement(this); ListResponse response = new ListResponse(); List providerResponses = new ArrayList(); for (VirtualRouterProvider provider : providers) { diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/RebootRouterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/RebootRouterCmd.java index a095fce9c..c9b518f63 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/router/RebootRouterCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/router/RebootRouterCmd.java @@ -16,11 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.router; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainRouterResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java index 595afc76d..1d3930b6b 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java @@ -16,11 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.router; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainRouterResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java index 571b2c199..60dd9386c 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java @@ -16,16 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.router; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainRouterResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/router/UpgradeRouterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/router/UpgradeRouterCmd.java index f8742a2ce..b049f66f6 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/router/UpgradeRouterCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/router/UpgradeRouterCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.router; -import org.apache.cloudstack.api.*; -import org.apache.cloudstack.api.response.DiskOfferingResponse; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainRouterResponse; +import org.apache.cloudstack.api.response.ServiceOfferingResponse; +import org.apache.log4j.Logger; + import com.cloud.network.router.VirtualRouter; import com.cloud.user.Account; @@ -38,7 +42,7 @@ public class UpgradeRouterCmd extends BaseCmd { required=true, description="The ID of the router") private Long id; - @Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.UUID, entityType = DiskOfferingResponse.class, + @Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.UUID, entityType = ServiceOfferingResponse.class, required=true, description="the service offering ID to apply to the domain router") private Long serviceOfferingId; diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java index ec62858f5..dbd9bff63 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/storage/AddS3Cmd.java @@ -18,25 +18,26 @@ */ package org.apache.cloudstack.api.command.admin.storage; +import static com.cloud.user.Account.ACCOUNT_ID_SYSTEM; import static org.apache.cloudstack.api.ApiConstants.S3_ACCESS_KEY; +import static org.apache.cloudstack.api.ApiConstants.S3_BUCKET_NAME; import static org.apache.cloudstack.api.ApiConstants.S3_CONNECTION_TIMEOUT; import static org.apache.cloudstack.api.ApiConstants.S3_END_POINT; import static org.apache.cloudstack.api.ApiConstants.S3_HTTPS_FLAG; import static org.apache.cloudstack.api.ApiConstants.S3_MAX_ERROR_RETRY; import static org.apache.cloudstack.api.ApiConstants.S3_SECRET_KEY; import static org.apache.cloudstack.api.ApiConstants.S3_SOCKET_TIMEOUT; -import static org.apache.cloudstack.api.ApiConstants.S3_BUCKET_NAME; +import static org.apache.cloudstack.api.BaseCmd.CommandType.BOOLEAN; import static org.apache.cloudstack.api.BaseCmd.CommandType.INTEGER; import static org.apache.cloudstack.api.BaseCmd.CommandType.STRING; -import static org.apache.cloudstack.api.BaseCmd.CommandType.BOOLEAN; -import static com.cloud.user.Account.ACCOUNT_ID_SYSTEM; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.S3Response; + import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.DiscoveryException; import com.cloud.exception.InsufficientCapacityException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/CancelPrimaryStorageMaintenanceCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/CancelPrimaryStorageMaintenanceCmd.java index 59a2164e4..b50cb277b 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/storage/CancelPrimaryStorageMaintenanceCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/storage/CancelPrimaryStorageMaintenanceCmd.java @@ -16,16 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.storage; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.StoragePoolResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ResourceUnavailableException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java index b5068115e..5178d6858 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java @@ -19,19 +19,24 @@ import java.net.UnknownHostException; import java.util.Map; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ClusterResponse; import org.apache.cloudstack.api.response.PodResponse; +import org.apache.cloudstack.api.response.StoragePoolResponse; import org.apache.cloudstack.api.response.ZoneResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.StoragePoolResponse; import com.cloud.exception.ResourceInUseException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.storage.StoragePool; import com.cloud.user.Account; + @SuppressWarnings("rawtypes") @APICommand(name = "createStoragePool", description="Creates a storage pool.", responseObject=StoragePoolResponse.class) public class CreateStoragePoolCmd extends BaseCmd { @@ -44,7 +49,7 @@ public class CreateStoragePoolCmd extends BaseCmd { ///////////////////////////////////////////////////// @Parameter(name=ApiConstants.CLUSTER_ID, type=CommandType.UUID, entityType = ClusterResponse.class, - required=true, description="the cluster ID for the storage pool") + description="the cluster ID for the storage pool") private Long clusterId; @Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, description="the details for the storage pool") @@ -54,7 +59,7 @@ public class CreateStoragePoolCmd extends BaseCmd { private String storagePoolName; @Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType = PodResponse.class, - required=true, description="the Pod ID for the storage pool") + description="the Pod ID for the storage pool") private Long podId; @Parameter(name=ApiConstants.TAGS, type=CommandType.STRING, description="the tags for the storage pool") @@ -66,6 +71,14 @@ public class CreateStoragePoolCmd extends BaseCmd { @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class, required=true, description="the Zone ID for the storage pool") private Long zoneId; + + @Parameter(name=ApiConstants.PROVIDER, type=CommandType.STRING, + required=false, description="the storage provider name") + private String storageProviderName; + + @Parameter(name=ApiConstants.SCOPE, type=CommandType.STRING, + required=false, description="the scope of the storage: cluster or zone") + private String scope; ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// @@ -98,6 +111,14 @@ public String getUrl() { public Long getZoneId() { return zoneId; } + + public String getStorageProviderName() { + return this.storageProviderName; + } + + public String getScope() { + return this.scope; + } ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/DeletePoolCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/DeletePoolCmd.java index 8cf4a4b79..6aaf53ea5 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/storage/DeletePoolCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/storage/DeletePoolCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.storage; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.StoragePoolResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.storage.StoragePool; import com.cloud.storage.StoragePoolStatus; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/ListS3sCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/ListS3sCmd.java index d0f6d7221..4ab71de24 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/storage/ListS3sCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/storage/ListS3sCmd.java @@ -26,6 +26,7 @@ import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.S3Response; + import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.NetworkRuleConflictException; @@ -34,7 +35,7 @@ import com.cloud.storage.S3; @APICommand(name = "listS3s", description = "Lists S3s", responseObject = S3Response.class, since = "4.0.0") -public final class ListS3sCmd extends BaseListCmd { +public class ListS3sCmd extends BaseListCmd { private static final String COMMAND_NAME = "lists3sresponse"; diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java index 9c5c584b7..02b98037b 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java @@ -16,12 +16,7 @@ // under the License. package org.apache.cloudstack.api.command.admin.storage; -import java.util.ArrayList; -import java.util.List; - import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; @@ -29,11 +24,10 @@ import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.response.StoragePoolResponse; -import org.apache.cloudstack.api.response.VolumeResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; -import com.cloud.storage.StoragePool; -import com.cloud.utils.Pair; @APICommand(name = "listStoragePools", description="Lists storage pools.", responseObject=StoragePoolResponse.class) public class ListStoragePoolsCmd extends BaseListCmd { diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/ListStorageProvidersCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/ListStorageProvidersCmd.java new file mode 100644 index 000000000..0dfc6633c --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/admin/storage/ListStorageProvidersCmd.java @@ -0,0 +1,72 @@ +/* + * 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 org.apache.cloudstack.api.command.admin.storage; + +import java.util.List; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseListCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.StorageProviderResponse; +import org.apache.log4j.Logger; + +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.NetworkRuleConflictException; +import com.cloud.exception.ResourceAllocationException; +import com.cloud.exception.ResourceUnavailableException; + +@APICommand(name = "listStorageProviders", description="Lists storage providers.", responseObject=StorageProviderResponse.class) +public class ListStorageProvidersCmd extends BaseListCmd { + public static final Logger s_logger = Logger.getLogger(ListStorageProvidersCmd.class.getName()); + private static final String s_name = "liststorageprovidersresponse"; + + @Parameter(name=ApiConstants.TYPE, type=CommandType.STRING, description="the type of storage provider: either primary or image", required = true) + private String type; + + @Override + public String getCommandName() { + return s_name; + } + + public String getType() { + return this.type; + } + + @Override + public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, + NetworkRuleConflictException { + if (getType() == null) { + throw new ServerApiException(ApiErrorCode.MALFORMED_PARAMETER_ERROR, "need to specify type: either primary or image"); + } + + List providers = this.dataStoreProviderApiService.getDataStoreProviders(getType()); + ListResponse responses = new ListResponse(); + for (StorageProviderResponse provider : providers) { + provider.setObjectName("dataStoreProvider"); + } + responses.setResponses(providers); + responses.setResponseName(this.getCommandName()); + this.setResponseObject(responses); + } +} diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/PreparePrimaryStorageForMaintenanceCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/PreparePrimaryStorageForMaintenanceCmd.java index ab9c22690..95a92149d 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/storage/PreparePrimaryStorageForMaintenanceCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/storage/PreparePrimaryStorageForMaintenanceCmd.java @@ -16,16 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.storage; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.StoragePoolResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InsufficientCapacityException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java b/api/src/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java index b60ed7f97..2ecb90f69 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java @@ -18,11 +18,15 @@ import java.util.List; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.StoragePoolResponse; +import org.apache.log4j.Logger; + import com.cloud.storage.StoragePool; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/swift/AddSwiftCmd.java b/api/src/org/apache/cloudstack/api/command/admin/swift/AddSwiftCmd.java index 61f903e9c..364d916ad 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/swift/AddSwiftCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/swift/AddSwiftCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.swift; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.HostResponse; import org.apache.cloudstack.api.response.SwiftResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.DiscoveryException; import com.cloud.storage.Swift; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/swift/ListSwiftsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/swift/ListSwiftsCmd.java index af2664379..7cfe6e1ab 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/swift/ListSwiftsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/swift/ListSwiftsCmd.java @@ -20,14 +20,14 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.HostResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.SwiftResponse; +import org.apache.log4j.Logger; + import com.cloud.storage.Swift; import com.cloud.user.Account; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/DestroySystemVmCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/DestroySystemVmCmd.java index dc53ea751..ef7af5c0a 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/DestroySystemVmCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/DestroySystemVmCmd.java @@ -16,11 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.systemvm; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SystemVmResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java index 27e2ee40d..f230a20d5 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java @@ -20,8 +20,6 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; @@ -31,6 +29,8 @@ import org.apache.cloudstack.api.response.StoragePoolResponse; import org.apache.cloudstack.api.response.SystemVmResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.utils.Pair; import com.cloud.vm.VirtualMachine; diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java index 909fe20f8..31871b92b 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java @@ -16,18 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.admin.systemvm; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.HostResponse; -import org.apache.cloudstack.api.response.SystemVmResponse; import org.apache.cloudstack.api.response.SystemVmInstanceResponse; +import org.apache.cloudstack.api.response.SystemVmResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java index 2e7b53033..6e4c925ff 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java @@ -16,16 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.systemvm; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SystemVmResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/StartSystemVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/StartSystemVMCmd.java index 40f9d62aa..f97d89992 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/StartSystemVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/StartSystemVMCmd.java @@ -16,16 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.systemvm; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SystemVmResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java index 134043cb3..5f9a3efbd 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java @@ -16,11 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.systemvm; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SystemVmResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java index 14046f39a..e91d0053c 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java @@ -16,13 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.admin.systemvm; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.command.user.vm.UpgradeVMCmd; -import org.apache.cloudstack.api.response.DiskOfferingResponse; +import org.apache.cloudstack.api.response.ServiceOfferingResponse; +import org.apache.cloudstack.api.response.SystemVmResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SystemVmResponse; import com.cloud.exception.InvalidParameterValueException; import com.cloud.offering.ServiceOffering; import com.cloud.user.Account; @@ -44,7 +48,7 @@ public class UpgradeSystemVMCmd extends BaseCmd { required=true, description="The ID of the system vm") private Long id; - @Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.UUID, entityType=DiskOfferingResponse.class, + @Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.UUID, entityType=ServiceOfferingResponse.class, required=true, description="the service offering ID to apply to the system vm") private Long serviceOfferingId; diff --git a/api/src/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java b/api/src/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java index 74f339155..7d41d10ae 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java @@ -18,15 +18,15 @@ import java.util.List; -import org.apache.cloudstack.api.response.ZoneResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.TemplateResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficMonitorCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficMonitorCmd.java new file mode 100644 index 000000000..48424fef2 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficMonitorCmd.java @@ -0,0 +1,107 @@ +// 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 org.apache.cloudstack.api.command.admin.usage; + +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.TrafficMonitorResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.host.Host; +import com.cloud.user.Account; +import com.cloud.utils.exception.CloudRuntimeException; + +@APICommand(name = "addTrafficMonitor", description="Adds Traffic Monitor Host for Direct Network Usage", responseObject = TrafficMonitorResponse.class) +public class AddTrafficMonitorCmd extends BaseCmd { + public static final Logger s_logger = Logger.getLogger(AddTrafficMonitorCmd.class.getName()); + private static final String s_name = "addtrafficmonitorresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class, + required = true, description="Zone in which to add the external firewall appliance.") + private Long zoneId; + + @Parameter(name=ApiConstants.URL, type=CommandType.STRING, required = true, description="URL of the traffic monitor Host") + private String url; + + @Parameter(name=ApiConstants.INCL_ZONES, type=CommandType.STRING, description="Traffic going into the listed zones will be metered") + private String inclZones; + + @Parameter(name=ApiConstants.EXCL_ZONES, type=CommandType.STRING, description="Traffic going into the listed zones will not be metered") + private String exclZones; + + /////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public String getInclZones() { + return inclZones; + } + + public String getExclZones() { + return exclZones; + } + + public Long getZoneId() { + return zoneId; + } + + public String getUrl() { + return url; + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + return Account.ACCOUNT_ID_SYSTEM; + } + + @Override + public void execute(){ + try { + Host trafficMonitor = _networkUsageService.addTrafficMonitor(this); + TrafficMonitorResponse response = _responseGenerator.createTrafficMonitorResponse(trafficMonitor); + response.setObjectName("trafficmonitor"); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } catch (InvalidParameterValueException ipve) { + throw new ServerApiException(ApiErrorCode.PARAM_ERROR, ipve.getMessage()); + } catch (CloudRuntimeException cre) { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, cre.getMessage()); + } + } +} + diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java index a73362453..7211bae8d 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.usage; -import org.apache.cloudstack.api.response.PhysicalNetworkResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.PhysicalNetworkResponse; import org.apache.cloudstack.api.response.TrafficTypeResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ResourceAllocationException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficMonitorCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficMonitorCmd.java new file mode 100644 index 000000000..e3bb299dc --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficMonitorCmd.java @@ -0,0 +1,84 @@ +// 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 org.apache.cloudstack.api.command.admin.usage; + +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.HostResponse; +import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.user.Account; + +@APICommand(name = "deleteTrafficMonitor", description="Deletes an traffic monitor host.", responseObject = SuccessResponse.class) +public class DeleteTrafficMonitorCmd extends BaseCmd { + public static final Logger s_logger = Logger.getLogger(DeleteTrafficMonitorCmd.class.getName()); + private static final String s_name = "deletetrafficmonitorresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = HostResponse.class, + required = true, description="Id of the Traffic Monitor Host.") + private Long id; + + /////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public Long getId() { + return id; + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + return Account.ACCOUNT_ID_SYSTEM; + } + + @Override + public void execute(){ + try { + boolean result = _networkUsageService.deleteTrafficMonitor(this); + if (result) { + SuccessResponse response = new SuccessResponse(getCommandName()); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete traffic monitor."); + } + } catch (InvalidParameterValueException e) { + throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Failed to delete traffic monitor."); + } + } +} diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficTypeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficTypeCmd.java index 526921830..32e0512a2 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficTypeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficTypeCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.usage; -import org.apache.cloudstack.api.response.TrafficTypeResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.cloudstack.api.response.TrafficTypeResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.user.Account; diff --git a/server/src/com/cloud/api/commands/GenerateUsageRecordsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/GenerateUsageRecordsCmd.java similarity index 94% rename from server/src/com/cloud/api/commands/GenerateUsageRecordsCmd.java rename to api/src/org/apache/cloudstack/api/command/admin/usage/GenerateUsageRecordsCmd.java index 4206cf828..13710f974 100644 --- a/server/src/com/cloud/api/commands/GenerateUsageRecordsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/usage/GenerateUsageRecordsCmd.java @@ -14,7 +14,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -package com.cloud.api.commands; +package org.apache.cloudstack.api.command.admin.usage; import java.util.Date; @@ -24,7 +24,6 @@ import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.response.SuccessResponse; -import com.cloud.server.ManagementServerExt; import com.cloud.user.Account; @APICommand(name = "generateUsageRecords", description="Generates usage records. This will generate records only if there any records to be generated, i.e if the scheduled usage job was not run or failed", responseObject=SuccessResponse.class) @@ -79,8 +78,7 @@ public long getEntityOwnerId() { @Override public void execute(){ - ManagementServerExt _mgrExt = (ManagementServerExt)_mgr; - boolean result = _mgrExt.generateUsageRecords(this); + boolean result = _usageService.generateUsageRecords(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/GetUsageRecordsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/GetUsageRecordsCmd.java new file mode 100644 index 000000000..f4960dd0e --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/admin/usage/GetUsageRecordsCmd.java @@ -0,0 +1,126 @@ +// 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 org.apache.cloudstack.api.command.admin.usage; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.TimeZone; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseListCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.response.AccountResponse; +import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.cloudstack.api.response.UsageRecordResponse; +import org.apache.cloudstack.usage.Usage; +import org.apache.log4j.Logger; + +@APICommand(name = "listUsageRecords", description="Lists usage records for accounts", responseObject=UsageRecordResponse.class) +public class GetUsageRecordsCmd extends BaseListCmd { + public static final Logger s_logger = Logger.getLogger(GetUsageRecordsCmd.class.getName()); + + private static final String s_name = "listusagerecordsresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="List usage records for the specified user.") + private String accountName; + + @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType = DomainResponse.class, + description="List usage records for the specified domain.") + private Long domainId; + + @Parameter(name=ApiConstants.END_DATE, type=CommandType.DATE, required=true, description="End date range for usage record query. Use yyyy-MM-dd as the date format, e.g. startDate=2009-06-03.") + private Date endDate; + + @Parameter(name=ApiConstants.START_DATE, type=CommandType.DATE, required=true, description="Start date range for usage record query. Use yyyy-MM-dd as the date format, e.g. startDate=2009-06-01.") + private Date startDate; + + @Parameter(name=ApiConstants.ACCOUNT_ID, type=CommandType.UUID, entityType = AccountResponse.class, + description="List usage records for the specified account") + private Long accountId; + + @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, entityType = ProjectResponse.class, + description="List usage records for specified project") + private Long projectId; + + @Parameter(name=ApiConstants.TYPE, type=CommandType.LONG, description="List usage records for the specified usage type") + private Long usageType; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public String getAccountName() { + return accountName; + } + + public Long getDomainId() { + return domainId; + } + + public Date getEndDate() { + return endDate; + } + + public Date getStartDate() { + return startDate; + } + + public Long getAccountId() { + return accountId; + } + + public Long getUsageType() { + return usageType; + } + + public Long getProjectId() { + return projectId; + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public void execute(){ + List usageRecords = _usageService.getUsageRecords(this); + ListResponse response = new ListResponse(); + List usageResponses = new ArrayList(); + for(Usage usageRecord: usageRecords){ + UsageRecordResponse usageResponse = _responseGenerator.createUsageResponse(usageRecord); + usageResponse.setObjectName("usagerecord"); + usageResponses.add(usageResponse); + } + + response.setResponses(usageResponses); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } +} diff --git a/server/src/com/cloud/api/commands/ListTrafficMonitorsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficMonitorsCmd.java similarity index 79% rename from server/src/com/cloud/api/commands/ListTrafficMonitorsCmd.java rename to api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficMonitorsCmd.java index 21ad33913..e8e3b22c1 100644 --- a/server/src/com/cloud/api/commands/ListTrafficMonitorsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficMonitorsCmd.java @@ -14,29 +14,29 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -package com.cloud.api.commands; +package org.apache.cloudstack.api.command.admin.usage; import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.command.user.offering.ListServiceOfferingsCmd; -import org.apache.cloudstack.api.response.ZoneResponse; -import org.apache.log4j.Logger; +import javax.inject.Inject; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.command.user.offering.ListServiceOfferingsCmd; import org.apache.cloudstack.api.response.ListResponse; -import com.cloud.host.Host; -import com.cloud.network.NetworkUsageManager; -import com.cloud.server.ManagementService; import org.apache.cloudstack.api.response.TrafficMonitorResponse; -import com.cloud.utils.component.ComponentLocator; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + +import com.cloud.host.Host; + @APICommand(name = "listTrafficMonitors", description="List traffic monitor Hosts.", responseObject = TrafficMonitorResponse.class) public class ListTrafficMonitorsCmd extends BaseListCmd { - public static final Logger s_logger = Logger.getLogger(ListServiceOfferingsCmd.class.getName()); + public static final Logger s_logger = Logger.getLogger(ListServiceOfferingsCmd.class.getName()); private static final String s_name = "listtrafficmonitorsresponse"; ///////////////////////////////////////////////////// @@ -66,17 +66,15 @@ public String getCommandName() { @Override public void execute(){ - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - NetworkUsageManager networkUsageMgr = locator.getManager(NetworkUsageManager.class); - List trafficMonitors = networkUsageMgr.listTrafficMonitors(this); + List trafficMonitors = _networkUsageService.listTrafficMonitors(this); ListResponse listResponse = new ListResponse(); List responses = new ArrayList(); for (Host trafficMonitor : trafficMonitors) { - TrafficMonitorResponse response = networkUsageMgr.getApiResponse(trafficMonitor); - response.setObjectName("trafficmonitor"); - response.setResponseName(getCommandName()); - responses.add(response); + TrafficMonitorResponse response = _responseGenerator.createTrafficMonitorResponse(trafficMonitor); + response.setObjectName("trafficmonitor"); + response.setResponseName(getCommandName()); + responses.add(response); } listResponse.setResponses(responses); diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypeImplementorsCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypeImplementorsCmd.java index 3cd00c02a..14b69c394 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypeImplementorsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypeImplementorsCmd.java @@ -19,12 +19,15 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseListCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.TrafficTypeImplementorResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.ResourceAllocationException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java index 2cbb13df0..f239996a7 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java @@ -20,15 +20,15 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.PhysicalNetworkResponse; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.PhysicalNetworkResponse; import org.apache.cloudstack.api.response.ProviderResponse; import org.apache.cloudstack.api.response.TrafficTypeResponse; +import org.apache.log4j.Logger; + import com.cloud.network.PhysicalNetworkTrafficType; import com.cloud.user.Account; import com.cloud.utils.Pair; diff --git a/server/src/com/cloud/api/commands/ListUsageTypesCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/ListUsageTypesCmd.java similarity index 90% rename from server/src/com/cloud/api/commands/ListUsageTypesCmd.java rename to api/src/org/apache/cloudstack/api/command/admin/usage/ListUsageTypesCmd.java index dfa5dc1bb..bc0291173 100644 --- a/server/src/com/cloud/api/commands/ListUsageTypesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/usage/ListUsageTypesCmd.java @@ -14,7 +14,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -package com.cloud.api.commands; +package org.apache.cloudstack.api.command.admin.usage; import java.util.List; @@ -23,7 +23,6 @@ import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.response.ListResponse; -import com.cloud.server.ManagementServerExt; import org.apache.cloudstack.api.response.UsageTypeResponse; import com.cloud.user.Account; @@ -43,8 +42,7 @@ public long getEntityOwnerId() { @Override public void execute() { - ManagementServerExt _mgrExt = (ManagementServerExt)_mgr; - List result = _mgrExt.listUsageTypes(); + List result = _usageService.listUsageTypes(); ListResponse response = new ListResponse(); response.setResponses(result); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java index fca070281..d3cf3f843 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java @@ -16,16 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.usage; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.TrafficTypeResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.network.PhysicalNetworkTrafficType; diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java index 1f1e3abc1..7b3f230d1 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java @@ -16,16 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.user; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.UserResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; import com.cloud.user.User; import com.cloud.user.UserContext; @@ -56,7 +56,7 @@ public class CreateUserCmd extends BaseCmd { @Parameter(name=ApiConstants.LASTNAME, type=CommandType.STRING, required=true, description="lastname") private String lastname; - @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, required=true, description="Hashed password (Default is MD5). If you wish to use any other hashing algorithm, you would need to write a custom authentication adapter See Docs section.") + @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, required=true, description="Clear text password (Default hashed to SHA256SALT). If you wish to use any other hashing algorithm, you would need to write a custom authentication adapter See Docs section.") private String password; @Parameter(name=ApiConstants.TIMEZONE, type=CommandType.STRING, description="Specifies a timezone for this command. For more information on the timezone parameter, see Time Zone Format.") @@ -65,6 +65,9 @@ public class CreateUserCmd extends BaseCmd { @Parameter(name=ApiConstants.USERNAME, type=CommandType.STRING, required=true, description="Unique username.") private String username; + @Parameter(name=ApiConstants.USER_ID, type=CommandType.STRING, description="User UUID, required for adding account from external provisioning system") + private String userUUID; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -101,6 +104,10 @@ public String getUserName() { return username; } + public String getUserUUID() { + return userUUID; + } + ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// @@ -132,7 +139,7 @@ public long getEntityOwnerId() { @Override public void execute(){ UserContext.current().setEventDetails("UserName: "+getUserName()+", FirstName :"+getFirstName()+", LastName: "+getLastName()); - User user = _accountService.createUser(getUserName(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimezone(), getAccountName(), getDomainId()); + User user = _accountService.createUser(getUserName(), getPassword(), getFirstName(), getLastName(), getEmail(), getTimezone(), getAccountName(), getDomainId(), getUserUUID()); if (user != null) { UserResponse response = _responseGenerator.createUserResponse(user); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java index 74a073c72..5683d58ab 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java @@ -16,21 +16,24 @@ // under the License. package org.apache.cloudstack.api.command.admin.user; -import org.apache.log4j.Logger; +import javax.inject.Inject; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.api.response.UserResponse; +import org.apache.cloudstack.region.RegionService; +import org.apache.log4j.Logger; + import com.cloud.user.Account; import com.cloud.user.User; import com.cloud.user.UserContext; -@APICommand(name = "deleteUser", description="Creates a user for an account", responseObject=UserResponse.class) +@APICommand(name = "deleteUser", description="Deletes a user for an account", responseObject=SuccessResponse.class) public class DeleteUserCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(DeleteUserCmd.class.getName()); @@ -39,9 +42,11 @@ public class DeleteUserCmd extends BaseCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=UserResponse.class, required=true, description="Deletes a user") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=UserResponse.class, required=true, description="id of the user to be deleted") private Long id; + @Inject RegionService _regionService; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -72,7 +77,7 @@ public long getEntityOwnerId() { @Override public void execute(){ UserContext.current().setEventDetails("UserId: "+getId()); - boolean result = _accountService.deleteUser(this); + boolean result = _regionService.deleteUser(this); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/DisableUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/DisableUserCmd.java index 6b59de567..6eaa46bed 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/user/DisableUserCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/user/DisableUserCmd.java @@ -16,16 +16,19 @@ // under the License. package org.apache.cloudstack.api.command.admin.user; -import org.apache.log4j.Logger; +import javax.inject.Inject; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.UserResponse; +import org.apache.cloudstack.region.RegionService; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.user.Account; @@ -46,6 +49,8 @@ public class DisableUserCmd extends BaseAsyncCmd { required=true, description="Disables user by user ID.") private Long id; + @Inject RegionService _regionService; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -87,7 +92,8 @@ public String getEventDescription() { @Override public void execute(){ UserContext.current().setEventDetails("UserId: "+getId()); - UserAccount user = _accountService.disableUser(getId()); + UserAccount user = _regionService.disableUser(this); + if (user != null){ UserResponse response = _responseGenerator.createUserResponse(user); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/EnableUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/EnableUserCmd.java index bcd0f43e0..382f67c98 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/user/EnableUserCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/user/EnableUserCmd.java @@ -16,11 +16,18 @@ // under the License. package org.apache.cloudstack.api.command.admin.user; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; +import javax.inject.Inject; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.UserResponse; +import org.apache.cloudstack.region.RegionService; +import org.apache.log4j.Logger; + import com.cloud.user.Account; import com.cloud.user.User; import com.cloud.user.UserAccount; @@ -39,6 +46,7 @@ public class EnableUserCmd extends BaseCmd { required=true, description="Enables user by user ID.") private Long id; + @Inject RegionService _regionService; ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// @@ -70,7 +78,8 @@ public long getEntityOwnerId() { @Override public void execute(){ UserContext.current().setEventDetails("UserId: "+getId()); - UserAccount user = _accountService.enableUser(getId()); + UserAccount user = _regionService.enableUser(this); + if (user != null){ UserResponse response = _responseGenerator.createUserResponse(user); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/GetUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/GetUserCmd.java index 2ffe4ab24..c7b7e09ee 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/user/GetUserCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/user/GetUserCmd.java @@ -16,13 +16,13 @@ // under the License. package org.apache.cloudstack.api.command.admin.user; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.UserResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.InvalidParameterValueException; import com.cloud.user.UserAccount; diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/ListUsersCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/ListUsersCmd.java index 3d68e2f48..c5c466c1f 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/user/ListUsersCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/user/ListUsersCmd.java @@ -16,14 +16,13 @@ // under the License. package org.apache.cloudstack.api.command.admin.user; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListAccountResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.UserResponse; +import org.apache.log4j.Logger; @APICommand(name = "listUsers", description="Lists user accounts", responseObject=UserResponse.class) public class ListUsersCmd extends BaseListAccountResourcesCmd { diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/LockUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/LockUserCmd.java index 1b00bfd29..dbe330317 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/user/LockUserCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/user/LockUserCmd.java @@ -16,15 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.user; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.UserResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; import com.cloud.user.User; import com.cloud.user.UserAccount; diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/RegisterCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/RegisterCmd.java index 06ffc5379..c92e65db6 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/user/RegisterCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/user/RegisterCmd.java @@ -16,14 +16,14 @@ // under the License. package org.apache.cloudstack.api.command.admin.user; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.RegisterResponse; import org.apache.cloudstack.api.response.UserResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; import com.cloud.user.User; diff --git a/api/src/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java b/api/src/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java index 00bfccc10..5ea2dbdef 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java @@ -16,11 +16,18 @@ // under the License. package org.apache.cloudstack.api.command.admin.user; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; +import javax.inject.Inject; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.UserResponse; +import org.apache.cloudstack.region.RegionService; +import org.apache.log4j.Logger; + import com.cloud.user.Account; import com.cloud.user.User; import com.cloud.user.UserAccount; @@ -52,7 +59,7 @@ public class UpdateUserCmd extends BaseCmd { @Parameter(name=ApiConstants.LASTNAME, type=CommandType.STRING, description="last name") private String lastname; - @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, description="Hashed password (default is MD5). If you wish to use any other hasing algorithm, you would need to write a custom authentication adapter") + @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, description="Clear text password (default hashed to SHA256SALT). If you wish to use any other hasing algorithm, you would need to write a custom authentication adapter") private String password; @Parameter(name=ApiConstants.SECRET_KEY, type=CommandType.STRING, description="The secret key for the user. Must be specified with userApiKey") @@ -64,6 +71,8 @@ public class UpdateUserCmd extends BaseCmd { @Parameter(name=ApiConstants.USERNAME, type=CommandType.STRING, description="Unique username") private String username; + @Inject RegionService _regionService; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -126,7 +135,8 @@ public long getEntityOwnerId() { @Override public void execute(){ UserContext.current().setEventDetails("UserId: "+getId()); - UserAccount user = _accountService.updateUser(this); + UserAccount user = _regionService.updateUser(this); + if (user != null){ UserResponse response = _responseGenerator.createUserResponse(user); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/vlan/CreateVlanIpRangeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vlan/CreateVlanIpRangeCmd.java index 9ac1e253b..541da1ece 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/vlan/CreateVlanIpRangeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/vlan/CreateVlanIpRangeCmd.java @@ -16,17 +16,21 @@ // under the License. package org.apache.cloudstack.api.command.admin.vlan; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; -import org.apache.cloudstack.api.response.PodResponse; +import org.apache.cloudstack.api.response.NetworkResponse; import org.apache.cloudstack.api.response.PhysicalNetworkResponse; +import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.response.ProjectResponse; -import org.apache.cloudstack.api.response.NetworkResponse; import org.apache.cloudstack.api.response.VlanIpRangeResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.dc.Vlan; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; @@ -71,7 +75,7 @@ public class CreateVlanIpRangeCmd extends BaseCmd { description="optional parameter. Have to be specified for Direct Untagged vlan only.") private Long podId; - @Parameter(name=ApiConstants.START_IP, type=CommandType.STRING, required=true, description="the beginning IP address in the VLAN IP range") + @Parameter(name=ApiConstants.START_IP, type=CommandType.STRING, description="the beginning IP address in the VLAN IP range") private String startIp; @Parameter(name=ApiConstants.VLAN, type=CommandType.STRING, description="the ID or VID of the VLAN. If not specified," + @@ -90,6 +94,19 @@ public class CreateVlanIpRangeCmd extends BaseCmd { description="the physical network id") private Long physicalNetworkId; + @Parameter(name=ApiConstants.START_IPV6, type=CommandType.STRING, description="the beginning IPv6 address in the IPv6 network range") + private String startIpv6; + + @Parameter(name=ApiConstants.END_IPV6, type=CommandType.STRING, description="the ending IPv6 address in the IPv6 network range") + private String endIpv6; + + @Parameter(name=ApiConstants.IP6_GATEWAY, type=CommandType.STRING, description="the gateway of the IPv6 network. Required " + + "for Shared networks and Isolated networks when it belongs to VPC") + private String ip6Gateway; + + @Parameter(name=ApiConstants.IP6_CIDR, type=CommandType.STRING, description="the CIDR of IPv6 network, must be at least /64") + private String ip6Cidr; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -137,6 +154,35 @@ public Long getZoneId() { public Long getProjectId() { return projectId; } + + public String getStartIpv6() { + if (startIpv6 == null) { + return null; + } + return startIpv6.toLowerCase(); + } + + public String getEndIpv6() { + if (endIpv6 == null) { + return null; + } + return endIpv6.toLowerCase(); + } + + public String getIp6Gateway() { + if (ip6Gateway == null) { + return null; + } + return ip6Gateway.toLowerCase(); + } + + public String getIp6Cidr() { + if (ip6Cidr == null) { + return null; + } + return ip6Cidr.toLowerCase(); + } + ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// @@ -149,7 +195,6 @@ public Long getPhysicalNetworkId() { return physicalNetworkId; } - @Override public String getCommandName() { return s_name; diff --git a/api/src/org/apache/cloudstack/api/command/admin/vlan/DedicatePublicIpRangeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vlan/DedicatePublicIpRangeCmd.java new file mode 100755 index 000000000..e7b1105af --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/admin/vlan/DedicatePublicIpRangeCmd.java @@ -0,0 +1,108 @@ +// 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 org.apache.cloudstack.api.command.admin.vlan; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.cloudstack.api.response.VlanIpRangeResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + +import com.cloud.dc.Vlan; +import com.cloud.exception.ResourceAllocationException; +import com.cloud.exception.ResourceUnavailableException; +import com.cloud.user.Account; + +@APICommand(name = "dedicatePublicIpRange", description="Dedicates a Public IP range to an account", responseObject=VlanIpRangeResponse.class) +public class DedicatePublicIpRangeCmd extends BaseCmd { + public static final Logger s_logger = Logger.getLogger(DedicatePublicIpRangeCmd.class.getName()); + + private static final String s_name = "dedicatepubliciprangeresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = VlanIpRangeResponse.class, + required=true, description="the id of the VLAN IP range") + private Long id; + + @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, required=true, + description="account who will own the VLAN") + private String accountName; + + @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, entityType = ProjectResponse.class, + description="project who will own the VLAN") + private Long projectId; + + @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType = DomainResponse.class, + required=true, description="domain ID of the account owning a VLAN") + private Long domainId; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public Long getId() { + return id; + } + + public String getAccountName() { + return accountName; + } + + public Long getDomainId() { + return domainId; + } + + public Long getProjectId() { + return projectId; + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + return Account.ACCOUNT_ID_SYSTEM; + } + + @Override + public void execute() throws ResourceUnavailableException, ResourceAllocationException { + Vlan result = _configService.dedicatePublicIpRange(this); + if (result != null) { + VlanIpRangeResponse response = _responseGenerator.createVlanIpRangeResponse(result); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to dedicate vlan ip range"); + } + } + +} diff --git a/api/src/org/apache/cloudstack/api/command/admin/vlan/DeleteVlanIpRangeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vlan/DeleteVlanIpRangeCmd.java index d45082a2a..6023b3d6d 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/vlan/DeleteVlanIpRangeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/vlan/DeleteVlanIpRangeCmd.java @@ -16,16 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.vlan; -import org.apache.cloudstack.api.response.VlanIpRangeResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.cloudstack.api.response.VlanIpRangeResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; @APICommand(name = "deleteVlanIpRange", description="Creates a VLAN IP range.", responseObject=SuccessResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/admin/vlan/ListVlanIpRangesCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vlan/ListVlanIpRangesCmd.java index 9b6b997c4..db6006a6f 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/vlan/ListVlanIpRangesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/vlan/ListVlanIpRangesCmd.java @@ -20,19 +20,19 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ListResponse; -import org.apache.cloudstack.api.response.PodResponse; -import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.NetworkResponse; import org.apache.cloudstack.api.response.PhysicalNetworkResponse; -import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.cloudstack.api.response.PodResponse; +import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.VlanIpRangeResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.dc.Vlan; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/admin/vlan/ReleasePublicIpRangeCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vlan/ReleasePublicIpRangeCmd.java new file mode 100644 index 000000000..91cc7d33d --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/admin/vlan/ReleasePublicIpRangeCmd.java @@ -0,0 +1,77 @@ +// 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 org.apache.cloudstack.api.command.admin.vlan; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.cloudstack.api.response.VlanIpRangeResponse; +import org.apache.log4j.Logger; + +import com.cloud.user.Account; + +@APICommand(name = "releasePublicIpRange", description="Releases a Public IP range back to the system pool", responseObject=SuccessResponse.class) +public class ReleasePublicIpRangeCmd extends BaseCmd { + public static final Logger s_logger = Logger.getLogger(ReleasePublicIpRangeCmd.class.getName()); + + private static final String s_name = "releasepubliciprangeresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = VlanIpRangeResponse.class, + required=true, description="the id of the Public IP range") + private Long id; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public Long getId() { + return id; + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + return Account.ACCOUNT_ID_SYSTEM; + } + + @Override + public void execute(){ + boolean result = _configService.releasePublicIpRange(this); + if (result) { + SuccessResponse response = new SuccessResponse(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release public ip range"); + } + } +} diff --git a/api/src/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java index 525e8d72f..152dd4e14 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java @@ -19,20 +19,23 @@ import java.util.List; -import org.apache.cloudstack.api.*; -import org.apache.cloudstack.api.command.user.vm.DeployVMCmd; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; - +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.command.user.vm.DeployVMCmd; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.NetworkResponse; import org.apache.cloudstack.api.response.SecurityGroupResponse; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; import com.cloud.uservm.UserVm; -@APICommand(name = "assignVirtualMachine", description="Move a user VM to another user under same domain.", responseObject=UserVmResponse.class, since="3.0.0") +@APICommand(name = "assignVirtualMachine", description="Assign a VM from one account to another under the same domain. This API is available for Basic zones with security groups and Advance zones with guest networks. The VM is restricted to move between accounts under same domain.", responseObject=UserVmResponse.class, since="3.0.0") public class AssignVMCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(AssignVMCmd.class.getName()); @@ -43,7 +46,7 @@ public class AssignVMCmd extends BaseCmd { ///////////////////////////////////////////////////// @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType=UserVmResponse.class, - required=true, description="the vm ID of the user VM to be moved") + required=true, description="id of the VM to be moved") private Long virtualMachineId; @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, required=true, description="account name of the new VM owner.") @@ -55,11 +58,11 @@ public class AssignVMCmd extends BaseCmd { //Network information @Parameter(name=ApiConstants.NETWORK_IDS, type=CommandType.LIST, collectionType=CommandType.UUID, entityType=NetworkResponse.class, - description="list of network ids that will be part of VM network after move in advanced network setting.") + description="list of new network ids in which the moved VM will participate. In case no network ids are provided the VM will be part of the default network for that zone. In case there is no network yet created for the new account the default network will be created.") private List networkIds; @Parameter(name=ApiConstants.SECURITY_GROUP_IDS, type=CommandType.LIST, collectionType=CommandType.UUID, entityType=SecurityGroupResponse.class, - description="comma separated list of security groups id that going to be applied to the virtual machine. Should be passed only when vm is moved in a zone with Basic Network support.") + description="list of security group ids to be applied on the virtual machine. In case no security groups are provided the VM is part of the default security group.") private List securityGroupIdList; ///////////////////////////////////////////////////// diff --git a/api/src/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java index e1f20a8e9..ddba78ea0 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java @@ -16,14 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.admin.vm; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; - +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.HostResponse; import org.apache.cloudstack.api.response.StoragePoolResponse; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/vm/RecoverVMCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vm/RecoverVMCmd.java index be4d10b8b..13e755c57 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/vm/RecoverVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/vm/RecoverVMCmd.java @@ -16,15 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.vm; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.ResourceAllocationException; import com.cloud.user.Account; import com.cloud.uservm.UserVm; diff --git a/api/src/org/apache/cloudstack/api/command/admin/vpc/CreatePrivateGatewayCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vpc/CreatePrivateGatewayCmd.java index 392b6276b..9fd736f85 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/vpc/CreatePrivateGatewayCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/vpc/CreatePrivateGatewayCmd.java @@ -16,19 +16,18 @@ // under the License. package org.apache.cloudstack.api.command.admin.vpc; -import org.apache.cloudstack.api.response.PhysicalNetworkResponse; -import org.apache.cloudstack.api.response.VpcResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.PhysicalNetworkResponse; import org.apache.cloudstack.api.response.PrivateGatewayResponse; +import org.apache.cloudstack.api.response.VpcResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/vpc/CreateVPCOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vpc/CreateVPCOfferingCmd.java index 8ccb9d5e6..4a3a92a21 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/vpc/CreateVPCOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/vpc/CreateVPCOfferingCmd.java @@ -16,13 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.admin.vpc; -import java.util.List; - -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; +import java.util.*; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCreateCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.VpcOfferingResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.ResourceAllocationException; import com.cloud.network.vpc.VpcOffering; @@ -48,6 +52,10 @@ public class CreateVPCOfferingCmd extends BaseAsyncCreateCmd{ description="services supported by the vpc offering") private List supportedServices; + @Parameter(name = ApiConstants.SERVICE_PROVIDER_LIST, type = CommandType.MAP, description = "provider to service mapping. " + + "If not specified, the provider for the service will be mapped to the default provider on the physical network") + private Map serviceProviderList; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -64,10 +72,33 @@ public List getSupportedServices() { return supportedServices; } + public Map> getServiceProviders() { + Map> serviceProviderMap = null; + if (serviceProviderList != null && !serviceProviderList.isEmpty()) { + serviceProviderMap = new HashMap>(); + Collection servicesCollection = serviceProviderList.values(); + Iterator iter = servicesCollection.iterator(); + while (iter.hasNext()) { + HashMap services = (HashMap) iter.next(); + String service = services.get("service"); + String provider = services.get("provider"); + List providerList = null; + if (serviceProviderMap.containsKey(service)) { + providerList = serviceProviderMap.get(service); + } else { + providerList = new ArrayList(); + } + providerList.add(provider); + serviceProviderMap.put(service, providerList); + } + } + + return serviceProviderMap; + } @Override public void create() throws ResourceAllocationException { - VpcOffering vpcOff = _vpcService.createVpcOffering(getVpcOfferingName(), getDisplayText(), getSupportedServices()); + VpcOffering vpcOff = _vpcProvSvc.createVpcOffering(getVpcOfferingName(), getDisplayText(), getSupportedServices(), getServiceProviders()); if (vpcOff != null) { this.setEntityId(vpcOff.getId()); this.setEntityUuid(vpcOff.getUuid()); @@ -78,7 +109,7 @@ public void create() throws ResourceAllocationException { @Override public void execute() { - VpcOffering vpc = _vpcService.getVpcOffering(this.getEntityId()); + VpcOffering vpc = _vpcProvSvc.getVpcOffering(this.getEntityId()); if (vpc != null) { VpcOfferingResponse response = _responseGenerator.createVpcOfferingResponse(vpc); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/vpc/DeletePrivateGatewayCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vpc/DeletePrivateGatewayCmd.java index 2b0e1a6a1..182a19e06 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/vpc/DeletePrivateGatewayCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/vpc/DeletePrivateGatewayCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.vpc; -import org.apache.cloudstack.api.response.PrivateGatewayResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.PrivateGatewayResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; diff --git a/api/src/org/apache/cloudstack/api/command/admin/vpc/DeleteVPCOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vpc/DeleteVPCOfferingCmd.java index 9a257c24c..4b16fa5fc 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/vpc/DeleteVPCOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/vpc/DeleteVPCOfferingCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.vpc; -import org.apache.cloudstack.api.response.VpcOfferingResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.cloudstack.api.response.VpcOfferingResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.user.Account; @@ -67,7 +66,7 @@ public long getEntityOwnerId() { @Override public void execute(){ - boolean result = _vpcService.deleteVpcOffering(getId()); + boolean result = _vpcProvSvc.deleteVpcOffering(getId()); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); diff --git a/api/src/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCOfferingCmd.java b/api/src/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCOfferingCmd.java index c8fa77df1..9bbae0643 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCOfferingCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCOfferingCmd.java @@ -16,11 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.admin.vpc; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.VpcOfferingResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.network.vpc.VpcOffering; import com.cloud.user.Account; @@ -84,7 +88,7 @@ public long getEntityOwnerId() { @Override public void execute(){ - VpcOffering result = _vpcService.updateVpcOffering(getId(), getVpcOfferingName(), getDisplayText(), getState()); + VpcOffering result = _vpcProvSvc.updateVpcOffering(getId(), getVpcOfferingName(), getDisplayText(), getState()); if (result != null) { VpcOfferingResponse response = _responseGenerator.createVpcOfferingResponse(result); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/admin/zone/CreateZoneCmd.java b/api/src/org/apache/cloudstack/api/command/admin/zone/CreateZoneCmd.java index ae57fae5a..5cc905227 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/zone/CreateZoneCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/zone/CreateZoneCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.zone; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; - import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.dc.DataCenter; import com.cloud.user.Account; import com.cloud.user.UserContext; @@ -47,6 +46,12 @@ public class CreateZoneCmd extends BaseCmd { @Parameter(name=ApiConstants.DNS2, type=CommandType.STRING, description="the second DNS for the Zone") private String dns2; + @Parameter(name=ApiConstants.IP6_DNS1, type=CommandType.STRING, description="the first DNS for IPv6 network in the Zone") + private String ip6Dns1; + + @Parameter(name=ApiConstants.IP6_DNS2, type=CommandType.STRING, description="the second DNS for IPv6 network in the Zone") + private String ip6Dns2; + @Parameter(name=ApiConstants.GUEST_CIDR_ADDRESS, type=CommandType.STRING, description="the guest CIDR address for the Zone") private String guestCidrAddress; @@ -90,6 +95,14 @@ public String getDns2() { return dns2; } + public String getIp6Dns1() { + return ip6Dns1; + } + + public String getIp6Dns2() { + return ip6Dns2; + } + public String getGuestCidrAddress() { return guestCidrAddress; } diff --git a/api/src/org/apache/cloudstack/api/command/admin/zone/DeleteZoneCmd.java b/api/src/org/apache/cloudstack/api/command/admin/zone/DeleteZoneCmd.java index e9a02accb..e3d14f729 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/zone/DeleteZoneCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/zone/DeleteZoneCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.admin.zone; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; import com.cloud.user.UserContext; diff --git a/api/src/org/apache/cloudstack/api/command/admin/zone/MarkDefaultZoneForAccountCmd.java b/api/src/org/apache/cloudstack/api/command/admin/zone/MarkDefaultZoneForAccountCmd.java index 59a37c96a..858457bf4 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/zone/MarkDefaultZoneForAccountCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/zone/MarkDefaultZoneForAccountCmd.java @@ -17,22 +17,20 @@ package org.apache.cloudstack.api.command.admin.zone; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; -import org.apache.cloudstack.api.ApiConstants; -import com.cloud.user.Account; -import com.cloud.event.EventTypes; -import com.cloud.async.AsyncJob; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; -import org.apache.cloudstack.api.ServerApiException; -import org.apache.cloudstack.api.BaseCmd; +import com.cloud.async.AsyncJob; +import com.cloud.event.EventTypes; +import com.cloud.user.Account; @APICommand(name = "markDefaultZoneForAccount", description="Marks a default zone for this account", responseObject=AccountResponse.class, since="4.0") public class MarkDefaultZoneForAccountCmd extends BaseAsyncCmd { diff --git a/api/src/org/apache/cloudstack/api/command/admin/zone/UpdateZoneCmd.java b/api/src/org/apache/cloudstack/api/command/admin/zone/UpdateZoneCmd.java index 143c8f7a8..16c334eeb 100644 --- a/api/src/org/apache/cloudstack/api/command/admin/zone/UpdateZoneCmd.java +++ b/api/src/org/apache/cloudstack/api/command/admin/zone/UpdateZoneCmd.java @@ -19,11 +19,15 @@ import java.util.List; import java.util.Map; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.dc.DataCenter; import com.cloud.user.Account; import com.cloud.user.UserContext; @@ -44,6 +48,12 @@ public class UpdateZoneCmd extends BaseCmd { @Parameter(name=ApiConstants.DNS2, type=CommandType.STRING, description="the second DNS for the Zone") private String dns2; + @Parameter(name=ApiConstants.IP6_DNS1, type=CommandType.STRING, description="the first DNS for IPv6 network in the Zone") + private String ip6Dns1; + + @Parameter(name=ApiConstants.IP6_DNS2, type=CommandType.STRING, description="the second DNS for IPv6 network in the Zone") + private String ip6Dns2; + @Parameter(name=ApiConstants.GUEST_CIDR_ADDRESS, type=CommandType.STRING, description="the guest CIDR address for the Zone") private String guestCidrAddress; @@ -101,6 +111,14 @@ public Long getId() { return id; } + public String getIp6Dns1() { + return ip6Dns1; + } + + public String getIp6Dns2() { + return ip6Dns2; + } + public String getInternalDns1() { return internalDns1; } diff --git a/api/src/org/apache/cloudstack/api/command/user/account/AddAccountToProjectCmd.java b/api/src/org/apache/cloudstack/api/command/user/account/AddAccountToProjectCmd.java index f62be0bf8..ebc227235 100644 --- a/api/src/org/apache/cloudstack/api/command/user/account/AddAccountToProjectCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/account/AddAccountToProjectCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.account; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; import com.cloud.projects.Project; diff --git a/api/src/org/apache/cloudstack/api/command/user/account/DeleteAccountFromProjectCmd.java b/api/src/org/apache/cloudstack/api/command/user/account/DeleteAccountFromProjectCmd.java index ef14d1ae7..df6deae18 100644 --- a/api/src/org/apache/cloudstack/api/command/user/account/DeleteAccountFromProjectCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/account/DeleteAccountFromProjectCmd.java @@ -16,13 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.account; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.command.user.project.DeleteProjectCmd; import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; import com.cloud.projects.Project; diff --git a/api/src/org/apache/cloudstack/api/command/user/account/ListAccountsCmd.java b/api/src/org/apache/cloudstack/api/command/user/account/ListAccountsCmd.java index f679a5ae7..ebf2e4ba0 100644 --- a/api/src/org/apache/cloudstack/api/command/user/account/ListAccountsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/account/ListAccountsCmd.java @@ -16,21 +16,13 @@ // under the License. package org.apache.cloudstack.api.command.user.account; -import java.util.ArrayList; -import java.util.List; - -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListDomainResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.ListResponse; -import org.apache.cloudstack.api.response.UserResponse; - -import com.cloud.user.Account; -import com.cloud.utils.Pair; +import org.apache.log4j.Logger; @APICommand(name = "listAccounts", description="Lists accounts and provides detailed account information for listed accounts", responseObject=AccountResponse.class) public class ListAccountsCmd extends BaseListDomainResourcesCmd { diff --git a/api/src/org/apache/cloudstack/api/command/user/account/ListProjectAccountsCmd.java b/api/src/org/apache/cloudstack/api/command/user/account/ListProjectAccountsCmd.java index 2c279db64..c91e2f2b5 100644 --- a/api/src/org/apache/cloudstack/api/command/user/account/ListProjectAccountsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/account/ListProjectAccountsCmd.java @@ -17,14 +17,13 @@ package org.apache.cloudstack.api.command.user.account; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.ProjectAccountResponse; import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.log4j.Logger; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java b/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java index 4437191db..28fbae443 100644 --- a/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java @@ -16,39 +16,21 @@ // under the License. package org.apache.cloudstack.api.command.user.address; -import java.util.List; - -import org.apache.log4j.Logger; - -import org.apache.cloudstack.api.ApiConstants; -import org.apache.cloudstack.api.ApiErrorCode; -import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.Parameter; -import org.apache.cloudstack.api.ServerApiException; -import org.apache.cloudstack.api.response.DomainResponse; -import org.apache.cloudstack.api.response.IPAddressResponse; -import org.apache.cloudstack.api.response.ProjectResponse; -import org.apache.cloudstack.api.response.NetworkResponse; -import org.apache.cloudstack.api.response.VpcResponse; -import org.apache.cloudstack.api.response.ZoneResponse; import com.cloud.async.AsyncJob; import com.cloud.dc.DataCenter; import com.cloud.dc.DataCenter.NetworkType; import com.cloud.event.EventTypes; -import com.cloud.exception.ConcurrentOperationException; -import com.cloud.exception.InsufficientAddressCapacityException; -import com.cloud.exception.InsufficientCapacityException; -import com.cloud.exception.InvalidParameterValueException; -import com.cloud.exception.ResourceAllocationException; -import com.cloud.exception.ResourceUnavailableException; +import com.cloud.exception.*; import com.cloud.network.IpAddress; import com.cloud.network.Network; import com.cloud.network.vpc.Vpc; import com.cloud.user.Account; import com.cloud.user.UserContext; +import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.response.*; +import org.apache.log4j.Logger; + +import java.util.List; @APICommand(name = "associateIpAddress", description="Acquires and associates a public IP to an account.", responseObject=IPAddressResponse.class) public class AssociateIPAddrCmd extends BaseAsyncCreateCmd { @@ -214,7 +196,7 @@ public static String getResultObjectName() { @Override public void create() throws ResourceAllocationException{ try { - IpAddress ip = _networkService.allocateIP(_accountService.getAccount(getEntityOwnerId()), false, getZoneId()); + IpAddress ip = _networkService.allocateIP(_accountService.getAccount(getEntityOwnerId()), getZoneId(), getNetworkId()); if (ip != null) { this.setEntityId(ip.getId()); diff --git a/api/src/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java b/api/src/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java index c208a1a3d..827111902 100644 --- a/api/src/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java @@ -16,13 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.address; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.IPAddressResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InsufficientAddressCapacityException; diff --git a/api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java b/api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java index 06b08da69..ac0f823c1 100644 --- a/api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java @@ -19,19 +19,19 @@ import java.util.ArrayList; import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.IPAddressResponse; import org.apache.cloudstack.api.response.ListResponse; -import org.apache.cloudstack.api.response.PhysicalNetworkResponse; import org.apache.cloudstack.api.response.NetworkResponse; +import org.apache.cloudstack.api.response.PhysicalNetworkResponse; import org.apache.cloudstack.api.response.VlanIpRangeResponse; import org.apache.cloudstack.api.response.VpcResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.network.IpAddress; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java new file mode 100644 index 000000000..96de4aa13 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java @@ -0,0 +1,167 @@ +// 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 org.apache.cloudstack.api.command.user.affinitygroup; + +import org.apache.cloudstack.affinity.AffinityGroup; +import org.apache.cloudstack.affinity.AffinityGroupResponse; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCreateCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.log4j.Logger; + +import com.cloud.async.AsyncJob; +import com.cloud.event.EventTypes; +import com.cloud.exception.ResourceAllocationException; +import com.cloud.user.Account; +import com.cloud.user.UserContext; + +@APICommand(name = "createAffinityGroup", responseObject = AffinityGroupResponse.class, description = "Creates an affinity/anti-affinity group") +public class CreateAffinityGroupCmd extends BaseAsyncCreateCmd { + public static final Logger s_logger = Logger.getLogger(CreateAffinityGroupCmd.class.getName()); + + private static final String s_name = "createaffinitygroupresponse"; + + // /////////////////////////////////////////////////// + // ////////////// API parameters ///////////////////// + // /////////////////////////////////////////////////// + + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an account for the affinity group. Must be used with domainId.") + private String accountName; + + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, description = "domainId of the account owning the affinity group", entityType = DomainResponse.class) + private Long domainId; + + @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "optional description of the affinity group") + private String description; + + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "name of the affinity group") + private String affinityGroupName; + + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, required = true, description = "Type of the affinity group from the available affinity/anti-affinity group types") + private String affinityGroupType; + + + // /////////////////////////////////////////////////// + // ///////////////// Accessors /////////////////////// + // /////////////////////////////////////////////////// + + public String getAccountName() { + return accountName; + } + + public String getDescription() { + return description; + } + + public Long getDomainId() { + return domainId; + } + + public String getAffinityGroupName() { + return affinityGroupName; + } + + public String getAffinityGroupType() { + return affinityGroupType; + } + + // /////////////////////////////////////////////////// + // ///////////// API Implementation/////////////////// + // /////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + Account account = UserContext.current().getCaller(); + if ((account == null) || isAdmin(account.getType())) { + if ((domainId != null) && (accountName != null)) { + Account userAccount = _responseGenerator.findAccountByNameDomain(accountName, domainId); + if (userAccount != null) { + return userAccount.getId(); + } + } + } + + if (account != null) { + return account.getId(); + } + + return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this + // command to SYSTEM so ERROR events + // are tracked + } + + @Override + public void execute() { + AffinityGroup group = _affinityGroupService.getAffinityGroup(getEntityId()); + if (group != null) { + AffinityGroupResponse response = _responseGenerator.createAffinityGroupResponse(group); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create affinity group:" + + affinityGroupName); + } + } + + @Override + public void create() throws ResourceAllocationException { + AffinityGroup result = _affinityGroupService.createAffinityGroup(accountName, domainId, affinityGroupName, + affinityGroupType, description); + if (result != null) { + setEntityId(result.getId()); + setEntityUuid(result.getUuid()); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create affinity group entity" + affinityGroupName); + } + + } + + @Override + public String getEventType() { + return EventTypes.EVENT_AFFINITY_GROUP_CREATE; + } + + @Override + public String getEventDescription() { + return "creating Affinity Group"; + } + + @Override + public String getCreateEventType() { + return EventTypes.EVENT_AFFINITY_GROUP_CREATE; + } + + @Override + public String getCreateEventDescription() { + return "creating Affinity Group"; + } + + @Override + public AsyncJob.Type getInstanceType() { + return AsyncJob.Type.AffinityGroup; + } + +} diff --git a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java new file mode 100644 index 000000000..ea4a010ab --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java @@ -0,0 +1,154 @@ +// 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 org.apache.cloudstack.api.command.user.affinitygroup; + +import org.apache.cloudstack.affinity.AffinityGroupResponse; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + +import com.cloud.async.AsyncJob; +import com.cloud.event.EventTypes; +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.exception.ResourceInUseException; +import com.cloud.user.Account; +import com.cloud.user.UserContext; + +@APICommand(name = "deleteAffinityGroup", description = "Deletes affinity group", responseObject = SuccessResponse.class) +public class DeleteAffinityGroupCmd extends BaseAsyncCmd { + public static final Logger s_logger = Logger.getLogger(DeleteAffinityGroupCmd.class.getName()); + private static final String s_name = "deleteaffinitygroupresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "the account of the affinity group. Must be specified with domain ID") + private String accountName; + + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, description = "the domain ID of account owning the affinity group", entityType = DomainResponse.class) + private Long domainId; + + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, description = "The ID of the affinity group. Mutually exclusive with name parameter", entityType = AffinityGroupResponse.class) + private Long id; + + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the affinity group. Mutually exclusive with id parameter") + private String name; + + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public String getAccountName() { + return accountName; + } + + public Long getDomainId() { + return domainId; + } + + + public Long getId() { + if (id != null && name != null) { + throw new InvalidParameterValueException("name and id parameters are mutually exclusive"); + } + + if (name != null) { + id = _responseGenerator.getAffinityGroupId(name, getEntityOwnerId()); + if (id == null) { + throw new InvalidParameterValueException("Unable to find affinity group by name " + name + + " for the account id=" + getEntityOwnerId()); + } + } + + if (id == null) { + throw new InvalidParameterValueException( + "Either id or name parameter is requred by deleteAffinityGroup command"); + } + + return id; + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + Account account = UserContext.current().getCaller(); + if ((account == null) || isAdmin(account.getType())) { + if ((domainId != null) && (accountName != null)) { + Account userAccount = _responseGenerator.findAccountByNameDomain(accountName, domainId); + if (userAccount != null) { + return userAccount.getId(); + } + } + } + + if (account != null) { + return account.getId(); + } + + return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this + // command to SYSTEM so ERROR events + // are tracked + + } + + @Override + public void execute(){ + try{ + boolean result = _affinityGroupService.deleteAffinityGroup(id, accountName, domainId, name); + if (result) { + SuccessResponse response = new SuccessResponse(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete affinity group"); + } + } catch (ResourceInUseException ex) { + s_logger.warn("Exception: ", ex); + throw new ServerApiException(ApiErrorCode.RESOURCE_IN_USE_ERROR, ex.getMessage()); + } + } + + @Override + public String getEventType() { + return EventTypes.EVENT_AFFINITY_GROUP_DELETE; + } + + @Override + public String getEventDescription() { + return "Deleting Affinity Group"; + } + + @Override + public AsyncJob.Type getInstanceType() { + return AsyncJob.Type.AffinityGroup; + } +} diff --git a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupTypesCmd.java b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupTypesCmd.java new file mode 100644 index 000000000..ce6e89a07 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupTypesCmd.java @@ -0,0 +1,67 @@ +// 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 org.apache.cloudstack.api.command.user.affinitygroup; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.cloudstack.affinity.AffinityGroupTypeResponse; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.BaseListCmd; +import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + +import com.cloud.user.Account; + +@APICommand(name = "listAffinityGroupTypes", description = "Lists affinity group types available", responseObject = AffinityGroupTypeResponse.class) +public class ListAffinityGroupTypesCmd extends BaseListCmd { + public static final Logger s_logger = Logger.getLogger(ListAffinityGroupTypesCmd.class.getName()); + + private static final String s_name = "listaffinitygrouptypesresponse"; + + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + public long getEntityOwnerId() { + return Account.ACCOUNT_ID_SYSTEM; + } + + @Override + public void execute() { + List result = _affinityGroupService.listAffinityGroupTypes(); + ListResponse response = new ListResponse(); + ArrayList responses = new ArrayList(); + if (result != null) { + for (String type : result) { + AffinityGroupTypeResponse affinityTypeResponse = new AffinityGroupTypeResponse(); + affinityTypeResponse.setType(type); + affinityTypeResponse.setObjectName("affinityGroupType"); + responses.add(affinityTypeResponse); + } + } + response.setResponses(responses); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } +} diff --git a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java new file mode 100644 index 000000000..9310fb910 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java @@ -0,0 +1,90 @@ +// 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 org.apache.cloudstack.api.command.user.affinitygroup; + +import org.apache.cloudstack.affinity.AffinityGroupResponse; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseListCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + +import com.cloud.async.AsyncJob; + +@APICommand(name = "listAffinityGroups", description = "Lists affinity groups", responseObject = AffinityGroupResponse.class) +public class ListAffinityGroupsCmd extends BaseListCmd { + public static final Logger s_logger = Logger.getLogger(ListAffinityGroupsCmd.class.getName()); + + private static final String s_name = "listaffinitygroupsresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "lists affinity groups by name") + private String affinityGroupName; + + @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, description = "lists affinity groups by virtual machine id", entityType = UserVmResponse.class) + private Long virtualMachineId; + + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, description = "list the affinity group by the id provided", entityType = AffinityGroupResponse.class) + private Long id; + + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "lists affinity groups by type") + private String affinityGroupType; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + public String getAffinityGroupName() { + return affinityGroupName; + } + + public Long getVirtualMachineId() { + return virtualMachineId; + } + + public Long getId(){ + return id; + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public void execute(){ + + ListResponse response = _queryService.listAffinityGroups(id, affinityGroupName, + affinityGroupType, virtualMachineId, this.getStartIndex(), this.getPageSizeVal()); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + + } + + @Override + public AsyncJob.Type getInstanceType() { + return AsyncJob.Type.AffinityGroup; + } +} diff --git a/api/src/org/apache/cloudstack/api/command/user/affinitygroup/UpdateVMAffinityGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/UpdateVMAffinityGroupCmd.java new file mode 100644 index 000000000..44d017b7d --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/affinitygroup/UpdateVMAffinityGroupCmd.java @@ -0,0 +1,164 @@ +// 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 org.apache.cloudstack.api.command.user.affinitygroup; + +import java.util.ArrayList; +import java.util.EnumSet; +import java.util.List; + +import org.apache.cloudstack.affinity.AffinityGroupResponse; +import org.apache.cloudstack.api.ACL; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.ApiConstants.VMDetails; +import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + +import com.cloud.async.AsyncJob; +import com.cloud.event.EventTypes; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.exception.ResourceUnavailableException; +import com.cloud.user.Account; +import com.cloud.user.UserContext; +import com.cloud.uservm.UserVm; + + +@APICommand(name = "updateVMAffinityGroup", description = "Updates the affinity/anti-affinity group associations of a virtual machine. The VM has to be stopped and restarted for the " + + "new properties to take effect.", responseObject = UserVmResponse.class) +public class UpdateVMAffinityGroupCmd extends BaseAsyncCmd { + public static final Logger s_logger = Logger.getLogger(UpdateVMAffinityGroupCmd.class.getName()); + private static final String s_name = "updatevirtualmachineresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + + @ACL + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=UserVmResponse.class, + required=true, description="The ID of the virtual machine") + private Long id; + + @ACL + @Parameter(name = ApiConstants.AFFINITY_GROUP_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = AffinityGroupResponse.class, description = "comma separated list of affinity groups id that are going to be applied to the virtual machine. " + + "Should be passed only when vm is created from a zone with Basic Network support." + + " Mutually exclusive with securitygroupnames parameter") + private List affinityGroupIdList; + + @ACL + @Parameter(name = ApiConstants.AFFINITY_GROUP_NAMES, type = CommandType.LIST, collectionType = CommandType.STRING, entityType = AffinityGroupResponse.class, description = "comma separated list of affinity groups names that are going to be applied to the virtual machine." + + " Should be passed only when vm is created from a zone with Basic Network support. " + + "Mutually exclusive with securitygroupids parameter") + private List affinityGroupNameList; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + + public Long getId() { + return id; + } + + + public List getAffinityGroupIdList() { + if (affinityGroupNameList != null && affinityGroupIdList != null) { + throw new InvalidParameterValueException( + "affinitygroupids parameter is mutually exclusive with affinitygroupnames parameter"); + } + + // transform group names to ids here + if (affinityGroupNameList != null) { + List affinityGroupIds = new ArrayList(); + for (String groupName : affinityGroupNameList) { + Long groupId = _responseGenerator.getAffinityGroupId(groupName, getEntityOwnerId()); + if (groupId == null) { + throw new InvalidParameterValueException("Unable to find group by name " + groupName + + " for account " + getEntityOwnerId()); + } else { + affinityGroupIds.add(groupId); + } + } + return affinityGroupIds; + } else { + return affinityGroupIdList; + } + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + + @Override + public String getCommandName() { + return s_name; + } + + public static String getResultObjectName() { + return "virtualmachine"; + } + + @Override + public long getEntityOwnerId() { + UserVm userVm = _entityMgr.findById(UserVm.class, getId()); + if (userVm != null) { + return userVm.getAccountId(); + } + + return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked + } + + @Override + public void execute() throws ResourceUnavailableException, + InsufficientCapacityException, ServerApiException { + UserContext.current().setEventDetails("Vm Id: "+getId()); + UserVm result = _affinityGroupService.updateVMAffinityGroups(getId(), getAffinityGroupIdList()); + ArrayList dc = new ArrayList(); + dc.add(VMDetails.valueOf("affgrp")); + EnumSet details = EnumSet.copyOf(dc); + + if (result != null){ + UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", details, result).get(0); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update vm's affinity groups"); + } + } + + @Override + public String getEventType() { + return EventTypes.EVENT_VM_AFFINITY_GROUP_UPDATE; + } + + @Override + public String getEventDescription() { + return "updating VM Affinity Group"; + } + + @Override + public AsyncJob.Type getInstanceType() { + return AsyncJob.Type.AffinityGroup; + } + +} diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScalePolicyCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScalePolicyCmd.java index 987d305b4..f6e4f96dd 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScalePolicyCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScalePolicyCmd.java @@ -18,12 +18,16 @@ import java.util.List; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCreateCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.AutoScalePolicyResponse; import org.apache.cloudstack.api.response.ConditionResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.AutoScalePolicyResponse; import com.cloud.async.AsyncJob; import com.cloud.domain.Domain; import com.cloud.event.EventTypes; diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmGroupCmd.java index 400be5db3..135c87717 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmGroupCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmGroupCmd.java @@ -18,14 +18,18 @@ import java.util.List; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCreateCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AutoScalePolicyResponse; +import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse; import org.apache.cloudstack.api.response.AutoScaleVmProfileResponse; import org.apache.cloudstack.api.response.FirewallRuleResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmProfileCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmProfileCmd.java index 39814e7b9..87d4466e7 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmProfileCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmProfileCmd.java @@ -19,20 +19,19 @@ import java.util.HashMap; import java.util.Map; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AutoScaleVmProfileResponse; -import org.apache.cloudstack.api.response.DiskOfferingResponse; +import org.apache.cloudstack.api.response.ServiceOfferingResponse; import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.UserResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; @@ -57,7 +56,7 @@ public class CreateAutoScaleVmProfileCmd extends BaseAsyncCreateCmd { required = true, description = "availability zone for the auto deployed virtual machine") private Long zoneId; - @Parameter(name = ApiConstants.SERVICE_OFFERING_ID, type = CommandType.UUID, entityType = DiskOfferingResponse.class, + @Parameter(name = ApiConstants.SERVICE_OFFERING_ID, type = CommandType.UUID, entityType = ServiceOfferingResponse.class, required = true, description = "the service offering of the auto deployed virtual machine") private Long serviceOfferingId; diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateConditionCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateConditionCmd.java index 89da23451..3eff5d08e 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateConditionCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/CreateConditionCmd.java @@ -17,18 +17,17 @@ package org.apache.cloudstack.api.command.user.autoscale; -import org.apache.cloudstack.api.response.CounterResponse; -import org.apache.cloudstack.api.response.DomainResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ConditionResponse; +import org.apache.cloudstack.api.response.CounterResponse; +import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ResourceAllocationException; diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScalePolicyCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScalePolicyCmd.java index aa236ee08..f8b359566 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScalePolicyCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScalePolicyCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.autoscale; -import org.apache.cloudstack.api.response.AutoScalePolicyResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.AutoScalePolicyResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.network.as.AutoScalePolicy; diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmGroupCmd.java index 54eb74627..d0107368e 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmGroupCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmGroupCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.autoscale; -import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.network.as.AutoScaleVmGroup; diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmProfileCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmProfileCmd.java index 726f006ef..c55973c91 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmProfileCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmProfileCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.autoscale; -import org.apache.cloudstack.api.response.AutoScaleVmProfileResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.AutoScaleVmProfileResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.network.as.AutoScaleVmProfile; diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteConditionCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteConditionCmd.java index 5ce1ee27a..57e38f9ab 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteConditionCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/DeleteConditionCmd.java @@ -17,17 +17,16 @@ package org.apache.cloudstack.api.command.user.autoscale; -import org.apache.cloudstack.api.response.ConditionResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.ConditionResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ResourceInUseException; diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/DisableAutoScaleVmGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/DisableAutoScaleVmGroupCmd.java index f4f921297..5d2fb4bd1 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/DisableAutoScaleVmGroupCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/DisableAutoScaleVmGroupCmd.java @@ -17,16 +17,15 @@ package org.apache.cloudstack.api.command.user.autoscale; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.network.as.AutoScaleVmGroup; diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/EnableAutoScaleVmGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/EnableAutoScaleVmGroupCmd.java index 80ac818d2..5cb7e5605 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/EnableAutoScaleVmGroupCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/EnableAutoScaleVmGroupCmd.java @@ -17,11 +17,15 @@ package org.apache.cloudstack.api.command.user.autoscale; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.network.as.AutoScaleVmGroup; diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScalePoliciesCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScalePoliciesCmd.java index 316214422..8426db8c1 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScalePoliciesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScalePoliciesCmd.java @@ -19,16 +19,16 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse; -import org.apache.cloudstack.api.response.ConditionResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListAccountResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.AutoScalePolicyResponse; +import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse; +import org.apache.cloudstack.api.response.ConditionResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + import com.cloud.network.as.AutoScalePolicy; @APICommand(name = "listAutoScalePolicies", description = "Lists autoscale policies.", responseObject = AutoScalePolicyResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmGroupsCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmGroupsCmd.java index 7561757fc..5b3ee42e5 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmGroupsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmGroupsCmd.java @@ -20,8 +20,6 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; import org.apache.cloudstack.api.Parameter; @@ -31,6 +29,8 @@ import org.apache.cloudstack.api.response.FirewallRuleResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.InvalidParameterValueException; import com.cloud.network.as.AutoScaleVmGroup; diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmProfilesCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmProfilesCmd.java index 7a88db3e7..8afdf028e 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmProfilesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmProfilesCmd.java @@ -20,14 +20,14 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.TemplateResponse; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.AutoScaleVmProfileResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.TemplateResponse; +import org.apache.log4j.Logger; + import com.cloud.network.as.AutoScaleVmProfile; @APICommand(name = "listAutoScaleVmProfiles", description = "Lists autoscale vm profiles.", responseObject = AutoScaleVmProfileResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/ListConditionsCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/ListConditionsCmd.java index 0b3ffec04..1c9492324 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/ListConditionsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/ListConditionsCmd.java @@ -20,16 +20,16 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.response.AutoScalePolicyResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListAccountResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.response.AutoScalePolicyResponse; import org.apache.cloudstack.api.response.ConditionResponse; import org.apache.cloudstack.api.response.CounterResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + import com.cloud.network.as.Condition; @APICommand(name = "listConditions", description = "List Conditions for the specific user", responseObject = CounterResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/ListCountersCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/ListCountersCmd.java index 66a38f343..bd6790d67 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/ListCountersCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/ListCountersCmd.java @@ -21,13 +21,13 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.CounterResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + import com.cloud.network.as.Counter; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScalePolicyCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScalePolicyCmd.java index 6a55a4aa1..fbe2be840 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScalePolicyCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScalePolicyCmd.java @@ -19,17 +19,16 @@ import java.util.List; -import org.apache.cloudstack.api.response.ConditionResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AutoScalePolicyResponse; +import org.apache.cloudstack.api.response.ConditionResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.network.as.AutoScalePolicy; diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmGroupCmd.java index fc6a7c6b8..5acfb942f 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmGroupCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmGroupCmd.java @@ -19,12 +19,16 @@ import java.util.List; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AutoScalePolicyResponse; +import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.AutoScaleVmGroupResponse; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.network.as.AutoScaleVmGroup; diff --git a/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmProfileCmd.java b/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmProfileCmd.java index 570ed0beb..34def9dac 100644 --- a/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmProfileCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmProfileCmd.java @@ -19,13 +19,17 @@ import java.util.Map; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.AutoScaleVmProfileResponse; import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.UserResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.AutoScaleVmProfileResponse; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.network.as.AutoScaleVmProfile; diff --git a/api/src/org/apache/cloudstack/api/command/user/config/ListCapabilitiesCmd.java b/api/src/org/apache/cloudstack/api/command/user/config/ListCapabilitiesCmd.java index 129aeb85d..a30e26cfd 100644 --- a/api/src/org/apache/cloudstack/api/command/user/config/ListCapabilitiesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/config/ListCapabilitiesCmd.java @@ -18,11 +18,11 @@ import java.util.Map; -import org.apache.log4j.Logger; - -import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.response.CapabilitiesResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; @APICommand(name = "listCapabilities", description="Lists capabilities", responseObject=CapabilitiesResponse.class) @@ -52,6 +52,12 @@ public void execute(){ response.setProjectInviteRequired((Boolean)capabilities.get("projectInviteRequired")); response.setAllowUsersCreateProjects((Boolean)capabilities.get("allowusercreateprojects")); response.setDiskOffMaxSize((Long)capabilities.get("customDiskOffMaxSize")); + if (capabilities.containsKey("apiLimitInterval")) { + response.setApiLimitInterval((Integer) capabilities.get("apiLimitInterval")); + } + if (capabilities.containsKey("apiLimitMax")) { + response.setApiLimitMax((Integer) capabilities.get("apiLimitMax")); + } response.setObjectName("capability"); response.setResponseName(getCommandName()); this.setResponseObject(response); diff --git a/api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java b/api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java new file mode 100644 index 000000000..481607c9f --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java @@ -0,0 +1,105 @@ +//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 org.apache.cloudstack.api.command.user.event; + +import java.util.Date; +import java.util.List; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.AlertResponse; +import org.apache.cloudstack.api.response.EventResponse; +import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.user.Account; +import com.cloud.user.UserContext; + +@APICommand(name = "archiveEvents", description = "Archive one or more events.", responseObject = SuccessResponse.class) +public class ArchiveEventsCmd extends BaseCmd { + + public static final Logger s_logger = Logger.getLogger(ArchiveEventsCmd.class.getName()); + + private static final String s_name = "archiveeventsresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name = ApiConstants.IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = EventResponse.class, + description = "the IDs of the events") + private List ids; + + @Parameter(name=ApiConstants.OLDER_THAN, type=CommandType.DATE, description="archive events older than (including) this date (use format \"yyyy-MM-dd\" or the new format \"yyyy-MM-dd HH:mm:ss\")") + private Date olderThan; + + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "archive by event type") + private String type; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public List getIds() { + return ids; + } + + public Date getOlderThan() { + return olderThan; + } + + public String getType() { + return type; + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + Account account = UserContext.current().getCaller(); + if (account != null) { + return account.getId(); + } + return Account.ACCOUNT_ID_SYSTEM; + } + + @Override + public void execute() { + if(ids == null && type == null && olderThan == null) { + throw new InvalidParameterValueException("either ids, type or olderthan must be specified"); + } + boolean result = _mgr.archiveEvents(this); + if (result) { + SuccessResponse response = new SuccessResponse(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Unable to archive Events, one or more parameters has invalid values"); + } + } +} diff --git a/api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java b/api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java new file mode 100644 index 000000000..55ca92a5d --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java @@ -0,0 +1,105 @@ +//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 org.apache.cloudstack.api.command.user.event; + +import java.util.Date; +import java.util.List; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.AlertResponse; +import org.apache.cloudstack.api.response.EventResponse; +import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.user.Account; +import com.cloud.user.UserContext; + +@APICommand(name = "deleteEvents", description = "Delete one or more events.", responseObject = SuccessResponse.class) +public class DeleteEventsCmd extends BaseCmd { + + public static final Logger s_logger = Logger.getLogger(DeleteEventsCmd.class.getName()); + + private static final String s_name = "deleteeventsresponse"; + + // /////////////////////////////////////////////////// + // ////////////// API parameters ///////////////////// + // /////////////////////////////////////////////////// + + @Parameter(name = ApiConstants.IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = EventResponse.class, + description = "the IDs of the events") + private List ids; + + @Parameter(name=ApiConstants.OLDER_THAN, type=CommandType.DATE, description="delete events older than (including) this date (use format \"yyyy-MM-dd\" or the new format \"yyyy-MM-dd HH:mm:ss\")") + private Date olderThan; + + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "delete by event type") + private String type; + + // /////////////////////////////////////////////////// + // ///////////////// Accessors /////////////////////// + // /////////////////////////////////////////////////// + + public List getIds() { + return ids; + } + + public Date getOlderThan() { + return olderThan; + } + + public String getType() { + return type; + } + + // /////////////////////////////////////////////////// + // ///////////// API Implementation/////////////////// + // /////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + Account account = UserContext.current().getCaller(); + if (account != null) { + return account.getId(); + } + return Account.ACCOUNT_ID_SYSTEM; + } + + @Override + public void execute() { + if(ids == null && type == null && olderThan == null) { + throw new InvalidParameterValueException("either ids, type or enddate must be specified"); + } + boolean result = _mgr.deleteEvents(this); + if (result) { + SuccessResponse response = new SuccessResponse(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Unable to delete Events, one or more parameters has invalid values"); + } + } +} diff --git a/api/src/org/apache/cloudstack/api/command/user/event/ListEventTypesCmd.java b/api/src/org/apache/cloudstack/api/command/user/event/ListEventTypesCmd.java index 4c432f35e..9cbc204b7 100644 --- a/api/src/org/apache/cloudstack/api/command/user/event/ListEventTypesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/event/ListEventTypesCmd.java @@ -19,11 +19,11 @@ import java.util.ArrayList; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.response.EventTypeResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; @APICommand(name = "listEventTypes", description = "List Event Types", responseObject = EventTypeResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java b/api/src/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java index 94205d132..63fa194c8 100644 --- a/api/src/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java @@ -17,14 +17,14 @@ package org.apache.cloudstack.api.command.user.event; import java.util.Date; -import org.apache.log4j.Logger; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.EventResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; @APICommand(name = "listEvents", description="A command to list events.", responseObject=EventResponse.class) public class ListEventsCmd extends BaseListProjectAndAccountResourcesCmd { diff --git a/api/src/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java index f5d7b1b02..b7cb47120 100644 --- a/api/src/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java @@ -19,18 +19,17 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.response.IPAddressResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.FirewallResponse; +import org.apache.cloudstack.api.response.IPAddressResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; @@ -325,7 +324,7 @@ public AsyncJob.Type getInstanceType() { @Override public TrafficType getTrafficType() { - return null; + return FirewallRule.TrafficType.Ingress; } } diff --git a/api/src/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java index 53348c9df..40128526c 100644 --- a/api/src/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java @@ -18,14 +18,19 @@ import java.util.List; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.BaseAsyncCreateCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.FirewallRuleResponse; import org.apache.cloudstack.api.response.IPAddressResponse; import org.apache.cloudstack.api.response.NetworkResponse; import org.apache.cloudstack.api.response.UserVmResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.FirewallRuleResponse; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; @@ -89,6 +94,9 @@ public class CreatePortForwardingRuleCmd extends BaseAsyncCreateCmd implements P description="The network of the vm the Port Forwarding rule will be created for. " + "Required when public Ip address is not associated with any Guest network yet (VPC case)") private Long networkId; + @Parameter(name = ApiConstants.VM_GUEST_IP, type = CommandType.STRING, required = false, + description = "VM guest nic Secondary ip address for the port forwarding rule") + private String vmSecondaryIp; // /////////////////////////////////////////////////// // ///////////////// Accessors /////////////////////// @@ -99,6 +107,13 @@ public Long getIpAddressId() { return ipAddressId; } + public Ip getVmSecondaryIp() { + if (vmSecondaryIp == null) { + return null; + } + return new Ip(vmSecondaryIp); + } + @Override public String getProtocol() { return protocol.trim(); @@ -295,8 +310,15 @@ public void create() { throw new InvalidParameterValueException("Parameter cidrList is deprecated; if you need to open firewall rule for the specific cidr, please refer to createFirewallRule command"); } + Ip privateIp = getVmSecondaryIp(); + if (privateIp != null) { + if ( !privateIp.isIp4()) { + throw new InvalidParameterValueException("Invalid vm ip address"); + } + } + try { - PortForwardingRule result = _rulesService.createPortForwardingRule(this, virtualMachineId, getOpenFirewall()); + PortForwardingRule result = _rulesService.createPortForwardingRule(this, virtualMachineId, privateIp, getOpenFirewall()); setEntityId(result.getId()); setEntityUuid(result.getUuid()); } catch (NetworkRuleConflictException ex) { diff --git a/api/src/org/apache/cloudstack/api/command/user/firewall/DeleteEgressFirewallRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/firewall/DeleteEgressFirewallRuleCmd.java index 4646cdbcf..0e1d48640 100644 --- a/api/src/org/apache/cloudstack/api/command/user/firewall/DeleteEgressFirewallRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/firewall/DeleteEgressFirewallRuleCmd.java @@ -26,6 +26,8 @@ import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.AccountResponse; +import org.apache.cloudstack.api.response.FirewallRuleResponse; import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; @@ -44,11 +46,11 @@ public class DeleteEgressFirewallRuleCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="the ID of the firewall rule") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = FirewallRuleResponse.class, required=true, description="the ID of the firewall rule") private Long id; // unexposed parameter needed for events logging - @Parameter(name=ApiConstants.ACCOUNT_ID, type=CommandType.LONG, expose=false) + @Parameter(name=ApiConstants.ACCOUNT_ID, type=CommandType.UUID, entityType = AccountResponse.class, expose=false) private Long ownerId; ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// diff --git a/api/src/org/apache/cloudstack/api/command/user/firewall/DeleteFirewallRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/firewall/DeleteFirewallRuleCmd.java index 8b0a5c16e..b90082829 100644 --- a/api/src/org/apache/cloudstack/api/command/user/firewall/DeleteFirewallRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/firewall/DeleteFirewallRuleCmd.java @@ -16,13 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.firewall; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.FirewallRuleResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/firewall/DeletePortForwardingRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/firewall/DeletePortForwardingRuleCmd.java index e70bb1556..838859585 100644 --- a/api/src/org/apache/cloudstack/api/command/user/firewall/DeletePortForwardingRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/firewall/DeletePortForwardingRuleCmd.java @@ -16,13 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.firewall; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.FirewallRuleResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/firewall/ListEgressFirewallRulesCmd.java b/api/src/org/apache/cloudstack/api/command/user/firewall/ListEgressFirewallRulesCmd.java index 6eeb53648..b5eed7547 100644 --- a/api/src/org/apache/cloudstack/api/command/user/firewall/ListEgressFirewallRulesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/firewall/ListEgressFirewallRulesCmd.java @@ -28,7 +28,9 @@ import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.FirewallResponse; +import org.apache.cloudstack.api.response.FirewallRuleResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.NetworkResponse; import com.cloud.network.rules.FirewallRule; import com.cloud.utils.Pair; @@ -40,10 +42,10 @@ public class ListEgressFirewallRulesCmd extends ListFirewallRulesCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="Lists rule with the specified ID.") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = FirewallRuleResponse.class, description="Lists rule with the specified ID.") private Long id; - @Parameter(name=ApiConstants.NETWORK_ID, type=CommandType.LONG, description="the id network network for the egress firwall services") + @Parameter(name=ApiConstants.NETWORK_ID, type=CommandType.UUID, entityType = NetworkResponse.class, description="the id network network for the egress firwall services") private Long networkId; ///////////////////////////////////////////////////// diff --git a/api/src/org/apache/cloudstack/api/command/user/firewall/ListFirewallRulesCmd.java b/api/src/org/apache/cloudstack/api/command/user/firewall/ListFirewallRulesCmd.java index 5062a4ea8..c2aee55f5 100644 --- a/api/src/org/apache/cloudstack/api/command/user/firewall/ListFirewallRulesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/firewall/ListFirewallRulesCmd.java @@ -19,16 +19,16 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.response.FirewallRuleResponse; -import org.apache.cloudstack.api.response.IPAddressResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.FirewallResponse; +import org.apache.cloudstack.api.response.FirewallRuleResponse; +import org.apache.cloudstack.api.response.IPAddressResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + import com.cloud.network.rules.FirewallRule; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java b/api/src/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java index 665af44ad..9fd4e450e 100644 --- a/api/src/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java @@ -19,15 +19,15 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.response.IPAddressResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.FirewallRuleResponse; +import org.apache.cloudstack.api.response.IPAddressResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + import com.cloud.network.rules.PortForwardingRule; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/firewall/UpdatePortForwardingRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/firewall/UpdatePortForwardingRuleCmd.java index 2eafaaf72..2a8b9003f 100644 --- a/api/src/org/apache/cloudstack/api/command/user/firewall/UpdatePortForwardingRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/firewall/UpdatePortForwardingRuleCmd.java @@ -16,15 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.user.firewall; -import org.apache.cloudstack.api.response.IPAddressResponse; -import org.apache.cloudstack.api.response.UserVmResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.FirewallRuleResponse; +import org.apache.cloudstack.api.response.IPAddressResponse; +import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.network.IpAddress; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/user/guest/ListGuestOsCategoriesCmd.java b/api/src/org/apache/cloudstack/api/command/user/guest/ListGuestOsCategoriesCmd.java index 3b4c4cd2c..19d2341fd 100644 --- a/api/src/org/apache/cloudstack/api/command/user/guest/ListGuestOsCategoriesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/guest/ListGuestOsCategoriesCmd.java @@ -19,15 +19,15 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.command.user.iso.ListIsosCmd; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.command.user.iso.ListIsosCmd; import org.apache.cloudstack.api.response.GuestOSCategoryResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + import com.cloud.storage.GuestOsCategory; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/guest/ListGuestOsCmd.java b/api/src/org/apache/cloudstack/api/command/user/guest/ListGuestOsCmd.java index 3c145e9bd..1b050b896 100644 --- a/api/src/org/apache/cloudstack/api/command/user/guest/ListGuestOsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/guest/ListGuestOsCmd.java @@ -20,15 +20,15 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.command.user.iso.ListIsosCmd; -import org.apache.cloudstack.api.response.GuestOSCategoryResponse; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.command.user.iso.ListIsosCmd; +import org.apache.cloudstack.api.response.GuestOSCategoryResponse; import org.apache.cloudstack.api.response.GuestOSResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + import com.cloud.storage.GuestOS; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/AttachIsoCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/AttachIsoCmd.java index 89e72920d..933ee8bde 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/AttachIsoCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/AttachIsoCmd.java @@ -16,18 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.iso; -import org.apache.cloudstack.api.command.user.vm.DeployVMCmd; -import org.apache.cloudstack.api.response.TemplateResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.command.user.vm.DeployVMCmd; +import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; import com.cloud.user.UserContext; diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/CopyIsoCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/CopyIsoCmd.java index b449ff591..89aa71f8f 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/CopyIsoCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/CopyIsoCmd.java @@ -16,11 +16,10 @@ // under the License. package org.apache.cloudstack.api.command.user.iso; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.command.user.template.CopyTemplateCmd; +import org.apache.cloudstack.api.response.TemplateResponse; +import org.apache.log4j.Logger; @APICommand(name = "copyIso", description="Copies an iso from one zone to another.", responseObject=TemplateResponse.class) public class CopyIsoCmd extends CopyTemplateCmd { diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/DeleteIsoCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/DeleteIsoCmd.java index 4c370c703..c82177599 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/DeleteIsoCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/DeleteIsoCmd.java @@ -16,18 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.iso; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.template.VirtualMachineTemplate; diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/DetachIsoCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/DetachIsoCmd.java index 2a6ecf4ce..c04fba502 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/DetachIsoCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/DetachIsoCmd.java @@ -16,18 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.iso; -import org.apache.cloudstack.api.command.user.vm.DeployVMCmd; -import org.apache.cloudstack.api.response.TemplateResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.command.user.vm.DeployVMCmd; +import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; import com.cloud.uservm.UserVm; diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/ExtractIsoCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/ExtractIsoCmd.java index 7f893ccd0..08a15eece 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/ExtractIsoCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/ExtractIsoCmd.java @@ -16,13 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.iso; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.ExtractResponse; import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.ZoneResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.ExtractResponse; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InternalErrorException; diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/ListIsoPermissionsCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/ListIsoPermissionsCmd.java index 0ca711f46..faa4f607e 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/ListIsoPermissionsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/ListIsoPermissionsCmd.java @@ -16,8 +16,8 @@ // under the License. package org.apache.cloudstack.api.command.user.iso; -import org.apache.cloudstack.api.BaseListTemplateOrIsoPermissionsCmd; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.BaseListTemplateOrIsoPermissionsCmd; import org.apache.cloudstack.api.response.TemplatePermissionsResponse; import org.apache.log4j.Logger; diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java index e6ccfff34..321960115 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java @@ -21,14 +21,14 @@ import java.util.Set; import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.ZoneResponse; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.TemplateResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.template.VirtualMachineTemplate.TemplateFilter; import com.cloud.user.Account; @@ -52,7 +52,7 @@ public class ListIsosCmd extends BaseListTaggedResourcesCmd { private String hypervisor; @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = TemplateResponse.class, - description="list all isos by id") + description="list ISO by id") private Long id; @Parameter(name=ApiConstants.IS_PUBLIC, type=CommandType.BOOLEAN, description="true if the ISO is publicly available to all users, false otherwise.") @@ -61,11 +61,14 @@ public class ListIsosCmd extends BaseListTaggedResourcesCmd { @Parameter(name=ApiConstants.IS_READY, type=CommandType.BOOLEAN, description="true if this ISO is ready to be deployed") private Boolean ready; - @Parameter(name=ApiConstants.ISO_FILTER, type=CommandType.STRING, description="possible values are \"featured\", \"self\", \"self-executable\",\"executable\", and \"community\". " + - "* featured-ISOs that are featured and are publicself-ISOs that have been registered/created by the owner. " + - "* selfexecutable-ISOs that have been registered/created by the owner that can be used to deploy a new VM. " + - "* executable-all ISOs that can be used to deploy a new VM " + - "* community-ISOs that are public.") + @Parameter(name=ApiConstants.ISO_FILTER, type=CommandType.STRING, description="possible values are \"featured\", \"self\", \"selfexecutable\",\"sharedexecutable\",\"executable\", and \"community\". " + + "* featured : templates that have been marked as featured and public. " + + "* self : templates that have been registered or created by the calling user. " + + "* selfexecutable : same as self, but only returns templates that can be used to deploy a new VM. " + + "* sharedexecutable : templates ready to be deployed that have been granted to the calling user by another user. " + + "* executable : templates that are owned by the calling user, or public templates, that can be used to deploy a VM. " + + "* community : templates that have been marked as public but not featured. " + + "* all : all templates (only usable by admins).") private String isoFilter = TemplateFilter.selfexecutable.toString(); @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="list all isos by name") diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java index fbc09d8bd..284d55308 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java @@ -18,16 +18,20 @@ import java.util.List; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.GuestOSResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.ResourceAllocationException; import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.UserContext; @@ -84,6 +88,10 @@ public class RegisterIsoCmd extends BaseCmd { @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, entityType = ProjectResponse.class, description="Register iso for the project") private Long projectId; + + @Parameter(name=ApiConstants.IMAGE_STORE_UUID, type=CommandType.STRING, + description="Image store uuid") + private String imageStoreUuid; ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// @@ -136,6 +144,10 @@ public String getAccountName() { public String getChecksum() { return checksum; } + + public String getImageStoreUuid() { + return this.imageStoreUuid; + } ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/UpdateIsoCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/UpdateIsoCmd.java index fd1ee3e22..37294e356 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/UpdateIsoCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/UpdateIsoCmd.java @@ -16,14 +16,13 @@ // under the License. package org.apache.cloudstack.api.command.user.iso; -import org.apache.cloudstack.api.BaseUpdateTemplateOrIsoCmd; -import org.apache.log4j.Logger; - -import org.apache.cloudstack.api.ApiErrorCode; -import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseUpdateTemplateOrIsoCmd; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.TemplateResponse; +import org.apache.log4j.Logger; + import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/user/iso/UpdateIsoPermissionsCmd.java b/api/src/org/apache/cloudstack/api/command/user/iso/UpdateIsoPermissionsCmd.java index b7a2c5685..5e884df40 100644 --- a/api/src/org/apache/cloudstack/api/command/user/iso/UpdateIsoPermissionsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/iso/UpdateIsoPermissionsCmd.java @@ -16,11 +16,11 @@ // under the License. package org.apache.cloudstack.api.command.user.iso; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.BaseUpdateTemplateOrIsoPermissionsCmd; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/user/job/ListAsyncJobsCmd.java b/api/src/org/apache/cloudstack/api/command/user/job/ListAsyncJobsCmd.java index 50ac52e02..85062188e 100644 --- a/api/src/org/apache/cloudstack/api/command/user/job/ListAsyncJobsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/job/ListAsyncJobsCmd.java @@ -16,19 +16,14 @@ // under the License. package org.apache.cloudstack.api.command.user.job; -import java.util.ArrayList; import java.util.Date; -import java.util.List; import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListAccountResourcesCmd; import org.apache.cloudstack.api.Parameter; -import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.AsyncJobResponse; import org.apache.cloudstack.api.response.ListResponse; -import com.cloud.async.AsyncJob; -import com.cloud.utils.Pair; @APICommand(name = "listAsyncJobs", description="Lists all pending asynchronous jobs for the account.", responseObject=AsyncJobResponse.class) public class ListAsyncJobsCmd extends BaseListAccountResourcesCmd { diff --git a/api/src/org/apache/cloudstack/api/command/user/job/QueryAsyncJobResultCmd.java b/api/src/org/apache/cloudstack/api/command/user/job/QueryAsyncJobResultCmd.java index 256d4ff5c..5d2ef6898 100644 --- a/api/src/org/apache/cloudstack/api/command/user/job/QueryAsyncJobResultCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/job/QueryAsyncJobResultCmd.java @@ -16,13 +16,13 @@ // under the License. package org.apache.cloudstack.api.command.user.job; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.AsyncJobResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; @APICommand(name = "queryAsyncJobResult", description="Retrieves the current status of asynchronous job.", responseObject=AsyncJobResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/AssignToLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/AssignToLoadBalancerRuleCmd.java index 72c317c89..e0f9bcdd8 100644 --- a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/AssignToLoadBalancerRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/AssignToLoadBalancerRuleCmd.java @@ -18,18 +18,17 @@ import java.util.List; -import org.apache.cloudstack.api.response.FirewallRuleResponse; -import org.apache.cloudstack.api.response.UserVmResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.FirewallRuleResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; import com.cloud.network.rules.LoadBalancer; diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBHealthCheckPolicyCmd.java b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBHealthCheckPolicyCmd.java new file mode 100644 index 000000000..ac0ec3a9d --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBHealthCheckPolicyCmd.java @@ -0,0 +1,168 @@ +// 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 org.apache.cloudstack.api.command.user.loadbalancer; + + +import org.apache.cloudstack.api.response.FirewallRuleResponse; +import org.apache.log4j.Logger; + +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCreateCmd; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import com.cloud.event.EventTypes; +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.exception.ResourceAllocationException; +import com.cloud.exception.ResourceUnavailableException; +import com.cloud.network.rules.HealthCheckPolicy; +import org.apache.cloudstack.api.response.LBHealthCheckResponse; +import com.cloud.network.rules.LoadBalancer; +import com.cloud.user.Account; +import com.cloud.user.UserContext; + + +@APICommand(name = "createLBHealthCheckPolicy", description = "Creates a Load Balancer healthcheck policy ", responseObject = LBHealthCheckResponse.class, since="4.2.0") +@SuppressWarnings("rawtypes") +public class CreateLBHealthCheckPolicyCmd extends BaseAsyncCreateCmd { + public static final Logger s_logger = Logger + .getLogger(CreateLBHealthCheckPolicyCmd.class.getName()); + + private static final String s_name = "createlbhealthcheckpolicyresponse"; + + // /////////////////////////////////////////////////// + // ////////////// API parameters ///////////////////// + // /////////////////////////////////////////////////// + + @Parameter(name = ApiConstants.LBID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, description = "the ID of the load balancer rule") + private Long lbRuleId; + + @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "the description of the load balancer HealthCheck policy") + private String description; + + @Parameter(name = ApiConstants.HEALTHCHECK_PINGPATH, type = CommandType.STRING, required = false, description = "HTTP Ping Path") + private String pingPath; + + @Parameter(name = ApiConstants.HEALTHCHECK_RESPONSE_TIMEOUT, type = CommandType.INTEGER, required = false, description = "Time to wait when receiving a response from the health check (2sec - 60 sec)") + private int responsTimeOut; + + @Parameter(name = ApiConstants.HEALTHCHECK_INTERVAL_TIME, type = CommandType.INTEGER, required = false, description = "Amount of time between health checks (1 sec - 20940 sec)") + private int healthCheckInterval; + + @Parameter(name = ApiConstants.HEALTHCHECK_HEALTHY_THRESHOLD, type = CommandType.INTEGER, required = false, description = "Number of consecutive health check success before declaring an instance healthy") + private int healthyThreshold; + + @Parameter(name = ApiConstants.HEALTHCHECK_UNHEALTHY_THRESHOLD, type = CommandType.INTEGER, required = false, description = "Number of consecutive health check failures before declaring an instance unhealthy") + private int unhealthyThreshold; + + // /////////////////////////////////////////////////// + // ///////////////// Accessors /////////////////////// + // /////////////////////////////////////////////////// + + public Long getLbRuleId() { + return lbRuleId; + } + + public String getDescription() { + return description; + } + + public String getPingPath() { + return pingPath; + } + + // /////////////////////////////////////////////////// + // ///////////// API Implementation/////////////////// + // /////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + Account account = UserContext.current().getCaller(); + if (account != null) { + return account.getId(); + } + + return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked + } + + public int getResponsTimeOut() { + return responsTimeOut; + } + + public int getHealthCheckInterval() { + return healthCheckInterval; + } + + public int getHealthyThreshold() { + return healthyThreshold; + } + + public int getUnhealthyThreshold() { + return unhealthyThreshold; + } + + @Override + public void execute() throws ResourceAllocationException, ResourceUnavailableException { + HealthCheckPolicy policy = null; + boolean success = false; + + try { + UserContext.current().setEventDetails("Load balancer healthcheck policy Id : " + getEntityId()); + success = _lbService.applyLBHealthCheckPolicy(this); + if (success) { + // State might be different after the rule is applied, so get new object here + policy = _entityMgr.findById(HealthCheckPolicy.class, getEntityId()); + LoadBalancer lb = _lbService.findById(policy.getLoadBalancerId()); + LBHealthCheckResponse hcResponse = _responseGenerator.createLBHealthCheckPolicyResponse(policy, lb); + setResponseObject(hcResponse); + hcResponse.setResponseName(getCommandName()); + } + } finally { + if (!success || (policy == null)) { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create healthcheck policy "); + } + } + } + + @Override + public void create() { + try { + HealthCheckPolicy result = _lbService.createLBHealthCheckPolicy(this); + this.setEntityId(result.getId()); + this.setEntityUuid(result.getUuid()); + } catch (InvalidParameterValueException e) { + s_logger.warn("Exception: ", e); + throw new ServerApiException(ApiErrorCode.MALFORMED_PARAMETER_ERROR , e.getMessage()); + } + } + + @Override + public String getEventType() { + return EventTypes.EVENT_LB_HEALTHCHECKPOLICY_CREATE; + } + + @Override + public String getEventDescription() { + return "Create Load Balancer HealthCheck policy"; + } +} diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBStickinessPolicyCmd.java b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBStickinessPolicyCmd.java index 90e89137b..02b253a7c 100644 --- a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBStickinessPolicyCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBStickinessPolicyCmd.java @@ -19,23 +19,22 @@ import java.util.Map; -import org.apache.cloudstack.api.response.FirewallRuleResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.FirewallRuleResponse; +import org.apache.cloudstack.api.response.LBStickinessResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.NetworkRuleConflictException; import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; -import com.cloud.network.rules.StickinessPolicy; -import org.apache.cloudstack.api.response.LBStickinessResponse; import com.cloud.network.rules.LoadBalancer; +import com.cloud.network.rules.StickinessPolicy; import com.cloud.user.Account; import com.cloud.user.UserContext; diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateLoadBalancerRuleCmd.java index 28bde8f36..5f1d97b28 100644 --- a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateLoadBalancerRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/CreateLoadBalancerRuleCmd.java @@ -18,13 +18,10 @@ import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; @@ -32,6 +29,8 @@ import org.apache.cloudstack.api.response.LoadBalancerResponse; import org.apache.cloudstack.api.response.NetworkResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.dc.DataCenter; import com.cloud.dc.DataCenter.NetworkType; diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBHealthCheckPolicyCmd.java b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBHealthCheckPolicyCmd.java new file mode 100644 index 000000000..bf91da51d --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBHealthCheckPolicyCmd.java @@ -0,0 +1,116 @@ +// 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 org.apache.cloudstack.api.command.user.loadbalancer; + +import org.apache.cloudstack.api.response.LBHealthCheckResponse; +import org.apache.log4j.Logger; + +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.SuccessResponse; +import com.cloud.event.EventTypes; +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.network.rules.HealthCheckPolicy; +import com.cloud.network.rules.LoadBalancer; +import com.cloud.user.Account; +import com.cloud.user.UserContext; + +@APICommand(name = "deleteLBHealthCheckPolicy", description = "Deletes a load balancer HealthCheck policy.", responseObject = SuccessResponse.class, since="4.2.0") +public class DeleteLBHealthCheckPolicyCmd extends BaseAsyncCmd { + public static final Logger s_logger = Logger.getLogger(DeleteLBHealthCheckPolicyCmd.class.getName()); + private static final String s_name = "deletelbhealthcheckpolicyresponse"; + // /////////////////////////////////////////////////// + // ////////////// API parameters ///////////////////// + // /////////////////////////////////////////////////// + + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = LBHealthCheckResponse.class, + required = true, description = "the ID of the load balancer HealthCheck policy") + private Long id; + + // /////////////////////////////////////////////////// + // ///////////////// Accessors /////////////////////// + // /////////////////////////////////////////////////// + + public Long getId() { + return id; + } + + // /////////////////////////////////////////////////// + // ///////////// API Implementation/////////////////// + // /////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + Account account = UserContext.current().getCaller(); + if (account != null) { + return account.getId(); + } + + return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked + } + + @Override + public String getEventType() { + return EventTypes.EVENT_LB_HEALTHCHECKPOLICY_DELETE; + } + + @Override + public String getEventDescription() { + return "deleting load balancer HealthCheck policy: " + getId(); + } + + @Override + public void execute() { + UserContext.current().setEventDetails("Load balancer healthcheck policy Id: " + getId()); + boolean result = _lbService.deleteLBHealthCheckPolicy(getId() , true); + + if (result) { + SuccessResponse response = new SuccessResponse(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete load balancer healthcheck policy"); + } + } + + @Override + public String getSyncObjType() { + return BaseAsyncCmd.networkSyncObject; + } + + @Override + public Long getSyncObjId() { + HealthCheckPolicy policy = _entityMgr.findById(HealthCheckPolicy.class, + getId()); + if (policy == null) { + throw new InvalidParameterValueException("Unable to find load balancer healthcheck rule: " + id); + } + LoadBalancer lb = _lbService.findById(policy.getLoadBalancerId()); + if (lb == null) { + throw new InvalidParameterValueException("Unable to find load balancer rule for healthcheck rule: " + id); + } + return lb.getNetworkId(); + } +} diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBStickinessPolicyCmd.java b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBStickinessPolicyCmd.java index 6405dca16..fc7be24d4 100644 --- a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBStickinessPolicyCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBStickinessPolicyCmd.java @@ -16,21 +16,20 @@ // under the License. package org.apache.cloudstack.api.command.user.loadbalancer; -import org.apache.cloudstack.api.response.LBStickinessResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.LBStickinessResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; -import com.cloud.network.rules.StickinessPolicy; import com.cloud.network.rules.LoadBalancer; +import com.cloud.network.rules.StickinessPolicy; import com.cloud.user.Account; import com.cloud.user.UserContext; diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLoadBalancerRuleCmd.java index 84ce225fa..88fa400bb 100644 --- a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLoadBalancerRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLoadBalancerRuleCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.loadbalancer; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.FirewallRuleResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLBHealthCheckPoliciesCmd.java b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLBHealthCheckPoliciesCmd.java new file mode 100644 index 000000000..cf5ea3238 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLBHealthCheckPoliciesCmd.java @@ -0,0 +1,85 @@ +// 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 org.apache.cloudstack.api.command.user.loadbalancer; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.response.FirewallRuleResponse; +import org.apache.log4j.Logger; + +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseListCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.response.LBHealthCheckResponse; +import org.apache.cloudstack.api.response.LBStickinessResponse; +import org.apache.cloudstack.api.response.ListResponse; + +import com.cloud.network.rules.HealthCheckPolicy; +import com.cloud.network.rules.LoadBalancer; +import com.cloud.user.Account; +import com.cloud.user.UserContext; + +@APICommand(name = "listLBHealthCheckPolicies", description = "Lists load balancer HealthCheck policies.", responseObject = LBHealthCheckResponse.class, since="4.2.0") +public class ListLBHealthCheckPoliciesCmd extends BaseListCmd { + public static final Logger s_logger = Logger + .getLogger(ListLBHealthCheckPoliciesCmd.class.getName()); + + private static final String s_name = "listlbhealthcheckpoliciesresponse"; + + // /////////////////////////////////////////////////// + // ////////////// API parameters ///////////////////// + // /////////////////////////////////////////////////// + @Parameter(name = ApiConstants.LBID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, + required = true, description = "the ID of the load balancer rule") + private Long lbRuleId; + + // /////////////////////////////////////////////////// + // ///////////////// Accessors /////////////////////// + // /////////////////////////////////////////////////// + public Long getLbRuleId() { + return lbRuleId; + } + + // /////////////////////////////////////////////////// + // ///////////// API Implementation/////////////////// + // /////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public void execute() { + List hcpResponses = new ArrayList(); + LoadBalancer lb = _lbService.findById(getLbRuleId()); + ListResponse response = new ListResponse(); + + if (lb != null) { + List healthCheckPolicies = _lbService.searchForLBHealthCheckPolicies(this); + LBHealthCheckResponse spResponse = _responseGenerator.createLBHealthCheckPolicyResponse(healthCheckPolicies, lb); + hcpResponses.add(spResponse); + response.setResponses(hcpResponses); + } + + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } + +} diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLBStickinessPoliciesCmd.java b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLBStickinessPoliciesCmd.java index 90708c0bf..9456a157f 100644 --- a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLBStickinessPoliciesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLBStickinessPoliciesCmd.java @@ -20,14 +20,14 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.FirewallRuleResponse; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.response.FirewallRuleResponse; import org.apache.cloudstack.api.response.LBStickinessResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + import com.cloud.network.rules.LoadBalancer; import com.cloud.network.rules.StickinessPolicy; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRuleInstancesCmd.java b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRuleInstancesCmd.java index 374c6fb25..49ab42c32 100644 --- a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRuleInstancesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRuleInstancesCmd.java @@ -19,15 +19,15 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.response.FirewallRuleResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.response.FirewallRuleResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.uservm.UserVm; @APICommand(name = "listLoadBalancerRuleInstances", description="List all virtual machine instances that are assigned to a load balancer rule.", responseObject=UserVmResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRulesCmd.java b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRulesCmd.java index d0d4e8db8..e022cc78d 100644 --- a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRulesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRulesCmd.java @@ -19,11 +19,9 @@ import java.util.ArrayList; import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.FirewallRuleResponse; import org.apache.cloudstack.api.response.IPAddressResponse; @@ -31,6 +29,8 @@ import org.apache.cloudstack.api.response.LoadBalancerResponse; import org.apache.cloudstack.api.response.UserVmResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.network.rules.LoadBalancer; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/RemoveFromLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/RemoveFromLoadBalancerRuleCmd.java index 54c136fae..92a05d6c9 100644 --- a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/RemoveFromLoadBalancerRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/RemoveFromLoadBalancerRuleCmd.java @@ -18,13 +18,17 @@ import java.util.List; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.FirewallRuleResponse; -import org.apache.cloudstack.api.response.UserVmResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; import com.cloud.network.rules.LoadBalancer; diff --git a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLoadBalancerRuleCmd.java index dd2b360ec..c29605799 100644 --- a/api/src/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLoadBalancerRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLoadBalancerRuleCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.loadbalancer; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.FirewallRuleResponse; +import org.apache.cloudstack.api.response.LoadBalancerResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.LoadBalancerResponse; import com.cloud.event.EventTypes; import com.cloud.network.rules.LoadBalancer; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/user/nat/CreateIpForwardingRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/nat/CreateIpForwardingRuleCmd.java index 7867f8de9..4cb5288ce 100644 --- a/api/src/org/apache/cloudstack/api/command/user/nat/CreateIpForwardingRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/nat/CreateIpForwardingRuleCmd.java @@ -18,19 +18,18 @@ import java.util.List; -import org.apache.cloudstack.api.response.IPAddressResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.FirewallRuleResponse; +import org.apache.cloudstack.api.response.IPAddressResponse; import org.apache.cloudstack.api.response.IpForwardingRuleResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/nat/DeleteIpForwardingRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/nat/DeleteIpForwardingRuleCmd.java index 9879cf501..b736b03a6 100644 --- a/api/src/org/apache/cloudstack/api/command/user/nat/DeleteIpForwardingRuleCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/nat/DeleteIpForwardingRuleCmd.java @@ -16,18 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.nat; -import org.apache.cloudstack.api.response.AccountResponse; -import org.apache.cloudstack.api.response.FirewallRuleResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.AccountResponse; +import org.apache.cloudstack.api.response.FirewallRuleResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/nat/DisableStaticNatCmd.java b/api/src/org/apache/cloudstack/api/command/user/nat/DisableStaticNatCmd.java index eded5a107..9bd769aca 100644 --- a/api/src/org/apache/cloudstack/api/command/user/nat/DisableStaticNatCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/nat/DisableStaticNatCmd.java @@ -16,18 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.nat; -import org.apache.cloudstack.api.command.user.firewall.DeletePortForwardingRuleCmd; -import org.apache.cloudstack.api.response.IPAddressResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.command.user.firewall.DeletePortForwardingRuleCmd; +import org.apache.cloudstack.api.response.IPAddressResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.InsufficientAddressCapacityException; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/nat/EnableStaticNatCmd.java b/api/src/org/apache/cloudstack/api/command/user/nat/EnableStaticNatCmd.java index f7cf5aad5..a0ec68ef5 100644 --- a/api/src/org/apache/cloudstack/api/command/user/nat/EnableStaticNatCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/nat/EnableStaticNatCmd.java @@ -16,18 +16,18 @@ // under the License. package org.apache.cloudstack.api.command.user.nat; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; -import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.api.response.IPAddressResponse; import org.apache.cloudstack.api.response.NetworkResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.NetworkRuleConflictException; import com.cloud.exception.ResourceUnavailableException; @@ -59,6 +59,9 @@ public class EnableStaticNatCmd extends BaseCmd{ description="The network of the vm the static nat will be enabled for." + " Required when public Ip address is not associated with any Guest network yet (VPC case)") private Long networkId; + @Parameter(name = ApiConstants.VM_GUEST_IP, type = CommandType.STRING, required = false, + description = "VM guest nic Secondary ip address for the port forwarding rule") + private String vmSecondaryIp; ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// @@ -72,6 +75,13 @@ public Long getVirtualMachineId() { return virtualMachineId; } + public String getVmSecondaryIp() { + if (vmSecondaryIp == null) { + return null; + } + return vmSecondaryIp; + } + public long getNetworkId() { IpAddress ip = _entityMgr.findById(IpAddress.class, getIpAddressId()); Long ntwkId = null; @@ -110,7 +120,7 @@ public long getEntityOwnerId() { @Override public void execute() throws ResourceUnavailableException{ try { - boolean result = _rulesService.enableStaticNat(ipAddressId, virtualMachineId, getNetworkId(), false); + boolean result = _rulesService.enableStaticNat(ipAddressId, virtualMachineId, getNetworkId(), false, getVmSecondaryIp()); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); diff --git a/api/src/org/apache/cloudstack/api/command/user/nat/ListIpForwardingRulesCmd.java b/api/src/org/apache/cloudstack/api/command/user/nat/ListIpForwardingRulesCmd.java index e4aaff3e5..776639b5f 100644 --- a/api/src/org/apache/cloudstack/api/command/user/nat/ListIpForwardingRulesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/nat/ListIpForwardingRulesCmd.java @@ -20,8 +20,6 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; import org.apache.cloudstack.api.Parameter; @@ -30,6 +28,8 @@ import org.apache.cloudstack.api.response.IpForwardingRuleResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.network.rules.FirewallRule; import com.cloud.network.rules.StaticNatRule; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkACLCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkACLCmd.java index d1289b8dd..2e307018e 100644 --- a/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkACLCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkACLCmd.java @@ -19,18 +19,17 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.response.NetworkResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.NetworkACLResponse; +import org.apache.cloudstack.api.response.NetworkResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java index bbd8b5a74..fc7bd9fdd 100644 --- a/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java @@ -16,21 +16,21 @@ // under the License. package org.apache.cloudstack.api.command.user.network; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; -import org.apache.cloudstack.api.response.NetworkResponse; import org.apache.cloudstack.api.response.NetworkOfferingResponse; +import org.apache.cloudstack.api.response.NetworkResponse; import org.apache.cloudstack.api.response.PhysicalNetworkResponse; import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.VpcResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.InvalidParameterValueException; @@ -247,7 +247,7 @@ public String getIp6Cidr() { return ip6Cidr.toLowerCase(); } - ///////////////////////////////////////////////////// + ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// @Override @@ -268,10 +268,6 @@ public long getEntityOwnerId() { @Override // an exception thrown by createNetwork() will be caught by the dispatcher. public void execute() throws InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException{ - if (getStartIpv6() != null && getStartIp() != null) { - throw new InvalidParameterValueException("Cannot support dualstack at this moment!"); - } - Network result = _networkService.createGuestNetwork(this); if (result != null) { NetworkResponse response = _responseGenerator.createNetworkResponse(result); diff --git a/api/src/org/apache/cloudstack/api/command/user/network/DeleteNetworkACLCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/DeleteNetworkACLCmd.java index 798bd43aa..2a2444b3e 100644 --- a/api/src/org/apache/cloudstack/api/command/user/network/DeleteNetworkACLCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/network/DeleteNetworkACLCmd.java @@ -16,18 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.network; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; -import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.FirewallRuleResponse; +import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/network/DeleteNetworkCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/DeleteNetworkCmd.java index 2104501d9..954146e0f 100644 --- a/api/src/org/apache/cloudstack/api/command/user/network/DeleteNetworkCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/network/DeleteNetworkCmd.java @@ -16,13 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.network; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.command.admin.network.DeleteNetworkOfferingCmd; import org.apache.cloudstack.api.response.NetworkResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; import com.cloud.network.Network; diff --git a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkACLsCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkACLsCmd.java index f556ce1cb..d166974e7 100644 --- a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkACLsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkACLsCmd.java @@ -19,16 +19,16 @@ import java.util.ArrayList; import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.response.FirewallRuleResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.NetworkACLResponse; -import org.apache.cloudstack.api.response.FirewallRuleResponse; import org.apache.cloudstack.api.response.NetworkResponse; +import org.apache.log4j.Logger; + import com.cloud.network.rules.FirewallRule; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkOfferingsCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkOfferingsCmd.java index 94bc71dc9..e2c970157 100644 --- a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkOfferingsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworkOfferingsCmd.java @@ -19,16 +19,16 @@ import java.util.ArrayList; import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.NetworkOfferingResponse; import org.apache.cloudstack.api.response.NetworkResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.offering.NetworkOffering; @APICommand(name = "listNetworkOfferings", description="Lists all available network offerings.", responseObject=NetworkOfferingResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java index 1f366c223..afce0926e 100644 --- a/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java @@ -19,17 +19,17 @@ import java.util.ArrayList; import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.NetworkResponse; import org.apache.cloudstack.api.response.PhysicalNetworkResponse; import org.apache.cloudstack.api.response.VpcResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.network.Network; @APICommand(name = "listNetworks", description="Lists all available networks.", responseObject=NetworkResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/user/network/RestartNetworkCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/RestartNetworkCmd.java index c6b5690ae..b054781b6 100644 --- a/api/src/org/apache/cloudstack/api/command/user/network/RestartNetworkCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/network/RestartNetworkCmd.java @@ -16,13 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.network; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.IPAddressResponse; -import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.api.response.NetworkResponse; +import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; diff --git a/api/src/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java b/api/src/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java index 978c71b94..a61474e69 100644 --- a/api/src/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.network; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; -import org.apache.cloudstack.api.response.NetworkResponse; import org.apache.cloudstack.api.response.NetworkOfferingResponse; +import org.apache.cloudstack.api.response.NetworkResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; @@ -65,6 +64,9 @@ public class UpdateNetworkCmd extends BaseAsyncCmd { description="network offering ID") private Long networkOfferingId; + @Parameter(name=ApiConstants.GUEST_VM_CIDR, type=CommandType.STRING, description="CIDR for Guest VMs,Cloudstack allocates IPs to Guest VMs only from this CIDR") + private String guestVmCidr; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// @@ -95,6 +97,10 @@ public Boolean getChangeCidr() { } return false; } + + private String getGuestVmCidr() { + return guestVmCidr; + } ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// @@ -123,14 +129,9 @@ public void execute() throws InsufficientCapacityException, ConcurrentOperationE throw new InvalidParameterValueException("Couldn't find network by id"); } - Network result = null; - if (network.getVpcId() != null) { - result = _vpcService.updateVpcGuestNetwork(getId(), getNetworkName(), getDisplayText(), callerAccount, - callerUser, getNetworkDomain(), getNetworkOfferingId(), getChangeCidr()); - } else { - result = _networkService.updateGuestNetwork(getId(), getNetworkName(), getDisplayText(), callerAccount, - callerUser, getNetworkDomain(), getNetworkOfferingId(), getChangeCidr()); - } + Network result = _networkService.updateGuestNetwork(getId(), getNetworkName(), getDisplayText(), callerAccount, + callerUser, getNetworkDomain(), getNetworkOfferingId(), getChangeCidr(), getGuestVmCidr()); + if (result != null) { NetworkResponse response = _responseGenerator.createNetworkResponse(result); diff --git a/api/src/org/apache/cloudstack/api/command/user/offering/ListDiskOfferingsCmd.java b/api/src/org/apache/cloudstack/api/command/user/offering/ListDiskOfferingsCmd.java index 1fc7978f0..eb48d8142 100644 --- a/api/src/org/apache/cloudstack/api/command/user/offering/ListDiskOfferingsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/offering/ListDiskOfferingsCmd.java @@ -19,16 +19,16 @@ import java.util.ArrayList; import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.AsyncJobResponse; import org.apache.cloudstack.api.response.DiskOfferingResponse; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; + import com.cloud.offering.DiskOffering; @APICommand(name = "listDiskOfferings", description="Lists all available disk offerings.", responseObject=DiskOfferingResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/user/offering/ListServiceOfferingsCmd.java b/api/src/org/apache/cloudstack/api/command/user/offering/ListServiceOfferingsCmd.java index 5f773d028..ca16cdc7e 100644 --- a/api/src/org/apache/cloudstack/api/command/user/offering/ListServiceOfferingsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/offering/ListServiceOfferingsCmd.java @@ -16,17 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.offering; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.ServiceOfferingResponse; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + @APICommand(name = "listServiceOfferings", description="Lists all available service offerings.", responseObject=ServiceOfferingResponse.class) public class ListServiceOfferingsCmd extends BaseListCmd { public static final Logger s_logger = Logger.getLogger(ListServiceOfferingsCmd.class.getName()); diff --git a/api/src/org/apache/cloudstack/api/command/user/project/ActivateProjectCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/ActivateProjectCmd.java index 8fd52753d..95889fe40 100644 --- a/api/src/org/apache/cloudstack/api/command/user/project/ActivateProjectCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/project/ActivateProjectCmd.java @@ -16,11 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.user.project; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; import com.cloud.projects.Project; diff --git a/api/src/org/apache/cloudstack/api/command/user/project/CreateProjectCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/CreateProjectCmd.java index 095cbfc49..7515f0513 100644 --- a/api/src/org/apache/cloudstack/api/command/user/project/CreateProjectCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/project/CreateProjectCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.project; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCreateCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.ResourceAllocationException; diff --git a/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectCmd.java index 6f7467fad..9b61b6996 100644 --- a/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.project; -import org.apache.cloudstack.api.response.ProjectResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; import com.cloud.projects.Project; diff --git a/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectInvitationCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectInvitationCmd.java index 7ed857e57..27d1b50ca 100644 --- a/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectInvitationCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/project/DeleteProjectInvitationCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.project; -import org.apache.cloudstack.api.response.ProjectInvitationResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.ProjectInvitationResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.user.Account; import com.cloud.user.UserContext; diff --git a/api/src/org/apache/cloudstack/api/command/user/project/ListProjectInvitationsCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/ListProjectInvitationsCmd.java index 4157daa7b..6e8b2da5d 100644 --- a/api/src/org/apache/cloudstack/api/command/user/project/ListProjectInvitationsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/project/ListProjectInvitationsCmd.java @@ -16,15 +16,14 @@ // under the License. package org.apache.cloudstack.api.command.user.project; -import org.apache.cloudstack.api.response.ProjectResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListAccountResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.ProjectInvitationResponse; +import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.log4j.Logger; @APICommand(name = "listProjectInvitations", description = "Lists projects and provides detailed information for listed projects", responseObject = ProjectInvitationResponse.class, since = "3.0.0") public class ListProjectInvitationsCmd extends BaseListAccountResourcesCmd { diff --git a/api/src/org/apache/cloudstack/api/command/user/project/ListProjectsCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/ListProjectsCmd.java index 321a19fe6..08cef1012 100644 --- a/api/src/org/apache/cloudstack/api/command/user/project/ListProjectsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/project/ListProjectsCmd.java @@ -21,14 +21,13 @@ import java.util.Iterator; import java.util.Map; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListAccountResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.log4j.Logger; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/project/SuspendProjectCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/SuspendProjectCmd.java index 01e4082c1..e2f4bd621 100644 --- a/api/src/org/apache/cloudstack/api/command/user/project/SuspendProjectCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/project/SuspendProjectCmd.java @@ -16,11 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.user.project; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectCmd.java index 01f56311d..e475bc7b8 100644 --- a/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectCmd.java @@ -16,16 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.user.project; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.ResourceAllocationException; diff --git a/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectInvitationCmd.java b/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectInvitationCmd.java index 637c63395..f34814a43 100644 --- a/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectInvitationCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/project/UpdateProjectInvitationCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.project; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.event.EventTypes; import com.cloud.user.Account; import com.cloud.user.UserContext; diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ListRegionsCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ListRegionsCmd.java new file mode 100644 index 000000000..07f93a456 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/region/ListRegionsCmd.java @@ -0,0 +1,88 @@ +// 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 org.apache.cloudstack.api.command.user.region; + +import java.util.ArrayList; +import java.util.List; + +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseListCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.RegionResponse; +import org.apache.cloudstack.region.Region; +import org.apache.cloudstack.region.RegionService; +import org.apache.log4j.Logger; + +@APICommand(name = "listRegions", description="Lists Regions", responseObject=RegionResponse.class) +public class ListRegionsCmd extends BaseListCmd { + public static final Logger s_logger = Logger.getLogger(ListRegionsCmd.class.getName()); + + private static final String s_name = "listregionsresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name=ApiConstants.ID, type=CommandType.INTEGER, description="List Region by region ID.") + private Integer id; + + @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="List Region by region name.") + private String name; + + @Inject RegionService _regionService; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public Integer getId() { + return id; + } + + public String getName() { + return name; + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public void execute(){ + List result = _regionService.listRegions(this); + ListResponse response = new ListResponse(); + List regionResponses = new ArrayList(); + for (Region region : result) { + RegionResponse regionResponse = _responseGenerator.createRegionResponse(region); + regionResponse.setObjectName("region"); + regionResponses.add(regionResponse); + } + + response.setResponses(regionResponses); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } +} diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java new file mode 100644 index 000000000..1c07a0aad --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java @@ -0,0 +1,128 @@ +// 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 org.apache.cloudstack.api.command.user.region.ha.gslb; + +import com.cloud.event.EventTypes; +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.region.ha.GlobalLoadBalancerRule; +import com.cloud.region.ha.GlobalLoadBalancingRulesService; +import com.cloud.user.Account; +import com.cloud.user.UserContext; +import com.cloud.utils.StringUtils; +import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.response.FirewallRuleResponse; +import org.apache.cloudstack.api.response.GlobalLoadBalancerResponse; +import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + +import javax.inject.Inject; +import java.util.List; + +@APICommand(name = "assignToGlobalLoadBalancerRule", description="Assign load balancer rule or list of load " + + "balancer rules to a global load balancer rules.", responseObject=SuccessResponse.class) +public class AssignToGlobalLoadBalancerRuleCmd extends BaseAsyncCmd { + + public static final Logger s_logger = Logger.getLogger(AssignToGlobalLoadBalancerRuleCmd.class.getName()); + + private static final String s_name = "assigntogloballoadbalancerruleresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = GlobalLoadBalancerResponse.class, + required=true, description="the ID of the global load balancer rule") + private Long id; + + @Parameter(name=ApiConstants.LOAD_BALANCER_RULE_LIST, type=CommandType.LIST, collectionType=CommandType.UUID, + entityType = FirewallRuleResponse.class, required=true, description="the list load balancer rules that " + + "will be assigned to gloabal load balacner rule") + private List loadBalancerRulesIds; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public Long getGlobalLoadBalancerRuleId() { + return id; + } + + public List getLoadBalancerRulesIds() { + return loadBalancerRulesIds; + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Inject + public GlobalLoadBalancingRulesService _gslbService; + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + GlobalLoadBalancerRule globalLoadBalancerRule = _entityMgr.findById(GlobalLoadBalancerRule.class, + getGlobalLoadBalancerRuleId()); + if (globalLoadBalancerRule == null) { + return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked + } + return globalLoadBalancerRule.getAccountId(); + } + + @Override + public String getEventType() { + return EventTypes.EVENT_ASSIGN_TO_GLOBAL_LOAD_BALANCER_RULE; + } + + @Override + public String getEventDescription() { + return "applying load balancer rules " + StringUtils.join(getLoadBalancerRulesIds(), ",") + + " to global load balancer rule " + getGlobalLoadBalancerRuleId(); + } + + @Override + public void execute(){ + UserContext.current().setEventDetails("Global Load balancer rule Id: "+ getGlobalLoadBalancerRuleId()+ " VmIds: " + + StringUtils.join(getLoadBalancerRulesIds(), ",")); + boolean result = _gslbService.assignToGlobalLoadBalancerRule(this); + if (result) { + SuccessResponse response = new SuccessResponse(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to assign global load balancer rule"); + } + } + + @Override + public String getSyncObjType() { + return BaseAsyncCmd.gslbSyncObject; + } + + @Override + public Long getSyncObjId() { + GlobalLoadBalancerRule gslb = _gslbService.findById(id); + if(gslb == null){ + throw new InvalidParameterValueException("Unable to find load balancer rule: " + id); + } + return gslb.getId(); + } +} diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java new file mode 100644 index 000000000..b08b6aeff --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java @@ -0,0 +1,182 @@ +// 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 org.apache.cloudstack.api.command.user.region.ha.gslb; + +import com.cloud.async.AsyncJob; +import com.cloud.event.EventTypes; +import com.cloud.exception.ResourceAllocationException; +import com.cloud.exception.ResourceUnavailableException; +import com.cloud.region.ha.GlobalLoadBalancerRule; +import com.cloud.region.ha.GlobalLoadBalancingRulesService; +import com.cloud.user.UserContext; +import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.api.response.GlobalLoadBalancerResponse; +import org.apache.cloudstack.api.response.RegionResponse; +import org.apache.log4j.Logger; + +import javax.inject.Inject; + +@APICommand(name = "createGlobalLoadBalancerRule", description="Creates a global load balancer rule", + responseObject=GlobalLoadBalancerResponse.class) +public class CreateGlobalLoadBalancerRuleCmd extends BaseAsyncCreateCmd { + + public static final Logger s_logger = Logger.getLogger(CreateGlobalLoadBalancerRuleCmd.class.getName()); + + private static final String s_name = "creategloballoadbalancerruleresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, required=true, description="name of the load balancer rule") + private String globalLoadBalancerRuleName; + + @Parameter(name=ApiConstants.DESCRIPTION, type=CommandType.STRING, description="the description of the load balancer rule", length=4096) + private String description; + + @Parameter(name=ApiConstants.REGION_ID, type=CommandType.INTEGER, entityType = RegionResponse.class, required=true, description="region where the global load balancer is going to be created.") + private Integer regionId; + + @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, description="the account associated with the global load balancer. Must be used with the domainId parameter.") + private String accountName; + + @Parameter(name=ApiConstants.DOMAIN_ID, type=CommandType.UUID, entityType = DomainResponse.class, description="the domain ID associated with the load balancer") + private Long domainId; + + @Parameter(name=ApiConstants.GSLB_LB_METHOD, type=CommandType.STRING, required=false, description="load balancer algorithm (roundrobin, leastconn, proximity) " + + "that method is used to distribute traffic across the zones participating in global server load balancing, if not specified defaults to 'round robin'") + private String algorithm; + + @Parameter(name=ApiConstants.GSLB_STICKY_SESSION_METHOD, type=CommandType.STRING, required=false, description="session sticky method (sourceip) if not specified defaults to sourceip") + private String stickyMethod; + + @Parameter(name=ApiConstants.GSLB_SERVICE_DOMAIN_NAME, type = CommandType.STRING, required = true, description = "domain name for the GSLB service.") + private String serviceDomainName; + + @Parameter(name=ApiConstants.GSLB_SERVICE_TYPE, type = CommandType.STRING, required = true, description = "GSLB service type (tcp, udp)") + private String serviceType; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public String getName() { + return globalLoadBalancerRuleName; + } + + public String getDescription() { + return description; + } + + public String getAlgorithm() { + return algorithm; + } + + public String getGslbMethod() { + return algorithm; + } + + public String getStickyMethod() { + if (stickyMethod == null) { + return "sourceip"; + } + return stickyMethod; + } + + public String getServiceDomainName() { + return serviceDomainName; + } + + public Integer getRegionId() { + return regionId; + } + + public String getServiceType() { + return serviceType; + } + + @Inject + private GlobalLoadBalancingRulesService _gslbService; + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public void execute() throws ResourceAllocationException, ResourceUnavailableException { + + UserContext callerContext = UserContext.current(); + GlobalLoadBalancerRule rule = _entityMgr.findById(GlobalLoadBalancerRule.class, getEntityId()); + GlobalLoadBalancerResponse response = null; + if (rule != null) { + response = _responseGenerator.createGlobalLoadBalancerResponse(rule); + setResponseObject(response); + } + response.setResponseName(getCommandName()); + } + + @Override + public void create() { + try { + GlobalLoadBalancerRule gslbRule = _gslbService.createGlobalLoadBalancerRule(this); + this.setEntityId(gslbRule.getId()); + this.setEntityUuid(gslbRule.getUuid()); + UserContext.current().setEventDetails("Rule Id: " + getEntityId()); + } catch (Exception ex) { + s_logger.warn("Exception: ", ex); + throw new ServerApiException(ApiErrorCode.PARAM_ERROR, ex.getMessage()); + }finally { + + } + } + + @Override + public String getEventType() { + return EventTypes.EVENT_GLOBAL_LOAD_BALANCER_CREATE; + } + + @Override + public String getEventDescription() { + return "creating a global load balancer: " + getName() + " for account: " + getAccountName(); + + } + + @Override + public AsyncJob.Type getInstanceType() { + return AsyncJob.Type.GlobalLoadBalancerRule; + } + + @Override + public long getEntityOwnerId() { + Long accountId = finalyzeAccountId(accountName, domainId, null, true); + if (accountId == null) { + return UserContext.current().getCaller().getId(); + } + return accountId; + } + + public String getAccountName() { + return accountName; + } +} diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java new file mode 100644 index 000000000..424b10728 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java @@ -0,0 +1,108 @@ +// 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 org.apache.cloudstack.api.command.user.region.ha.gslb; + +import com.cloud.async.AsyncJob; +import com.cloud.event.EventTypes; +import com.cloud.region.ha.GlobalLoadBalancerRule; +import com.cloud.region.ha.GlobalLoadBalancingRulesService; +import com.cloud.user.Account; +import com.cloud.user.UserContext; +import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.response.GlobalLoadBalancerResponse; +import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + +import javax.inject.Inject; + +@APICommand(name = "deleteGlobalLoadBalancerRule", description="Deletes a global load balancer rule.", responseObject=SuccessResponse.class) +public class DeleteGlobalLoadBalancerRuleCmd extends BaseAsyncCmd { + + public static final Logger s_logger = Logger.getLogger(DeleteGlobalLoadBalancerRuleCmd.class.getName()); + + private static final String s_name = "deletegloballoadbalancerruleresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = GlobalLoadBalancerResponse.class, required=true, description="the ID of the global load balancer rule") + private Long id; + + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public Long getGlobalLoadBalancerId() { + return id; + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + @Inject + public GlobalLoadBalancingRulesService _gslbService; + + @Override + public long getEntityOwnerId() { + GlobalLoadBalancerRule lb = _entityMgr.findById(GlobalLoadBalancerRule.class, getGlobalLoadBalancerId()); + if (lb != null) { + return lb.getAccountId(); + } + + return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked + } + + @Override + public String getEventType() { + return EventTypes.EVENT_LOAD_BALANCER_DELETE; + } + + @Override + public String getEventDescription() { + return "deleting global load balancer: " + getGlobalLoadBalancerId(); + } + + @Override + public void execute(){ + _gslbService.deleteGlobalLoadBalancerRule(this); + UserContext.current().setEventDetails("Deleting global Load balancer Id: " + getGlobalLoadBalancerId()); + } + + @Override + public String getSyncObjType() { + return BaseAsyncCmd.networkSyncObject; + } + + @Override + public Long getSyncObjId() { + return null; + } + + @Override + public AsyncJob.Type getInstanceType() { + return AsyncJob.Type.GlobalLoadBalancerRule; + } +} diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/ListGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/ListGlobalLoadBalancerRuleCmd.java new file mode 100644 index 000000000..d75de57f7 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/ListGlobalLoadBalancerRuleCmd.java @@ -0,0 +1,92 @@ +// 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 org.apache.cloudstack.api.command.user.region.ha.gslb; + +import com.cloud.region.ha.GlobalLoadBalancerRule; +import com.cloud.region.ha.GlobalLoadBalancingRulesService; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.response.GlobalLoadBalancerResponse; +import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.RegionResponse; +import org.apache.log4j.Logger; + +import javax.inject.Inject; +import java.util.ArrayList; +import java.util.List; + +@APICommand(name = "listGlobalLoadBalancerRules", description = "Lists load balancer rules.", responseObject = GlobalLoadBalancerResponse.class) +public class ListGlobalLoadBalancerRuleCmd extends BaseListTaggedResourcesCmd { + public static final Logger s_logger = Logger.getLogger(ListGlobalLoadBalancerRuleCmd.class.getName()); + + private static final String s_name = "listgloballoadbalancerrulesresponse"; + + // /////////////////////////////////////////////////// + // ////////////// API parameters ///////////////////// + // /////////////////////////////////////////////////// + + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GlobalLoadBalancerResponse.class, description = "the ID of the global load balancer rule") + private Long id; + + @Parameter(name = ApiConstants.REGION_ID, type = CommandType.INTEGER, entityType = RegionResponse.class, description = "region ID") + private Integer regionId; + + // /////////////////////////////////////////////////// + // ///////////////// Accessors /////////////////////// + // /////////////////////////////////////////////////// + + public Long getId() { + return id; + } + + public Integer getRegionId() { + return regionId; + } + + // /////////////////////////////////////////////////// + // ///////////// API Implementation/////////////////// + // /////////////////////////////////////////////////// + + @Inject + public GlobalLoadBalancingRulesService _gslbService; + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public void execute() { + List globalLoadBalancers = _gslbService.listGlobalLoadBalancerRule(this); + ListResponse gslbRuleResponse = new ListResponse(); + List gslbResponses = new ArrayList(); + if (globalLoadBalancers != null) { + for (GlobalLoadBalancerRule gslbRule: globalLoadBalancers) { + GlobalLoadBalancerResponse gslbResponse = _responseGenerator.createGlobalLoadBalancerResponse(gslbRule); + gslbResponse.setObjectName("globalloadbalancerrule"); + gslbResponses.add(gslbResponse); + } + } + gslbRuleResponse.setResponses(gslbResponses); + gslbRuleResponse.setResponseName(getCommandName()); + this.setResponseObject(gslbRuleResponse); + } + +} diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/RemoveFromGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/RemoveFromGlobalLoadBalancerRuleCmd.java new file mode 100644 index 000000000..fa051af54 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/RemoveFromGlobalLoadBalancerRuleCmd.java @@ -0,0 +1,125 @@ +// 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 org.apache.cloudstack.api.command.user.region.ha.gslb; + +import com.cloud.event.EventTypes; +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.region.ha.GlobalLoadBalancerRule; +import com.cloud.region.ha.GlobalLoadBalancingRulesService; +import com.cloud.user.Account; +import com.cloud.user.UserContext; +import com.cloud.utils.StringUtils; +import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.response.FirewallRuleResponse; +import org.apache.cloudstack.api.response.GlobalLoadBalancerResponse; +import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + +import javax.inject.Inject; +import java.util.List; + +@APICommand(name = "removeFromGlobalLoadBalancerRule", description="Removes a load balancer rule association with" + + " global load balancer rule", responseObject=SuccessResponse.class) +public class RemoveFromGlobalLoadBalancerRuleCmd extends BaseAsyncCmd { + public static final Logger s_logger = Logger.getLogger(RemoveFromGlobalLoadBalancerRuleCmd.class.getName()); + + private static final String s_name = "removefromloadbalancerruleresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = GlobalLoadBalancerResponse.class, + required=true, description="The ID of the load balancer rule") + private Long id; + + @Parameter(name=ApiConstants.LOAD_BALANCER_RULE_LIST, type=CommandType.LIST, collectionType=CommandType.UUID, + entityType = FirewallRuleResponse.class, required=true, description="the list load balancer rules that " + + "will be assigned to gloabal load balacner rule") + private List loadBalancerRulesIds; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public Long getGlobalLoadBalancerRuleId() { + return id; + } + + public List getLoadBalancerRulesIds() { + return loadBalancerRulesIds; + } + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Inject + public GlobalLoadBalancingRulesService _gslbService; + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + GlobalLoadBalancerRule globalLoadBalancerRule = _entityMgr.findById(GlobalLoadBalancerRule.class, getGlobalLoadBalancerRuleId()); + if (globalLoadBalancerRule == null) { + return Account.ACCOUNT_ID_SYSTEM; // bad id given, parent this command to SYSTEM so ERROR events are tracked + } + return globalLoadBalancerRule.getAccountId(); + } + + @Override + public String getEventType() { + return EventTypes.EVENT_REMOVE_FROM_GLOBAL_LOAD_BALANCER_RULE; + } + + @Override + public String getEventDescription() { + return "removing load balancer rules:" + StringUtils.join(getLoadBalancerRulesIds(), ",") + + " from global load balancer: " + getGlobalLoadBalancerRuleId(); + } + + @Override + public void execute(){ + UserContext.current().setEventDetails("Global Load balancer rule Id: "+ getGlobalLoadBalancerRuleId()+ " VmIds: " + + StringUtils.join(getLoadBalancerRulesIds(), ",")); + boolean result = _gslbService.removeFromGlobalLoadBalancerRule(this); + if (result) { + SuccessResponse response = new SuccessResponse(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove load balancer rule from global load balancer rule"); + } + } + + @Override + public String getSyncObjType() { + return BaseAsyncCmd.gslbSyncObject; + } + + @Override + public Long getSyncObjId() { + GlobalLoadBalancerRule gslb = _gslbService.findById(id); + if(gslb == null){ + throw new InvalidParameterValueException("Unable to find load balancer rule: " + id); + } + return gslb.getId(); + } +} diff --git a/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/UpdateGlobalLoadBalancerRuleCmd.java b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/UpdateGlobalLoadBalancerRuleCmd.java new file mode 100644 index 000000000..10694e163 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/region/ha/gslb/UpdateGlobalLoadBalancerRuleCmd.java @@ -0,0 +1,96 @@ +// 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 org.apache.cloudstack.api.command.user.region.ha.gslb; + +import com.cloud.region.ha.GlobalLoadBalancingRulesService; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.response.GlobalLoadBalancerResponse; +import org.apache.cloudstack.api.response.LoadBalancerResponse; +import org.apache.log4j.Logger; + +import javax.inject.Inject; + +@APICommand(name = "updateGlobalLoadBalancerRule", description = "update global load balancer rules.", responseObject = LoadBalancerResponse.class) +public class UpdateGlobalLoadBalancerRuleCmd extends BaseListTaggedResourcesCmd { + public static final Logger s_logger = Logger.getLogger(GlobalLoadBalancerResponse.class.getName()); + + private static final String s_name = "updategloballoadbalancerruleresponse"; + + // /////////////////////////////////////////////////// + // ////////////// API parameters ///////////////////// + // /////////////////////////////////////////////////// + + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = GlobalLoadBalancerResponse.class, + required=true, description="the ID of the global load balancer rule") + private Long id; + + @Parameter(name=ApiConstants.DESCRIPTION, type=CommandType.STRING, description="the description of the load balancer rule", length=4096) + private String description; + + @Parameter(name=ApiConstants.GSLB_LB_METHOD, type=CommandType.STRING, required=false, description="load balancer algorithm (roundrobin, leastconn, proximity) " + + "that is used to distributed traffic across the zones participating in global server load balancing, if not specified defaults to 'round robin'") + private String algorithm; + + @Parameter(name=ApiConstants.GSLB_STICKY_SESSION_METHOD, type=CommandType.STRING, required=false, description="session sticky method (sourceip) if not specified defaults to sourceip") + private String stickyMethod; + + // /////////////////////////////////////////////////// + // ///////////////// Accessors /////////////////////// + // /////////////////////////////////////////////////// + + public Long getId() { + return id; + } + + public String getDescription() { + return description; + } + + public String getAlgorithm() { + return algorithm; + } + + public String getGslbMethod() { + return algorithm; + } + + public String getStickyMethod() { + return stickyMethod; + } + + // /////////////////////////////////////////////////// + // ///////////// API Implementation/////////////////// + // /////////////////////////////////////////////////// + + @Inject + public GlobalLoadBalancingRulesService _gslbService; + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public void execute() { + _gslbService.updateGlobalLoadBalancerRule(this); + } + +} diff --git a/api/src/org/apache/cloudstack/api/command/user/resource/GetCloudIdentifierCmd.java b/api/src/org/apache/cloudstack/api/command/user/resource/GetCloudIdentifierCmd.java index 5799db26d..716addba2 100644 --- a/api/src/org/apache/cloudstack/api/command/user/resource/GetCloudIdentifierCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/resource/GetCloudIdentifierCmd.java @@ -18,16 +18,16 @@ import java.util.ArrayList; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.CloudIdentifierResponse; import org.apache.cloudstack.api.response.UserResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; @APICommand(name = "getCloudIdentifier", description="Retrieves a cloud identifier.", responseObject=CloudIdentifierResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/user/resource/ListHypervisorsCmd.java b/api/src/org/apache/cloudstack/api/command/user/resource/ListHypervisorsCmd.java index c1e29d3f3..fffd3ade3 100644 --- a/api/src/org/apache/cloudstack/api/command/user/resource/ListHypervisorsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/resource/ListHypervisorsCmd.java @@ -19,16 +19,16 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.command.admin.router.UpgradeRouterCmd; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.command.admin.router.UpgradeRouterCmd; import org.apache.cloudstack.api.response.HypervisorResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; @APICommand(name = "listHypervisors", description = "List hypervisors", responseObject = HypervisorResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/user/resource/ListResourceLimitsCmd.java b/api/src/org/apache/cloudstack/api/command/user/resource/ListResourceLimitsCmd.java index 12a8494bd..191e9589a 100644 --- a/api/src/org/apache/cloudstack/api/command/user/resource/ListResourceLimitsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/resource/ListResourceLimitsCmd.java @@ -19,14 +19,14 @@ import java.util.ArrayList; import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.ResourceLimitResponse; +import org.apache.log4j.Logger; + import com.cloud.configuration.ResourceLimit; @APICommand(name = "listResourceLimits", description="Lists resource limits.", responseObject=ResourceLimitResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceCountCmd.java b/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceCountCmd.java index 4aa694b68..0f4c93282 100644 --- a/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceCountCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceCountCmd.java @@ -19,14 +19,18 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; -import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.ResourceCountResponse; +import org.apache.log4j.Logger; + import com.cloud.configuration.ResourceCount; import com.cloud.user.Account; import com.cloud.user.UserContext; @@ -49,12 +53,19 @@ public class UpdateResourceCountCmd extends BaseCmd { required=true, description="If account parameter specified then updates resource counts for a specified account in this domain else update resource counts for all accounts & child domains in specified domain.") private Long domainId; - @Parameter(name=ApiConstants.RESOURCE_TYPE, type=CommandType.INTEGER, description= "Type of resource to update. If specifies valid values are 0, 1, 2, 3, and 4. If not specified will update all resource counts" + + @Parameter(name=ApiConstants.RESOURCE_TYPE, type=CommandType.INTEGER, description= "Type of resource to update. If specifies valid values are 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and 11. If not specified will update all resource counts" + "0 - Instance. Number of instances a user can create. " + "1 - IP. Number of public IP addresses a user can own. " + "2 - Volume. Number of disk volumes a user can create." + "3 - Snapshot. Number of snapshots a user can create." + - "4 - Template. Number of templates that a user can register/create.") + "4 - Template. Number of templates that a user can register/create." + + "5 - Project. Number of projects that a user can create." + + "6 - Network. Number of guest network a user can create." + + "7 - VPC. Number of VPC a user can create." + + "8 - CPU. Total number of CPU cores a user can use." + + "9 - Memory. Total Memory (in MB) a user can use." + + "10 - PrimaryStorage. Total primary storage space (in GiB) a user can use." + + "11 - SecondaryStorage. Total secondary storage space (in GiB) a user can use." ) private Integer resourceType; @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, entityType = ProjectResponse.class, diff --git a/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceLimitCmd.java b/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceLimitCmd.java index 9b6359fcc..826596c4c 100644 --- a/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceLimitCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/resource/UpdateResourceLimitCmd.java @@ -16,13 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.resource; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.ResourceLimitResponse; +import org.apache.log4j.Logger; + import com.cloud.configuration.ResourceLimit; import com.cloud.user.UserContext; @@ -50,11 +54,17 @@ public class UpdateResourceLimitCmd extends BaseCmd { @Parameter(name=ApiConstants.MAX, type=CommandType.LONG, description=" Maximum resource limit.") private Long max; - @Parameter(name=ApiConstants.RESOURCE_TYPE, type=CommandType.INTEGER, required=true, description="Type of resource to update. Values are 0, 1, 2, 3, and 4. 0 - Instance. Number of instances a user can create. " + + @Parameter(name=ApiConstants.RESOURCE_TYPE, type=CommandType.INTEGER, required=true, description="Type of resource to update. Values are 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 and 11. 0 - Instance. Number of instances a user can create. " + "1 - IP. Number of public IP addresses a user can own. " + "2 - Volume. Number of disk volumes a user can create." + "3 - Snapshot. Number of snapshots a user can create." + - "4 - Template. Number of templates that a user can register/create.") + "4 - Template. Number of templates that a user can register/create." + + "6 - Network. Number of guest network a user can create." + + "7 - VPC. Number of VPC a user can create." + + "8 - CPU. Total number of CPU cores a user can use." + + "9 - Memory. Total Memory (in MB) a user can use." + + "10 - PrimaryStorage. Total primary storage space (in GiB) a user can use." + + "11 - SecondaryStorage. Total secondary storage space (in GiB) a user can use." ) private Integer resourceType; ///////////////////////////////////////////////////// diff --git a/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupEgressCmd.java b/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupEgressCmd.java index 0551089f0..74eb5c7ce 100644 --- a/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupEgressCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupEgressCmd.java @@ -22,13 +22,18 @@ import java.util.List; import java.util.Map; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ProjectAccountResponse; -import org.apache.cloudstack.api.response.SecurityGroupRuleResponse; import org.apache.cloudstack.api.response.SecurityGroupResponse; +import org.apache.cloudstack.api.response.SecurityGroupRuleResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupIngressCmd.java b/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupIngressCmd.java index 35939d366..22e88c231 100644 --- a/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupIngressCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupIngressCmd.java @@ -22,19 +22,18 @@ import java.util.List; import java.util.Map; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ProjectAccountResponse; import org.apache.cloudstack.api.response.SecurityGroupResponse; import org.apache.cloudstack.api.response.SecurityGroupRuleResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/securitygroup/CreateSecurityGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/securitygroup/CreateSecurityGroupCmd.java index 5dc492914..839afb2c2 100644 --- a/api/src/org/apache/cloudstack/api/command/user/securitygroup/CreateSecurityGroupCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/securitygroup/CreateSecurityGroupCmd.java @@ -16,17 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.securitygroup; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ProjectAccountResponse; import org.apache.cloudstack.api.response.SecurityGroupResponse; +import org.apache.log4j.Logger; + import com.cloud.network.security.SecurityGroup; import com.cloud.user.Account; import com.cloud.user.UserContext; diff --git a/api/src/org/apache/cloudstack/api/command/user/securitygroup/DeleteSecurityGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/securitygroup/DeleteSecurityGroupCmd.java index 506dc53ff..aa6ec2d38 100644 --- a/api/src/org/apache/cloudstack/api/command/user/securitygroup/DeleteSecurityGroupCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/securitygroup/DeleteSecurityGroupCmd.java @@ -16,18 +16,18 @@ // under the License. package org.apache.cloudstack.api.command.user.securitygroup; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ProjectAccountResponse; import org.apache.cloudstack.api.response.SecurityGroupResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.ResourceInUseException; import com.cloud.user.UserContext; diff --git a/api/src/org/apache/cloudstack/api/command/user/securitygroup/ListSecurityGroupsCmd.java b/api/src/org/apache/cloudstack/api/command/user/securitygroup/ListSecurityGroupsCmd.java index cf1ab84ba..670124d5e 100644 --- a/api/src/org/apache/cloudstack/api/command/user/securitygroup/ListSecurityGroupsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/securitygroup/ListSecurityGroupsCmd.java @@ -16,15 +16,14 @@ // under the License. package org.apache.cloudstack.api.command.user.securitygroup; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.SecurityGroupResponse; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; import com.cloud.async.AsyncJob; diff --git a/api/src/org/apache/cloudstack/api/command/user/securitygroup/RevokeSecurityGroupEgressCmd.java b/api/src/org/apache/cloudstack/api/command/user/securitygroup/RevokeSecurityGroupEgressCmd.java index 27072fcb6..8e7f2ec1b 100644 --- a/api/src/org/apache/cloudstack/api/command/user/securitygroup/RevokeSecurityGroupEgressCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/securitygroup/RevokeSecurityGroupEgressCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.securitygroup; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SecurityGroupRuleResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.network.security.SecurityGroup; diff --git a/api/src/org/apache/cloudstack/api/command/user/securitygroup/RevokeSecurityGroupIngressCmd.java b/api/src/org/apache/cloudstack/api/command/user/securitygroup/RevokeSecurityGroupIngressCmd.java index 70851cf1e..1d450647c 100644 --- a/api/src/org/apache/cloudstack/api/command/user/securitygroup/RevokeSecurityGroupIngressCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/securitygroup/RevokeSecurityGroupIngressCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.securitygroup; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SecurityGroupRuleResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.network.security.SecurityGroup; diff --git a/api/src/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java b/api/src/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java index 49158a64d..95d76599f 100644 --- a/api/src/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java @@ -16,14 +16,19 @@ // under the License. package org.apache.cloudstack.api.command.user.snapshot; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SnapshotResponse; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.BaseAsyncCreateCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.SnapshotPolicyResponse; +import org.apache.cloudstack.api.response.SnapshotResponse; import org.apache.cloudstack.api.response.VolumeResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotPolicyCmd.java b/api/src/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotPolicyCmd.java index 756a93aa8..5a9ea2a07 100644 --- a/api/src/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotPolicyCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotPolicyCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.snapshot; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SnapshotPolicyResponse; import org.apache.cloudstack.api.response.VolumeResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.PermissionDeniedException; import com.cloud.projects.Project; diff --git a/api/src/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotCmd.java b/api/src/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotCmd.java index dc0b8ee81..6f37af8b4 100644 --- a/api/src/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.snapshot; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SnapshotResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.storage.Snapshot; diff --git a/api/src/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotPoliciesCmd.java b/api/src/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotPoliciesCmd.java index 0207f3c34..5a75ea06c 100644 --- a/api/src/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotPoliciesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotPoliciesCmd.java @@ -18,16 +18,16 @@ import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SnapshotPolicyResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; @APICommand(name = "deleteSnapshotPolicies", description="Deletes snapshot policies for the account.", responseObject=SuccessResponse.class) diff --git a/api/src/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotPoliciesCmd.java b/api/src/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotPoliciesCmd.java index 7c78bb76d..f1c601059 100644 --- a/api/src/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotPoliciesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotPoliciesCmd.java @@ -20,14 +20,14 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.SnapshotPolicyResponse; import org.apache.cloudstack.api.response.VolumeResponse; +import org.apache.log4j.Logger; + import com.cloud.storage.snapshot.SnapshotPolicy; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotsCmd.java b/api/src/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotsCmd.java index 5c6e79c91..17f20aeb0 100644 --- a/api/src/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotsCmd.java @@ -19,15 +19,15 @@ import java.util.ArrayList; import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.SnapshotResponse; import org.apache.cloudstack.api.response.VolumeResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.storage.Snapshot; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/ssh/CreateSSHKeyPairCmd.java b/api/src/org/apache/cloudstack/api/command/user/ssh/CreateSSHKeyPairCmd.java index bade8572f..56bec7eac 100644 --- a/api/src/org/apache/cloudstack/api/command/user/ssh/CreateSSHKeyPairCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/ssh/CreateSSHKeyPairCmd.java @@ -17,14 +17,14 @@ package org.apache.cloudstack.api.command.user.ssh; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.SSHKeyPairResponse; +import org.apache.log4j.Logger; + import com.cloud.user.SSHKeyPair; import com.cloud.user.UserContext; diff --git a/api/src/org/apache/cloudstack/api/command/user/ssh/DeleteSSHKeyPairCmd.java b/api/src/org/apache/cloudstack/api/command/user/ssh/DeleteSSHKeyPairCmd.java index 9b6d403f4..b05a675af 100644 --- a/api/src/org/apache/cloudstack/api/command/user/ssh/DeleteSSHKeyPairCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/ssh/DeleteSSHKeyPairCmd.java @@ -16,15 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.user.ssh; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; import com.cloud.user.UserContext; diff --git a/api/src/org/apache/cloudstack/api/command/user/ssh/ListSSHKeyPairsCmd.java b/api/src/org/apache/cloudstack/api/command/user/ssh/ListSSHKeyPairsCmd.java index 27013dfd5..e1788ce9f 100644 --- a/api/src/org/apache/cloudstack/api/command/user/ssh/ListSSHKeyPairsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/ssh/ListSSHKeyPairsCmd.java @@ -20,13 +20,13 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.SSHKeyPairResponse; +import org.apache.log4j.Logger; + import com.cloud.user.SSHKeyPair; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/ssh/RegisterSSHKeyPairCmd.java b/api/src/org/apache/cloudstack/api/command/user/ssh/RegisterSSHKeyPairCmd.java index 2f08692f0..b05c6b18c 100644 --- a/api/src/org/apache/cloudstack/api/command/user/ssh/RegisterSSHKeyPairCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/ssh/RegisterSSHKeyPairCmd.java @@ -16,15 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.user.ssh; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.SSHKeyPairResponse; +import org.apache.log4j.Logger; + import com.cloud.user.SSHKeyPair; import com.cloud.user.UserContext; diff --git a/api/src/org/apache/cloudstack/api/command/user/tag/CreateTagsCmd.java b/api/src/org/apache/cloudstack/api/command/user/tag/CreateTagsCmd.java index 9c108b490..63e2788b7 100644 --- a/api/src/org/apache/cloudstack/api/command/user/tag/CreateTagsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/tag/CreateTagsCmd.java @@ -23,16 +23,15 @@ import java.util.List; import java.util.Map; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.server.ResourceTag; import com.cloud.server.ResourceTag.TaggedResourceType; diff --git a/api/src/org/apache/cloudstack/api/command/user/tag/DeleteTagsCmd.java b/api/src/org/apache/cloudstack/api/command/user/tag/DeleteTagsCmd.java index c142f141f..084a5142a 100644 --- a/api/src/org/apache/cloudstack/api/command/user/tag/DeleteTagsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/tag/DeleteTagsCmd.java @@ -23,16 +23,15 @@ import java.util.List; import java.util.Map; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.server.ResourceTag.TaggedResourceType; @APICommand(name = "deleteTags", description = "Deleting resource tag(s)", responseObject = SuccessResponse.class, since = "Burbank") diff --git a/api/src/org/apache/cloudstack/api/command/user/template/CopyTemplateCmd.java b/api/src/org/apache/cloudstack/api/command/user/template/CopyTemplateCmd.java index f865dd6d4..a4f058212 100644 --- a/api/src/org/apache/cloudstack/api/command/user/template/CopyTemplateCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/template/CopyTemplateCmd.java @@ -18,18 +18,17 @@ import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.UserVmResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ResourceAllocationException; diff --git a/api/src/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java b/api/src/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java index 9723f9a14..ba1f924fe 100644 --- a/api/src/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java @@ -20,16 +20,20 @@ import java.util.List; import java.util.Map; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCreateCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.GuestOSResponse; import org.apache.cloudstack.api.response.SnapshotResponse; import org.apache.cloudstack.api.response.StoragePoolResponse; import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.UserVmResponse; import org.apache.cloudstack.api.response.VolumeResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; @@ -235,33 +239,23 @@ private boolean isBareMetal() { @Override public void create() throws ResourceAllocationException { - if (isBareMetal()) { - _bareMetalVmService.createPrivateTemplateRecord(this, _accountService.getAccount(getEntityOwnerId())); - /*Baremetal creates template record after taking image proceeded, use vmId as entity id and uuid here*/ - this.setEntityId(vmId); - this.setEntityUuid(vmId.toString()); + VirtualMachineTemplate template = null; + template = this._templateService.createPrivateTemplateRecord(this, _accountService.getAccount(getEntityOwnerId())); + if (template != null) { + this.setEntityId(template.getId()); + this.setEntityUuid(template.getUuid()); } else { - VirtualMachineTemplate template = null; - template = _userVmService.createPrivateTemplateRecord(this, _accountService.getAccount(getEntityOwnerId())); - if (template != null) { - this.setEntityId(template.getId()); - this.setEntityUuid(template.getUuid()); - } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, - "Failed to create a template"); - } + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, + "Failed to create a template"); } + } @Override public void execute() { UserContext.current().setEventDetails("Template Id: "+getEntityId()+((getSnapshotId() == null) ? " from volume Id: " + getVolumeId() : " from snapshot Id: " + getSnapshotId())); VirtualMachineTemplate template = null; - if (isBareMetal()) { - template = _bareMetalVmService.createPrivateTemplate(this); - } else { - template = _userVmService.createPrivateTemplate(this); - } + template = this._templateService.createPrivateTemplate(this); if (template != null){ List templateResponses; diff --git a/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java b/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java index 12359bfe9..1f030a565 100644 --- a/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java @@ -16,13 +16,18 @@ // under the License. package org.apache.cloudstack.api.command.user.template; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.ZoneResponse; + import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.template.VirtualMachineTemplate; diff --git a/api/src/org/apache/cloudstack/api/command/user/template/ExtractTemplateCmd.java b/api/src/org/apache/cloudstack/api/command/user/template/ExtractTemplateCmd.java index 8b4e809f2..9a2dee30b 100644 --- a/api/src/org/apache/cloudstack/api/command/user/template/ExtractTemplateCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/template/ExtractTemplateCmd.java @@ -16,13 +16,18 @@ // under the License. package org.apache.cloudstack.api.command.user.template; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.ExtractResponse; import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.ZoneResponse; + import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.ExtractResponse; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InternalErrorException; diff --git a/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatePermissionsCmd.java b/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatePermissionsCmd.java index 7446195d5..d727a334c 100644 --- a/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatePermissionsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatePermissionsCmd.java @@ -16,8 +16,8 @@ // under the License. package org.apache.cloudstack.api.command.user.template; -import org.apache.cloudstack.api.BaseListTemplateOrIsoPermissionsCmd; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.BaseListTemplateOrIsoPermissionsCmd; import org.apache.cloudstack.api.response.TemplatePermissionsResponse; import org.apache.log4j.Logger; diff --git a/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java b/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java index a1464ccdc..aeb76f507 100644 --- a/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java @@ -20,17 +20,15 @@ import java.util.List; import java.util.Set; -import com.cloud.storage.template.TemplateInfo; -import org.apache.cloudstack.api.response.UserVmResponse; -import org.apache.cloudstack.api.response.ZoneResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.TemplateResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.template.VirtualMachineTemplate.TemplateFilter; import com.cloud.user.Account; @@ -57,11 +55,14 @@ public class ListTemplatesCmd extends BaseListTaggedResourcesCmd { @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the template name") private String templateName; - @Parameter(name=ApiConstants.TEMPLATE_FILTER, type=CommandType.STRING, required=true, description="possible values are \"featured\", \"self\", \"self-executable\", \"executable\", and \"community\"." + - "* featured-templates that are featured and are public" + - "* self-templates that have been registered/created by the owner" + - "* selfexecutable-templates that have been registered/created by the owner that can be used to deploy a new VM" + - "* executable-all templates that can be used to deploy a new VM* community-templates that are public.") + @Parameter(name=ApiConstants.TEMPLATE_FILTER, type=CommandType.STRING, required=true, description="possible values are \"featured\", \"self\", \"selfexecutable\",\"sharedexecutable\",\"executable\", and \"community\". " + + "* featured : templates that have been marked as featured and public. " + + "* self : templates that have been registered or created by the calling user. " + + "* selfexecutable : same as self, but only returns templates that can be used to deploy a new VM. " + + "* sharedexecutable : templates ready to be deployed that have been granted to the calling user by another user. " + + "* executable : templates that are owned by the calling user, or public templates, that can be used to deploy a VM. " + + "* community : templates that have been marked as public but not featured. " + + "* all : all templates (only usable by admins).") private String templateFilter; @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class, diff --git a/api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java b/api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java index cc4c52486..c9da0c28c 100644 --- a/api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java @@ -21,20 +21,20 @@ import java.util.List; import java.util.Map; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; -import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.GuestOSResponse; +import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.exception.ResourceAllocationException; import com.cloud.template.VirtualMachineTemplate; @@ -110,7 +110,11 @@ public class RegisterTemplateCmd extends BaseCmd { @Parameter(name=ApiConstants.PROJECT_ID, type=CommandType.UUID, entityType = ProjectResponse.class, description="Register template for the project") private Long projectId; - + + @Parameter(name=ApiConstants.IMAGE_STORE_UUID, type=CommandType.STRING, + description="Image store uuid") + private String imageStoreUuid; + @Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, description="Template details in key/value pairs.") protected Map details; @@ -189,6 +193,10 @@ public String getChecksum() { public String getTemplateTag() { return templateTag; } + + public String getImageStoreUuid() { + return this.imageStoreUuid; + } public Map getDetails() { if (details == null || details.isEmpty()) { diff --git a/api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplateCmd.java b/api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplateCmd.java index 8893e8fae..3987dbedc 100644 --- a/api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplateCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplateCmd.java @@ -16,14 +16,13 @@ // under the License. package org.apache.cloudstack.api.command.user.template; -import org.apache.cloudstack.api.BaseUpdateTemplateOrIsoCmd; -import org.apache.log4j.Logger; - -import org.apache.cloudstack.api.ApiErrorCode; -import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseUpdateTemplateOrIsoCmd; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.TemplateResponse; +import org.apache.log4j.Logger; + import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplatePermissionsCmd.java b/api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplatePermissionsCmd.java index 8f3e660bd..e44969e13 100644 --- a/api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplatePermissionsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/template/UpdateTemplatePermissionsCmd.java @@ -16,11 +16,11 @@ // under the License. package org.apache.cloudstack.api.command.user.template; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.BaseUpdateTemplateOrIsoPermissionsCmd; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java new file mode 100644 index 000000000..df6b3999d --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java @@ -0,0 +1,197 @@ +// 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 org.apache.cloudstack.api.command.user.vm; + +import org.apache.log4j.Logger; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.NicResponse; +import org.apache.cloudstack.api.response.NicSecondaryIpResponse; + +import com.cloud.async.AsyncJob; +import com.cloud.dc.DataCenter; +import com.cloud.dc.DataCenter.NetworkType; +import com.cloud.event.EventTypes; +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.InsufficientAddressCapacityException; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.exception.ResourceAllocationException; +import com.cloud.exception.ResourceUnavailableException; +import com.cloud.network.Network; +import com.cloud.user.Account; +import com.cloud.user.UserContext; +import com.cloud.utils.net.NetUtils; +import com.cloud.vm.Nic; + +@APICommand(name = "addIpToNic", description = "Assigns secondary IP to NIC", responseObject = NicSecondaryIpResponse.class) +public class AddIpToVmNicCmd extends BaseAsyncCmd { + public static final Logger s_logger = Logger.getLogger(AddIpToVmNicCmd.class.getName()); + private static final String s_name = "addiptovmnicresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + @Parameter(name=ApiConstants.NIC_ID, type=CommandType.UUID, entityType = NicResponse.class, required = true, + description="the ID of the nic to which you want to assign private IP") + private Long nicId; + + @Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, required = false, + description = "Secondary IP Address") + private String ipAddr; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public String getEntityTable() { + return "nic_secondary_ips"; + } + + public String getAccountName() { + return UserContext.current().getCaller().getAccountName(); + } + + public long getDomainId() { + return UserContext.current().getCaller().getDomainId(); + } + + private long getZoneId() { + Network ntwk = _entityMgr.findById(Network.class, getNetworkId()); + if (ntwk == null) { + throw new InvalidParameterValueException("Can't find zone id for specified"); + } + return ntwk.getDataCenterId(); + } + + public Long getNetworkId() { + Nic nic = _entityMgr.findById(Nic.class, nicId); + if (nic == null) { + throw new InvalidParameterValueException("Can't find network id for specified nic"); + } + Long networkId = nic.getNetworkId(); + return networkId; + } + + public Long getNicId() { + return nicId; + } + + public String getIpaddress () { + if (ipAddr != null) { + return ipAddr; + } else { + return null; + } + } + + public NetworkType getNetworkType() { + Network ntwk = _entityMgr.findById(Network.class, getNetworkId()); + DataCenter dc = _entityMgr.findById(DataCenter.class, ntwk.getDataCenterId()); + return dc.getNetworkType(); + } + + @Override + public long getEntityOwnerId() { + Account caller = UserContext.current().getCaller(); + return caller.getAccountId(); + } + + @Override + public String getEventType() { + return EventTypes.EVENT_NET_IP_ASSIGN; + } + + @Override + public String getEventDescription() { + return "associating ip to nic id: " + getNetworkId() + " in zone " + getZoneId(); + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + + @Override + public String getCommandName() { + return s_name; + } + + public static String getResultObjectName() { + return "addressinfo"; + } + + @Override + public void execute() throws ResourceUnavailableException, ResourceAllocationException, + ConcurrentOperationException, InsufficientCapacityException { + + UserContext.current().setEventDetails("Nic Id: " + getNicId() ); + String ip; + String secondaryIp = null; + if ((ip = getIpaddress()) != null) { + if (!NetUtils.isValidIp(ip)) { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Invalid ip address " + ip); + } + } + + try { + secondaryIp = _networkService.allocateSecondaryGuestIP(_accountService.getAccount(getEntityOwnerId()), getZoneId(), getNicId(), getNetworkId(), getIpaddress()); + } catch (InsufficientAddressCapacityException e) { + throw new InvalidParameterValueException("Allocating guest ip for nic failed"); + } + + if (secondaryIp != null) { + if (getNetworkType() == NetworkType.Basic) { + // add security group rules for the secondary ip addresses + boolean success = false; + success = _securityGroupService.securityGroupRulesForVmSecIp(getNicId(), getNetworkId(), secondaryIp, (boolean) true); + if (success == false) { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to set security group rules for the secondary ip"); + } + } + + s_logger.info("Associated ip address to NIC : " + secondaryIp); + NicSecondaryIpResponse response = new NicSecondaryIpResponse(); + response = _responseGenerator.createSecondaryIPToNicResponse(secondaryIp, getNicId(), getNetworkId()); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to assign secondary ip to nic"); + } + } + + @Override + public String getSyncObjType() { + return BaseAsyncCmd.networkSyncObject; + } + + @Override + public Long getSyncObjId() { + return getNetworkId(); + } + + @Override + public AsyncJob.Type getInstanceType() { + return AsyncJob.Type.IpAddress; + } + +} diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java old mode 100644 new mode 100755 index b21b53c83..77ba9fed5 --- a/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java @@ -24,11 +24,15 @@ import java.util.List; import java.util.Map; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.acl.SecurityChecker.AccessType; +import org.apache.cloudstack.affinity.AffinityGroupResponse; +import org.apache.cloudstack.api.ACL; import org.apache.cloudstack.api.APICommand; - +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCreateCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DiskOfferingResponse; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.HostResponse; @@ -39,6 +43,8 @@ import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.UserVmResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.dc.DataCenter; import com.cloud.dc.DataCenter.NetworkType; @@ -49,7 +55,6 @@ import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.hypervisor.Hypervisor.HypervisorType; -import com.cloud.network.IpAddress; import com.cloud.network.Network; import com.cloud.network.Network.IpAddresses; import com.cloud.offering.DiskOffering; @@ -99,7 +104,7 @@ public class DeployVMCmd extends BaseAsyncCreateCmd { private Long domainId; //Network information - @ACL + @ACL(accessType = AccessType.UseNetwork) @Parameter(name=ApiConstants.NETWORK_IDS, type=CommandType.LIST, collectionType=CommandType.UUID, entityType=NetworkResponse.class, description="list of network ids used by virtual machine. Can't be specified with ipToNetworkList parameter") private List networkIds; @@ -168,6 +173,16 @@ public class DeployVMCmd extends BaseAsyncCreateCmd { @Parameter(name=ApiConstants.START_VM, type=CommandType.BOOLEAN, description="true if network offering supports specifying ip ranges; defaulted to true if not specified") private Boolean startVm; + @ACL + @Parameter(name = ApiConstants.AFFINITY_GROUP_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = AffinityGroupResponse.class, description = "comma separated list of affinity groups id that are going to be applied to the virtual machine." + + " Mutually exclusive with affinitygroupnames parameter") + private List affinityGroupIdList; + + @ACL + @Parameter(name = ApiConstants.AFFINITY_GROUP_NAMES, type = CommandType.LIST, collectionType = CommandType.STRING, entityType = AffinityGroupResponse.class, description = "comma separated list of affinity groups names that are going to be applied to the virtual machine." + + "Mutually exclusive with affinitygroupids parameter") + private List affinityGroupNameList; + ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// @@ -302,9 +317,6 @@ private Map getIpToNetworkMap() { if (requestedIpv6 != null) { requestedIpv6 = requestedIpv6.toLowerCase(); } - if (requestedIpv6 != null) { - throw new InvalidParameterValueException("Cannot support specified IPv6 address!"); - } IpAddresses addrs = new IpAddresses(requestedIp, requestedIpv6); ipToNetworkMap.put(networkId, addrs); } @@ -312,7 +324,7 @@ private Map getIpToNetworkMap() { return ipToNetworkMap; } - + public String getIp6Address() { if (ip6Address == null) { return null; @@ -320,6 +332,30 @@ public String getIp6Address() { return ip6Address.toLowerCase(); } + public List getAffinityGroupIdList() { + if (affinityGroupNameList != null && affinityGroupIdList != null) { + throw new InvalidParameterValueException( + "affinitygroupids parameter is mutually exclusive with affinitygroupnames parameter"); + } + + // transform group names to ids here + if (affinityGroupNameList != null) { + List affinityGroupIds = new ArrayList(); + for (String groupName : affinityGroupNameList) { + Long groupId = _responseGenerator.getAffinityGroupId(groupName, getEntityOwnerId()); + if (groupId == null) { + throw new InvalidParameterValueException("Unable to find group by name " + groupName + + " for account " + getEntityOwnerId()); + } else { + affinityGroupIds.add(groupId); + } + } + return affinityGroupIds; + } else { + return affinityGroupIdList; + } + } + ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// @@ -375,11 +411,7 @@ public void execute(){ if (getStartVm()) { try { UserContext.current().setEventDetails("Vm Id: "+getEntityId()); - if (getHypervisor() == HypervisorType.BareMetal) { - result = _bareMetalVmService.startVirtualMachine(this); - } else { - result = _userVmService.startVirtualMachine(this); - } + result = _userVmService.startVirtualMachine(this); } catch (ResourceUnavailableException ex) { s_logger.warn("Exception: ", ex); throw new ServerApiException(ApiErrorCode.RESOURCE_UNAVAILABLE_ERROR, ex.getMessage()); @@ -388,7 +420,7 @@ public void execute(){ throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage()); } catch (InsufficientCapacityException ex) { s_logger.info(ex); - s_logger.trace(ex); + s_logger.info(ex.getMessage(), ex); throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, ex.getMessage()); } } else { @@ -407,10 +439,6 @@ public void execute(){ @Override public void create() throws ResourceAllocationException{ try { - if (getIp6Address() != null) { - throw new InvalidParameterValueException("Cannot support specified IPv6 address!"); - } - //Verify that all objects exist before passing them to the service Account owner = _accountService.getActiveAccountById(getEntityOwnerId()); @@ -448,28 +476,24 @@ public void create() throws ResourceAllocationException{ } UserVm vm = null; - if (getHypervisor() == HypervisorType.BareMetal) { - vm = _bareMetalVmService.createVirtualMachine(this); + IpAddresses addrs = new IpAddresses(ipAddress, getIp6Address()); + if (zone.getNetworkType() == NetworkType.Basic) { + if (getNetworkIds() != null) { + throw new InvalidParameterValueException("Can't specify network Ids in Basic zone"); + } else { + vm = _userVmService.createBasicSecurityGroupVirtualMachine(zone, serviceOffering, template, getSecurityGroupIdList(), owner, name, + displayName, diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, keyboard, getAffinityGroupIdList()); + } } else { - IpAddresses addrs = new IpAddresses(ipAddress, getIp6Address()); - if (zone.getNetworkType() == NetworkType.Basic) { - if (getNetworkIds() != null) { - throw new InvalidParameterValueException("Can't specify network Ids in Basic zone"); - } else { - vm = _userVmService.createBasicSecurityGroupVirtualMachine(zone, serviceOffering, template, getSecurityGroupIdList(), owner, name, - displayName, diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, keyboard); - } + if (zone.isSecurityGroupEnabled()) { + vm = _userVmService.createAdvancedSecurityGroupVirtualMachine(zone, serviceOffering, template, getNetworkIds(), getSecurityGroupIdList(), + owner, name, displayName, diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, keyboard, getAffinityGroupIdList()); } else { - if (zone.isSecurityGroupEnabled()) { - vm = _userVmService.createAdvancedSecurityGroupVirtualMachine(zone, serviceOffering, template, getNetworkIds(), getSecurityGroupIdList(), - owner, name, displayName, diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, keyboard); - } else { - if (getSecurityGroupIdList() != null && !getSecurityGroupIdList().isEmpty()) { - throw new InvalidParameterValueException("Can't create vm with security groups; security group feature is not enabled per zone"); - } - vm = _userVmService.createAdvancedVirtualMachine(zone, serviceOffering, template, getNetworkIds(), owner, name, displayName, - diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, keyboard); + if (getSecurityGroupIdList() != null && !getSecurityGroupIdList().isEmpty()) { + throw new InvalidParameterValueException("Can't create vm with security groups; security group feature is not enabled per zone"); } + vm = _userVmService.createAdvancedVirtualMachine(zone, serviceOffering, template, getNetworkIds(), owner, name, displayName, + diskOfferingId, size, group, getHypervisor(), userData, sshKeyPairName, getIpToNetworkMap(), addrs, keyboard, getAffinityGroupIdList()); } } @@ -481,7 +505,7 @@ public void create() throws ResourceAllocationException{ } } catch (InsufficientCapacityException ex) { s_logger.info(ex); - s_logger.trace(ex); + s_logger.trace(ex.getMessage(), ex); throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, ex.getMessage()); } catch (ResourceUnavailableException ex) { s_logger.warn("Exception: ", ex); diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java index 381f5b744..567768dee 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java @@ -16,11 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.user.vm; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; @@ -93,11 +97,7 @@ public Long getInstanceId() { public void execute() throws ResourceUnavailableException, ConcurrentOperationException{ UserContext.current().setEventDetails("Vm Id: "+getId()); UserVm result; - if (_userVmService.getHypervisorTypeOfUserVM(getId()) == HypervisorType.BareMetal) { - result = _bareMetalVmService.destroyVm(this); - } else { - result = _userVmService.destroyVm(this); - } + result = _userVmService.destroyVm(this); if (result != null) { UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", result).get(0); diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/GetVMPasswordCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/GetVMPasswordCmd.java index cd3a5609d..839f9378d 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/GetVMPasswordCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/GetVMPasswordCmd.java @@ -19,13 +19,13 @@ import java.security.InvalidParameterException; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.GetVMPasswordResponse; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; import com.cloud.uservm.UserVm; diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/ListNicsCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/ListNicsCmd.java new file mode 100644 index 000000000..4c4e1f714 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/vm/ListNicsCmd.java @@ -0,0 +1,133 @@ +// 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 org.apache.cloudstack.api.command.user.vm; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.log4j.Logger; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseListCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.NicResponse; +import org.apache.cloudstack.api.response.UserVmResponse; + +import com.cloud.async.AsyncJob; +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.ResourceAllocationException; +import com.cloud.exception.ResourceUnavailableException; +import com.cloud.user.Account; +import com.cloud.user.UserContext; +import com.cloud.vm.Nic; +import com.cloud.vm.NicSecondaryIp; + +@APICommand(name = "listNics", description = "list the vm nics IP to NIC", responseObject = NicResponse.class) +public class ListNicsCmd extends BaseListCmd { + public static final Logger s_logger = Logger.getLogger(ListNicsCmd.class.getName()); + private static final String s_name = "listnicsresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name=ApiConstants.NIC_ID, type=CommandType.UUID, entityType = NicResponse.class, required = false, + description="the ID of the nic to to list IPs") + private Long nicId; + + @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType = UserVmResponse.class, required = true, + description="the ID of the vm") + private Long vmId; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public String getEntityTable() { + return "nics"; + } + + public String getAccountName() { + return UserContext.current().getCaller().getAccountName(); + } + + public long getDomainId() { + return UserContext.current().getCaller().getDomainId(); + } + + public Long getNicId() { + return nicId; + } + + public Long getVmId() { + return vmId; + } + + @Override + public long getEntityOwnerId() { + Account caller = UserContext.current().getCaller(); + return caller.getAccountId(); + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + + @Override + public String getCommandName() { + return s_name; + } + + public static String getResultObjectName() { + return "addressinfo"; + } + + @Override + public void execute() throws ResourceUnavailableException, ResourceAllocationException, + ConcurrentOperationException, InsufficientCapacityException { + + try { + List results = _networkService.listNics(this); + ListResponse response = new ListResponse(); + List resList = new ArrayList(results.size()); + for (Nic r : results) { + NicResponse resp = _responseGenerator.createNicResponse(r); + resp.setObjectName("nic"); + resList.add(resp); + } + response.setResponses(resList); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + + } catch (Exception e) { + s_logger.warn("Failed to list secondary ip address per nic "); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); + } + } + + @Override + public AsyncJob.Type getInstanceType() { + return AsyncJob.Type.IpAddress; + } + +} diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java index b74c8e70f..30f03b889 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java @@ -20,14 +20,11 @@ import java.util.EnumSet; import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiConstants.VMDetails; import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; - import org.apache.cloudstack.api.response.HostResponse; import org.apache.cloudstack.api.response.InstanceGroupResponse; import org.apache.cloudstack.api.response.IsoVmResponse; @@ -39,6 +36,7 @@ import org.apache.cloudstack.api.response.UserVmResponse; import org.apache.cloudstack.api.response.VpcResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; import com.cloud.async.AsyncJob; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java index 63319dc68..6838b9613 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java @@ -16,16 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.user.vm; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InsufficientCapacityException; @@ -97,11 +96,7 @@ public Long getInstanceId() { public void execute() throws ResourceUnavailableException, InsufficientCapacityException{ UserContext.current().setEventDetails("Vm Id: "+getId()); UserVm result; - if (_userVmService.getHypervisorTypeOfUserVM(getId()) == HypervisorType.BareMetal) { - result = _bareMetalVmService.rebootVirtualMachine(this); - } else { - result = _userVmService.rebootVirtualMachine(this); - } + result = _userVmService.rebootVirtualMachine(this); if (result !=null){ UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", result).get(0); diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/RemoveIpFromVmNicCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/RemoveIpFromVmNicCmd.java new file mode 100644 index 000000000..21a9a0c96 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/vm/RemoveIpFromVmNicCmd.java @@ -0,0 +1,172 @@ +// 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 org.apache.cloudstack.api.command.user.vm; + +import org.apache.log4j.Logger; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.NicSecondaryIpResponse; +import org.apache.cloudstack.api.response.SuccessResponse; +import com.cloud.async.AsyncJob; +import com.cloud.dc.DataCenter; +import com.cloud.dc.DataCenter.NetworkType; +import com.cloud.event.EventTypes; +import com.cloud.exception.InsufficientAddressCapacityException; +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.network.Network; +import com.cloud.user.Account; +import com.cloud.user.UserContext; +import com.cloud.vm.Nic; +import com.cloud.vm.NicSecondaryIp; + +@APICommand(name = "removeIpFromNic", description="Assigns secondary IP to NIC.", responseObject=SuccessResponse.class) +public class RemoveIpFromVmNicCmd extends BaseAsyncCmd { + public static final Logger s_logger = Logger.getLogger(RemoveIpFromVmNicCmd.class.getName()); + private static final String s_name = "removeipfromnicresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, required = true, entityType = NicSecondaryIpResponse.class, + description="the ID of the secondary ip address to nic") + private Long id; + + // unexposed parameter needed for events logging + @Parameter(name=ApiConstants.ACCOUNT_ID, type=CommandType.UUID, expose=false) + private Long ownerId; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public String getEntityTable() { + return "nic_secondary_ips"; + } + + public Long getIpAddressId() { + return id; + } + + public String getAccountName() { + return UserContext.current().getCaller().getAccountName(); + } + + public long getDomainId() { + return UserContext.current().getCaller().getDomainId(); + } + + @Override + public long getEntityOwnerId() { + Account caller = UserContext.current().getCaller(); + return caller.getAccountId(); + } + + @Override + public String getEventType() { + return EventTypes.EVENT_NET_IP_ASSIGN; + } + + public NicSecondaryIp getIpEntry() { + NicSecondaryIp nicSecIp = _entityMgr.findById(NicSecondaryIp.class, getIpAddressId()); + return nicSecIp; + } + + @Override + public String getEventDescription() { + return ("Disassociating ip address with id=" + id); + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + public static String getResultObjectName() { + return "addressinfo"; + } + + public Long getNetworkId() { + NicSecondaryIp nicSecIp = _entityMgr.findById(NicSecondaryIp.class, getIpAddressId()); + if (nicSecIp != null) { + Long networkId = nicSecIp.getNetworkId(); + return networkId; + } else { + return null; + } + } + + public NetworkType getNetworkType() { + Network ntwk = _entityMgr.findById(Network.class, getNetworkId()); + if (ntwk != null) { + DataCenter dc = _entityMgr.findById(DataCenter.class, ntwk.getDataCenterId()); + return dc.getNetworkType(); + } + return null; + } + + @Override + public void execute() throws InvalidParameterValueException { + UserContext.current().setEventDetails("Ip Id: " + id); + NicSecondaryIp nicSecIp = getIpEntry(); + + if (nicSecIp == null) { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Invalid IP id is passed"); + } + + if (getNetworkType() == NetworkType.Basic) { + //remove the security group rules for this secondary ip + boolean success = false; + success = _securityGroupService.securityGroupRulesForVmSecIp(nicSecIp.getNicId(), nicSecIp.getNetworkId(),nicSecIp.getIp4Address(), false); + if (success == false) { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to set security group rules for the secondary ip"); + } + } + + try { + boolean result = _networkService.releaseSecondaryIpFromNic(id); + if (result) { + SuccessResponse response = new SuccessResponse(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove secondary ip address for the nic"); + } + } catch (InvalidParameterValueException e) { + throw new InvalidParameterValueException("Removing guest ip from nic failed"); + } + } + + @Override + public String getSyncObjType() { + return BaseAsyncCmd.networkSyncObject; + } + + @Override + public AsyncJob.Type getInstanceType() { + return AsyncJob.Type.IpAddress; + } + +} diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java index 2ca94bf6a..80f3e852e 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java @@ -16,16 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.user.vm; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InsufficientCapacityException; diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java index d906c7f63..9c33f97c3 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java @@ -16,16 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.vm; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.TemplateResponse; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; @@ -35,7 +35,7 @@ import com.cloud.user.UserContext; import com.cloud.uservm.UserVm; -@APICommand(name = "restoreVirtualMachine", description="Restore a VM to original template or specific snapshot", responseObject=UserVmResponse.class, since="3.0.0") +@APICommand(name = "restoreVirtualMachine", description="Restore a VM to original template or new template", responseObject=UserVmResponse.class, since="3.0.0") public class RestoreVMCmd extends BaseAsyncCmd { public static final Logger s_logger = Logger.getLogger(RestoreVMCmd.class); private static final String s_name = "restorevmresponse"; @@ -44,6 +44,9 @@ public class RestoreVMCmd extends BaseAsyncCmd { required=true, description="Virtual Machine ID") private Long vmId; + @Parameter(name=ApiConstants.TEMPLATE_ID, type=CommandType.UUID, entityType = TemplateResponse.class, description="an optional template Id to restore vm from the new template") + private Long templateId; + @Override public String getEventType() { return EventTypes.EVENT_VM_RESTORE; @@ -86,4 +89,8 @@ public long getEntityOwnerId() { public long getVmId() { return vmId; } + + public Long getTemplateId() { + return templateId; + } } diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java new file mode 100644 index 000000000..4fc65c37e --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java @@ -0,0 +1,110 @@ +// 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 org.apache.cloudstack.api.command.user.vm; + +import com.cloud.exception.*; +import com.cloud.user.Account; +import com.cloud.user.UserContext; +import com.cloud.uservm.UserVm; +import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.response.ServiceOfferingResponse; +import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + + +@APICommand(name = "scaleVirtualMachine", description="Scales the virtual machine to a new service offering.", responseObject=UserVmResponse.class) +public class ScaleVMCmd extends BaseCmd { + public static final Logger s_logger = Logger.getLogger(ScaleVMCmd.class.getName()); + private static final String s_name = "scalevirtualmachineresponse"; + + ///////////////////////////////////////////////////// + //////////////// API parameters ///////////////////// + ///////////////////////////////////////////////////// + + @ACL + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=UserVmResponse.class, + required=true, description="The ID of the virtual machine") + private Long id; + + @ACL + @Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.UUID, entityType=ServiceOfferingResponse.class, + required=true, description="the ID of the service offering for the virtual machine") + private Long serviceOfferingId; + + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + + public Long getId() { + return id; + } + + public Long getServiceOfferingId() { + return serviceOfferingId; + } + + ///////////////////////////////////////////////////// + /////////////// API Implementation/////////////////// + ///////////////////////////////////////////////////// + + @Override + public String getCommandName() { + return s_name; + } + + public static String getResultObjectName() { + return "virtualmachine"; + } + + @Override + public long getEntityOwnerId() { + UserVm userVm = _entityMgr.findById(UserVm.class, getId()); + if (userVm != null) { + return userVm.getAccountId(); + } + + return Account.ACCOUNT_ID_SYSTEM; // no account info given, parent this command to SYSTEM so ERROR events are tracked + } + + @Override + public void execute(){ + //UserContext.current().setEventDetails("Vm Id: "+getId()); + UserVm result = null; + try { + result = _userVmService.upgradeVirtualMachine(this); + } catch (ResourceUnavailableException ex) { + s_logger.warn("Exception: ", ex); + throw new ServerApiException(ApiErrorCode.RESOURCE_UNAVAILABLE_ERROR, ex.getMessage()); + } catch (ConcurrentOperationException ex) { + s_logger.warn("Exception: ", ex); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage()); + } catch (ManagementServerException ex) { + s_logger.warn("Exception: ", ex); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage()); + } catch (VirtualMachineMigrationException ex) { + s_logger.warn("Exception: ", ex); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage()); + } + if (result != null){ + UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", result).get(0); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to scale vm"); + } + } +} \ No newline at end of file diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java index 65391f7f8..3012780cb 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java @@ -16,13 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.vm; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; - +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.HostResponse; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; @@ -114,11 +117,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE UserContext.current().setEventDetails("Vm Id: " + getId()); UserVm result ; - if (_userVmService.getHypervisorTypeOfUserVM(getId()) == HypervisorType.BareMetal) { - result = _bareMetalVmService.startVirtualMachine(this); - } else { - result = _userVmService.startVirtualMachine(this); - } + result = _userVmService.startVirtualMachine(this); if (result != null) { UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", result).get(0); diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java index cfa89a542..d66c33422 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java @@ -16,11 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.vm; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.ACL; import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; @@ -109,11 +114,7 @@ public void execute() throws ServerApiException, ConcurrentOperationException { UserContext.current().setEventDetails("Vm Id: " + getId()); UserVm result; - if (_userVmService.getHypervisorTypeOfUserVM(getId()) == HypervisorType.BareMetal) { - result = _bareMetalVmService.stopVirtualMachine(getId(), isForced()); - } else { - result = _userVmService.stopVirtualMachine(getId(), isForced()); - } + result = _userVmService.stopVirtualMachine(getId(), isForced()); if (result != null) { UserVmResponse response = _responseGenerator.createUserVmResponse("virtualmachine", result).get(0); diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java index 60b23389d..ff8fff1c1 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.vm; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; - import org.apache.cloudstack.api.response.GuestOSResponse; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java b/api/src/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java index 0ab9a330a..fb620001b 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java @@ -16,14 +16,18 @@ // under the License. package org.apache.cloudstack.api.command.user.vm; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; - +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ServiceOfferingResponse; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.InvalidParameterValueException; +import com.cloud.exception.ResourceAllocationException; import com.cloud.offering.ServiceOffering; import com.cloud.user.Account; import com.cloud.user.UserContext; @@ -84,7 +88,7 @@ public long getEntityOwnerId() { } @Override - public void execute(){ + public void execute() throws ResourceAllocationException{ UserContext.current().setEventDetails("Vm Id: "+getId()); ServiceOffering serviceOffering = _configService.getServiceOffering(serviceOfferingId); diff --git a/api/src/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java index ea2849705..bcb7bdaeb 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java @@ -16,14 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.vmgroup; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; - +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.InstanceGroupResponse; import org.apache.cloudstack.api.response.ProjectAccountResponse; +import org.apache.log4j.Logger; + import com.cloud.user.UserContext; import com.cloud.vm.InstanceGroup; diff --git a/api/src/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java index 3e9d1a24a..641b6ced2 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java @@ -16,13 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.vmgroup; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; - +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.InstanceGroupResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; import com.cloud.vm.InstanceGroup; diff --git a/api/src/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java b/api/src/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java index 8a581b02e..5a7ce273e 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java @@ -16,14 +16,13 @@ // under the License. package org.apache.cloudstack.api.command.user.vmgroup; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.InstanceGroupResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.log4j.Logger; @APICommand(name = "listInstanceGroups", description="Lists vm groups", responseObject=InstanceGroupResponse.class) public class ListVMGroupsCmd extends BaseListProjectAndAccountResourcesCmd { diff --git a/api/src/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java b/api/src/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java index eb0d747d5..83a1a1d0e 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java @@ -16,11 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.user.vmgroup; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.InstanceGroupResponse; +import org.apache.log4j.Logger; + import com.cloud.user.Account; import com.cloud.vm.InstanceGroup; diff --git a/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/CreateVMSnapshotCmd.java b/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/CreateVMSnapshotCmd.java new file mode 100644 index 000000000..aa9feb8e2 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/CreateVMSnapshotCmd.java @@ -0,0 +1,125 @@ +// 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 org.apache.cloudstack.api.command.user.vmsnapshot; + +import java.util.logging.Logger; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCreateCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.cloudstack.api.response.VMSnapshotResponse; + +import com.cloud.event.EventTypes; +import com.cloud.exception.ResourceAllocationException; +import com.cloud.user.UserContext; +import com.cloud.uservm.UserVm; +import com.cloud.vm.snapshot.VMSnapshot; + +@APICommand(name = "createVMSnapshot", description = "Creates snapshot for a vm.", responseObject = VMSnapshotResponse.class, since="4.2.0") +public class CreateVMSnapshotCmd extends BaseAsyncCreateCmd { + + public static final Logger s_logger = Logger + .getLogger(CreateVMSnapshotCmd.class.getName()); + private static final String s_name = "createvmsnapshotresponse"; + + @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, required = true, entityType=UserVmResponse.class, description = "The ID of the vm") + private Long vmId; + + @Parameter(name = ApiConstants.VM_SNAPSHOT_DESCRIPTION, type = CommandType.STRING, required = false, description = "The discription of the snapshot") + private String description; + + @Parameter(name = ApiConstants.VM_SNAPSHOT_DISPLAYNAME, type = CommandType.STRING, required = false, description = "The display name of the snapshot") + private String displayName; + + @Parameter(name = ApiConstants.VM_SNAPSHOT_MEMORY, type = CommandType.BOOLEAN, required = false, description = "snapshot memory if true") + private Boolean snapshotMemory; + + public Boolean snapshotMemory() { + if (snapshotMemory == null) { + return false; + } else { + return snapshotMemory; + } + } + + public String getDisplayName() { + return displayName; + } + + public String getDescription() { + return description; + } + + public Long getVmId() { + return vmId; + } + + @Override + public void create() throws ResourceAllocationException { + VMSnapshot vmsnapshot = _vmSnapshotService.allocVMSnapshot(getVmId(),getDisplayName(),getDescription(),snapshotMemory()); + if (vmsnapshot != null) { + this.setEntityId(vmsnapshot.getId()); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, + "Failed to create vm snapshot"); + } + } + + @Override + public String getEventDescription() { + return "creating snapshot for VM: " + getVmId(); + } + + @Override + public String getEventType() { + return EventTypes.EVENT_VM_SNAPSHOT_CREATE; + } + + @Override + public void execute() { + UserContext.current().setEventDetails("VM Id: " + getVmId()); + VMSnapshot result = _vmSnapshotService.creatVMSnapshot(getVmId(),getEntityId()); + if (result != null) { + VMSnapshotResponse response = _responseGenerator + .createVMSnapshotResponse(result); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException( + ApiErrorCode.INTERNAL_ERROR, + "Failed to create vm snapshot due to an internal error creating snapshot for vm " + + getVmId()); + } + } + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + UserVm userVM = _userVmService.getUserVm(vmId); + return userVM.getAccountId(); + } + +} diff --git a/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/DeleteVMSnapshotCmd.java b/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/DeleteVMSnapshotCmd.java new file mode 100644 index 000000000..bda84c893 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/DeleteVMSnapshotCmd.java @@ -0,0 +1,85 @@ +// 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 org.apache.cloudstack.api.command.user.vmsnapshot; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.cloudstack.api.response.VMSnapshotResponse; +import org.apache.log4j.Logger; + +import com.cloud.event.EventTypes; +import com.cloud.user.Account; +import com.cloud.user.UserContext; +import com.cloud.vm.snapshot.VMSnapshot; + +@APICommand(name="deleteVMSnapshot", description = "Deletes a vmsnapshot.", responseObject = SuccessResponse.class, since="4.2.0") +public class DeleteVMSnapshotCmd extends BaseAsyncCmd { + public static final Logger s_logger = Logger + .getLogger(DeleteVMSnapshotCmd.class.getName()); + private static final String s_name = "deletevmsnapshotresponse"; + + @Parameter(name=ApiConstants.VM_SNAPSHOT_ID, type=CommandType.UUID, entityType=VMSnapshotResponse.class, + required=true, description="The ID of the VM snapshot") + private Long id; + + public Long getId() { + return id; + } + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + VMSnapshot vmSnapshot = _entityMgr.findById(VMSnapshot.class, getId()); + if (vmSnapshot != null) { + return vmSnapshot.getAccountId(); + } + return Account.ACCOUNT_ID_SYSTEM; + } + + @Override + public void execute() { + UserContext.current().setEventDetails("vmsnapshot id: " + getId()); + boolean result = _vmSnapshotService.deleteVMSnapshot(getId()); + if (result) { + SuccessResponse response = new SuccessResponse(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete vm snapshot"); + } + } + + @Override + public String getEventDescription() { + return "Delete VM snapshot: " + getId(); + } + + @Override + public String getEventType() { + return EventTypes.EVENT_VM_SNAPSHOT_DELETE; + } + +} diff --git a/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/ListVMSnapshotCmd.java b/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/ListVMSnapshotCmd.java new file mode 100644 index 000000000..82fb9e578 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/ListVMSnapshotCmd.java @@ -0,0 +1,89 @@ +// 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 org.apache.cloudstack.api.command.user.vmsnapshot; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.cloudstack.api.response.VMSnapshotResponse; + +import com.cloud.vm.snapshot.VMSnapshot; + +@APICommand(name="listVMSnapshot", description = "List virtual machine snapshot by conditions", responseObject = VMSnapshotResponse.class, since="4.2.0") +public class ListVMSnapshotCmd extends BaseListTaggedResourcesCmd { + + private static final String s_name = "listvmsnapshotresponse"; + + @Parameter(name=ApiConstants.VM_SNAPSHOT_ID, type=CommandType.UUID, entityType=VMSnapshotResponse.class, + description="The ID of the VM snapshot") + private Long id; + + @Parameter(name=ApiConstants.STATE, type=CommandType.STRING, description="state of the virtual machine snapshot") + private String state; + + @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType=UserVmResponse.class, description = "the ID of the vm") + private Long vmId; + + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "lists snapshot by snapshot name or display name") + private String vmSnapshotName; + + public String getState() { + return state; + } + + public String getVmSnapshotName() { + return vmSnapshotName; + } + + public Long getVmId() { + return vmId; + } + + public Long getId() { + return id; + } + + @Override + public void execute() { + List result = _vmSnapshotService + .listVMSnapshots(this); + ListResponse response = new ListResponse(); + List snapshotResponses = new ArrayList(); + for (VMSnapshot r : result) { + VMSnapshotResponse vmSnapshotResponse = _responseGenerator + .createVMSnapshotResponse(r); + vmSnapshotResponse.setObjectName("vmSnapshot"); + snapshotResponses.add(vmSnapshotResponse); + } + response.setResponses(snapshotResponses); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } + + @Override + public String getCommandName() { + return s_name; + } + +} diff --git a/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/RevertToSnapshotCmd.java b/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/RevertToSnapshotCmd.java new file mode 100644 index 000000000..ea7bf60d6 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/command/user/vmsnapshot/RevertToSnapshotCmd.java @@ -0,0 +1,92 @@ +// 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 org.apache.cloudstack.api.command.user.vmsnapshot; + +import java.util.logging.Logger; + +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.cloudstack.api.response.VMSnapshotResponse; + +import com.cloud.event.EventTypes; +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.ResourceAllocationException; +import com.cloud.exception.ResourceUnavailableException; +import com.cloud.user.Account; +import com.cloud.user.UserContext; +import com.cloud.uservm.UserVm; +import com.cloud.vm.snapshot.VMSnapshot; + +@APICommand(name = "revertToSnapshot",description = "Revert VM from a vmsnapshot.", responseObject = UserVmResponse.class, since="4.2.0") +public class RevertToSnapshotCmd extends BaseAsyncCmd { + public static final Logger s_logger = Logger + .getLogger(RevertToSnapshotCmd.class.getName()); + private static final String s_name = "reverttosnapshotresponse"; + + @Parameter(name = ApiConstants.VM_SNAPSHOT_ID, type = CommandType.UUID, required = true,entityType=VMSnapshotResponse.class,description = "The ID of the vm snapshot") + private Long vmSnapShotId; + + public Long getVmSnapShotId() { + return vmSnapShotId; + } + + @Override + public String getCommandName() { + return s_name; + } + + @Override + public long getEntityOwnerId() { + VMSnapshot vmSnapshot = _entityMgr.findById(VMSnapshot.class, getVmSnapShotId()); + if (vmSnapshot != null) { + return vmSnapshot.getAccountId(); + } + return Account.ACCOUNT_ID_SYSTEM; + } + + @Override + public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ResourceAllocationException, ConcurrentOperationException { + UserContext.current().setEventDetails( + "vmsnapshot id: " + getVmSnapShotId()); + UserVm result = _vmSnapshotService.revertToSnapshot(getVmSnapShotId()); + if (result != null) { + UserVmResponse response = _responseGenerator.createUserVmResponse( + "virtualmachine", result).get(0); + response.setResponseName(getCommandName()); + this.setResponseObject(response); + } else { + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR,"Failed to revert VM snapshot"); + } + } + + @Override + public String getEventDescription() { + return "Revert from VM snapshot: " + getVmSnapShotId(); + } + + @Override + public String getEventType() { + return EventTypes.EVENT_VM_SNAPSHOT_REVERT; + } + +} diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java index e5652952a..e577e3579 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.volume; -import org.apache.cloudstack.api.response.UserVmResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.UserVmResponse; import org.apache.cloudstack.api.response.VolumeResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.storage.Volume; @@ -120,7 +119,7 @@ public String getEventDescription() { @Override public void execute(){ UserContext.current().setEventDetails("Volume Id: "+getId()+" VmId: "+getVirtualMachineId()); - Volume result = _userVmService.attachVolumeToVM(this); + Volume result = _volumeService.attachVolumeToVM(this); if (result != null) { VolumeResponse response = _responseGenerator.createVolumeResponse(result); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java index 0a0ba54e0..5db06bcd4 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java @@ -16,16 +16,20 @@ // under the License. package org.apache.cloudstack.api.command.user.volume; -import org.apache.cloudstack.api.response.*; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.DiskOfferingResponse; +import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.cloudstack.api.response.SnapshotResponse; +import org.apache.cloudstack.api.response.VolumeResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.ResourceAllocationException; @@ -149,7 +153,7 @@ public String getEventDescription() { @Override public void create() throws ResourceAllocationException{ - Volume volume = _storageService.allocVolume(this); + Volume volume = this._volumeService.allocVolume(this); if (volume != null) { this.setEntityId(volume.getId()); this.setEntityUuid(volume.getUuid()); @@ -161,7 +165,7 @@ public void create() throws ResourceAllocationException{ @Override public void execute(){ UserContext.current().setEventDetails("Volume Id: "+getEntityId()+((getSnapshotId() == null) ? "" : " from snapshot: " + getSnapshotId())); - Volume volume = _storageService.createVolume(this); + Volume volume = _volumeService.createVolume(this); if (volume != null) { VolumeResponse response = _responseGenerator.createVolumeResponse(volume); //FIXME - have to be moved to ApiResponseHelper diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java index 6e3b4e12f..394b00921 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java @@ -16,16 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.volume; -import org.apache.cloudstack.api.response.VolumeResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.cloudstack.api.response.VolumeResponse; +import org.apache.log4j.Logger; + import com.cloud.exception.ConcurrentOperationException; import com.cloud.storage.Volume; import com.cloud.user.Account; @@ -80,7 +80,7 @@ public long getEntityOwnerId() { @Override public void execute() throws ConcurrentOperationException { UserContext.current().setEventDetails("Volume Id: "+getId()); - boolean result = _storageService.deleteVolume(id, UserContext.current().getCaller()); + boolean result = this._volumeService.deleteVolume(id, UserContext.current().getCaller()); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java index db17f58e6..9a5929ecc 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.volume; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.cloudstack.api.response.VolumeResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.VolumeResponse; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.storage.Volume; @@ -126,7 +130,7 @@ public String getEventDescription() { @Override public void execute(){ UserContext.current().setEventDetails("Volume Id: "+getId()+" VmId: "+getVirtualMachineId()); - Volume result = _userVmService.detachVolumeFromVM(this); + Volume result = _volumeService.detachVolumeFromVM(this); if (result != null){ VolumeResponse response = _responseGenerator.createVolumeResponse(result); response.setResponseName("volume"); diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java index 40e46fd6b..b86155b2a 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java @@ -18,18 +18,17 @@ import java.net.URISyntaxException; -import org.apache.cloudstack.api.response.VolumeResponse; -import org.apache.cloudstack.api.response.ZoneResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ExtractResponse; +import org.apache.cloudstack.api.response.VolumeResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.dc.DataCenter; import com.cloud.event.EventTypes; diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java index 9ba4f3468..4c78eedeb 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java @@ -16,13 +16,18 @@ // under the License. package org.apache.cloudstack.api.command.user.volume; -import org.apache.cloudstack.api.response.*; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.response.HostResponse; +import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.PodResponse; +import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.cloudstack.api.response.VolumeResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/MigrateVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/MigrateVolumeCmd.java index 88076dbfb..287241a8d 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/MigrateVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/MigrateVolumeCmd.java @@ -16,15 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.user.volume; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.StoragePoolResponse; import org.apache.cloudstack.api.response.VolumeResponse; + import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; import com.cloud.storage.Volume; @@ -92,7 +92,7 @@ public String getEventDescription() { public void execute(){ Volume result; try { - result = _storageService.migrateVolume(getVolumeId(), getStoragePoolId()); + result = _volumeService.migrateVolume(this); if (result != null) { VolumeResponse response = _responseGenerator.createVolumeResponse(result); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java index ff0048315..871bf4555 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java @@ -16,28 +16,21 @@ // under the License. package org.apache.cloudstack.api.command.user.volume; -import org.apache.cloudstack.api.response.*; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.DiskOfferingResponse; +import org.apache.cloudstack.api.response.VolumeResponse; +import org.apache.log4j.Logger; -import java.util.ArrayList; -import java.util.List; -import java.util.regex.Pattern; -import java.util.regex.Matcher; - +import com.cloud.async.AsyncJob; +import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.PermissionDeniedException; import com.cloud.exception.ResourceAllocationException; -import com.cloud.async.AsyncJob; -import com.cloud.event.EventTypes; import com.cloud.projects.Project; import com.cloud.storage.Volume; import com.cloud.user.Account; @@ -139,9 +132,9 @@ public String getEventDescription() { } @Override - public void execute(){ + public void execute() throws ResourceAllocationException{ UserContext.current().setEventDetails("Volume Id: " + getEntityId() + " to size " + getSize() + "G"); - Volume volume = _storageService.resizeVolume(this); + Volume volume = _volumeService.resizeVolume(this); if (volume != null) { VolumeResponse response = _responseGenerator.createVolumeResponse(volume); //FIXME - have to be moved to ApiResponseHelper diff --git a/api/src/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java b/api/src/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java index e2c2c5b6d..3b00ba0d4 100644 --- a/api/src/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java @@ -16,13 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.volume; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.api.response.VolumeResponse; import org.apache.cloudstack.api.response.ZoneResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.VolumeResponse; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; @@ -63,6 +67,10 @@ public class UploadVolumeCmd extends BaseAsyncCmd { @Parameter(name=ApiConstants.CHECKSUM, type=CommandType.STRING, description="the MD5 checksum value of this volume") private String checksum; + + @Parameter(name=ApiConstants.IMAGE_STORE_UUID, type=CommandType.STRING, + description="Image store uuid") + private String imageStoreUuid; ///////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// @@ -95,6 +103,10 @@ public String getAccountName() { public String getChecksum() { return checksum; } + + public String getImageStoreUuid() { + return this.imageStoreUuid; + } ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// @@ -106,7 +118,7 @@ public void execute() throws ResourceUnavailableException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { - Volume volume = _storageService.uploadVolume(this); + Volume volume = _volumeService.uploadVolume(this); if (volume != null){ VolumeResponse response = _responseGenerator.createVolumeResponse(volume); response.setResponseName(getCommandName()); diff --git a/api/src/org/apache/cloudstack/api/command/user/vpc/CreateStaticRouteCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpc/CreateStaticRouteCmd.java index adeec0d04..76a76d6dd 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpc/CreateStaticRouteCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpc/CreateStaticRouteCmd.java @@ -16,17 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.vpc; -import org.apache.cloudstack.api.response.PrivateGatewayResponse; -import org.apache.log4j.Logger; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.PrivateGatewayResponse; import org.apache.cloudstack.api.response.StaticRouteResponse; +import org.apache.log4j.Logger; + import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java index ccd8675e5..04a77888d 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java @@ -16,20 +16,19 @@ // under the License. package org.apache.cloudstack.api.command.user.vpc; -import org.apache.cloudstack.api.response.VpcResponse; -import org.apache.cloudstack.api.response.DomainResponse; -import org.apache.cloudstack.api.response.ProjectResponse; -import org.apache.cloudstack.api.response.ZoneResponse; -import org.apache.cloudstack.api.response.VpcOfferingResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.api.response.ProjectResponse; +import org.apache.cloudstack.api.response.VpcOfferingResponse; +import org.apache.cloudstack.api.response.VpcResponse; +import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpc/DeleteStaticRouteCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpc/DeleteStaticRouteCmd.java index 02d342e5c..e43412a19 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpc/DeleteStaticRouteCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpc/DeleteStaticRouteCmd.java @@ -16,13 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.vpc; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.StaticRouteResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.async.AsyncJob; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpc/DeleteVPCCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpc/DeleteVPCCmd.java index 132556c87..18866beb0 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpc/DeleteVPCCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpc/DeleteVPCCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.vpc; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.api.response.VpcResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.ResourceUnavailableException; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpc/ListPrivateGatewaysCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpc/ListPrivateGatewaysCmd.java index 08da25df2..12b58224f 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpc/ListPrivateGatewaysCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpc/ListPrivateGatewaysCmd.java @@ -20,14 +20,14 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.VpcResponse; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.PrivateGatewayResponse; +import org.apache.cloudstack.api.response.VpcResponse; +import org.apache.log4j.Logger; + import com.cloud.network.vpc.PrivateGateway; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpc/ListStaticRoutesCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpc/ListStaticRoutesCmd.java index e9fada0a3..ab69d4a3e 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpc/ListStaticRoutesCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpc/ListStaticRoutesCmd.java @@ -18,16 +18,18 @@ import java.util.ArrayList; import java.util.List; + +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.PrivateGatewayResponse; import org.apache.cloudstack.api.response.StaticRouteResponse; +import org.apache.cloudstack.api.response.VpcResponse; + import com.cloud.network.vpc.StaticRoute; import com.cloud.utils.Pair; -import org.apache.cloudstack.api.response.VpcResponse; @APICommand(name = "listStaticRoutes", description="Lists all static routes", responseObject=StaticRouteResponse.class) public class ListStaticRoutesCmd extends BaseListTaggedResourcesCmd { diff --git a/api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCOfferingsCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCOfferingsCmd.java index f776302d3..ddae79987 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCOfferingsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCOfferingsCmd.java @@ -19,14 +19,14 @@ import java.util.ArrayList; import java.util.List; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.VpcOfferingResponse; +import org.apache.log4j.Logger; + import com.cloud.network.vpc.VpcOffering; @APICommand(name = "listVPCOfferings", description="Lists VPC offerings", responseObject=VpcOfferingResponse.class) @@ -92,7 +92,7 @@ public String getState() { @Override public void execute(){ - List offerings = _vpcService.listVpcOfferings(getId(), getVpcOffName(), getDisplayText(), + List offerings = _vpcProvSvc.listVpcOfferings(getId(), getVpcOffName(), getDisplayText(), getSupportedServices(), isDefault, this.getKeyword(), getState(), this.getStartIndex(), this.getPageSizeVal()); ListResponse response = new ListResponse(); List offeringResponses = new ArrayList(); diff --git a/api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCsCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCsCmd.java index 2501574f2..b6bc68f9f 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpc/ListVPCsCmd.java @@ -19,17 +19,17 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.response.VpcResponse; -import org.apache.cloudstack.api.response.ZoneResponse; -import org.apache.cloudstack.api.response.VpcOfferingResponse; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; +import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ListResponse; +import org.apache.cloudstack.api.response.VpcOfferingResponse; +import org.apache.cloudstack.api.response.VpcResponse; +import org.apache.cloudstack.api.response.ZoneResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.ApiConstants; -import org.apache.cloudstack.api.BaseListTaggedResourcesCmd; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.Parameter; import com.cloud.network.vpc.Vpc; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java index f28c4cb55..bd56c744a 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.vpc; -import org.apache.cloudstack.api.*; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.api.response.VpcResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java index d34f7bf7b..2cc3c98b0 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java @@ -16,16 +16,15 @@ // under the License. package org.apache.cloudstack.api.command.user.vpc; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.VpcResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.network.vpc.Vpc; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/AddVpnUserCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/AddVpnUserCmd.java index 479e99049..0618e3467 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/AddVpnUserCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/AddVpnUserCmd.java @@ -16,18 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.vpn; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.VpnUsersResponse; +import org.apache.log4j.Logger; + import com.cloud.domain.Domain; import com.cloud.event.EventTypes; import com.cloud.network.VpnUser; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/CreateRemoteAccessVpnCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/CreateRemoteAccessVpnCmd.java index ae09ef798..ff681a9d1 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/CreateRemoteAccessVpnCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/CreateRemoteAccessVpnCmd.java @@ -16,13 +16,18 @@ // under the License. package org.apache.cloudstack.api.command.user.vpn; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.BaseAsyncCreateCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.IPAddressResponse; +import org.apache.cloudstack.api.response.RemoteAccessVpnResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.RemoteAccessVpnResponse; import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.NetworkRuleConflictException; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnConnectionCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnConnectionCmd.java index 327f35b66..fee0325e9 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnConnectionCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnConnectionCmd.java @@ -16,13 +16,18 @@ // under the License. package org.apache.cloudstack.api.command.user.vpn; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.BaseAsyncCreateCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.Site2SiteCustomerGatewayResponse; +import org.apache.cloudstack.api.response.Site2SiteVpnConnectionResponse; import org.apache.cloudstack.api.response.Site2SiteVpnGatewayResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.Site2SiteVpnConnectionResponse; import com.cloud.event.EventTypes; import com.cloud.exception.NetworkRuleConflictException; import com.cloud.exception.ResourceUnavailableException; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnCustomerGatewayCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnCustomerGatewayCmd.java index a14a5ec82..38b40b54c 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnCustomerGatewayCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnCustomerGatewayCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.vpn; -import org.apache.cloudstack.api.response.DomainResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.Site2SiteCustomerGatewayResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.network.Site2SiteCustomerGateway; import com.cloud.user.UserContext; @@ -35,7 +34,7 @@ public class CreateVpnCustomerGatewayCmd extends BaseAsyncCmd { public static final Logger s_logger = Logger.getLogger(CreateVpnCustomerGatewayCmd.class.getName()); - private static final String s_name = "createcustomergatewayresponse"; + private static final String s_name = "createvpncustomergatewayresponse"; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnGatewayCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnGatewayCmd.java index 2d2150b89..4cc650f70 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnGatewayCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/CreateVpnGatewayCmd.java @@ -16,17 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.vpn; -import org.apache.cloudstack.api.response.VpcResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.Site2SiteVpnGatewayResponse; +import org.apache.cloudstack.api.response.VpcResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.network.Site2SiteVpnGateway; import com.cloud.network.vpc.Vpc; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteRemoteAccessVpnCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteRemoteAccessVpnCmd.java index a634a0a7c..5b1c5c6b4 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteRemoteAccessVpnCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteRemoteAccessVpnCmd.java @@ -17,14 +17,14 @@ package org.apache.cloudstack.api.command.user.vpn; import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.AccountResponse; -import org.apache.cloudstack.api.response.IPAddressResponse; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseAsyncCmd; import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.response.AccountResponse; +import org.apache.cloudstack.api.response.IPAddressResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.ResourceUnavailableException; @@ -63,7 +63,7 @@ public String getCommandName() { @Override public long getEntityOwnerId() { if (ownerId == null) { - RemoteAccessVpn vpnEntity = _entityMgr.findById(RemoteAccessVpn.class, publicIpId); + RemoteAccessVpn vpnEntity = _ravService.getRemoteAccessVpn(publicIpId); if(vpnEntity != null) return vpnEntity.getAccountId(); diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteVpnConnectionCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteVpnConnectionCmd.java index 06521026b..667e179f3 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteVpnConnectionCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteVpnConnectionCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.vpn; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.Site2SiteVpnConnectionResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.event.EventTypes; import com.cloud.exception.ResourceUnavailableException; import com.cloud.network.Site2SiteVpnConnection; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteVpnCustomerGatewayCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteVpnCustomerGatewayCmd.java index 854bb9b6e..a239bdfe4 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteVpnCustomerGatewayCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteVpnCustomerGatewayCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.vpn; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.Site2SiteCustomerGatewayResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.event.EventTypes; import com.cloud.network.Site2SiteCustomerGateway; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteVpnGatewayCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteVpnGatewayCmd.java index 6c89f7c9b..fa4c1df9f 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteVpnGatewayCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/DeleteVpnGatewayCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.vpn; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.Site2SiteVpnGatewayResponse; +import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.SuccessResponse; import com.cloud.event.EventTypes; import com.cloud.network.Site2SiteVpnGateway; import com.cloud.user.Account; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/ListRemoteAccessVpnsCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/ListRemoteAccessVpnsCmd.java index 4b6a2058b..12ee95ba5 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/ListRemoteAccessVpnsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/ListRemoteAccessVpnsCmd.java @@ -19,15 +19,15 @@ import java.util.ArrayList; import java.util.List; -import org.apache.cloudstack.api.response.IPAddressResponse; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.response.IPAddressResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.RemoteAccessVpnResponse; +import org.apache.log4j.Logger; + import com.cloud.network.RemoteAccessVpn; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnConnectionsCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnConnectionsCmd.java index 56f8aa547..6fb7d73af 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnConnectionsCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnConnectionsCmd.java @@ -20,14 +20,14 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.VpcResponse; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.Site2SiteVpnConnectionResponse; +import org.apache.cloudstack.api.response.VpcResponse; +import org.apache.log4j.Logger; + import com.cloud.network.Site2SiteVpnConnection; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnCustomerGatewaysCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnCustomerGatewaysCmd.java index 0e4209ba8..418cad53d 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnCustomerGatewaysCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnCustomerGatewaysCmd.java @@ -20,13 +20,13 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.Site2SiteCustomerGatewayResponse; +import org.apache.log4j.Logger; + import com.cloud.network.Site2SiteCustomerGateway; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnGatewaysCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnGatewaysCmd.java index 63f70e3ef..41981dfd1 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnGatewaysCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnGatewaysCmd.java @@ -20,14 +20,14 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.VpcResponse; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.Site2SiteVpnGatewayResponse; +import org.apache.cloudstack.api.response.VpcResponse; +import org.apache.log4j.Logger; + import com.cloud.network.Site2SiteVpnGateway; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnUsersCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnUsersCmd.java index fb12f65fa..8a36f4b9b 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnUsersCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/ListVpnUsersCmd.java @@ -20,13 +20,13 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListProjectAndAccountResourcesCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.VpnUsersResponse; +import org.apache.log4j.Logger; + import com.cloud.network.VpnUser; import com.cloud.utils.Pair; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/RemoveVpnUserCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/RemoveVpnUserCmd.java index 11ca651f6..9520e8085 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/RemoveVpnUserCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/RemoveVpnUserCmd.java @@ -16,18 +16,17 @@ // under the License. package org.apache.cloudstack.api.command.user.vpn; -import org.apache.log4j.Logger; - +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ProjectResponse; import org.apache.cloudstack.api.response.SuccessResponse; +import org.apache.log4j.Logger; + import com.cloud.event.EventTypes; import com.cloud.user.Account; import com.cloud.user.UserContext; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/ResetVpnConnectionCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/ResetVpnConnectionCmd.java index 14e2f8cd8..d9f38d235 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/ResetVpnConnectionCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/ResetVpnConnectionCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.vpn; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.api.response.Site2SiteVpnConnectionResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.Site2SiteVpnConnectionResponse; import com.cloud.event.EventTypes; import com.cloud.exception.ResourceUnavailableException; import com.cloud.network.Site2SiteVpnConnection; diff --git a/api/src/org/apache/cloudstack/api/command/user/vpn/UpdateVpnCustomerGatewayCmd.java b/api/src/org/apache/cloudstack/api/command/user/vpn/UpdateVpnCustomerGatewayCmd.java index 27b656d49..3aca5cd47 100644 --- a/api/src/org/apache/cloudstack/api/command/user/vpn/UpdateVpnCustomerGatewayCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/vpn/UpdateVpnCustomerGatewayCmd.java @@ -16,12 +16,16 @@ // under the License. package org.apache.cloudstack.api.command.user.vpn; -import org.apache.cloudstack.api.*; +import org.apache.cloudstack.api.APICommand; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; +import org.apache.cloudstack.api.BaseAsyncCmd; +import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.DomainResponse; +import org.apache.cloudstack.api.response.Site2SiteCustomerGatewayResponse; import org.apache.log4j.Logger; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.Site2SiteCustomerGatewayResponse; import com.cloud.event.EventTypes; import com.cloud.network.Site2SiteCustomerGateway; import com.cloud.user.UserContext; diff --git a/api/src/org/apache/cloudstack/api/command/user/zone/ListZonesByCmd.java b/api/src/org/apache/cloudstack/api/command/user/zone/ListZonesByCmd.java index ccacf060b..bbfb598b1 100644 --- a/api/src/org/apache/cloudstack/api/command/user/zone/ListZonesByCmd.java +++ b/api/src/org/apache/cloudstack/api/command/user/zone/ListZonesByCmd.java @@ -20,15 +20,15 @@ import java.util.List; import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.response.DomainResponse; -import org.apache.log4j.Logger; - import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.response.DomainResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.ServiceOfferingResponse; import org.apache.cloudstack.api.response.ZoneResponse; +import org.apache.log4j.Logger; + import com.cloud.dc.DataCenter; @APICommand(name = "listZones", description="Lists zones", responseObject=ZoneResponse.class) @@ -53,6 +53,9 @@ public class ListZonesByCmd extends BaseListCmd { description="the ID of the domain associated with the zone") private Long domainId; + @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name of the zone") + private String name; + @Parameter(name=ApiConstants.SHOW_CAPACITIES, type=CommandType.BOOLEAN, description="flag to display the capacity of the zones") private Boolean showCapacities; @@ -72,6 +75,10 @@ public Long getDomainId(){ return domainId; } + public String getName(){ + return name; + } + public Boolean getShowCapacities() { return showCapacities; } diff --git a/api/src/org/apache/cloudstack/api/response/AccountResponse.java b/api/src/org/apache/cloudstack/api/response/AccountResponse.java index 51d3352c6..c109a6325 100644 --- a/api/src/org/apache/cloudstack/api/response/AccountResponse.java +++ b/api/src/org/apache/cloudstack/api/response/AccountResponse.java @@ -20,12 +20,12 @@ import java.util.Map; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; import com.cloud.serializer.Param; import com.cloud.user.Account; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; @SuppressWarnings("unused") @EntityReference(value = Account.class) @@ -123,15 +123,51 @@ public class AccountResponse extends BaseResponse { @SerializedName("networkavailable") @Param(description="the total number of networks available to be created for this account", since="3.0.1") private String networkAvailable; - @SerializedName("vpclimit") @Param(description="the total number of vpcs the account can own", since="3.0.5") + @SerializedName("vpclimit") @Param(description="the total number of vpcs the account can own", since="4.0.0") private String vpcLimit; - @SerializedName("vpctotal") @Param(description="the total number of vpcs owned by account", since="3.0.5") + @SerializedName("vpctotal") @Param(description="the total number of vpcs owned by account", since="4.0.0") private Long vpcTotal; - @SerializedName("vpcavailable") @Param(description="the total number of vpcs available to be created for this account", since="3.0.5") + @SerializedName("vpcavailable") @Param(description="the total number of vpcs available to be created for this account", since="4.0.0") private String vpcAvailable; + @SerializedName("cpulimit") @Param(description="the total number of cpu cores the account can own", since="4.2.0") + private String cpuLimit; + + @SerializedName("cputotal") @Param(description="the total number of cpu cores owned by account", since="4.2.0") + private Long cpuTotal; + + @SerializedName("cpuavailable") @Param(description="the total number of cpu cores available to be created for this account", since="4.2.0") + private String cpuAvailable; + + @SerializedName("memorylimit") @Param(description="the total memory (in MB) the account can own", since="4.2.0") + private String memoryLimit; + + @SerializedName("memorytotal") @Param(description="the total memory (in MB) owned by account", since="4.2.0") + private Long memoryTotal; + + @SerializedName("memoryavailable") @Param(description="the total memory (in MB) available to be created for this account", since="4.2.0") + private String memoryAvailable; + + @SerializedName("primarystoragelimit") @Param(description="the total primary storage space (in GiB) the account can own", since="4.2.0") + private String primaryStorageLimit; + + @SerializedName("primarystoragetotal") @Param(description="the total primary storage space (in GiB) owned by account", since="4.2.0") + private Long primaryStorageTotal; + + @SerializedName("primarystorageavailable") @Param(description="the total primary storage space (in GiB) available to be used for this account", since="4.2.0") + private String primaryStorageAvailable; + + @SerializedName("secondarystoragelimit") @Param(description="the total secondary storage space (in GiB) the account can own", since="4.2.0") + private String secondaryStorageLimit; + + @SerializedName("secondarystoragetotal") @Param(description="the total secondary storage space (in GiB) owned by account", since="4.2.0") + private Long secondaryStorageTotal; + + @SerializedName("secondarystorageavailable") @Param(description="the total secondary storage space (in GiB) available to be used for this account", since="4.2.0") + private String secondaryStorageAvailable; + @SerializedName(ApiConstants.STATE) @Param(description="the state of the account") private String state; @@ -294,6 +330,54 @@ public void setNetworkAvailable(String networkAvailable) { this.networkAvailable = networkAvailable; } + public void setCpuLimit(String cpuLimit) { + this.cpuLimit = cpuLimit; + } + + public void setCpuTotal(Long cpuTotal) { + this.cpuTotal = cpuTotal; + } + + public void setCpuAvailable(String cpuAvailable) { + this.cpuAvailable = cpuAvailable; + } + + public void setMemoryLimit(String memoryLimit) { + this.memoryLimit = memoryLimit; + } + + public void setMemoryTotal(Long memoryTotal) { + this.memoryTotal = memoryTotal; + } + + public void setMemoryAvailable(String memoryAvailable) { + this.memoryAvailable = memoryAvailable; + } + + public void setPrimaryStorageLimit(String primaryStorageLimit) { + this.primaryStorageLimit = primaryStorageLimit; + } + + public void setPrimaryStorageTotal(Long primaryStorageTotal) { + this.primaryStorageTotal = primaryStorageTotal; + } + + public void setPrimaryStorageAvailable(String primaryStorageAvailable) { + this.primaryStorageAvailable = primaryStorageAvailable; + } + + public void setSecondaryStorageLimit(String secondaryStorageLimit) { + this.secondaryStorageLimit = secondaryStorageLimit; + } + + public void setSecondaryStorageTotal(Long secondaryStorageTotal) { + this.secondaryStorageTotal = secondaryStorageTotal; + } + + public void setSecondaryStorageAvailable(String secondaryStorageAvailable) { + this.secondaryStorageAvailable = secondaryStorageAvailable; + } + public void setDefaultZone(String defaultZoneId) { this.defaultZoneId = defaultZoneId; } diff --git a/api/src/org/apache/cloudstack/api/response/AddIpToVmNicResponse.java b/api/src/org/apache/cloudstack/api/response/AddIpToVmNicResponse.java new file mode 100644 index 000000000..9af20b238 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/response/AddIpToVmNicResponse.java @@ -0,0 +1,85 @@ +// 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 org.apache.cloudstack.api.response; +import java.util.Date; +import java.util.List; + +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + +@SuppressWarnings("unused") +public class AddIpToVmNicResponse extends BaseResponse { + @SerializedName(ApiConstants.ID) @Param(description="the ID of the secondary private IP addr") + private Long id; + + @SerializedName(ApiConstants.IP_ADDRESS) @Param(description="Secondary IP address") + private String ipAddr; + + @SerializedName(ApiConstants.NIC_ID) @Param(description="the ID of the nic") + private Long nicId; + + @SerializedName(ApiConstants.NETWORK_ID) @Param(description="the ID of the network") + private Long nwId; + + @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) @Param(description="the ID of the vm") + private Long vmId; + + public Long getId() { + return id; + } + + public String getIpAddr() { + return ipAddr; + } + + public void setIpAddr(String ipAddr) { + this.ipAddr = ipAddr; + } + + public Long getNicId() { + return nicId; + } + + public void setNicId(Long nicId) { + this.nicId = nicId; + } + + public Long getNwId() { + return nwId; + } + + public void setNwId(Long nwId) { + this.nwId = nwId; + } + + public Long getVmId() { + return vmId; + } + + public void setVmId(Long vmId) { + this.vmId = vmId; + } + + public Long setId(Long id) { + return id; + } + + +} diff --git a/api/src/org/apache/cloudstack/api/response/AlertResponse.java b/api/src/org/apache/cloudstack/api/response/AlertResponse.java index f01a3e9c1..f3755e58d 100644 --- a/api/src/org/apache/cloudstack/api/response/AlertResponse.java +++ b/api/src/org/apache/cloudstack/api/response/AlertResponse.java @@ -18,13 +18,14 @@ import java.util.Date; -import com.cloud.alert.Alert; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.alert.Alert; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=Alert.class) @SuppressWarnings("unused") public class AlertResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/AsyncJobResponse.java b/api/src/org/apache/cloudstack/api/response/AsyncJobResponse.java index 1a47cd2a3..a23771478 100644 --- a/api/src/org/apache/cloudstack/api/response/AsyncJobResponse.java +++ b/api/src/org/apache/cloudstack/api/response/AsyncJobResponse.java @@ -22,6 +22,7 @@ import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; import org.apache.cloudstack.api.ResponseObject; + import com.cloud.async.AsyncJob; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; diff --git a/api/src/org/apache/cloudstack/api/response/AutoScalePolicyResponse.java b/api/src/org/apache/cloudstack/api/response/AutoScalePolicyResponse.java index 424a4fa44..6a2bfbe4d 100644 --- a/api/src/org/apache/cloudstack/api/response/AutoScalePolicyResponse.java +++ b/api/src/org/apache/cloudstack/api/response/AutoScalePolicyResponse.java @@ -16,14 +16,15 @@ // under the License. package org.apache.cloudstack.api.response; -import com.cloud.network.as.AutoScalePolicy; +import java.util.List; + import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; -import java.util.List; +import com.cloud.network.as.AutoScalePolicy; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; @EntityReference(value=AutoScalePolicy.class) public class AutoScalePolicyResponse extends BaseResponse implements ControlledEntityResponse { diff --git a/api/src/org/apache/cloudstack/api/response/AutoScaleVmGroupResponse.java b/api/src/org/apache/cloudstack/api/response/AutoScaleVmGroupResponse.java index dc0e0155d..98fdcad39 100644 --- a/api/src/org/apache/cloudstack/api/response/AutoScaleVmGroupResponse.java +++ b/api/src/org/apache/cloudstack/api/response/AutoScaleVmGroupResponse.java @@ -16,14 +16,15 @@ // under the License. package org.apache.cloudstack.api.response; -import com.cloud.network.as.AutoScaleVmGroup; +import java.util.List; + import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; -import java.util.List; +import com.cloud.network.as.AutoScaleVmGroup; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; @EntityReference(value=AutoScaleVmGroup.class) public class AutoScaleVmGroupResponse extends BaseResponse implements ControlledEntityResponse { diff --git a/api/src/org/apache/cloudstack/api/response/AutoScaleVmProfileResponse.java b/api/src/org/apache/cloudstack/api/response/AutoScaleVmProfileResponse.java index 0ae216706..4c97adf1e 100644 --- a/api/src/org/apache/cloudstack/api/response/AutoScaleVmProfileResponse.java +++ b/api/src/org/apache/cloudstack/api/response/AutoScaleVmProfileResponse.java @@ -20,12 +20,13 @@ import java.util.List; import java.util.Map; -import com.cloud.network.as.AutoScaleVmProfile; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd.CommandType; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; import org.apache.cloudstack.api.Parameter; + +import com.cloud.network.as.AutoScaleVmProfile; import com.cloud.serializer.Param; import com.cloud.utils.Pair; import com.google.gson.annotations.SerializedName; diff --git a/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java b/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java index 20d160dd2..c2996f0aa 100644 --- a/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java +++ b/api/src/org/apache/cloudstack/api/response/CapabilitiesResponse.java @@ -17,9 +17,10 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; @SuppressWarnings("unused") public class CapabilitiesResponse extends BaseResponse { @@ -45,6 +46,12 @@ public class CapabilitiesResponse extends BaseResponse { "create disk from disk offering with custom size") private Long diskOffMaxSize; + @SerializedName("apilimitinterval") @Param(description="time interval (in seconds) to reset api count") + private Integer apiLimitInterval; + + @SerializedName("apilimitmax") @Param(description="Max allowed number of api requests within the specified interval") + private Integer apiLimitMax; + public void setSecurityGroupsEnabled(boolean securityGroupsEnabled) { this.securityGroupsEnabled = securityGroupsEnabled; @@ -74,4 +81,13 @@ public void setDiskOffMaxSize(Long diskOffMaxSize) { this.diskOffMaxSize = diskOffMaxSize; } + public void setApiLimitInterval(Integer apiLimitInterval) { + this.apiLimitInterval = apiLimitInterval; + } + + public void setApiLimitMax(Integer apiLimitMax) { + this.apiLimitMax = apiLimitMax; + } + + } diff --git a/api/src/org/apache/cloudstack/api/response/CapabilityResponse.java b/api/src/org/apache/cloudstack/api/response/CapabilityResponse.java index 5fe3072fe..e960c2ddd 100644 --- a/api/src/org/apache/cloudstack/api/response/CapabilityResponse.java +++ b/api/src/org/apache/cloudstack/api/response/CapabilityResponse.java @@ -17,9 +17,10 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class CapabilityResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/CapacityResponse.java b/api/src/org/apache/cloudstack/api/response/CapacityResponse.java index 2c98dc9d6..c1ef62c73 100644 --- a/api/src/org/apache/cloudstack/api/response/CapacityResponse.java +++ b/api/src/org/apache/cloudstack/api/response/CapacityResponse.java @@ -17,9 +17,10 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class CapacityResponse extends BaseResponse { @SerializedName(ApiConstants.TYPE) @Param(description="the capacity type") diff --git a/api/src/org/apache/cloudstack/api/response/CloudIdentifierResponse.java b/api/src/org/apache/cloudstack/api/response/CloudIdentifierResponse.java index d6d2fa701..5e7448649 100644 --- a/api/src/org/apache/cloudstack/api/response/CloudIdentifierResponse.java +++ b/api/src/org/apache/cloudstack/api/response/CloudIdentifierResponse.java @@ -17,9 +17,10 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class CloudIdentifierResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/ClusterResponse.java b/api/src/org/apache/cloudstack/api/response/ClusterResponse.java index e436c9987..a90acde61 100644 --- a/api/src/org/apache/cloudstack/api/response/ClusterResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ClusterResponse.java @@ -20,12 +20,12 @@ import java.util.List; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; import com.cloud.org.Cluster; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; @EntityReference(value = Cluster.class) public class ClusterResponse extends BaseResponse { @@ -62,6 +62,12 @@ public class ClusterResponse extends BaseResponse { @SerializedName("capacity") @Param(description="the capacity of the Cluster", responseObject = CapacityResponse.class) private List capacitites; + @SerializedName("cpuovercommitratio") @Param(description = "The cpu overcommit ratio of the cluster") + private String cpuovercommitratio; + + @SerializedName("memoryovercommitratio") @Param (description = "The ram overcommit ratio of the cluster") + private String memoryovercommitratio; + public String getId() { return id; } @@ -149,4 +155,18 @@ public List getCapacitites() { public void setCapacitites(ArrayList arrayList) { this.capacitites = arrayList; } + public void setCpuovercommitratio(String cpuovercommitratio){ + this.cpuovercommitratio= cpuovercommitratio; + } + public void setRamovercommitratio (String memoryOvercommitRatio){ + this.memoryovercommitratio= memoryOvercommitRatio; + } + + public String getCpuovercommitratio (){ + return cpuovercommitratio; + } + + public String getRamovercommitratio (){ + return memoryovercommitratio; + } } diff --git a/api/src/org/apache/cloudstack/api/response/ConditionResponse.java b/api/src/org/apache/cloudstack/api/response/ConditionResponse.java index f398f0aae..ccdd2782f 100644 --- a/api/src/org/apache/cloudstack/api/response/ConditionResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ConditionResponse.java @@ -19,13 +19,14 @@ import java.util.List; -import com.cloud.network.as.Condition; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.as.Condition; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=Condition.class) @SuppressWarnings("unused") public class ConditionResponse extends BaseResponse implements ControlledEntityResponse { diff --git a/api/src/org/apache/cloudstack/api/response/ConfigurationResponse.java b/api/src/org/apache/cloudstack/api/response/ConfigurationResponse.java index ded0fb5fb..95b8af2f4 100644 --- a/api/src/org/apache/cloudstack/api/response/ConfigurationResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ConfigurationResponse.java @@ -17,9 +17,10 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class ConfigurationResponse extends BaseResponse { @SerializedName(ApiConstants.CATEGORY) @Param(description="the category of the configuration") diff --git a/api/src/org/apache/cloudstack/api/response/CounterResponse.java b/api/src/org/apache/cloudstack/api/response/CounterResponse.java index 4dc44e767..4f5784a30 100644 --- a/api/src/org/apache/cloudstack/api/response/CounterResponse.java +++ b/api/src/org/apache/cloudstack/api/response/CounterResponse.java @@ -18,12 +18,12 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; import com.cloud.network.as.Counter; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; @SuppressWarnings("unused") @EntityReference(value=Counter.class) diff --git a/api/src/org/apache/cloudstack/api/response/CustomCertificateResponse.java b/api/src/org/apache/cloudstack/api/response/CustomCertificateResponse.java index f45b0c8e4..59c108e3c 100644 --- a/api/src/org/apache/cloudstack/api/response/CustomCertificateResponse.java +++ b/api/src/org/apache/cloudstack/api/response/CustomCertificateResponse.java @@ -16,9 +16,10 @@ // under the License. package org.apache.cloudstack.api.response; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class CustomCertificateResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/DeploymentPlannersResponse.java b/api/src/org/apache/cloudstack/api/response/DeploymentPlannersResponse.java new file mode 100644 index 000000000..a37800fd6 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/response/DeploymentPlannersResponse.java @@ -0,0 +1,37 @@ +// 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 org.apache.cloudstack.api.response; + +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + +public class DeploymentPlannersResponse extends BaseResponse { + @SerializedName(ApiConstants.NAME) + @Param(description = "Deployment Planner name") + private String name; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java b/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java index de3daf587..04c318f8a 100644 --- a/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java +++ b/api/src/org/apache/cloudstack/api/response/DiskOfferingResponse.java @@ -18,13 +18,14 @@ import java.util.Date; -import com.cloud.offering.DiskOffering; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.offering.DiskOffering; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=DiskOffering.class) public class DiskOfferingResponse extends BaseResponse { @SerializedName(ApiConstants.ID) @Param(description="unique ID of the disk offering") diff --git a/api/src/org/apache/cloudstack/api/response/DomainResponse.java b/api/src/org/apache/cloudstack/api/response/DomainResponse.java index c74e7c98d..736a96cce 100644 --- a/api/src/org/apache/cloudstack/api/response/DomainResponse.java +++ b/api/src/org/apache/cloudstack/api/response/DomainResponse.java @@ -19,6 +19,7 @@ import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; + import com.cloud.domain.Domain; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; diff --git a/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java b/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java index cf2f3f41f..b2bc02e9b 100644 --- a/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java +++ b/api/src/org/apache/cloudstack/api/response/DomainRouterResponse.java @@ -18,16 +18,17 @@ import java.util.Date; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.Set; - -import com.cloud.vm.VirtualMachine; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; + import com.cloud.serializer.Param; +import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachine.State; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; -import org.apache.cloudstack.api.EntityReference; @EntityReference(value=VirtualMachine.class) @SuppressWarnings("unused") @@ -47,6 +48,12 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView @SerializedName(ApiConstants.DNS2) @Param(description="the second DNS for the router") private String dns2; + @SerializedName(ApiConstants.IP6_DNS1) @Param(description="the first IPv6 DNS for the router") + private String ip6Dns1; + + @SerializedName(ApiConstants.IP6_DNS2) @Param(description="the second IPv6 DNS for the router") + private String ip6Dns2; + @SerializedName("networkdomain") @Param(description="the network domain for the router") private String networkDomain; @@ -151,7 +158,7 @@ public class DomainRouterResponse extends BaseResponse implements ControlledView private Set nics; public DomainRouterResponse(){ - nics = new HashSet(); + nics = new LinkedHashSet(); } @@ -338,4 +345,20 @@ public void setNics(Set nics) { public void addNic(NicResponse nic) { this.nics.add(nic); } + + public String getIp6Dns1() { + return ip6Dns1; + } + + public void setIp6Dns1(String ip6Dns1) { + this.ip6Dns1 = ip6Dns1; + } + + public String getIp6Dns2() { + return ip6Dns2; + } + + public void setIp6Dns2(String ip6Dns2) { + this.ip6Dns2 = ip6Dns2; + } } diff --git a/api/src/org/apache/cloudstack/api/response/EventResponse.java b/api/src/org/apache/cloudstack/api/response/EventResponse.java index b2148db5d..c2bf75773 100644 --- a/api/src/org/apache/cloudstack/api/response/EventResponse.java +++ b/api/src/org/apache/cloudstack/api/response/EventResponse.java @@ -19,11 +19,12 @@ import java.util.Date; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; + import com.cloud.event.Event; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; -import org.apache.cloudstack.api.EntityReference; @EntityReference(value=Event.class) @SuppressWarnings("unused") diff --git a/api/src/org/apache/cloudstack/api/response/EventTypeResponse.java b/api/src/org/apache/cloudstack/api/response/EventTypeResponse.java index 4dcc44179..b526435a4 100644 --- a/api/src/org/apache/cloudstack/api/response/EventTypeResponse.java +++ b/api/src/org/apache/cloudstack/api/response/EventTypeResponse.java @@ -17,9 +17,10 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class EventTypeResponse extends BaseResponse { @SerializedName(ApiConstants.NAME) @Param(description="Event Type") diff --git a/api/src/org/apache/cloudstack/api/response/ExceptionResponse.java b/api/src/org/apache/cloudstack/api/response/ExceptionResponse.java index 5f8e64214..3afd516e0 100644 --- a/api/src/org/apache/cloudstack/api/response/ExceptionResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ExceptionResponse.java @@ -18,9 +18,10 @@ import java.util.ArrayList; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class ExceptionResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/ExternalFirewallResponse.java b/api/src/org/apache/cloudstack/api/response/ExternalFirewallResponse.java index 30fe86f88..50f523325 100644 --- a/api/src/org/apache/cloudstack/api/response/ExternalFirewallResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ExternalFirewallResponse.java @@ -17,9 +17,9 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.response.NetworkDeviceResponse; public class ExternalFirewallResponse extends NetworkDeviceResponse { diff --git a/api/src/org/apache/cloudstack/api/response/ExternalLoadBalancerResponse.java b/api/src/org/apache/cloudstack/api/response/ExternalLoadBalancerResponse.java index 6f80c1084..5a323a7af 100644 --- a/api/src/org/apache/cloudstack/api/response/ExternalLoadBalancerResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ExternalLoadBalancerResponse.java @@ -17,9 +17,9 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.response.NetworkDeviceResponse; public class ExternalLoadBalancerResponse extends NetworkDeviceResponse { diff --git a/api/src/org/apache/cloudstack/api/response/ExtractResponse.java b/api/src/org/apache/cloudstack/api/response/ExtractResponse.java index 5d415e943..f5595f95a 100644 --- a/api/src/org/apache/cloudstack/api/response/ExtractResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ExtractResponse.java @@ -19,9 +19,10 @@ import java.util.Date; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class ExtractResponse extends BaseResponse { @SerializedName(ApiConstants.ID) @Param(description="the id of extracted object") diff --git a/api/src/org/apache/cloudstack/api/response/FirewallResponse.java b/api/src/org/apache/cloudstack/api/response/FirewallResponse.java index d399590f2..26d243386 100644 --- a/api/src/org/apache/cloudstack/api/response/FirewallResponse.java +++ b/api/src/org/apache/cloudstack/api/response/FirewallResponse.java @@ -19,9 +19,10 @@ import java.util.List; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; @SuppressWarnings("unused") public class FirewallResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java b/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java index 0009658c2..787410a24 100644 --- a/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java +++ b/api/src/org/apache/cloudstack/api/response/FirewallRuleResponse.java @@ -18,13 +18,14 @@ import java.util.List; -import com.cloud.network.rules.FirewallRule; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.rules.FirewallRule; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=FirewallRule.class) @SuppressWarnings("unused") public class FirewallRuleResponse extends BaseResponse { @@ -70,6 +71,18 @@ public class FirewallRuleResponse extends BaseResponse { @SerializedName(ApiConstants.TAGS) @Param(description="the list of resource tags associated with the rule", responseObject = ResourceTagResponse.class) private List tags; + @SerializedName(ApiConstants.VM_GUEST_IP) @Param(description="the vm ip address for the port forwarding rule") + private String destNatVmIp; + + + public String getDestNatVmIp() { + return destNatVmIp; + } + + public void setDestNatVmIp(String destNatVmIp) { + this.destNatVmIp = destNatVmIp; + } + @Override public String getObjectId() { diff --git a/api/src/org/apache/cloudstack/api/response/GetVMPasswordResponse.java b/api/src/org/apache/cloudstack/api/response/GetVMPasswordResponse.java index 8147df3fa..56ced5b8c 100644 --- a/api/src/org/apache/cloudstack/api/response/GetVMPasswordResponse.java +++ b/api/src/org/apache/cloudstack/api/response/GetVMPasswordResponse.java @@ -16,9 +16,10 @@ // under the License. package org.apache.cloudstack.api.response; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class GetVMPasswordResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java b/api/src/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java new file mode 100644 index 000000000..38e080bd2 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java @@ -0,0 +1,133 @@ +// 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 org.apache.cloudstack.api.response; + +import com.cloud.region.ha.GlobalLoadBalancerRule; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; + +@EntityReference(value= GlobalLoadBalancerRule.class) +public class GlobalLoadBalancerResponse extends BaseResponse implements ControlledEntityResponse { + + @SerializedName(ApiConstants.ID) + @Param(description = "global load balancer rule ID") + private String id; + + @SerializedName(ApiConstants.NAME) + @Param(description = "name of the global load balancer rule") + private String name; + + @SerializedName(ApiConstants.DESCRIPTION) + @Param(description = "the description of the global load balancer rule") + private String description; + + @SerializedName(ApiConstants.GSLB_SERVICE_DOMAIN_NAME) + @Param(description = "DNS domain name given for the global load balancer") + private String gslbDomainName; + + @SerializedName(ApiConstants.GSLB_LB_METHOD) + @Param(description = "Load balancing method used for the global load balancer") + private String algorithm; + + @SerializedName(ApiConstants.GSLB_STICKY_SESSION_METHOD) + @Param(description = "session persistence method used for the global load balancer") + private String stickyMethod; + + @SerializedName(ApiConstants.GSLB_SERVICE_TYPE) + @Param(description = "GSLB service type") + private String serviceType; + + @SerializedName(ApiConstants.REGION_ID) + @Param(description = "Region Id in which global load balancer is created") + private Integer regionId; + + @SerializedName(ApiConstants.ACCOUNT) + @Param(description = "the account of the load balancer rule") + private String accountName; + + @SerializedName(ApiConstants.PROJECT_ID) @Param(description="the project id of the load balancer") + private String projectId; + + @SerializedName(ApiConstants.PROJECT) @Param(description="the project name of the load balancer") + private String projectName; + + @SerializedName(ApiConstants.DOMAIN_ID) + @Param(description = "the domain ID of the load balancer rule") + private String domainId; + + @SerializedName(ApiConstants.DOMAIN) + @Param(description = "the domain of the load balancer rule") + private String domainName; + + public void setRegionIdId(Integer regionId) { + this.regionId = regionId; + } + + public void setId(String id) { + this.id = id; + } + + public void setName(String name) { + this.name = name; + } + + public void setDescription(String description) { + this.description = description; + } + + public void setAlgorithm(String algorithm) { + this.algorithm = algorithm; + } + + public void setStickyMethod(String stickyMethod) { + this.stickyMethod = stickyMethod; + } + + public void setServiceType(String serviceType) { + this.serviceType = serviceType; + } + + public void setServiceDomainName(String domainName) { + this.gslbDomainName = domainName; + } + + public void setAccountName(String accountName) { + this.accountName = accountName; + } + + @Override + public void setProjectId(String projectId) { + this.projectId = projectId; + } + + @Override + public void setProjectName(String projectName) { + this.projectName = projectName; + } + + @Override + public void setDomainId(String domainId) { + this.domainId = domainId; + } + + public void setDomainName(String domainName) { + this.domainName = domainName; + } +} diff --git a/api/src/org/apache/cloudstack/api/response/GuestOSCategoryResponse.java b/api/src/org/apache/cloudstack/api/response/GuestOSCategoryResponse.java index a14ce59f9..eab6bbac6 100644 --- a/api/src/org/apache/cloudstack/api/response/GuestOSCategoryResponse.java +++ b/api/src/org/apache/cloudstack/api/response/GuestOSCategoryResponse.java @@ -16,13 +16,14 @@ // under the License. package org.apache.cloudstack.api.response; -import com.cloud.storage.GuestOsCategory; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.serializer.Param; +import com.cloud.storage.GuestOsCategory; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=GuestOsCategory.class) public class GuestOSCategoryResponse extends BaseResponse { @SerializedName(ApiConstants.ID) @Param(description="the ID of the OS category") diff --git a/api/src/org/apache/cloudstack/api/response/GuestOSResponse.java b/api/src/org/apache/cloudstack/api/response/GuestOSResponse.java index 0bc5dd295..af3aea92c 100644 --- a/api/src/org/apache/cloudstack/api/response/GuestOSResponse.java +++ b/api/src/org/apache/cloudstack/api/response/GuestOSResponse.java @@ -16,13 +16,14 @@ // under the License. package org.apache.cloudstack.api.response; -import com.cloud.storage.GuestOS; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.serializer.Param; +import com.cloud.storage.GuestOS; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=GuestOS.class) public class GuestOSResponse extends BaseResponse { @SerializedName(ApiConstants.ID) @Param(description="the ID of the OS type") diff --git a/api/src/org/apache/cloudstack/api/response/HostResponse.java b/api/src/org/apache/cloudstack/api/response/HostResponse.java index 35b07dda8..f5aa8f90a 100644 --- a/api/src/org/apache/cloudstack/api/response/HostResponse.java +++ b/api/src/org/apache/cloudstack/api/response/HostResponse.java @@ -19,13 +19,14 @@ import java.util.Date; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; + import com.cloud.host.Host; import com.cloud.host.Status; import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; -import org.apache.cloudstack.api.EntityReference; @EntityReference(value=Host.class) public class HostResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/HypervisorCapabilitiesResponse.java b/api/src/org/apache/cloudstack/api/response/HypervisorCapabilitiesResponse.java index 44e0513e3..360218761 100644 --- a/api/src/org/apache/cloudstack/api/response/HypervisorCapabilitiesResponse.java +++ b/api/src/org/apache/cloudstack/api/response/HypervisorCapabilitiesResponse.java @@ -16,13 +16,14 @@ // under the License. package org.apache.cloudstack.api.response; -import com.cloud.hypervisor.HypervisorCapabilities; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; + import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.hypervisor.HypervisorCapabilities; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; -import org.apache.cloudstack.api.EntityReference; @EntityReference(value=HypervisorCapabilities.class) public class HypervisorCapabilitiesResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/HypervisorResponse.java b/api/src/org/apache/cloudstack/api/response/HypervisorResponse.java index 382853974..8bfb15e15 100644 --- a/api/src/org/apache/cloudstack/api/response/HypervisorResponse.java +++ b/api/src/org/apache/cloudstack/api/response/HypervisorResponse.java @@ -17,9 +17,10 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class HypervisorResponse extends BaseResponse { @SerializedName(ApiConstants.NAME) @Param(description="Hypervisor name") diff --git a/api/src/org/apache/cloudstack/api/response/IPAddressResponse.java b/api/src/org/apache/cloudstack/api/response/IPAddressResponse.java index 4d18aef55..cede84f93 100644 --- a/api/src/org/apache/cloudstack/api/response/IPAddressResponse.java +++ b/api/src/org/apache/cloudstack/api/response/IPAddressResponse.java @@ -19,13 +19,14 @@ import java.util.Date; import java.util.List; -import com.cloud.network.IpAddress; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.IpAddress; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=IpAddress.class) @SuppressWarnings("unused") public class IPAddressResponse extends BaseResponse implements ControlledEntityResponse { @@ -81,6 +82,10 @@ public class IPAddressResponse extends BaseResponse implements ControlledEntityR @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) @Param(description="virutal machine id the ip address is assigned to (not null only for static nat Ip)") private String virtualMachineId; + @SerializedName("vmipaddress") @Param(description="virutal machine (dnat) ip address (not null only for static nat Ip)") + private String virtualMachineIp; + + @SerializedName("virtualmachinename") @Param(description="virutal machine name the ip address is assigned to (not null only for static nat Ip)") private String virtualMachineName; @@ -184,6 +189,10 @@ public void setVirtualMachineId(String virtualMachineId) { this.virtualMachineId = virtualMachineId; } + public void setVirtualMachineIp(String virtualMachineIp) { + this.virtualMachineIp = virtualMachineIp; + } + public void setVirtualMachineName(String virtualMachineName) { this.virtualMachineName = virtualMachineName; } diff --git a/api/src/org/apache/cloudstack/api/response/InstanceGroupResponse.java b/api/src/org/apache/cloudstack/api/response/InstanceGroupResponse.java index 24706ab09..b04f2b8c2 100644 --- a/api/src/org/apache/cloudstack/api/response/InstanceGroupResponse.java +++ b/api/src/org/apache/cloudstack/api/response/InstanceGroupResponse.java @@ -21,8 +21,9 @@ import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; -import com.cloud.vm.InstanceGroup; + import com.cloud.serializer.Param; +import com.cloud.vm.InstanceGroup; import com.google.gson.annotations.SerializedName; @SuppressWarnings("unused") diff --git a/api/src/org/apache/cloudstack/api/response/IpForwardingRuleResponse.java b/api/src/org/apache/cloudstack/api/response/IpForwardingRuleResponse.java index 93c86c313..d6a42f776 100644 --- a/api/src/org/apache/cloudstack/api/response/IpForwardingRuleResponse.java +++ b/api/src/org/apache/cloudstack/api/response/IpForwardingRuleResponse.java @@ -17,9 +17,10 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class IpForwardingRuleResponse extends BaseResponse { @SerializedName(ApiConstants.ID) @Param(description="the ID of the port forwarding rule") diff --git a/api/src/org/apache/cloudstack/api/response/IsoVmResponse.java b/api/src/org/apache/cloudstack/api/response/IsoVmResponse.java index a667e50c5..14803d598 100644 --- a/api/src/org/apache/cloudstack/api/response/IsoVmResponse.java +++ b/api/src/org/apache/cloudstack/api/response/IsoVmResponse.java @@ -16,9 +16,10 @@ // under the License. package org.apache.cloudstack.api.response; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class IsoVmResponse extends BaseResponse { @SerializedName("id") @Param(description="the ISO ID") diff --git a/api/src/org/apache/cloudstack/api/response/LBHealthCheckPolicyResponse.java b/api/src/org/apache/cloudstack/api/response/LBHealthCheckPolicyResponse.java new file mode 100644 index 000000000..5dd123c03 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/response/LBHealthCheckPolicyResponse.java @@ -0,0 +1,98 @@ +// 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 org.apache.cloudstack.api.response; + +import com.cloud.network.rules.HealthCheckPolicy; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; +import org.apache.cloudstack.api.BaseResponse; + +public class LBHealthCheckPolicyResponse extends BaseResponse { + @SerializedName("id") + @Param(description = "the LB HealthCheck policy ID") + private String id; + + @SerializedName("pingpath") + @Param(description = "the pingpath of the healthcheck policy") + private String pingpath; + + @SerializedName("description") + @Param(description = "the description of the healthcheck policy") + private String description; + + @SerializedName("state") + @Param(description = "the state of the policy") + private String state; + + @SerializedName("responsetime") + @Param(description = "Time to wait when receiving a response from the health check") + private int responseTime; + + @SerializedName("healthcheckinterval") + @Param(description = "Amount of time between health checks") + private int healthcheckInterval; + + @SerializedName("healthcheckthresshold") + @Param(description = "Number of consecutive health check success before declaring an instance healthy") + private int healthcheckthresshold; + + @SerializedName("unhealthcheckthresshold") + @Param(description = "Number of consecutive health check failures before declaring an instance unhealthy.") + private int unhealthcheckthresshold; + + public void setId(String id) { + this.id = id; + } + + public String getpingpath() { + return pingpath; + } + + public void setpingpath(String pingpath) { + this.pingpath = pingpath; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + + public LBHealthCheckPolicyResponse(HealthCheckPolicy healthcheckpolicy) { + if (healthcheckpolicy.isRevoke()) { + this.setState("Revoked"); + } + if (healthcheckpolicy.getUuid() != null) + setId(healthcheckpolicy.getUuid()); + this.pingpath = healthcheckpolicy.getpingpath(); + this.healthcheckInterval = healthcheckpolicy.getHealthcheckInterval(); + this.responseTime = healthcheckpolicy.getResponseTime(); + this.healthcheckthresshold = healthcheckpolicy.getHealthcheckThresshold(); + this.unhealthcheckthresshold = healthcheckpolicy.getUnhealthThresshold(); + setObjectName("healthcheckpolicy"); + } +} diff --git a/api/src/org/apache/cloudstack/api/response/LBHealthCheckResponse.java b/api/src/org/apache/cloudstack/api/response/LBHealthCheckResponse.java new file mode 100644 index 000000000..182013ffe --- /dev/null +++ b/api/src/org/apache/cloudstack/api/response/LBHealthCheckResponse.java @@ -0,0 +1,102 @@ +// 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 org.apache.cloudstack.api.response; + +import com.cloud.network.rules.HealthCheckPolicy; +import org.apache.cloudstack.api.ApiConstants; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; + +import java.util.List; +import java.util.UUID; + +@EntityReference(value=HealthCheckPolicy.class) +public class LBHealthCheckResponse extends BaseResponse { +@SerializedName("lbruleid") + @Param(description = "the LB rule ID") + private String lbRuleId; + + + @SerializedName("account") + @Param(description = "the account of the HealthCheck policy") + private String accountName; + + @SerializedName(ApiConstants.DOMAIN_ID) + @Param(description = "the domain ID of the HealthCheck policy") + private String domainId; + + @SerializedName("domain") + @Param(description = "the domain of the HealthCheck policy") + private String domainName; + + @SerializedName(ApiConstants.ZONE_ID) + @Param(description = "the id of the zone the HealthCheck policy belongs to") + private String zoneId; + + @SerializedName("healthcheckpolicy") + @Param(description = "the list of healthcheckpolicies", responseObject = LBHealthCheckPolicyResponse.class) + private List healthCheckPolicies; + + public void setlbRuleId(String lbRuleId) { + this.lbRuleId = lbRuleId; + } + + public void setRules(List policies) { + this.healthCheckPolicies = policies; + } + + public List getHealthCheckPolicies() { + return healthCheckPolicies; + } + + public void setHealthCheckPolicies(List healthCheckPolicies) { + this.healthCheckPolicies = healthCheckPolicies; + } + + public String getAccountName() { + return accountName; + } + + public void setAccountName(String accountName) { + this.accountName = accountName; + } + + public void setDomainId(String domainId) { + this.domainId = domainId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getDomainName() { + return domainName; + } + + public void setDomainName(String domainName) { + this.domainName = domainName; + } + + public LBHealthCheckResponse() { + } + + public LBHealthCheckResponse(HealthCheckPolicy healthcheckpolicy) { + setObjectName("healthcheckpolicy"); + } +} diff --git a/api/src/org/apache/cloudstack/api/response/LBStickinessPolicyResponse.java b/api/src/org/apache/cloudstack/api/response/LBStickinessPolicyResponse.java index 0eb4d58d5..626d0ea46 100644 --- a/api/src/org/apache/cloudstack/api/response/LBStickinessPolicyResponse.java +++ b/api/src/org/apache/cloudstack/api/response/LBStickinessPolicyResponse.java @@ -16,15 +16,16 @@ // under the License. package org.apache.cloudstack.api.response; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.network.rules.StickinessPolicy; import com.cloud.serializer.Param; import com.cloud.utils.Pair; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; - -import java.util.List; -import java.util.Map; -import java.util.HashMap; public class LBStickinessPolicyResponse extends BaseResponse { @SerializedName("id") diff --git a/api/src/org/apache/cloudstack/api/response/LBStickinessResponse.java b/api/src/org/apache/cloudstack/api/response/LBStickinessResponse.java index 7887e7c43..cd44aa749 100644 --- a/api/src/org/apache/cloudstack/api/response/LBStickinessResponse.java +++ b/api/src/org/apache/cloudstack/api/response/LBStickinessResponse.java @@ -16,14 +16,15 @@ // under the License. package org.apache.cloudstack.api.response; -import com.cloud.network.rules.StickinessPolicy; +import java.util.List; + import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; -import java.util.List; +import com.cloud.network.rules.StickinessPolicy; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; @EntityReference(value=StickinessPolicy.class) public class LBStickinessResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/LDAPConfigResponse.java b/api/src/org/apache/cloudstack/api/response/LDAPConfigResponse.java index e851e38e2..bbeec630d 100644 --- a/api/src/org/apache/cloudstack/api/response/LDAPConfigResponse.java +++ b/api/src/org/apache/cloudstack/api/response/LDAPConfigResponse.java @@ -17,9 +17,10 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class LDAPConfigResponse extends BaseResponse { @@ -29,7 +30,7 @@ public class LDAPConfigResponse extends BaseResponse { @SerializedName(ApiConstants.PORT) @Param(description="Specify the LDAP port if required, default is 389") private String port; - @SerializedName(ApiConstants.PORT) @Param(description="Check Use SSL if the external LDAP server is configured for LDAP over SSL") + @SerializedName(ApiConstants.USE_SSL) @Param(description="Check Use SSL if the external LDAP server is configured for LDAP over SSL") private String useSSL; @SerializedName(ApiConstants.SEARCH_BASE) @Param(description="The search base defines the starting point for the search in the directory tree Example: dc=cloud,dc=com") diff --git a/api/src/org/apache/cloudstack/api/response/LoadBalancerResponse.java b/api/src/org/apache/cloudstack/api/response/LoadBalancerResponse.java index bd5efdba1..79b01b17f 100644 --- a/api/src/org/apache/cloudstack/api/response/LoadBalancerResponse.java +++ b/api/src/org/apache/cloudstack/api/response/LoadBalancerResponse.java @@ -19,9 +19,10 @@ import java.util.List; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; @SuppressWarnings("unused") public class LoadBalancerResponse extends BaseResponse implements ControlledEntityResponse { diff --git a/api/src/org/apache/cloudstack/api/response/NetworkACLResponse.java b/api/src/org/apache/cloudstack/api/response/NetworkACLResponse.java index e16a1a5a4..b45b43cf6 100644 --- a/api/src/org/apache/cloudstack/api/response/NetworkACLResponse.java +++ b/api/src/org/apache/cloudstack/api/response/NetworkACLResponse.java @@ -19,9 +19,10 @@ import java.util.List; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; @SuppressWarnings("unused") public class NetworkACLResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/NetworkDeviceResponse.java b/api/src/org/apache/cloudstack/api/response/NetworkDeviceResponse.java index dc67b53e1..8eb3987ef 100644 --- a/api/src/org/apache/cloudstack/api/response/NetworkDeviceResponse.java +++ b/api/src/org/apache/cloudstack/api/response/NetworkDeviceResponse.java @@ -17,9 +17,10 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class NetworkDeviceResponse extends BaseResponse { @SerializedName(ApiConstants.ID) diff --git a/api/src/org/apache/cloudstack/api/response/NetworkOfferingResponse.java b/api/src/org/apache/cloudstack/api/response/NetworkOfferingResponse.java index 5c1479105..b1dcd4231 100644 --- a/api/src/org/apache/cloudstack/api/response/NetworkOfferingResponse.java +++ b/api/src/org/apache/cloudstack/api/response/NetworkOfferingResponse.java @@ -19,13 +19,14 @@ import java.util.Date; import java.util.List; -import com.cloud.offering.NetworkOffering; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.offering.NetworkOffering; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=NetworkOffering.class) @SuppressWarnings("unused") public class NetworkOfferingResponse extends BaseResponse { @@ -80,6 +81,8 @@ public class NetworkOfferingResponse extends BaseResponse { @SerializedName(ApiConstants.FOR_VPC) @Param(description="true if network offering can be used by VPC networks only") private Boolean forVpc; + @SerializedName(ApiConstants.IS_PERSISTENT) @Param(description="true if network offering supports persistent networks, false otherwise") + private Boolean isPersistent; public void setId(String id) { this.id = id; @@ -149,4 +152,9 @@ public void setSpecifyIpRanges(Boolean specifyIpRanges) { public void setForVpc(Boolean forVpc) { this.forVpc = forVpc; } + + public void setIsPersistent(Boolean isPersistent) { + this.isPersistent = isPersistent; + } + } diff --git a/api/src/org/apache/cloudstack/api/response/NetworkResponse.java b/api/src/org/apache/cloudstack/api/response/NetworkResponse.java index ba8ea3277..cd32dede3 100644 --- a/api/src/org/apache/cloudstack/api/response/NetworkResponse.java +++ b/api/src/org/apache/cloudstack/api/response/NetworkResponse.java @@ -18,10 +18,11 @@ import java.util.List; -import com.cloud.network.Network; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; + +import com.cloud.network.Network; import com.cloud.projects.ProjectAccount; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; @@ -51,9 +52,15 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes @SerializedName(ApiConstants.NETMASK) @Param(description="the network's netmask") private String netmask; - @SerializedName(ApiConstants.CIDR) @Param(description="the cidr the network") + @SerializedName(ApiConstants.CIDR) @Param(description="Cloudstack managed address space, all CloudStack managed VMs get IP address from CIDR") private String cidr; + @SerializedName(ApiConstants.NETWORK_CIDR) @Param(description="the network CIDR of the guest network configured with IP reservation. It is the summation of CIDR and RESERVED_IP_RANGE") + private String networkCidr; + + @SerializedName(ApiConstants.RESERVED_IP_RANGE) @Param(description="the network's IP range not to be used by CloudStack guest VMs and can be used for non CloudStack purposes") + private String reservedIpRange; + @SerializedName(ApiConstants.ZONE_ID) @Param(description="zone id of the network") private String zoneId; @@ -141,6 +148,9 @@ public class NetworkResponse extends BaseResponse implements ControlledEntityRes @SerializedName(ApiConstants.CAN_USE_FOR_DEPLOY) @Param(description="list networks available for vm deployment") private Boolean canUseForDeploy; + @SerializedName(ApiConstants.IS_PERSISTENT) @Param(description="list networks that are persistent") + private Boolean isPersistent; + @SerializedName(ApiConstants.TAGS) @Param(description="the list of resource tags associated with network", responseObject = ResourceTagResponse.class) private List tags; @@ -285,6 +295,14 @@ public void setCidr(String cidr) { this.cidr = cidr; } + public void setNetworkCidr(String networkCidr) { + this.networkCidr = networkCidr; + } + + public void setReservedIpRange(String reservedIpRange) { + this.reservedIpRange = reservedIpRange; + } + public void setRestartRequired(Boolean restartRequired) { this.restartRequired = restartRequired; } @@ -301,6 +319,10 @@ public void setCanUseForDeploy(Boolean canUseForDeploy) { this.canUseForDeploy = canUseForDeploy; } + public void setIsPersistent(Boolean isPersistent) { + this.isPersistent = isPersistent; + } + public void setTags(List tags) { this.tags = tags; } diff --git a/api/src/org/apache/cloudstack/api/response/NicResponse.java b/api/src/org/apache/cloudstack/api/response/NicResponse.java index 36cf5065b..a1ceaf637 100644 --- a/api/src/org/apache/cloudstack/api/response/NicResponse.java +++ b/api/src/org/apache/cloudstack/api/response/NicResponse.java @@ -16,7 +16,13 @@ // under the License. package org.apache.cloudstack.api.response; +import java.util.List; + import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; import com.cloud.vm.Nic; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; @@ -71,7 +77,10 @@ public class NicResponse extends BaseResponse { @SerializedName(ApiConstants.IP6_ADDRESS) @Param(description="the IPv6 address of network") private String ip6Address; - + + @SerializedName("secondaryip") @Param(description="the Secondary ipv4 addr of nic") + private List secondaryIps; + public String getId() { return id; } @@ -124,7 +133,7 @@ public void setIsDefault(Boolean isDefault) { public void setMacAddress(String macAddress) { this.macAddress = macAddress; } - + public void setIp6Gateway(String ip6Gateway) { this.ip6Gateway = ip6Gateway; } @@ -163,4 +172,9 @@ public boolean equals(Object obj) { return false; return true; } + + public void setSecondaryIps(List ipList) { + this.secondaryIps = ipList; + } + } diff --git a/api/src/org/apache/cloudstack/api/response/NicSecondaryIpResponse.java b/api/src/org/apache/cloudstack/api/response/NicSecondaryIpResponse.java new file mode 100644 index 000000000..695468fae --- /dev/null +++ b/api/src/org/apache/cloudstack/api/response/NicSecondaryIpResponse.java @@ -0,0 +1,95 @@ +// 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 org.apache.cloudstack.api.response; +import java.util.Date; +import java.util.List; + +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; + +import com.cloud.network.rules.FirewallRule; +import com.cloud.serializer.Param; +import com.cloud.vm.NicSecondaryIp; +import com.google.gson.annotations.SerializedName; + +@EntityReference(value=NicSecondaryIp.class) +@SuppressWarnings("unused") +public class NicSecondaryIpResponse extends BaseResponse { + + @SerializedName(ApiConstants.ID) @Param(description="the ID of the secondary private IP addr") + private String id; + + @SerializedName(ApiConstants.IP_ADDRESS) @Param(description="Secondary IP address") + private String ipAddr; + + @SerializedName(ApiConstants.NIC_ID) @Param(description="the ID of the nic") + private String nicId; + + @SerializedName(ApiConstants.NETWORK_ID) @Param(description="the ID of the network") + private String nwId; + + @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) @Param(description="the ID of the vm") + private String vmId; + + @Override + public String getObjectId() { + return this.getId(); + } + + public String getId() { + return id; + } + + public String getIpAddr() { + return ipAddr; + } + + public void setIpAddr(String ipAddr) { + this.ipAddr = ipAddr; + } + + public String getNicId() { + return nicId; + } + + public void setNicId(String string) { + this.nicId = string; + } + + public String getNwId() { + return nwId; + } + + public void setNwId(String nwId) { + this.nwId = nwId; + } + + public String getVmId() { + return vmId; + } + + public void setVmId(String vmId) { + this.vmId = vmId; + } + + public void setId(String id) { + this.id = id; + } + + +} diff --git a/api/src/org/apache/cloudstack/api/response/PhysicalNetworkResponse.java b/api/src/org/apache/cloudstack/api/response/PhysicalNetworkResponse.java index 78257b1bd..1f93b468d 100644 --- a/api/src/org/apache/cloudstack/api/response/PhysicalNetworkResponse.java +++ b/api/src/org/apache/cloudstack/api/response/PhysicalNetworkResponse.java @@ -18,13 +18,14 @@ import java.util.List; -import com.cloud.network.PhysicalNetwork; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.PhysicalNetwork; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=PhysicalNetwork.class) @SuppressWarnings("unused") public class PhysicalNetworkResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/PodResponse.java b/api/src/org/apache/cloudstack/api/response/PodResponse.java index 71192796b..f31c28921 100644 --- a/api/src/org/apache/cloudstack/api/response/PodResponse.java +++ b/api/src/org/apache/cloudstack/api/response/PodResponse.java @@ -19,12 +19,12 @@ import java.util.List; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; import com.cloud.dc.Pod; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; @EntityReference(value = Pod.class) public class PodResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/PrivateGatewayResponse.java b/api/src/org/apache/cloudstack/api/response/PrivateGatewayResponse.java index 37c96ff6a..4123477db 100644 --- a/api/src/org/apache/cloudstack/api/response/PrivateGatewayResponse.java +++ b/api/src/org/apache/cloudstack/api/response/PrivateGatewayResponse.java @@ -15,13 +15,14 @@ // specific language governing permissions and limitations // under the License. package org.apache.cloudstack.api.response; -import com.cloud.network.vpc.VpcGateway; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.vpc.VpcGateway; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=VpcGateway.class) @SuppressWarnings("unused") public class PrivateGatewayResponse extends BaseResponse implements ControlledEntityResponse{ diff --git a/api/src/org/apache/cloudstack/api/response/ProjectAccountResponse.java b/api/src/org/apache/cloudstack/api/response/ProjectAccountResponse.java index 134841caf..cb69ee59c 100644 --- a/api/src/org/apache/cloudstack/api/response/ProjectAccountResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ProjectAccountResponse.java @@ -18,13 +18,14 @@ import java.util.List; -import com.cloud.projects.ProjectAccount; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.projects.ProjectAccount; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=ProjectAccount.class) @SuppressWarnings("unused") public class ProjectAccountResponse extends BaseResponse implements ControlledViewEntityResponse { diff --git a/api/src/org/apache/cloudstack/api/response/ProjectInvitationResponse.java b/api/src/org/apache/cloudstack/api/response/ProjectInvitationResponse.java index 0c9ce685b..1ece6900d 100644 --- a/api/src/org/apache/cloudstack/api/response/ProjectInvitationResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ProjectInvitationResponse.java @@ -16,13 +16,14 @@ // under the License. package org.apache.cloudstack.api.response; -import com.cloud.projects.ProjectInvitation; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.projects.ProjectInvitation; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=ProjectInvitation.class) @SuppressWarnings("unused") public class ProjectInvitationResponse extends BaseResponse implements ControlledViewEntityResponse{ diff --git a/api/src/org/apache/cloudstack/api/response/ProjectResponse.java b/api/src/org/apache/cloudstack/api/response/ProjectResponse.java index 7ecda2348..cff27e54d 100644 --- a/api/src/org/apache/cloudstack/api/response/ProjectResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ProjectResponse.java @@ -19,13 +19,14 @@ import java.util.ArrayList; import java.util.List; -import com.cloud.projects.Project; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.projects.Project; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=Project.class) @SuppressWarnings("unused") public class ProjectResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/ProviderResponse.java b/api/src/org/apache/cloudstack/api/response/ProviderResponse.java index b83c23483..fd0994959 100644 --- a/api/src/org/apache/cloudstack/api/response/ProviderResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ProviderResponse.java @@ -18,13 +18,14 @@ import java.util.List; -import com.cloud.network.PhysicalNetworkServiceProvider; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.PhysicalNetworkServiceProvider; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=PhysicalNetworkServiceProvider.class) @SuppressWarnings("unused") public class ProviderResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/RegionResponse.java b/api/src/org/apache/cloudstack/api/response/RegionResponse.java new file mode 100644 index 000000000..f8bfe53aa --- /dev/null +++ b/api/src/org/apache/cloudstack/api/response/RegionResponse.java @@ -0,0 +1,62 @@ +// 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 org.apache.cloudstack.api.response; + +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; +import org.apache.cloudstack.region.Region; + +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + +@EntityReference(value = Region.class) +public class RegionResponse extends BaseResponse { + @SerializedName(ApiConstants.ID) @Param(description="the ID of the region") + private Integer id; + + @SerializedName(ApiConstants.NAME) @Param(description="the name of the region") + private String name; + + @SerializedName(ApiConstants.END_POINT) @Param(description="the end point of the region") + private String endPoint; + + public Integer getId() { + return id; + } + + public void setId(Integer id) { + this.id = id; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getEndPoint() { + return endPoint; + } + + public void setEndPoint(String endPoint) { + this.endPoint = endPoint; + } + + } diff --git a/api/src/org/apache/cloudstack/api/response/RegisterResponse.java b/api/src/org/apache/cloudstack/api/response/RegisterResponse.java index eee924940..c2bd2b5bf 100644 --- a/api/src/org/apache/cloudstack/api/response/RegisterResponse.java +++ b/api/src/org/apache/cloudstack/api/response/RegisterResponse.java @@ -16,9 +16,10 @@ // under the License. package org.apache.cloudstack.api.response; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class RegisterResponse extends BaseResponse { @SerializedName("apikey") @Param(description="the api key of the registered user") diff --git a/api/src/org/apache/cloudstack/api/response/RemoteAccessVpnResponse.java b/api/src/org/apache/cloudstack/api/response/RemoteAccessVpnResponse.java index 3fd7d7a66..5e08bca6a 100644 --- a/api/src/org/apache/cloudstack/api/response/RemoteAccessVpnResponse.java +++ b/api/src/org/apache/cloudstack/api/response/RemoteAccessVpnResponse.java @@ -16,13 +16,14 @@ // under the License. package org.apache.cloudstack.api.response; -import com.cloud.network.RemoteAccessVpn; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.RemoteAccessVpn; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=RemoteAccessVpn.class) @SuppressWarnings("unused") public class RemoteAccessVpnResponse extends BaseResponse implements ControlledEntityResponse{ @@ -56,6 +57,9 @@ public class RemoteAccessVpnResponse extends BaseResponse implements ControlledE @SerializedName(ApiConstants.STATE) @Param(description="the state of the rule") private String state; + + @SerializedName(ApiConstants.ID) @Param(description="the id of the remote access vpn") + private String id; public void setPublicIp(String publicIp) { this.publicIp = publicIp; @@ -99,5 +103,9 @@ public void setProjectId(String projectId) { public void setProjectName(String projectName) { this.projectName = projectName; } + + public void setId(String id) { + this.id = id; + } } diff --git a/api/src/org/apache/cloudstack/api/response/ResourceCountResponse.java b/api/src/org/apache/cloudstack/api/response/ResourceCountResponse.java index 7a291945f..842eaa670 100644 --- a/api/src/org/apache/cloudstack/api/response/ResourceCountResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ResourceCountResponse.java @@ -17,9 +17,10 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; @SuppressWarnings("unused") public class ResourceCountResponse extends BaseResponse implements ControlledEntityResponse{ @@ -39,7 +40,7 @@ public class ResourceCountResponse extends BaseResponse implements ControlledEnt @SerializedName(ApiConstants.DOMAIN) @Param(description="the domain name for which resource count's are updated") private String domainName; - @SerializedName(ApiConstants.RESOURCE_TYPE) @Param(description="resource type. Values include 0, 1, 2, 3, 4. See the resourceType parameter for more information on these values.") + @SerializedName(ApiConstants.RESOURCE_TYPE) @Param(description="resource type. Values include 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11. See the resourceType parameter for more information on these values.") private String resourceType; @SerializedName("resourcecount") @Param(description="resource count") diff --git a/api/src/org/apache/cloudstack/api/response/ResourceLimitResponse.java b/api/src/org/apache/cloudstack/api/response/ResourceLimitResponse.java index c01e12f2e..e7735f5c0 100644 --- a/api/src/org/apache/cloudstack/api/response/ResourceLimitResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ResourceLimitResponse.java @@ -16,13 +16,14 @@ // under the License. package org.apache.cloudstack.api.response; -import com.cloud.configuration.ResourceLimit; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.configuration.ResourceLimit; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value = ResourceLimit.class) @SuppressWarnings("unused") public class ResourceLimitResponse extends BaseResponse implements ControlledEntityResponse { @@ -35,7 +36,7 @@ public class ResourceLimitResponse extends BaseResponse implements ControlledEnt @SerializedName(ApiConstants.DOMAIN) @Param(description="the domain name of the resource limit") private String domainName; - @SerializedName(ApiConstants.RESOURCE_TYPE) @Param(description="resource type. Values include 0, 1, 2, 3, 4. See the resourceType parameter for more information on these values.") + @SerializedName(ApiConstants.RESOURCE_TYPE) @Param(description="resource type. Values include 0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11. See the resourceType parameter for more information on these values.") private String resourceType; @SerializedName("max") @Param(description="the maximum number of the resource. A -1 means the resource currently has no limit.") diff --git a/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java b/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java index 30bcbfd38..47b06250a 100644 --- a/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ResourceTagResponse.java @@ -17,9 +17,10 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; @SuppressWarnings("unused") public class ResourceTagResponse extends BaseResponse implements ControlledViewEntityResponse{ diff --git a/api/src/org/apache/cloudstack/api/response/S3Response.java b/api/src/org/apache/cloudstack/api/response/S3Response.java index 4dab2175a..259a3088c 100644 --- a/api/src/org/apache/cloudstack/api/response/S3Response.java +++ b/api/src/org/apache/cloudstack/api/response/S3Response.java @@ -18,11 +18,20 @@ */ package org.apache.cloudstack.api.response; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; +import static org.apache.cloudstack.api.ApiConstants.ID; +import static org.apache.cloudstack.api.ApiConstants.S3_ACCESS_KEY; +import static org.apache.cloudstack.api.ApiConstants.S3_BUCKET_NAME; +import static org.apache.cloudstack.api.ApiConstants.S3_CONNECTION_TIMEOUT; +import static org.apache.cloudstack.api.ApiConstants.S3_END_POINT; +import static org.apache.cloudstack.api.ApiConstants.S3_HTTPS_FLAG; +import static org.apache.cloudstack.api.ApiConstants.S3_MAX_ERROR_RETRY; +import static org.apache.cloudstack.api.ApiConstants.S3_SECRET_KEY; +import static org.apache.cloudstack.api.ApiConstants.S3_SOCKET_TIMEOUT; + import org.apache.cloudstack.api.BaseResponse; -import static org.apache.cloudstack.api.ApiConstants.*; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; public class S3Response extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/SSHKeyPairResponse.java b/api/src/org/apache/cloudstack/api/response/SSHKeyPairResponse.java index 606636382..2791853d4 100644 --- a/api/src/org/apache/cloudstack/api/response/SSHKeyPairResponse.java +++ b/api/src/org/apache/cloudstack/api/response/SSHKeyPairResponse.java @@ -17,9 +17,10 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class SSHKeyPairResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/SecurityGroupResponse.java b/api/src/org/apache/cloudstack/api/response/SecurityGroupResponse.java index f3b9beb8d..96a8bc28e 100644 --- a/api/src/org/apache/cloudstack/api/response/SecurityGroupResponse.java +++ b/api/src/org/apache/cloudstack/api/response/SecurityGroupResponse.java @@ -17,11 +17,13 @@ package org.apache.cloudstack.api.response; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.Set; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; + import com.cloud.network.security.SecurityGroup; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; @@ -64,9 +66,9 @@ public class SecurityGroupResponse extends BaseResponse implements ControlledVie private Set tags; public SecurityGroupResponse(){ - this.ingressRules = new HashSet(); - this.egressRules = new HashSet(); - this.tags = new HashSet(); + this.ingressRules = new LinkedHashSet(); + this.egressRules = new LinkedHashSet(); + this.tags = new LinkedHashSet(); } diff --git a/api/src/org/apache/cloudstack/api/response/SecurityGroupRuleResponse.java b/api/src/org/apache/cloudstack/api/response/SecurityGroupRuleResponse.java index 19aaa4594..5aeee6f06 100644 --- a/api/src/org/apache/cloudstack/api/response/SecurityGroupRuleResponse.java +++ b/api/src/org/apache/cloudstack/api/response/SecurityGroupRuleResponse.java @@ -17,11 +17,12 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; + import com.cloud.network.security.SecurityGroupRules; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; @EntityReference(value = SecurityGroupRules.class) public class SecurityGroupRuleResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java b/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java index 7a10f7f76..f35e87e3b 100644 --- a/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ServiceOfferingResponse.java @@ -18,13 +18,14 @@ import java.util.Date; -import com.cloud.offering.ServiceOffering; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.offering.ServiceOffering; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value = ServiceOffering.class) public class ServiceOfferingResponse extends BaseResponse { @SerializedName("id") @Param(description="the id of the service offering") diff --git a/api/src/org/apache/cloudstack/api/response/ServiceResponse.java b/api/src/org/apache/cloudstack/api/response/ServiceResponse.java index 11f7d7103..c93c55ee1 100644 --- a/api/src/org/apache/cloudstack/api/response/ServiceResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ServiceResponse.java @@ -16,20 +16,20 @@ // under the License. package org.apache.cloudstack.api.response; -import java.util.List; - -import org.apache.cloudstack.api.ApiConstants; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; +import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseResponse; +import java.util.List; + @SuppressWarnings("unused") public class ServiceResponse extends BaseResponse { @SerializedName(ApiConstants.NAME) @Param(description="the service name") private String name; - @SerializedName(ApiConstants.PROVIDER) @Param(description="the service provider name") + @SerializedName(ApiConstants.PROVIDER) @Param(description="the service provider name", responseObject = ProviderResponse.class) private List providers; @SerializedName("capability") @Param(description="the list of capabilities", responseObject = CapabilityResponse.class) diff --git a/api/src/org/apache/cloudstack/api/response/Site2SiteCustomerGatewayResponse.java b/api/src/org/apache/cloudstack/api/response/Site2SiteCustomerGatewayResponse.java index d164580bd..dbaa45116 100644 --- a/api/src/org/apache/cloudstack/api/response/Site2SiteCustomerGatewayResponse.java +++ b/api/src/org/apache/cloudstack/api/response/Site2SiteCustomerGatewayResponse.java @@ -18,13 +18,14 @@ import java.util.Date; -import com.cloud.network.Site2SiteCustomerGateway; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.Site2SiteCustomerGateway; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=Site2SiteCustomerGateway.class) @SuppressWarnings("unused") public class Site2SiteCustomerGatewayResponse extends BaseResponse implements ControlledEntityResponse { diff --git a/api/src/org/apache/cloudstack/api/response/Site2SiteVpnConnectionResponse.java b/api/src/org/apache/cloudstack/api/response/Site2SiteVpnConnectionResponse.java index c398116a9..99075b5f2 100644 --- a/api/src/org/apache/cloudstack/api/response/Site2SiteVpnConnectionResponse.java +++ b/api/src/org/apache/cloudstack/api/response/Site2SiteVpnConnectionResponse.java @@ -18,13 +18,14 @@ import java.util.Date; -import com.cloud.network.Site2SiteVpnConnection; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.Site2SiteVpnConnection; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=Site2SiteVpnConnection.class) @SuppressWarnings("unused") public class Site2SiteVpnConnectionResponse extends BaseResponse implements ControlledEntityResponse { diff --git a/api/src/org/apache/cloudstack/api/response/Site2SiteVpnGatewayResponse.java b/api/src/org/apache/cloudstack/api/response/Site2SiteVpnGatewayResponse.java index 8cb06fc8a..06dbf370c 100644 --- a/api/src/org/apache/cloudstack/api/response/Site2SiteVpnGatewayResponse.java +++ b/api/src/org/apache/cloudstack/api/response/Site2SiteVpnGatewayResponse.java @@ -18,13 +18,14 @@ import java.util.Date; -import com.cloud.network.Site2SiteVpnGateway; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.Site2SiteVpnGateway; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=Site2SiteVpnGateway.class) @SuppressWarnings("unused") public class Site2SiteVpnGatewayResponse extends BaseResponse implements ControlledEntityResponse { diff --git a/api/src/org/apache/cloudstack/api/response/SnapshotPolicyResponse.java b/api/src/org/apache/cloudstack/api/response/SnapshotPolicyResponse.java index 6bf77a042..2b7f9f4c4 100644 --- a/api/src/org/apache/cloudstack/api/response/SnapshotPolicyResponse.java +++ b/api/src/org/apache/cloudstack/api/response/SnapshotPolicyResponse.java @@ -16,11 +16,12 @@ // under the License. package org.apache.cloudstack.api.response; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; + import com.cloud.serializer.Param; import com.cloud.storage.snapshot.SnapshotPolicy; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; -import org.apache.cloudstack.api.EntityReference; @EntityReference(value=SnapshotPolicy.class) public class SnapshotPolicyResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java b/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java index 58b7cf152..5b77fb2f3 100644 --- a/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java +++ b/api/src/org/apache/cloudstack/api/response/SnapshotResponse.java @@ -16,6 +16,16 @@ // under the License. package org.apache.cloudstack.api.response; +import java.util.Date; +import java.util.List; + +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; + +import com.cloud.serializer.Param; +import com.cloud.storage.Snapshot; +import com.google.gson.annotations.SerializedName; import com.cloud.serializer.Param; import com.cloud.storage.Snapshot; import com.google.gson.annotations.SerializedName; diff --git a/api/src/org/apache/cloudstack/api/response/SnapshotScheduleResponse.java b/api/src/org/apache/cloudstack/api/response/SnapshotScheduleResponse.java index 19bb18946..a25d02f27 100644 --- a/api/src/org/apache/cloudstack/api/response/SnapshotScheduleResponse.java +++ b/api/src/org/apache/cloudstack/api/response/SnapshotScheduleResponse.java @@ -18,9 +18,10 @@ import java.util.Date; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class SnapshotScheduleResponse extends BaseResponse { @SerializedName("id") @Param(description="the ID of the snapshot schedule") diff --git a/api/src/org/apache/cloudstack/api/response/StaticRouteResponse.java b/api/src/org/apache/cloudstack/api/response/StaticRouteResponse.java index e7383e378..9001252e7 100644 --- a/api/src/org/apache/cloudstack/api/response/StaticRouteResponse.java +++ b/api/src/org/apache/cloudstack/api/response/StaticRouteResponse.java @@ -18,13 +18,14 @@ import java.util.List; -import com.cloud.network.vpc.StaticRoute; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.vpc.StaticRoute; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=StaticRoute.class) @SuppressWarnings("unused") public class StaticRouteResponse extends BaseResponse implements ControlledEntityResponse{ diff --git a/api/src/org/apache/cloudstack/api/response/StatusResponse.java b/api/src/org/apache/cloudstack/api/response/StatusResponse.java index ffe7c7c0c..28776b7a3 100644 --- a/api/src/org/apache/cloudstack/api/response/StatusResponse.java +++ b/api/src/org/apache/cloudstack/api/response/StatusResponse.java @@ -16,9 +16,10 @@ // under the License. package org.apache.cloudstack.api.response; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; +import com.google.gson.annotations.SerializedName; + public class StatusResponse extends BaseResponse { @SerializedName("status") private Boolean status; diff --git a/api/src/org/apache/cloudstack/api/response/StorageNetworkIpRangeResponse.java b/api/src/org/apache/cloudstack/api/response/StorageNetworkIpRangeResponse.java index 328180f52..c72d1e2c0 100644 --- a/api/src/org/apache/cloudstack/api/response/StorageNetworkIpRangeResponse.java +++ b/api/src/org/apache/cloudstack/api/response/StorageNetworkIpRangeResponse.java @@ -16,13 +16,14 @@ // under the License. package org.apache.cloudstack.api.response; -import com.cloud.dc.StorageNetworkIpRange; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.dc.StorageNetworkIpRange; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=StorageNetworkIpRange.class) public class StorageNetworkIpRangeResponse extends BaseResponse { @SerializedName(ApiConstants.ID) @Param(description="the uuid of storage network IP range.") diff --git a/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java b/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java index 7afce716f..0b1622640 100644 --- a/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java +++ b/api/src/org/apache/cloudstack/api/response/StoragePoolResponse.java @@ -18,13 +18,14 @@ import java.util.Date; -import com.cloud.storage.StoragePool; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; + import com.cloud.serializer.Param; +import com.cloud.storage.StoragePool; import com.cloud.storage.StoragePoolStatus; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; -import org.apache.cloudstack.api.EntityReference; @EntityReference(value=StoragePool.class) public class StoragePoolResponse extends BaseResponse { @@ -78,8 +79,25 @@ public class StoragePoolResponse extends BaseResponse { @SerializedName(ApiConstants.STATE) @Param(description="the state of the storage pool") private StoragePoolStatus state; + + @SerializedName(ApiConstants.SCOPE) @Param(description="the scope of the storage pool") + private String scope; + + /** + * @return the scope + */ + public String getScope() { + return scope; + } + + /** + * @param scope the scope to set + */ + public void setScope(String scope) { + this.scope = scope; + } @Override public String getObjectId() { diff --git a/api/src/org/apache/cloudstack/api/response/StorageProviderResponse.java b/api/src/org/apache/cloudstack/api/response/StorageProviderResponse.java new file mode 100644 index 000000000..4baf48629 --- /dev/null +++ b/api/src/org/apache/cloudstack/api/response/StorageProviderResponse.java @@ -0,0 +1,62 @@ +/* + * 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 org.apache.cloudstack.api.response; + +import org.apache.cloudstack.api.BaseResponse; + +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + +public class StorageProviderResponse extends BaseResponse { + @SerializedName("name") @Param(description="the name of the storage provider") + private String name; + + @SerializedName("type") @Param(description="the type of the storage provider: primary or image provider") + private String type; + + /** + * @return the type + */ + public String getType() { + return type; + } + + /** + * @param type the type to set + */ + public void setType(String type) { + this.type = type; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + +} diff --git a/api/src/org/apache/cloudstack/api/response/SuccessResponse.java b/api/src/org/apache/cloudstack/api/response/SuccessResponse.java index 47c65b6a0..8647d1931 100644 --- a/api/src/org/apache/cloudstack/api/response/SuccessResponse.java +++ b/api/src/org/apache/cloudstack/api/response/SuccessResponse.java @@ -16,9 +16,10 @@ // under the License. package org.apache.cloudstack.api.response; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class SuccessResponse extends BaseResponse { @SerializedName("success") @Param(description="true if operation is executed successfully") diff --git a/api/src/org/apache/cloudstack/api/response/SwiftResponse.java b/api/src/org/apache/cloudstack/api/response/SwiftResponse.java index 83fceb348..08b260943 100644 --- a/api/src/org/apache/cloudstack/api/response/SwiftResponse.java +++ b/api/src/org/apache/cloudstack/api/response/SwiftResponse.java @@ -19,9 +19,10 @@ import java.util.Date; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class SwiftResponse extends BaseResponse { @SerializedName(ApiConstants.ID) diff --git a/api/src/org/apache/cloudstack/api/response/SystemVmInstanceResponse.java b/api/src/org/apache/cloudstack/api/response/SystemVmInstanceResponse.java index 48df8549a..43411c7a2 100644 --- a/api/src/org/apache/cloudstack/api/response/SystemVmInstanceResponse.java +++ b/api/src/org/apache/cloudstack/api/response/SystemVmInstanceResponse.java @@ -16,9 +16,10 @@ // under the License. package org.apache.cloudstack.api.response; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; /* * This is the generic response for all types of System VMs (SSVM, consoleproxy, domain routers(router, LB, DHCP)) diff --git a/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java b/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java index 8b0f80b25..8d2798a9d 100644 --- a/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java +++ b/api/src/org/apache/cloudstack/api/response/SystemVmResponse.java @@ -18,13 +18,14 @@ import java.util.Date; -import com.cloud.vm.VirtualMachine; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.serializer.Param; +import com.cloud.vm.VirtualMachine; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=VirtualMachine.class) public class SystemVmResponse extends BaseResponse { @SerializedName("id") @Param(description="the ID of the system VM") diff --git a/api/src/org/apache/cloudstack/api/response/TemplatePermissionsResponse.java b/api/src/org/apache/cloudstack/api/response/TemplatePermissionsResponse.java index f1e08e3dc..c4b10ab11 100644 --- a/api/src/org/apache/cloudstack/api/response/TemplatePermissionsResponse.java +++ b/api/src/org/apache/cloudstack/api/response/TemplatePermissionsResponse.java @@ -18,13 +18,14 @@ import java.util.List; -import com.cloud.template.VirtualMachineTemplate; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.serializer.Param; +import com.cloud.template.VirtualMachineTemplate; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=VirtualMachineTemplate.class) @SuppressWarnings("unused") public class TemplatePermissionsResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/TemplateResponse.java b/api/src/org/apache/cloudstack/api/response/TemplateResponse.java index 033c2e243..ed933ff18 100644 --- a/api/src/org/apache/cloudstack/api/response/TemplateResponse.java +++ b/api/src/org/apache/cloudstack/api/response/TemplateResponse.java @@ -20,13 +20,14 @@ import java.util.List; import java.util.Map; -import com.cloud.template.VirtualMachineTemplate; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; + import com.cloud.serializer.Param; import com.cloud.storage.Storage.ImageFormat; +import com.cloud.template.VirtualMachineTemplate; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; -import org.apache.cloudstack.api.EntityReference; @EntityReference(value=VirtualMachineTemplate.class) @SuppressWarnings("unused") diff --git a/api/src/org/apache/cloudstack/api/response/TrafficMonitorResponse.java b/api/src/org/apache/cloudstack/api/response/TrafficMonitorResponse.java index 366e5d631..7e0646e4a 100644 --- a/api/src/org/apache/cloudstack/api/response/TrafficMonitorResponse.java +++ b/api/src/org/apache/cloudstack/api/response/TrafficMonitorResponse.java @@ -18,6 +18,7 @@ import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; diff --git a/api/src/org/apache/cloudstack/api/response/TrafficTypeImplementorResponse.java b/api/src/org/apache/cloudstack/api/response/TrafficTypeImplementorResponse.java index 30adc3d87..56beca51f 100644 --- a/api/src/org/apache/cloudstack/api/response/TrafficTypeImplementorResponse.java +++ b/api/src/org/apache/cloudstack/api/response/TrafficTypeImplementorResponse.java @@ -17,9 +17,10 @@ package org.apache.cloudstack.api.response; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class TrafficTypeImplementorResponse extends BaseResponse { @SerializedName(ApiConstants.TRAFFIC_TYPE) @Param(description="network traffic type") diff --git a/api/src/org/apache/cloudstack/api/response/TrafficTypeResponse.java b/api/src/org/apache/cloudstack/api/response/TrafficTypeResponse.java index 43760f2e1..494048e34 100644 --- a/api/src/org/apache/cloudstack/api/response/TrafficTypeResponse.java +++ b/api/src/org/apache/cloudstack/api/response/TrafficTypeResponse.java @@ -16,13 +16,14 @@ // under the License. package org.apache.cloudstack.api.response; -import com.cloud.network.PhysicalNetworkTrafficType; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.PhysicalNetworkTrafficType; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=PhysicalNetworkTrafficType.class) public class TrafficTypeResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/UpgradeVmResponse.java b/api/src/org/apache/cloudstack/api/response/UpgradeVmResponse.java index 767f783da..544a9bbea 100644 --- a/api/src/org/apache/cloudstack/api/response/UpgradeVmResponse.java +++ b/api/src/org/apache/cloudstack/api/response/UpgradeVmResponse.java @@ -19,9 +19,10 @@ import java.util.Date; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; -import org.apache.cloudstack.api.BaseResponse; public class UpgradeVmResponse extends BaseResponse { @SerializedName("id") diff --git a/api/src/org/apache/cloudstack/api/response/UsageRecordResponse.java b/api/src/org/apache/cloudstack/api/response/UsageRecordResponse.java index 9679575c0..4b355cb0c 100644 --- a/api/src/org/apache/cloudstack/api/response/UsageRecordResponse.java +++ b/api/src/org/apache/cloudstack/api/response/UsageRecordResponse.java @@ -18,7 +18,7 @@ import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseResponse; -import org.apache.cloudstack.api.response.ControlledEntityResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; diff --git a/api/src/org/apache/cloudstack/api/response/UsageTypeResponse.java b/api/src/org/apache/cloudstack/api/response/UsageTypeResponse.java index b21d26f37..3dbb27ac1 100644 --- a/api/src/org/apache/cloudstack/api/response/UsageTypeResponse.java +++ b/api/src/org/apache/cloudstack/api/response/UsageTypeResponse.java @@ -18,6 +18,7 @@ import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseResponse; + import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; diff --git a/api/src/org/apache/cloudstack/api/response/UserResponse.java b/api/src/org/apache/cloudstack/api/response/UserResponse.java index 9ab6248ed..9cd25cb7a 100644 --- a/api/src/org/apache/cloudstack/api/response/UserResponse.java +++ b/api/src/org/apache/cloudstack/api/response/UserResponse.java @@ -18,13 +18,13 @@ import java.util.Date; -import com.google.gson.annotations.SerializedName; -import com.cloud.serializer.Param; -import com.cloud.user.User; - import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.serializer.Param; +import com.cloud.user.User; +import com.google.gson.annotations.SerializedName; + @EntityReference(value = User.class) public class UserResponse extends BaseResponse { @SerializedName("id") @Param(description="the user ID") diff --git a/api/src/org/apache/cloudstack/api/response/UserVmResponse.java b/api/src/org/apache/cloudstack/api/response/UserVmResponse.java index 5450bfb64..212601ce2 100644 --- a/api/src/org/apache/cloudstack/api/response/UserVmResponse.java +++ b/api/src/org/apache/cloudstack/api/response/UserVmResponse.java @@ -18,15 +18,18 @@ import java.util.Date; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.Set; -import com.cloud.network.router.VirtualRouter; -import com.cloud.uservm.UserVm; +import org.apache.cloudstack.affinity.AffinityGroupResponse; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; -import com.cloud.vm.VirtualMachine; + +import com.cloud.network.router.VirtualRouter; import com.cloud.serializer.Param; +import com.cloud.uservm.UserVm; +import com.cloud.vm.VirtualMachine; import com.google.gson.annotations.SerializedName; @SuppressWarnings("unused") @@ -167,10 +170,15 @@ public class UserVmResponse extends BaseResponse implements ControlledEntityResp @SerializedName(ApiConstants.SSH_KEYPAIR) @Param(description="ssh key-pair") private String keyPairName; + @SerializedName("affinitygroup") + @Param(description = "list of affinity groups associated with the virtual machine", responseObject = AffinityGroupResponse.class) + private Set affinityGroupList; + public UserVmResponse(){ - securityGroupList = new HashSet(); - nics = new HashSet(); - tags = new HashSet(); + securityGroupList = new LinkedHashSet(); + nics = new LinkedHashSet(); + tags = new LinkedHashSet(); + affinityGroupList = new LinkedHashSet(); } public void setHypervisor(String hypervisor) { @@ -379,4 +387,12 @@ public void setKeyPairName(String keyPairName) { this.keyPairName = keyPairName; } + public void setAffinityGroupList(Set affinityGroups) { + this.affinityGroupList = affinityGroups; + } + + public void addAffinityGroup(AffinityGroupResponse affinityGroup) { + this.affinityGroupList.add(affinityGroup); + } + } diff --git a/api/src/org/apache/cloudstack/api/response/VMSnapshotResponse.java b/api/src/org/apache/cloudstack/api/response/VMSnapshotResponse.java new file mode 100644 index 000000000..3b30ab61a --- /dev/null +++ b/api/src/org/apache/cloudstack/api/response/VMSnapshotResponse.java @@ -0,0 +1,220 @@ +// 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 org.apache.cloudstack.api.response; + +import java.util.Date; + +import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; + +import com.cloud.serializer.Param; +import com.cloud.vm.snapshot.VMSnapshot; +import com.google.gson.annotations.SerializedName; + +@EntityReference(value=VMSnapshot.class) +public class VMSnapshotResponse extends BaseResponse implements ControlledEntityResponse{ + + @SerializedName(ApiConstants.ID) + @Param(description = "the ID of the vm snapshot") + private String id; + + @SerializedName(ApiConstants.NAME) + @Param(description = "the name of the vm snapshot") + private String name; + + @SerializedName(ApiConstants.STATE) + @Param(description = "the state of the vm snapshot") + private VMSnapshot.State state; + + @SerializedName(ApiConstants.DESCRIPTION) + @Param(description = "the description of the vm snapshot") + private String description; + + @SerializedName(ApiConstants.DISPLAY_NAME) + @Param(description = "the display name of the vm snapshot") + private String displayName; + + @SerializedName(ApiConstants.ZONE_ID) + @Param(description = "the Zone ID of the vm snapshot") + private String zoneId; + + @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) + @Param(description = "the vm ID of the vm snapshot") + private String virtualMachineid; + + @SerializedName("parent") + @Param(description = "the parent ID of the vm snapshot") + private String parent; + + @SerializedName("parentName") + @Param(description = "the parent displayName of the vm snapshot") + private String parentName; + + @SerializedName("current") + @Param(description = "indiates if this is current snapshot") + private Boolean current; + + @SerializedName("type") + @Param(description = "VM Snapshot type") + private String type; + + @SerializedName(ApiConstants.CREATED) + @Param(description = "the create date of the vm snapshot") + private Date created; + + @SerializedName(ApiConstants.ACCOUNT) + @Param(description = "the account associated with the disk volume") + private String accountName; + + @SerializedName(ApiConstants.PROJECT_ID) @Param(description="the project id of the vpn") + private String projectId; + + @SerializedName(ApiConstants.PROJECT) @Param(description="the project name of the vpn") + private String projectName; + + @SerializedName(ApiConstants.DOMAIN_ID) + @Param(description = "the ID of the domain associated with the disk volume") + private String domainId; + + @SerializedName(ApiConstants.DOMAIN) + @Param(description = "the domain associated with the disk volume") + private String domainName; + + @Override + public String getObjectId() { + return getId(); + } + + public Date getCreated() { + return created; + } + + public void setCreated(Date created) { + this.created = created; + } + + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public String getZoneId() { + return zoneId; + } + + public void setZoneId(String zoneId) { + this.zoneId = zoneId; + } + + public String getVirtualMachineid() { + return virtualMachineid; + } + + public void setVirtualMachineid(String virtualMachineid) { + this.virtualMachineid = virtualMachineid; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setState(VMSnapshot.State state) { + this.state = state; + } + + public VMSnapshot.State getState() { + return state; + } + + public Boolean getCurrent() { + return current; + } + + public void setCurrent(Boolean current) { + this.current = current; + } + + public void setParentName(String parentName) { + this.parentName = parentName; + } + + public String getParentName() { + return parentName; + } + + public String getType() { + return type; + } + + public void setType(String type) { + this.type = type; + } + + @Override + public void setAccountName(String accountName) { + this.accountName = accountName; + + } + + @Override + public void setProjectId(String projectId) { + this.projectId = projectId; + + } + + @Override + public void setProjectName(String projectName) { + this.projectName = projectName; + + } + + @Override + public void setDomainId(String domainId) { + this.domainId = domainId; + } + + @Override + public void setDomainName(String domainName) { + this.domainName = domainName; + + } +} diff --git a/api/src/org/apache/cloudstack/api/response/VirtualRouterProviderResponse.java b/api/src/org/apache/cloudstack/api/response/VirtualRouterProviderResponse.java index dcb2322e5..92d9a1d0c 100644 --- a/api/src/org/apache/cloudstack/api/response/VirtualRouterProviderResponse.java +++ b/api/src/org/apache/cloudstack/api/response/VirtualRouterProviderResponse.java @@ -16,13 +16,14 @@ // under the License. package org.apache.cloudstack.api.response; -import com.cloud.network.VirtualRouterProvider; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.VirtualRouterProvider; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=VirtualRouterProvider.class) public class VirtualRouterProviderResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) @Param(description="the id of the router") diff --git a/api/src/org/apache/cloudstack/api/response/VlanIpRangeResponse.java b/api/src/org/apache/cloudstack/api/response/VlanIpRangeResponse.java index e3cac68f4..6c5c364cd 100644 --- a/api/src/org/apache/cloudstack/api/response/VlanIpRangeResponse.java +++ b/api/src/org/apache/cloudstack/api/response/VlanIpRangeResponse.java @@ -16,13 +16,14 @@ // under the License. package org.apache.cloudstack.api.response; -import com.cloud.dc.Vlan; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.dc.Vlan; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=Vlan.class) @SuppressWarnings("unused") public class VlanIpRangeResponse extends BaseResponse implements ControlledEntityResponse{ diff --git a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java index d92153d0d..d5054f0bc 100644 --- a/api/src/org/apache/cloudstack/api/response/VolumeResponse.java +++ b/api/src/org/apache/cloudstack/api/response/VolumeResponse.java @@ -18,15 +18,17 @@ import java.util.Date; import java.util.HashSet; +import java.util.LinkedHashSet; import java.util.Set; -import com.cloud.storage.Volume; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.serializer.Param; +import com.cloud.storage.Volume; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=Volume.class) @SuppressWarnings("unused") public class VolumeResponse extends BaseResponse implements ControlledViewEntityResponse{ @@ -160,7 +162,7 @@ public class VolumeResponse extends BaseResponse implements ControlledViewEntity private Set tags; public VolumeResponse(){ - tags = new HashSet(); + tags = new LinkedHashSet(); } @Override diff --git a/api/src/org/apache/cloudstack/api/response/VpcOfferingResponse.java b/api/src/org/apache/cloudstack/api/response/VpcOfferingResponse.java index 3e196febe..70120d1d7 100644 --- a/api/src/org/apache/cloudstack/api/response/VpcOfferingResponse.java +++ b/api/src/org/apache/cloudstack/api/response/VpcOfferingResponse.java @@ -19,13 +19,14 @@ import java.util.Date; import java.util.List; -import com.cloud.network.vpc.VpcOffering; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.vpc.VpcOffering; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=VpcOffering.class) @SuppressWarnings("unused") public class VpcOfferingResponse extends BaseResponse { diff --git a/api/src/org/apache/cloudstack/api/response/VpcResponse.java b/api/src/org/apache/cloudstack/api/response/VpcResponse.java index 94ea5983b..3dfd23b96 100644 --- a/api/src/org/apache/cloudstack/api/response/VpcResponse.java +++ b/api/src/org/apache/cloudstack/api/response/VpcResponse.java @@ -19,13 +19,14 @@ import java.util.Date; import java.util.List; -import com.cloud.network.vpc.Vpc; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.vpc.Vpc; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value=Vpc.class) @SuppressWarnings("unused") public class VpcResponse extends BaseResponse implements ControlledEntityResponse{ diff --git a/api/src/org/apache/cloudstack/api/response/VpnUsersResponse.java b/api/src/org/apache/cloudstack/api/response/VpnUsersResponse.java index 958c8b59b..c29a37e7a 100644 --- a/api/src/org/apache/cloudstack/api/response/VpnUsersResponse.java +++ b/api/src/org/apache/cloudstack/api/response/VpnUsersResponse.java @@ -16,13 +16,14 @@ // under the License. package org.apache.cloudstack.api.response; -import com.cloud.network.VpnUser; import org.apache.cloudstack.api.ApiConstants; -import com.cloud.serializer.Param; -import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; +import com.cloud.network.VpnUser; +import com.cloud.serializer.Param; +import com.google.gson.annotations.SerializedName; + @EntityReference(value = VpnUser.class) @SuppressWarnings("unused") public class VpnUsersResponse extends BaseResponse implements ControlledEntityResponse{ @@ -47,6 +48,8 @@ public class VpnUsersResponse extends BaseResponse implements ControlledEntityRe @SerializedName(ApiConstants.PROJECT) @Param(description="the project name of the vpn") private String projectName; + @SerializedName(ApiConstants.STATE) @Param(description="the state of the Vpn User") + private String state; public void setId(String id) { this.id = id; @@ -79,4 +82,12 @@ public void setProjectName(String projectName) { this.projectName = projectName; } + public String getState() { + return state; + } + + public void setState(String state) { + this.state = state; + } + } diff --git a/api/src/org/apache/cloudstack/api/response/ZoneResponse.java b/api/src/org/apache/cloudstack/api/response/ZoneResponse.java index ca1cb5762..2ebb15a1e 100644 --- a/api/src/org/apache/cloudstack/api/response/ZoneResponse.java +++ b/api/src/org/apache/cloudstack/api/response/ZoneResponse.java @@ -21,6 +21,7 @@ import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseResponse; import org.apache.cloudstack.api.EntityReference; + import com.cloud.dc.DataCenter; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; @@ -43,6 +44,12 @@ public class ZoneResponse extends BaseResponse { @SerializedName(ApiConstants.DNS2) @Param(description="the second DNS for the Zone") private String dns2; + @SerializedName(ApiConstants.IP6_DNS1) @Param(description="the first IPv6 DNS for the Zone") + private String ip6Dns1; + + @SerializedName(ApiConstants.IP6_DNS2) @Param(description="the second IPv6 DNS for the Zone") + private String ip6Dns2; + @SerializedName(ApiConstants.INTERNAL_DNS1) @Param(description="the first internal DNS for the Zone") private String internalDns1; @@ -175,4 +182,20 @@ public void setDomainName(String domainName) { public void setLocalStorageEnabled(boolean localStorageEnabled) { this.localStorageEnabled = localStorageEnabled; } + + public String getIp6Dns1() { + return ip6Dns1; + } + + public void setIp6Dns1(String ip6Dns1) { + this.ip6Dns1 = ip6Dns1; + } + + public String getIp6Dns2() { + return ip6Dns2; + } + + public void setIp6Dns2(String ip6Dns2) { + this.ip6Dns2 = ip6Dns2; + } } diff --git a/api/src/org/apache/cloudstack/network/ExternalNetworkDeviceManager.java b/api/src/org/apache/cloudstack/network/ExternalNetworkDeviceManager.java index 426a3b57d..29ce2e397 100644 --- a/api/src/org/apache/cloudstack/network/ExternalNetworkDeviceManager.java +++ b/api/src/org/apache/cloudstack/network/ExternalNetworkDeviceManager.java @@ -19,12 +19,13 @@ import java.util.ArrayList; import java.util.List; -import com.cloud.network.Network; import org.apache.cloudstack.api.command.admin.network.AddNetworkDeviceCmd; import org.apache.cloudstack.api.command.admin.network.DeleteNetworkDeviceCmd; import org.apache.cloudstack.api.command.admin.network.ListNetworkDeviceCmd; -import com.cloud.host.Host; import org.apache.cloudstack.api.response.NetworkDeviceResponse; + +import com.cloud.host.Host; +import com.cloud.network.Network; import com.cloud.utils.component.Manager; public interface ExternalNetworkDeviceManager extends Manager { @@ -42,7 +43,7 @@ public static class NetworkDevice { public static final NetworkDevice F5BigIpLoadBalancer = new NetworkDevice("F5BigIpLoadBalancer", Network.Provider.F5BigIp.getName()); public static final NetworkDevice JuniperSRXFirewall = new NetworkDevice("JuniperSRXFirewall", Network.Provider.JuniperSRX.getName()); public static final NetworkDevice NiciraNvp = new NetworkDevice("NiciraNvp", Network.Provider.NiciraNvp.getName()); - public static final NetworkDevice MidokuraMidonet = new NetworkDevice("MidokuraMidonet", Network.Provider.MidokuraMidonet.getName()); + public static final NetworkDevice CiscoVnmc = new NetworkDevice("CiscoVnmc", Network.Provider.CiscoVnmc.getName()); public NetworkDevice(String deviceName, String ntwkServiceprovider) { _name = deviceName; diff --git a/api/src/org/apache/cloudstack/query/QueryService.java b/api/src/org/apache/cloudstack/query/QueryService.java index f3f6d3d56..443c5df65 100644 --- a/api/src/org/apache/cloudstack/query/QueryService.java +++ b/api/src/org/apache/cloudstack/query/QueryService.java @@ -16,8 +16,7 @@ // under the License. package org.apache.cloudstack.query; -import java.util.List; - +import org.apache.cloudstack.affinity.AffinityGroupResponse; import org.apache.cloudstack.api.command.admin.host.ListHostsCmd; import org.apache.cloudstack.api.command.admin.router.ListRoutersCmd; import org.apache.cloudstack.api.command.admin.storage.ListStoragePoolsCmd; @@ -56,15 +55,10 @@ import org.apache.cloudstack.api.response.VolumeResponse; import org.apache.cloudstack.api.response.ZoneResponse; - - -import com.cloud.async.AsyncJob; import com.cloud.exception.PermissionDeniedException; -import com.cloud.utils.Pair; /** * Service used for list api query. - * @author minc * */ public interface QueryService { @@ -104,4 +98,7 @@ public interface QueryService { public ListResponse searchForServiceOfferings(ListServiceOfferingsCmd cmd); public ListResponse listDataCenters(ListZonesByCmd cmd); + + public ListResponse listAffinityGroups(Long affinityGroupId, String affinityGroupName, + String affinityGroupType, Long vmId, Long startIndex, Long pageSize); } diff --git a/api/src/org/apache/cloudstack/region/Region.java b/api/src/org/apache/cloudstack/region/Region.java new file mode 100644 index 000000000..7119f1b2c --- /dev/null +++ b/api/src/org/apache/cloudstack/region/Region.java @@ -0,0 +1,81 @@ +// 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 org.apache.cloudstack.region; + +import java.util.ArrayList; +import java.util.List; + +/** + * + */ +public interface Region { + + public int getId(); + + public String getName(); + + public void setName(String name); + + public String getEndPoint(); + + + public boolean checkIfServiceEnabled(Service service); + + /** + * A region level service, is a service that constitute services across one or more zones in the region or a service + * made available to all the zones in the region. + */ + public static class Service { + + private String name; + private static List regionServices = new ArrayList(); + + public static final Service Gslb = new Service("Gslb"); + + public Service(String name ) { + this.name = name; + regionServices.add(this); + } + + public String getName() { + return name; + } + + } + + /** + * A provider provides the region level service in a zone. + */ + public static class Provider { + + private static List supportedProviders = new ArrayList(); + private String name; + private Service service; + + public static final Provider Netscaler = new Provider("Netscaler", Service.Gslb); + + public Provider(String name, Service service) { + this.name = name; + this.service = service; + supportedProviders.add(this); + } + + public String getName() { + return name; + } + } +} diff --git a/api/src/org/apache/cloudstack/region/RegionService.java b/api/src/org/apache/cloudstack/region/RegionService.java new file mode 100644 index 000000000..303b58c81 --- /dev/null +++ b/api/src/org/apache/cloudstack/region/RegionService.java @@ -0,0 +1,153 @@ +// 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 org.apache.cloudstack.region; + +import java.util.List; + +import org.apache.cloudstack.api.command.admin.account.DeleteAccountCmd; +import org.apache.cloudstack.api.command.admin.account.DisableAccountCmd; +import org.apache.cloudstack.api.command.admin.account.EnableAccountCmd; +import org.apache.cloudstack.api.command.admin.account.UpdateAccountCmd; +import org.apache.cloudstack.api.command.admin.domain.DeleteDomainCmd; +import org.apache.cloudstack.api.command.admin.domain.UpdateDomainCmd; +import org.apache.cloudstack.api.command.admin.user.DeleteUserCmd; +import org.apache.cloudstack.api.command.admin.user.DisableUserCmd; +import org.apache.cloudstack.api.command.admin.user.EnableUserCmd; +import org.apache.cloudstack.api.command.admin.user.UpdateUserCmd; +import org.apache.cloudstack.api.command.user.region.ListRegionsCmd; + +import com.cloud.domain.Domain; +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.ResourceUnavailableException; +import com.cloud.user.Account; +import com.cloud.user.UserAccount; + + +public interface RegionService { + /** + * Adds a Region to the local Region + * @param id + * @param name + * @param endPoint + * @return Return added Region object + */ + public Region addRegion(int id, String name, String endPoint); + + /** + * Update details of the Region with specified Id + * @param id + * @param name + * @param endPoint + * @return Return updated Region object + */ + public Region updateRegion(int id, String name, String endPoint); + + /** + * @param id + * @return True if region is successfully removed + */ + public boolean removeRegion(int id); + + /** List all Regions or by Id/Name + * @param id + * @param name + * @return List of Regions + */ + public List listRegions(ListRegionsCmd cmd); + + /** + * Deletes a user by userId + * isPopagate flag is set to true if sent from peer Region + * @param cmd + * + * @return true if delete was successful, false otherwise + */ + boolean deleteUserAccount(DeleteAccountCmd cmd); + + /** + * Updates an account + * isPopagate falg is set to true if sent from peer Region + * + * @param cmd + * - the parameter containing accountId or account nameand domainId + * @return updated account object + */ + Account updateAccount(UpdateAccountCmd cmd); + + /** + * Disables an account by accountName and domainId or accountId + * @param cmd + * @return + * @throws ResourceUnavailableException + * @throws ConcurrentOperationException + */ + Account disableAccount(DisableAccountCmd cmd) throws ConcurrentOperationException, ResourceUnavailableException; + + /** + * Enables an account by accountId + * @param cmd + * @return + */ + Account enableAccount(EnableAccountCmd cmd); + + /** + * Deletes user by Id + * @param deleteUserCmd + * @return true if delete was successful, false otherwise + */ + boolean deleteUser(DeleteUserCmd deleteUserCmd); + + /** + * update an existing domain + * + * @param cmd + * - the command containing domainId and new domainName + * @return Domain object if the command succeeded + */ + public Domain updateDomain(UpdateDomainCmd updateDomainCmd); + + /** + * Deletes domain + * @param cmd + * @return true if delete was successful, false otherwise + */ + public boolean deleteDomain(DeleteDomainCmd cmd); + + /** + * Update a user by userId + * + * @param userId + * @return UserAccount object + */ + public UserAccount updateUser(UpdateUserCmd updateUserCmd); + + /** + * Disables a user by userId + * + * @param cmd + * @return UserAccount object + */ + public UserAccount disableUser(DisableUserCmd cmd); + + /** + * Enables a user + * + * @param cmd + * @return UserAccount object + */ + public UserAccount enableUser(EnableUserCmd cmd); +} diff --git a/api/src/org/apache/cloudstack/region/RegionSync.java b/api/src/org/apache/cloudstack/region/RegionSync.java new file mode 100644 index 000000000..5a1f5a6c1 --- /dev/null +++ b/api/src/org/apache/cloudstack/region/RegionSync.java @@ -0,0 +1,33 @@ +// 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 org.apache.cloudstack.region; + +import java.util.Date; + +/** + * + */ +public interface RegionSync { + + public long getId(); + + public int getRegionId(); + + public String getApi(); + + Date getCreateDate(); +} diff --git a/api/src/org/apache/cloudstack/usage/Usage.java b/api/src/org/apache/cloudstack/usage/Usage.java new file mode 100644 index 000000000..c74d3b727 --- /dev/null +++ b/api/src/org/apache/cloudstack/usage/Usage.java @@ -0,0 +1,69 @@ +// 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 org.apache.cloudstack.usage; + +import org.apache.cloudstack.api.InternalIdentity; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +public interface Usage { + + public long getId(); + + public Long getZoneId(); + + public Long getAccountId(); + + public Long getDomainId(); + + public String getDescription(); + + public String getUsageDisplay(); + + public int getUsageType(); + + public Double getRawUsage(); + + public Long getVmInstanceId(); + + public String getVmName(); + + public Long getOfferingId(); + + public Long getTemplateId(); + + public Long getUsageId(); + + public String getType(); + + public Long getNetworkId(); + + public Long getSize(); + + public Date getStartDate(); + + public Date getEndDate(); +} diff --git a/api/src/org/apache/cloudstack/usage/UsageService.java b/api/src/org/apache/cloudstack/usage/UsageService.java new file mode 100755 index 000000000..383822592 --- /dev/null +++ b/api/src/org/apache/cloudstack/usage/UsageService.java @@ -0,0 +1,64 @@ +// 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 org.apache.cloudstack.usage; + +import java.util.List; +import java.util.TimeZone; + +import org.apache.cloudstack.api.command.admin.usage.GenerateUsageRecordsCmd; +import org.apache.cloudstack.api.command.admin.usage.GetUsageRecordsCmd; +import org.apache.cloudstack.api.response.UsageTypeResponse; + +public interface UsageService { + /** + * Generate Billing Records from the last time it was generated to the + * time specified. + * + * @param cmd the command wrapping the generate parameters + * - userId unique id of the user, pass in -1 to generate billing records + * for all users + * - startDate + * - endDate inclusive. If date specified is greater than the current time, the + * system will use the current time. + */ + boolean generateUsageRecords(GenerateUsageRecordsCmd cmd); + + /** + * Retrieves all Usage Records generated between the start and end date specified + * + * @param userId unique id of the user, pass in -1 to retrieve billing records + * for all users + * @param startDate inclusive. + * @param endDate inclusive. If date specified is greater than the current time, the + * system will use the current time. + * @param page The page of usage records to see (500 results are returned at a time, if + * more than 500 records exist then additional results can be retrieved by + * the appropriate page number) + * @return a list of usage records + */ + List getUsageRecords(GetUsageRecordsCmd cmd); + + /** + * Retrieves the timezone used for usage aggregation. One day is represented as midnight to 11:59:59pm + * in the given time zone + * @return the timezone specified by the config value usage.aggregation.timezone, or GMT if null + */ + TimeZone getUsageTimezone(); + + List listUsageTypes(); + +} diff --git a/server/src/com/cloud/usage/UsageTypes.java b/api/src/org/apache/cloudstack/usage/UsageTypes.java similarity index 98% rename from server/src/com/cloud/usage/UsageTypes.java rename to api/src/org/apache/cloudstack/usage/UsageTypes.java index e5a48d5c1..2baa1d200 100644 --- a/server/src/com/cloud/usage/UsageTypes.java +++ b/api/src/org/apache/cloudstack/usage/UsageTypes.java @@ -14,7 +14,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -package com.cloud.usage; +package org.apache.cloudstack.usage; import java.util.ArrayList; import java.util.List; diff --git a/api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotAnswerTest.java b/api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotAnswerTest.java index ede86e9d8..7fd6e0b86 100644 --- a/api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotAnswerTest.java +++ b/api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotAnswerTest.java @@ -37,7 +37,7 @@ public void setUp() { StoragePool pool = Mockito.mock(StoragePool.class); bsc = new BackupSnapshotCommand( - "secondaryStoragePoolURL", 101L, 102L, 103L, 104L, + "secondaryStoragePoolURL", 101L, 102L, 103L, 104L, 105L, "volumePath", pool, "snapshotUuid", "snapshotName", "prevSnapshotUuid", "prevBackupUuid", false, "vmName", 5); bsa = new BackupSnapshotAnswer(bsc, true, "results", "bussname", false); diff --git a/api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java b/api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java index 91573d03c..44d53aaa1 100644 --- a/api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java +++ b/api/test/org/apache/cloudstack/api/agent/test/BackupSnapshotCommandTest.java @@ -35,96 +35,126 @@ public class BackupSnapshotCommandTest { public StoragePool pool = new StoragePool() { + @Override public long getId() { return 1L; }; + @Override public String getName() { return "name"; }; + @Override public String getUuid() { return "bed9f83e-cac3-11e1-ac8a-0050568b007e"; }; + @Override public StoragePoolType getPoolType() { return StoragePoolType.Filesystem; }; + @Override public Date getCreated() { Date date = null; try { date = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss") - .parse("01/01/1970 12:12:12"); + .parse("01/01/1970 12:12:12"); } catch (ParseException e) { e.printStackTrace(); } return date; } + @Override public Date getUpdateTime() { return new Date(); }; + @Override public long getDataCenterId() { return 0L; }; + @Override public long getCapacityBytes() { return 0L; }; + @Override public long getAvailableBytes() { return 0L; }; + @Override public Long getClusterId() { return 0L; }; + @Override public String getHostAddress() { return "hostAddress"; }; + @Override public String getPath() { return "path"; }; + @Override public String getUserInfo() { return "userInfo"; }; + @Override public boolean isShared() { return false; }; + @Override public boolean isLocal() { return false; }; + @Override public StoragePoolStatus getStatus() { return StoragePoolStatus.Up; }; + @Override public int getPort() { return 25; }; + @Override public Long getPodId() { return 0L; + } + + @Override + public String getStorageProviderName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isInMaintenance() { + // TODO Auto-generated method stub + return false; }; }; BackupSnapshotCommand bsc = new BackupSnapshotCommand( "http://secondary.Storage.Url", - 101L, 102L, 103L, 104L, "vPath", pool, + 101L, 102L, 103L, 104L, 105L, "vPath", pool, "420fa39c-4ef1-a83c-fd93-46dc1ff515ae", "sName", "9012793e-0657-11e2-bebc-0050568b0057", "7167e0b2-f5b0-11e1-8414-0050568b0057", false, "vmName", 5); BackupSnapshotCommand bsc1 = new BackupSnapshotCommand( "http://secondary.Storage.Url", - 101L, 102L, 103L, 104L, "vPath", pool, + 101L, 102L, 103L, 104L, 105L,"vPath", pool, "420fa39c-4ef1-a83c-fd93-46dc1ff515ae", "sName", "9012793e-0657-11e2-bebc-0050568b0057", "7167e0b2-f5b0-11e1-8414-0050568b0057", false, "vmName", 5); @@ -205,7 +235,7 @@ public void testGetPool() { public void testGetCreated() { try { Date date = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss") - .parse("01/01/1970 12:12:12"); + .parse("01/01/1970 12:12:12"); Date d = pool.getCreated(); assertTrue(d.compareTo(date) == 0); } catch (ParseException e) { diff --git a/api/test/org/apache/cloudstack/api/agent/test/SnapshotCommandTest.java b/api/test/org/apache/cloudstack/api/agent/test/SnapshotCommandTest.java index a7359134f..c2d69c0b0 100644 --- a/api/test/org/apache/cloudstack/api/agent/test/SnapshotCommandTest.java +++ b/api/test/org/apache/cloudstack/api/agent/test/SnapshotCommandTest.java @@ -20,13 +20,13 @@ import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; -import org.junit.Before; -import org.junit.Test; - import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; +import org.junit.Before; +import org.junit.Test; + import com.cloud.agent.api.SnapshotCommand; import com.cloud.storage.Storage.StoragePoolType; import com.cloud.storage.StoragePool; @@ -112,6 +112,18 @@ public int getPort() { public Long getPodId() { return 0L; + } + + @Override + public String getStorageProviderName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isInMaintenance() { + // TODO Auto-generated method stub + return false; }; }; diff --git a/api/test/org/apache/cloudstack/api/command/test/AddClusterCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/AddClusterCmdTest.java index 60fea9e54..90759fe67 100644 --- a/api/test/org/apache/cloudstack/api/command/test/AddClusterCmdTest.java +++ b/api/test/org/apache/cloudstack/api/command/test/AddClusterCmdTest.java @@ -19,6 +19,8 @@ import junit.framework.Assert; import junit.framework.TestCase; +import org.apache.cloudstack.api.ResponseGenerator; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.command.admin.cluster.AddClusterCmd; import org.junit.Before; import org.junit.Rule; @@ -26,8 +28,6 @@ import org.junit.rules.ExpectedException; import org.mockito.Mockito; -import org.apache.cloudstack.api.ResponseGenerator; -import org.apache.cloudstack.api.ServerApiException; import com.cloud.exception.DiscoveryException; import com.cloud.exception.ResourceInUseException; import com.cloud.org.Cluster; diff --git a/api/test/org/apache/cloudstack/api/command/test/AddHostCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/AddHostCmdTest.java index 4c1b5ee0e..531f51105 100644 --- a/api/test/org/apache/cloudstack/api/command/test/AddHostCmdTest.java +++ b/api/test/org/apache/cloudstack/api/command/test/AddHostCmdTest.java @@ -19,17 +19,17 @@ import junit.framework.Assert; import junit.framework.TestCase; +import org.apache.cloudstack.api.ResponseGenerator; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.command.admin.host.AddHostCmd; +import org.apache.cloudstack.api.response.HostResponse; +import org.apache.cloudstack.api.response.ListResponse; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.mockito.Mockito; -import org.apache.cloudstack.api.ResponseGenerator; -import org.apache.cloudstack.api.ServerApiException; -import org.apache.cloudstack.api.response.HostResponse; -import org.apache.cloudstack.api.response.ListResponse; import com.cloud.exception.DiscoveryException; import com.cloud.exception.InvalidParameterValueException; import com.cloud.host.Host; diff --git a/api/test/org/apache/cloudstack/api/command/test/AddIpToVmNicTest.java b/api/test/org/apache/cloudstack/api/command/test/AddIpToVmNicTest.java new file mode 100644 index 000000000..106589d10 --- /dev/null +++ b/api/test/org/apache/cloudstack/api/command/test/AddIpToVmNicTest.java @@ -0,0 +1,132 @@ +// 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 org.apache.cloudstack.api.command.test; + +import junit.framework.Assert; +import junit.framework.TestCase; + +import org.apache.cloudstack.api.ResponseGenerator; +import org.apache.cloudstack.api.command.user.vm.AddIpToVmNicCmd; +import org.apache.cloudstack.api.command.user.vm.RemoveIpFromVmNicCmd; +import org.apache.cloudstack.api.response.NicSecondaryIpResponse; +import org.apache.cloudstack.api.response.SuccessResponse; + + + +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.mockito.Mockito; + +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.InsufficientAddressCapacityException; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.exception.ResourceAllocationException; +import com.cloud.exception.ResourceUnavailableException; +import com.cloud.network.NetworkService; +import com.cloud.user.Account; + +public class AddIpToVmNicTest extends TestCase { + + private AddIpToVmNicCmd addIpToVmNicCmd; + private RemoveIpFromVmNicCmd removeIpFromVmNicCmd; + private ResponseGenerator responseGenerator; + private SuccessResponse successResponseGenerator; + + @Rule + public ExpectedException expectedException = ExpectedException.none(); + + @Before + public void setUp() { + addIpToVmNicCmd = new AddIpToVmNicCmd() { + }; + removeIpFromVmNicCmd = new RemoveIpFromVmNicCmd(); + } + + @Test + public void testCreateSuccess() throws ResourceAllocationException, ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException { + + NetworkService networkService = Mockito.mock(NetworkService.class); + AddIpToVmNicCmd ipTonicCmd = Mockito.mock(AddIpToVmNicCmd.class); + + Mockito.when( + networkService.allocateSecondaryGuestIP(Mockito.any(Account.class), Mockito.anyLong(), Mockito.anyLong(), Mockito.anyLong(), Mockito.anyString())).thenReturn("10.1.1.2"); + + ipTonicCmd._networkService = networkService; + responseGenerator = Mockito.mock(ResponseGenerator.class); + + NicSecondaryIpResponse ipres = Mockito.mock(NicSecondaryIpResponse.class); + Mockito.when(responseGenerator.createSecondaryIPToNicResponse(Mockito.anyString(), Mockito.anyLong(), Mockito.anyLong())).thenReturn(ipres); + + ipTonicCmd._responseGenerator = responseGenerator; + ipTonicCmd.execute(); + } + + @Test + public void testCreateFailure() throws ResourceAllocationException, ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException { + + NetworkService networkService = Mockito.mock(NetworkService.class); + AddIpToVmNicCmd ipTonicCmd = Mockito.mock(AddIpToVmNicCmd.class); + + Mockito.when( + networkService.allocateSecondaryGuestIP(Mockito.any(Account.class), Mockito.anyLong(), Mockito.anyLong(), Mockito.anyLong(), Mockito.anyString())).thenReturn(null); + + ipTonicCmd._networkService = networkService; + + try { + ipTonicCmd.execute(); + } catch (InsufficientAddressCapacityException e) { + throw new InvalidParameterValueException("Allocating guest ip for nic failed"); + } + } + + @Test + public void testRemoveIpFromVmNicSuccess() throws ResourceAllocationException, ResourceUnavailableException, ConcurrentOperationException, InsufficientCapacityException { + + NetworkService networkService = Mockito.mock(NetworkService.class); + RemoveIpFromVmNicCmd removeIpFromNic = Mockito.mock(RemoveIpFromVmNicCmd.class); + + Mockito.when( + networkService.releaseSecondaryIpFromNic(Mockito.anyInt())).thenReturn(true); + + removeIpFromNic._networkService = networkService; + successResponseGenerator = Mockito.mock(SuccessResponse.class); + + removeIpFromNic.execute(); + } + + @Test + public void testRemoveIpFromVmNicFailure() throws InsufficientAddressCapacityException { + NetworkService networkService = Mockito.mock(NetworkService.class); + RemoveIpFromVmNicCmd removeIpFromNic = Mockito.mock(RemoveIpFromVmNicCmd.class); + + Mockito.when( + networkService.releaseSecondaryIpFromNic(Mockito.anyInt())).thenReturn(false); + + removeIpFromNic._networkService = networkService; + successResponseGenerator = Mockito.mock(SuccessResponse.class); + + try { + removeIpFromNic.execute(); + } catch (InvalidParameterValueException exception) { + Assert.assertEquals("Failed to remove secondary ip address for the nic", + exception.getLocalizedMessage()); + } + } +} diff --git a/api/test/org/apache/cloudstack/api/command/test/AddNetworkServiceProviderCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/AddNetworkServiceProviderCmdTest.java index 0b5798fbe..2046052eb 100644 --- a/api/test/org/apache/cloudstack/api/command/test/AddNetworkServiceProviderCmdTest.java +++ b/api/test/org/apache/cloudstack/api/command/test/AddNetworkServiceProviderCmdTest.java @@ -22,6 +22,7 @@ import junit.framework.Assert; import junit.framework.TestCase; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.command.admin.network.AddNetworkServiceProviderCmd; import org.junit.Before; import org.junit.Rule; @@ -29,7 +30,6 @@ import org.junit.rules.ExpectedException; import org.mockito.Mockito; -import org.apache.cloudstack.api.ServerApiException; import com.cloud.exception.ResourceAllocationException; import com.cloud.network.NetworkService; import com.cloud.network.PhysicalNetworkServiceProvider; diff --git a/api/test/org/apache/cloudstack/api/command/test/AddSecondaryStorageCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/AddSecondaryStorageCmdTest.java index 1cdd76fbf..d6de94dd0 100644 --- a/api/test/org/apache/cloudstack/api/command/test/AddSecondaryStorageCmdTest.java +++ b/api/test/org/apache/cloudstack/api/command/test/AddSecondaryStorageCmdTest.java @@ -19,16 +19,16 @@ import junit.framework.Assert; import junit.framework.TestCase; +import org.apache.cloudstack.api.ResponseGenerator; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.command.admin.host.AddSecondaryStorageCmd; +import org.apache.cloudstack.api.response.HostResponse; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.mockito.Mockito; -import org.apache.cloudstack.api.ResponseGenerator; -import org.apache.cloudstack.api.ServerApiException; -import org.apache.cloudstack.api.response.HostResponse; import com.cloud.host.Host; import com.cloud.resource.ResourceService; diff --git a/api/test/org/apache/cloudstack/api/command/test/AddSwiftCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/AddSwiftCmdTest.java index 34d0baff5..141a2368d 100644 --- a/api/test/org/apache/cloudstack/api/command/test/AddSwiftCmdTest.java +++ b/api/test/org/apache/cloudstack/api/command/test/AddSwiftCmdTest.java @@ -19,16 +19,16 @@ import junit.framework.Assert; import junit.framework.TestCase; +import org.apache.cloudstack.api.ResponseGenerator; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.command.admin.swift.AddSwiftCmd; +import org.apache.cloudstack.api.response.SwiftResponse; import org.junit.Before; import org.junit.Rule; import org.junit.Test; import org.junit.rules.ExpectedException; import org.mockito.Mockito; -import org.apache.cloudstack.api.ResponseGenerator; -import org.apache.cloudstack.api.ServerApiException; -import org.apache.cloudstack.api.response.SwiftResponse; import com.cloud.exception.DiscoveryException; import com.cloud.resource.ResourceService; import com.cloud.storage.Swift; diff --git a/api/test/org/apache/cloudstack/api/command/test/AddVpnUserCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/AddVpnUserCmdTest.java index 78e9d92fc..69b9050ce 100644 --- a/api/test/org/apache/cloudstack/api/command/test/AddVpnUserCmdTest.java +++ b/api/test/org/apache/cloudstack/api/command/test/AddVpnUserCmdTest.java @@ -19,6 +19,7 @@ import junit.framework.Assert; import junit.framework.TestCase; +import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.command.user.vpn.AddVpnUserCmd; import org.junit.Before; import org.junit.Rule; @@ -26,7 +27,6 @@ import org.junit.rules.ExpectedException; import org.mockito.Mockito; -import org.apache.cloudstack.api.ServerApiException; import com.cloud.network.VpnUser; import com.cloud.network.vpn.RemoteAccessVpnService; import com.cloud.user.Account; diff --git a/api/test/org/apache/cloudstack/api/command/test/RegionCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/RegionCmdTest.java new file mode 100644 index 000000000..f57dc0844 --- /dev/null +++ b/api/test/org/apache/cloudstack/api/command/test/RegionCmdTest.java @@ -0,0 +1,104 @@ +// 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 org.apache.cloudstack.api.command.test; + +import junit.framework.Assert; +import junit.framework.TestCase; + +import org.apache.cloudstack.api.ResponseGenerator; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.command.admin.region.AddRegionCmd; +import org.apache.cloudstack.api.response.RegionResponse; +import org.apache.cloudstack.region.Region; +import org.apache.cloudstack.region.RegionService; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.mockito.Mockito; + +public class RegionCmdTest extends TestCase { + + private AddRegionCmd addRegionCmd; + private ResponseGenerator responseGenerator; + + @Rule + public ExpectedException expectedException = ExpectedException.none(); + + @Before + public void setUp() { + + addRegionCmd = new AddRegionCmd() { + + @Override + public Integer getId() { + return 2; + } + + @Override + public String getRegionName() { + return "APAC"; + } + + }; + } + + @Test + public void testCreateSuccess() { + + RegionService regionService = Mockito.mock(RegionService.class); + + Region region = Mockito.mock(Region.class); + Mockito.when( + regionService.addRegion(Mockito.anyInt(), Mockito.anyString(), Mockito.anyString())) + .thenReturn(region); + + addRegionCmd._regionService = regionService; + responseGenerator = Mockito.mock(ResponseGenerator.class); + + RegionResponse regionResponse = Mockito.mock(RegionResponse.class); + + Mockito.when(responseGenerator.createRegionResponse(region)).thenReturn( + regionResponse); + + addRegionCmd._responseGenerator = responseGenerator; + addRegionCmd.execute(); + + } + + @Test + public void testCreateFailure() { + + RegionService regionService = Mockito.mock(RegionService.class); + + Region region = Mockito.mock(Region.class); + Mockito.when( + regionService.addRegion(Mockito.anyInt(), Mockito.anyString(), Mockito.anyString())) + .thenReturn(null); + + addRegionCmd._regionService = regionService; + + try { + addRegionCmd.execute(); + } catch (ServerApiException exception) { + Assert.assertEquals("Failed to add Region", + exception.getDescription()); + } + + } + +} diff --git a/api/test/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java new file mode 100644 index 000000000..301fa02ca --- /dev/null +++ b/api/test/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java @@ -0,0 +1,122 @@ +// 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 org.apache.cloudstack.api.command.test; + +import com.cloud.user.Account; +import com.cloud.user.UserContext; +import com.cloud.uservm.UserVm; +import com.cloud.vm.UserVmService; +import junit.framework.Assert; +import junit.framework.TestCase; +import org.apache.cloudstack.api.ResponseGenerator; +import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.command.admin.region.AddRegionCmd; +import org.apache.cloudstack.api.command.user.vm.ScaleVMCmd; +import org.apache.cloudstack.api.response.RegionResponse; +import org.apache.cloudstack.api.response.UserVmResponse; +import org.apache.cloudstack.region.Region; +import org.apache.cloudstack.region.RegionService; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.mockito.Mockito; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + + +public class ScaleVMCmdTest extends TestCase{ + + private ScaleVMCmd scaleVMCmd; + private ResponseGenerator responseGenerator; + + @Rule + public ExpectedException expectedException = ExpectedException.none(); + + @Before + public void setUp() { + + scaleVMCmd = new ScaleVMCmd(){ + @Override + public Long getId() { + return 2L; + } + }; + + //Account account = new AccountVO("testaccount", 1L, "networkdomain", (short) 0, "uuid"); + //UserContext.registerContext(1, account, null, true); + + + } + + + @Test + public void testCreateSuccess() { + + UserVmService userVmService = Mockito.mock(UserVmService.class); + + UserVm uservm = Mockito.mock(UserVm.class); + try { + Mockito.when( + userVmService.upgradeVirtualMachine(scaleVMCmd)) + .thenReturn(uservm); + }catch (Exception e){ + Assert.fail("Received exception when success expected " +e.getMessage()); + } + + scaleVMCmd._userVmService = userVmService; + responseGenerator = Mockito.mock(ResponseGenerator.class); + + UserVmResponse userVmResponse = Mockito.mock(UserVmResponse.class); + List responseList = new ArrayList(); + responseList.add(userVmResponse); + + Mockito.when(responseGenerator.createUserVmResponse("virtualmachine",uservm)) + .thenReturn(responseList); + + scaleVMCmd._responseGenerator = responseGenerator; + scaleVMCmd.execute(); + + } + + @Test + public void testCreateFailure() { + + UserVmService userVmService = Mockito.mock(UserVmService.class); + + try { + UserVm uservm = Mockito.mock(UserVm.class); + Mockito.when( + userVmService.upgradeVirtualMachine(scaleVMCmd)) + .thenReturn(null); + }catch (Exception e){ + Assert.fail("Received exception when success expected " +e.getMessage()); + } + + scaleVMCmd._userVmService = userVmService; + + try { + scaleVMCmd.execute(); + } catch (ServerApiException exception) { + Assert.assertEquals("Failed to scale vm", + exception.getDescription()); + } + + } +} diff --git a/api/test/org/apache/cloudstack/api/command/test/UsageCmdTest.java b/api/test/org/apache/cloudstack/api/command/test/UsageCmdTest.java new file mode 100644 index 000000000..1f218f47e --- /dev/null +++ b/api/test/org/apache/cloudstack/api/command/test/UsageCmdTest.java @@ -0,0 +1,69 @@ +// 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 org.apache.cloudstack.api.command.test; + +import junit.framework.TestCase; +import org.apache.cloudstack.api.command.admin.usage.GetUsageRecordsCmd; +import org.apache.cloudstack.usage.Usage; +import org.apache.cloudstack.usage.UsageService; +import org.junit.Before; +import org.junit.Rule; +import org.junit.Test; +import org.junit.rules.ExpectedException; +import org.mockito.Mockito; + +import java.util.ArrayList; +import java.util.List; + +public class UsageCmdTest extends TestCase { + + private GetUsageRecordsCmd getUsageRecordsCmd; + + @Rule + public ExpectedException expectedException = ExpectedException.none(); + + @Before + public void setUp() { + + getUsageRecordsCmd = new GetUsageRecordsCmd() { + + }; + } + + @Test + public void testExecuteSuccess() { + UsageService usageService = Mockito.mock(UsageService.class); + getUsageRecordsCmd._usageService = usageService; + getUsageRecordsCmd.execute(); + } + + @Test + public void testExecuteEmptyResult() { + + UsageService usageService = Mockito.mock(UsageService.class); + + List usageRecords = new ArrayList(); + + Mockito.when(usageService.getUsageRecords(getUsageRecordsCmd)).thenReturn( + usageRecords); + + getUsageRecordsCmd._usageService = usageService; + getUsageRecordsCmd.execute(); + + } + +} diff --git a/api/test/src/com/cloud/agent/api/test/ResizeVolumeCommandTest.java b/api/test/src/com/cloud/agent/api/test/ResizeVolumeCommandTest.java index 2d248b2f5..02085f577 100644 --- a/api/test/src/com/cloud/agent/api/test/ResizeVolumeCommandTest.java +++ b/api/test/src/com/cloud/agent/api/test/ResizeVolumeCommandTest.java @@ -17,8 +17,8 @@ package src.com.cloud.agent.api.test; import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import java.text.ParseException; import java.text.SimpleDateFormat; @@ -28,91 +28,121 @@ import com.cloud.agent.api.storage.ResizeVolumeCommand; import com.cloud.agent.api.to.StorageFilerTO; -import com.cloud.storage.StoragePool; import com.cloud.storage.Storage.StoragePoolType; +import com.cloud.storage.StoragePool; import com.cloud.storage.StoragePoolStatus; public class ResizeVolumeCommandTest { public StoragePool dummypool = new StoragePool() { + @Override public long getId() { return 1L; }; + @Override public String getName() { return "name"; }; + @Override public String getUuid() { return "bed9f83e-cac3-11e1-ac8a-0050568b007e"; }; + @Override public StoragePoolType getPoolType() { return StoragePoolType.Filesystem; }; + @Override public Date getCreated() { Date date = null; try { date = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss") - .parse("01/01/1970 12:12:12"); + .parse("01/01/1970 12:12:12"); } catch (ParseException e) { e.printStackTrace(); } return date; } + @Override public Date getUpdateTime() { return new Date(); }; + @Override public long getDataCenterId() { return 0L; }; + @Override public long getCapacityBytes() { return 0L; }; + @Override public long getAvailableBytes() { return 0L; }; + @Override public Long getClusterId() { return 0L; }; + @Override public String getHostAddress() { return "hostAddress"; }; + @Override public String getPath() { return "path"; }; + @Override public String getUserInfo() { return "userInfo"; }; + @Override public boolean isShared() { return false; }; + @Override public boolean isLocal() { return false; }; + @Override public StoragePoolStatus getStatus() { return StoragePoolStatus.Up; }; + @Override public int getPort() { return 25; }; + @Override public Long getPodId() { return 0L; + } + + @Override + public String getStorageProviderName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isInMaintenance() { + // TODO Auto-generated method stub + return false; }; }; diff --git a/awsapi-setup/setup/cloud-setup-bridge b/awsapi-setup/setup/cloud-setup-bridge index d25072da1..d456387b4 100644 --- a/awsapi-setup/setup/cloud-setup-bridge +++ b/awsapi-setup/setup/cloud-setup-bridge @@ -20,7 +20,7 @@ # Cloud.com Bridge setup script. # -settingsFile="/usr/share/cloud/bridge/conf/ec2-service.properties" +settingsFile="/etc/cloudstack/management/ec2-service.properties" function readCurrentSettings () { readVar managementServer diff --git a/awsapi/conf/applicationContext.xml.in b/awsapi/conf/applicationContext.xml.in new file mode 100644 index 000000000..8b3a02222 --- /dev/null +++ b/awsapi/conf/applicationContext.xml.in @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/awsapi/conf/cloud-bridge.properties b/awsapi/conf/cloud-bridge.properties.in similarity index 100% rename from awsapi/conf/cloud-bridge.properties rename to awsapi/conf/cloud-bridge.properties.in diff --git a/awsapi/conf/ec2-service.properties b/awsapi/conf/ec2-service.properties.in similarity index 100% rename from awsapi/conf/ec2-service.properties rename to awsapi/conf/ec2-service.properties.in diff --git a/awsapi/modules/.gitignore b/awsapi/modules/.gitignore deleted file mode 100644 index 68b3d4313..000000000 --- a/awsapi/modules/.gitignore +++ /dev/null @@ -1,54 +0,0 @@ -# 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. - -build/replace.properties -build/build.number -bin/ -cloudstack-proprietary/ -premium/ -.lock-wscript -artifacts/ -.waf-* -waf-* -target/ -override/ -.metadata -dist/ -*~ -*.bak -cloud-*.tar.bz2 -*.log -*.pyc -build.number -api.log.*.gz -cloud.log.*.* -unittest -deps/cloud.userlibraries -deps/awsapi-lib/ -.DS_Store -.idea -*.iml -git-remote-https.exe.stackdump -*.swp -tools/devcloud/devcloudbox/.vagrant -deps/*.jar -deps/*.war -deps/*.mar -*.jar -awsapi/modules/* -!.gitignore - diff --git a/awsapi/pom.xml b/awsapi/pom.xml index 3ab595211..f19a71381 100644 --- a/awsapi/pom.xml +++ b/awsapi/pom.xml @@ -24,7 +24,7 @@ org.apache.cloudstack cloudstack - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT @@ -302,8 +302,20 @@ ../utils/conf/ + + ${basedir}/resource/AmazonEC2 + + + org.apache.maven.plugins + maven-war-plugin + 2.3 + + ./web/web.xml + ./target/generated-webapp + + org.mortbay.jetty maven-jetty-plugin @@ -317,9 +329,40 @@ /awsapi ${basedir}/web/web.xml - ${basedir}/target/cloud-awsapi-${project.version} + ${basedir}/target/generated-webapp - + + + maven-antrun-plugin + 1.7 + + + generate-resource + generate-resources + + run + + + + + + + + + + + + + + + + + + + - CloudBridgeEC2Servlet + EC2RestServlet /rest/AmazonEC2/* - CloudBridgeEC2Servlet + EC2RestServlet /rest/AmazonEC2 diff --git a/build.xml b/build.xml deleted file mode 100755 index b013518ac..000000000 --- a/build.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - - This is the overall dispatch file. It includes other build - files but doesnot provide targets of its own. Do not modify - this file. If you need to create your own targets, modify the - developer.xml. - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/.gitignore b/build/.gitignore deleted file mode 100644 index d11410db1..000000000 --- a/build/.gitignore +++ /dev/null @@ -1,18 +0,0 @@ -# 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. - -/override diff --git a/build/build-aws-api.properties b/build/build-aws-api.properties deleted file mode 100644 index 0a02d1b55..000000000 --- a/build/build-aws-api.properties +++ /dev/null @@ -1,28 +0,0 @@ -# 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. - -company.major.version=1 -company.minor.version=0 -company.patch.version=8 - -target.compat.version=1.6 -source.compat.version=1.6 - -debug=true -build.type=developer -debuglevel=lines,source,vars -deprecation=off diff --git a/build/build-aws-api.xml b/build/build-aws-api.xml deleted file mode 100644 index 40ad22c26..000000000 --- a/build/build-aws-api.xml +++ /dev/null @@ -1,478 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/build-cloud-plugins.xml b/build/build-cloud-plugins.xml deleted file mode 100755 index 207ef7113..000000000 --- a/build/build-cloud-plugins.xml +++ /dev/null @@ -1,328 +0,0 @@ - - - - - - - - - - - - - Cloud Stack ant build file for building all the plugins - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/build-cloud.properties b/build/build-cloud.properties deleted file mode 100755 index be67a368f..000000000 --- a/build/build-cloud.properties +++ /dev/null @@ -1,26 +0,0 @@ -# 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. - -debug=true -debuglevel=lines,source,vars -debug.jvmarg=-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n -deprecation=off -build.type=developer -target.compat.version=1.6 -source.compat.version=1.6 -branding.name=default -ssvm.include.vmware.jar=true diff --git a/build/build-cloud.xml b/build/build-cloud.xml deleted file mode 100755 index c31d00da2..000000000 --- a/build/build-cloud.xml +++ /dev/null @@ -1,595 +0,0 @@ - - - - - - - Cloud Stack ant build file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/build-common.xml b/build/build-common.xml deleted file mode 100755 index 7240f5323..000000000 --- a/build/build-common.xml +++ /dev/null @@ -1,100 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/build-devcloud.xml b/build/build-devcloud.xml deleted file mode 100644 index a001dc2dd..000000000 --- a/build/build-devcloud.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/build-docs.xml b/build/build-docs.xml deleted file mode 100755 index c38b986ed..000000000 --- a/build/build-docs.xml +++ /dev/null @@ -1,82 +0,0 @@ - - - - - - - Cloud Stack ant build file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/build-marvin.xml b/build/build-marvin.xml deleted file mode 100644 index 6daac03f2..000000000 --- a/build/build-marvin.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - - - - This build file contains simple targets that - - build - - package - - distribute - the Marvin test client written in python - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/build-tests.xml b/build/build-tests.xml deleted file mode 100755 index 5f41ba278..000000000 --- a/build/build-tests.xml +++ /dev/null @@ -1,319 +0,0 @@ - - - - - - - Cloud Stack ant build file - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - - -
-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - diff --git a/build/build-usage.xml b/build/build-usage.xml deleted file mode 100644 index 9940f46ed..000000000 --- a/build/build-usage.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - - - Cloud Stack Usage server build - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/cloud.properties b/build/cloud.properties deleted file mode 100755 index e3cddf777..000000000 --- a/build/cloud.properties +++ /dev/null @@ -1,29 +0,0 @@ -# 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. - -# major.minor.patch versioning scheme for CloudStack -company.major.version=4 -company.minor.version=0 -company.patch.version=0 - -svn.revision=2 - -# copyright year -company.copyright.year=2012 -company.url=http://cloudstack.org -company.license.name=Apache License, Version 2.0 -company.name=CloudStack diff --git a/build/developer.xml b/build/developer.xml deleted file mode 100755 index fdda171af..000000000 --- a/build/developer.xml +++ /dev/null @@ -1,431 +0,0 @@ - - - - - - - This is a developer.xml with tools to start and stop tomcat and - generally developer targets that has nothing to do with compiling. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - password - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/overview.html b/build/overview.html deleted file mode 100755 index 22f349fe1..000000000 --- a/build/overview.html +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - -

- -VMOps source javadoc. - -

-Javadoc for JUnit tests -is also available. -

- - - diff --git a/build/package.xml b/build/package.xml deleted file mode 100755 index 3efdd7dda..000000000 --- a/build/package.xml +++ /dev/null @@ -1,305 +0,0 @@ - - - - - - - This is a package.xml with tools to package the cloud stack distribution - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/release-notes b/build/release-notes deleted file mode 100644 index 34b20803a..000000000 --- a/build/release-notes +++ /dev/null @@ -1,328 +0,0 @@ -******************************************************************************** - VMOps Cloud Stack Version 0.4 - Release Notes -******************************************************************************** - -================================= -WHAT'S NEW : -================================= - -* NIC bonding support for the Computing, Routing, and Storage nodes to take -advantage of the multiple NICS installed on the server. -* Maintenance Mode support for physical servers. Administrators now have the -option to enable or disable maintenance mode on any physical servers. Enabling -maintenance mode on a Routing or Computing node will result in the seamless live -migration of guest virtual machines into other physical servers within the same -zone before making the server available for maintenance. -* Introduction of a new user web interface for allowing user accounts to manage -their own virtual machines. This new interface has a brand new look and feel, -allows for easier branding and customization, and is easier to incorporate into -existing web interfaces. -* Added support for the creation of Reseller Domains. The Reseller Domain -feature allows host providers to create resellers complete with their own -user base and administrators while using the same global computing resources -provided by the host provider. -* Added a new email alerting system that will now inform administrators of -events such as when physical servers are down or computing resources are -passing a pre-configured threshold. -* Massive improvements to the existing Developer and Integration API. Error -codes have now been added and existing API method names and parameters have been -made more consistent. A JSON format can also now be optionally -returned in addition to the existing XML format. Please read the new API -Reference documentation for more details on the changes. -* Billing records have now been changed to Usage records to provide data for -both billing integration and usage metering. Price has been completely removed -from VMOps. Instead we added ability to set your own display text for both -service offering and templates. You can now use this to set any text for the UI -to display. -* New virtual machines deployed will now generate a random password. A reset -password is also now available both in the web user interface as well as the -API. We support both Linux and Windows OS based templates. -* Storage server is now a bare-bone installation and uses the new COMSTAR iSCSI -stack for improved performance. We recognized that while running the storage -server as a virtual machine does allows for more hardware support, it severely -impacts performance. The list of compatible hardware can be found in the Open -Solaris website. -* Added clustering support for the VMOps Management Server. -* Added the ability to configure an additional storage ip address (separate -subnet) for both Routing and Computing servers. If a server is configured with -an additional storage ip, all storage traffic will route through this subnet and -all network/internet traffic will route through the existing private network. -* Added concept of a user account. VMOps supports multiple username for a -single user account. -* Created new installers for the VMOps MultiTenant Hypervisor and the VMOps -Storage. - -================================= -KNOWN ISSUES : -================================= - -* DomR is still counting internal network activities as part of the usage that -is being returned by the API. -* The reset password for virtual machine feature does not return an error if it -fails to successfully reset the password. -* VMOps installation scripts to not validate bad network configuration values. -* VNX Proxy Server does not handle rapid refreshes of web console proxy well. -* VNC Proxy Server at times do not return a thumbnail image. -* Rebooting a DomR instance will cause network traffic to not be collected. -* Associating new IP addresses should clean out existing LB or PF rules before -assigning it to a DomR instance. -* The Usage parse engine needs to be split out from the VMOps Management Server -so that only a single instance of this can be running and does not affect -normal operations. -* Templates needs a way of specifying the minimum CPU and Memory requirements. -* createUser API method currently allows you to assign users to admin accounts. -* Installations of servers with more than 3 NIC sometimes duplicates the MAC -address on the ifcfg configuration files. -* Additional admin only API methods are missing (ie. Domain management, router -management). -* Usage parse engine could go OOM in the event it has not been run recently -and there are a large (2 million+ records). -* Problem with domU when both e1000 and e1000e used as a NIC drivers for a -Computing Server. The installer needs to blacklist one of the drivers. -* vnet failures and xen crashes currently do not generate an alert to the administrator. -* The current limit for domU instances created on a Computing Server is 64 and -the currently limit for domR instances created is 59 on a Routing Server. -* No current way of allowing different subnets for different pods within the -same zone. -* limit the number of usage and event records returned by the API. A large -enough of the query could cause the Management Server to go oom. - -================================= -BUG FIXES : -================================= - -* Improved transactions across both database calls and calls across agents. -* Fixed an issue where duplicate IP or LB rules could be sent to the DomR -instance during a DomR restart. -* Removed requirement of the reverse DNS lookup for the Storage Server. -* Massive improvements to the HA process. -* Fixed an issue where the it would take too long for the management server -to detect a TCP disconnect. -* Fixed an issue where the the agent would *think* it has connected to the -management server but in reality, it is just stuck waiting for a response that -will never come. -* Generic DB lock wait timeout fixes. -* Improvements to the general state management of the servers. -* Fixed issue where where physical servers with the same IP attempts to connect -to the Management Server. The second server is now prevented from registering. -* Fixed an issue where deleting a user from an account would result in all the -virtual machines to be cleaned up. This can only happen if the last user for -an account has been deleted. -* Fixed an issue where the source NAT ip address of a DomR instance is being -released back into the public pool even though the DomR instance was not -successfully destroyed. -* Fixed an issue where a guest virtual machine cannot be destroyed while in HA -state. -* Removed requirement to specify the storage type when installing a new tempate. -* Fixed an issue where the console proxy from different zones are all starting -in the same zone. -* Fixed an issue where the listing of virtual machines would hang if the console -proxy is not even started. -* Massive improvements to our installer scripts. -* Massive improvements to the general stability of the Cloud Stack. -* Fixed an issue where the Hypervisor installer is unable to install onto -machines with a IPMI card. -* As usual, there are too many bug fixes to list... - -******************************************************************************** - VMOps Cloud Stack Version 0.3.xxxx - Release Notes -******************************************************************************** - -================================= -WHAT'S NEW : -================================= - -* Introduction of VMOps Developer API. This allows users of the VMOps Cloud - Stack to manage their virtual machines through a set of REST-like API. -* Improved collection of user usage data that can be used for both billing - aggregation and metric collection. -* High availability support for user virtual machines. -* Support for automatic hypervisor agent software update. -* VNC console proxy servers can now run as managed VMOps system VMs. The new - implementation provides features such as on-demand VM startup, standby - capacity pre-allocation and console proxy load monitoring. -* Much Improved VMOps Cloud Stack installation process. VMOps Cloud Stack can - now be installed with a minimum of two physical servers. -* VMOps Cloud Stack installation DVD now comes in two flavors. VMOps Cloud Stack - Management Server Installation DVD and VMOps Cloud Stack Multitenant - Hypervisor Installation DVD. - -================================= -KNOWN ISSUES : -================================= - -* PV drivers for Windows 2003 and Windows 2003 x86_64 (Incomplete Feature) -* GUI panel for allowing administrators to set various system configurations - - i.e. zones, pods, ip addresses (Incomplete Feature) -* Support for multiple NIC cards on computing, routing, and storage servers - (Disabled Feature) -* Support for resellers (Incomplete Feature) -* Allow admins/users to specify the root password for their new instance. It - cannot default to root/password (Bug 134) -* Admin/User Dashboard (Bug 154 and 155) -* Dynamically refresh server and vm instance status in GUI without a manual - refresh (Bug 389) -* Need transaction semantics across DB and agent. Without this, it is possible - to timeout db calls that first lock a record and relies on an agent response - before releasing that record. (Bug 408) -* All Server Roles (Mgmt, Computing, Routing, and Storage) require a functioning - eth0 NIC in order to install correctly. (Bug 470) -* Unable to handle HA when an entire Pod is unreachable (Bug 620) -* Improved network traffic reporting (Bug 642) -* Multiple login support a single user account (Bug 589) -* DomR instances continue to run even though all VMs associated with the DomR - are no longer even running. (Bug 617) -* HA fails when VM and Router for the same user go down at the same time - (Bug 603) - -================================= -BUG FIXES : -================================= - -* Improved Billing data generation (Bug 482) -* Able to create new admins through the admin console UI. (Bug 492) -* Able to create new Service Offerings through the admin console UI (Bug 500) -* Significantly improved the imaging speed when installing VMOps Cloud Stack - (Bug 476) -* Harden DomR Template to prevent unauthorized access -* No longer require eth0 during installation process of the hosts (Bug 490) -* Fixed issue where having multiple NIC cards caused issues (Bug 489) -* Installation UI will now allow you to select to the disk for storage - (Bug 556) -* Installation UI will now allow you to select NIC to use as private, public, - or simply disabled -* Mgmt server will now reflect the status of user vms if the storage server that - hosts the vm's volumes is no longer accessible. (Bug 521) -* Routing and Console Proxy VM will now be HA-enabled by default (Bug 614) -* Console Proxy VM are now automatically managed by the Mgmt Server (Bug 110) -* Template Management from the console admin UI should be improved -* Too many to list... - -******************************************************************************** - VMOps Cloud Stack Version 0.2.6297 - Release Notes -******************************************************************************** - -================================= -WHAT'S NEW : -================================= - -* VMOps Server - - Introduction of VMOps Integration API. This API allows service providers - to provision users and to retrieve billing info and events. It is a simple - query language written on top of HTTP that simply returns results in XML - format. - - Improved VMOps Server installation process. - -* VMOps Multitenant Hypervisor - - Improved VMOps Multitenant Hypervisor installation process. - -================================= -KNOWN ISSUES : -================================= - -* PV drivers for Windows 2003 and Windows 2003 x86_64 (Incomplete Feature) -* Developer, Billing, and Provisioning API (Incomplete Feature) -* Mirroring of disk images on storage servers across pods (Incomplete Feature) -* HA Enabled VMs (Disabled Feature) -* Firewall integration API (Incomplete Feature) -* GUI panel for allowing administrators to set various system configurations - - i.e. zones, pods, ip addresses (Incomplete Feature) -* Support for multiple NIC cards on computing, routing, and storage servers - (Disabled Feature) -* Ability to deploy agent upgrade on VMOps server and have the upgrade - automatically propagated to storage, routing, and computing servers. - (Bug 386) -* Detailed IO stats for storage servers (Bug 94) -* Admin/User Dashboard (Bug 154 and 155) -* OpenSolaris kernel panic (Bug 413) -* Dynamically refresh server and vm instance status in GUI without a manual - refresh (Bug 389) -* Need transaction semantics across DB and agent. Without this, it is possible - to timeout db calls that first lock a record and relies on an agent response - before releasing that record. (Bug 408) -* All Server Roles (Mgmt, Computing, Routing, and Storage) require a functioning - eth0 NIC in order to install correctly. (Bug 470) -* Admin Console UI Templates Tab needs improvement. (Bug 469) -* Unable to create new admins through the admin console UI. (Bug 492) -* Unable to create new Service Offerings through the admin console UI (Bug 500) - -================================= -BUG FIXES : -================================= - -* Added a new XML (server-setup.xml) to configure initial VMOps Server data. - (Bug 430) -* Made installation of the router template easier (Bug 434) -* Deleting a user through the admin UI will now show a progress bar (Bug 428) -* You can no longer any drop down boxes in the search left panel of the console - UI (Bug 439) -* Configured dom0 and domR to no longer do any reverse DNS lookup (Bug 459) -* Fixed installer to handle multiple NIC (Bug 457) -* Missing SDL module in all templates (Bug 449) - -******************************************************************************** - VMOps Cloud Stack Version 0.1.6053 - Release Notes -******************************************************************************** - -================================= -WHAT'S NEW : -================================= - -* VMOps Server - - Complete web UI for both administrators and users to manage VMOps Cloud - Stack. - - Allows administrators to manage the creation of service offerings and set - its pricing along with pricing for network bandwidth, additional public - ips, and vm templates. - - Allows administrators to retrieve billing records and user usages. - - VM Sync - coordinates, manages, and maintains the life cycle of VMOps agents - running on attached computing, routing, and storage hosts. - - VM Template Management - allows administrators to manage and upload hosted - vm templates into VMOps Cloud Stack. - -* VMOps Multitenant Hypervisor - - Designed to allow for the complete isolation of CPU, memory, storage, and - network resources for each user. - • Hypervisor Attached Storage (HAS) – The storage solution that is - integrated within the hypervisor and does not rely on centralized SAN or NAS - to implement storage virtualization. It provides a high performance and - ultra-reliable block storage for virtual machine images - - Hypervisor Aware Network (HAN) – The network solution for VMOps Cloud Stack - that implements the necessary IP address translation and tunneling for the - guest OS running inside the virtual machine. It does not rely on VLAN to - implement any network virtualization and isolation. - -================================= -KNOWN ISSUES : -================================= - -* PV drivers for Windows 2003 and Windows 2003 x86_64 (Incomplete Feature) -* Developer, Billing, and Provisioning API (Incomplete Feature) -* Mirroring of disk images on storage servers across pods (Incomplete Feature) -* HA Enabled VMs (Disabled Feature) -* Firewall integration API (Incomplete Feature) -* GUI panel for allowing administrators to set various system configurations - - i.e. zones, pods, ip addresses (Incomplete Feature) -* Support for multiple NIC cards on computing, routing, and storage servers - (Disabled Feature) -* Ability to deploy agent upgrade on VMOps server and have the upgrade - automatically propagated to storage, routing, and computing servers. - (Bug 386) -* Detailed IO stats for storage servers (Bug 94) -* Admin/User Dashboard (Bug 154 and 155) -* OpenSolaris kernel panic (Bug 413) -* Dynamically refresh server and vm instance status in GUI without a manual - refresh (Bug 389) -* Need transaction semantics across DB and agent. Without this, it is possible - to timeout db calls that first lock a record and relies on an agent response - before releasing that record. (Bug 408) - -================================= -BUG FIXES : -================================= - -* N/A \ No newline at end of file diff --git a/build/replace.properties b/build/replace.properties index c9a93c283..265f33587 100644 --- a/build/replace.properties +++ b/build/replace.properties @@ -27,3 +27,4 @@ MSMNTDIR=/mnt COMPONENTS-SPEC=components.xml AWSAPILOG=awsapi.log REMOTEHOST=localhost +COMMONLIBDIR=C:\Users\htrippaers\eclipse_workspace\cloudstack\client\target\cloud-client-ui-4.2.0-SNAPSHOT\WEB-INF\classes diff --git a/client/WEB-INF/classes/resources/messages.properties b/client/WEB-INF/classes/resources/messages.properties index eda077821..d62cbaeb9 100644 --- a/client/WEB-INF/classes/resources/messages.properties +++ b/client/WEB-INF/classes/resources/messages.properties @@ -17,6 +17,28 @@ #new labels (begin) ********************************************************************************************** +message.redirecting.region=Redirecting to region... +label.use.vm.ip=Use VM IP: +label.cpu.limits=CPU limits +label.memory.limits=Memory limits (MiB) +label.primary.storage.limits=Primary Storage limits (GiB) +label.secondary.storage.limits=Secondary Storage limits (GiB) +label.max.cpus=Max. CPU cores +label.max.memory=Max. memory (MiB) +label.max.primary.storage=Max. primary (GiB) +label.max.secondary.storage=Max. secondary (GiB) +label.menu.regions=Regions +label.region=Region +label.add.region=Add Region +label.remove.region=Remove Region +message.remove.region=Are you sure you want to remove this region from this management server? +message.add.region=Please specify the required information to add a new region. +label.endpoint=Endpoint +label.plugins=Plugins +label.plugin.details=Plugin details +label.author.name=Author name +label.author.email=Author e-mail +label.external.link=External link label.egress.rules=Egress rules message.acquire.new.ip.vpc=Please confirm that you would like to acquire a new IP for this VPC. label.zoneWizard.trafficType.management=Management: Traffic between CloudStack\'s internal resources, including any components that communicate with the Management Server, such as hosts and CloudStack system VMs @@ -1139,6 +1161,7 @@ label.lang.chinese=Chinese (Simplified) label.lang.english=English label.lang.japanese=Japanese label.lang.spanish=Spanish +label.lang.korean=Korean label.lang.russian=Russian label.lang.french=French label.lang.brportugese=Brazilian Portugese @@ -1409,6 +1432,20 @@ label.zone.step.4.title=Step 4: Add an IP range label.zone.wide=Zone-Wide label.zone=Zone +#VM snapshot label +label.vmsnapshot=VM Snapshots +label.vmsnapshot.type=Type +label.vmsnapshot.parentname=Parent +label.vmsnapshot.current=isCurrent +label.vmsnapshot.memory=Snapshot memory +message.action.vmsnapshot.delete=Please confirm that you want to delete this VM snapshot. +label.action.vmsnapshot.delete=Delete VM snapshot +label.action.vmsnapshot.revert=Revert to VM snapshot +message.action.vmsnapshot.revert=Revert VM snapshot +label.action.vmsnapshot.create=Take VM Snapshot + + + #Messages message.acquire.public.ip=Please select a zone from which you want to acquire your new IP from. message.action.cancel.maintenance.mode=Please confirm that you want to cancel this maintenance. @@ -1545,3 +1582,13 @@ label.nicira.controller.address=Controller Address label.nicira.transportzoneuuid=Transport Zone Uuid label.nicira.l3gatewayserviceuuid=L3 Gateway Service Uuid +label.add.BigSwitchVns.device=Add BigSwitch Vns Controller +label.delete.BigSwitchVns=Remove BigSwitch Vns Controller +label.bigswitch.controller.address=BigSwitch Vns Controller Address + +#resizeVolumes +label.resize.new.size=New Size(GB) +label.action.resize.volume=Resize Volume +label.action.resize.volume.processing=Resizing Volume.... +label.resize.new.offering.id=New Offering +label.resize.shrink.ok=Shrink OK diff --git a/client/WEB-INF/classes/resources/messages_fr_FR.properties b/client/WEB-INF/classes/resources/messages_fr_FR.properties index 4ba3c7258..267baec02 100644 --- a/client/WEB-INF/classes/resources/messages_fr_FR.properties +++ b/client/WEB-INF/classes/resources/messages_fr_FR.properties @@ -15,1498 +15,1453 @@ # specific language governing permissions and limitations # under the License. - -#new labels (begin) ********************************************************************************************** -# label.isolation.uri=Isolation URI -# label.broadcast.uri=Broadcast URI -#new labels (end) ************************************************************************************************ - - -#modified labels (begin) ***************************************************************************************** -# message.zoneWizard.enable.local.storage=WARNING\: If you enable local storage for this zone, you must do the following, depending on where you would like your system VMs to launch\:

1. If system VMs need to be launched in primary storage, primary storage needs to be added to the zone after creation. You must also start the zone in a disabled state.

2. If system VMs need to be launched in local storage, system.vm.use.local.storage needs to be set to true before you enable the zone.


Would you like to continue? -#modified labels (end) ******************************************************************************************* - -# label.configure.network.ACLs=Configure Network ACLs -# label.network.ACLs=Network ACLs -# label.add.network.ACL=Add network ACL -# label.private.Gateway=Private Gateway -# label.VPC.router.details=VPC router details -# label.VMs.in.tier=VMs in tier -# label.local.storage.enabled=Local storage enabled -# label.tier.details=Tier details -# label.edit.tags=Edit tags -label.action.enable.physical.network=Activer le réseau physique -label.action.disable.physical.network=Désactiver le réseau physique -message.action.enable.physical.network=Confirmer l\'activation de ce réseau physique. -message.action.disable.physical.network=Confirmer la désactivation de ce réseau physique. - -# label.select.tier=Select Tier -# label.add.ACL=Add ACL -# label.remove.ACL=Remove ACL -# label.tier=Tier -# label.network.ACL=Network ACL -# label.network.ACL.total=Network ACL Total -# label.add.new.gateway=Add new gateway -# message.add.new.gateway.to.vpc=Please specify the information to add a new gateway to this VPC. -# label.delete.gateway=delete gateway -# message.delete.gateway=Please confirm you want to delete the gateway -# label.CIDR.of.destination.network=CIDR of destination network -# label.add.route=Add route -# label.add.static.route=Add static route -# label.remove.static.route=Remove static route -# label.site.to.site.VPN=site-to-site VPN -# label.add.VPN.gateway=Add VPN Gateway -# message.add.VPN.gateway=Please confirm that you want to add a VPN Gateway -# label.VPN.gateway=VPN Gateway -# label.delete.VPN.gateway=delete VPN Gateway -# message.delete.VPN.gateway=Please confirm that you want to delete this VPN Gateway -# label.VPN.connection=VPN Connection -# label.IPsec.preshared.key=IPsec Preshared-Key -# label.IKE.policy=IKE policy -# label.ESP.policy=ESP policy -# label.create.VPN.connection=Create VPN Connection -# label.VPN.customer.gateway=VPN Customer Gateway -# label.CIDR.list=CIDR list -# label.IKE.lifetime=IKE Lifetime (second) -# label.ESP.lifetime=ESP Lifetime(second) -# label.dead.peer.detection=Dead Peer Detection -# label.reset.VPN.connection=Reset VPN connection -# message.reset.VPN.connection=Please confirm that you want to reset VPN connection -# label.delete.VPN.connection=delete VPN connection -# message.delete.VPN.connection=Please confirm that you want to delete VPN connection -# label.add.new.tier=Add new tier -# label.add.VM.to.tier=Add VM to tier -# label.remove.tier=Remove tier - -# label.local.storage.enabled=Local storage enabled -# label.associated.network=Associated Network -# label.add.port.forwarding.rule=Add port forwarding rule -# label.dns=DNS - -# label.vpc=VPC -# label.vpc.id=VPC ID -# label.tier=Tier -# label.add.vpc=Add VPC -# label.super.cidr.for.guest.networks=Super CIDR for Guest Networks -# label.DNS.domain.for.guest.networks=DNS domain for Guest Networks -# label.configure.vpc=Configure VPC -# label.edit.vpc=Edit VPC -# label.restart.vpc=restart VPC -# message.restart.vpc=Please confirm that you want to restart the VPC -# label.remove.vpc=remove VPC -# message.remove.vpc=Please confirm that you want to remove the VPC -# label.vpn.customer.gateway=VPN Customer Gateway -# label.add.vpn.customer.gateway=Add VPN Customer Gateway -# label.IKE.encryption=IKE Encryption -# label.IKE.hash=IKE Hash -# label.IKE.DH=IKE DH -# label.ESP.encryption=ESP Encryption -# label.ESP.hash=ESP Hash -# label.perfect.forward.secrecy=Perfect Forward Secrecy -# label.IKE.lifetime=IKE Lifetime (second) -# label.ESP.lifetime=ESP Lifetime(second) -# label.dead.peer.detection=Dead Peer Detection -# label.delete.VPN.customer.gateway=delete VPN Customer Gateway -# message.delete.VPN.customer.gateway=Please confirm that you want to delete this VPN Customer Gateway - -label.network.domain.text=Texte du domaine réseau -label.memory.mb=Mémoire -label.cpu.mhz=CPU (en MHz) - -message.action.remove.host=Supprimer le dernier/seul hôte dans le cluster et le réinstaller va supprimer l\'environnement/la base de données sur l\'hôte et rendre les VMs invitées inutilisables. - -message.action.reboot.router=Confirmez que vous souhaitez redémarrer ce routeur. -message.action.stop.router=Confirmez que vous souhaitez arrêter ce routeur. -message.restart.network=Confirmer le redémarrage du réseau - - -label.ipaddress=Adresse IP -label.vcdcname=Nom du DC vCenter -label.vcipaddress=Adresse IP vCenter -label.vsmctrlvlanid=VLAN ID Controle -label.vsmpktvlanid=VLAN ID Paquet -label.vsmstoragevlanid=VLAN ID Stockage -label.nexusVswitch=Nexus Vswitch -label.action.delete.nexusVswitch=Supprimer le NexusVswitch -label.action.enable.nexusVswitch=Activer le NexusVswitch -label.action.disable.nexusVswitch=Désactiver le NexusVswitch -label.action.list.nexusVswitch=Lister les NexusVswitch -message.action.delete.nexusVswitch=Confirmer la suppression de ce NexusVswitch. -message.action.enable.nexusVswitch=Confirmer l\'activation de ce NexusVswitch. -message.action.disable.nexusVswitch=Confirmer la désactivation de ce NexusVswitch. -message.specify.url=Renseigner l\'URL -label.select.instance.to.attach.volume.to=Sélectionner l\'instance à laquelle rattacher ce volume -label.upload=Charger -label.upload.volume=Charger un volume -label.virtual.routers=Routeurs virtuels -label.primary.storage.count=Groupes de stockage primaire -label.secondary.storage.count=Groupes de stokage secondaire -label.number.of.system.vms=Nombre de VM système -label.number.of.virtual.routers=Nombre de routeurs virtuels -label.action.register.iso=Enregistrer ISO -label.isolation.method=Méthode de séparation -label.action.register.template=Enregister image -label.checksum=Checksum MD5 -label.vpn=VPN -label.vlan=VLAN - - -label.management.ips=Adresses IP de management -label.devices=Machines -label.rules=Règles -label.traffic.label=Label trafic -label.vm.state=Etat VM -# message.setup.physical.network.during.zone.creation.basic=When adding a basic zone, you can set up one physical network, which corresponds to a NIC on the hypervisor. The network carries several types of traffic.

You may also drag and drop other traffic types onto the physical network. -label.domain.router=Routeur du domaine -label.console.proxy=Console proxy -label.secondary.storage.vm=VM stockage secondaire -label.add.netScaler.device=Ajouter un Netscaler -label.add.F5.device=Ajouter un F5 -label.add.SRX.device=Ajouter un SRX -label.account.and.security.group=Compte, groupe de sécurité -label.fetch.latest=Raffraichir -label.system.offering=Offre système -message.validate.instance.name=le nom de l\'instance de l\'instance ne peut dépasser 63 caractères. Seuls les lettres de a à z, les chiffres de 0 à 9 et les tirets sont acceptés. Le nom doit commencer par une lettre et se terminer par une lettre ou un chiffre. - - -label.isolated.networks=Réseaux isolés -label.latest.events=Derniers évenements -state.Enabled=Actifs -label.system.wide.capacity=Capacité globale -label.network.service.providers=Provider de réseau -message.launch.zone=La zone est prête à démarrer; Continuer. -error.unable.to.reach.management.server=Impossible de joindre le serveur de management -label.internal.name=Nom interne -message.configure.all.traffic.types=Vous avez de multiples réseaux physiques; veuillez configurer les labels pour chaque type de trafic en cliquant sur le bouton Modifier. -message.edit.traffic.type=Spécifier le label de trafic associé avec ce type de trafic -label.edit.traffic.type=Modifer le type de trafic -label.label=Label -label.max.networks=Réseaux Max. -error.invalid.username.password=Utilisateur ou mot de passe invalide -message.enabling.security.group.provider=Activation du groupe de sécurité pour le provider -message.adding.Netscaler.provider=Ajouter un Netscaler provider -message.creating.guest.network=Création du réseau pour les instances -label.action.delete.physical.network=Supprimer le réseau physique -message.action.delete.physical.network=Confirmer la suppression du réseau physique -# message.installWizard.copy.whatIsAHost=A host is a single computer. Hosts provide the computing resources that run the guest virtual machines. Each host has hypervisor software installed on it to manage the guest VMs (except for bare metal hosts, which are a special case discussed in the Advanced Installation Guide). For example, a Linux KVM-enabled server, a Citrix XenServer server, and an ESXi server are hosts. In a Basic Installation, we use a single host running XenServer or KVM.

The host is the smallest organizational unit within a CloudStack&\#8482; deployment. Hosts are contained within clusters, clusters are contained within pods, and pods are contained within zones. - - -label.add.compute.offering=Ajouter une offre de calcul -label.compute.offering=Offre de calcul -label.compute.offerings=Offres de calcul -label.select.offering=Choisir une offre -label.menu.infrastructure=Infrastructure -label.sticky.tablesize=Taille du tableau -label.sticky.expire=Expiration -label.sticky.cookie-name=Nom du cookie -label.sticky.mode=Mode -label.sticky.length=Longueur -label.sticky.holdtime=Temps de pause -label.sticky.request-learn=Apprendre la requête -label.sticky.prefix=Préfixe -label.sticky.nocache=Pas de cache -label.sticky.indirect=Indirect -label.sticky.postonly=Après seulement -label.sticky.domain=Domaine -state.Allocating=Allocation en cours -state.Migrating=Migration en cours -error.please.specify.physical.network.tags=L\'offre réseau ne sera pas disponible tant que des label n\'auront pas été renseigner pour ce réseau physique. - - -state.Stopping=Arrêt en cours -message.add.load.balancer.under.ip=La règle de load balancer a été ajoutée sous l\'adresse IP \: -message.select.instance=Sélectionner une instance. -label.select=Selectionner -label.select.vm.for.static.nat=Sélectionner une VM pour le NAT statique -label.select.instance=Sélectionner une instance. -label.nat.port.range=Plage de port NAT -label.static.nat.vm.details=NAT statique, détails par VM -label.edit.lb.rule=Modifier la règle LB -message.migrate.instance.to.host=Merci de confirmer la migration de l\'instance vers un autre serveur -label.migrate.instance.to.host=Migration de l\'instance sur un autre serveur -message.migrate.instance.to.ps=Merci de confirmer la migration de l\'instance vers un autre stockage primaire -label.migrate.instance.to.ps=Migration de l\'instance sur un autre stockage primaire -label.corrections.saved=Modifications enregistrées -# message.installWizard.copy.whatIsSecondaryStorage=Secondary storage is associated with a zone, and it stores the following\:
  • Templates - OS images that can be used to boot VMs and can include additional configuration information, such as installed applications
  • ISO images - OS images that can be bootable or non-bootable
  • Disk volume snapshots - saved copies of VM data which can be used for data recovery or to create new templates
-# message.installWizard.copy.whatIsPrimaryStorage=A CloudStack&\#8482; cloud infrastructure makes use of two types of storage\: primary storage and secondary storage. Both of these can be iSCSI or NFS servers, or localdisk.

Primary storage is associated with a cluster, and it stores the disk volumes of each guest VM for all the VMs running on hosts in that cluster. The primary storage server is typically located close to the hosts. -# message.installWizard.copy.whatIsACluster=A cluster provides a way to group hosts. The hosts in a cluster all have identical hardware, run the same hypervisor, are on the same subnet, and access the same shared storage. Virtual machine instances (VMs) can be live-migrated from one host to another within the same cluster, without interrupting service to the user. A cluster is the third-largest organizational unit within a CloudStack&\#8482; deployment. Clusters are contained within pods, and pods are contained within zones.

CloudStack&\#8482; allows multiple clusters in a cloud deployment, but for a Basic Installation, we only need one cluster. -# message.installWizard.copy.whatIsAPod=A pod often represents a single rack. Hosts in the same pod are in the same subnet.

A pod is the second-largest organizational unit within a CloudStack&\#8482; deployment. Pods are contained within zones. Each zone can contain one or more pods; in the Basic Installation, you will have just one pod in your zone. -# message.installWizard.copy.whatIsAZone=A zone is the largest organizational unit within a CloudStack&\#8482; deployment. A zone typically corresponds to a single datacenter, although it is permissible to have multiple zones in a datacenter. The benefit of organizing infrastructure into zones is to provide physical isolation and redundancy. For example, each zone can have its own power supply and network uplink, and the zones can be widely separated geographically (though this is not required). -# message.installWizard.copy.whatIsCloudStack=CloudStack&\#8482 is a software platform that pools computing resources to build public, private, and hybrid Infrastructure as a Service (IaaS) clouds. CloudStack&\#8482 manages the network, storage, and compute nodes that make up a cloud infrastructure. Use CloudStack&\#8482 to deploy, manage, and configure cloud computing environments.

Extending beyond individual virtual machine images running on commodity hardware, CloudStack&\#8482 provides a turnkey cloud infrastructure software stack for delivering virtual datacenters as a service - delivering all of the essential components to build, deploy, and manage multi-tier and multi-tenant cloud applications. Both open-source and Premium versions are available, with the open-source version offering nearly identical features. -message.installWizard.tooltip.addSecondaryStorage.path=Le chemin exporté, situé sur le serveur spécifié précédement -message.installWizard.tooltip.addSecondaryStorage.nfsServer=Adresse IP du server NFS supportant le stockage secondaire -# message.installWizard.tooltip.addPrimaryStorage.path=(for NFS) In NFS this is the exported path from the server. Path (for SharedMountPoint). With KVM this is the path on each host that is where this primary storage is mounted. For example, "/mnt/primary". -message.installWizard.tooltip.addPrimaryStorage.server=(pour NFS, iSCSI ou PreSetup) Adresse IP ou nom DNS du stockage -message.installWizard.tooltip.addPrimaryStorage.name=Nom pour ce stockage -message.installWizard.tooltip.addHost.password=Le mot de passe pour l\'utilisateur indiqué précédement (issu de l\'installation XenServer). -message.installWizard.tooltip.addHost.username=Habituellement root. -message.installWizard.tooltip.addHost.hostname=Le nom DNS ou adresse IP du serveur. -message.installWizard.tooltip.addCluster.name=Un nom pour le cluster. Ce choix est libre et n\'est pas utilisé par CloudStack. -# message.installWizard.tooltip.addPod.reservedSystemEndIp=This is the IP range in the private network that the CloudStack uses to manage Secondary Storage VMs and Console Proxy VMs. These IP addresses are taken from the same subnet as computing servers. -# message.installWizard.tooltip.addPod.reservedSystemStartIp=This is the IP range in the private network that the CloudStack uses to manage Secondary Storage VMs and Console Proxy VMs. These IP addresses are taken from the same subnet as computing servers. -message.installWizard.tooltip.addPod.reservedSystemNetmask=Le masque réseau que les instances utiliseront sur le réseau -message.installWizard.tooltip.addPod.reservedSystemGateway=Passerelle pour les serveurs dans ce pod -message.installWizard.tooltip.addPod.name=Nom pour le pod -# message.installWizard.tooltip.configureGuestTraffic.guestEndIp=The range of IP addresses that will be available for allocation to guests in this zone. If one NIC is used, these IPs should be in the same CIDR as the pod CIDR. -# message.installWizard.tooltip.configureGuestTraffic.guestStartIp=The range of IP addresses that will be available for allocation to guests in this zone. If one NIC is used, these IPs should be in the same CIDR as the pod CIDR. -message.installWizard.tooltip.configureGuestTraffic.guestNetmask=Le masque réseau que les instances devrait utiliser sur le réseau -message.installWizard.tooltip.configureGuestTraffic.guestGateway=La passerelle que les instances clientes doivent utiliser -message.installWizard.tooltip.configureGuestTraffic.description=Desctiption pour ce réseau -message.installWizard.tooltip.configureGuestTraffic.name=Nom pour ce réseau -# message.installWizard.tooltip.addZone.internaldns2=These are DNS servers for use by system VMs in the zone. These DNS servers will be accessed via the private network interface of the System VMs. The private IP address you provide for the pods must have a route to the DNS server named here. -# message.installWizard.tooltip.addZone.internaldns1=These are DNS servers for use by system VMs in the zone. These DNS servers will be accessed via the private network interface of the System VMs. The private IP address you provide for the pods must have a route to the DNS server named here. -# message.installWizard.tooltip.addZone.dns2=These are DNS servers for use by guest VMs in the zone. These DNS servers will be accessed via the public network you will add later. The public IP addresses for the zone must have a route to the DNS server named here. -message.installWizard.tooltip.addZone.name=Nom pour la zone -# message.installWizard.tooltip.addZone.dns1=These are DNS servers for use by guest VMs in the zone. These DNS servers will be accessed via the public network you will add later. The public IP addresses for the zone must have a route to the DNS server named here. -message.setup.successful=Installation Cloud réussie \! -label.may.continue=Vous pouvez continuer. -error.installWizard.message=Une erreur s\'est produite; vous pouvez retourner en arrière et corriger les erreurs -message.installWizard.now.building=Construction de votre Cloud en cours -message.installWizard.click.retry=Appuyer sur le bouton pour essayer à nouveau le démarrage. -label.launch=Démarrer -label.installWizard.click.launch=Appuyer sur le bouton démarrer. -label.congratulations=Félicitations \! -label.installWizard.addSecondaryStorageIntro.subtitle=Qu\'est ce que le stockage secondaire ? -label.installWizard.addSecondaryStorageIntro.title=Ajoutons du stockage secondaire -label.installWizard.addPrimaryStorageIntro.subtitle=Qu\'est ce que le stockage primaire ? -label.installWizard.addPrimaryStorageIntro.title=Ajoutons du stockage primaire -label.installWizard.addHostIntro.subtitle=Qu\'est ce qu\'un serveur ? -label.installWizard.addHostIntro.title=Ajoutons un serveur -label.installWizard.addClusterIntro.subtitle=Qu\'est ce qu\'un cluster ? -label.installWizard.addClusterIntro.title=Ajoutons un cluster -label.installWizard.addPodIntro.subtitle=Qu\'est ce qu\'un pod ? -label.installWizard.addPodIntro.title=Ajoutons un pod -label.installWizard.addZone.title=Ajouter une zone -label.installWizard.addZoneIntro.subtitle=Qu\'est ce qu\'une zone ? -label.installWizard.addZoneIntro.title=Ajoutons une zone -error.password.not.match=Les mot de passe ne correspondent pas -label.confirm.password=Confirmer le mot de passe -message.change.password=Merci de modifier votre mot de passe. -label.save.and.continue=Enregistrer et continuer -label.skip.guide=J\'ai déjà utilisé CloudStack avant, passer ce tutorial -label.continue.basic.install=Continuer avec l\'installation basique -label.introduction.to.cloudstack=Introduction à CloudStack -label.what.is.cloudstack=Qu\'est ce que CloudStack ? -label.hints=Astuces -label.installWizard.subtitle=Ce tutorial vous aidera à configurer votre installation CloudStack -label.continue=Continuer -label.installWizard.title=Bonjour et bienvenue dans CloudStack -label.agree=Accepter -label.manage.resources=Gérer les ressources -label.port.forwarding.policies=Règles de transfert de port -label.load.balancing.policies=Règles de répartition de charge -label.networking.and.security=Réseau et sécurité -label.bandwidth=Bande passante -label.virtual.machines=Machines virtuelles -label.compute.and.storage=Processeur et Stockage -label.task.completed=Tâche terminée -label.update.project.resources=Mettre à jour les ressources du projet -label.remove.project.account=Supprimer le compte projet -label.item.listing=Liste des éléments -message.select.item=Merci de sélectionner un élément. -label.removing=Suppression -label.invite=Inviter -label.add.by=Ajouté par -label.max.vms=Max VMs utilisateur -label.max.public.ips=Max IP publiques -label.max.volumes=Max volumes -label.max.snapshots=Max snapshots -label.max.templates=Max images -# label.max.vpcs=Max. VPCs -label.project.dashboard=Tableau de bord projet -label.remind.later=Rappeler moi plus tard -label.invited.accounts=Comptes invités -label.invite.to=Inviter sur -label.add.accounts.to=Ajouter des comptes sur -label.add.accounts=Ajouter des comptes -label.project.name=Nom du projet -label.create.project=Créer un projet -label.networks=Réseaux -label.launch.vm=Démarrer VM -label.new.vm=Nouvelle VM -label.previous=Retour -label.add.to.group=Ajouter au groupe -message.vm.review.launch=Merci de vérifier les informations suivantes et de confirmer que votre instance virtuelle est correcte avant de la démarrer. -message.select.security.groups=Merci de sélectionner un(des) groupe(s) de sécurité pour la nouvelle VM -label.new=Nouveau -message.please.select.networks=Selectionner les réseaux pour votre instance. -message.please.proceed=Continuer vers la prochaine étape. -message.zone.no.network.selection=La zone sélectionnée ne propose pas le réseau choisi -label.no.thanks=Non merci -label.my.templates=Mes images -message.select.template=Sélectionner une image pour votre nouvelle instance virtuelle. -message.select.iso=Sélectionner une ISO pour votre nouvelle instance virtuelle. -message.template.desc=Image OS pouvant être utilisée pour démarrer une VM -message.iso.desc=Image ISO contenant des données ou des binaires de démarrage -label.select.iso.or.template=Sélectionner une ISO ou une image -message.select.a.zone=Une zone corespond en général à un seul datacenter. Des zones multiples peuvent permettre de rendre votre cloud plus fiable en apportant une isolation physique et de la redondance. -label.select.a.zone=Sélectionner une zone -label.review=Revoir -label.select.a.template=Sélectionner une image -label.setup=Configuration -state.Allocated=Alloué -changed.item.properties=Propriétés de l\'élément modifiées -label.apply=Appliquer -label.default=Par défaut -label.viewing=Consultation en cours -label.move.to.top=Placer au dessus -label.move.up.row=Monter d\'un cran -label.move.down.row=Descendre d\'un cran -# label.move.to.bottom=Move to bottom -label.drag.new.position=Déplacer sur une autre position -label.order=Ordre -label.no.data=Aucune donnée -label.change.value=Modifier la valeur -label.clear.list=Purger la liste -label.full.path=Chemin complet -message.add.domain=Spécifier le sous domaine que vous souhaitez créer sous ce domaine -message.delete.user=Confirmer la suppression de l\'utilisateur. -message.enable.user=Confirmer l\'activation de cet utilisateur. -message.disable.user=Confirmer la désactivation de l\'utilisateur. -message.generate.keys=Confirmer la génération de nouvelles clefs pour cet utilisateur. -message.update.resource.count=Confirmer la mise à jour des ressources pour ce compte. -message.edit.account=Modifier ("-1" signifie pas de limite de ressources) -label.total.of.vm=Total VM -label.total.of.ip=Total adresses IP -state.enabled=Actif -message.action.download.iso=Confirmer le téléchargement de l\'ISO -message.action.download.template=Confirmer le téléchargement de l\'image -label.destination.zone=Zone destination -label.keyboard.type=Type de clavier -label.nic.adapter.type=Type de carte réseau -label.root.disk.controller=Controlleur disque principal -label.community=Communauté -label.remove.egress.rule=Supprimer la règle sortante -label.add.egress.rule=Ajouter la règle sortante -label.egress.rule=Règle sortante -label.remove.ingress.rule=Supprimer la règle entrante -label.delete.vpn.user=Supprimer l\'utilisateur VPN -label.add.vpn.user=Ajouter un utilisateur VPN -label.remove.pf=Supprimer la règle de transfert de port -label.remove.vm.from.lb=Supprimer la VM de la règle de répartition de charge -label.add.vms.to.lb=Ajouter une/des VM(s) à la règle de répartition de charge -label.add.vm=Ajouter VM -label.remove.static.nat.rule=Supprimer le NAT statique -label.remove.rule=Supprimer la règle -label.add.static.nat.rule=Ajouter une règle de NAT statique -label.add.rule=Ajouter règle -label.configuration=Configuration -message.disable.vpn=Etes vous sûr de vouloir désactiver le VPN ? -label.disable.vpn=Désactiver le VPN -message.enable.vpn=Confirmer l\'activation de l\'accès VPN pour cette adresse IP. -label.enable.vpn=Activer VPN -message.acquire.new.ip=Confirmer l\'ajout d\'une nouvelle adresse IP pour ce réseau. -label.elastic=Elastique -label.my.network=Mon réseau -label.add.vms=Ajouter VMs -label.configure=Configurer -label.stickiness=Fidélité -label.source=Origine -label.least.connections=Le moins de connexions -label.round.robin=Aléatoire -label.restart.required=Rédémarrage nécessaire -label.clean.up=Nettoyage -label.restart.network=Redémarrage du réseau -label.edit.network.details=Modifier les paramètres réseau -label.add.guest.network=Ajout d\'un réseau pour les VM -label.guest.networks=Réseau pour les VM -message.ip.address.changed=Vos adresses IP ont peut être changées; Voulez vous raffraichir la liste ? Dans ce cas, le panneau de détail se fermera. -state.BackingUp=Sauvegarde en cours -state.BackedUp=Sauvegardé -label.done=Terminé -label.vm.name=Nom de la VM -message.migrate.volume=Confirmer la migration du volume vers un autre stockage primaire. -label.migrate.volume=Migration du volume vers un autre stockage primaire -message.create.template=Voulez vous créer l\'image ? -label.create.template=Création d\'image -message.download.volume.confirm=Confirmer le téléchargement du volume -message.detach.disk=Voulez vous détacher ce disque ? -state.ready=Prêt -state.Ready=Prêt -label.vm.display.name=Nom d\'affichage de la VM -label.select-view=Sélectionner la vue -label.local.storage=Stockage local -label.direct.ips=IP directes -label.view.all=Voir tout -label.zone.details=Détails de la zone -message.alert.state.detected=Etat d\'alerte détecté -state.Starting=Démarrage en cours -state.Expunging=Purge en cours -state.Creating=Création en cours -message.decline.invitation=Voulez vous refuser cette invitation au projet ? -label.decline.invitation=Refuser l\'invitation -message.confirm.join.project=Confirmer l\'invitation au projet -message.join.project=Vous avez rejoint un projet. Sélectionnez la vue Projet pour le voir. -label.accept.project.invitation=Accepter l\'invitation au projet -label.token=Jeton unique -label.project.id=ID projet -message.enter.token=Entrer le jeton unique reçu dans le message d\'invitation. -label.enter.token=Entrez le jeton unique -state.Accepted=Accepté -state.Pending=En attente -state.Completed=Terminé -state.Declined=Refusé -label.project=Projet -label.invitations=Invitations -label.delete.project=Supprimer projet -message.delete.project=Confirmer la suppression du projet -message.activate.project=Confirmer l\'activation de ce projet -label.activate.project=Activer projet -label.suspend.project=Suspendre projet -message.suspend.project=Confirmer la suspension de ce projet -state.Suspended=Suspendu -label.edit.project.details=Modifier les détails du projet -label.new.project=Nouveau projet -state.Active=Actif -state.Disabled=Désactivé -label.projects=Projets -label.make.project.owner=Devenir propriétaire du projet -label.remove.project.account=Supprimer le compte projet -message.project.invite.sent=Invitation envoyée; les utilisateurs seront ajoutés après acceptation de l\'invitation -label.add.account.to.project=Ajouter un compte au projet -label.revoke.project.invite=Revoquer l\'invitation -label.project.invite=Inviter sur le projet -label.select.project=Sélectionner un projet -message.no.projects=Vous n\'avez pas de projet.
Vous pouvez en créer un depuis la section projets. -message.no.projects.adminOnly=Vous n\'avez pas de projet.
Contacter votre administrateur pour ajouter un projet. -message.pending.projects.1=Vous avez des invitations projet en attente \: -message.pending.projects.2=Pour les visualiser, aller dans la section projets, puis sélectionner invitation dans la liste déroulante. -message.instanceWizard.noTemplates=Vous n\'avez pas de image disponible; Ajouter une image compatible puis relancer l\'assistant de création d\'instance. -label.view=Voir -instances.actions.reboot.label=Redémarrer l\'instance -label.filterBy=Filtrer par -label.ok=OK -notification.reboot.instance=Redémarrer l\'instance -notification.start.instance=Démarrer l\'instance -notification.stop.instance=Stopper l\'instance -label.display.name=Nom d\'affichage -label.zone.name=Nom de la zone -ui.listView.filters.all=Tous -ui.listView.filters.mine=Mon -state.Running=Démarrée -state.Stopped=Arrétée -state.Destroyed=Supprimée -state.Error=Erreur -message.reset.password.warning.notPasswordEnabled=L\'image de cette instance a été créée sans la gestion de mot de passe -message.reset.password.warning.notStopped=Votre instance doit être arretée avant de changer son mot de passe -label.notifications=Messages -label.default.view=Vue par défaut -label.project.view=Vue projet - -message.add.system.service.offering=Ajouter les informations suivantes pour créer une nouvelle offre système. -message.action.delete.system.service.offering=Confirmer la suppression de l\'offre système. -label.action.delete.system.service.offering=Supprimer l\'offre système -label.hypervisor.capabilities=Fonctions hyperviseur -label.hypervisor.version=Version hyperviseur -label.max.guest.limit=Nombre maximum d\'instances -label.add.network.offering=Ajouter une offre réseau -label.supported.services=Services supportés -label.service.capabilities=Fonctions disponibles -label.guest.type=Type d\'instance -label.specify.IP.ranges=Plages IP -label.conserve.mode=Conserver le mode -label.created.by.system=Créé par le system -label.menu.system.service.offerings=Offres système -label.add.system.service.offering=Ajouter une offre de service système -label.redundant.router.capability=Router redondant -label.supported.source.NAT.type=Type de NAT supporté -label.elastic.LB=Répartition de charge extensible -label.LB.isolation=Répartition de charge isolée -label.elastic.IP=IP extensible -label.network.label.display.for.blank.value=Utiliser la passerelle par défaut -label.xen.traffic.label=Label pour le trafic Xenserver -label.kvm.traffic.label=Label pour le trafic KVM -label.vmware.traffic.label=Label pour le trafic VMware -label.start.IP=Démarrer l\'IP -label.end.IP=Résilier l\'IP -label.remove.ip.range=Supprimer la plage IP -label.ip.ranges=Plages IP -label.start.vlan=VLAN de départ -label.end.vlan=VLAN de fin -label.broadcast.domain.range=Plage de brodcast domaine -label.compute=Processeur -message.add.guest.network=Confirmer l\'ajout du réseau -label.subdomain.access=Accès au sous domaine -label.guest.start.ip=Adresse IP de début pour les instances -label.guest.end.ip=Adresse IP de fin pour les instances -label.virtual.router=Routeur Virtuel -label.physical.network.ID=ID du réseau physique -label.destination.physical.network.id=ID du réseau physique de destination -label.dhcp=DHCP -label.destroy.router=Supprimer le routeur -message.confirm.destroy.router=Confirmer la suppression du routeur -label.change.service.offering=Modifier l\'offre de service -label.view.console=Voir la console -label.redundant.state=Etat redondant -label.enable.provider=Activer le provider -message.confirm.enable.provider=Confirmer l\'activation de ce provider -label.disable.provider=Désactiver ce provider -message.confirm.disable.provider=Confirmer la désactivation de ce provider -label.shutdown.provider=Eteindre le provider -message.confirm.shutdown.provider=Confirmer l\'extinction de ce provider -label.netScaler=Netscaler -label.add.new.NetScaler=Ajouter Netscaler -label.capacity=Capacité -label.dedicated=Dédié -label.f5=F5 -label.add.new.F5=Ajouter un F5 -label.srx=SRX -label.providers=Fournisseurs -label.add.new.SRX=Ajouter un SRX -label.timeout=Expiration -label.public.network=Réseau public -label.private.network=Réseau privé -label.enable.swift=Activer Swift +#Stored by I18NEdit, may be edited! +ICMP.code=Code ICMP +ICMP.type=Type ICMP +changed.item.properties=Propri\u00E9t\u00E9s de l\\'\u00E9l\u00E9ment modifi\u00E9es +confirm.enable.s3=Remplir les informations suivantes pour activer le support de stockage secondaire S3 confirm.enable.swift=Remplir les informations suivantes pour activer Swift -message.after.enable.swift=Swift configuré. Remarque \: une fois quitter cette page, il ne sera plus possible de reconfiguré Swift une nouvelle fois. -label.key=Clef -label.delete.NetScaler=Supprimer Netscaler -message.confirm.delete.NetScaler=Confirmer la suppression du Netscaler -label.delete.F5=Supprimer F5 -message.confirm.delete.F5=Confirmer la suppression du F5 -label.delete.SRX=Supprimer SRX -message.confirm.delete.SRX=Confirmer la suppression du SRX -label.pods=Pods -label.pod.name=Nom du pod -label.reserved.system.gateway=Gateway système réservée -label.reserved.system.netmask=Masque réseau système réservé -label.start.reserved.system.IP=Adresse IP de démarrage réservée pour le système -label.end.reserved.system.IP=Adresse IP de fin réservée pour le système -label.clusters=Clusters -label.cluster.name=Nom du cluster -label.host.MAC=MAC serveur -label.agent.username=Compte de l\'agent -label.agent.password=Mot de passe de l\'agent -message.confirm.action.force.reconnect=Confirmer que reconnection forcée de ce serveur. -label.resource.state=Etat des ressources -label.LUN.number=N° LUN -message.confirm.remove.IP.range=Confirmer la suppression de cette plage d\'adresses IP -message.tooltip.zone.name=Nom pour la zone. -message.tooltip.dns.1=Nom d\'un serveur DNS utilisé par les VM de la zone. Les adresses IP publiques de cette zones doivent avoir une route vers ce serveur. -message.tooltip.dns.2=Nom d\'un serveur DNS secondaire utilisé par les VM de la zone. Les adresses IP publiques de cette zones doivent avoir une route vers ce serveur. -message.tooltip.internal.dns.1=Nom d\'un serveur DNS que CloudStack peut utiliser pour les VM système dans cette zone. Les adresses IP privées des pods doivent avoir une route vers ce serveur. -message.tooltip.internal.dns.2=Nom d\'un serveur DNS que CloudStack peut utiliser pour les VM système dans cette zone. Les adresses IP privées des pods doivent avoir une route vers ce serveur. -message.tooltip.network.domain=Suffixe DNS pour les noms de domaine personnalisés accèdé par les intances. -message.tooltip.pod.name=Nom pour le pod. -message.tooltip.reserved.system.gateway=La passerelle pour les serveur du pod. -message.tooltip.reserved.system.netmask=Le préfixe réseau utilisé par le sous-réseau du pod. Au format CIDR. -message.creating.zone=Création de la zone -message.creating.physical.networks=Création des réseaux physiques -message.configuring.physical.networks=Configuration des réseaux physiques -message.adding.Netscaler.device=Ajout du Netscaler -message.creating.pod=Création d\'un pod -message.configuring.public.traffic=Configuration du réseau public -message.configuring.storage.traffic=Configuration du réseau de stockage -message.configuring.guest.traffic=Configuration du réseau VM -message.creating.cluster=Création du cluster -message.adding.host=Ajout du serveur -message.creating.primary.storage=Création du stockage primaire -message.creating.secondary.storage=Création du stockage secondaire -message.Zone.creation.complete=Création de la zone terminée -message.enabling.zone=Activation de la zone +error.could.not.enable.zone=Impossible d\\'activer la zone +error.installWizard.message=Une erreur s\\'est produite ; vous pouvez retourner en arri\u00E8re et corriger les erreurs +error.invalid.username.password=Utilisateur ou mot de passe invalide +error.login=Votre nom d\\'utilisateur / mot de passe ne correspond pas \u00E0 nos donn\u00E9es. +error.menu.select=\u00C9chec de l\\'action car il n\\'y a aucun \u00E9l\u00E9ment s\u00E9lectionn\u00E9. +error.mgmt.server.inaccessible=Le serveur de gestion est indisponible. Essayez plus tard. +error.password.not.match=Les mots de passe ne correspondent pas +error.please.specify.physical.network.tags=L\\'offre r\u00E9seau ne sera pas disponible tant que des libell\u00E9s n\\'auront pas \u00E9t\u00E9 renseign\u00E9s pour ce r\u00E9seau physique. +error.session.expired=Votre session a expir\u00E9e. error.something.went.wrong.please.correct.the.following=Erreur; corriger le point suivant -error.could.not.enable.zone=Impossible d\'activer la zone -message.zone.creation.complete.would.you.like.to.enable.this.zone=Création de la zone terminée. Voulez vous l\'activer ? -message.please.add.at.lease.one.traffic.range=Ajouter au moins une plage réseau -message.you.must.have.at.least.one.physical.network=Vous devez avoir au moins un réseau physique -message.please.select.a.different.public.and.management.network.before.removing=Sélectionner un réseau publique et management différent avant de supprimer - -label.zone.type=Type de zone -label.setup.zone=Configurer la zone -label.setup.network=Configurer le réseau -label.add.resources=Ajouter des resssources -label.launch=Démarrer -label.set.up.zone.type=configurer le type de zone -message.please.select.a.configuration.for.your.zone=Sélectionner une configuration pour la zone. -# message.desc.basic.zone=Provide a single network where each VM instance is assigned an IP directly from the network. Guest isolation can be provided through layer-3 means such as security groups (IP address source filtering). -label.basic=Basic -# message.desc.advanced.zone=For more sophisticated network topologies. This network model provides the most flexibility in defining guest networks and providing custom network offerings such as firewall, VPN, or load balancer support. -label.advanced=Avancé -# message.desc.zone=A zone is the largest organizational unit in CloudStack, and it typically corresponds to a single datacenter. Zones provide physical isolation and redundancy. A zone consists of one or more pods (each of which contains hosts and primary storage servers) and a secondary storage server which is shared by all pods in the zone. -label.physical.network=Réseau physique -label.public.traffic=Trafic public -label.guest.traffic=Trafic invité -label.storage.traffic=Trafic stockage -# message.setup.physical.network.during.zone.creation=When adding an advanced zone, you need to set up one or more physical networks. Each network corresponds to a NIC on the hypervisor. Each physical network can carry one or more types of traffic, with certain restrictions on how they may be combined.

Drag and drop one or more traffic types onto each physical network. -label.add.physical.network=Ajouter un réseau physique -label.traffic.types=Type de trafic -label.management=Management -label.guest=Invité -label.please.specify.netscaler.info=Renseigner les informations sur le Netscaler -# message.public.traffic.in.advanced.zone=Public traffic is generated when VMs in the cloud access the internet. Publicly-accessible IPs must be allocated for this purpose. End users can use the CloudStack UI to acquire these IPs to implement NAT between their guest network and their public network.

Provide at least one range of IP addresses for internet traffic. -# message.public.traffic.in.basic.zone=Public traffic is generated when VMs in the cloud access the Internet or provide services to clients over the Internet. Publicly accessible IPs must be allocated for this purpose. When a instance is created, an IP from this set of Public IPs will be allocated to the instance in addition to the guest IP address. Static 1-1 NAT will be set up automatically between the public IP and the guest IP. End users can also use the CloudStack UI to acquire additional IPs to implement static NAT between their instances and the public IP. -# message.add.pod.during.zone.creation=Each zone must contain in one or more pods, and we will add the first pod now. A pod contains hosts and primary storage servers, which you will add in a later step. First, configure a range of reserved IP addresses for CloudStack\'s internal management traffic. The reserved IP range must be unique for each zone in the cloud. -# message.guest.traffic.in.advanced.zone=Guest network traffic is communication between end-user virtual machines. Specify a range of VLAN IDs to carry guest traffic for each physical network. -# message.guest.traffic.in.basic.zone=Guest network traffic is communication between end-user virtual machines. Specify a range of IP addresses that CloudStack can assign to guest VMs. Make sure this range does not overlap the reserved system IP range. -# message.storage.traffic=Traffic between CloudStack\'s internal resources, including any components that communicate with the Management Server, such as hosts and CloudStack system VMs. Please configure storage traffic here. -# message.desc.cluster=Each pod must contain one or more clusters, and we will add the first cluster now. A cluster provides a way to group hosts. The hosts in a cluster all have identical hardware, run the same hypervisor, are on the same subnet, and access the same shared storage. Each cluster consists of one or more hosts and one or more primary storage servers. -# message.desc.host=Each cluster must contain at least one host (computer) for guest VMs to run on, and we will add the first host now. For a host to function in CloudStack, you must install hypervisor software on the host, assign an IP address to the host, and ensure the host is connected to the CloudStack management server.

Give the host\'s DNS or IP address, the user name (usually root) and password, and any labels you use to categorize hosts. -# message.desc.primary.storage=Each cluster must contain one or more primary storage servers, and we will add the first one now. Primary storage contains the disk volumes for all the VMs running on hosts in the cluster. Use any standards-compliant protocol that is supported by the underlying hypervisor. -# message.desc.secondary.storage=Each zone must have at least one NFS or secondary storage server, and we will add the first one now. Secondary storage stores VM templates, ISO images, and VM disk volume snapshots. This server must be available to all hosts in the zone.

Provide the IP address and exported path. -label.launch.zone=Démarrer la zone -message.please.wait.while.zone.is.being.created=Patienter pendant la création de la zone, cela peut prendre du temps... - -label.load.balancing=Load Balancing -label.static.nat.enabled=NAT statique activé -label.zones=Zones -label.view.more=Voir plus -label.number.of.zones=Nombre de zones -label.number.of.pods=Nombre de Pods -label.number.of.clusters=Nombre de clusters -label.number.of.hosts=Nombre de serveurs -label.total.hosts=Total serveurs -label.total.CPU=Capacité Totale en CPU -label.total.memory=Total mémoire -label.total.storage=Total stockage -label.purpose=Rôle - - - - -label.action.migrate.router=Migration routeur -label.action.migrate.router.processing=Migration routeur en cours... -message.migrate.router.confirm=Confirmer la migration du routeur vers \: -label.migrate.router.to=Migrer le routeur vers - -label.action.migrate.systemvm=Migration VM système -label.action.migrate.systemvm.processing=Migration VM système en cours ... -message.migrate.systemvm.confirm=Confirmer la migration de la VM système vers \: -label.migrate.systemvm.to=Miger la VM système vers - - -mode=Mode -side.by.side=Côte à cote -inline=Aligné - -extractable=Décompressable - -label.ocfs2=OCFS2 - -label.action.edit.host=Modifier l\'hôte - -network.rate=Débit Réseau - -ICMP.type=Type ICMP -ICMP.code=Code ICMP - -image.directory=Répertoire d\'images - -label.action.create.template.from.vm=Créer un modèle depuis la VM -label.action.create.template.from.volume=Créer un modèle depuis le volume - -message.vm.create.template.confirm=Créer un modèle va redémarrer la VM automatiquement - -label.action.manage.cluster=Gérer le Cluster -message.action.manage.cluster=Confirmez que vous voulez gérer le cluster -label.action.manage.cluster.processing=Gestion du cluster... - -label.action.unmanage.cluster=Ne plus gérer le Cluster -message.action.unmanage.cluster=Confirmez que vous ne voulez plus gérer le cluster -label.action.unmanage.cluster.processing=Arrêt de la gestion du Cluster - -label.allocation.state=Etat de l\'allocation -managed.state=Etat de la gestion - -label.default.use=Utilisation par défaut -label.host.tags=Labels Server - -label.cidr=CIDR -label.cidr.list=CIDR Source - -label.storage.tags=Etiquettes de stockage - -label.redundant.router=Routeur redondant -label.is.redundant.router=Redondant - +error.unable.to.reach.management.server=Impossible de joindre le serveur d\\'administration +error.unresolved.internet.name=Votre nom Internet ne peut pas \u00EAtre r\u00E9solu. +extractable=D\u00E9compressable force.delete=Forcer la suppression -force.delete.domain.warning=Attention\: Choisir cette opion entrainera la suppression de tous les domaines issus et l\'ensemble des comptes associées, ainsi que de leur ressources - +force.delete.domain.warning=Attention \: Choisir cette option entra\u00EEnera la suppression de tous les domaines issus et l\\'ensemble des comptes associ\u00E9s, ainsi que de leur ressources force.remove=Forcer la suppression -force.remove.host.warning=Attention\: Choisir cette option entrainera CloudStack à  arrêter l\'ensemble des machines virtuelles avant d\'enlever l\'hôte du cluster - -force.stop=Forcer l\'arrêt -force.stop.instance.warning=Attention \: un arrêt forcé sur cette instance est l\'option ultime. Cela peut engendrer des pertes de données et/ou un comportement inconsitent de votre instance. - -label.PreSetup=PreSetup -label.SR.name = Nom du point de montage -label.SharedMountPoint=Point de montage partagé -label.clvm=CLVM -label.volgroup=Volume Group -label.VMFS.datastore=datastore VMFS - -label.network.device=Equipement Réseau -label.add.network.device=Ajouter un équipement réseau -label.network.device.type=Type d\'équipement réseau +force.remove.host.warning=Attention \: Choisir cette option entra\u00EEnera CloudStack \u00E0\u00A0arr\u00EAter l\\'ensemble des machines virtuelles avant d\\'enlever l\\'h\u00F4te du cluster +force.stop=Forcer l\\'arr\u00EAt +force.stop.instance.warning=Attention \: un arr\u00EAt forc\u00E9 sur cette instance est la dernier option. Cela peut engendrer des pertes de donn\u00E9es et/ou un comportement inconsistant de votre instance. +image.directory=R\u00E9pertoire d\\'images +inline=Align\u00E9 +instances.actions.reboot.label=Red\u00E9marrer l\\'instance +label.CIDR.list=Liste CIDR +label.CIDR.of.destination.network=CIDR du r\u00E9seau de destination +label.CPU.cap=Limitation CPU label.DHCP.server.type=Serveur DHCP +label.DNS.domain.for.guest.networks=Domaine DNS pour les r\u00E9seaux invit\u00E9s +label.ESP.encryption=Chiffrement ESP +label.ESP.hash=Empreinte ESP +label.ESP.lifetime=Dur\u00E9e de vie ESP (secondes) +label.ESP.policy=Mode ESP +label.IKE.DH=DH IKE +label.IKE.encryption=Chiffrement IKE +label.IKE.hash=Empreinte IKE +label.IKE.lifetime=Dur\u00E9e de vie IKE (secondes) +label.IKE.policy=Mode IKE +label.IPsec.preshared.key=Cl\u00E9 partag\u00E9e IPsec +label.LB.isolation=R\u00E9partition de charge isol\u00E9e +label.LUN.number=N\u00B0 LUN +label.PING.CIFS.password=Mot de passe CIFS PING +label.PING.CIFS.username=Identifiant CIFS PING +label.PING.dir=R\u00E9pertoire PING +label.PING.storage.IP=IP stockage PING +label.PreSetup=PreSetup label.Pxe.server.type=Serveur PXE -label.PING.storage.IP=adresse PING (stockage) -label.PING.dir=répertoire PING -label.TFTP.dir=répertoire TFTP -label.PING.CIFS.username=utilisateur CIFS PING -label.PING.CIFS.password=mot de passe CIFS PING -label.CPU.cap=Utilisation maximum du CPU - - -label.action.enable.zone=Activer la zone -label.action.enable.zone.processing=Activation de la zone... -message.action.enable.zone=Confirmez que vous voulez activer cette zone -label.action.disable.zone=Désactivation de la zone -label.action.disable.zone.processing=Désactivation de la zone... -message.action.disable.zone=Confirmez que vous voulez désactiver cette zone - -label.action.enable.pod=Activer le Pod -label.action.enable.pod.processing=Activation du Pod... -message.action.enable.pod=Confirmez que vous souhaitez activer ce Pod -label.action.disable.pod=Désactiver le Pod -label.action.disable.pod.processing=Désactivation du Pod... -message.action.disable.pod=Confirmez que vous voulez désactiver ce Pod - -label.action.enable.cluster=Activer le cluster -label.action.enable.cluster.processing=Activation du cluster... -message.action.enable.cluster=Confirmez que vous souhaitez activer ce cluster -label.action.disable.cluster=Désactiver le cluster -label.action.disable.cluster.processing=Désactivation du cluster... -message.action.disable.cluster=Confirmez que vous souhaitez désactiver ce cluster - +label.SR.name=Nom du point de montage +label.SharedMountPoint=Point de montage partag\u00E9 +label.TFTP.dir=R\u00E9pertoire TFTP +label.VMFS.datastore=Magasin de donn\u00E9es VMFS +label.VMs.in.tier=Machines virtuelles dans le tiers +label.VPC.router.details=D\u00E9tails routeur VPC +label.VPN.connection=Connexion VPN +label.VPN.customer.gateway=Passerelle VPN client +label.VPN.gateway=Passerelle VPN +label.accept.project.invitation=Accepter l\\'invitation au projet +label.account=Compte +label.account.and.security.group=Compte, groupe de s\u00E9curit\u00E9 label.account.id=ID du Compte label.account.name=Nom du compte -label.account.specific=Spécifique au compte -label.account=Compte +label.account.specific=Sp\u00E9cifique au compte label.accounts=Comptes -label.acquire.new.ip=Acquérir une nouvelle adresse IP -label.show.ingress.rule=Montrer la règle Ingress -label.hide.ingress.rule=Cacher la règle Ingress -label.action.attach.disk.processing=Attachement du Disque... -label.action.attach.disk=Attacher un disque -label.action.attach.iso.processing=Attachement de l\'image ISO -label.action.attach.iso=Attacher une image ISO -label.action.cancel.maintenance.mode.processing=Annulation du mode maintenance... +label.acquire.new.ip=Acqu\u00E9rir une nouvelle adresse IP +label.action.attach.disk=Rattacher un disque +label.action.attach.disk.processing=Rattachement du Disque... +label.action.attach.iso=Rattacher une image ISO +label.action.attach.iso.processing=Rattachement de l\\'image ISO label.action.cancel.maintenance.mode=Annuler le mode maintenance +label.action.cancel.maintenance.mode.processing=Annulation du mode maintenance... label.action.change.password=Changer le mot de passe -label.action.change.service.processing=Changement de d\'offre de service... -label.action.change.service=Changer d\'offre de service -label.action.copy.ISO.processing=Copie de l\'image ISO... +label.action.change.service=Changer d\\'offre de service +label.action.change.service.processing=Changement de d\\'offre de service... label.action.copy.ISO=Copier une image ISO -label.action.copy.template.processing=Copie du Modèle... -label.action.copy.template=Copier un modèle -label.action.create.template.processing=Création du Modèle... -label.action.create.template=Créer un modèle -label.action.create.vm.processing=Création de la VM.. -label.action.create.vm=Créer une VM -label.action.create.volume.processing=Création du Volume... -label.action.create.volume=Créer un Volume -label.action.delete.IP.range.processing=Suppression de la plage IP... +label.action.copy.ISO.processing=Copie de l\\'image ISO... +label.action.copy.template=Copier un mod\u00E8le +label.action.copy.template.processing=Copie du Mod\u00E8le... +label.action.create.template=Cr\u00E9er un mod\u00E8le +label.action.create.template.from.vm=Cr\u00E9er un mod\u00E8le depuis la VM +label.action.create.template.from.volume=Cr\u00E9er un mod\u00E8le depuis le volume +label.action.create.template.processing=Cr\u00E9ation du Mod\u00E8le... +label.action.create.vm=Cr\u00E9er une VM +label.action.create.vm.processing=Cr\u00E9ation de la VM... +label.action.create.volume=Cr\u00E9er un Volume +label.action.create.volume.processing=Cr\u00E9ation du Volume... label.action.delete.IP.range=Supprimer la plage IP -label.action.delete.ISO.processing=Suppression de l\'image ISO... -label.action.delete.ISO=Supprimer l\'image ISO -label.action.delete.account.processing=Suppression du compte... +label.action.delete.IP.range.processing=Suppression de la plage IP... +label.action.delete.ISO=Supprimer l\\'image ISO +label.action.delete.ISO.processing=Suppression de l\\'image ISO... label.action.delete.account=Supprimer un compte -label.action.delete.cluster.processing=Suppression du Cluster... +label.action.delete.account.processing=Suppression du compte... label.action.delete.cluster=Supprimer le Cluster -label.action.delete.disk.offering.processing=Suppression de l\'offre Disque... -label.action.delete.disk.offering=Supprimer l\'offre Disque - -label.action.update.resource.count=Mettre à jour le compte d\'utilisation des ressources -label.action.update.resource.count.processing=Mise à jour du compteur... - +label.action.delete.cluster.processing=Suppression du Cluster... +label.action.delete.disk.offering=Supprimer l\\'offre Disque +label.action.delete.disk.offering.processing=Suppression de l\\'offre Disque... label.action.delete.domain=Supprimer le domaine -label.action.delete.domain.processing=Suppression du domaine... - -label.action.delete.firewall.processing=Suppression du Parefeu... -label.action.delete.firewall=Supprimer la règle de firewall -label.action.delete.ingress.rule.processing=Suppression de la règle Ingress.. -label.action.delete.ingress.rule=Supprimer la règle Ingress -label.action.delete.load.balancer.processing=Suppression de l\'équilibreur de charge... -label.action.delete.load.balancer=Supprimer la règle de load balancer -label.action.edit.network.processing=Modification du Réseau... -label.action.edit.network=Modifier le réseau -label.action.delete.network.processing=Suppression du réseau... -label.action.delete.network=Supprimer le réseau -label.action.delete.pod.processing=Suppression du pod... +label.action.delete.domain.processing=Suppression du domaine... +label.action.delete.firewall=Supprimer la r\u00E8gle de pare-feu +label.action.delete.firewall.processing=Suppression du Pare-feu... +label.action.delete.ingress.rule=Supprimer la r\u00E8gle d\\'entr\u00E9e +label.action.delete.ingress.rule.processing=Suppression de la r\u00E8gle d\\'entr\u00E9e.. +label.action.delete.load.balancer=Supprimer la r\u00E8gle de r\u00E9partition de charge +label.action.delete.load.balancer.processing=Suppression du r\u00E9partiteur de charge... +label.action.delete.network=Supprimer le r\u00E9seau +label.action.delete.network.processing=Suppression du r\u00E9seau... +label.action.delete.nexusVswitch=Supprimer le Nexus 1000v +label.action.delete.physical.network=Supprimer le r\u00E9seau physique label.action.delete.pod=Supprimer le Pod -label.action.delete.primary.storage.processing=Suppression du stockage primaire... +label.action.delete.pod.processing=Suppression du pod... label.action.delete.primary.storage=Supprimer le stockage primaire -label.action.delete.secondary.storage.processing=Suppression du stockage secondaire... +label.action.delete.primary.storage.processing=Suppression du stockage primaire... label.action.delete.secondary.storage=Supprimer le stockage secondaire -label.action.delete.security.group.processing=Suppression du groupe de sécurité -label.action.delete.security.group=Supprimer le groupe de sécurité -label.action.delete.service.offering.processing=Suppression de l\'offre de service... -label.action.delete.service.offering=Supprimer l\'offre de service -label.action.delete.snapshot.processing=Suppresison de l\'instantané... -label.action.delete.snapshot=Supprimer l\'instantané -label.action.delete.template.processing=Suppression du modèle... -label.action.delete.template=Supprimer le modèle -label.action.delete.user.processing=Suppression de l\'utilisateur... -label.action.delete.user=Supprimer l\'utilisateur -label.action.delete.volume.processing=Suppression du volume... +label.action.delete.secondary.storage.processing=Suppression du stockage secondaire... +label.action.delete.security.group=Supprimer le groupe de s\u00E9curit\u00E9 +label.action.delete.security.group.processing=Suppression du groupe de s\u00E9curit\u00E9 +label.action.delete.service.offering=Supprimer l\\'offre de service +label.action.delete.service.offering.processing=Suppression de l\\'offre de service... +label.action.delete.snapshot=Supprimer l\\'instantan\u00E9 +label.action.delete.snapshot.processing=Suppression de l\\'instantan\u00E9... +label.action.delete.system.service.offering=Supprimer l\\'offre syst\u00E8me +label.action.delete.template=Supprimer le mod\u00E8le +label.action.delete.template.processing=Suppression du mod\u00E8le... +label.action.delete.user=Supprimer l\\'utilisateur +label.action.delete.user.processing=Suppression de l\\'utilisateur... label.action.delete.volume=Supprimer le volume -label.action.delete.zone.processing=Suppression de la zone... +label.action.delete.volume.processing=Suppression du volume... label.action.delete.zone=Supprimer la zone -label.action.destroy.instance.processing=Suppression de l\'instance... -label.action.destroy.instance=Supprimer l\'instance -label.action.destroy.systemvm.processing=Suppression de la VM Système... -label.action.destroy.systemvm=Supprimer la VM Système -label.action.detach.disk.processing=Détachement du disque... -label.action.detach.disk=Détacher le disque -label.action.detach.iso.processing=Détachement de l\'image ISO... -label.action.detach.iso=Détacher l\'image ISO -label.action.disable.account.processing=Désactivation du compte... -label.action.disable.account=Désactiver le compte -label.action.disable.static.NAT.processing=Désactivation du NAT Statique... -label.action.disable.static.NAT=Désactiver le NAT Statique -label.action.disable.user.processing=Désactivation du l\'utilisateur... -label.action.disable.user=Désactiver l\'utilisateur -label.action.download.ISO=Télécharger une image ISO -label.action.download.template=Télécharger un modèle -label.action.download.volume.processing=Téléchargement du volume... -label.action.download.volume=Télécharger un volume -label.action.edit.ISO=Modifier l\'image ISO +label.action.delete.zone.processing=Suppression de la zone... +label.action.destroy.instance=Supprimer l\\'instance +label.action.destroy.instance.processing=Suppression de l\\'instance... +label.action.destroy.systemvm=Supprimer la VM Syst\u00E8me +label.action.destroy.systemvm.processing=Suppression de la VM Syst\u00E8me... +label.action.detach.disk=D\u00E9tacher le disque +label.action.detach.disk.processing=D\u00E9tachement du disque... +label.action.detach.iso=D\u00E9tacher l\\'image ISO +label.action.detach.iso.processing=D\u00E9tachement de l\\'image ISO... +label.action.disable.account=D\u00E9sactiver le compte +label.action.disable.account.processing=D\u00E9sactivation du compte... +label.action.disable.cluster=D\u00E9sactiver le cluster +label.action.disable.cluster.processing=D\u00E9sactivation du cluster... +label.action.disable.nexusVswitch=D\u00E9sactiver le Nexus 1000v +label.action.disable.physical.network=D\u00E9sactiver le r\u00E9seau physique +label.action.disable.pod=D\u00E9sactiver le Pod +label.action.disable.pod.processing=D\u00E9sactivation du Pod... +label.action.disable.static.NAT=D\u00E9sactiver le NAT Statique +label.action.disable.static.NAT.processing=D\u00E9sactivation du NAT Statique... +label.action.disable.user=D\u00E9sactiver l\\'utilisateur +label.action.disable.user.processing=D\u00E9sactivation de l\\'utilisateur... +label.action.disable.zone=D\u00E9sactivation de la zone +label.action.disable.zone.processing=D\u00E9sactivation de la zone... +label.action.download.ISO=T\u00E9l\u00E9charger une image ISO +label.action.download.template=T\u00E9l\u00E9charger un mod\u00E8le +label.action.download.volume=T\u00E9l\u00E9charger un volume +label.action.download.volume.processing=T\u00E9l\u00E9chargement du volume... +label.action.edit.ISO=Modifier l\\'image ISO label.action.edit.account=Modifier le Compte -label.action.edit.disk.offering=Modifier l\'offre de disque +label.action.edit.disk.offering=Modifier l\\'offre de disque label.action.edit.domain=Modifier le domaine label.action.edit.global.setting=Modifier la configuration globale -label.action.edit.instance=Modifier l\'instancer -label.action.edit.network.offering=Modifier l\'offre de service réseau +label.action.edit.host=Modifier l\\'h\u00F4te +label.action.edit.instance=Modifier l\\'instance +label.action.edit.network=Modifier le r\u00E9seau +label.action.edit.network.offering=Modifier l\\'offre de service r\u00E9seau +label.action.edit.network.processing=Modification du R\u00E9seau... label.action.edit.pod=Modifier le pod label.action.edit.primary.storage=Modifier le stockage primaire label.action.edit.resource.limits=Modifier les limites de ressources -label.action.edit.service.offering=Modifier l\'offre de service -label.action.edit.template=Modifier le modèle -label.action.edit.user=Modifier l\'utilisateur +label.action.edit.service.offering=Modifier l\\'offre de service +label.action.edit.template=Modifier le mod\u00E8le +label.action.edit.user=Modifier l\\'utilisateur label.action.edit.zone=Modifier la zone -label.action.enable.account.processing=Activation du compte... label.action.enable.account=Activer le compte -label.action.enable.maintenance.mode.processing=Activation du mode maintenance... +label.action.enable.account.processing=Activation du compte... +label.action.enable.cluster=Activer le cluster +label.action.enable.cluster.processing=Activation du cluster... label.action.enable.maintenance.mode=Activer le mode maintenance -label.action.enable.static.NAT.processing=Activation du NAT Statique... +label.action.enable.maintenance.mode.processing=Activation du mode maintenance... +label.action.enable.nexusVswitch=Activer le Nexus 1000v +label.action.enable.physical.network=Activer le r\u00E9seau physique +label.action.enable.pod=Activer le Pod +label.action.enable.pod.processing=Activation du Pod... label.action.enable.static.NAT=Activer le NAT Statique -label.action.enable.user.processing=Activation de l\'utilisateur... -label.action.enable.user=Activer l\'utilisateur -label.action.force.reconnect.processing=Reconnexion en cours... +label.action.enable.static.NAT.processing=Activation du NAT Statique... +label.action.enable.user=Activer l\\'utilisateur +label.action.enable.user.processing=Activation de l\\'utilisateur... +label.action.enable.zone=Activer la zone +label.action.enable.zone.processing=Activation de la zone... label.action.force.reconnect=Forcer la reconnexion -label.action.generate.keys.processing=Génération des clés... -label.action.generate.keys=Générer les clés -label.action.lock.account.processing=Blocage du compte... -label.action.lock.account=Bloquer le compte -label.action.migrate.instance=Migrer l\'instance -label.action.migrate.instance.processing=Migration de l\'instance... -label.action.reboot.instance.processing=Redémarrage de l\'instance... -label.action.reboot.instance=Redémarrer l\'instance -label.action.reboot.router.processing=Redémarrage du routeur... -label.action.reboot.router=Redémarrer le routeur -label.action.reboot.systemvm.processing=Redémarrage de la VM Système... -label.action.reboot.systemvm=Redémarre la VM Système -label.action.recurring.snapshot=Snapshots récurrents -label.action.release.ip.processing=Libération de l\'adresse IP... -label.action.release.ip=Libérer l\'adresse IP -label.action.remove.host.processing=Suppression de l\'hôte... -label.action.remove.host=Supprimer l\'hôte -label.action.reset.password.processing=Réinitialisation le mot de passe... -label.action.reset.password=Réinitialiser le mot de passe +label.action.force.reconnect.processing=Reconnexion en cours... +label.action.generate.keys=G\u00E9n\u00E9rer les cl\u00E9s +label.action.generate.keys.processing=G\u00E9n\u00E9ration des cl\u00E9s... +label.action.list.nexusVswitch=Liste des Nexus 1000v +label.action.lock.account=Verrouiller le compte +label.action.lock.account.processing=Verrouillage du compte... +label.action.manage.cluster=G\u00E9rer le Cluster +label.action.manage.cluster.processing=Gestion du cluster... +label.action.migrate.instance=Migrer l\\'instance +label.action.migrate.instance.processing=Migration de l\\'instance... +label.action.migrate.router=Migration routeur +label.action.migrate.router.processing=Migration routeur en cours... +label.action.migrate.systemvm=Migration VM syst\u00E8me +label.action.migrate.systemvm.processing=Migration VM syst\u00E8me en cours ... +label.action.reboot.instance=Red\u00E9marrer l\\'instance +label.action.reboot.instance.processing=Red\u00E9marrage de l\\'instance... +label.action.reboot.router=Red\u00E9marrer le routeur +label.action.reboot.router.processing=Red\u00E9marrage du routeur... +label.action.reboot.systemvm=Red\u00E9marrer la VM Syst\u00E8me +label.action.reboot.systemvm.processing=Red\u00E9marrage de la VM Syst\u00E8me... +label.action.recurring.snapshot=Instantan\u00E9s r\u00E9currents +label.action.register.iso=Enregistrer ISO +label.action.register.template=Enregistrer mod\u00E8le +label.action.release.ip=Lib\u00E9rer l\\'adresse IP +label.action.release.ip.processing=Lib\u00E9ration de l\\'adresse IP... +label.action.remove.host=Supprimer l\\'h\u00F4te +label.action.remove.host.processing=Suppression de l\\'h\u00F4te... +label.action.reset.password=R\u00E9-initialiser le mot de passe +label.action.reset.password.processing=R\u00E9-initialisation du mot de passe... label.action.resource.limits=Limites de ressources -label.action.restore.instance.processing=Restauration de l\'instance... -label.action.restore.instance=Restaurer l\'instance -label.action.start.instance.processing=Démarrage de l\'instance -label.action.start.instance=Démarrer l\'instance -label.action.start.router.processing=Démarrage du routeur... -label.action.start.router=Démarrer le routeur -label.action.start.systemvm.processing=Démarrage de la VM système -label.action.start.systemvm=Démarrer la VM système -label.action.stop.instance.processing=Arrêt de l\'Instance... -label.action.stop.instance=Arrêter l\'Instance -label.action.stop.router.processing=Arrêt du routeur... -label.action.stop.router=Arrêter le routeur -label.action.stop.systemvm.processing=Arrêt de la VM système... -label.action.stop.systemvm=Arrêter la VM système -label.action.take.snapshot.processing=Prise de l\'instantané -label.action.take.snapshot=Prendre un instantané -label.action.update.OS.preference.processing=Mise à jour des préférences d\'OS... -label.action.update.OS.preference=Mettre à jour les préférences d\'OS +label.action.restore.instance=Restaurer l\\'instance +label.action.restore.instance.processing=Restauration de l\\'instance... +label.action.start.instance=D\u00E9marrer l\\'instance +label.action.start.instance.processing=D\u00E9marrage de l\\'instance... +label.action.start.router=D\u00E9marrer le routeur +label.action.start.router.processing=D\u00E9marrage du routeur... +label.action.start.systemvm=D\u00E9marrer la VM syst\u00E8me +label.action.start.systemvm.processing=D\u00E9marrage de la VM syst\u00E8me... +label.action.stop.instance=Arr\u00EAter l\\'Instance +label.action.stop.instance.processing=Arr\u00EAt de l\\'Instance... +label.action.stop.router=Arr\u00EAter le routeur +label.action.stop.router.processing=Arr\u00EAt du routeur... +label.action.stop.systemvm=Arr\u00EAter la VM syst\u00E8me +label.action.stop.systemvm.processing=Arr\u00EAt de la VM syst\u00E8me... +label.action.take.snapshot=Prendre un instantan\u00E9 +label.action.take.snapshot.processing=Prise de l\\'instantan\u00E9... +label.action.unmanage.cluster=Ne plus g\u00E9rer le Cluster +label.action.unmanage.cluster.processing=Arr\u00EAt de la gestion du Cluster +label.action.update.OS.preference=Mettre \u00E0 jour les pr\u00E9f\u00E9rences d\\'OS +label.action.update.OS.preference.processing=Mise \u00E0 jour des pr\u00E9f\u00E9rences d\\'OS... +label.action.update.resource.count=Mettre \u00E0 jour le compteur des ressources +label.action.update.resource.count.processing=Mise \u00E0 jour du compteur... label.actions=Actions +label.activate.project=Activer projet label.active.sessions=Sessions actives +label.add=Ajouter +label.add.ACL=Ajouter une r\u00E8gle ACL +label.add.F5.device=Ajouter un F5 +label.add.NiciraNvp.device=Ajouter un contr\u00F4leur Nvp +label.add.SRX.device=Ajouter un SRX +label.add.VM.to.tier=Ajouter une machine virtuelle au tiers +label.add.VPN.gateway=Ajouter une passerelle VPN label.add.account=Ajouter un compte +label.add.account.to.project=Ajouter un compte au projet +label.add.accounts=Ajouter des comptes +label.add.accounts.to=Ajouter des comptes sur +label.add.by=Ajout\u00E9 par label.add.by.cidr=Ajouter par CIDR label.add.by.group=Ajouter par groupe label.add.cluster=Ajouter un cluster -label.add.direct.iprange=Ajouter une plage d\'adresse IP directe +label.add.compute.offering=Ajouter une offre de calcul +label.add.direct.iprange=Ajouter une plage d\\'adresse IP directe label.add.disk.offering=Ajouter une offre disque label.add.domain=Ajouter un domaine -label.add.firewall=Ajouter une règle firewall -label.add.host=Ajouter un hôte -label.add.ingress.rule=Ajouter une règle Ingress +label.add.egress.rule=Ajouter la r\u00E8gle sortante +label.add.firewall=Ajouter une r\u00E8gle de pare-feu +label.add.guest.network=Ajouter un r\u00E9seau d\\'invit\u00E9 +label.add.host=Ajouter un h\u00F4te +label.add.ingress.rule=Ajouter une r\u00E8gle d\\'entr\u00E9e label.add.ip.range=Ajouter une plage IP -label.add.load.balancer=Ajouter un partageur de charge +label.add.load.balancer=Ajouter un r\u00E9partiteur de charge label.add.more=Ajouter plus -label.add.network=Ajouter un réseau +label.add.netScaler.device=Ajouter un Netscaler +label.add.network=Ajouter un r\u00E9seau +label.add.network.ACL=Ajouter une r\u00E8gle d\\'acc\u00E8s r\u00E9seau ACL +label.add.network.device=Ajouter un \u00E9quipement r\u00E9seau +label.add.network.offering=Ajouter une offre r\u00E9seau +label.add.new.F5=Ajouter un F5 +label.add.new.NetScaler=Ajouter un Netscaler +label.add.new.SRX=Ajouter un SRX +label.add.new.gateway=Ajouter une nouvelle passerelle +label.add.new.tier=Ajouter un nouveau tiers +label.add.physical.network=Ajouter un r\u00E9seau physique label.add.pod=Ajouter un pod +label.add.port.forwarding.rule=Ajouter une r\u00E8gle de transfert de port label.add.primary.storage=Ajouter un stockage primaire +label.add.resources=Ajouter des ressources +label.add.route=Ajouter une route +label.add.rule=Ajouter une r\u00E8gle label.add.secondary.storage=Ajouter un stockage secondaire -label.add.security.group=Ajouter un groupe de sécurité -label.add.service.offering=Ajouter un offre de service -label.add.template=Ajouter un modèle +label.add.security.group=Ajouter un groupe de s\u00E9curit\u00E9 +label.add.service.offering=Ajouter une offre de service +label.add.static.nat.rule=Ajouter une r\u00E8gle de NAT statique +label.add.static.route=Ajouter une route statique +label.add.system.service.offering=Ajouter une offre de service syst\u00E8me +label.add.template=Ajouter un mod\u00E8le +label.add.to.group=Ajouter au groupe label.add.user=Ajouter un utilisateur -label.add.vlan=Ajouter un vlan +label.add.vlan=Ajouter un VLAN +label.add.vm=Ajouter VM +label.add.vms=Ajouter VMs +label.add.vms.to.lb=Ajouter une/des VM(s) \u00E0 la r\u00E8gle de r\u00E9partition de charge label.add.volume=Ajouter un volume +label.add.vpc=Ajouter un VPC +label.add.vpn.customer.gateway=Ajouter une passerelle VPN cliente +label.add.vpn.user=Ajouter un utilisateur VPN label.add.zone=Ajouter une zone -label.add=Ajouter +label.adding=Ajout label.adding.cluster=Ajout du Cluster -label.adding.failed=Echec de l\'ajout +label.adding.failed=\u00C9chec de l\\'ajout label.adding.pod=Ajout du Pod label.adding.processing=Ajout... -label.adding.succeeded=Ajout réussi -label.adding.user=Ajout de l\'utilisateur +label.adding.succeeded=Ajout r\u00E9ussi +label.adding.user=Ajout de l\\'utilisateur label.adding.zone=Ajout de la zone -label.adding=Ajout -label.additional.networks=Réseaux additionnels -label.admin.accounts=Comptes Administrateur +label.additional.networks=R\u00E9seaux additionnels label.admin=Administrateur -label.advanced.mode=Mode avancé -label.advanced.search=Recherche avancée -label.advanced=Avancé +label.admin.accounts=Comptes Administrateur +label.advanced=Avanc\u00E9 +label.advanced.mode=Mode avanc\u00E9 +label.advanced.search=Recherche avanc\u00E9e +label.agent.password=Mot de passe Agent +label.agent.username=Identifiant Agent +label.agree=Accepter label.alert=Alerte label.algorithm=Algorithme -label.allocated=Alloué -label.api.key=Clé d\'API -label.assign.to.load.balancer=Assigner l\'instance au partageur de charge +label.allocated=Allou\u00E9 +label.allocation.state=\u00C9tat de l\\'allocation +label.api.key=Cl\u00E9 d\\'API +label.apply=Appliquer label.assign=Assigner -label.associated.network.id=ID du réseau associé -label.attached.iso=Image ISO attachée -label.availability.zone=Zone de disponibilité -label.availability=Disponibilité -label.available.public.ips=Adresses IP publiques disponibles +label.assign.to.load.balancer=Assigner l\\'instance au r\u00E9partiteur de charge +label.associated.network=R\u00E9seau associ\u00E9 +label.associated.network.id=ID du r\u00E9seau associ\u00E9 +label.attached.iso=Image ISO attach\u00E9e +label.availability=Disponibilit\u00E9 +label.availability.zone=Zone de disponibilit\u00E9 label.available=Disponible +label.available.public.ips=Adresses IP publiques disponibles label.back=Retour +label.bandwidth=Bande passante +label.basic=Basique label.basic.mode=Mode basique -label.bootable=Bootable -label.broadcast.domain.type=Type de domaine de broadcast +label.bootable=Amor\u00E7able +label.broadcast.domain.range=Plage du domaine multi-diffusion +label.broadcast.domain.type=Type de domaine de multi-diffusion +label.broadcast.uri=URI multi-diffusion label.by.account=Par compte -label.by.availability=Par disponibilité +label.by.availability=Par disponibilit\u00E9 label.by.domain=Par domaine label.by.end.date=Par date de fin label.by.level=Par niveau label.by.pod=Par Pod -label.by.role=Par role -label.by.start.date=Par date de début -label.by.state=Par état -label.by.traffic.type=Par type de traffic -label.by.type.id=Par type d\'ID +label.by.role=Par r\u00F4le +label.by.start.date=Par date de d\u00E9but +label.by.state=Par \u00E9tat +label.by.traffic.type=Par type de trafic label.by.type=Par type +label.by.type.id=Par type d\\'ID label.by.zone=Par zone -label.bytes.received=Octets reçus -label.bytes.sent=Octets envoyés +label.bytes.received=Octets re\u00E7us +label.bytes.sent=Octets envoy\u00E9s label.cancel=Annuler +label.capacity=Capacit\u00E9 label.certificate=Certificat -label.privatekey=Clé privée PKCS\#8 -label.domain.suffix=Suffixe de domaine DNS (i.e., xyz.com) -label.character=Caractère -label.cidr.account=CIDR ou Compte/Groupe de sécurité +label.change.service.offering=Modifier l\\'offre de service +label.change.value=Modifier la valeur +label.character=Caract\u00E8re +label.checksum=Somme de contr\u00F4le MD5 +label.cidr=CIDR +label.cidr.account=CIDR ou Compte/Groupe de s\u00E9curit\u00E9 +label.cidr.list=CIDR Source +label.clean.up=Nettoyage +label.clear.list=Purger la liste label.close=Fermer -label.cloud.console=Console de gestion du cloud -label.cloud.managed=Géré par Cloud.com -label.cluster.type=Type de Cluster +label.cloud.console=Console d\\'Administration du Cloud +label.cloud.managed=G\u00E9r\u00E9 par Cloud.com label.cluster=Cluster +label.cluster.name=Nom du cluster +label.cluster.type=Type de Cluster +label.clusters=Clusters +label.clvm=CLVM label.code=Code +label.community=Communaut\u00E9 +label.compute=Processeur +label.compute.and.storage=Processeur et Stockage +label.compute.offering=Offre de calcul +label.compute.offerings=Offres de calcul +label.configuration=Configuration +label.configure=Configurer +label.configure.network.ACLs=Configurer les r\u00E8gles d\\'acc\u00E8s r\u00E9seau ACL +label.configure.vpc=Configurer le VPC +label.confirm.password=Confirmer le mot de passe label.confirmation=Confirmation -label.cpu.allocated.for.VMs=CPU alloué aux VMs -label.cpu.allocated=CPU alloué -label.cpu.utilized=CPU utilisé +label.congratulations=F\u00E9licitations \! +label.conserve.mode=Conserver le mode +label.console.proxy=Console proxy +label.continue=Continuer +label.continue.basic.install=Continuer avec l\\'installation basique +label.corrections.saved=Modifications enregistr\u00E9es label.cpu=CPU -label.created=Créé +label.cpu.allocated=CPU allou\u00E9e +label.cpu.allocated.for.VMs=CPU allou\u00E9e aux VMs +label.cpu.mhz=CPU (en MHz) +label.cpu.utilized=CPU utilis\u00E9e +label.create.VPN.connection=Cr\u00E9er une connexion VPN +label.create.project=Cr\u00E9er un projet +label.create.template=Cr\u00E9er un mod\u00E8le +label.created=Cr\u00E9\u00E9 +label.created.by.system=Cr\u00E9\u00E9 par le syst\u00E8me label.cross.zones=Multi Zones -label.custom.disk.size=Taille de disque personnalisée +label.custom.disk.size=Taille de disque personnalis\u00E9e label.daily=Quotidien -label.data.disk.offering=Offre de disque de données +label.data.disk.offering=Offre de disque de donn\u00E9es label.date=Date label.day.of.month=Jour du mois label.day.of.week=Jour de la semaine +label.dead.peer.detection=D\u00E9tection de pair mort +label.decline.invitation=Refuser l\\'invitation +label.dedicated=D\u00E9di\u00E9 +label.default=Par d\u00E9faut +label.default.use=Utilisation par d\u00E9faut +label.default.view=Vue par d\u00E9faut label.delete=Supprimer -label.deleting.failed=Suppression échouée +label.delete.F5=Supprimer F5 +label.delete.NetScaler=Supprimer Netscaler +label.delete.NiciraNvp=Supprimer un contr\u00F4leur Nvp +label.delete.SRX=Supprimer SRX +label.delete.VPN.connection=Supprimer la connexion VPN +label.delete.VPN.customer.gateway=Supprimer la passerelle VPN client +label.delete.VPN.gateway=Supprimer la passerelle VPN +label.delete.gateway=Supprimer la passerelle +label.delete.project=Supprimer projet +label.delete.vpn.user=Supprimer l\\'utilisateur VPN +label.deleting.failed=Suppression \u00E9chou\u00E9e label.deleting.processing=Suppression... label.description=Description -label.detaching.disk=Détacher le disque -label.details=Details -label.device.id=ID du périphérique -label.disabled=Désactivé -label.disabling.vpn.access=Désactiver l\'accès VPN -label.disk.allocated=Disque Alloué +label.destination.physical.network.id=Identifiant du r\u00E9seau physique de destination +label.destination.zone=Zone de destination +label.destroy=D\u00E9truire +label.destroy.router=Supprimer le routeur +label.detaching.disk=D\u00E9tacher le disque +label.details=D\u00E9tails +label.device.id=ID du p\u00E9riph\u00E9rique +label.devices=Machines +label.dhcp=DHCP +label.direct.ips=Adresses IP du r\u00E9seau partag\u00E9 +label.disable.provider=D\u00E9sactiver ce fournisseur +label.disable.vpn=D\u00E9sactiver le VPN +label.disabled=D\u00E9sactiv\u00E9 +label.disabling.vpn.access=D\u00E9sactiver l\\'acc\u00E8s VPN +label.disk.allocated=Disque Allou\u00E9 label.disk.offering=Offre de Disque -label.disk.size.gb=Taille du disque (en Go) label.disk.size=Taille du disque +label.disk.size.gb=Taille du disque (en Go) label.disk.total=Espace disque total label.disk.volume=Volume disque -label.display.text=Texte affiché -label.dns.1=DNS1 -label.dns.2=DNS2 +label.display.name=Nom d\\'affichage +label.display.text=Texte affich\u00E9 +label.dns=DNS +label.dns.1=DNS 1 +label.dns.2=DNS 2 +label.domain=Domaine label.domain.admin=Administrateur du domaine label.domain.id=ID du domaine label.domain.name=Nom de domaine -label.domain=Domaine -label.double.quotes.are.not.allowed=Les guillemets ne sont pas autorisés -label.download.progress=Progression du téléchargement +label.domain.router=Routeur du domaine +label.domain.suffix=Suffixe de domaine DNS (i.e., xyz.com) +label.done=Termin\u00E9 +label.double.quotes.are.not.allowed=Les guillemets ne sont pas autoris\u00E9es +label.download.progress=Progression du t\u00E9l\u00E9chargement +label.drag.new.position=D\u00E9placer sur une autre position label.edit=Modifier +label.edit.lb.rule=Modifier la r\u00E8gle LB +label.edit.network.details=Modifier les param\u00E8tres r\u00E9seau +label.edit.project.details=Modifier les d\u00E9tails du projet +label.edit.tags=Modifier les balises +label.edit.traffic.type=Modifier le type de trafic +label.edit.vpc=Modifier le VPC +label.egress.rule=R\u00E8gle sortante +label.egress.rules=R\u00E8gles de sortie +label.elastic=\u00C9lastique +label.elastic.IP=IP extensible +label.elastic.LB=R\u00E9partition de charge extensible label.email=Email -label.enabling.vpn.access=Activation de l\'accès VPN +label.enable.provider=Activer le fournisseur +label.enable.s3=Activer le stockage secondaire de type S3 +label.enable.swift=Activer Swift +label.enable.vpn=Activer VPN label.enabling.vpn=Activation du VPN +label.enabling.vpn.access=Activation de l\\'acc\u00E8s VPN +label.end.IP=R\u00E9silier l\\'IP label.end.port=Port de fin -label.endpoint.or.operation=Terminaison ou Opération -label.error.code=Code d\'erreur +label.end.reserved.system.IP=Adresse IP de fin r\u00E9serv\u00E9e Syst\u00E8me +label.end.vlan=VLAN de fin +label.endpoint.or.operation=Terminaison ou Op\u00E9ration +label.enter.token=Entrez le jeton unique label.error=Erreur -label.esx.host=Hôte ESX/ESXi +label.error.code=Code d\\'erreur +label.esx.host=H\u00F4te ESX/ESXi label.example=Exemple -label.failed=Echoué -label.featured=Sponsorisé -label.firewall=Parefeu -label.first.name=Prénom +label.f5=F5 +label.failed=\u00C9chou\u00E9 +label.featured=Sponsoris\u00E9 +label.fetch.latest=Rafra\u00EEchir +label.filterBy=Filtrer par +label.firewall=Pare-feu +label.first.name=Pr\u00E9nom label.format=Format label.friday=Vendredi label.full=Complet +label.full.path=Chemin complet label.gateway=Passerelle -label.general.alerts=Alertes générales -label.generating.url=Génération de l\'URL -label.go.step.2=Aller à l\'étape 2 -label.go.step.3=Aller à l\'étape 3 -label.go.step.4=Aller à l\'étape 4 -label.go.step.5=Aller à l\'étape 5 -label.group.optional=Groupe (optionnel) +label.general.alerts=Alertes g\u00E9n\u00E9rales +label.generating.url=G\u00E9n\u00E9ration de l\\'URL +label.go.step.2=Aller \u00E0 l\\'\u00E9tape 2 +label.go.step.3=Aller \u00E0 l\\'\u00E9tape 3 +label.go.step.4=Aller \u00E0 l\\'\u00E9tape 4 +label.go.step.5=Aller \u00E0 l\\'\u00E9tape 5 label.group=Groupe -label.guest.cidr=CIDR invités -label.guest.gateway=Passerelle pour les invités -label.guest.ip.range=Plage d\'adresses IP des invités -label.guest.ip=Adresse IP des invités -label.guest.netmask=Masque de réseau des invités -label.ha.enabled=Haute disponibilité active +label.group.optional=Groupe (optionnel) +label.guest=Invit\u00E9 +label.guest.cidr=CIDR invit\u00E9 +label.guest.end.ip=Adresse IP de fin pour les invit\u00E9s +label.guest.gateway=Passerelle pour les invit\u00E9s +label.guest.ip=Adresse IP des invit\u00E9s +label.guest.ip.range=Plage d\\'adresses IP des invit\u00E9s +label.guest.netmask=Masque de r\u00E9seau des invit\u00E9s +label.guest.networks=R\u00E9seaux d\\'invit\u00E9 +label.guest.start.ip=Adresse IP de d\u00E9but pour les invit\u00E9s +label.guest.traffic=Trafic invit\u00E9 +label.guest.type=Type d\\'invit\u00E9 +label.ha.enabled=Haute disponibilit\u00E9 activ\u00E9e label.help=Aide -label.host.alerts=Alertes des hôtes -label.host.name=Nom d\'hôte -label.host=Serveur -label.hosts=Serveurs -label.hourly=A l\'heure -label.hypervisor.type=Type d\'hyperviseur +label.hide.ingress.rule=Cacher la r\u00E8gle d\\'entr\u00E9e +label.hints=Astuces +label.host=H\u00F4te +label.host.MAC=Adresse MAC h\u00F4te +label.host.alerts=Alertes des h\u00F4tes +label.host.name=Nom d\\'h\u00F4te +label.host.tags=\u00C9tiquettes d\\'h\u00F4te +label.hosts=H\u00F4tes +label.hourly=Chaque heure label.hypervisor=Hyperviseur +label.hypervisor.capabilities=Fonctions hyperviseur +label.hypervisor.type=Type d\\'hyperviseur +label.hypervisor.version=Version hyperviseur label.id=ID label.info=Information -label.ingress.rule=Règle Ingress -label.initiated.by=Initié par -label.instance.limits=Limites des instances -label.instance.name=Nom de lìnstance +label.ingress.rule=R\u00E8gle d\\'entr\u00E9e +label.initiated.by=Initi\u00E9 par +label.installWizard.addClusterIntro.subtitle=Qu\\'est ce qu\\'un cluster ? +label.installWizard.addClusterIntro.title=Ajoutons un cluster +label.installWizard.addHostIntro.subtitle=Qu\\'est ce qu\\'un h\u00F4te ? +label.installWizard.addHostIntro.title=Ajoutons un h\u00F4te +label.installWizard.addPodIntro.subtitle=Qu\\'est ce qu\\'un pod ? +label.installWizard.addPodIntro.title=Ajoutons un pod +label.installWizard.addPrimaryStorageIntro.subtitle=Qu\\'est ce que le stockage primaire ? +label.installWizard.addPrimaryStorageIntro.title=Ajoutons du stockage primaire +label.installWizard.addSecondaryStorageIntro.subtitle=Qu\\'est ce que le stockage secondaire ? +label.installWizard.addSecondaryStorageIntro.title=Ajoutons du stockage secondaire +label.installWizard.addZone.title=Ajouter une zone +label.installWizard.addZoneIntro.subtitle=Qu\\'est ce qu\\'une zone ? +label.installWizard.addZoneIntro.title=Ajoutons une zone +label.installWizard.click.launch=Appuyer sur le bouton d\u00E9marrer. +label.installWizard.subtitle=Ce tutoriel vous aidera \u00E0 configurer votre installation CloudStack&\#8482; +label.installWizard.title=Bonjour et bienvenue dans CloudStack&\#8482; label.instance=Instance +label.instance.limits=Limites des instances +label.instance.name=Nom de l\\'instance label.instances=Instances label.internal.dns.1=DNS interne 1 label.internal.dns.2=DNS interne 2 -label.interval.type=Type d\'ìntervalle +label.internal.name=Nom interne +label.interval.type=Type d\\'intervalle +label.introduction.to.cloudstack=Introduction \u00E0 CloudStack&\#8482; label.invalid.integer=Nombre entier invalide label.invalid.number=Nombre invalide +label.invitations=Invitations +label.invite=Inviter +label.invite.to=Inviter sur +label.invited.accounts=Comptes invit\u00E9s +label.ip=IP label.ip.address=Adresse IP label.ip.allocations=Allocations de IPs label.ip.limits=Limite de IPs publiques label.ip.or.fqdn=IP ou FQDN label.ip.range=Plage IP -label.ip=IP +label.ip.ranges=Plages IP +label.ipaddress=Adresse IP label.ips=IPs -label.is.default=Est par défaut -label.is.shared=Est partagé -label.is.system=Type système +label.is.default=Est par d\u00E9faut +label.is.redundant.router=Redondant +label.is.shared=Est partag\u00E9 +label.is.system=Est Syst\u00E8me label.iscsi=iSCSI -label.iso.boot=Démarrage par ISO label.iso=ISO -label.isolation.mode=Mode d\'isolation +label.iso.boot=D\u00E9marrage par ISO +label.isolated.networks=R\u00E9seaux isol\u00E9s +label.isolation.method=M\u00E9thode de s\u00E9paration +label.isolation.mode=Mode d\\'isolation +label.isolation.uri=URI d\\'isolation +label.item.listing=Liste des \u00E9l\u00E9ments label.keep=Conserver -label.lang.chinese=Chinois (simplifié) +label.key=Clef +label.keyboard.type=Type de clavier +label.kvm.traffic.label=Libell\u00E9 pour le trafic KVM +label.label=Libell\u00E9 +label.lang.brportugese=Portuguais Br\u00E9sil +label.lang.chinese=Chinois (simplifi\u00E9) label.lang.english=Anglais +label.lang.french=Fran\u00E7ais label.lang.japanese=Japonais +label.lang.russian=Russe label.lang.spanish=Espagnol -label.last.disconnected=Dernière Déconnexion -label.last.name=Nom de famille +label.last.disconnected=Derni\u00E8re D\u00E9connexion +label.last.name=Nom +label.latest.events=Derniers \u00E9v\u00E9nements +label.launch=D\u00E9marrer +label.launch.vm=D\u00E9marrer VM +label.launch.zone=D\u00E9marrer la zone +label.least.connections=Le moins de connexions label.level=Niveau label.linklocal.ip=Adresse IP de lien local -label.load.balancer=Partageur de charge +label.load.balancer=R\u00E9partiteur de charge +label.load.balancing=R\u00E9partition de charge +label.load.balancing.policies=R\u00E8gles de r\u00E9partition de charge label.loading=Chargement en cours label.local=Local -# label.local.storage.enabled=Local storage enabled +label.local.storage=Stockage local +label.local.storage.enabled=Stockage local activ\u00E9 label.login=Connexion -label.logout=Déconnexion +label.logout=D\u00E9connexion label.lun=LUN -label.manage=Géré +label.make.project.owner=Devenir propri\u00E9taire du projet +label.manage=G\u00E9r\u00E9 +label.manage.resources=G\u00E9rer les ressources +label.management=Administration +label.management.ips=Adresses IP de gestion +label.max.guest.limit=Nombre maximum d\\'invit\u00E9s +label.max.networks=R\u00E9seaux Max. +label.max.public.ips=Max. IP publiques +label.max.snapshots=Max instantan\u00E9es +label.max.templates=Max. mod\u00E8les +label.max.vms=Max. VMs utilisateur +label.max.volumes=Max. volumes +label.max.vpcs=Max. VPCs label.maximum=Maximum -label.memory.allocated=Mémoire allouée -label.memory.total=Mémoire totale -label.memory.used=Mémoire utilisée -label.memory=Mémoire (en MB) +label.may.continue=Vous pouvez continuer. +label.memory=M\u00E9moire (en Mo) +label.memory.allocated=M\u00E9moire allou\u00E9e +label.memory.mb=M\u00E9moire (en MB) +label.memory.total=M\u00E9moire totale +label.memory.used=M\u00E9moire utilis\u00E9e label.menu.accounts=Comptes label.menu.alerts=Alertes -label.menu.all.accounts=Tout les comptes +label.menu.all.accounts=Tous les comptes label.menu.all.instances=Toutes les instances -label.menu.community.isos=ISO de la communauté -label.menu.community.templates=Modèles de la communauté +label.menu.community.isos=ISO de la communaut\u00E9 +label.menu.community.templates=Mod\u00E8les de la communaut\u00E9 label.menu.configuration=Configuration label.menu.dashboard=Tableau de bord -label.menu.destroyed.instances=Instances détruites +label.menu.destroyed.instances=Instances d\u00E9truites label.menu.disk.offerings=Offres de disque label.menu.domains=Domaines -label.menu.events=Evénements -label.menu.featured.isos=ISOs Sponsorisées -label.menu.featured.templates=Modèles sponsorisés -label.menu.global.settings=Paramètres globaux +label.menu.events=\u00C9v\u00E9nements +label.menu.featured.isos=ISOs Sponsoris\u00E9es +label.menu.featured.templates=Mod\u00E8les sponsoris\u00E9s +label.menu.global.settings=Param\u00E8tres globaux +label.menu.infrastructure=Infrastructure label.menu.instances=Instances label.menu.ipaddresses=Adresses IP label.menu.isos=ISOs label.menu.my.accounts=Mes comptes label.menu.my.instances=Mes instances label.menu.my.isos=Mes ISOs -label.menu.my.templates=Mes modèles -label.menu.network.offerings=Offres de Service Réseau -label.menu.network=Réseau +label.menu.my.templates=Mes mod\u00E8les +label.menu.network=R\u00E9seau +label.menu.network.offerings=Offres de Service R\u00E9seau label.menu.physical.resources=Ressources physiques label.menu.running.instances=Instances actives -label.menu.security.groups=Groupes de sécurité +label.menu.security.groups=Groupes de s\u00E9curit\u00E9 label.menu.service.offerings=Offres de Service -label.menu.snapshots=Instantanés -label.menu.stopped.instances=Instances Arrêtées +label.menu.snapshots=Instantan\u00E9s +label.menu.stopped.instances=Instances Arr\u00EAt\u00E9es label.menu.storage=Stockage -label.menu.system.vms=\ VMs Systèmes -label.menu.system=Système -label.menu.templates=Modèles +label.menu.system=Syst\u00E8me +label.menu.system.service.offerings=Offres syst\u00E8me +label.menu.system.vms=\ VMs Syst\u00E8mes +label.menu.templates=Mod\u00E8les label.menu.virtual.appliances=Appliances Virtuelles label.menu.virtual.resources=Ressources Virtuelles label.menu.volumes=Volumes -label.migrate.instance.to=Migrer l\'instance vers +label.migrate.instance.to=Migrer l\\'instance vers +label.migrate.instance.to.host=Migration de l\\'instance sur un autre h\u00F4te +label.migrate.instance.to.ps=Migration de l\\'instance sur un autre stockage primaire +label.migrate.router.to=Migrer le routeur vers +label.migrate.systemvm.to=Migrer la VM syst\u00E8me vers +label.migrate.to.host=Migrer vers un h\u00F4te +label.migrate.to.storage=Migrer vers un stockage +label.migrate.volume=Migration du volume vers un autre stockage primaire label.minimum=Minimum label.minute.past.hour=minute(s) label.monday=Lundi label.monthly=Mensuel -label.more.templates=Plus de modèles +label.more.templates=Plus de mod\u00E8les +label.move.down.row=Descendre d\\'un cran +label.move.to.bottom=D\u00E9placer en bas +label.move.to.top=Placer au dessus +label.move.up.row=Monter d\\'un cran label.my.account=Mon compte -label.name.optional=Nom (optionnel) +label.my.network=Mon r\u00E9seau +label.my.templates=Mes mod\u00E8les label.name=Nom -label.netmask=Masque de réseau -label.network.desc=Description réseau +label.name.optional=Nom (optionnel) +label.nat.port.range=Plage de port NAT +label.netScaler=NetScaler +label.netmask=Masque de r\u00E9seau +label.network=R\u00E9seau +label.network.ACL=R\u00E8gles d\\'acc\u00E8s r\u00E9seau ACL +label.network.ACL.total=Total R\u00E8gles d\\'acc\u00E8s r\u00E9seau +label.network.ACLs=R\u00E8gles d\\'acc\u00E8s r\u00E9seau +label.network.desc=Description r\u00E9seau +label.network.device=\u00C9quipement R\u00E9seau +label.network.device.type=Type d\\'\u00E9quipement r\u00E9seau label.network.domain=Nom de domaine -label.network.id=ID réseau -label.network.name=Nom du réseau -label.network.offering.display.text=Texte affiché d\'Offre de Réseau -label.network.offering.id=ID de l\'Offre de Service Réseau -label.network.offering.name=Nom de l\'Offre de Service Réseau -label.network.offering=Offre de Service Réseau -label.network.rate=Débit réseau -label.network.read=Lecture réseau -label.network.type=Type de réseau -label.network.write=Écriture réseau -label.network=Réseau +label.network.domain.text=Domaine r\u00E9seau +label.network.id=ID r\u00E9seau +label.network.label.display.for.blank.value=Utiliser la passerelle par d\u00E9faut +label.network.name=Nom du r\u00E9seau +label.network.offering=Offre de Service R\u00E9seau +label.network.offering.display.text=Texte affich\u00E9 d\\'Offre de R\u00E9seau +label.network.offering.id=ID de l\\'Offre de Service R\u00E9seau +label.network.offering.name=Nom de l\\'Offre de Service R\u00E9seau +label.network.rate=D\u00E9bit R\u00E9seau +label.network.rate.megabytes=D\u00E9bit r\u00E9seau (Mo/s) +label.network.read=Lecture r\u00E9seau +label.network.service.providers=Fournisseurs de service r\u00E9seau +label.network.type=Type de r\u00E9seau +label.network.write=\u00C9criture r\u00E9seau +label.networking.and.security=R\u00E9seau et s\u00E9curit\u00E9 +label.networks=R\u00E9seaux +label.new=Nouveau label.new.password=Nouveau mot de passe +label.new.project=Nouveau projet +label.new.vm=Nouvelle VM label.next=Suivant +label.nexusVswitch=Nexus 1000v +label.nfs=NFS label.nfs.server=Serveur NFS label.nfs.storage=Stockage NFS -label.nfs=NFS +label.nic.adapter.type=Type de carte r\u00E9seau +label.nicira.controller.address=Adresse du contr\u00F4leur +label.nicira.l3gatewayserviceuuid=Uuid du service passerelle L3 +label.nicira.transportzoneuuid=Uuid de la Zone Transport label.nics=Cartes NIC -label.no.actions=Aucune action disponibles -label.no.alerts=Aucune alerte récentes -label.no.errors=Aucune erreur récentes -label.no.isos=Aucun ISOs disponibles -label.no.items=Aucun élément disponibles -label.no.security.groups=Aucun groupe de sécurité disponibles -label.no.thanks=Non merci label.no=Non +label.no.actions=Aucune action disponible +label.no.alerts=Aucune alerte r\u00E9cente +label.no.data=Aucune donn\u00E9e +label.no.errors=Aucune erreur r\u00E9cente +label.no.isos=Aucun ISOs disponible +label.no.items=Aucun \u00E9l\u00E9ment disponible +label.no.security.groups=Aucun groupe de s\u00E9curit\u00E9 disponible +label.no.thanks=Non merci label.none=Aucun label.not.found=Introuvable -label.num.cpu.cores=Nombre de c\u0153urs de processeur +label.notifications=Messages +label.num.cpu.cores=Nombre de coeurs de processeur +label.number.of.clusters=Nombre de clusters +label.number.of.hosts=Nombre d\\'H\u00F4tes +label.number.of.pods=Nombre de Pods +label.number.of.system.vms=Nombre de VM Syst\u00E8me +label.number.of.virtual.routers=Nombre de routeurs virtuels +label.number.of.zones=Nombre de zones label.numretries=Nombre de tentatives -label.offer.ha=Offrir la haute disponibilité +label.ocfs2=OCFS2 +label.offer.ha=Offrir la haute disponibilit\u00E9 +label.ok=OK label.optional=Facultatif -label.os.preference=Préférence du OS +label.order=Ordre +label.os.preference=Pr\u00E9f\u00E9rence du OS label.os.type=Type du OS -label.owned.public.ips=Addresses IP Publique détenues -label.owner.account=Compte propriétaire -label.owner.domain=Propriétaire du domaine -label.parent.domain=Domaine Parent -label.password.enabled=Mot de passe activé +label.owned.public.ips=Adresses IP Publiques d\u00E9tenues +label.owner.account=Propri\u00E9taire du compte +label.owner.domain=Propri\u00E9taire du domaine +label.parent.domain=Parent du Domaine label.password=Mot de passe +label.password.enabled=Mot de passe activ\u00E9 label.path=Chemin -label.please.wait=Patientez s\'il vous plait +label.perfect.forward.secrecy=Confidentialit\u00E9 persistante +label.physical.network=R\u00E9seau physique +label.physical.network.ID=Identifiant du r\u00E9seau physique +label.please.specify.netscaler.info=Renseigner les informations sur le Netscaler +label.please.wait=Patientez s\\'il vous plait label.pod=Pod +label.pod.name=Nom du pod +label.pods=Pods label.port.forwarding=Redirection de port +label.port.forwarding.policies=R\u00E8gles de transfert de port label.port.range=Plage de ports -label.prev=Précédent -label.primary.allocated=Stockage primaire alloué -label.primary.network=Réseau primaire -label.primary.storage=Stockage primaire -label.primary.used=Stockage primaire utilisé -label.private.interface=Interface privée -label.private.ip.range=Plage d\'adresses IP Privées -label.private.ip=Adresse IP Privée -label.private.ips=Adresses IP Privées -label.private.port=Port privé -label.private.zone=Zone Privée +label.prev=Pr\u00E9c\u00E9dent +label.previous=Retour +label.primary.allocated=Stockage primaire allou\u00E9 +label.primary.network=R\u00E9seau primaire +label.primary.storage=Premier stockage +label.primary.storage.count=Groupes de stockage primaire +label.primary.used=Stockage primaire utilis\u00E9 +label.private.Gateway=Passerelle priv\u00E9e +label.private.interface=Interface priv\u00E9e +label.private.ip=Adresse IP Priv\u00E9e +label.private.ip.range=Plage d\\'adresses IP Priv\u00E9es +label.private.ips=Adresses IP Priv\u00E9es +label.private.network=R\u00E9seau priv\u00E9 +label.private.port=Port priv\u00E9 +label.private.zone=Zone Priv\u00E9e +label.privatekey=Cl\u00E9 priv\u00E9e PKCS\#8 +label.project=Projet +label.project.dashboard=Tableau de bord projet +label.project.id=ID projet +label.project.invite=Inviter sur le projet +label.project.name=Nom du projet +label.project.view=Vue projet +label.projects=Projets label.protocol=Protocole +label.providers=Fournisseurs +label.public=Publique label.public.interface=Interface publique label.public.ip=Adresse IP publique label.public.ips=Adresses IP publiques +label.public.network=R\u00E9seau public label.public.port=Port public +label.public.traffic=Trafic public label.public.zone=Zone publique -label.public=Publique -label.recent.errors=Erreurs récentes +label.purpose=R\u00F4le +label.quickview=Aper\u00E7u +label.reboot=Red\u00E9marrer +label.recent.errors=Erreurs r\u00E9centes +label.redundant.router=Routeur redondant +label.redundant.router.capability=Router redondant +label.redundant.state=\u00C9tat de la redondance label.refresh=Actualiser label.related=Connexes -label.remove.from.load.balancer=Supprimer l\'instance du partageur de charge -label.removing.user=Retrait de l\'utilisateur +label.remind.later=Rappeler moi plus tard +label.remove.ACL=Supprimer une r\u00E8gle ACL +label.remove.egress.rule=Supprimer la r\u00E8gle sortante +label.remove.from.load.balancer=Supprimer l\\'instance du r\u00E9partiteur de charge +label.remove.ingress.rule=Supprimer la r\u00E8gle entrante +label.remove.ip.range=Supprimer la plage IP +label.remove.pf=Supprimer la r\u00E8gle de transfert de port +label.remove.project.account=Supprimer le compte projet +label.remove.rule=Supprimer la r\u00E8gle +label.remove.static.nat.rule=Supprimer le NAT statique +label.remove.static.route=Supprimer une route statique +label.remove.tier=Supprimer le tiers +label.remove.vm.from.lb=Supprimer la VM de la r\u00E8gle de r\u00E9partition de charge +label.remove.vpc=Supprimer le VPC +label.removing=Suppression +label.removing.user=Retrait de l\\'utilisateur label.required=Requis -label.reserved.system.ip=Adresse IP Système réservé -label.resource.limits=Limite des ressources +label.reserved.system.gateway=Passerelle r\u00E9serv\u00E9e Syst\u00E8me +label.reserved.system.ip=Adresse IP Syst\u00E8me r\u00E9serv\u00E9e +label.reserved.system.netmask=Masque de sous-r\u00E9seau r\u00E9serv\u00E9 Syst\u00E8me +label.reset.VPN.connection=R\u00E9-initialiser la connexion VPN label.resource=Ressource +label.resource.limits=Limite des ressources +label.resource.state=\u00C9tat des ressources label.resources=Ressources -label.role=Rôle +label.restart.network=Red\u00E9marrage du r\u00E9seau +label.restart.required=Red\u00E9marrage n\u00E9cessaire +label.restart.vpc=Red\u00E9marrer le VPC +label.restore=Restaurer +label.review=Revoir +label.revoke.project.invite=R\u00E9voquer l\\'invitation +label.role=R\u00F4le +label.root.disk.controller=Contr\u00F4leur de disque principal label.root.disk.offering=Offre de disque racine +label.round.robin=Al\u00E9atoire +label.rules=R\u00E8gles label.running.vms=VMs actives +label.s3.access_key=Cl\u00E9 d\\'Acc\u00E8s +label.s3.bucket=Seau +label.s3.connection_timeout=D\u00E9lai d\\'expiration de connexion +label.s3.endpoint=Terminaison +label.s3.max_error_retry=Nombre d\\'essai en erreur max. +label.s3.secret_key=Cl\u00E9 Priv\u00E9e +label.s3.socket_timeout=D\u00E9lai d\\'expiration de la socket +label.s3.use_https=Utiliser HTTPS label.saturday=Samedi label.save=Sauvegarder -label.saving.processing=Sauvegarde en cours.... -label.scope=Portée +label.save.and.continue=Enregistrer et continuer +label.saving.processing=Sauvegarde en cours... +label.scope=Port\u00E9e label.search=Rechercher label.secondary.storage=Stockage secondaire -label.secondary.used=Stockage secondaire utilisé -label.secret.key=clé privée -label.security.group.name=Nom du groupe de sécurité -label.security.group=Groupe de sécurité -label.security.groups.enabled=Groupes de sécurité Activés -label.security.groups=Groupes de sécurité -label.sent=Envoyer +label.secondary.storage.count=Groupes de stockage secondaire +label.secondary.storage.vm=VM stockage secondaire +label.secondary.used=Stockage secondaire utilis\u00E9 +label.secret.key=Cl\u00E9 priv\u00E9e +label.security.group=Groupe de s\u00E9curit\u00E9 +label.security.group.name=Nom du groupe de s\u00E9curit\u00E9 +label.security.groups=Groupes de s\u00E9curit\u00E9 +label.security.groups.enabled=Groupes de s\u00E9curit\u00E9 Activ\u00E9s +label.select=S\u00E9lectionner +label.select-view=S\u00E9lectionner la vue +label.select.a.template=S\u00E9lectionner un mod\u00E8le +label.select.a.zone=S\u00E9lectionner une zone +label.select.instance=S\u00E9lectionner une instance +label.select.instance.to.attach.volume.to=S\u00E9lectionner l\\'instance \u00E0 laquelle rattacher ce volume +label.select.iso.or.template=S\u00E9lectionner un ISO ou un mod\u00E8le +label.select.offering=S\u00E9lectionner une offre +label.select.project=S\u00E9lectionner un projet +label.select.tier=S\u00E9lectionner le tiers +label.select.vm.for.static.nat=S\u00E9lectionner une VM pour le NAT statique +label.sent=Envoy\u00E9 label.server=Serveur +label.service.capabilities=Fonctions disponibles label.service.offering=Offre de Service -label.system.service.offering=Offre de Service Système -label.session.expired=Session expiré +label.session.expired=Session expir\u00E9e +label.set.up.zone.type=Configurer le type de zone +label.setup=Configuration +label.setup.network=Configurer le r\u00E9seau +label.setup.zone=Configurer la zone label.shared=En partage +label.show.ingress.rule=Montrer la r\u00E8gle d\\'entr\u00E9e +label.shutdown.provider=\u00C9teindre ce fournisseur +label.site.to.site.VPN=VPN Site-\u00E0-Site label.size=Taille -label.snapshot.limits=Limite d\'instantanés -label.snapshot.name=Nom de l\'instantané -label.snapshot.s=Instantané(s) -label.snapshot.schedule=Configurer un snapshot récurrent -label.snapshot=Instantané -label.snapshots=Instantanés +label.skip.guide=J\\'ai d\u00E9j\u00E0 utilis\u00E9 CloudStack avant, passer ce tutoriel +label.snapshot=Instantan\u00E9 +label.snapshot.limits=Limites d\\'instantan\u00E9 +label.snapshot.name=Nom de l\\'instantan\u00E9 +label.snapshot.s=Instantan\u00E9(s) +label.snapshot.schedule=Configurer un instantan\u00E9 r\u00E9current +label.snapshots=Instantan\u00E9s +label.source=Origine label.source.nat=NAT Source -label.specify.vlan=Précisez le VLAN -label.start.port=Port de -label.state=État -label.static.nat.to=NAT Static vers -label.static.nat=NAT Static +label.specify.IP.ranges=Sp\u00E9cifier des plages IP +label.specify.vlan=Pr\u00E9ciser le VLAN +label.srx=SRX +label.start.IP=D\u00E9marrer l\\'IP +label.start.port=Port de d\u00E9but +label.start.reserved.system.IP=Adresse IP de d\u00E9but r\u00E9serv\u00E9e Syst\u00E8me +label.start.vlan=VLAN de d\u00E9part +label.state=\u00C9tat +label.static.nat=NAT Statique +label.static.nat.enabled=NAT statique activ\u00E9 +label.static.nat.to=NAT Statique vers +label.static.nat.vm.details=D\u00E9tails des NAT statique VM label.statistics=Statistiques label.status=Statut -label.step.1.title=Etape 1 \: Sélectionnez un modèle -label.step.1=Étape 1 -label.step.2.title=Etape 2\: Offre de Service -label.step.2=Étape 2 -label.step.3.title=Etape 3\: Sélectionnez une offre de service -label.step.3=Étape 3 -label.step.4.title=Etape 4\: Réseau -label.step.4=Étape 4 -label.step.5.title=Etape 5\: Vérification -label.step.5=Étape 5 -label.stopped.vms=VMs arrêtés -label.storage.type=Type de stockage +label.step.1=\u00C9tape 1 +label.step.1.title=\u00C9tape 1 \: S\u00E9lectionnez un mod\u00E8le +label.step.2=\u00C9tape 2 +label.step.2.title=\u00C9tape 2 \: Offre de Service +label.step.3=\u00C9tape 3 +label.step.3.title=\u00C9tape 3 \: S\u00E9lectionnez une offre de service +label.step.4=\u00C9tape 4 +label.step.4.title=\u00C9tape 4 \: R\u00E9seau +label.step.5=\u00C9tape 5 +label.step.5.title=\u00C9tape 5 \: V\u00E9rification +label.stickiness=Fid\u00E9lit\u00E9 +label.sticky.cookie-name=Nom du cookie +label.sticky.domain=Domaine +label.sticky.expire=Expiration +label.sticky.holdtime=Temps de pause +label.sticky.indirect=Indirect +label.sticky.length=Longueur +label.sticky.mode=Mode +label.sticky.nocache=Pas de cache +label.sticky.postonly=Apr\u00E8s seulement +label.sticky.prefix=Pr\u00E9fixe +label.sticky.request-learn=Apprendre la requ\u00EAte +label.sticky.tablesize=Taille du tableau +label.stop=Arr\u00EAter +label.stopped.vms=VMs arr\u00EAt\u00E9es label.storage=Stockage +label.storage.tags=\u00C9tiquettes de stockage +label.storage.traffic=Trafic stockage +label.storage.type=Type de stockage +label.subdomain.access=Acc\u00E8s sous-domaine label.submit=Envoyer -label.submitted.by=[Soumis par\: ] -label.succeeded=Réussi +label.submitted.by=[Soumis par \: ] +label.succeeded=R\u00E9ussi label.sunday=Dimanche -label.system.capacity=Capacité système -label.system.vm.type=Type de VM système -label.system.vm=VM Système -label.system.vms=\ VMs systèmes -label.tagged=Taggé -label.tags=Tags -label.target.iqn=IQN de la Cible -label.template.limits=Limites des modèles -label.template=Modèle -label.theme.default=Thème par défaut -label.theme.grey=Personnalisé - Gris -label.theme.lightblue=Personnalisé - Blue clair +label.super.cidr.for.guest.networks=Super CIDR pour les r\u00E9seaux invit\u00E9s +label.supported.services=Services support\u00E9s +label.supported.source.NAT.type=Type de NAT support\u00E9 +label.suspend.project=Suspendre projet +label.system.capacity=Capacit\u00E9 syst\u00E8me +label.system.offering=Offre de syst\u00E8me +label.system.service.offering=Offre de Service Syst\u00E8me +label.system.vm=VM Syst\u00E8me +label.system.vm.type=Type de VM syst\u00E8me +label.system.vms=\ VMs Syst\u00E8mes +label.system.wide.capacity=Capacit\u00E9 globale +label.tagged=\u00C9tiquet\u00E9 +label.tags=\u00C9tiquette +label.target.iqn=Cible IQN +label.task.completed=T\u00E2che termin\u00E9e +label.template=Mod\u00E8le +label.template.limits=Limites de mod\u00E8le +label.theme.default=Th\u00E8me par d\u00E9faut +label.theme.grey=Personnalis\u00E9 - Gris +label.theme.lightblue=Personnalis\u00E9 - Bleu clair label.thursday=Jeudi -label.time.zone=Fuseau horaire +label.tier=Tiers +label.tier.details=D\u00E9tails du tiers label.time=Temps -label.timeout.in.second = Timeout (secondes) +label.time.zone=Fuseau horaire +label.timeout=D\u00E9lai d\\'expiration +label.timeout.in.second=D\u00E9lai d\\'expiration (secondes) label.timezone=Fuseau horaire -label.total.cpu=Capacité Totale en CPU +label.token=Jeton unique +label.total.CPU=Capacit\u00E9 totale en CPU +label.total.cpu=Capacit\u00E9 Totale en CPU +label.total.hosts=Total H\u00F4tes +label.total.memory=Total m\u00E9moire +label.total.of.ip=Total adresses IP +label.total.of.vm=Total VM +label.total.storage=Total stockage label.total.vms=Nombre total de VMs -label.traffic.type=Type de Traffic +label.traffic.label=Libell\u00E9 de trafic +label.traffic.type=Type de Trafic +label.traffic.types=Types de trafic label.tuesday=Mardi -label.type.id=ID du Type label.type=Type +label.type.id=ID du Type label.unavailable=Indisponible -label.unlimited=Illimité -label.untagged=Non Taggé -label.update.ssl.cert=Mettre à jour le certificate SSL -label.update.ssl=Mettre à jour le certificate SSL -label.updating=Mise à jour +label.unlimited=Illimit\u00E9 +label.untagged=Non Tagg\u00E9 +label.update.project.resources=Mettre \u00E0 jour les ressources du projet +label.update.ssl=Certificat SSL +label.update.ssl.cert=Certificat SSL +label.updating=Mise \u00E0 jour +label.upload=Charger +label.upload.volume=Charger un volume label.url=URL -label.usage.interface=Interface d\'Usage -label.used=Utilisé +label.usage.interface=Interface Utilisation +label.used=Utilis\u00E9 label.user=Utilisateur -label.username=Nom d\'Utilisateur +label.username=Nom d\\'Utilisateur label.users=Utilisateurs label.value=Valeur +label.vcdcname=Nom du DC vCenter label.vcenter.cluster=Cluster vCenter label.vcenter.datacenter=Datacenter vCenter label.vcenter.datastore=Datastore vCenter -label.vcenter.host=Hôte Vcenter +label.vcenter.host=H\u00F4te vCenter label.vcenter.password=Mot de passe vCenter -label.vcenter.username=Nom d\'utilisateur vCenter +label.vcenter.username=Nom d\\'utilisateur vCenter +label.vcipaddress=Adresse IP vCenter label.version=Version +label.view=Voir +label.view.all=Voir tout +label.view.console=Voir la console +label.view.more=Voir plus +label.viewing=Consultation en cours label.virtual.appliance=Appliance Virtuelle label.virtual.appliances=Appliances Virtuelles -label.virtual.network=Réseau virtuel +label.virtual.machines=Machines virtuelles +label.virtual.network=R\u00E9seau virtuel +label.virtual.router=Routeur Virtuel +label.virtual.routers=Routeurs virtuels +label.vlan=VLAN label.vlan.id=ID du VLAN label.vlan.range=Plage du VLAN label.vm.add=Ajouter une instance -label.vm.destroy=Détruire -label.vm.reboot=Redémarrer -label.vm.start=Démarrer -label.vm.stop=Arrêtez +label.vm.destroy=D\u00E9truire +label.vm.display.name=Nom d\\'affichage de la VM +label.vm.name=Nom de la VM +label.vm.reboot=Red\u00E9marrer +label.vm.start=D\u00E9marrer +label.vm.state=\u00C9tat VM +label.vm.stop=Arr\u00EAter label.vmfs=VMFS label.vms=VMs +label.vmware.traffic.label=Libell\u00E9 pour le trafic VMware +label.volgroup=Groupe de Volume +label.volume=Volume label.volume.limits=Limites des volumes label.volume.name=Nom du volume -label.volume=Volume label.volumes=Volumes -label.vsphere.managed=Gérée par vSphere +label.vpc=VPC +label.vpc.id=ID VPC +label.vpn=VPN +label.vpn.customer.gateway=Passerelle VPN client +label.vsmctrlvlanid=\ ID VLAN Contr\u00F4le +label.vsmpktvlanid=ID VLAN Paquet +label.vsmstoragevlanid=VLAN ID Stockage +label.vsphere.managed=G\u00E9r\u00E9e par vSphere label.waiting=En attente -label.warn=Avertir +label.warn=Avertissement label.wednesday=Mercredi label.weekly=Hebdomadaire -label.welcome.cloud.console=Bienvenue dans la console de gestion label.welcome=Bienvenue +label.welcome.cloud.console=Bienvenue dans la Console d\\'Administration +label.what.is.cloudstack=Qu\\'est-ce-que CloudStack&\#8482; ? +label.xen.traffic.label=Libell\u00E9 pour le trafic XenServer label.yes=Oui -label.zone.id=ID de la zone -label.zone.step.1.title=Etape 1\: Sélectionnez un réseau -label.zone.step.2.title=Etape 2\: Ajoutez une zone -label.zone.step.3.title=Etape 3\: Ajoutez un Pod -label.zone.step.4.title=Etape 4\: Ajoutez une plage d\'adresses IP -label.zone.wide=Transverse à la zone label.zone=Zone - -#Messages -message.acquire.public.ip=Sélectionnez la zone dans laquelle vous voulez acquérir votre nouvelle adresse IP. -message.action.cancel.maintenance.mode=Confirmer que vous souhaitez annuler cette maintenance. -message.action.cancel.maintenance=Votre hôte a été annulée de la maintenance. Ce processus peut prendre jusqu\'à plusieurs minutes. -message.action.delete.ISO.for.all.zones=L\'ISO est utilisé par toutes les zones. S\'il vous plaît confirmer que vous voulez le supprimer de toutes les zones. +label.zone.details=D\u00E9tails de la zone +label.zone.id=ID de la zone +label.zone.name=Nom de la zone +label.zone.step.1.title=\u00C9tape 1 \: S\u00E9lectionnez un r\u00E9seau +label.zone.step.2.title=\u00C9tape 2 \: Ajoutez une zone +label.zone.step.3.title=\u00C9tape 3 \: Ajoutez un Pod +label.zone.step.4.title=\u00C9tape 4 \: Ajoutez une plage d\\'adresses IP +label.zone.type=Type de zone +label.zone.wide=Transverse \u00E0 la zone +label.zoneWizard.trafficType.guest=Invit\u00E9 \: Trafic entre les machines virtuelles utilisateurs +label.zoneWizard.trafficType.management=Administration \: Trafic entre les ressources internes de CloudStack, incluant tous les composants qui communiquent avec le serveur d\\'administration, tels que les h\u00F4tes and les machines virtuelles Syst\u00E8mes CloudStack +label.zoneWizard.trafficType.public=Public \: Trafic entre Internet et les machines virtuelles dans le nuage +label.zoneWizard.trafficType.storage=Stockage \: Trafic entre les serveurs de stockages primaires et secondaires, tel que le transfert de machines virtuelles mod\u00E8les et des instantan\u00E9s de disques +label.zones=Zones +managed.state=\u00C9tat de la gestion +message.Zone.creation.complete=Cr\u00E9ation de la zone termin\u00E9e +message.acquire.new.ip=Confirmer l\\'acquisition d\\'une nouvelle adresse IP pour ce r\u00E9seau. +message.acquire.new.ip.vpc=Veuillez confirmer que vous voulez une nouvelle adresse IP pour ce VPC +message.acquire.public.ip=S\u00E9lectionnez la zone dans laquelle vous voulez acqu\u00E9rir votre nouvelle adresse IP. +message.action.cancel.maintenance=Votre h\u00F4te a quitt\u00E9 la maintenance. Ce processus peut prendre jusqu\\'\u00E0 plusieurs minutes. +message.action.cancel.maintenance.mode=Confirmer l\\'annulation de cette maintenance. +message.action.change.service.warning.for.instance=Votre instance doit \u00EAtre arr\u00EAt\u00E9e avant d\\'essayer de changer son offre de service. +message.action.change.service.warning.for.router=Votre routeur doit \u00EAtre arr\u00EAt\u00E9 avant d\\'essayer de changer son offre de service. message.action.delete.ISO=Confirmer que vous souhaitez supprimer cette ISO. +message.action.delete.ISO.for.all.zones=L\\'ISO est utilis\u00E9 par toutes les zones. S\\'il vous pla\u00EEt confirmer que vous voulez le supprimer de toutes les zones. message.action.delete.cluster=Confirmer que vous voulez supprimer ce cluster. message.action.delete.disk.offering=Confirmer que vous souhaitez supprimer cette offre de disque. message.action.delete.domain=Confirmer que vous voulez supprimer ce domaine. -message.action.delete.external.firewall=Confirmer que vous souhaitez supprimer ce pare-feu externe. Attention\: Si vous prévoyez de rajouter le même pare-feu externe de nouveau, vous devez réinitialiser les données d\'utilisation sur l\'appareil. -message.action.delete.external.load.balancer=Confirmez que vous souhaitez supprimer ce partageur de charge externe. Attention \: Si vous pensez ajouter le même partageur de charge plus tard, vous devez remettre à zéro les statistiques d\'usage de cet équipement. -message.action.delete.ingress.rule=Confirmez que vous souhaitez supprimer cette règle Ingress -message.action.delete.network=Confirmer que vous voulez supprimer ce réseau. +message.action.delete.external.firewall=Confirmer que vous souhaitez supprimer ce pare-feu externe. Attention \: Si vous pr\u00E9voyez de rajouter le m\u00EAme pare-feu externe de nouveau, vous devez r\u00E9-initialiser les donn\u00E9es d\\'utilisation sur l\\'appareil. +message.action.delete.external.load.balancer=Confirmez que vous souhaitez supprimer ce r\u00E9partiteur de charge externe. Attention \: Si vous pensez ajouter le m\u00EAme r\u00E9partiteur de charge plus tard, vous devez remettre \u00E0 z\u00E9ro les statistiques d\\'utilisation de cet \u00E9quipement. +message.action.delete.ingress.rule=Confirmez que vous souhaitez supprimer cette r\u00E8gle d\\'entr\u00E9e. +message.action.delete.network=Confirmer que vous voulez supprimer ce r\u00E9seau. +message.action.delete.nexusVswitch=Confirmer la suppession de ce Nexus 1000v +message.action.delete.physical.network=Confirmer la suppression du r\u00E9seau physique message.action.delete.pod=Confirmez que vous souhaitez supprimer ce pod. message.action.delete.primary.storage=Confirmer que vous voulez supprimer ce stockage primaire. message.action.delete.secondary.storage=Confirmez que vous souhaitez supprimer ce stockage secondaire. -message.action.delete.security.group=Confirmez que vous souhaitez supprimer ce groupe de sécurité. +message.action.delete.security.group=Confirmez que vous souhaitez supprimer ce groupe de s\u00E9curit\u00E9. message.action.delete.service.offering=Confirmez que vous souhaitez supprimer cette offre de service. -message.action.delete.snapshot=Confirmez que vous souhaitez supprimer cet instantané -message.action.delete.template.for.all.zones=Ce modèle est utilisé par toutes les zones. Confirmez que vous souhaitez le supprimer de toutes les zones. -message.action.delete.template=Confirmez que vous souhaitez supprimer ce modèle. +message.action.delete.snapshot=Confirmez que vous souhaitez supprimer cet instantan\u00E9 +message.action.delete.system.service.offering=Confirmer la suppression de l\\'offre syst\u00E8me. +message.action.delete.template=Confirmez que vous souhaitez supprimer ce mod\u00E8le. +message.action.delete.template.for.all.zones=Ce mod\u00E8le est utilis\u00E9 par toutes les zones. Confirmez que vous souhaitez le supprimer de toutes les zones. message.action.delete.volume=Confirmez que vous souhaitez supprimer ce volume. message.action.delete.zone=Confirmez que vous souhaitez supprimer cette zone. message.action.destroy.instance=Confirmez que vous souhaitez supprimer cette instance. -message.action.destroy.systemvm=Confirmez que vous souhaitez supprimer cette VM Système. -message.action.disable.static.NAT=Confirmez que vous souhaitez désactiver le NAT statique. -message.action.enable.maintenance=Votre hôte a été mis en mode maintenance avec succès. Ce processus peut durer plusieurs minutes ou plus suivant le nombre de VMs actives sur cet hôte. -message.action.force.reconnect=Votre hôte a été forcé à se reconnecter avec succès. Ce processus peut prendre jusqu\'à plusieurs minutes. -message.action.host.enable.maintenance.mode=Activer le mode maintenance va causer la migration à chaud de l\'ensemble des instances de cet hôte sur les autres hôtes disponibles. +message.action.destroy.systemvm=Confirmez que vous souhaitez supprimer cette VM Syst\u00E8me. +message.action.disable.cluster=Confirmez que vous souhaitez d\u00E9sactiver ce cluster +message.action.disable.nexusVswitch=Confirmer la d\u00E9sactivation de ce Nexus 1000v +message.action.disable.physical.network=Confirmer l\\'activation de ce r\u00E9seau physique. +message.action.disable.pod=Confirmez que vous voulez d\u00E9sactiver ce Pod +message.action.disable.static.NAT=Confirmez que vous souhaitez d\u00E9sactiver le NAT statique. +message.action.disable.zone=Confirmez que vous voulez d\u00E9sactiver cette zone +message.action.download.iso=Confirmer le t\u00E9l\u00E9chargement de cet ISO +message.action.download.template=Confirmer le t\u00E9l\u00E9chargement de ce mod\u00E8le +message.action.enable.cluster=Confirmez que vous souhaitez activer ce cluster +message.action.enable.maintenance=Votre h\u00F4te a \u00E9t\u00E9 mis en mode maintenance avec succ\u00E8s. Ce processus peut durer plusieurs minutes ou plus, suivant le nombre de VMs actives sur cet h\u00F4te. +message.action.enable.nexusVswitch=Confirmer l\\'activation de ce Nexus 1000v +message.action.enable.physical.network=Confirmer l\\'activation de ce r\u00E9seau physique. +message.action.enable.pod=Confirmez que vous souhaitez activer ce Pod +message.action.enable.zone=Confirmez que vous voulez activer cette zone +message.action.force.reconnect=Votre h\u00F4te a \u00E9t\u00E9 forc\u00E9e \u00E0 se reconnecter avec succ\u00E8s. Ce processus peut prendre jusqu\\'\u00E0 plusieurs minutes. +message.action.host.enable.maintenance.mode=Activer le mode maintenance va causer la migration \u00E0 chaud de l\\'ensemble des instances de cet h\u00F4te sur les autres h\u00F4tes disponibles. message.action.instance.reset.password=Confirmer le changement du mot de passe ROOT pour cette machine virtuelle. -message.action.primarystorage.enable.maintenance.mode=Attention \: placer ce stockage primaire en mode maintenance que l\'ensemble des VMs utilisant des volumes sur ce stockage. Souhaitez vous continuer ? -message.action.reboot.instance=Confirmez que vous souhaitez redémarrer cette instance. -message.action.reboot.systemvm=Confirmez que vous souhaitez redémarrer cette VM Système -message.action.release.ip=Confirmez que vous souhaitez libérer cette IP. -message.action.remove.host=Supprimer le dernier/seul hôte dans le cluster et le réinstaller va supprimer l\'environnement/la base de données sur l\'hôte et rendre les VMs invitées inutilisables. +message.action.manage.cluster=Confirmez que vous voulez g\u00E9rer le cluster +message.action.primarystorage.enable.maintenance.mode=Attention \: placer ce stockage primaire en mode maintenance va provoquer l\\'arr\u00EAt de l\\'ensemble des VMs utilisant des volumes sur ce stockage. Souhaitez-vous continuer ? +message.action.reboot.instance=Confirmez que vous souhaitez red\u00E9marrer cette instance. +message.action.reboot.router=Tous les services fournit par ce routeur virtuel vont \u00EAtre interrompus. Confirmer le r\u00E9-amor\u00E7age de ce routeur. +message.action.reboot.systemvm=Confirmez que vous souhaitez red\u00E9marrer cette VM Syst\u00E8me +message.action.release.ip=Confirmez que vous souhaitez lib\u00E9rer cette IP. +message.action.remove.host=Confirmer la suppression de cet h\u00F4te. +message.action.reset.password.off=Votre instance ne supporte pas pour le moment cette fonctionnalit\u00E9. +message.action.reset.password.warning=Votre instance doit \u00EAtre arr\u00EAt\u00E9e avant d\\'essayer de changer son mot de passe. message.action.restore.instance=Confirmez que vous souhaitez restaurer cette instance. -message.action.start.instance=Confirmez que vous souhaitez démarrer cette instance. -message.action.start.router=Confirmez que vous souhaitez démarrer ce routeur. -message.action.start.systemvm=Confirmez que vous souhaitez redémarrer cette VM système. -message.action.stop.instance=Confirmez que vous souhaitez arrêter cette instance. -message.action.stop.systemvm=Confirmez que vous souhaitez arrêter cette VM. -message.action.take.snapshot=Confirmer la prise d\'un snapshot pour ce volume. -message.add.cluster.zone=Ajouter un cluster d\'hyperviseurs géré pour cette zone -message.add.cluster=Ajouter un cluster d\'hyperviseurs géré pour cette zone , pod -message.add.disk.offering=Renseignez les paramètres suivants pour ajouter un offre de service de disques -message.add.firewall=Ajouter un parefeu à cette zone -message.add.host=Renseignez les paramètres suivant pour ajouter un hôte -message.add.ip.range.direct.network=Ajouter une plage IP au réseau direct dans la zone +message.action.start.instance=Confirmez que vous souhaitez d\u00E9marrer cette instance. +message.action.start.router=Confirmez que vous souhaitez d\u00E9marrer ce routeur. +message.action.start.systemvm=Confirmez que vous souhaitez red\u00E9marrer cette VM syst\u00E8me. +message.action.stop.instance=Confirmez que vous souhaitez arr\u00EAter cette instance. +message.action.stop.router=Tous les services fournit par ce routeur virtuel vont \u00EAtre interrompus. Confirmer l\\'arr\u00EAt de ce routeur. +message.action.stop.systemvm=Confirmez que vous souhaitez arr\u00EAter cette VM. +message.action.take.snapshot=Confirmer la prise d\\'un instantan\u00E9 pour ce volume. +message.action.unmanage.cluster=Confirmez que vous ne voulez plus g\u00E9rer le cluster +message.activate.project=\u00CAtes-vous s\u00FBr de vouloir activer ce projet ? +message.add.VPN.gateway=Confirmer l\\'ajout d\\'une passerelle VPN +message.add.cluster=Ajouter un cluster d\\'hyperviseurs g\u00E9r\u00E9 pour cette zone , pod +message.add.cluster.zone=Ajouter un cluster d\\'hyperviseurs g\u00E9r\u00E9 pour cette zone +message.add.disk.offering=Renseignez les param\u00E8tres suivants pour ajouter un offre de service de disques +message.add.domain=Sp\u00E9cifier le sous domaine que vous souhaitez cr\u00E9er sous ce domaine +message.add.firewall=Ajouter un pare-feu \u00E0 cette zone +message.add.guest.network=Confirmer l\\'ajout du r\u00E9seau invit\u00E9 +message.add.host=Renseignez les param\u00E8tres suivants pour ajouter une h\u00F4te +message.add.ip.range=Ajouter une plage IP pour le r\u00E9seau publique dans la zone +message.add.ip.range.direct.network=Ajouter une plage IP au r\u00E9seau direct dans la zone message.add.ip.range.to.pod=

Ajouter une plage IP pour le pod\:

-message.add.ip.range=Ajouter une plage IP pour le réseau publique dans la zone -message.add.load.balancer=Ajouter un partageur de charge à la zone -message.add.network=Ajouter un nouveau réseau à la zone\: -message.add.pod=Ajouter un nouveau pod à la zone -message.add.primary.storage=Ajouter un nouveau stockage primaire à la zone , pod -message.add.primary=Renseignez les paramètres suivants pour ajouter un sotckage primaire +message.add.load.balancer=Ajouter un r\u00E9partiteur de charge \u00E0 la zone +message.add.load.balancer.under.ip=La r\u00E8gle de r\u00E9partition de charge \u00E9t\u00E9 ajout\u00E9e sous l\\'adresse IP \: +message.add.network=Ajouter un nouveau r\u00E9seau \u00E0 la zone\: +message.add.new.gateway.to.vpc=Renseigner les informations suivantes pour ajouter une nouvelle passerelle pour ce VPC +message.add.pod=Ajouter un nouveau pod \u00E0 la zone +message.add.pod.during.zone.creation=Chaque zone doit contenir un ou plusieurs pods, et le premier pod sera ajout\u00E9 maintenant. Une pod contient les h\u00F4tes et les serveurs de stockage primaire, qui seront ajout\u00E9s dans une \u00E9tape ult\u00E9rieure. Configurer une plage d\\'adresses IP r\u00E9serv\u00E9es pour le trafic de gestion interne de CloudStack. La plage d\\'IP r\u00E9serv\u00E9e doit \u00EAtre unique pour chaque zone dans le nuage. +message.add.primary=Renseignez les param\u00E8tres suivants pour ajouter un stockage primaire +message.add.primary.storage=Ajouter un nouveau stockage primaire \u00E0 la zone , pod message.add.secondary.storage=Ajouter un nouveau stockage pour la zone -message.add.service.offering=Renseigner les informations suivantes pour ajouter une nouvelle offre de service computing. -message.add.template=Renseignez les informations suivantes pour créer votre nouveau modèle +message.add.service.offering=Renseigner les informations suivantes pour ajouter une nouvelle offre de service de calcul. +message.add.system.service.offering=Ajouter les informations suivantes pour cr\u00E9er une nouvelle offre syst\u00E8me. +message.add.template=Renseignez les informations suivantes pour cr\u00E9er votre nouveau mod\u00E8le message.add.volume=Renseignez les informations suivantes pour ajouter un nouveau volume -message.additional.networks.desc=Sélectionnez le(s) réseau(x) additionnel(s) au(x)quel(s) sera connectée votre instance. -message.advanced.mode.desc=Choisissez ce modèle de réseau si vous souhaitez bénéficier du support des VLANs. Ce mode de réseau donne le plus de flexibilité aux administrateurs pour fournir des offres de service réseau personnalisées comme fournir des parefeux, vpn, partageurs de charge ou également activer des réseaux virtuels ou directs. -message.advanced.security.group=Choisissez ceci si vous souhaitez utiliser les groupes de sécurité pour fournir l\'isolation des VMs invitées. -message.advanced.virtual=Choisissez ceci si vous souhaitez utiliser des VLANs pour fournir l\'isolation des VMs invitées. -message.allow.vpn.access=Entrez un nom d\'utilisateur et un mot de passe pour l\'utilisateur que vous souhaitez autorisé à utiliser l\'accès VPN. -message.attach.iso.confirm=Confirmez que vous souhaitez attacher l\'image ISO à cette instance. -message.attach.volume=Renseignez les données suivante pour attacher un nouveau volume. Si vous attachez un volume disque à une machine virtuelle sous Windows, vous aurez besoin de redémarrer l\'instance pour voir le nouveau disque. -message.basic.mode.desc=Choisissez ce modèle de réseau si vous *ne voulez pas* activer le support des VLANs. Toutes les instances créées avec ce modèle de réseau se verront assignées une adresse IP et les groupes de sécurité seront utilisés pour fournir l\'isolation entre les VMs.\n -message.change.offering.confirm=Confirmez que vous souhaitez changer l\'offre de service de cette instance. +message.adding.Netscaler.device=Ajouter un Netscaler +message.adding.Netscaler.provider=Ajouter un fournisseur Netscaler +message.adding.host=Ajout un h\u00F4te +message.additional.networks.desc=S\u00E9lectionnez le(s) r\u00E9seau(x) additionnel(s) au(x)quel(s) sera connect\u00E9e votre instance. +message.advanced.mode.desc=Choisissez ce mod\u00E8le de r\u00E9seau si vous souhaitez b\u00E9n\u00E9ficier du support des VLANs. Ce mode de r\u00E9seau donne le plus de flexibilit\u00E9 aux administrateurs pour fournir des offres de service r\u00E9seau personnalis\u00E9es comme fournir des pare-feux, VPN, r\u00E9partiteurs de charge ou \u00E9galement activer des r\u00E9seaux virtuels ou directs. +message.advanced.security.group=Choisissez ceci si vous souhaitez utiliser les groupes de s\u00E9curit\u00E9 pour fournir l\\'isolation des VMs invit\u00E9es. +message.advanced.virtual=Choisissez ceci si vous souhaitez utiliser des VLANs pour fournir l\\'isolation des VMs invit\u00E9es. +message.after.enable.s3=Le stockage secondaire S3 est configur\u00E9. Note \: Quand vous quitterez cette page, vous ne pourrez plus re-configurer le support S3. +message.after.enable.swift=Swift configur\u00E9. Remarque \: une fois que vous quitterez cette page, il ne sera plus possible de re-configurer Swift \u00E0 nouveau. +message.alert.state.detected=\u00C9tat d\\'alerte d\u00E9tect\u00E9 +message.allow.vpn.access=Entrez un nom d\\'utilisateur et un mot de passe pour l\\'utilisateur que vous souhaitez autoriser \u00E0 utiliser l\\'acc\u00E8s VPN. +message.apply.snapshot.policy=Vous avez mis \u00E0 jour votre politique d\\'instantan\u00E9s avec succ\u00E8s. +message.attach.iso.confirm=Confirmez que vous souhaitez attacher l\\'image ISO \u00E0 cette instance. +message.attach.volume=Renseignez les donn\u00E9es suivantes pour attacher un nouveau volume. Si vous attachez un volume disque \u00E0 une machine virtuelle sous Windows, vous aurez besoin de red\u00E9marrer l\\'instance pour voir le nouveau disque. +message.basic.mode.desc=Choisissez ce mod\u00E8le de r\u00E9seau si vous *ne voulez pas* activer le support des VLANs. Toutes les instances cr\u00E9\u00E9es avec ce mod\u00E8le de r\u00E9seau se verront assigner une adresse IP et les groupes de s\u00E9curit\u00E9 seront utilis\u00E9s pour fournir l\\'isolation entre les VMs. +message.change.offering.confirm=Confirmez que vous souhaitez changer l\\'offre de service de cette instance. +message.change.password=Merci de modifier votre mot de passe. +message.configure.all.traffic.types=Vous avez de multiples r\u00E9seaux physiques ; veuillez configurer les libell\u00E9s pour chaque type de trafic en cliquant sur le bouton Modifier. +message.configuring.guest.traffic=Configuration du r\u00E9seau VM +message.configuring.physical.networks=Configuration des r\u00E9seaux physiques +message.configuring.public.traffic=Configuration du r\u00E9seau public +message.configuring.storage.traffic=Configuration du r\u00E9seau de stockage +message.confirm.action.force.reconnect=Confirmer la re-connexion forc\u00E9e de cet h\u00F4te. +message.confirm.delete.F5=Confirmer la suppression du F5 +message.confirm.delete.NetScaler=Confirmer la suppression du Netscaler +message.confirm.delete.SRX=Confirmer la suppression du SRX +message.confirm.destroy.router=Confirmer la suppression de ce routeur +message.confirm.disable.provider=Confirmer la d\u00E9sactivation de ce fournisseur +message.confirm.enable.provider=Confirmer l\\'activation de ce fournisseur +message.confirm.join.project=Confirmer que vous souhaitez rejoindre ce projet. +message.confirm.remove.IP.range=Confirmer la suppression de cette plage d\\'adresses IP +message.confirm.shutdown.provider=Confirmer l\\'arr\u00EAt de ce fournisseur message.copy.iso.confirm=Confirmez que vous souhaitez copier votre image ISO vers -message.copy.template=Copier le modèle XXX de la zone vers -message.create.template.vm=Créer la VM depuis le modèle -message.create.template.volume=Renseignez les informations suivantes avec de créer un modèle à partir de votre volume de disque\:. La création du modèle peut prendre plusieurs minutes suivant la taille du volume. +message.copy.template=Copier le mod\u00E8le XXX de la zone vers +message.create.template=Voulez vous cr\u00E9er un mod\u00E8le ? +message.create.template.vm=Cr\u00E9er la VM depuis le mod\u00E8le +message.create.template.volume=Renseignez les informations suivantes avec de cr\u00E9er un mod\u00E8le \u00E0 partir de votre volume de disque\:. La cr\u00E9ation du mod\u00E8le peut prendre plusieurs minutes suivant la taille du volume. +message.creating.cluster=Cr\u00E9ation du cluster +message.creating.guest.network=Cr\u00E9ation du r\u00E9seau pour les invit\u00E9s +message.creating.physical.networks=Cr\u00E9ation des r\u00E9seaux physiques +message.creating.pod=Cr\u00E9ation d\\'un pod +message.creating.primary.storage=Cr\u00E9ation du stockage primaire +message.creating.secondary.storage=Cr\u00E9ation du stockage secondaire +message.creating.zone=Cr\u00E9ation de la zone +message.decline.invitation=Voulez-vous refuser cette invitation au projet ? +message.delete.VPN.connection=Confirmer la suppression de la connexion VPN +message.delete.VPN.customer.gateway=Confirmer la suppression de cette passerelle VPN client +message.delete.VPN.gateway=Confirmer la suppression de cette passerelle VPN message.delete.account=Confirmez que vous souhaitez supprimer ce compte. -message.detach.iso.confirm=Confirmez que vous souhaitez détacher l\'image ISO de cette instance. -# message.disable.account=Please confirm that you want to disable this account. By disabling the account, all users for this account will no longer have access to their cloud resources. All running virtual machines will be immediately shut down. -message.disable.vpn.access=Confirmez que vous souhaitez désactiver l\'accès VPN. -message.download.ISO=Cliquer le lien 00000 pour télécharger une image ISO -message.download.template=Cliquer le lien 00000 pour télécharger une template -message.download.volume=Cliquez sur 00000 pour télécharger le volume -message.edit.confirm=Confirmer les changement avant de cliquer sur "Enregistrer". -message.edit.limits=Renseignez les limites pour les ressources suivantes. "-1" indique qu\'il n\'y a pas de limites pour la création de ressources. +message.delete.gateway=Confirmer la suppression de cette passerelle +message.delete.project=\u00CAtes-vous s\u00FBr de vouloir supprimer ce projet ? +message.delete.user=Confirmer la suppression de cet utilisateur. +message.desc.advanced.zone=Pour des topologies de r\u00E9seau plus sophistiqu\u00E9es. Ce mod\u00E8le de r\u00E9seau permet plus de flexibilit\u00E9 dans la d\u00E9finition des r\u00E9seaux d\\'invit\u00E9s et propose des offres personnalis\u00E9es telles que le support de pare-feu, VPN ou d\\'\u00E9quilibrage de charge. +message.desc.basic.zone=Fournit un r\u00E9seau unique o\u00F9 chaque instance de machine virtuelle se voit attribuer une adresse IP directement depuis le r\u00E9seau. L\\'isolation des invit\u00E9s peut \u00EAtre assur\u00E9 au niveau de la couche r\u00E9seau-3 tels que les groupes de s\u00E9curit\u00E9 (filtrage d\\'adresse IP source). +message.desc.cluster=Chaque pod doit contenir un ou plusieurs clusters, et le premier cluster sera ajout\u00E9 tout de suite. Un cluster est un regroupement pour h\u00F4tes. Les h\u00F4tes d\\'un cluster ont tous un mat\u00E9riel identique, ex\u00E9cutent le m\u00EAme hyperviseur, sont dans le m\u00EAme sous-r\u00E9seau, et acc\u00E8dent au m\u00EAme stockage partag\u00E9. Chaque cluster comprend une ou plusieurs h\u00F4tes et un ou plusieurs serveurs de stockage primaire. +message.desc.host=Chaque cluster doit contenir au moins un h\u00F4te (machine) pour ex\u00E9cuter des machines virtuelles invit\u00E9es, et le premier h\u00F4te sera ajout\u00E9 tout de suite. Pour un h\u00F4te fonctionnant dans CloudStack, vous devez installer un logiciel hyperviseur sur l\\'h\u00F4te, attribuer une adresse IP \u00E0 l\\'h\u00F4te, et s\\'assurer que l\\'h\u00F4te est connect\u00E9 au serveur d\\'administration CloudStack.

Indiquer le nom de l\\'h\u00F4te ou son adresse IP, l\\'identifiant de connexion (g\u00E9n\u00E9ralement root) et le mot de passe ainsi que toutes les \u00E9tiquettes permettant de classer les h\u00F4tes. +message.desc.primary.storage=Chaque cluster doit contenir un ou plusieurs serveurs de stockage primaire, et le premier sera ajout\u00E9 tout de suite. Le stockage principal contient les volumes de disque pour les machines virtuelles s\\'ex\u00E9cutant sur les h\u00F4tes dans le cluster. Utiliser les protocoles standards pris en charge par l\\'hyperviseur sous-jacent. +message.desc.secondary.storage=Chaque zone doit avoir au moins un serveur NFS ou un serveur de stockage secondaire, et sera ajout\u00E9 en premier tout de suite. Le stockage secondaire entrepose les mod\u00E8les de machines virtuelles, les images ISO et les images disques des volumes des machines virtuelles. Ce serveur doit \u00EAtre accessible pour toutes les machines h\u00F4tes dans la zone.

Saisir l\\'adresse IP et le chemin d\\'export. +message.desc.zone=Une zone est la plus grande unit\u00E9 organisationnelle dans CloudStack, et correspond typiquement \u00E0 un centre de donn\u00E9es. Les zones fournissent un isolement physique et de la redondance. Une zone est constitu\u00E9e d\\'un ou plusieurs pods (dont chacun contient les h\u00F4tes et les serveurs de stockage primaire) et un serveur de stockage secondaire qui est partag\u00E9e par tous les pods dans la zone. +message.detach.disk=Voulez-vous d\u00E9tacher ce disque ? +message.detach.iso.confirm=Confirmez que vous souhaitez d\u00E9tacher l\\'image ISO de cette instance. +message.disable.account=Veuillez confirmer que vous voulez d\u00E9sactiver ce compte. En d\u00E9sactivant le compte, tous les utilisateurs pour ce compte n\\'auront plus acc\u00E8s \u00E0 leurs ressources sur le cloud. Toutes les machines virtuelles vont \u00EAtre arr\u00EAt\u00E9es imm\u00E9diatement. +message.disable.snapshot.policy=Vous avez d\u00E9sactiv\u00E9 votre politique d\\'instantan\u00E9 avec succ\u00E8s. +message.disable.user=Confirmer la d\u00E9sactivation de cet utilisateur. +message.disable.vpn=\u00CAtes-vous s\u00FBr de vouloir d\u00E9sactiver le VPN ? +message.disable.vpn.access=Confirmez que vous souhaitez d\u00E9sactiver l\\'acc\u00E8s VPN. +message.download.ISO=Cliquer 00000 pour t\u00E9l\u00E9charger une image ISO +message.download.template=Cliquer sur 00000 pour t\u00E9l\u00E9charger le mod\u00E8le +message.download.volume=Cliquer sur 00000 pour t\u00E9l\u00E9charger le volume +message.download.volume.confirm=Confirmer le t\u00E9l\u00E9chargement du volume +message.edit.account=Modifier ("-1" signifie pas de limite de ressources) +message.edit.confirm=Confirmer les changements avant de cliquer sur "Enregistrer". +message.edit.limits=Renseignez les limites pour les ressources suivantes. "-1" indique qu\\'il n\\'y a pas de limites pour la cr\u00E9ation de ressources. +message.edit.traffic.type=Sp\u00E9cifier le libell\u00E9 de trafic associ\u00E9 avec ce type de trafic. message.enable.account=Confirmez que vous souhaitez activer ce compte. -message.enable.vpn.access=Le VPN est désactivé pour cette adresse IP. Voulez vous activer l\'accès VPN ? -message.enabled.vpn.ip.sec=Votre clé partagée IPSec est -message.enabled.vpn=Votre accès VPN est activé et peut être accédé par l\'IP -message.launch.vm.on.private.network=Souhaitez vous démarrer cette instance sur votre propre réseau privé ? -message.lock.account=Confirmez que vous souhaitez verrouiller ce compte. En le verrouillant, les utilisateurs de ce compte ne seront plus capable de gérer leurs ressources. Les ressources existantes resteront toutefois accessibles. -message.migrate.instance.confirm=Confirmez l\'hôte vers lequel vous souhaitez migrer cette instance +message.enable.user=Confirmer l\\'activation de cet utilisateur. +message.enable.vpn=Confirmer l\\'activation de l\\'acc\u00E8s VPN pour cette adresse IP. +message.enable.vpn.access=Le VPN est d\u00E9sactiv\u00E9 pour cette adresse IP. Voulez vous activer l\\'acc\u00E8s VPN ? +message.enabled.vpn=Votre acc\u00E8s VPN est activ\u00E9 et peut \u00EAtre acc\u00E9d\u00E9 par l\\'IP +message.enabled.vpn.ip.sec=Votre cl\u00E9 partag\u00E9e IPSec est +message.enabling.security.group.provider=Activation du fournisseur de groupe de s\u00E9curit\u00E9 +message.enabling.zone=Activation de la zone +message.enter.token=Entrer le jeton unique re\u00E7u dans le message d\\'invitation. +message.generate.keys=Confirmer la g\u00E9n\u00E9ration de nouvelles clefs pour cet utilisateur. +message.guest.traffic.in.advanced.zone=Le trafic r\u00E9seau d\\'invit\u00E9 est la communication entre les machines virtuelles utilisateur. Sp\u00E9cifier une plage d\\'identifiant VLAN pour le trafic des invit\u00E9s pour chaque r\u00E9seau physique. +message.guest.traffic.in.basic.zone=Le trafic r\u00E9seau d\\'invit\u00E9 est la communication entre les machines virtuelles utilisateur. Sp\u00E9cifier une plage d\\'adresses IP que CloudStack peut assigner aux machines virtuelles Invit\u00E9. S\\'assurer que cette plage n\\'empi\u00E8te pas sur la plage r\u00E9serv\u00E9e aux adresses IP Syst\u00E8me. +message.installWizard.click.retry=Appuyer sur le bouton pour essayer \u00E0 nouveau le d\u00E9marrage. +message.installWizard.copy.whatIsACluster=Un cluster permet de grouper les h\u00F4tes. Les h\u00F4tes d\\'un cluster ont un mat\u00E9riel identique, ex\u00E9cutent le m\u00EAme hyperviseur, sont sur le m\u00EAme sous-r\u00E9seau, et acc\u00E8dent au m\u00EAme stockage partag\u00E9. Les instances de machines virtuelles (VM) peuvent \u00EAtre migr\u00E9es \u00E0 chaud d\\'un h\u00F4te \u00E0 un autre au sein du m\u00EAme groupe, sans interrompre les services utilisateur. Un cluster est la trois \u00E8me plus large unit\u00E9 organisationnelle dans un d\u00E9ploiement CloudStack&\#8482;. Les clusters sont contenus dans les pods et les pods sont contenus dans les zones.

CloudStack&\#8482; permet d\\'avoir plusieurs clusters dans un d\u00E9ploiement en nuage, mais pour une installation basique, il n\\'y a qu\\'un seul cluster. +message.installWizard.copy.whatIsAHost=Un h\u00F4te est une machine. Les h\u00F4tes fournissent les ressources informatiques qui ex\u00E9cutent les machines virtuelles invit\u00E9es. Chaque h\u00F4te a un logiciel hyperviseur install\u00E9 pour g\u00E9rer les machines virtuelles invit\u00E9es (sauf pour les h\u00F4tes de type \\'bare-metal\\', qui sont un cas particulier d\u00E9taill\u00E9 dans le Guide d\\'installation avanc\u00E9e). Par exemple, un serveur Linux avec KVM, un serveur Citrix XenServer, et un serveur ESXi sont des h\u00F4tes. Dans une installation basique, un seul h\u00F4te ex\u00E9cutant XenServer ou KVM est utilis\u00E9.

L\\'h\u00F4te est la plus petite unit\u00E9 organisation au sein d\\'un d\u00E9ploiement CloudStack&\#8482;. Les h\u00F4tes sont contenus dans les clusters, les clusters sont contenus dans les pods et les pods sont contenus dans les zones. +message.installWizard.copy.whatIsAPod=Un pod repr\u00E9sente souvent un seul rack. Les h\u00F4tes dans le m\u00EAme pod sont dans le m\u00EAme sous-r\u00E9seau.
Un pod est la deuxi\u00E8me plus grande unit\u00E9 organisationnelle au sein d\\'un d\u00E9ploiement CloudStack&\#8482;. Les pods sont contenus dans les zones. Chaque zone peut contenir un ou plusieurs pods ; dans l\\'Installation Basique, vous aurez juste un pod dans votre zone. +message.installWizard.copy.whatIsAZone=Une zone est la plus grande unit\u00E9 organisationnelle au sein d\\'un d\u00E9ploiement CloudStack&\#8482;. Une zone correspond typiquement \u00E0 un centre de donn\u00E9es, mais il est permis d\\'avoir plusieurs zones dans un centre de donn\u00E9es. L\\'avantage d\\'organiser une infrastructure en zones est de fournir une isolation physique et de la redondance. Par exemple, chaque zone peut avoir sa propre alimentation et de liaison avec le r\u00E9seau, et les zones peuvent \u00EAtre tr\u00E8s \u00E9loign\u00E9es g\u00E9ographiquement (m\u00EAme si ce n\\'est pas une obligation). +message.installWizard.copy.whatIsCloudStack=CloudStack&\#8482; est une plate-forme logicielle de pools de ressources informatiques pour construire des infrastructures publiques, priv\u00E9es et hybrides en tant que services (IaaS) dans les nuages. CloudStack&\#8482; g\u00E8re le r\u00E9seau, le stockage et les noeuds de calcul qui composent une infrastructure dans les nuages. Utilisez CloudStack&\#8482; pour d\u00E9ployer, g\u00E9rer et configurer les environnements d\\'informatiques dans les nuages.

S\\'\u00E9tendant au-del\u00E0 des machines virtuelles individuelles fonctionnant sur du mat\u00E9riel standard, CloudStack&\#8482; offre une solution d\\'informatique en nuage cl\u00E9 en main pour fournir des centres de donn\u00E9es virtuels comme service - fournissant tous les composants essentiels pour construire, d\u00E9ployer et g\u00E9rer des applications \\'cloud\\' multi-niveaux et multi-locataire. Les versions libre et Premium sont disponibles, la version Libre offrant des caract\u00E9ristiques presque identiques. +message.installWizard.copy.whatIsPrimaryStorage=Une infrastructure CloudStack&\#8482; utilise deux types de stockage \: stockage primaire et stockage secondaire. Les deux peuvent \u00EAtre des serveurs iSCSI ou NFS, ou sur disque local.

Le stockage primaire est associ\u00E9 \u00E0 un cluster, et stocke les volumes disques de chaque machine virtuelle pour toutes les VMs s\\'ex\u00E9cutant sur les h\u00F4tes dans le cluster. Le serveur de stockage primaire est typiquement proche des h\u00F4tes. +message.installWizard.copy.whatIsSecondaryStorage=Le stockage secondaire est associ\u00E9 \u00E0 une zone, et il stocke les \u00E9l\u00E9ments suivants\:
  • Mod\u00E8les - images de syst\u00E8mes d\\'exploitation qui peuvent \u00EAtre utilis\u00E9es pour d\u00E9marrer les machines virtuelles et peuvent inclure des informations de configuration suppl\u00E9mentaires, telles que les applications pr\u00E9-install\u00E9es
  • Images ISO - images de syst\u00E8me d\\'exploitation ou d\\'installation d\\'OS qui peuvent \u00EAtre amor\u00E7able ou non-amor\u00E7able
  • Images de volume disque - capture des donn\u00E9es de machines virtuelles qui peuvent \u00EAtre utilis\u00E9es pour la r\u00E9cup\u00E9ration des donn\u00E9es ou cr\u00E9er des mod\u00E8les
+message.installWizard.now.building=Construction de votre Cloud en cours +message.installWizard.tooltip.addCluster.name=Un nom pour le cluster. Ce choix est libre et n\\'est pas utilis\u00E9 par CloudStack. +message.installWizard.tooltip.addHost.hostname=Le nom DNS ou adresse IP du serveur. +message.installWizard.tooltip.addHost.password=Le mot de passe pour l\\'utilisateur indiqu\u00E9 pr\u00E9c\u00E9demment (issu de l\\'installation XenServer). +message.installWizard.tooltip.addHost.username=Habituellement root. +message.installWizard.tooltip.addPod.name=Nom pour le pod +message.installWizard.tooltip.addPod.reservedSystemEndIp=Ceci est la plage d\\'adresses IP dans le r\u00E9seau priv\u00E9 que CloudStack utilise la gestion des VMs du stockage secondaire et les VMs Console Proxy. Ces adresses IP sont prises dans le m\u00EAme sous-r\u00E9seau que les serveurs h\u00F4tes. +message.installWizard.tooltip.addPod.reservedSystemGateway=Passerelle pour les serveurs dans ce pod +message.installWizard.tooltip.addPod.reservedSystemNetmask=Le masque r\u00E9seau que les instances utiliseront sur le r\u00E9seau +message.installWizard.tooltip.addPod.reservedSystemStartIp=Ceci est la plage d\\'adresses IP dans le r\u00E9seau priv\u00E9 que CloudStack utilise la gestion des VMs du stockage secondaire et les VMs Console Proxy. Ces adresses IP sont prises dans le m\u00EAme sous-r\u00E9seau que les serveurs h\u00F4tes. +message.installWizard.tooltip.addPrimaryStorage.name=Nom pour ce stockage +message.installWizard.tooltip.addPrimaryStorage.path=(pour NFS) Dans NFS, ceci est le chemin d\\'export depuis le serveur. (pour SharedMountPoint) Le chemin. Avec KVM, c\\'est le chemin sur chaque h\u00F4te o\u00F9 ce stockage primaire est mont\u00E9. Par exemple, "/mnt/primary". +message.installWizard.tooltip.addPrimaryStorage.server=(pour NFS, iSCSI ou PreSetup) Adresse IP ou nom DNS du stockage +message.installWizard.tooltip.addSecondaryStorage.nfsServer=Adresse IP du serveur NFS supportant le stockage secondaire +message.installWizard.tooltip.addSecondaryStorage.path=Le chemin export\u00E9, situ\u00E9 sur le serveur sp\u00E9cifi\u00E9 pr\u00E9c\u00E9demment +message.installWizard.tooltip.addZone.dns1=Ces serveurs DNS sont utilis\u00E9s par les machines virtuelles Invit\u00E9es dans la zone. Ces serveurs DNS seront accessibles par le r\u00E9seau public, ce dernier sera ajout\u00E9 plus tard. Les adresses IP publiques pour la zone doivent avoir une route vers les serveurs DNS indiqu\u00E9s ici. +message.installWizard.tooltip.addZone.dns2=Ces serveurs DNS sont utilis\u00E9s par les machines virtuelles Invit\u00E9es dans la zone. Ces serveurs DNS seront accessibles par le r\u00E9seau public, ce dernier sera ajout\u00E9 plus tard. Les adresses IP publiques pour la zone doivent avoir une route vers les serveurs DNS indiqu\u00E9s ici. +message.installWizard.tooltip.addZone.internaldns1=Ces serveurs DNS sont utilis\u00E9s par les machines virtuelles Invit\u00E9es dans la zone. Ces serveurs DNS seront accessibles par le r\u00E9seau public, ce dernier sera ajout\u00E9 plus tard. Les adresses IP publiques pour la zone doivent avoir une route vers les serveurs DNS indiqu\u00E9s ici. +message.installWizard.tooltip.addZone.internaldns2=Ces serveurs DNS sont utilis\u00E9s par les machines virtuelles Invit\u00E9es dans la zone. Ces serveurs DNS seront accessibles par le r\u00E9seau public, ce dernier sera ajout\u00E9 plus tard. Les adresses IP publiques pour la zone doivent avoir une route vers les serveurs DNS indiqu\u00E9s ici. +message.installWizard.tooltip.addZone.name=Nom pour la zone +message.installWizard.tooltip.configureGuestTraffic.description=Description pour ce r\u00E9seau +message.installWizard.tooltip.configureGuestTraffic.guestEndIp=La plage d\\'adresses IP qui sera disponible en allocation pour les machines invit\u00E9es dans cette zone. Si une carte r\u00E9seau est utilis\u00E9e, ces adresses IP peuvent \u00EAtre dans le m\u00EAme CIDR que le CIDR du pod. +message.installWizard.tooltip.configureGuestTraffic.guestGateway=La passerelle que les instances invit\u00E9es doivent utiliser +message.installWizard.tooltip.configureGuestTraffic.guestNetmask=Le masque r\u00E9seau que les instances devrait utiliser sur le r\u00E9seau +message.installWizard.tooltip.configureGuestTraffic.guestStartIp=La plage d\\'adresses IP qui sera disponible en allocation pour les machines invit\u00E9es dans cette zone. Si une carte r\u00E9seau est utilis\u00E9e, ces adresses IP peuvent \u00EAtre dans le m\u00EAme CIDR que le CIDR du pod. +message.installWizard.tooltip.configureGuestTraffic.name=Nom pour ce r\u00E9seau +message.instanceWizard.noTemplates=Vous n\\'avez pas de image disponible ; Ajouter un mod\u00E8le compatible puis relancer l\\'assistant de cr\u00E9ation d\\'instance. +message.ip.address.changed=Vos adresses IP ont peut \u00EAtre chang\u00E9es ; Voulez vous rafra\u00EEchir la liste ? Dans ce cas, le panneau de d\u00E9tail se fermera. +message.iso.desc=Image disque contenant des donn\u00E9es ou un support amor\u00E7able pour OS +message.join.project=Vous avez rejoint un projet. S\u00E9lectionnez la vue Projet pour le voir. +message.launch.vm.on.private.network=Souhaitez vous d\u00E9marrer cette instance sur votre propre r\u00E9seau priv\u00E9 ? +message.launch.zone=La zone est pr\u00EAte \u00E0 d\u00E9marrer ; passer \u00E0 l\\'\u00E9tape suivante. +message.lock.account=Confirmez que vous souhaitez verrouiller ce compte. En le verrouillant, les utilisateurs de ce compte ne seront plus capables de g\u00E9rer leurs ressources. Les ressources existantes resteront toutefois accessibles. +message.migrate.instance.confirm=Confirmez l\\'h\u00F4te vers lequel vous souhaitez migrer cette instance +message.migrate.instance.to.host=Confirmer la migration de l\\'instance vers un autre h\u00F4te +message.migrate.instance.to.ps=Confirmer la migration de l\\'instance vers un autre stockage primaire +message.migrate.router.confirm=Confirmer la migration du routeur vers \: +message.migrate.systemvm.confirm=Confirmer la migration de la VM syst\u00E8me vers \: +message.migrate.volume=Confirmer la migration du volume vers un autre stockage primaire. message.new.user=Renseigner les informations suivantes pour ajouter un nouveau compte utilisateur -message.no.network.support.configuration.not.true=Il n\'y a pas de zone avec la fonction groupe de sécurité active. Dès lors, pas de fonction réseau supplémentaires disponibles. Continuer à l\'étape 5. -message.no.network.support=Sélectionnez l\'hyperviseur. vSphere, n\'a pas de fonctionnalités supplémentaires pour le réseau. Continuez à l\'étape 5. -message.number.clusters=

\# of Clusters

-message.number.hosts=

\# of Hôtes

-message.number.pods=

\# of Pods

-message.number.storage=

\# of Volumes de Stockage Primaire

-message.number.zones=

\# of Zones

-message.remove.vpn.access=Confirmez que vous souhaitez supprimer l\'accès VPN à l\'utilisateur suivant. -message.restart.mgmt.server=Redémarrez votre(vos) serveur(s) de management pour appliquer les nouveaux paramètres. -message.restart.mgmt.usage.server=Redémarrer le ou les management server et usage server pour que les nouveaux paramètres soient pris en compte. -message.security.group.usage=(Utilisez Ctrl-clic pour séléctionner les groupes de sécurité visés) -message.snapshot.schedule=Vous pouvez mettre en place les politiques de génération d\'instantanés en sélectionnant les options disponibles ci-dessous et en appliquant votre politique. -message.step.1.continue=Sélectionnez un modèle ou une image ISO pour continuer -message.step.1.desc=Sélectionnez un template pour votre nouvelle instance virtuelle. Vous pouvez également choisir un modèle vierge sur lequel une image ISO pourra être installé. -message.step.2.continue=Sélectionnez une offre de service pour continuer -message.step.2.desc= -message.step.3.continue=Sélectionnez un offre de service de disque pour continuer -message.step.3.desc= -message.step.4.continue=Sélectionnez au moins un réseau pour continuer -message.step.4.desc=Sélectionnez le réseau principal auquel votre instance va être connecté. -message.update.os.preference=Choisissez votre OS préféré pour cet hôte. Toutes les instances avec des préférences similaires seront d\'abord allouées à cet hôte avant d\'en choisir un autre. -message.update.ssl=Soumettez un nouveau certificat SSL compatible X.509 qui sera mis à jour sur l\'ensemble de instance de proxy console. -message.virtual.network.desc=Un réseau virtuel dédié pour votre compte. Ce domaine de broadcast est contenu dans un VLAN et l\'ensemble de accès réseau publique sont routés par un routeur virtuel. -message.volume.create.template.confirm=Confirmez que vous souhaitez créer un modèle pour ce disque. La création peut prendre plusieurs minutes, voire plus, selon la taille du volume. -message.zone.step.1.desc=Sélectionnez un modèle de réseau pour votre zone. +message.no.network.support=S\u00E9lectionnez l\\'hyperviseur. vSphere, n\\'a pas de fonctionnalit\u00E9s suppl\u00E9mentaires pour le r\u00E9seau. Continuez \u00E0 l\\'\u00E9tape 5. +message.no.network.support.configuration.not.true=Il n\\'y a pas de zone avec la fonction groupe de s\u00E9curit\u00E9 active. D\u00E8s lors, pas de fonction r\u00E9seau suppl\u00E9mentaires disponibles. Continuer \u00E0 l\\'\u00E9tape 5. +message.no.projects=Vous n\\'avez pas de projet.
Vous pouvez en cr\u00E9er un depuis la section projets. +message.no.projects.adminOnly=Vous n\\'avez pas de projet.
Contacter votre administrateur pour ajouter un projet. +message.number.clusters=

\# de Clusters

+message.number.hosts=

\# d\\' H\u00F4tes

+message.number.pods=

\# de Pods

+message.number.storage=

\# de Volumes de Stockage Primaire

+message.number.zones=

\# de Zones

+message.pending.projects.1=Vous avez des invitations projet en attente \: +message.pending.projects.2=Pour les visualiser, aller dans la section projets, puis s\u00E9lectionner invitation dans la liste d\u00E9roulante. +message.please.add.at.lease.one.traffic.range=Ajouter au moins une plage r\u00E9seau +message.please.proceed=Continuer vers la prochaine \u00E9tape. +message.please.select.a.configuration.for.your.zone=S\u00E9lectionner une configuration pour la zone. +message.please.select.a.different.public.and.management.network.before.removing=S\u00E9lectionner un r\u00E9seau public et d\\'administration diff\u00E9rent avant de supprimer +message.please.select.networks=S\u00E9lectionner les r\u00E9seaux pour votre machine virtuelle. +message.please.wait.while.zone.is.being.created=Patienter pendant la cr\u00E9ation de la zone, cela peut prendre du temps... +message.project.invite.sent=Invitation envoy\u00E9e ; les utilisateurs seront ajout\u00E9s apr\u00E8s acceptation de l\\'invitation +message.public.traffic.in.advanced.zone=Le trafic public est g\u00E9n\u00E9r\u00E9 lorsque les machines virtuelles dans le nuage acc\u00E8dent \u00E0 Internet. Des adresses IP publiquement accessibles doivent \u00EAtre pr\u00E9vues \u00E0 cet effet. Les utilisateurs peuvent utiliser l\\'interface d\\'administration de CloudStack pour acqu\u00E9rir ces adresses IP qui impl\u00E9menteront une translation d\\'adresse NAT entre le r\u00E9seau d\\'invit\u00E9 et le r\u00E9seau public.

Fournir au moins une plage d\\'adresses IP pour le trafic Internet. +message.public.traffic.in.basic.zone=Le trafic public est g\u00E9n\u00E9r\u00E9 lorsque les machines virtuelles dans le nuage acc\u00E8dent \u00E0 Internet ou fournissent des services \u00E0 des utilisateurs sur Internet. Des adresses IP publiquement accessibles doivent \u00EAtre pr\u00E9vus \u00E0 cet effet. Quand une instance est cr\u00E9\u00E9e, une adresse IP publique depuis un ensemble d\\'adresses IP publiques sera allou\u00E9e \u00E0 l\\'instance, en plus de l\\'adresse IP de l\\'invit\u00E9. La translation d\\'adresses statique NAT 1-1 sera mises en place automatiquement entre l\\'adresse IP publique et l\\'adresse IP de l\\'invit\u00E9. Les utilisateurs peuvent \u00E9galement utiliser l\\'interface d\\'administration CloudStack pour acqu\u00E9rir des adresses IP suppl\u00E9mentaires pour ajouter une translation d\\'adresse statique NAT entre leurs instances et le r\u00E9seau d\\'adresses IP publiques. +message.remove.vpc=Confirmer la suppression du VPC +message.remove.vpn.access=Confirmez que vous souhaitez supprimer l\\'acc\u00E8s VPN \u00E0 l\\'utilisateur suivant. +message.reset.VPN.connection=Confirmer le r\u00E9-initialisation de la connexion VPN +message.reset.password.warning.notPasswordEnabled=Le mod\u00E8le de cette instance a \u00E9t\u00E9 cr\u00E9\u00E9 sans la gestion de mot de passe +message.reset.password.warning.notStopped=Votre instance doit \u00EAtre arr\u00EAt\u00E9e avant de changer son mot de passe +message.restart.mgmt.server=Red\u00E9marrez votre(vos) serveur(s) de management pour appliquer les nouveaux param\u00E8tres. +message.restart.mgmt.usage.server=Red\u00E9marrer le ou les serveur(s) de gestion et le ou les serveur(s) de consommation pour que les nouveaux param\u00E8tres soient pris en compte. +message.restart.network=Tous les services fournit par ce routeur virtuel vont \u00EAtre interrompus. Confirmer le red\u00E9marrage de ce routeur. +message.restart.vpc=Confirmer le red\u00E9marrage du VPC +message.security.group.usage=(Utilisez Ctrl-clic pour s\u00E9lectionner les groupes de s\u00E9curit\u00E9 vis\u00E9s) +message.select.a.zone=Une zone correspond typiquement \u00E0 un seul centre de donn\u00E9es. Des zones multiples peuvent permettre de rendre votre cloud plus fiable en apportant une isolation physique et de la redondance. +message.select.instance=S\u00E9lectionner une instance. +message.select.iso=S\u00E9lectionner un ISO pour votre nouvelle instance virtuelle. +message.select.item=Merci de s\u00E9lectionner un \u00E9l\u00E9ment. +message.select.security.groups=Merci de s\u00E9lectionner un(des) groupe(s) de s\u00E9curit\u00E9 pour la nouvelle VM +message.select.template=S\u00E9lectionner un mod\u00E8le pour votre nouvelle instance virtuelle. +message.setup.physical.network.during.zone.creation=Lorsque vous ajoutez une zone avanc\u00E9e, vous avez besoin de d\u00E9finir un ou plusieurs r\u00E9seaux physiques. Chaque r\u00E9seau correspond \u00E0 une carte r\u00E9seau sur l\\'hyperviseur. Chaque r\u00E9seau physique peut supporter un ou plusieurs types de trafic, avec certaines restrictions sur la fa\u00E7on dont ils peuvent \u00EAtre combin\u00E9s.

Glisser et d\u00E9poser un ou plusieurs types de trafic sur chaque r\u00E9seau physique. +message.setup.physical.network.during.zone.creation.basic=Quand vous ajoutez une zone basique, vous pouvez param\u00E9trer un seul r\u00E9seau physique, correspondant \u00E0 une carte r\u00E9seau sur l\\'hyperviseur. Ce r\u00E9seau comportera plusieurs types de trafic.

Vous pouvez \u00E9galement glisser et d\u00E9poser d\\'autres types de trafic sur le r\u00E9seau physique. +message.setup.successful=Installation du Cloud r\u00E9ussie \! +message.snapshot.schedule=Vous pouvez mettre en place les politiques de g\u00E9n\u00E9ration d\\'instantan\u00E9s en s\u00E9lectionnant les options disponibles ci-dessous et en appliquant votre politique. +message.specify.url=Renseigner l\\'URL +message.step.1.continue=S\u00E9lectionnez un mod\u00E8le ou une image ISO pour continuer +message.step.1.desc=S\u00E9lectionnez un mod\u00E8le pour votre nouvelle instance virtuelle. Vous pouvez \u00E9galement choisir un mod\u00E8le vierge sur lequel une image ISO pourra \u00EAtre install\u00E9e. +message.step.2.continue=S\u00E9lectionnez une offre de service pour continuer +message.step.3.continue=S\u00E9lectionnez un offre de service de disque pour continuer +message.step.4.continue=S\u00E9lectionnez au moins un r\u00E9seau pour continuer +message.step.4.desc=S\u00E9lectionnez le r\u00E9seau principal auquel votre instance va \u00EAtre connect\u00E9. +message.storage.traffic=Trafic entre les ressources internes de CloudStack, incluant tous les composants qui communiquent avec le serveur d\\'administration, tels que les h\u00F4tes et les machines virtuelles Syst\u00E8mes CloudStack. Veuillez configurer le trafic de stockage ici. +message.suspend.project=\u00CAtes-vous s\u00FBr de vouloir suspendre ce projet ? +message.template.desc=Image OS pouvant \u00EAtre utilis\u00E9e pour d\u00E9marrer une VM +message.tooltip.dns.1=Nom d\\'un serveur DNS utilis\u00E9 par les VM de la zone. Les adresses IP publiques de cette zone doivent avoir une route vers ce serveur. +message.tooltip.dns.2=Nom d\\'un serveur DNS secondaire utilis\u00E9 par les VM de la zone. Les adresses IP publiques de cette zone doivent avoir une route vers ce serveur. +message.tooltip.internal.dns.1=Nom d\\'un serveur DNS que CloudStack peut utiliser pour les VM syst\u00E8me dans cette zone. Les adresses IP priv\u00E9es des pods doivent avoir une route vers ce serveur. +message.tooltip.internal.dns.2=Nom d\\'un serveur DNS que CloudStack peut utiliser pour les VM syst\u00E8me dans cette zone. Les adresses IP priv\u00E9es des pods doivent avoir une route vers ce serveur. +message.tooltip.network.domain=Suffixe DNS qui cr\u00E9era un nom de domaine personnalis\u00E9 pour les r\u00E9seau accessible par les VM invit\u00E9es. +message.tooltip.pod.name=Nom pour ce pod. +message.tooltip.reserved.system.gateway=La passerelle pour les h\u00F4tes du pod. +message.tooltip.reserved.system.netmask=Le pr\u00E9fixe r\u00E9seau utilis\u00E9 par le sous-r\u00E9seau du pod. Au format CIDR. +message.tooltip.zone.name=Nom pour cette zone. +message.update.os.preference=Choisissez votre OS pr\u00E9f\u00E9r\u00E9 pour cet h\u00F4te. Toutes les instances avec des pr\u00E9f\u00E9rences similaires seront d\\'abord allou\u00E9es \u00E0 cet h\u00F4te avant d\\'en choisir un autre. +message.update.resource.count=Confirmer la mise \u00E0 jour des ressources pour ce compte. +message.update.ssl=Soumettez un nouveau certificat SSL compatible X.509 qui sera mis \u00E0 jour sur l\\'ensemble de instance de proxy console. +message.validate.instance.name=Le nom de l\\'instance ne peut d\u00E9passer 63 caract\u00E8res. Seuls les lettres de a \u00E0 z, les chiffres de 0 \u00E0 9 et les tirets sont accept\u00E9s. Le nom doit commencer par une lettre et se terminer par une lettre ou un chiffre. +message.virtual.network.desc=Un r\u00E9seau virtuel d\u00E9di\u00E9 pour votre compte. Ce domaine de multi-diffusion est contenu dans un VLAN et l\\'ensemble des r\u00E9seaux d\\'acc\u00E8s publique sont rout\u00E9s par un routeur virtuel. +message.vm.create.template.confirm=Cr\u00E9er un mod\u00E8le va red\u00E9marrer la VM automatiquement +message.vm.review.launch=Merci de v\u00E9rifier les informations suivantes et de confirmer que votre instance virtuelle est correcte avant de la d\u00E9marrer. +message.volume.create.template.confirm=Confirmez que vous souhaitez cr\u00E9er un mod\u00E8le pour ce disque. La cr\u00E9ation peut prendre plusieurs minutes, voire plus, selon la taille du volume. +message.you.must.have.at.least.one.physical.network=Vous devez avoir au moins un r\u00E9seau physique +message.zone.creation.complete.would.you.like.to.enable.this.zone=Cr\u00E9ation de la zone termin\u00E9e. Voulez-vous l\\'activer ? +message.zone.no.network.selection=La zone s\u00E9lectionn\u00E9e ne propose pas le r\u00E9seau choisi +message.zone.step.1.desc=S\u00E9lectionnez un mod\u00E8le de r\u00E9seau pour votre zone. message.zone.step.2.desc=Renseigner les informations suivantes pour ajouter une nouvelle zone message.zone.step.3.desc=Renseigner les informations suivantes pour ajouter un nouveau pod -message.apply.snapshot.policy=Vous avez mis à jour votre politique d\'instantanés avec succès. -message.disable.snapshot.policy=Vous avez désactivé votre politique de snapshots avec succès. -message.action.change.service.warning.for.instance=Votre instance doit être arrêtée avant d\'essayer de changer son offre de service. -message.action.change.service.warning.for.router=Votre routeur doit être arrêté avant d\'essayer de changer son offre de service. -message.action.reset.password.warning=Votre instance doit être arrêtée avant d\'essayer de changer son mot de passe. -message.action.reset.password.off=Votre instance ne supporte pas pour le moment cette fonctionnalité. - -#Errors -error.login=Votre nom d\'utilisateur /mot de passe ne correspond pas à nos données. -error.menu.select=Echec de l\'action car il n\'y a aucun élément sélectionné. -error.mgmt.server.inaccessible=Le serveur de management est indisponible. Essayez plus tard. -error.session.expired=Votre session a expiré. -error.unresolved.internet.name=Votre nom internet ne peut pas être résolu. +message.zoneWizard.enable.local.storage=ATTENTION \: si vous activez le stockage local pour cette zone, vous devez effectuer les op\u00E9rations suivantes, selon l\\'endroit o\u00F9 vous souhaitez lancer vos machines virtuelles Syst\u00E8mes \:

1. Si les machines virtuelles Syst\u00E8mes doivent \u00EAtre lanc\u00E9es depuis le stockage primaire, ce dernier doit \u00EAtre ajout\u00E9 \u00E0 la zone apr\u00E8s la cr\u00E9ation. Vous devez \u00E9galement d\u00E9marrer la zone dans un \u00E9tat d\u00E9sactiv\u00E9.

2. Si les machines virtuelles Syst\u00E8mes doivent \u00EAtre lanc\u00E9es depuis le stockage local, le param\u00E8tre system.vm.use.local.storage doit \u00EAtre d\u00E9fini \u00E0 \\'true\\' avant d\\'activer la zone.


Voulez-vous continuer ? +mode=Mode +network.rate=D\u00E9bit R\u00E9seau +notification.reboot.instance=Red\u00E9marrer l\\'instance +notification.start.instance=D\u00E9marrer l\\'instance +notification.stop.instance=Stopper l\\'instance +side.by.side=C\u00F4te \u00E0 c\u00F4te +state.Accepted=Accept\u00E9 +state.Active=Actif +state.Allocated=Allou\u00E9 +state.Allocating=Allocation en cours +state.BackedUp=Sauvegard\u00E9 +state.BackingUp=Sauvegarde en cours +state.Completed=Termin\u00E9 +state.Creating=Cr\u00E9ation en cours +state.Declined=Refus\u00E9 +state.Destroyed=Supprim\u00E9e +state.Disabled=D\u00E9sactiv\u00E9 +state.Enabled=Actifs +state.Error=Erreur +state.Expunging=Purge en cours +state.Migrating=Migration en cours +state.Pending=En attente +state.Ready=Pr\u00EAt +state.Running=D\u00E9marr\u00E9e +state.Starting=D\u00E9marrage en cours +state.Stopped=Arr\u00EAt\u00E9e +state.Stopping=Arr\u00EAt en cours +state.Suspended=Suspendu +state.enabled=Actifs +state.ready=Pr\u00EAt +ui.listView.filters.all=Tous +ui.listView.filters.mine=Mon diff --git a/client/WEB-INF/classes/resources/messages_ja.properties b/client/WEB-INF/classes/resources/messages_ja.properties index 7555b83dd..977c0109f 100644 --- a/client/WEB-INF/classes/resources/messages_ja.properties +++ b/client/WEB-INF/classes/resources/messages_ja.properties @@ -1116,6 +1116,7 @@ label.keep=ç¶­æŒ label.lang.chinese=簡体字中国語 label.lang.english=英語 label.lang.japanese=日本語 +label.lang.korean=韓国語 label.lang.spanish=スペイン語 label.last.disconnected=最終切断日時 label.last.name=å§“ @@ -1509,4 +1510,10 @@ error.login=ユーザーå/パスワードãŒè¨˜éŒ²ã¨ä¸€è‡´ã—ã¾ã›ã‚“。 error.menu.select=é …ç›®ãŒé¸æŠžã•れã¦ã„ãªã„ãŸã‚æ“作を実行ã§ãã¾ã›ã‚“。 error.mgmt.server.inaccessible=管ç†ã‚µãƒ¼ãƒãƒ¼ã«ã‚¢ã‚¯ã‚»ã‚¹ã§ãã¾ã›ã‚“。後ã§å†å®Ÿè¡Œã—ã¦ãã ã•ã„。 error.session.expired=ã‚»ãƒƒã‚·ãƒ§ãƒ³ã®æœ‰åŠ¹æœŸé™ãŒåˆ‡ã‚Œã¾ã—ãŸã€‚ -error.unresolved.internet.name=インターãƒãƒƒãƒˆåを解決ã§ãã¾ã›ã‚“。 + +#resizeVolumes +label.resize.new.size=New Size(GB) +label.action.resize.volume=Resize Volume +label.action.resize.volume.processing=Resizing Volume.... +label.resize.new.offering.id=New Offering +label.resize.shrink.ok=Shrink OK diff --git a/client/WEB-INF/classes/resources/messages_ko_KR.properties b/client/WEB-INF/classes/resources/messages_ko_KR.properties new file mode 100644 index 000000000..a7b534aa3 --- /dev/null +++ b/client/WEB-INF/classes/resources/messages_ko_KR.properties @@ -0,0 +1,1514 @@ +# 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. + +#new labels (begin) ********************************************************************************************** + + +#new labels (end) ************************************************************************************************ + + +#modified labels (begin) ***************************************************************************************** + + +#modified labels (end) ******************************************************************************************* + +label.configure.network.ACLs=ë„¤íŠ¸ì›Œí¬ ê¶Œí•œ 관리(ACL) 구성 +label.network.ACLs=ë„¤íŠ¸ì›Œí¬ ê¶Œí•œ 관리(ACL) +label.add.network.ACL=ë„¤íŠ¸ì›Œí¬ ê¶Œí•œ 관리(ACL) 추가 +label.private.Gateway=사설 게ì´íŠ¸ì›¨ì´ +label.VPC.router.details=VPC ë¼ìš°í„° ìƒì„¸ +label.VMs.in.tier=계층 ë‚´ë¶€ ê°€ìƒë¨¸ì‹  + +message.zoneWizard.enable.local.storage=경고:현재 Zoneì˜ ë¡œì»¬ 스토리지를 사용 하는 경우는 시스템 VMì˜ ì‹œìž‘ ìž¥ì†Œì— ë”°ë¼ ë‹¤ìŒ ìž‘ì—…ì´ í•„ìš”í•©ë‹ˆë‹¤.

1. 시스템 VMì„ ê¸°ë³¸ 스토리지로 시작해야 하는 경우 기본 스토리지를 만들기한 다ìŒì— Zoneì— ì¶”ê°€í•´ì•¼ 합니다. ë˜í•œ, 유효하지 ì•Šì€ ìƒíƒœì˜ Zoneì„ ì‹œìž‘í•´ì•¼ 합니다.

2. 시스템 VM를 로컬 스토리지로 시작할 필요가 있는 경우 system.vm.use.local.storage를 true 로 설정하고 나서 Zoneì„ ì‚¬ìš©í•´ì•¼ 합니다.


ì§„í–‰ 하시겠습니까? +label.local.storage.enabled=로컬 스토리지는 유효 +label.tier.details=계층 ìƒì„¸ 장버 +label.edit.tags=태그 편집 +label.network.rate.megabytes=ë„¤íŠ¸ì›Œí¬ ì†ë„ (MB/ì´ˆ) +label.action.enable.physical.network=물리 ë„¤íŠ¸ì›Œí¬ ì‚¬ìš©í•¨ +label.action.disable.physical.network=물리 ë„¤íŠ¸ì›Œí¬ ì‚¬ìš© 안 함 +message.action.enable.physical.network=현재 물리 네트워í¬ë¥¼ 사용하시겠습니까? +message.action.disable.physical.network=현재 물리 네트워í¬ë¥¼ 사용 안 함으로 하시겠습니까? + +label.select.tier=계층 ì„ íƒ +label.add.ACL=권한 관리(ACL) 추가 +label.remove.ACL=권한 관리(ACL) ì‚­ì œ +label.tier=계층 +label.network.ACL=ë„¤íŠ¸ì›Œí¬ ê¶Œí•œ 관리(ACL) +label.network.ACL.total=ë„¤íŠ¸ì›Œí¬ ê¶Œí•œ 관리(ACL) 합계 +label.add.new.gateway=새 게ì´íŠ¸ì›¨ì´ ì¶”ê°€í•˜ê¸° +message.add.new.gateway.to.vpc=현재 VPCì— ìƒˆë¡œìš´ 게ì´íŠ¸ì›¨ì´ë¥¼ 추가하기 위한 정보를 지정해 주십시오. +label.delete.gateway=게ì´íŠ¸ì›¨ì´ ì‚­ì œ +message.delete.gateway=현재 게ì´íŠ¸ì›¨ì´ë¥¼ 삭제하시겠습니까? +label.CIDR.of.destination.network=ëŒ€ìƒ ë„¤íŠ¸ì›Œí¬ CIDR +label.add.route=ë¼ìš°íЏ 추가 +label.add.static.route=ì •ì  ë¼ìš°íЏ 추가 +label.remove.static.route=ì •ì  ë¼ìš°íЏ ì‚­ì œ +label.site.to.site.VPN=사ì´íŠ¸ê°„ 사설네트워í¬(VPN) +label.add.VPN.gateway=VPN 게ì´íŠ¸ì›¨ì´ ì¶”ê°€ +message.add.VPN.gateway=VPN 게ì´íŠ¸ì›¨ì´ë¥¼ 추가하시겠습니까? +label.VPN.gateway=VPN 게ì´íŠ¸ì›¨ì´ +label.delete.VPN.gateway=VPN 게ì´íŠ¸ì›¨ì´ì‚­ì œ +message.delete.VPN.gateway=현재 VPN 게ì´íŠ¸ì›¨ì´ë¥¼ 삭제하시겠습니까? +label.VPN.connection=VPN ì ‘ì† +label.IPsec.preshared.key=IPsec 사전 공유 키 +label.IKE.policy=IKE ì •ì±… +label.ESP.policy=ESP ì •ì±… +label.create.VPN.connection=VPN ì ‘ì† ë§Œë“¤ê¸° +label.VPN.customer.gateway=VPN ê³ ê° ê²Œì´íŠ¸ì›¨ì´ +label.CIDR.list=CIDR ëª©ë¡ +label.IKE.lifetime=IKE 유효기간(ì´ˆ) +label.ESP.lifetime=ESP 유효기간(ì´ˆ) +label.dead.peer.detection=ì •ì§€ 피어 ê°ì§€ +label.reset.VPN.connection=VPN ì ‘ì† ìž¬ì„¤ì • +message.reset.VPN.connection=VPN ì ‘ì†ì„ 재설정 하시겠습니까? +label.delete.VPN.connection=VPN ì ‘ì† ì‚­ì œ +message.delete.VPN.connection=VPN ì ‘ì†ì„ 삭제하시겠습니까? +label.add.new.tier=새 계층 추가 +label.add.VM.to.tier=ê³„ì¸µì— VM 추가 +label.remove.tier=계층 ì‚­ì œ + +label.local.storage.enabled=로컬 스토리지 사용함 +label.associated.network=관련 ë„¤íŠ¸ì›Œí¬ +label.add.port.forwarding.rule=í¬í†  전송 ê·œì¹™ì˜ ì¶”ê°€ +label.dns=DNS + +label.vpc=VPC +label.vpc.id=VPC ID +label.tier=계층 +label.add.vpc=VPC 추가 +label.super.cidr.for.guest.networks=ì†ë‹˜ ë„¤íŠ¸ì›Œí¬ ìŠˆí¼ CIDR +label.DNS.domain.for.guest.networks=ì†ë‹˜ ë„¤íŠ¸ì›Œí¬ DNS ë„ë©”ì¸ +label.configure.vpc=VPC 구성 +label.edit.vpc=VPC 편집 +label.restart.vpc=VPC 재시작 +message.restart.vpc=VPC를 재시작하시겠습니까? +label.remove.vpc=VPC ì‚­ì œ +message.remove.vpc=VPC를 삭제하시겠습니까? +label.vpn.customer.gateway=VPN ê³ ê° ê²Œì´íŠ¸ì›¨ì´ +label.add.vpn.customer.gateway=VPN ê³ ê° ê²Œì´íŠ¸ì›¨ì´ ì¶”ê°€ +label.IKE.encryption=IKE 암호화 +label.IKE.hash=IKE 해시 +label.IKE.DH=IKE DH +label.ESP.encryption=ESP 암호화 +label.ESP.hash=ESP 해시 +label.perfect.forward.secrecy=Perfect Forward Secrecy +label.IKE.lifetime=IKE 유효기간(ì´ˆ) +label.ESP.lifetime=ESP 유효기간(ì´ˆ) +label.dead.peer.detection=ì •ì§€ 피어 ê°ì§€ +label.delete.VPN.customer.gateway=VPN ê³ ê° ê²Œì´íŠ¸ì›¨ì´ ì‚­ì œ +message.delete.VPN.customer.gateway=현재 VPN ê³ ê° ê²Œì´íŠ¸ì›¨ì´ë¥¼ 삭제하시겠습니까? + +label.network.domain.text=ë„¤íŠ¸ì›Œí¬ ë„ë©”ì¸ +label.memory.mb=메모리 (MB) +label.cpu.mhz=CPU (MHz) +message.action.remove.host=현재 호스트를 삭제하시겠습니까? + +message.action.reboot.router=현재 ê°€ìƒ ë¼ìš°í„°ë¡œ 제공하는 모든 서비스가 중단ë©ë‹ˆë‹¤. ì´ ë¼ìš°í„°ë¥¼ 재시작하시겠습니까? +message.action.stop.router=현재 ê°€ìƒ ë¼ìš°í„°ë¡œ 제공하는 모든 서비스가 중단ë©ë‹ˆë‹¤. ì´ ë¼ìš°í„°ë¥¼ 정지하시겠습니까? +message.restart.network=현재 네트워í¬ë¡œ 제공하는 모든 서비스가 중단ë©ë‹ˆë‹¤. ì´ ë„¤íŠ¸ì›Œí¬ë¥¼ 재시작하시겠습니까? + + +label.ipaddress=IP 주소 +label.vcdcname=vCenter DC 명 +label.vcipaddress=vCenter IP 주소 +label.vsmctrlvlanid=제어 VLAN ID +label.vsmpktvlanid=패킷 VLAN ID +label.vsmstoragevlanid=스토리지 VLAN ID +label.nexusVswitch=Nexus 1000V +label.action.delete.nexusVswitch=Nexus 1000V ì‚­ì œ +label.action.enable.nexusVswitch=Nexus 1000V 사용함 +label.action.disable.nexusVswitch=Nexus 1000V 사용 안 함 +label.action.list.nexusVswitch=Nexus 1000V ëª©ë¡ í‘œì‹œ +message.action.delete.nexusVswitch=현재 Nexus 1000V를 삭제하시겠습니까? +message.action.enable.nexusVswitch=현재 Nexus 1000V를 사용 하시겠습니까? +message.action.disable.nexusVswitch=현재 Nexus 1000V를 사용 안 함으로 하시겠습니까? +message.specify.url=URL를 지정해 주십시오 +label.select.instance.to.attach.volume.to=ë³¼ë¥¨ì„ ì—°ê²°í•˜ëŠ” ì¸ìŠ¤í„´ìŠ¤ë¥¼ ì„ íƒí•´ 주십시오 +label.upload=업로드 +label.upload.volume=ë³¼ë¥¨ì˜ ì—…ë¡œë“œ +label.virtual.routers=ê°€ìƒ ë¼ìš°í„° +label.primary.storage.count=기본 스토리지 그룹 +label.secondary.storage.count=2ì°¨ 스토리지 그룹 +label.number.of.system.vms=시스템 VM 수 +label.number.of.virtual.routers=ê°€ìƒ ë¼ìš°í„°ìˆ˜ +label.action.register.iso=ISO ë“±ë¡ +label.isolation.method=분리 방법 +label.action.register.template=템플릿 ë“±ë¡ +label.checksum=MD5 ì²´í¬ì„¬ +label.vpn=ê°€ìƒ ì‚¬ì„¤ë§(VPN) +label.vlan=ê°€ìƒ ë„¤íŠ¸ì›Œí¬(VLAN) + + +label.management.ips=관리 IP 주소 +label.devices=기기 +label.rules=규칙 +label.traffic.label=트래픽 ë¼ë²¨ +label.vm.state=VM ìƒíƒœ +message.setup.physical.network.during.zone.creation.basic=기본 Zoneì„ ì¶”ê°€í•  때는 하ì´í¼ ë°”ì´ì €ìƒì˜ 네트ì›ì¹´ë“œ(NIC)ì— ëŒ€ì‘하는 한 가지 물리 네트워í¬ë¥¼ 설정 í•  수 있습니다. 네트워í¬ëŠ” 몇 가지 ì¢…ë¥˜ì˜ íŠ¸ëž˜í”½ì„ ì „ì†¡í•©ë‹ˆë‹¤.

물리 네트워í¬ì— 다른 íŠ¸ëž˜í”½ì˜ ì¢…ë¥˜ë¥¼ë“œëž˜ê·¸ 앤 드롭 í•  ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. +label.domain.router=ë„ë©”ì¸ ë¼ìš°í„° +label.console.proxy=콘솔 프ë¡ì‹œ +label.secondary.storage.vm=2ì°¨ 스토리지 VM +label.add.netScaler.device=Netscaler 기기 추가 +label.add.F5.device=F5 기기 추가 +label.add.SRX.device=SRX 기기 추가 +label.account.and.security.group=계정 ì •ë³´, 보안 그룹 +label.fetch.latest=최신 ì •ë³´ ì·¨ë“ +label.system.offering=시스템 제공 +message.validate.instance.name=ì¸ìŠ¤í„´ìŠ¤ëª…ì€ 63 ë¬¸ìž ì´ë‚´ì—서 지정해 주십시오. ASCII 문ìžì˜ a-z, A-Z, 숫ìžì˜ 0-9 ë° í•˜ì´í”ˆë§Œì„ 사용할 수 있습니다. 문ìžë¡œ 시작하여 ë¬¸ìž ë˜ëŠ” 숫ìžë¡œ ë내야 합니다. + + +label.isolated.networks=분리 ë„¤íŠ¸ì›Œí¬ +label.latest.events=최신 ì´ë²¤íЏ +state.Enabled=사용함 +label.system.wide.capacity=시스템 ì „ì²´ 처리 능력 +label.network.service.providers=ë„¤íŠ¸ì›Œí¬ ì„œë¹„ìŠ¤ ì œê³µìž +message.launch.zone=Zoneì„ ì‹œìž‘í•  준비가 ë˜ì—ˆìŠµë‹ˆë‹¤. ë‹¤ìŒ ìˆœì„œì— ë”°ë¼ ì§„í–‰í•´ 주십시오. +error.unable.to.reach.management.server=관리 서버와 통신할 수 없습니다. +label.internal.name=내부명 +message.configure.all.traffic.types=ë³µìˆ˜ì˜ ë¬¼ë¦¬ 네트워í¬ê°€ 있습니다. [편집]ì„ í´ë¦­í•´ íŠ¸ëž˜í”½ì˜ ì¢…ë¥˜ 마다 ë¼ë²¨ì„ 구성해 주십시오. +message.edit.traffic.type=현재 íŠ¸ëž˜í”½ì˜ ì¢…ë¥˜ì— ê´€ë ¨ 트래픽 ë¼ë²¨ì„ 지정해 주십시오. +label.edit.traffic.type=트래픽 종류 편집 +label.label=ë¼ë²¨ +label.max.networks=최대 네트워í¬ìˆ˜ +error.invalid.username.password=유효하지 ì•Šì€ ì‚¬ìš©ìžëª… ë˜ëŠ” 암호 +message.enabling.security.group.provider=보안 그룹 제공ìžë¥¼ 사용 하고 있습니다. +message.adding.Netscaler.provider=Netscaler 제공ìžë¥¼ 추가하고 있습니다. +message.creating.guest.network=ì†ë‹˜ 네트워í¬ë¥¼ 만듭니다. +label.action.delete.physical.network=물리 ë„¤íŠ¸ì›Œí¬ ì‚­ì œ +message.action.delete.physical.network=현재 물리 네트워í¬ë¥¼ 삭제하시겠습니까? +message.installWizard.copy.whatIsAHost=호스트는 ë‹¨ì¼ ì»´í“¨í„°ë¡œ ì†ë‹˜ ê°€ìƒ ë¨¸ì‹ ì„ ì‹¤í–‰í•˜ëŠ” 컴퓨팅 ìžì›ì„ 제공합니다. ë² ì–´ 메탈 호스트를 제외하고, ê° í˜¸ìŠ¤íŠ¸ëŠ” 게스트 ê°€ìƒ ë¨¸ì‹ ì„ ê´€ë¦¬í•˜ê¸° 위한 하ì´í¼ ë°”ì´ì € 소프트웨어를 설치합니다. ë² ì–´ 메탈 í˜¸ìŠ¤íŠ¸ì— ëŒ€í•´ì„œëŠ” 설치 ê°€ì´ë“œ 고급편 특수 사례로서 설명합니다. 예를 들어, KVMì€ ìœ íš¨í•œ Linux 서버, Citrix XenServerê°€ ë™ìž‘하는 서버 ë° ESXi 서버가 호스트입니다. 기본 설치ì—서는 XenServer ë˜ëŠ” KVM를 실행하는 ë‹¨ì¼ í˜¸ìŠ¤íŠ¸ë¥¼ 사용합니다.

호스트는 CloudStackâ„¢ í™˜ê²½ë‚´ì˜ ìµœì†Œì˜ ì¡°ì§ ë‹¨ìœ„ìž…ë‹ˆë‹¤. 호스트는 í´ëŸ¬ìŠ¤í„°ì— í¬í•¨ë˜ì–´ í´ëŸ¬ìŠ¤í„°ëŠ” Podì— í¬í•¨ë˜ì–´ Pod는 Zoneì— í¬í•¨ë©ë‹ˆë‹¤. + + +label.add.compute.offering=컴퓨팅 ìžì› 추가 +label.compute.offering=컴퓨팅 ìžì› 제공 +label.compute.offerings=컴퓨팅 ìžì› 제공 +label.select.offering=제공 ì„ íƒ +label.menu.infrastructure=ì¸í”„ë¼ìŠ¤íŠ¸ëŸ­ì³ +label.sticky.tablesize=í…Œì´ë¸” í¬ê¸° +label.sticky.expire=만료시간 +label.sticky.cookie-name=Cookie 명 +label.sticky.mode=모드 +label.sticky.length=ê¸¸ì´ +label.sticky.holdtime=ë³´ê´€ 유지 시간 +label.sticky.request-learn=ëŸ¬ë‹ ìš”êµ¬ +label.sticky.prefix=프레픽스 +label.sticky.nocache=ìºì‹œ ì—†ìŒ +label.sticky.indirect=ê°„ì ‘ +label.sticky.postonly=í¬ìŠ¤íŠ¸ë§Œ +label.sticky.domain=ë„ë©”ì¸ +state.Allocating=할당 중 +state.Migrating=ì´ì „ 중 +error.please.specify.physical.network.tags=현재 물리 ë„¤íŠ¸ì›Œí¬ íƒœê·¸ë¥¼ 지정하지 않으면, ë„¤íŠ¸ì›Œí¬ ì œê³µì€ ì‚¬ìš©í•  수 없습니다. + + +state.Stopping=정지하고 있는 중 +message.add.load.balancer.under.ip=ë‹¤ìŒ IP ì£¼ì†Œì— ëŒ€í•´ì„œ ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 ê·œì¹™ì„ ì¶”ê°€í•©ë‹ˆë‹¤: +message.select.instance=ì¸ìŠ¤í„´ìŠ¤ë¥¼ ì„ íƒí•´ 주십시오. +label.select=ì„ íƒ +label.select.vm.for.static.nat=ì •ì  NATìš© VM ì„ íƒ +label.select.instance=ì¸ìŠ¤í„´ìŠ¤ ì„ íƒ +label.nat.port.range=NAT í¬í†  범위 +label.static.nat.vm.details=ì •ì  NAT VM ìƒì„¸ ì •ë³´ +label.edit.lb.rule=ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 규칙 편집 +message.migrate.instance.to.host=다른 호스트ì—게 ì¸ìŠ¤í„´ìŠ¤ë¥¼ ì´ì „하시겠습니까? +label.migrate.instance.to.host=다른 호스트ì—게 ì¸ìŠ¤í„´ìŠ¤ ì´ì „ +message.migrate.instance.to.ps=다른 기본 ìŠ¤í† ë¦¬ì§€ì— ì¸ìŠ¤í„´ìŠ¤ë¥¼ ì´ì „하시겠습니까? +label.migrate.instance.to.ps=다른 기본 ìŠ¤í† ë¦¬ì§€ì— ì¸ìŠ¤í„´ìŠ¤ ì´ì „ +label.corrections.saved=ì ‘ì† ì •ë³´ 저장 +message.installWizard.copy.whatIsSecondaryStorage=2ì°¨ 스토리지는 Zoneê³¼ ê´€ë ¨ë¤ ì•„ëž˜ì˜ í•­ëª©ì„ í¬í•¨í•©ë‹ˆë‹¤.
  • 템플릿 - VM 시작 시 사용할 수 있는 OS ì´ë¯¸ì§€ë¡œ 애플리케ì´ì…˜ì˜ 설치 등 추가 êµ¬ì„±ì„ í¬í•¨í•  수 있습니다.
  • ISO ì´ë¯¸ì§€ - 바로 시작 가능 ë˜ëŠ” 시작 ë¶ˆê°€ì˜ OS ì´ë¯¸ì§€ìž…니다.
  • ë””ìŠ¤í¬ ë³¼ë¥¨ 스냅샷 - VM ë°ì´í„° 저장 복사본입니다. ë°ì´í„°ì˜ ë³µì› ë˜ëŠ” 새로운 템플릿 ë§Œë“¤ê¸°ì— ì‚¬ìš©í•  수 있습니다.
+message.installWizard.copy.whatIsPrimaryStorage=CloudStackâ„¢ í´ë¼ìš°ë“œ ì¸í”„ë¼ìŠ¤íŠ¸ëŸ­ì³ì—서는 기본 스토리지와 2ì°¨ 스토리지 ë‘ ì¢…ë¥˜ì˜ ìŠ¤í† ë¦¬ì§€ë¥¼ 사용합니다. 양쪽 스토리지ì—서 iSCSI, NFS 서버, ë˜ëŠ” 로컬 디스í¬ë¥¼ 사용할 수 있습니다.

기본 스토리지는 í´ëŸ¬ìŠ¤í„°ì— ê´€ë ¨ë˜ì–´ê·¸ í´ëŸ¬ìŠ¤í„°ë‚´ì˜ í˜¸ìŠ¤íŠ¸ë¡œ ë™ìž‘하는 모든 VM 중 ê° ê²ŒìŠ¤íŠ¸ VMì˜ ë””ìŠ¤í¬ ë³¼ë¥¨ì„ í¬í•¨í•©ë‹ˆë‹¤. ì›ëž˜, 기본 스토리지 서버는 호스트 ê·¼ì²˜ì— ì„¤ì¹˜í•©ë‹ˆë‹¤. +message.installWizard.copy.whatIsACluster=í´ëŸ¬ìŠ¤í„°ëŠ” 호스트를 그룹화 하는 방법입니다. 한 가지 í´ëŸ¬ìŠ¤í„°ë‚´ 호스트는 ëª¨ë‘ ë™ì¼í•œ 하드웨어ì—서 구성ë˜ì–´ ê°™ì€ í•˜ì´í¼ ë°”ì´ì €ë¥¼ 실행하고 ê°™ì€ ì„œë¸Œ 네트워í¬ìƒì— 있어서 ê°™ì€ ê³µìœ  ìŠ¤í† ë¦¬ì§€ì— ì ‘ê·¼ 합니다. ê°™ì€ í´ëŸ¬ìŠ¤í„°ë‚´ì˜ í˜¸ìŠ¤íŠ¸ 사ì´ì—서는 사용ìžì—게 서비스를 중단하지 않고 ê°€ìƒ ë¨¸ì‹  ì¸ìŠ¤í„´ìŠ¤ë¥¼ 실시간 ì´ì „ í•  수 있습니다. í´ëŸ¬ìŠ¤í„°ëŠ” CloudStackâ„¢ í™˜ê²½ë‚´ì˜ ì„¸ 번째로 í° ì¡°ì§ ë‹¨ìœ„ìž…ë‹ˆë‹¤. í´ëŸ¬ìŠ¤í„°ëŠ” Podì— í¬í•¨ë˜ì–´ Pod는 Zoneì— í¬í•¨ë©ë‹ˆë‹¤.

CloudStackâ„¢ ì—서는 한 가지 í´ë¼ìš°ë“œ í™˜ê²½ì— ë³µìˆ˜ í´ëŸ¬ìŠ¤í„°ë¥¼ 설정할 수 있으나 기본 설치ì—서는 í´ëŸ¬ìŠ¤í„°ëŠ” 한 개입니다. +message.installWizard.copy.whatIsAPod=ì›ëž˜ 한 가지 Pod는 ë‹¨ì¼ ìž ê¸ˆì„ ë‚˜íƒ€ëƒ…ë‹ˆë‹¤. ê°™ì€ Podë‚´ 호스트는 ê°™ì€ ì„œë¸Œ 네트워í¬ì— í¬í•¨ë©ë‹ˆë‹¤.

Pod는 CloudStackâ„¢ í™˜ê²½ë‚´ì˜ ë‘ ë²ˆì§¸ë¡œ í° ì¡°ì§ ë‹¨ìœ„ìž…ë‹ˆë‹¤. Pod는 Zoneì— í¬í•¨ë©ë‹ˆë‹¤. ê° Zoneì€ í•œ ê°œ ì´ìƒì˜ Pod를 í¬í•¨í•  수 있습니다. 기본 설치ì—서는 Zoneë‚´ Pod는 한 개입니다. +message.installWizard.copy.whatIsAZone=Zoneì€ CloudStackâ„¢ 환경내 최대 ì¡°ì§ ë‹¨ìœ„ìž…ë‹ˆë‹¤. 한 가지 ë°ì´í„° ì„¼í„°ë‚´ì— ë³µìˆ˜ Zoneì„ ì„¤ì •í•  수 있으나 ì›ëž˜ Zoneì€ ë‹¨ì¼ì˜ ë°ì´í„° ì„¼í„°ì— í• ë‹¹í•©ë‹ˆë‹¤. ì¸í”„ë¼ìŠ¤íŠ¸ëŸ­ì³ë¥¼ Zoneì— ì¡°ì§í™”하면, Zoneì„ ë¬¼ë¦¬ì ìš°ë¡œ 분리해 설정할 수 있습니다. 예를 들어, ê° Zoneì— ì „ì›ê³¼ ë„¤íŠ¸ì›Œí¬ ì—…ë§í¬ë¥¼ 배치합니다. 필수가 아니지만 ì›ê²©ì§€ì— ë¶„ì‚°í•  수 있습니다. +message.installWizard.copy.whatIsCloudStack=CloudStack™는 컴퓨팅 ìžì›ì„ í¬í•¨í•˜ëŠ” 소프트웨어 플랫웹 ì–‘ì‹ì—서 공개, 사설, ë° í•˜ì´ë¸Œë¦¬ë“œì˜ Infrastructure as a Service (IaaS) í´ë¼ìš°ë“œë¥¼ 구축할 수 있습니다. CloudStack™를 사용하고, í´ë¼ìš°ë“œ ì¸í”„ë¼ìŠ¤íŠ¸ëŸ­ì³ë¥¼ 구성하는 네트워í¬, 스토리지 ë° ì»´í“¨íŒ… 노드를 관리하고 í´ë¼ìš°ë“œ 컴퓨팅 í™˜ê²½ì„ ì„¤ì •, 관리 ë° êµ¬ì„±í•©ë‹ˆë‹¤.

CloudStackâ„¢ì€ í•˜ë“œì›¨ì–´ìƒì—서 ë™ìž‘하는 개별 ê°€ìƒ ë¨¸ì‹  ì´ë¯¸ì§€ë¥¼ 넘어 확장할 수 있기 ë•Œë¬¸ì— ê°„ë‹¨í•œ 설정으로 ë™ìž‘하는 í´ë¼ìš°ë“œ ì¸í”„ë¼ìŠ¤íŠ¸ëŸ­ì³ ì†Œí”„íŠ¸ì›¨ì–´ 스íƒì— ì˜í•´ ê°€ìƒ ë°ì´í„° 센터 즉 여러 층형 멀티 ì„¸ìž…ìž í´ë¼ìš°ë“œ 애플리케ì´ì…˜ì„ 서비스로서 구축하고 설정하고 관리하기 위해서 불가결한 í•­ëª©ì„ ëª¨ë‘ ì œê³µí•©ë‹ˆë‹¤. 오픈 소스 버전과 프리미엄 버전 양쪽 모ë‘ì— ì œê³µí•˜ë©° 오픈 소스 버전ì—ì„œë„ ëŒ€ë¶€ë¶„ ê¸°ëŠ¥ì„ ì‚¬ìš©í•  수 있습니다. +message.installWizard.tooltip.addSecondaryStorage.path=위ì—서 지정한 ì„œë²„ì— ì¡´ìž¬í•˜ëŠ” 내보내기 경로입니다. +message.installWizard.tooltip.addSecondaryStorage.nfsServer=2ì°¨ 스토리지를 호스트 하는 NFS 서버 IP 주소입니다. +message.installWizard.tooltip.addPrimaryStorage.path=(NFSì˜ ê²½ìš°) 서버ì—서 내보내기 경로입니다. (SharedMountPointì˜ ê²½ìš°) ì¼ë°˜ 경로입니다. KVMì—서는 기본 스토리지가 마운트ë˜ëŠ” ê° í˜¸ìŠ¤íŠ¸ìƒì˜ 경로입니다. 예를 들어, /mnt/primary 입니다. +message.installWizard.tooltip.addPrimaryStorage.server=(NFS, iSCSI ë˜ëŠ” PreSetupì˜ ê²½ìš°) 스토리지 ê¸°ê¸°ì˜ IP 주소 ë˜ëŠ” DNS 명입니다. +message.installWizard.tooltip.addPrimaryStorage.name=스토리지 ê¸°ê¸°ì˜ ì´ë¦„입니다. +message.installWizard.tooltip.addHost.password=XenServer 측ì—서 지정한 ìœ„ì˜ ì‚¬ìš©ìžëª…ì— ëŒ€í•œ 암호입니다. +message.installWizard.tooltip.addHost.username=ì›ëž˜ root 입니다. +message.installWizard.tooltip.addHost.hostname=호스트 DNS 명 ë˜ëŠ” IP 주소입니다. +message.installWizard.tooltip.addCluster.name=í´ëŸ¬ìŠ¤í„° ì´ë¦„입니다. CloudStackì—서 예약하지 ì•Šì€ ìž„ì˜ í…스트를 지정할 수 있습니다. +message.installWizard.tooltip.addPod.reservedSystemEndIp=ì´ê²ƒì€ 2ì°¨ 스토리지 VM ë° ì½˜ì†” 프ë¡ì‹œ VM를 관리하기 위해서 CloudStackì—서 사용하는 사설 네트워í¬ë‚´ IP 주소 범위입니다. ì´ëŸ¬í•œ IP 주소는 컴퓨팅 서버와 ê°™ì€ ì„œë¸Œë„¤íŠ¸ì›Œí¬ì—서 할당합니다. +message.installWizard.tooltip.addPod.reservedSystemStartIp=ì´ê²ƒì€ 2ì°¨ 스토리지 VM ë° ì½˜ì†” 프ë¡ì‹œ VM를 관리하기 위해서 CloudStackì—서 사용하는 사설 네트워í¬ë‚´ì˜ IP 주소 범위입니다. ì´ëŸ¬í•œ IP 주소는 컴퓨팅 서버와 ê°™ì€ ì„œë¸Œë„¤íŠ¸ì›Œí¬ì—서 할당합니다. +message.installWizard.tooltip.addPod.reservedSystemNetmask=게스트가 사용하는 서브네트워í¬ìƒì—서 지정한 ë„· 마스í¬ìž…니다. +message.installWizard.tooltip.addPod.reservedSystemGateway=현재 Podë‚´ 호스트 게ì´íŠ¸ì›¨ì´ìž…니다. +message.installWizard.tooltip.addPod.name=Pod ì´ë¦„입니다. +message.installWizard.tooltip.configureGuestTraffic.guestEndIp=현재 Zoneì˜ ê²ŒìŠ¤íŠ¸ì—게 할당할 수 있는 IP 주소 범위입니다. 사용하는 NICê°€ 한 ê°€ì§€ì¸ ê²½ìš°ëŠ” ì´ëŸ¬í•œ IP 주소는 Podì˜ CIDR와 ê°™ì€ CIDRì— í¬í•¨ë˜ì–´ 있어야 합니다. +message.installWizard.tooltip.configureGuestTraffic.guestStartIp=현재 Zoneì˜ ê²ŒìŠ¤íŠ¸ì—게 할당할 수 있는 IP 주소 범위입니다. 사용하는 NICê°€ 한 가지 경우는 ì´ëŸ¬í•œ IP 주소는 Podì˜ CIDR와 ê°™ì€ CIDRì— í¬í•¨ë˜ì–´ 있어야 합니다. +message.installWizard.tooltip.configureGuestTraffic.guestNetmask=게스트ì—서 사용하는 서브네트워í¬ìƒì—서 사용ë˜ëŠ” ë„· 마스í¬ìž…니다. +message.installWizard.tooltip.configureGuestTraffic.guestGateway=게스트ì—서 사용하는 게ì´íŠ¸ì›¨ì´ìž…니다. +message.installWizard.tooltip.configureGuestTraffic.description=ë„¤íŠ¸ì›Œí¬ ì„¤ëª…ìž…ë‹ˆë‹¤. +message.installWizard.tooltip.configureGuestTraffic.name=ë„¤íŠ¸ì›Œí¬ ì´ë¦„입니다. +message.installWizard.tooltip.addZone.internaldns2=Zoneë‚´ 시스템 VM으로 사용하는 DNS 서버입니다. 현재 DNS 서버는 시스템 VMì˜ ì‚¬ì„¤ ë„¤íŠ¸ì›Œí¬ ì¸í„°íŽ˜ì´ìŠ¤ë¥¼ 개입시켜 접근합니다. Podì˜ ì‚¬ì„¤ IP 주소ì—서 여기서 지정하는 DNS ì„œë²„ì— í†µì‹ í•  수 있어야 합니다. +message.installWizard.tooltip.addZone.internaldns1=Zoneë‚´ì˜ ì‹œìŠ¤í…œ VM 로 사용하는 DNS 서버입니다. 현재 DNS 서버는 시스템 VMì˜ ì‚¬ì„¤ ë„¤íŠ¸ì›Œí¬ ì¸í„°íŽ˜ì´ìŠ¤ë¥¼ 개입시켜 접근합니다. Podì˜ ì‚¬ì„¤ IP 주소ì—서 여기서 지정하는 DNS ì„œë²„ì— í†µì‹ í•  수 있어야 합니다. +message.installWizard.tooltip.addZone.dns2=Zoneë‚´ 게스트 VM 로 사용하는 DNS 서버입니다. 현재 DNS 서버ì—는 다ìŒì— 추가하는 공개 ë„¤íŠ¸ì›Œí¬ ê²½ìœ ë¡œ 접근합니다. Zoneì˜ ê³µê°œ IP 주소ì—서 여기서 지정하는 공개 DNS ì„œë²„ì— í†µì‹ í•  수 있어야 합니다. +message.installWizard.tooltip.addZone.name=Zoneì˜ ì´ë¦„입니다. +message.installWizard.tooltip.addZone.dns1=Zoneë‚´ì˜ ê²ŒìŠ¤íŠ¸ VM으로 사용하는 DNS 서버입니다. ì´ëŸ¬í•œ DNS 서버ì—는 다ìŒì— 추가하는 공개 ë„¤íŠ¸ì›Œí¬ ê²½ìœ ë¡œ ì ‘ê·¼ 합니다. Zoneì˜ ê³µê°œ IP 주소ì—서 여기서 지정하는 공개 DNS ì„œë²„ì— í†µì‹ í•  수 있어야 합니다. +message.setup.successful=í´ë¼ìš°ë“œê°€ 설정 ë˜ì—ˆìŠµë‹ˆë‹¤. +label.may.continue=실행 í•  수 ìžˆìŒ +error.installWizard.message=문제가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. 다시 오류를 수정할 수 있습니다. +message.installWizard.now.building=í´ë¼ìš°ë“œë¥¼ 구축하고 있는 중... +message.installWizard.click.retry=ì‹œìž‘ì„ ìž¬ì‹œí–‰í•˜ë ¤ë©´ ë²„íŠ¼ì„ í´ë¦­í•´ 주십시오. +label.launch=시작 +label.installWizard.click.launch=[시작]ì„ í´ë¦­í•´ 주십시오. +label.congratulations=ì„¤ì •ì´ ê³§ 완료입니다. +label.installWizard.addSecondaryStorageIntro.subtitle=2ì°¨ ìŠ¤í† ë¦¬ì§€ì— ëŒ€í•´ +label.installWizard.addSecondaryStorageIntro.title=2ì°¨ 스토리지 추가 +label.installWizard.addPrimaryStorageIntro.subtitle=기본 ìŠ¤í† ë¦¬ì§€ì— ëŒ€í•´ +label.installWizard.addPrimaryStorageIntro.title=기본 스토리지 추가 +label.installWizard.addHostIntro.subtitle=í˜¸ìŠ¤íŠ¸ì— ëŒ€í•´ +label.installWizard.addHostIntro.title=호스트 추가 +label.installWizard.addClusterIntro.subtitle=í´ëŸ¬ìŠ¤í„° 대한 ì •ë³´ +label.installWizard.addClusterIntro.title=í´ëŸ¬ìŠ¤í„° 추가 +label.installWizard.addPodIntro.subtitle=Podì— ëŒ€í•œ ì •ë³´ +label.installWizard.addPodIntro.title=Pod 추가 +label.installWizard.addZone.title=Zone 추가 +label.installWizard.addZoneIntro.subtitle=Zoneì— ëŒ€í•œ ì •ë³´ +label.installWizard.addZoneIntro.title=Zone 추가 +error.password.not.match=암호가 ì¼ì¹˜í•˜ì§€ ì•ŠìŒ +label.confirm.password=암호 í™•ì¸ ìž…ë ¥ +message.change.password=암호를 변경해 주십시오. +label.save.and.continue=저장하기 +label.skip.guide=CloudStack 사용 ê°€ì´ë“œ 건너뛰기 +label.continue.basic.install=기본 설치 실행 +label.introduction.to.cloudstack=CloudStackâ„¢ 소개 +label.what.is.cloudstack=CloudStackâ„¢ ì •ë³´ +label.hints=ì •ë³´ +label.installWizard.subtitle=현재 ê°€ì´ë“œ 투어는 CloudStackâ„¢ 환경 ì„¤ì •ì— ë„ì›€ì´ ë©ë‹ˆë‹¤ +label.continue=실행 +label.installWizard.title=CloudStackâ„¢ 마법사 +label.agree=ë™ì˜ +label.manage.resources=ìžì› 관리 +label.port.forwarding.policies=í¬í†  전송 ì •ì±… +label.load.balancing.policies=ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 ì •ì±… +label.networking.and.security=네트워í¬ì™€ 보안 +label.bandwidth=ëŒ€ì—­í­ +label.virtual.machines=ê°€ìƒ ë¨¸ì‹  +label.compute.and.storage=컴퓨팅과 스토리지 +label.task.completed=작업 완료 +label.update.project.resources=프로ì íЏ ìžì› ì—…ë°ì´íЏ +label.remove.project.account=프로ì íЏ 계정 ì •ë³´ ì‚­ì œ +label.item.listing=항목 ëª©ë¡ +message.select.item=í•­ëª©ì„ ì„ íƒí•´ 주십시오. +label.removing=삭제하는 중 +label.invite=초대 +label.add.by=추가 단위 +label.max.vms=최대 ì‚¬ìš©ìž VM수 +label.max.public.ips=최대 공개 IP 주소수 +label.max.volumes=최대 볼륨수 +label.max.snapshots=최대 스냅샷수 +label.max.templates=최대 템플릿수 +label.project.dashboard=프로ì íЏ 대시 보드 +label.remind.later=알림 표시 +label.invited.accounts=초대가 ë난 계정 ì •ë³´ +label.invite.to=초대 프로ì íЏ: +label.add.accounts.to=계정 ì •ë³´ 추가: +label.add.accounts=계정 ì •ë³´ 추가 +label.project.name=프로ì íŠ¸ëª… +label.create.project=프로ì íЏ 만들기 +label.networks=ë„¤íŠ¸ì›Œí¬ +label.launch.vm=VM 시작 +label.new.vm=새 VM +label.previous=뒤로 +label.add.to.group=ê·¸ë£¹ì— ì¶”ê°€ +message.vm.review.launch=다ìŒì˜ 정보를 참조하고 ê°€ìƒ ì¸ìŠ¤í„´ìŠ¤ë¥¼ 올바르게 설정한 ê²ƒì„ í™•ì¸í•˜ê³  나서 시작해 주십시오. +message.select.security.groups=새로운 ê°€ìƒ ë¨¸ì‹  보안 ê·¸ë£¹ì„ ì„ íƒí•´ 주십시오. +label.new=ì‹ ê·œ +message.please.select.networks=ê°€ìƒ ë¨¸ì‹  네트워í¬ë¥¼ ì„ íƒí•´ 주십시오. +message.please.proceed=다ìŒì˜ ìˆœì„œì— ì§„í–‰í•´ 주십시오. +message.zone.no.network.selection=ì„ íƒí•œ Zoneì—서는 네트워í¬ë¥¼ ì„ íƒí•  수 없습니다. +label.no.thanks=설정 안함 +label.my.templates=ë‚˜ì˜ í…œí”Œë¦¿ +message.select.template=새로운 ê°€ìƒ ì¸ìŠ¤í„´ìŠ¤ í…œí”Œë¦¿ì„ ì„ íƒí•´ 주십시오. +message.select.iso=새로운 ê°€ìƒ ì¸ìŠ¤í„´ìŠ¤ ISO를 ì„ íƒí•´ 주십시오. +message.template.desc=VMì˜ ì‹œìž‘ì— ì‚¬ìš©í•  수 있는 OS ì´ë¯¸ì§€ +message.iso.desc=ë°ì´í„° ë˜ëŠ” OS 시작 가능 미디어를 í¬í•¨í•œ ë””ìŠ¤í¬ ì´ë¯¸ì§€ +label.select.iso.or.template=ISO ë˜ëŠ” 템플릿 ì„ íƒ +message.select.a.zone=Zoneì€ ì›ëž˜ ë‹¨ì¼ ë°ì´í„° ì„¼í„°ì— í•´ë‹¹í•©ë‹ˆë‹¤. 복수 Zoneì„ ì„¤ì •í•˜ê³  물리ì ìœ¼ë¡œ 분리하는 방법으로 í´ë¼ìš°ë“œì˜ ì‹ ë¢°ì„±ì„ ë†’ì¼ ìˆ˜ 있습니다. +label.select.a.zone=Zone ì„ íƒ +label.review=í™•ì¸ +label.select.a.template=템플릿 ì„ íƒ +label.setup=설정 +state.Allocated=할당 ë난 ìƒíƒœ +changed.item.properties=항목 ì†ì„± 변경 +label.apply=ì ìš© +label.default=기본 +label.viewing=표시 항목: +label.move.to.top=처ìŒìœ¼ë¡œ ì´ë™ +label.move.up.row=위로 ì´ë™ +label.move.down.row=아래로 ì´ë™ +label.move.to.bottom=마지막으로 ì´ë™ +label.drag.new.position=새로운 ìœ„ì¹˜ì— ëŒì–´ì˜¤ê¸° +label.order=순서 +label.no.data=표시할 ë°ì´í„°ê°€ ì—†ìŒ +label.change.value=ê°’ 변경 +label.clear.list=ëª©ë¡ ì‚­ì œ +label.full.path=ì „ì²´ 경로 +message.add.domain=현재 ë„ë©”ì¸ì— ë§Œë“¤ê³ ìž í•˜ëŠ” 서브 ë„ë©”ì¸ì„ 지정해 주십시오. +message.delete.user=현재 사용ìžë¥¼ 삭제하시겠습니까? +message.enable.user=현재 사용ìžë¥¼ 사용 하시겠습니까? +message.disable.user=현재 사용ìžë¥¼ 사용 안 함으로 하시겠습니까? +message.generate.keys=현재 사용ìžì—게 새로운 키를 ìƒì„±í•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.update.resource.count=현재 계정 ì •ë³´ ìžì›ìˆ˜ë¥¼ ì—…ë°ì´íŠ¸í•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.edit.account=편집 ("-1"는 ìžì› 만들기 숫ìžì— ì œí•œì´ ì—†ëŠ” 값입니다.) +label.total.of.vm=VM 합계 +label.total.of.ip=IP 주소 합계 +state.enabled=유효함 +message.action.download.iso=현재 ISO를 다운로드하시겠습니까? +message.action.download.template=현재 í…œí”Œë¦¿ì„ ë‹¤ìš´ë¡œë“œí•˜ì‹œê² ìŠµë‹ˆê¹Œ? +label.destination.zone=복사할 Zone +label.keyboard.type=키보드 종류 +label.nic.adapter.type=NIC 아답터 종류 +label.root.disk.controller=루트 ë””ìŠ¤í¬ ì½˜íŠ¸ë¡¤ëŸ¬ +label.community=커뮤니티 +label.remove.egress.rule=전송 규칙 ì‚­ì œ +label.add.egress.rule=전송 규칙 추가 +label.egress.rule=전송 규칙 +label.remove.ingress.rule=수신 규칙 ì‚­ì œ +label.delete.vpn.user=VPN ì‚¬ìš©ìž ì‚­ì œ +label.add.vpn.user=VPN ì‚¬ìš©ìž ì¶”ê°€ +label.remove.pf=í¬í†  전송 규칙 ì‚­ì œ +label.remove.vm.from.lb=ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 ê·œì¹™ì— VM ì‚­ì œ +label.add.vms.to.lb=ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 ê·œì¹™ì— VM 추가 +label.add.vm=VM 추가 +label.remove.static.nat.rule=ì •ì  NAT 규칙 ì‚­ì œ +label.remove.rule=규칙 ì‚­ì œ +label.add.static.nat.rule=ì •ì  NAT 규칙 추가 +label.add.rule=규칙 추가 +label.configuration=구성 +message.disable.vpn=VPN를 사용 안 함으로 하시겠습니까? +label.disable.vpn=VPN 사용 안 함 +message.enable.vpn=현재 IP ì£¼ì†Œì— ëŒ€í•œ VPN 접근를 사용 하시겠습니까? +label.enable.vpn=VPN 사용함 +message.acquire.new.ip=현재 네트워í¬ê°€ 새로운 IP 주소를 ì·¨ë“하시겠습니까? +label.elastic=오류 스틱 +label.my.network=ë‚´ ë„¤íŠ¸ì›Œí¬ +label.add.vms=VM 추가 +label.configure=구성 +label.stickiness=ì§€ì†ì„± +label.source=시작 위치 +label.least.connections=최소 ì ‘ì† +label.round.robin=ë¼ìš´ë“œ 로빈 +label.restart.required=재시작 í•„ìš” +label.clean.up=삭제하기 +label.restart.network=ë„¤íŠ¸ì›Œí¬ ìž¬ì‹œìž‘ +label.edit.network.details=ë„¤íŠ¸ì›Œí¬ ìƒì„¸í•œ 편집 +label.add.guest.network=ì†ë‹˜ ë„¤íŠ¸ì›Œí¬ ì¶”ê°€ +label.guest.networks=ì†ë‹˜ ë„¤íŠ¸ì›Œí¬ +message.ip.address.changed=사용 IP 주소가 ë³€ê²½ëœ ê°€ëŠ¥ì„±ì´ ìžˆìŠµë‹ˆë‹¤. 목ë¡ì„ ì—…ë°ì´íŠ¸í•©ë‹ˆê¹Œ? ê·¸ 경우는 ìƒì„¸ ì„¤ì •ì°½ì´ ë‹«ëŠ” ê²ƒì— ì£¼ì˜í•´ 주십시오. +state.BackingUp=백업 중 +state.BackedUp=백업 완료 +label.done=완료 +label.vm.name=VM 명 +message.migrate.volume=다른 기본 ìŠ¤í† ë¦¬ì§€ì— ë³¼ë¥¨ì„ ì´ì „하시겠습니까? +label.migrate.volume=다른 기본 ìŠ¤í† ë¦¬ì§€ì— ë³¼ë¥¨ ì´ì „ +message.create.template=í…œí”Œë¦¿ì„ ë§Œë“¤ê¸°í•˜ì‹œê² ìŠµë‹ˆê¹Œ? +label.create.template=템플릿 만들기 +message.download.volume.confirm=현재 ë³¼ë¥¨ì„ ë‹¤ìš´ë¡œë“œí•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.detach.disk=현재 디스í¬ë¥¼ 분리 하시겠습니까? +state.ready=준비 완료 +state.Ready=준비 완료 +label.vm.display.name=VM 표시명 +label.select-view=표시 방법 ì„ íƒ +label.local.storage=로컬 스토리지 +label.direct.ips=ì§ì ‘ IP 주소 +label.view.all=ëª¨ë‘ í‘œì‹œ +label.zone.details=Zone ìƒì„¸ +message.alert.state.detected=경계체제 ìƒíƒœê°€ ê°ì§€ë˜ì—ˆìŠµë‹ˆë‹¤ +state.Starting=시작 중 +state.Expunging=제거 중 +state.Creating=ìƒì„± 중 +message.decline.invitation=현재 프로ì íŠ¸ì— ì´ˆëŒ€ë¥¼ 거절하시겠습니까? +label.decline.invitation=초대 ê±°ì ˆ +message.confirm.join.project=현재 프로ì íŠ¸ì— ì°¸ì—¬í•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.join.project=ì´ê²ƒìœ¼ë¡œ, 프로ì íŠ¸ì— ì°¸ì—¬í–ˆìŠµë‹ˆë‹¤. 프로ì íŠ¸ë¥¼ 참조하려면 프로ì íЏ 보기로 전환해 주십시오. +label.accept.project.invitation=프로ì íЏ 초대 ìŠ¹ì¸ +label.token=í† í° +label.project.id=프로ì íЏ ID +message.enter.token=ì „ìž ë©”ì¼ ì´ˆëŒ€ìž¥ì— ì„¤ëª…ë˜ì–´ 있는 토í°ì„ 입력해 주십시오. +label.enter.token=í† í° ìž…ë ¥ +state.Accepted=ìŠ¹ì¸ ì™„ë£Œ +state.Pending=보류 +state.Completed=완료 +state.Declined=ê±°ì ˆ +label.project=프로ì íЏ +label.invitations=초대장 +label.delete.project=프로ì íЏ ì‚­ì œ +message.delete.project=현재 프로ì íŠ¸ë¥¼ 삭제하시겠습니까? +message.activate.project=현재 프로ì íŠ¸ë¥¼ 활성화 하시겠습니까? +label.activate.project=프로ì íЏ 활성화 +label.suspend.project=프로ì íЏ ì¼ì‹œì •ì§€ +message.suspend.project=현재 프로ì íŠ¸ë¥¼ ì¼ì‹œì •지하시겠습니까? +state.Suspended=ì¼ì‹œì •ì§€ +label.edit.project.details=프로ì íЏ ìƒì„¸ 편집 +label.new.project=새 프로ì íЏ +state.Active=활성 +state.Disabled=유효하지 ì•Šì€ +label.projects=프로ì íЏ +label.make.project.owner=계정 ì •ë³´ 프로ì íЏ ì†Œìœ ìž +label.remove.project.account=계정 ì •ë³´ 프로ì íЏì—서 ì‚­ì œ +message.project.invite.sent=사용ìžì—게 ì´ˆëŒ€ìž¥ì´ ì „ì†¡ë˜ì—ˆìŠµë‹ˆë‹¤. 사용ìžê°€ 초대를 승ì¸í•˜ë©´, 프로ì íŠ¸ì— ì¶”ê°€ë©ë‹ˆë‹¤. +label.add.account.to.project=계정 ì •ë³´ 프로ì íŠ¸ì— ì¶”ê°€ +label.revoke.project.invite=초대 취소 +label.project.invite=프로ì íŠ¸ì— ì´ˆëŒ€ +label.select.project=프로ì íЏ ì„ íƒ +message.no.projects=프로ì íŠ¸ê°€ 없습니다.
프로ì íЏ 섹션ì—서 새로운 프로ì íŠ¸ë¥¼ 만들어 주십시오. +message.no.projects.adminOnly=프로ì íŠ¸ê°€ 없습니다.
관리ìžì—게 새로운 프로ì íЏ ìƒì„±ì„ ì˜ë¢°í•˜ì‹­ì‹œì˜¤. +message.pending.projects.1=ë³´ë¥˜ì¤‘ì¸ í”„ë¡œì íЏ ì´ˆëŒ€ìž¥ì´ ìžˆìŠµë‹ˆë‹¤. +message.pending.projects.2=표시하려면 프로ì íЏ 섹션으로 ì´ë™í•˜ê³  목ë¡ì—서 ì´ˆëŒ€ìž¥ì„ ì„ íƒí•©ë‹ˆë‹¤. +message.instanceWizard.noTemplates=사용 가능한 í…œí”Œë¦¿ì´ ì—†ìŠµë‹ˆë‹¤. í˜¸í™˜ì„±ì´ ìžˆëŠ” í…œí”Œë¦¿ì„ ì¶”ê°€í•˜ê³ , ì¸ìŠ¤í„´ìŠ¤ 위저드를 재시작해 주십시오. +label.view=표시 - +instances.actions.reboot.label=ì¸ìŠ¤í„´ìŠ¤ 재시작 +label.filterBy=í•„í„° +label.ok=í™•ì¸ +notification.reboot.instance=ì¸ìŠ¤í„´ìŠ¤ 재시작 +notification.start.instance=ì¸ìŠ¤í„´ìŠ¤ 시작 +notification.stop.instance=ì¸ìŠ¤í„´ìŠ¤ ì •ì§€ +label.display.name=표시명 +label.zone.name=Zone ì´ë¦„ +ui.listView.filters.all=ëª¨ë‘ +ui.listView.filters.mine=ë‚´ ì •ë³´ë§Œ +state.Running=실행 중 +state.Stopped=ì •ì§€ëœ ìƒíƒœ +state.Destroyed=íŒŒê¸°ëœ ìƒíƒœ +state.Error=오류 +message.reset.password.warning.notPasswordEnabled=현재 ì¸ìŠ¤í„´ìŠ¤ í…œí”Œë¦¿ì€ ì•”í˜¸ 관리를 사용 하지 않고 ìƒì„±ë˜ì—ˆìŠµë‹ˆë‹¤. +message.reset.password.warning.notStopped=현재 암호를 변경하기 ì „ì— ì¸ìŠ¤í„´ìŠ¤ë¥¼ 정지해야 합니다. +label.notifications=알림 +label.default.view=기본 보기 +label.project.view=프로ì íЏ 보기 + +message.add.system.service.offering=새로운 시스템 서비스 ì œê³µì„ ì¶”ê°€í•˜ê¸° 위해 ë‹¤ìŒ ë°ì´í„°ë¥¼ 입력해 주십시오. +message.action.delete.system.service.offering=현재 시스템 서비스 ì œê³µì„ ì‚­ì œí•˜ì‹œê² ìŠµë‹ˆê¹Œ? +label.action.delete.system.service.offering=시스템 서비스 제공 ì‚­ì œ +label.hypervisor.capabilities=하ì´í¼ ë°”ì´ì € 기능 +label.hypervisor.version=하ì´í¼ ë°”ì´ì € 버전 +label.max.guest.limit=최대 게스트 제한 +label.add.network.offering=ë„¤íŠ¸ì›Œí¬ ì œê³µ 추가 +label.supported.services=기술 ì§€ì›ë˜ëŠ” 서비스 +label.service.capabilities=서비스 기능 +label.guest.type=게스트 종류 +label.specify.IP.ranges=IP 주소 범위 지정 +label.conserve.mode=절약 모드 +label.created.by.system=시스템 만들기 +label.menu.system.service.offerings=시스템 제공 +label.add.system.service.offering=시스템 서비스 제공 추가 +label.redundant.router.capability=중복 ë¼ìš°í„° 기능 +label.supported.source.NAT.type=기술 ì§€ì›ë˜ëŠ” 전송 NAT 종류 +label.elastic.LB=íƒ„ë ¥ì  ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 +label.LB.isolation=ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 분리 +label.elastic.IP=íƒ„ë ¥ì  IP 주소 +label.network.label.display.for.blank.value=기본 게ì´íŠ¸ì›¨ì´ë¥¼ 사용 +label.xen.traffic.label=XenServer 트래픽 ë¼ë²¨ +label.kvm.traffic.label=KVM 트래픽 ë¼ë²¨ +label.vmware.traffic.label=VMware 트래픽 ë¼ë²¨ +label.start.IP=시작 IP 주소 +label.end.IP=종료 IP 주소 +label.remove.ip.range=IP 주소 범위 ì‚­ì œ +label.ip.ranges=IP 주소 범위 +label.start.vlan=시작 VLAN +label.end.vlan=종료 VLAN +label.broadcast.domain.range=브로드ìºìŠ¤íŠ¸ ë„ë©”ì¸ ë²”ìœ„ +label.compute=컴퓨팅 +message.add.guest.network=ì†ë‹˜ 네트워í¬ë¥¼ 추가하시겠습니까? +label.subdomain.access=서브 ë„ë©”ì¸ ì ‘ê·¼ +label.guest.start.ip=게스트 시작 IP 주소 +label.guest.end.ip=게스트 종료 IP 주소 +label.virtual.router=ê°€ìƒ ë¼ìš°í„° +label.physical.network.ID=물리 ë„¤íŠ¸ì›Œí¬ ID +label.destination.physical.network.id=ëª©ì  ë¬¼ë¦¬ ë„¤íŠ¸ì›Œí¬ ID +label.dhcp=DHCP +label.destroy.router=ë¼ìš°í„° 파기 +message.confirm.destroy.router=현재 ë¼ìš°í„°ë¥¼ 파기하시겠습니까? +label.change.service.offering=서비스 제공 변경 +label.view.console=콘솔 표시 +label.redundant.state=중복 ìƒíƒœ +label.enable.provider=ì œê³µìž ì‚¬ìš©í•¨ +message.confirm.enable.provider=현재 제공ìžë¥¼ 사용하시겠습니까? +label.disable.provider=ì œê³µìž ì‚¬ìš© 안 함 +message.confirm.disable.provider=현재 제공ìžë¥¼ 사용 안 함으로 하시겠습니까? +label.shutdown.provider=ì œê³µìž ì¢…ë£Œ +message.confirm.shutdown.provider=현재 제공ìžë¥¼ 종료하시겠습니까? +label.netScaler=NetScaler +label.add.new.NetScaler=새로운 NetScaler 추가 +label.capacity=처리 능력 +label.dedicated=ì „ìš© +label.f5=F5 +label.add.new.F5=새로운 F5 추가 +label.srx=SRX +label.providers=ì œê³µìž +label.add.new.SRX=새로운 SRX 추가 +label.timeout=시간 초과 +label.public.network=공개 ë„¤íŠ¸ì›Œí¬ +label.private.network=사설 ë„¤íŠ¸ì›Œí¬ +label.enable.swift=Swift 사용함 +confirm.enable.swift=Swift 기술 ì§€ì›ë¥¼ 사용 하려면 ë‹¤ìŒ ì •ë³´ë¥¼ 입력해 주십시오. +message.after.enable.swift=Swiftê°€ 구성ë˜ì—ˆìŠµë‹ˆë‹¤. 주ì˜:ì´ íŽ˜ì´ì§€ë¥¼ 닫으면 Swift를 재구성할 수 없습니다. +label.key=키 +label.delete.NetScaler=NetScaler ì‚­ì œ +message.confirm.delete.NetScaler=NetScaler를 삭제하시겠습니까? +label.delete.F5=F5 ì‚­ì œ +message.confirm.delete.F5=F5를 삭제하시겠습니까? +label.delete.SRX=SRX ì‚­ì œ +message.confirm.delete.SRX=SRX를 삭제하시겠습니까? +label.pods=Pod +label.pod.name=Pod명 +label.reserved.system.gateway=ì˜ˆì•½ëœ ì‹œìŠ¤í…œ 게ì´íŠ¸ì›¨ì´ +label.reserved.system.netmask=ì˜ˆì•½ëœ ì‹œìŠ¤í…œ ë„· ë§ˆìŠ¤í¬ +label.start.reserved.system.IP=ì˜ˆì•½ëœ ì‹œìž‘ 시스템 IP 주소 +label.end.reserved.system.IP=ì˜ˆì•½ëœ ì¢…ë£Œ 시스템 IP 주소 +label.clusters=í´ëŸ¬ìŠ¤í„° +label.cluster.name=í´ëŸ¬ìŠ¤í„°ëª… +label.host.MAC=호스트 MAC +label.agent.username=ì—ì´ì „트 사용ìžëª… +label.agent.password=ì—ì´ì „트 암호 +message.confirm.action.force.reconnect=현재 호스트를 ê°•ì œ 재접ì†í•˜ì‹œê² ìŠµë‹ˆê¹Œ? +label.resource.state=ìžì› ìƒíƒœ +label.LUN.number=LUN 번호 +message.confirm.remove.IP.range=현재 IP 주소 범위를 삭제하시겠습니까? +message.tooltip.zone.name=Zone ì´ë¦„입니다. +message.tooltip.dns.1=Zoneë‚´ VM 로 사용하는 DNS 서버 ì´ë¦„입니다. Zone 공개 IP 주소ì—서 ì´ ì„œë²„ì— í†µì‹ í•  수 있어야 합니다. +message.tooltip.dns.2=Zoneë‚´ VM 로 사용하는 ë‘번째 DNS 서버 ì´ë¦„입니다. Zone 공개 IP 주소ì—서 ì´ ì„œë²„ì— í†µì‹ í•  수 있어야 합니다. +message.tooltip.internal.dns.1=Zoneë‚´ CloudStack ë‚´ë¶€ 시스템 VM 로 사용하는 DNS 서버 ì´ë¦„입니다. Pod 사설 IP 주소ì—서 ì´ ì„œë²„ì— í†µì‹ í•  수 있어야 합니다. +message.tooltip.internal.dns.2=Zoneë‚´ CloudStack ë‚´ë¶€ 시스템 VM 로 사용하는 DNS 서버 ì´ë¦„입니다. Pod 사설 IP 주소ì—서 ì´ ì„œë²„ì— í†µì‹ í•  수 있어야 합니다. +message.tooltip.network.domain=DNS 서픽스입니다. ì´ ì„œí”½ìŠ¤ì—서 게스트 VM 로 ì ‘ê·¼ 하는 ë„¤íŠ¸ì›Œí¬ ë§žì¶¤í˜• ë„ë©”ì¸ëª…ì„ ë§Œë“­ë‹ˆë‹¤. +message.tooltip.pod.name=현재 Pod ì´ë¦„입니다. +message.tooltip.reserved.system.gateway=Podë‚´ 호스트 게ì´íŠ¸ì›¨ì´ìž…니다. +message.tooltip.reserved.system.netmask=Pod 서브네트워í¬ë¥¼ 정하는 ë„¤íŠ¸ì›Œí¬ í”„ë ˆí”½ìŠ¤ìž…ë‹ˆë‹¤. CIDR 표기를 사용합니다. +message.creating.zone=Zoneì„ ë§Œë“¤ì—ˆìŠµë‹ˆë‹¤. +message.creating.physical.networks=물리 네트워í¬ë¥¼ 만들었습니다. +message.configuring.physical.networks=물리 네트워í¬ë¥¼ 구성해 있습니다 +message.adding.Netscaler.device=Netscaler 기기를 추가하고 있습니다 +message.creating.pod=Pod를 만들었습니다. +message.configuring.public.traffic=공개 íŠ¸ëž˜í”½ì„ êµ¬ì„±í•´ 있습니다 +message.configuring.storage.traffic=스토리지 íŠ¸ëž˜í”½ì„ êµ¬ì„±í•´ 있습니다 +message.configuring.guest.traffic=게스트 íŠ¸ëž˜í”½ì„ êµ¬ì„±í•´ 있습니다 +message.creating.cluster=í´ëŸ¬ìŠ¤í„°ë¥¼ 만들었습니다. +message.adding.host=호스트를 추가하고 있습니다 +message.creating.primary.storage=기본 스토리지를 만들었습니다. +message.creating.secondary.storage=2ì°¨ 스토리지를 만들었습니다. +message.Zone.creation.complete=Zoneì„ ë§Œë“¤ì—ˆìŠµë‹ˆë‹¤. +message.enabling.zone=Zoneì„ ì‚¬ìš©í•˜ê³  있습니다 +error.something.went.wrong.please.correct.the.following=문제가 ë°œìƒí–ˆìŠµë‹ˆë‹¤. ë‹¤ìŒ ë‚´ìš©ì„ ìˆ˜ì •í•´ 주십시오 +error.could.not.enable.zone=Zoneì„ ì‚¬ìš© í•  수 없습니다. +message.zone.creation.complete.would.you.like.to.enable.this.zone=Zoneì„ ë§Œë“¤ì—ˆìŠµë‹ˆë‹¤. ì´ Zoneì„ ì‚¬ìš© 하시겠습니까? +message.please.add.at.lease.one.traffic.range=ì ì–´ë„ 한 ê°œ ì´ìƒ 트래픽 범위를 추가해 주십시오. +message.you.must.have.at.least.one.physical.network=ì ì–´ë„ 한 ê°œ ì´ìƒ 물리 네트워í¬ê°€ 필요합니다 +message.please.select.a.different.public.and.management.network.before.removing=ì‚­ì œ ì „ì— ë‹¤ë¥¸ 공개 ë° ê´€ë¦¬ 네트워í¬ë¥¼ ì„ íƒí•´ 주십시오. + +label.zone.type=Zone 종류 +label.setup.zone=Zone 설정 +label.setup.network=ë„¤íŠ¸ì›Œí¬ ì„¤ì • +label.add.resources=ìžì› 추가 +label.launch=시작 +label.set.up.zone.type=Zone 종류 설정 +message.please.select.a.configuration.for.your.zone=Zone êµ¬ì„±ì„ ì„ íƒí•´ 주십시오. +message.desc.basic.zone= ê° VM ì¸ìŠ¤í„´ìŠ¤ì— IP 주소가 네트워í¬ì—서 ì§ì ‘ 할당할 수 있는 ë‹¨ì¼ ë„¤íŠ¸ì›Œí¬ë¥¼ 제공합니다. 보안 그룹 (ì „ì†¡ì› IP 주소 í•„í„°)ê³¼ ê°™ì€ ì¸µ 세 가지 레벨 방법으로 게스트를 분리할 수 있습니다. +label.basic=기본 +message.desc.advanced.zone=보다 ì„¸ë ¨ëœ ë„¤íŠ¸ì›Œí¬ ê¸°ìˆ ì„ ì§€ì›í•©ë‹ˆë‹¤. ì´ ë„¤íŠ¸ì›Œí¬ ëª¨ë¸ì„ ì„ íƒí•˜ë©´, 보다 유연하게 게스트 네트워í¬ë¥¼ 정하고 방화벽(fire wall), VPN, ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 장치 기술 ì§€ì›ì™€ ê°™ì€ ì‚¬ìš©ìž ì§€ì • 한 ë„¤íŠ¸ì›Œí¬ ì œê³µì„ ì œê³µí•  수 있습니다. +label.advanced=확장 +message.desc.zone=Zoneì€ CloudStack 환경내 최대 ì¡°ì§ ë‹¨ìœ„ë¡œ ì›ëž˜ ë‹¨ì¼ ë°ì´í„° ì„¼í„°ì— í•´ë‹¹í•©ë‹ˆë‹¤. Zoneì— í•´ì„œ 물리ì ì¸ 분리와 ì¤‘ë³µì„±ì´ ì œê³µë©ë‹ˆë‹¤. Zoneì€ í•œ ê°œ ì´ìƒ Pod( ê° Pod는 호스트와 기본 스토리지 서버ì—서 구성)와 Zoneë‚´ 모든 Pod로 공유ë˜ëŠ” 2ì°¨ 스토리지 서버로 구성ë©ë‹ˆë‹¤. +label.physical.network=물리 ë„¤íŠ¸ì›Œí¬ +label.public.traffic=공개 트래픽 +label.guest.traffic=게스트 트래픽 +label.storage.traffic=스토리지 트래픽 +message.setup.physical.network.during.zone.creation=확장 Zoneì„ ì¶”ê°€í•  때는 한 ê°œ ì´ìƒ 물리 네트워í¬ë¥¼ 설정해야 합니다. ê° ë„¤íŠ¸ì›Œí¬ëŠ” 하ì´í¼ ë°”ì´ì €ìƒ 한 가지 ë„¤íŠ¸ì›Œí¬ ì¹´ë“œ(NIC)ì— ëŒ€ì‘합니다. ê° ë¬¼ë¦¬ 네트워í¬ì—서는 êµ¬ì„±ì— ì œí•œì´ ìžˆìœ¼ë‚˜, 한 가지 종류 ì´ìƒ íŠ¸ëž˜í”½ì„ í†µì‹ í•  수 있습니다.

ê° ë¬¼ë¦¬ 네트워í¬ì— 대해서트래픽 종류를 드래그 앤 드롭해 주십시오. +label.add.physical.network=물리 ë„¤íŠ¸ì›Œí¬ ì¶”ê°€ +label.traffic.types=트래픽 종류 +label.management=관리 +label.guest=게스트 +label.please.specify.netscaler.info=Netscaler 정보를 지정해 주십시오 +message.public.traffic.in.advanced.zone=í´ë¼ìš°ë“œ ë‚´ë¶€ VMì´ ì¸í„°ë„·ì— ì ‘ê·¼ 하면, 공개 íŠ¸ëž˜í”½ì´ ìƒì„±ë©ë‹ˆë‹¤. ì´ ë•Œë¬¸ì— ì¼ë°˜ì ìœ¼ë¡œ ì ‘ê·¼ 가능한 IP 주소를 할당할 필요가 있습니다. 최종 사용ìžëŠ” CloudStack ì‚¬ìš©ìž ì¸í„°íŽ˜ì´ìŠ¤ë¥¼ 사용해 ì´ëŸ¬í•œ IP 주소를 ì·¨ë“하고 ì†ë‹˜ 네트워í¬ì™€ 공개 ë„¤íŠ¸ì›Œí¬ ì‚¬ì´ì— NAT를 구현할 수 있습니다.

ì¸í„°ë„· íŠ¸ëž˜í”½ì„ ìœ„í•´ ì ì–´ë„ 한 ê°œ ì´ìƒ IP 주소 범위를 입력해 주십시오. +message.public.traffic.in.basic.zone=í´ë¼ìš°ë“œ ë‚´ë¶€ VMì´ ì¸í„°ë„·ì— ì ‘ê·¼ í•  때 ì¸í„°ë„· 경유로 í´ë¼ì´ì–¸íŠ¸ì— ì„œë¹„ìŠ¤ë¥¼ 제공하면, 공개 íŠ¸ëž˜í”½ì´ ìƒì„±ë©ë‹ˆë‹¤. ì´ ë•Œë¬¸ì— ì¼ë°˜ì ìœ¼ë¡œ ì ‘ê·¼ 가능한 IP 주소를 할당할 필요가 있습니다. ì¸ìŠ¤í„´ìŠ¤ë¥¼ 만들기하면, 게스트 IP 주소 외ì—ì´ ê³µê°œ IP 주소 범위ì—서 주소가 í•˜ë‚˜ì˜ ì¸ìŠ¤í„´ìŠ¤ì— í• ë‹¹í•  수 있습니다. 공개 IP 주소와 게스트 IP 주소 사ì´ì— ì •ì ì¸ 1대 1 NATê°€ ìžë™ìœ¼ë¡œ 설정 ë©ë‹ˆë‹¤. 최종 사용ìžëŠ” CloudStack ì‚¬ìš©ìž ì¸í„°íŽ˜ì´ìŠ¤ë¥¼ 사용해 추가 IP 주소를 ì·¨ë“하고 ì¸ìŠ¤í„´ìŠ¤ì™€ 공개 IP 주소 사ì´ì— ì •ì  NAT를 구현할 ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. +message.add.pod.during.zone.creation= ê° Zoneì—는 한 ê°œ ì´ìƒ Podê°€ 필요합니다. 지금 여기서 첫번째 Pod를 추가합니다. Pod는 호스트와 기본 스토리지 서버ì—서 구성합니다만 ì´ëŠ” ë‹¤ìŒ ìˆœì„œë¡œ 추가합니다. 맨 ì²˜ìŒ CloudStack ë‚´ë¶€ 관리 íŠ¸ëž˜í”½ì„ ìœ„í•´ì„œ IP 주소 범위를 예약합니다. IP 주소 범위는 í´ë¼ìš°ë“œ ë‚´ë¶€ ê° Zoneì—서 중복 하지 않게 예약할 필요가 있습니다. +message.guest.traffic.in.advanced.zone=ì†ë‹˜ ë„¤íŠ¸ì›Œí¬ íŠ¸ëž˜í”½ì€ ìµœì¢… ì‚¬ìš©ìž ê°€ìƒ ë¨¸ì‹ ê°„ 통신입니다. ê° ë¬¼ë¦¬ ë„¤íŠ¸ì›Œí¬ ê²ŒìŠ¤íŠ¸ íŠ¸ëž˜í”½ì„ í†µì‹ í•˜ê¸° 위한 VLAN ID 범위를 지정해 주십시오. +message.guest.traffic.in.basic.zone=ì†ë‹˜ ë„¤íŠ¸ì›Œí¬ íŠ¸ëž˜í”½ì€ ìµœì¢… 사용ìžì˜ ê°€ìƒ ë¨¸ì‹ ê°„ 통신입니다. CloudStackì— ê²ŒìŠ¤íŠ¸ VMì— í• ë‹¹í•  수 있는 IP 주소 범위를 지정해 주십시오.ì´ ë²”ìœ„ê°€ 예약 ë난 시스템 IP 주소 범위와 중복 하지 않게 주ì˜í•´ 주십시오. +message.storage.traffic=호스트나 CloudStack 시스템 VM 등 관리 서버와 통신하는 CloudStack ë‚´ë¶€ ìžì›ê°„ 트래픽입니다. 여기서 스토리지 íŠ¸ëž˜í”½ì„ êµ¬ì„±í•´ 주십시오. +message.desc.cluster= ê° Podì—는 한 ê°œ ì´ìƒ í´ëŸ¬ìŠ¤í„°ê°€ 필요합니다. 지금 여기서 최초 í´ëŸ¬ìŠ¤í„°ë¥¼ 추가합니다. í´ëŸ¬ìŠ¤í„°ëŠ” 호스트를 그룹화 하는 방법입니다. 한 í´ëŸ¬ìŠ¤í„° ë‚´ë¶€ 호스트는 ëª¨ë‘ ë™ì¼í•œ 하드웨어ì—서 구성ë˜ì–´ ê°™ì€ í•˜ì´í¼ ë°”ì´ì €ë¥¼ 실행하고 ê°™ì€ ì„œë¸Œ 네트워í¬ìƒì— 있어 ê°™ì€ ê³µìœ  ìŠ¤í† ë¦¬ì§€ì— ì ‘ê·¼ 합니다. ê° í´ëŸ¬ìŠ¤í„°ëŠ” 한 ê°œ ì´ìƒ 호스트와 한 ê°œ ì´ìƒ 기본 스토리지 서버ì—서 구성ë©ë‹ˆë‹¤. +message.desc.host= ê° í´ëŸ¬ìŠ¤í„°ì—는 ì ì–´ë„ 한 ê°œ ì´ìƒ 게스트 VM를 실행하기 위한 호스트 (컴퓨터)ê°€ 필요합니다. 지금 여기서 첫번째 호스트를 추가합니다. CloudStack으로 호스트를 ë™ìž‘하려면 호스트ì—게 하ì´í¼ ë°”ì´ì €ë¥¼ 설치하고 IP 주소를 할당해 호스트가 CloudStack 관리 ì„œë²„ì— ì ‘ì†í•˜ë„ë¡ í•©ë‹ˆë‹¤.

호스트 DNS 명 ë˜ëŠ” IP 주소, 사용ìžëª…(ì›ëž˜ root)ê³¼ 암호 ë° í˜¸ìŠ¤íŠ¸ ë¶„ë¥˜ì— ì‚¬ìš©í•˜ëŠ” ë¼ë²¨ì„ 입력해 주십시오. +message.desc.primary.storage= ê° í´ëŸ¬ìŠ¤í„°ì—는 ì ì–´ë„ 한 ê°œ ì´ìƒì˜ 기본 스토리지 서버가 필요합니다. 지금 여기서 첫번째 서버를 추가합니다. 기본 스토리지는 í´ëŸ¬ìŠ¤í„° ë‚´ ë¶€ 호스트ìƒì—서 ë™ìž‘하는 모든 VM ë””ìŠ¤í¬ ë³¼ë¥¨ì„ í¬í•¨í•©ë‹ˆë‹¤. 기본ì ìœ¼ë¡œ 하ì´í¼ ë°”ì´ì €ì—서 기술 ì§€ì›ë˜ëŠ” í‘œì¤€ì— ì¤€ê±°í•œ í”„ë¡œí† ì½œì„ ì‚¬ìš©í•´ 주십시오. +message.desc.secondary.storage= ê° Zoneì—는 ì ì–´ë„ 한 ê°œ ì´ìƒì˜ NFS 즉 2ì°¨ 스토리지 서버가 필요합니다. 지금 여기서 첫번째 서버를 추가합니다. 2ì°¨ 스토리지는 VM 템플릿, ISO ì´ë¯¸ì§€ ë° VM ë””ìŠ¤í¬ ë³¼ë¥¨ ìŠ¤ëƒ…ìƒ·ì„ í¬í•¨í•©ë‹ˆë‹¤. ì´ ì„œë²„ëŠ” Zoneë‚´ 모든 호스트ì—서 사용할 수 있어야 합니다.

IP 주소와 내보내낼 경로를 입력해 주십시오. +label.launch.zone=Zone 시작 +message.please.wait.while.zone.is.being.created=Zoneì´ ë§Œë“¤ê¸°ë  ë•Œê¹Œì§€ ìž ê¹ ê¸°ë‹¤ë ¤ 주십시오... + +label.load.balancing=ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 +label.static.nat.enabled=ì •ì  NAT 유효 +label.zones=Zone +label.view.more=ìƒì„¸ 표시 +label.number.of.zones=Zone수 +label.number.of.pods=Pod수 +label.number.of.clusters=í´ëŸ¬ìŠ¤í„°ìˆ˜ +label.number.of.hosts=호스트수 +label.total.hosts=호스트 합계 +label.total.CPU=CPU 합계 +label.total.memory=메모리 합계 +label.total.storage=스토리지 합계 +label.purpose=ëª©ì  + +label.action.migrate.router=ë¼ìš°í„° ì´ì „ +label.action.migrate.router.processing=ë¼ìš°í„°ë¥¼ ì´ì „하는 중... +message.migrate.router.confirm=ë¼ìš°í„° ì´ì „ 위치로 호스트를 ì„ íƒì‹­ì‹œì˜¤. +label.migrate.router.to=ë¼ìš°í„° ì´ì „ 위치: + +label.action.migrate.systemvm=시스템 VM ì´ì „ +label.action.migrate.systemvm.processing=시스템 VM를 ì´ì „하는 중 +message.migrate.systemvm.confirm=시스템 VM ì´ì „ ì´ì „ 위치로 호스트를 ì„ íƒì‹­ì‹œì˜¤. +label.migrate.systemvm.to=시스템 VM ì´ì „ 위치: + +mode=모드 +side.by.side=병렬 +inline=ì§ë ¬ + +extractable=추출 가능 + +label.ocfs2=OCFS2 + +label.action.edit.host=호스트 편집 + +network.rate=ë„¤íŠ¸ì›Œí¬ ì†ë„ + +ICMP.type=ICMP 종류 +ICMP.code=ICMP 코드 + +image.directory=ì´ë¯¸ì§€ 디렉토리 + +label.action.create.template.from.vm=VMì—서 템플릿 만들기 +label.action.create.template.from.volume=볼륨ì—서 템플릿 만들기 + +message.vm.create.template.confirm=템플릿 만들기하면 VMì´ ìžë™ìœ¼ë¡œ 재시작ë©ë‹ˆë‹¤. + +label.action.manage.cluster=í´ëŸ¬ìŠ¤í„° 관리 ë™ìž‘ +message.action.manage.cluster=í´ëŸ¬ìŠ¤í„°ë¥¼ 관리 대ìƒìœ¼ë¡œ 하시겠습니까? +label.action.manage.cluster.processing=í´ëŸ¬ìŠ¤í„°ë¥¼ 관리 대ìƒìœ¼ë¡œ 하는 중... + +label.action.unmanage.cluster=í´ëŸ¬ìŠ¤í„° 비관리 ë™ìž‘ +message.action.unmanage.cluster=í´ëŸ¬ìŠ¤í„°ë¥¼ 비관리 대ìƒìœ¼ë¡œ 하시겠습니까? +label.action.unmanage.cluster.processing=í´ëŸ¬ìŠ¤í„°ë¥¼ 비관리 대ìƒìœ¼ë¡œ 하는 중... + +label.allocation.state=할당 ìƒíƒœ +managed.state=관리 ëŒ€ìƒ ìƒíƒœ + +label.default.use=기본 사용 +label.host.tags=호스트 태그 + +label.cidr=CIDR +label.cidr.list=ì „ì†¡ì› CIDR + +label.storage.tags=스토리지 태그 + +label.redundant.router=중복 ë¼ìš°í„° +label.is.redundant.router=중복 + +force.delete=ê°•ì œ ì‚­ì œ +force.delete.domain.warning=경고:ì´ ì˜µì…˜ì„ ì„ íƒí•˜ë©´, 모든 ë‚´ë¶€ ë„ë©”ì¸ ë° ê´€ë ¨í•˜ëŠ” 모든 계정 정보와 ê·¸ ìžì›ì´ ì‚­ì œë©ë‹ˆë‹¤. + +force.remove=ê°•ì œ í•´ì œ +force.remove.host.warning=경고:ì´ ì˜µì…˜ì„ ì„ íƒí•˜ë©´, 실행중 모든 ê°€ìƒ ë¨¸ì‹ ì´ ê°•ì œì ìœ¼ë¡œ ì •ì§€ë˜ì–´ í´ëŸ¬ìŠ¤í„°ì—서 호스트가 ê°•ì œì ìœ¼ë¡œ í•´ì œë©ë‹ˆë‹¤. + +force.stop=ê°•ì œ ì •ì§€ +force.stop.instance.warning=경고: ì¸ìŠ¤í„´ìŠ¤ ê°•ì œ 정지는 최종 수단으로 í•´ 주십시오. ë°ì´í„°ê°€ ì†ì‹¤ë  ë¿ë§Œ ì•„ë‹ˆë¼ ê°€ìƒ ë¨¸ì‹  ë™ìž‘ì´ ì¼ê´€í•˜ì§€ 않게 ë  ê°€ëŠ¥ì„±ì´ ìžˆìŠµë‹ˆë‹¤. + +label.PreSetup=PreSetup +label.SR.name = SR 명 ë¼ë²¨ +label.SharedMountPoint=SharedMountPoint +label.clvm=CLVM +label.volgroup=볼륨 그룹 +label.VMFS.datastore=VMFS ë°ì´í„° 스토어 + +label.network.device=ë„¤íŠ¸ì›Œí¬ ê¸°ê¸° +label.add.network.device=ë„¤íŠ¸ì›Œí¬ ê¸°ê¸° 추가 +label.network.device.type=ë„¤íŠ¸ì›Œí¬ ê¸°ê¸° 종류 +label.DHCP.server.type=DHCP 서버 종류 +label.Pxe.server.type=PXE 서버 종류 +label.PING.storage.IP=PING ëŒ€ìƒ ìŠ¤í† ë¦¬ì§€ IP 주소 +label.PING.dir=PING 디렉토리 +label.TFTP.dir=TFTP 디렉토리 +label.PING.CIFS.username=PING CIFS 사용ìžëª… +label.PING.CIFS.password=PING CIFS 암호 +label.CPU.cap=CPU 제한 + + +label.action.enable.zone=Zone 사용함 +label.action.enable.zone.processing=Zoneì„ ì‚¬ìš© 설정 중... +message.action.enable.zone=현재 Zoneì„ ì‚¬ìš© 하시겠습니까? +label.action.disable.zone=Zone 사용 안 함 +label.action.disable.zone.processing=Zoneì„ ì‚¬ìš© 안 함으로 설정 중... +message.action.disable.zone=현재 Zoneì„ ì‚¬ìš© 안 함으로 하시겠습니까? + +label.action.enable.pod=Pod 사용함 +label.action.enable.pod.processing=Pod를 사용 설정 중... +message.action.enable.pod=현재 Pod를 사용 하시겠습니까? +label.action.disable.pod=Pod 사용 안 함 +label.action.disable.pod.processing=Pod를 사용 안 함으로 설정 중... +message.action.disable.pod=현재 Pod를 사용 안 함으로 하시겠습니까? + +label.action.enable.cluster=í´ëŸ¬ìŠ¤í„° 사용함 +label.action.enable.cluster.processing=í´ëŸ¬ìŠ¤í„°ë¥¼ 사용 설정 중... +message.action.enable.cluster=현재 í´ëŸ¬ìŠ¤í„°ë¥¼ 사용 하시겠습니까? +label.action.disable.cluster=í´ëŸ¬ìŠ¤í„° 사용 안 함 +label.action.disable.cluster.processing=í´ëŸ¬ìŠ¤í„°ë¥¼ 사용 안 함으로 설정 중... +message.action.disable.cluster=현재 í´ëŸ¬ìŠ¤í„°ë¥¼ 사용 안 함으로 하시겠습니까? + +label.account.id=계정 ì •ë³´ ID +label.account.name=계정 정보명 +label.account.specific=계정 ì •ë³´ 고유 +label.account=계정 ì •ë³´ +label.accounts=계정 ì •ë³´ +label.acquire.new.ip=새로운 IP 주소 ì·¨ë“ +label.show.ingress.rule=수신 규칙 표시 +label.hide.ingress.rule=수신 ê·œì¹™ì„ ìˆ¨ê¸°ê¸° +label.action.attach.disk.processing=디스í¬ë¥¼ 연결하는 중... +label.action.attach.disk=ë””ìŠ¤í¬ ì—°ê²° +label.action.attach.iso.processing=ISO를 연결하는 중... +label.action.attach.iso=ISO ì—°ê²° +label.action.cancel.maintenance.mode.processing=유지 보수 모드를 취소하는 중... +label.action.cancel.maintenance.mode=유지 보수 모드 취소 +label.action.change.password=암호 변경 +label.action.change.service.processing=서비스를 변경하는 중... +label.action.change.service=서비스 변경 +label.action.copy.ISO.processing=ISO를 복사하는 중... +label.action.copy.ISO=ISO 복사 +label.action.copy.template.processing=í…œí”Œë¦¿ì„ ë³µì‚¬í•˜ëŠ” 중... +label.action.copy.template=템플릿 복사 +label.action.create.template.processing=í…œí”Œë¦¿ì„ ë§Œë“œëŠ” 중... +label.action.create.template=템플릿 만들기 +label.action.create.vm.processing=VM를 만드는 중... +label.action.create.vm=VM 만들기 +label.action.create.volume.processing=ë³¼ë¥¨ì„ ë§Œë“œëŠ” 중... +label.action.create.volume=볼륨 만들기 +label.action.delete.IP.range.processing=IP 주소 범위를 삭제하는 중... +label.action.delete.IP.range=IP 주소 범위 ì‚­ì œ +label.action.delete.ISO.processing=ISO를 삭제하는 중... +label.action.delete.ISO=ISO ì‚­ì œ +label.action.delete.account.processing=계정 정보를 삭제하는 중... +label.action.delete.account=계정 ì •ë³´ ì‚­ì œ +label.action.delete.cluster.processing=í´ëŸ¬ìŠ¤í„°ë¥¼ 삭제하는 중... +label.action.delete.cluster=í´ëŸ¬ìŠ¤í„° ì‚­ì œ +label.action.delete.disk.offering.processing=ë””ìŠ¤í¬ ì œê³µì„ ì‚­ì œí•˜ëŠ” 중... +label.action.delete.disk.offering=ë””ìŠ¤í¬ ì œê³µ ì‚­ì œ + +label.action.update.resource.count=ìžì› 수 ì—…ë°ì´íЏ +label.action.update.resource.count.processing=ìžì› 수를 ì—…ë°ì´íŠ¸í•˜ëŠ” 중... + +label.action.delete.domain=ë„ë©”ì¸ ì‚­ì œ +label.action.delete.domain.processing=ë„ë©”ì¸ì„ 삭제하는 중... + +label.action.delete.firewall.processing=방화벽(fire wall)를 삭제하는 중... +label.action.delete.firewall=방화벽(fire wall) 규칙 ì‚­ì œ +label.action.delete.ingress.rule.processing=수신 ê·œì¹™ì„ ì‚­ì œí•˜ëŠ” 중... +label.action.delete.ingress.rule=수신 규칙 ì‚­ì œ +label.action.delete.load.balancer.processing=ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 장치를 삭제하는 중... +label.action.delete.load.balancer=ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 규칙 ì‚­ì œ +label.action.edit.network.processing=네트워í¬ë¥¼ 편집하는 중... +label.action.edit.network=ë„¤íŠ¸ì›Œí¬ íŽ¸ì§‘ +label.action.delete.network.processing=네트워í¬ë¥¼ 삭제하는 중... +label.action.delete.network=ë„¤íŠ¸ì›Œí¬ ì‚­ì œ +label.action.delete.pod.processing=Pod를 삭제하는 중... +label.action.delete.pod=Pod ì‚­ì œ +label.action.delete.primary.storage.processing=기본 스토리지를 삭제하는 중... +label.action.delete.primary.storage=기본 스토리지 ì‚­ì œ +label.action.delete.secondary.storage.processing=2ì°¨ 스토리지를 삭제하는 중... +label.action.delete.secondary.storage=2ì°¨ 스토리지 ì‚­ì œ +label.action.delete.security.group.processing=보안 ê·¸ë£¹ì„ ì‚­ì œí•˜ëŠ” 중... +label.action.delete.security.group=보안 그룹 ì‚­ì œ +label.action.delete.service.offering.processing=ì„œë¹„ìŠ¤ì œê³µì„ ì‚­ì œí•˜ëŠ” 중... +label.action.delete.service.offering=서비스제공 ì‚­ì œ +label.action.delete.snapshot.processing=ìŠ¤ëƒ…ìƒ·ì„ ì‚­ì œí•˜ëŠ” 중... +label.action.delete.snapshot=스냅샷 ì‚­ì œ +label.action.delete.template.processing=í…œí”Œë¦¿ì„ ì‚­ì œí•˜ëŠ” 중... +label.action.delete.template=템플릿 ì‚­ì œ +label.action.delete.user.processing=사용ìžë¥¼ 삭제하는 중... +label.action.delete.user=ì‚¬ìš©ìž ì‚­ì œ +label.action.delete.volume.processing=ë³¼ë¥¨ì„ ì‚­ì œí•˜ëŠ” 중... +label.action.delete.volume=볼륨 ì‚­ì œ +label.action.delete.zone.processing=Zoneì„ ì‚­ì œí•˜ëŠ” 중... +label.action.delete.zone=Zone ì‚­ì œ +label.action.destroy.instance.processing=ì¸ìŠ¤í„´ìŠ¤ë¥¼ 파기하는 중... +label.action.destroy.instance=ì¸ìŠ¤í„´ìŠ¤ 파기 +label.action.destroy.systemvm.processing=시스템 VM를 파기하는 중... +label.action.destroy.systemvm=시스템 VM 파기 +label.action.detach.disk.processing=디스í¬ë¥¼ 분리 하는 중... +label.action.detach.disk=ë””ìŠ¤í¬ ë¶„ë¦¬ +label.action.detach.iso.processing=ISO를 분리 하는 중... +label.action.detach.iso=ISO 분리 +label.action.disable.account.processing=계정 정보를 중지하는 중... +label.action.disable.account=계정 ì •ë³´ 중지 +label.action.disable.static.NAT.processing=ì •ì  NAT를 중지하는 중... +label.action.disable.static.NAT=ì •ì  NAT 사용 안 함 +label.action.disable.user.processing=사용ìžë¥¼ 중지하는 중... +label.action.disable.user=ì‚¬ìš©ìž ì¤‘ì§€ +label.action.download.ISO=ISO 다운로드 +label.action.download.template=템플릿 다운로드 +label.action.download.volume.processing=ë³¼ë¥¨ì„ ë‹¤ìš´ë¡œë“œí•˜ëŠ” 중... +label.action.download.volume=볼륨 다운로드 +label.action.edit.ISO=ISO 편집 +label.action.edit.account=계정 ì •ë³´ 편집 +label.action.edit.disk.offering=ë””ìŠ¤í¬ ì œê³µ 편집 +label.action.edit.domain=ë„ë©”ì¸ íŽ¸ì§‘ +label.action.edit.global.setting=글로벌 설정 편집 +label.action.edit.instance=ì¸ìŠ¤í„´ìŠ¤ 편집 +label.action.edit.network.offering=ë„¤íŠ¸ì›Œí¬ ì œê³µ 편집 +label.action.edit.pod=Pod 편집 +label.action.edit.primary.storage=기본 스토리지 편집 +label.action.edit.resource.limits=ìžì› 제한 편집 +label.action.edit.service.offering=서비스 제공 편집 +label.action.edit.template=템플릿 편집 +label.action.edit.user=ì‚¬ìš©ìž íŽ¸ì§‘ +label.action.edit.zone=Zone 편집 +label.action.enable.account.processing=계정 정보를 사용 설정 중... +label.action.enable.account=계정 ì •ë³´ 사용함 +label.action.enable.maintenance.mode.processing=유지 보수 모드를 사용 설정 중... +label.action.enable.maintenance.mode=유지 보수 모드 사용함 +label.action.enable.static.NAT.processing=ì •ì  NAT를 사용 설정 중... +label.action.enable.static.NAT=ì •ì  NAT 사용함 +label.action.enable.user.processing=사용ìžë¥¼ 사용 설정 중... +label.action.enable.user=ì‚¬ìš©ìž ì‚¬ìš©í•¨ +label.action.force.reconnect.processing=재접ì†í•˜ëŠ” 중... +label.action.force.reconnect=ê°•ì œìž¬ì ‘ì† +label.action.generate.keys.processing=키를 ìƒì„±í•˜ëŠ” 중... +label.action.generate.keys=키 ìƒì„± +label.action.lock.account.processing=계정 정보를 잠그는 중... +label.action.lock.account=계정 ì •ë³´ 잠금 +label.action.migrate.instance=ì¸ìŠ¤í„´ìŠ¤ ì´ì „ +label.action.migrate.instance.processing=ì¸ìŠ¤í„´ìŠ¤ë¥¼ ì´ì „하는 중... +label.action.reboot.instance.processing=ì¸ìŠ¤í„´ìŠ¤ë¥¼ 재시작하는 중... +label.action.reboot.instance=ì¸ìŠ¤í„´ìŠ¤ 재시작 +label.action.reboot.router.processing=ë¼ìš°í„°ë¥¼ 재시작하는 중... +label.action.reboot.router=ë¼ìš°í„° 재시작 +label.action.reboot.systemvm.processing=시스템 VM를 재시작하는 중... +label.action.reboot.systemvm=시스템 VM 재시작 +label.action.recurring.snapshot=정기 스냅샷 +label.action.release.ip.processing=IP 주소를 해제하는 중... +label.action.release.ip=IP 주소 í•´ì œ +label.action.remove.host.processing=호스트를 삭제하는 중... +label.action.remove.host=호스트 ì‚­ì œ +label.action.reset.password.processing=암호를 재설정 하는 중... +label.action.reset.password=암호 재설정 +label.action.resource.limits=ìžì› 제한 +label.action.restore.instance.processing=ì¸ìŠ¤í„´ìŠ¤ë¥¼ ë³µì›í•˜ëŠ” 중... +label.action.restore.instance=ì¸ìŠ¤í„´ìŠ¤ ë³µì› +label.action.start.instance.processing=ì¸ìŠ¤í„´ìŠ¤ë¥¼ 시작하는 중... +label.action.start.instance=ì¸ìŠ¤í„´ìŠ¤ 시작 +label.action.start.router.processing=ë¼ìš°í„°ë¥¼ 시작하는 중... +label.action.start.router=ë¼ìš°í„° 시작 +label.action.start.systemvm.processing=시스템 VM를 시작하는 중... +label.action.start.systemvm=시스템 VM 시작 +label.action.stop.instance.processing=ì¸ìŠ¤í„´ìŠ¤ë¥¼ 정지하는 중... +label.action.stop.instance=ì¸ìŠ¤í„´ìŠ¤ ì •ì§€ +label.action.stop.router.processing=ë¼ìš°í„°ë¥¼ 정지하는 중... +label.action.stop.router=ë¼ìš°í„° ì •ì§€ +label.action.stop.systemvm.processing=시스템 VM를 정지하는 중... +label.action.stop.systemvm=시스템 VM ì •ì§€ +label.action.take.snapshot.processing=ìŠ¤ëƒ…ìƒ·ì„ ë§Œë“œëŠ” 중.... +label.action.take.snapshot=스냅샷 만들기 +label.action.update.OS.preference.processing=OS 기본 ì„¤ì •ì„ ì—…ë°ì´íŠ¸í•˜ëŠ” 중... +label.action.update.OS.preference=OS 기본 설정 ì—…ë°ì´íЏ +label.actions=작업 +label.active.sessions=활성 세션 +label.add.account=계정 ì •ë³´ 추가 +label.add.by.cidr=CIDR 로 추가 +label.add.by.group=그룹ì—서 추가 +label.add.cluster=í´ëŸ¬ìŠ¤í„° 추가 +label.add.direct.iprange=ì§ì ‘ IP 주소 범위 추가 +label.add.disk.offering=ë””ìŠ¤í¬ ì œê³µ 추가 +label.add.domain=ë„ë©”ì¸ ì¶”ê°€ +label.add.firewall=방화벽(fire wall) 규칙 추가 +label.add.host=호스트 추가 +label.add.ingress.rule=수신 규칙 추가 +label.add.ip.range=IP 주소 범위 추가 +label.add.load.balancer=ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 장치 추가 +label.add.more=다른 항목 추가 +label.add.network=ë„¤íŠ¸ì›Œí¬ ì¶”ê°€ +label.add.pod=Pod 추가 +label.add.primary.storage=기본 스토리지 추가 +label.add.secondary.storage=2ì°¨ 스토리지 추가 +label.add.security.group=보안 그룹 추가 +label.add.service.offering=서비스제공 추가 +label.add.template=템플릿 추가 +label.add.user=ì‚¬ìš©ìž ì¶”ê°€ +label.add.vlan=VLAN 추가 +label.add.volume=볼륨 추가 +label.add.zone=Zone 추가 +label.add=추가 +label.adding.cluster=í´ëŸ¬ìŠ¤í„°ë¥¼ 추가중... +label.adding.failed=추가할 수 ì—†ìŒ +label.adding.pod=Pod를 추가 가능 +label.adding.processing=추가하는 중... +label.adding.succeeded=추가 완료 +label.adding.user=ì‚¬ìš©ìž ì¶”ê°€ +label.adding.zone=Zone 추가 +label.adding=ì •ë³´ 추가 +label.additional.networks=추가 ë„¤íŠ¸ì›Œí¬ +label.admin.accounts=ê´€ë¦¬ìž ê³„ì • ì •ë³´ +label.admin=ê´€ë¦¬ìž +label.advanced.mode=확장 모드 +label.advanced.search=ê³ ë„ ê²€ìƒ‰ +label.advanced=확장 +label.alert=알림 ì²´ì œ +label.algorithm=알고리즘 +label.allocated=할당 완료 ìƒíƒœ +label.api.key=API 키 +label.assign.to.load.balancer=ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 ìž¥ì¹˜ì— ì¸ìŠ¤í„´ìŠ¤ë¥¼ 할당 +label.assign=할당 +label.associated.network.id=관련 ë„¤íŠ¸ì›Œí¬ ID +label.attached.iso=ì—°ê²° ISO +label.availability.zone=ì´ìš© 가능 Zone +label.availability=가용성 +label.available.public.ips=사용 가능 공개 IP 주소 +label.available=사용 가능 +label.back=뒤로 +label.basic.mode=기본 모드 +label.bootable=부팅 가능 +label.broadcast.domain.type=브로드ìºìŠ¤íŠ¸ ë„ë©”ì¸ ì¢…ë¥˜ +label.by.account=계정 ì •ë³´ +label.by.availability=가용성 +label.by.domain=ë„ë©”ì¸ +label.by.end.date=ì¢…ë£Œì¼ +label.by.level=레벨 +label.by.pod=Pod +label.by.role=ì—­í•  +label.by.start.date=ì‹œìž‘ì¼ +label.by.state=ìƒíƒœ +label.by.traffic.type=트래픽 종류 +label.by.type.id=종류 ID +label.by.type=종류 +label.by.zone=Zone +label.bytes.received=수신 ë°”ì´íЏ +label.bytes.sent=전송 ë°”ì´íЏ +label.cancel=취소 +label.certificate=ì¸ì¦ì„œ +label.privatekey=PKC#8 비밀 키 +label.domain.suffix=DNS ë„ë©”ì¸ (예: xyz.com) +label.character=ë¬¸ìž +label.cidr.account=CIDR ë˜ëŠ” 계정 ì •ë³´/보안 그룹 +label.close=닫기 +label.cloud.console=í´ë¼ìš°ë“œ 관리 콘솔 +label.cloud.managed=Cloud.com 관리 +label.cluster.type=í´ëŸ¬ìŠ¤í„° 종류 +label.cluster=í´ëŸ¬ìŠ¤í„° +label.code=코드 +label.confirmation=í™•ì¸ +label.cpu.allocated.for.VMs=VMì— í• ë‹¹ 완료 CPU +label.cpu.allocated=할당 완료 CPU +label.cpu.utilized=CPU 사용율 +label.cpu=CPU +label.created=ì¼ì‹œ 만들기 +label.cross.zones=í¬ë¡œìФ ì¡´ +label.custom.disk.size=맞춤 ë””ìŠ¤í¬ í¬ê¸° +label.daily=ë§¤ì¼ +label.data.disk.offering=ë°ì´íƒ€ ë””ìŠ¤í¬ ì œê³µ +label.date=ë‚ ì§œ +label.day.of.month=매월 ì§€ì •ì¼ +label.day.of.week=매주 ì§€ì •ì¼ +label.delete=ì‚­ì œ +label.deleting.failed=삭제할 수 ì—†ìŒ +label.deleting.processing=삭제하는 중... +label.description=설명 +label.detaching.disk=디스í¬ë¥¼ 분리함 +label.details=ìƒì„¸ +label.device.id=기기 ID +label.disabled=사용 안함 +label.disabling.vpn.access=VPN 접근를 사용 안 함으로 설정 중 +label.disk.allocated=할당 완료 ë””ìŠ¤í¬ +label.disk.offering=ë””ìŠ¤í¬ ì œê³µ +label.disk.size.gb=ë””ìŠ¤í¬ í¬ê¸°(GB 단위) +label.disk.size=ë””ìŠ¤í¬ í¬ê¸° +label.disk.total=ë””ìŠ¤í¬ í•©ê³„ +label.disk.volume=ë””ìŠ¤í¬ ë³¼ë¥¨ +label.display.text=표시 í…스트 +label.dns.1=DNS 1 +label.dns.2=DNS 2 +label.domain.admin=ë„ë©”ì¸ ê´€ë¦¬ìž +label.domain.id=ë„ë©”ì¸ ID +label.domain.name=ë„ë©”ì¸ëª… +label.domain=ë„ë©”ì¸ +label.double.quotes.are.not.allowed=í° ë”°ì˜´í‘œ 사용할 수 ì—†ìŒ +label.download.progress=다운로드 ì§„í–‰ 사항 +label.edit=편집 +label.email=ì „ìž ë©”ì¼ +label.enabling.vpn.access=VPN 접근를 사용 하고 ìžˆìŒ +label.enabling.vpn=VPN를 사용 하고 ìžˆìŒ +label.end.port=종료 í¬í†  +label.endpoint.or.operation=엔드 í¬ì¸íЏ ë˜ëŠ” 작업 +label.error.code=오류 코드 +label.error=오류 +label.esx.host=ESX/ESXi 호스트 +label.example=예 +label.failed=실패 +label.featured=추천 +label.firewall=방화벽(fire wall) +label.first.name=ì´ë¦„ +label.format=í˜•ì‹ +label.friday=ê¸ˆìš”ì¼ +label.full=ì „ì²´ +label.gateway=게ì´íŠ¸ì›¨ì´ +label.general.alerts=ì¼ë°˜ 알림 ì²´ì œ +label.generating.url=URL를 ìƒì„±í•˜ê³  ìžˆìŒ +label.go.step.2=단계 2으로 +label.go.step.3=단계 3으로 +label.go.step.4=단계 4으로 +label.go.step.5=단계 5으로 +label.group.optional=그룹(옵션) +label.group=그룹 +label.guest.cidr=게스트 CIDR +label.guest.gateway=게스트 게ì´íŠ¸ì›¨ì´ +label.guest.ip.range=게스트 IP 주소 범위 +label.guest.ip=게스트 IP 주소 +label.guest.netmask=게스트 ë„· ë§ˆìŠ¤í¬ +label.ha.enabled=고가용성 사용함 +label.help=ë„ì›€ë§ +label.host.alerts=호스트 알림 체계 +label.host.name=호스트명 +label.host=호스트 +label.hosts=호스트 +label.hourly=매시간 +label.hypervisor.type=하ì´í¼ ë°”ì´ì € 종류 +label.hypervisor=하ì´í¼ ë°”ì´ì € +label.id=ID +label.info=ì •ë³´ +label.ingress.rule=수신 규칙 +label.initiated.by=시작 ì‚¬ìš©ìž +label.instance.limits=ì¸ìŠ¤í„´ìŠ¤ 제한 +label.instance.name=ì¸ìŠ¤í„´ìŠ¤ëª… +label.instance=ì¸ìŠ¤í„´ìŠ¤ +label.instances=ì¸ìŠ¤í„´ìŠ¤ +label.internal.dns.1=ë‚´ë¶€ DNS 1 +label.internal.dns.2=ë‚´ë¶€ DNS 2 +label.interval.type=간격 종류 +label.invalid.integer=유효하지 ì•Šì€ ì •ìˆ˜ê°’ +label.invalid.number=유효하지 ì•Šì€ ìˆ«ìžê°’ +label.ip.address=IP 주소 +label.ip.allocations=IP 주소 할당 +label.ip.limits=공개 IP 주소 제한 +label.ip.or.fqdn=IP 주소 ë˜ëŠ” FQDN +label.ip.range=IP 주소 범위 +label.ip=IP +label.ips=IP +label.is.default=기본 +label.is.shared=공유 +label.is.system=시스템 +label.iscsi=iSCSI +label.iso.boot=ISO 시작 +label.iso=ISO +label.isolation.mode=분리 모드 +label.keep=유지 +label.lang.chinese=중국어(ê°„ì²´) +label.lang.english=ì˜ì–´ +label.lang.japanese=ì¼ë³¸ì–´ +label.lang.korean=한국어 +label.lang.spanish=스페ì¸ì–´ +label.last.disconnected=마지막 종료 ì‹œì  +label.last.name=성 +label.level=레벨 +label.linklocal.ip=ë§í¬ 로컬 IP 주소 +label.load.balancer=ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 장치 +label.loading=로드 하는 중 +label.local=로컬 +label.login=ë¡œê·¸ì¸ +label.logout=로그아웃 +label.lun=LUN +label.manage=관리 +label.maximum=최대 +label.memory.allocated=할당완료 메모리 +label.memory.total=메모리 합계 +label.memory.used=메모리 사용량 +label.memory=메모리 +label.menu.accounts=계정 ì •ë³´ +label.menu.alerts=알림 체계 +label.menu.all.accounts=모든 계정 ì •ë³´ +label.menu.all.instances=모든 ì¸ìŠ¤í„´ìŠ¤ +label.menu.community.isos=커뮤니티 ISO +label.menu.community.templates=커뮤니티 템플릿 +label.menu.configuration=구성 +label.menu.dashboard=대시 보드 +label.menu.destroyed.instances=íŒŒê¸°ëœ ì¸ìŠ¤í„´ìŠ¤ +label.menu.disk.offerings=디스í¬ì œê³µ +label.menu.domains=ë„ë©”ì¸ +label.menu.events=ì´ë²¤íЏ +label.menu.featured.isos=추천 ISO +label.menu.featured.templates=추천 템플릿 +label.menu.global.settings=글로벌 설정 +label.menu.instances=ì¸ìŠ¤í„´ìŠ¤ +label.menu.ipaddresses=IP 주소 +label.menu.isos=ISO +label.menu.my.accounts=ë‚˜ì˜ ê³„ì • ì •ë³´ +label.menu.my.instances=ë‚˜ì˜ ì¸ìŠ¤í„´ìŠ¤ +label.menu.my.isos=ë‚˜ì˜ ISO +label.menu.my.templates=ë‚˜ì˜ í…œí”Œë¦¿ +label.menu.network.offerings=ë„¤íŠ¸ì›Œí¬ ì œê³µ +label.menu.network=ë„¤íŠ¸ì›Œí¬ +label.menu.physical.resources=물리 ìžì› +label.menu.running.instances=실행 중 ì¸ìŠ¤í„´ìŠ¤ +label.menu.security.groups=보안 그룹 +label.menu.service.offerings=서비스제공 +label.menu.snapshots=스냅샷 +label.menu.stopped.instances=ì •ì§€ëœ ì¸ìŠ¤í„´ìŠ¤ +label.menu.storage=스토리지 +label.menu.system.vms=시스템 VM +label.menu.system=시스템 +label.menu.templates=템플릿 +label.menu.virtual.appliances=ê°€ìƒ ì•„í”„ë¼ì´ì•ˆìФ +label.menu.virtual.resources=ê°€ìƒ ìžì› +label.menu.volumes=볼륨 +label.migrate.instance.to=ì¸ìŠ¤í„´ìŠ¤ ì´ì „ 위치: +label.minimum=최소 +label.minute.past.hour=ë¶„(매시) +label.monday=ì›”ìš”ì¼ +label.monthly=매월 +label.more.templates=다른 템플릿 +label.my.account=ë‚˜ì˜ ê³„ì • ì •ë³´ +label.name.optional=ì´ë¦„(옵션) +label.name=ì´ë¦„ +label.netmask=ë„· ë§ˆìŠ¤í¬ +label.network.desc=ë„¤íŠ¸ì›Œí¬ ì„¤ëª… +label.network.domain=ë„¤íŠ¸ì›Œí¬ ë„ë©”ì¸ +label.network.id=ë„¤íŠ¸ì›Œí¬ ID +label.network.name=네트워í¬ëª… +label.network.offering.display.text=ë„¤íŠ¸ì›Œí¬ ì œê³µ 표시 í…스트 +label.network.offering.id=ë„¤íŠ¸ì›Œí¬ ì œê³µ ID +label.network.offering.name=ë„¤íŠ¸ì›Œí¬ ì œê³µëª… +label.network.offering=ë„¤íŠ¸ì›Œí¬ ì œê³µ +label.network.rate=ë„¤íŠ¸ì›Œí¬ ì†ë„ +label.network.read=ë„¤íŠ¸ì›Œí¬ ì½ê¸° +label.network.type=ë„¤íŠ¸ì›Œí¬ ì¢…ë¥˜ +label.network.write=ë„¤íŠ¸ì›Œí¬ ê¸°ìž… +label.network=ë„¤íŠ¸ì›Œí¬ +label.new.password=새로운 암호 +label.next=ë‹¤ìŒ +label.nfs.server=NFS 서버 +label.nfs.storage=NFS 스토리지 +label.nfs=NFS +label.nics=NIC +label.no.actions=실행할 수 있는 작업 ì—†ìŒ +label.no.alerts=최근 알림 체계 ì—†ìŒ +label.no.errors=최근 오류는 ì—†ìŒ +label.no.isos=사용할 수 있는 ISO ì—†ìŒ +label.no.items=사용할 수 있는 항목 ì—†ìŒ +label.no.security.groups=사용할 수 있는 보안 그룹 ì—†ìŒ +label.no.thanks=설정 안 함 +label.no=아니오 +label.none=ì—†ìŒ +label.not.found=검색 ê²°ê³¼ ì—†ìŒ +label.num.cpu.cores=CPU 코어수 +label.numretries=재시행 회수 +label.offer.ha=고가용성 제공 +label.optional=옵션 +label.os.preference=OS 기본 설정 +label.os.type=OS 종류 +label.owned.public.ips=소유 공개 IP 주소 +label.owner.account=ì†Œìœ ìž ê³„ì • ì •ë³´ +label.owner.domain=ì†Œìœ ìž ë„ë©”ì¸ +label.parent.domain=부모 ë„ë©”ì¸ +label.password.enabled=암호 관리 사용 +label.password=암호 +label.path=경로 +label.please.wait=기다려 주십시오... +label.pod=Pod +label.port.forwarding=í¬í†  전송 +label.port.range=í¬í†  범위 +label.prev=뒤로 +label.primary.allocated=할당 완료 기본 스토리지 +label.primary.network=기본 ë„¤íŠ¸ì›Œí¬ +label.primary.storage=기본 스토리지 +label.primary.used=기본 스토리지 사용량 +label.private.interface=사설 ì¸í„°íŽ˜ì´ìФ +label.private.ip.range=사설 IP 주소 범위 +label.private.ip=사설 IP 주소 +label.private.ips=사설 IP 주소 +label.private.port=사설 í¬íЏ +label.private.zone=사설 Zone +label.protocol=프로토콜 +label.public.interface=공개 ì¸í„°íŽ˜ì´ìФ +label.public.ip=공개 IP 주소 +label.public.ips=공개 IP 주소 +label.public.port=공개 í¬íЏ +label.public.zone=공개 Zone +label.public=공개 +label.recent.errors=최근 오류 +label.refresh=ì—…ë°ì´íЏ +label.related=관련 +label.remove.from.load.balancer=ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 장치ì—서 ì¸ìŠ¤í„´ìŠ¤ë¥¼ 삭제하는 중 +label.removing.user=사용ìžë¥¼ 삭제하는 중 +label.required=필수 사항 +label.reserved.system.ip=ì˜ˆì•½ëœ ì‹œìŠ¤í…œ IP 주소 +label.resource.limits=ìžì› 제한 +label.resource=ìžì› +label.resources=ìžì› +label.role=ì—­í•  +label.root.disk.offering=루트 디스í¬ì œê³µ +label.running.vms=실행중 VM +label.saturday=í† ìš”ì¼ +label.save=저장 +label.saving.processing=저장하는 중... +label.scope=범위 +label.search=검색 +label.secondary.storage=2ì°¨ 스토리지 +label.secondary.used=2ì°¨ 스토리지 사용량 +label.secret.key=비밀 키 +label.security.group.name=보안 그룹명 +label.security.group=보안 그룹 +label.security.groups.enabled=보안 그룹 유효 +label.security.groups=보안 그룹 +label.sent=ì „ì†¡ëœ ìƒíƒœ +label.server=서버 +label.service.offering=서비스제공 +label.system.service.offering=시스템 서비스 제공 +label.session.expired=세션 ìœ íš¨ê¸°ê°„ì´ ëŠì–´ì§ +label.shared=공유 +label.size=í¬ê¸° +label.snapshot.limits=스냅샷 제한 +label.snapshot.name=스냅샷 ì´ë¦„ +label.snapshot.s=스냅샷 +label.snapshot.schedule=정기 스냅샷 설정 +label.snapshot=스냅샷 +label.snapshots=스냅샷 +label.source.nat=ì „ì†¡ì› NAT +label.specify.vlan=VLAN 지정 +label.start.port=시작 í¬í†  +label.state=ìƒíƒœ +label.static.nat.to=ì •ì  NAT 설정 위치: +label.static.nat=ì •ì  NAT +label.statistics=통계 +label.status=ìƒíƒœ +label.step.1.title=단계 1. 템플릿 ì„ íƒ +label.step.1=단계 1 +label.step.2.title=단계 2. 서비스 제공 +label.step.2=단계 2 +label.step.3.title=단계 3. ë””ìŠ¤í¬ ì œê³µ ì„ íƒ +label.step.3=단계 3 +label.step.4.title=단계 4. ë„¤íŠ¸ì›Œí¬ +label.step.4=단계 4 +label.step.5.title=단계 5. 최종 í™•ì¸ +label.step.5=단계 5 +label.stopped.vms=ì •ì§€ 중 VM +label.storage.type=스토리지 종류 +label.storage=스토리지 +label.submit=보내기 +label.submitted.by=[사용ìž: ] +label.succeeded=완료 +label.sunday=ì¼ìš”ì¼ +label.system.capacity=시스템 처리 능력 +label.system.vm.type=시스템 VM 종류 +label.system.vm=시스템 VM +label.system.vms=시스템 VM +label.tagged=태그 +label.tags=태그 +label.target.iqn=타겟 IQN +label.template.limits=템플릿 제한 +label.template=템플릿 +label.theme.default=기본 테마 +label.theme.grey=맞춤- 회색조 +label.theme.lightblue=맞춤 - ë¼ì´íЏ 블루 +label.thursday=ëª©ìš”ì¼ +label.time.zone=시간대 +label.time=ì‹œê° +label.timeout.in.second = 시간 초과 (ì´ˆ) +label.timezone=시간대 +label.total.cpu=CPU 합계 +label.total.vms=VM 합계 +label.traffic.type=트래픽 종류 +label.tuesday=í™”ìš”ì¼ +label.type.id=종류 ID +label.type=종류 +label.unavailable=사용 불가 +label.unlimited=무제한 +label.untagged=태그 ì—†ìŒ +label.update.ssl.cert=SSL ì¸ì¦ì„œ ì—…ë°ì´íЏ +label.update.ssl=SSL ì¸ì¦ì„œ ì—…ë°ì´íЏ +label.updating=ì—…ë°ì´íŠ¸í•˜ê³  있는 중 +label.url=URL +label.usage.interface=사용 ìƒí™© 측정 ì¸í„°íŽ˜ì´ìФ +label.used=사용 중 +label.user=ì‚¬ìš©ìž +label.username=사용ìžëª… +label.users=ì‚¬ìš©ìž +label.value=ê°’ +label.vcenter.cluster=vCenter í´ëŸ¬ìŠ¤í„° +label.vcenter.datacenter=vCenter ë°ì´í„° 센터 +label.vcenter.datastore=vCenter ë°ì´í„° 스토어 +label.vcenter.host=vCenter 호스트 +label.vcenter.password=vCenter 암호 +label.vcenter.username=vCenter 사용ìžëª… +label.version=버전 +label.virtual.appliance=ê°€ìƒ ì–´í”Œë¼ì´ì–¸ìФ +label.virtual.appliances=ê°€ìƒ ì–´í”Œë¼ì´ì–¸ìФ +label.virtual.network=ê°€ìƒ ë„¤íŠ¸ì›Œí¬ +label.vlan.id=VLAN ID +label.vlan.range=VLAN 범위 +label.vm.add=ì¸ìŠ¤í„´ìŠ¤ 추가 +label.vm.destroy=파기 +label.vm.reboot=재시작 +label.vm.start=시작 +label.vm.stop=ì •ì§€ +label.vmfs=VMFS +label.vms=VM +label.volume.limits=볼륨 제한 +label.volume.name=볼륨명 +label.volume=볼륨 +label.volumes=볼륨 +label.vsphere.managed=vSphere 관리 +label.waiting=대기하는 중 +label.warn=경고 +label.wednesday=ìˆ˜ìš”ì¼ +label.weekly=매주 +label.welcome.cloud.console=관리 ì½˜ì†”ì— ì˜¤ì‹ ê²ƒì„ í™˜ì˜í•©ë‹ˆë‹¤! +label.welcome=어서 오십시오 +label.yes=예 +label.zone.id=Zone ID +label.zone.step.1.title=단계 1. ë„¤íŠ¸ì›Œí¬ ì„ íƒ +label.zone.step.2.title=단계 2. Zone 추가 +label.zone.step.3.title=단계 3. Pod 추가 +label.zone.step.4.title=단계 4. IP 주소 범위 추가 +label.zone.wide=Zone ì „ì²´ +label.zone=Zone + +#Messages +message.acquire.public.ip=새로운 IP 주소를 ì·¨ë“하는 Zoneì„ ì„ íƒí•´ 주십시오. +message.action.cancel.maintenance.mode=현재 유지 보수를 취소하시겠습니까? +message.action.cancel.maintenance=호스트 유지 보수는 ì •ìƒì ìœ¼ë¡œ 취소ë˜ì—ˆìŠµë‹ˆë‹¤. 처리ì—는 몇 ë¶„ ì •ë„ ê±¸ë¦´ 수 있습니다. +message.action.delete.ISO.for.all.zones=ì´ ISO는 모든 Zoneì—서 사용하고 있습니다. 모든 Zoneì—서 삭제하시겠습니까? +message.action.delete.ISO=현재 ISO를 삭제하시겠습니까? +message.action.delete.cluster=현재 í´ëŸ¬ìŠ¤í„°ë¥¼ 삭제하시겠습니까? +message.action.delete.disk.offering=현재 디스í¬ì œê³µì„ 삭제하시겠습니까? +message.action.delete.domain=현재 ë„ë©”ì¸ì„ 삭제하시겠습니까? +message.action.delete.external.firewall=현재 외부 방화벽(fire wall)를 삭제하시겠습니까? 경고: ê°™ì€ ì™¸ë¶€ 방화벽(fire wall)를 다시 추가할 경우는 기기 사용 ìƒí™© ë°ì´í„°ë¥¼ 재설정해야 합니다. +message.action.delete.external.load.balancer=현재 외부 ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 장치를 삭제하시겠습니까? 경고: ê°™ì€ ì™¸ë¶€ ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 장치를 다시 추가할 경우는 기기 사용 ìƒí™© ë°ì´í„°ë¥¼ 재설정해야 합니다. +message.action.delete.ingress.rule=현재 수신 ê·œì¹™ì„ ì‚­ì œí•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.action.delete.network=현재 네트워í¬ë¥¼ 삭제하시겠습니까? +message.action.delete.pod=현재 Pod를 삭제하시겠습니까? +message.action.delete.primary.storage=현재 기본 스토리지를 삭제하시겠습니까? +message.action.delete.secondary.storage=현재 2ì°¨ 스토리지를 삭제하시겠습니까? +message.action.delete.security.group=현재 보안 ê·¸ë£¹ì„ ì‚­ì œí•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.action.delete.service.offering=현재 ì„œë¹„ìŠ¤ì œê³µì„ ì‚­ì œí•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.action.delete.snapshot=현재 ìŠ¤ëƒ…ìƒ·ì„ ì‚­ì œí•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.action.delete.template.for.all.zones=ê·¸ í…œí”Œë¦¿ì€ ëª¨ë“  Zoneì—서 사용ë˜ì–´ 있습니다. 모든 Zoneì—서 삭제하시겠습니까? +message.action.delete.template=현재 í…œí”Œë¦¿ì„ ì‚­ì œí•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.action.delete.volume=현재 ë³¼ë¥¨ì„ ì‚­ì œí•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.action.delete.zone=현재 Zoneì„ ì‚­ì œí•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.action.destroy.instance=현재 ì¸ìŠ¤í„´ìŠ¤ë¥¼ 파기하시겠습니까? +message.action.destroy.systemvm=현재 시스템 VM를 파기하시겠습니까? +message.action.disable.static.NAT=ì •ì  NAT를 사용 안 함으로 설정하시겠습니까? +message.action.enable.maintenance=호스트를 유지 보수할 준비를 í•  수 있었습니다. ì´ í˜¸ìŠ¤íŠ¸ìƒ VM ìˆ˜ì— ë”°ë¼ì„œ ì²˜ë¦¬ì— ëª‡ ë¶„ ì´ìƒ 걸릴 ê°€ëŠ¥ì„±ì´ ìžˆìŠµë‹ˆë‹¤. +message.action.force.reconnect=호스트는 ê°•ì œì ìœ¼ë¡œ 재접ì†í–ˆìŠµë‹ˆë‹¤. ì´ ì²˜ë¦¬ì—는 몇 ë¶„ ì´ìƒ 걸릴 ê°€ëŠ¥ì„±ì´ ìžˆìŠµë‹ˆë‹¤ +message.action.host.enable.maintenance.mode=유지 보수 모드를 사용 하면, ì´ í˜¸ìŠ¤íŠ¸ë¡œ 실행 ì¤‘ì¸ ëª¨ë“  ì¸ìŠ¤í„´ìŠ¤ë¥¼ 다른 사용가능 호스트ì—게 실시간 ì´ì „ë©ë‹ˆë‹¤. +message.action.instance.reset.password=현재 ê°€ìƒ ë¨¸ì‹  루트 암호를 변경하시겠습니까? +message.action.primarystorage.enable.maintenance.mode=경고: 기본 스토리지를 유지 보수 모드로 하면 ê·¸ ìŠ¤í† ë¦¬ì§€ìƒ ë³¼ë¥¨ì„ ì‚¬ìš©í•˜ëŠ” 모든 VMê°€ 정지합니다. 실행하시겠습니까? +message.action.reboot.instance=현재 ì¸ìŠ¤í„´ìŠ¤ë¥¼ 재시작하시겠습니까? +message.action.reboot.systemvm=현재 시스템 VMì„ ìž¬ì‹œìž‘í•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.action.release.ip=현재 IP 주소를 해제하시겠습니까? +message.action.restore.instance=현재 ì¸ìŠ¤í„´ìŠ¤ë¥¼ ë³µì›í•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.action.start.instance=현재 ì¸ìŠ¤í„´ìŠ¤ë¥¼ 시작하시겠습니까? +message.action.start.router=현재 ë¼ìš°í„°ë¥¼ 시작하시겠습니까? +message.action.start.systemvm=현재 시스템 VMì„ ì‹œìž‘í•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.action.stop.instance=현재 ì¸ìŠ¤í„´ìŠ¤ë¥¼ 정지하시겠습니까? +message.action.stop.systemvm=현재 시스템 VMì„ ì •ì§€í•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.action.take.snapshot=현재 볼륨 ìŠ¤ëƒ…ìƒ·ì„ ë§Œë“œì‹œê² ìŠµë‹ˆê¹Œ? +message.add.cluster.zone=Zone ì— í•˜ì´í¼ ë°”ì´ì €ë¡œ 관리ë˜ëŠ” í´ëŸ¬ìŠ¤í„°ë¥¼ 추가합니다. +message.add.cluster=Zone Pod ì— í•˜ì´í¼ ë°”ì´ì €ë¡œ 관리ë˜ëŠ” í´ëŸ¬ìŠ¤í„°ë¥¼ 추가합니다. +message.add.disk.offering=새로운 ë””ìŠ¤í¬ ì œê³µì„ ì¶”ê°€í•˜ê¸° 위해 ë‹¤ìŒ íŒŒë¼ë¯¸í„°ë¥¼ 지정해 주십시오. +message.add.firewall=Zoneì— ë°©í™”ë²½(fire wall)ì„ ì¶”ê°€í•©ë‹ˆë‹¤. +message.add.host=새로운 호스트를 추가하기 위해 아래 파ë¼ë¯¸í„°ë¥¼ 지정해 주십시오. +message.add.ip.range.direct.network=Zone ì§ì ‘ ë„¤íŠ¸ì›Œí¬ ì— IP 주소 범위를 추가합니다 +message.add.ip.range.to.pod=

Pod ì— IP 주소 범위를 추가합니다.

+message.add.ip.range=Zone 공개 네트워í¬ì— IP 주소 범위를 추가합니다. +message.add.load.balancer=Zoneì— ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 장치를 추가합니다. +message.add.network=Zone ì— ìƒˆë¡œìš´ 네트워í¬ë¥¼ 추가합니다. +message.add.pod=Zone ì— ìƒˆë¡œìš´ Pod를 추가합니다. +message.add.primary.storage=Zone Pod ì— ìƒˆë¡œìš´ 기본 스토리지를 추가합니다. +message.add.primary=새로운 기본 스토리지를 추가하기 위해 아래 파ë¼ë¯¸í„°ë¥¼ 지정해 주십시오. +message.add.secondary.storage=Zone ì— ìƒˆë¡œìš´ 스토리지를 추가합니다 +message.add.service.offering=새로운 컴퓨팅 ìžì› ì œê³µì„ ì¶”ê°€í•˜ê¸° 위해서, ë‹¤ìŒ ë°ì´í„°ë¥¼ 입력해 주십시오. +message.add.template=새로운 í…œí”Œë¦¿ì„ ë§Œë“¤ê¸°í•˜ê¸° 위해 아래 ë°ì´í„°ë¥¼ 입력해 주십시오. +message.add.volume=새로운 ë³¼ë¥¨ì„ ì¶”ê°€í•˜ê¸° 위해 아래 ë°ì´í„°ë¥¼ 입력해 주십시오. +message.additional.networks.desc=ê°€ìƒ ì¸ìŠ¤í„´ìŠ¤ê°€ ì ‘ì†í•˜ëŠ” 추가 네트워í¬ë¥¼ ì„ íƒí•´ 주십시오. +message.advanced.mode.desc=VLAN 기술 ì§€ì›ë¥¼ 사용 하는 경우는 ì´ ë„¤íŠ¸ì›Œí¬ ëª¨ë¸ì„ ì„ íƒí•´ 주십시오.ì´ ëª¨ë¸ì—서는 가장 유연하게 카스íƒë„¤íŠ¸ì›Œí¬ ì œê³µì„ ì œê³µí•  수 있어 방화벽(fire wall), VPN, ë„¤íŠ¸ì›Œí¬ ë¡œë“œ 공유 장치 기술 ì§€ì› ì™¸ì—, ì§ì ‘ 네트워í¬ì™€ ê°€ìƒ ë„¤íŠ¸ì›Œí¬ë„ 사용 í•  수 있습니다. +message.advanced.security.group=게스트 VM를 분리하기 위해서 보안 ê·¸ë£¹ì„ ì‚¬ìš©í•˜ëŠ” 경우는 ì´ ì˜µì…˜ì„ ì„ íƒí•´ 주십시오. +message.advanced.virtual=게스트 VM를 분리하기 위해서 ì¡´ ì „ì²´ VLAN를 사용하는 경우는 ì´ ì˜µì…˜ì„ ì„ íƒí•´ 주십시오. +message.allow.vpn.access=VPN 접근를 허가하는 ì‚¬ìš©ìž ì‚¬ìš©ìžëª…ê³¼ 암호를 입력해 주십시오. +message.attach.iso.confirm=현재 ê°€ìƒ ì¸ìŠ¤í„´ìŠ¤ì— ISO 파ì¼ì„ ì—°ê²° 하시겠습니까? +message.attach.volume=새로운 ë³¼ë¥¨ì„ ì—°ê²° 하기 위해 아래 ë°ì´í„°ë¥¼ 입력해 주십시오.Windows ë² ì´ìФ ê°€ìƒ ë¨¸ì‹ ì— ë””ìŠ¤í¬ ë³¼ë¥¨ì„ ì—°ê²° 하는 경우는 ì—°ê²° 한 디스í¬ë¥¼ ì¸ì‹í•˜ê¸° 위해서 ì¸ìŠ¤í„´ìŠ¤ë¥¼ 재시작할 필요가 있습니다. +message.basic.mode.desc=VLAN 기술 ì§€ì›ê°€ë¶ˆí•„요한경우는 ì´ ë„¤íŠ¸ì›Œí¬ ëª¨ë¸ì„ ì„ íƒí•´ 주십시오.ì´ ë„¤íŠ¸ì›Œí¬ ëª¨ë¸ë¡œ 만들기ë˜ëŠ” 모든 ê°€ìƒ ì¸ìŠ¤í„´ìŠ¤ì— ë„¤íŠ¸ì›Œí¬ì—서 ì§ì ‘ IP 주소를 할당할 수 있어 보안 ê·¸ë£¹ì„ ì‚¬ìš©í•´ 보안와 분리가 제공ë©ë‹ˆë‹¤. +message.change.offering.confirm=현재 ê°€ìƒ ì¸ìŠ¤í„´ìŠ¤ ì„œë¹„ìŠ¤ì œê³µì„ ë³€ê²½í•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.copy.iso.confirm=ISO를 ë‹¤ìŒ ìž¥ì†Œì— ë³µì‚¬í•˜ì‹œê² ìŠµë‹ˆê¹Œ? +message.copy.template=ì¡´ 으ì—서 템플릿 XXX를 ë‹¤ìŒ ìž¥ì†Œì— ë³µì‚¬í•©ë‹ˆë‹¤: +message.create.template.vm=템플릿 으ì—서 VM를 만들었습니다. +message.create.template.volume=ë””ìŠ¤í¬ ë³¼ë¥¨ í…œí”Œë¦¿ì„ ë§Œë“¤ê¸°í•˜ê¸° ì „ì—, ë‹¤ìŒ ì •ë³´ë¥¼ 지정해 주십시오.볼륨 í¬ê¸°ì— ë”°ë¼ì„œëŠ” 템플릿 만들기ì—는 몇분 ì´ìƒ 걸릴 ê°€ëŠ¥ì„±ì´ ìžˆìŠµë‹ˆë‹¤. +message.delete.account=현재 계정 정보를 삭제하시겠습니까? +message.detach.iso.confirm=현재 ê°€ìƒ ì¸ìŠ¤í„´ìŠ¤ì—서 ISO 파ì¼ì„ 분리 하시겠습니까? +message.disable.account=현재 계정 정보를 사용 안 함으로 하시겠습니까?ì´ ê³„ì • ì •ë³´ 모든 사용ìžê°€ í´ë¼ìš°ë“œ ìžì›ì— ì ‘ê·¼ í•  수 없게 ë©ë‹ˆë‹¤. 실행중 모든 ê°€ìƒ ë¨¸ì‹ ì€ ê¸ˆë°©ì— ì¢…ë£Œ ë©ë‹ˆë‹¤. +message.disable.vpn.access=VPN 접근를 사용 안 함으로 하시겠습니까? +message.download.ISO=ISO를 다운로드하려면 00000ì„ í´ë¦­í•©ë‹ˆë‹¤. +message.download.template=í…œí”Œë¦¿ì„ ë‹¤ìš´ë¡œë“œí•˜ë ¤ë©´ 00000ì„ í´ë¦­í•©ë‹ˆë‹¤. +message.download.volume=ë³¼ë¥¨ì„ ë‹¤ìš´ë¡œë“œí•˜ë ¤ë©´ 00000ì„ í´ë¦­í•©ë‹ˆë‹¤. +message.edit.confirm=[저장]ì„ í´ë¦­í•˜ê¸° 전으로 변경 ë‚´ìš©ì„ í™•ì¸í•´ 주십시오. +message.edit.limits=ë‹¤ìŒ ìžì›ì— ì œí•œì„ ì§€ì •í•´ 주십시오.「-1ã€ì€ ìžì› ë§Œë“¤ê¸°ì— ì œí•œì´ ì—†ë‹¤ëŠ” ì˜ë¯¸ìž…니다. +message.enable.account=현재 계정 정보를 사용 하시겠습니까? +message.enable.vpn.access=í˜„ìž¬ì´ IP ì£¼ì†Œì— ëŒ€í•œ VPN는 유효하지 않ì€ìž…니다. VPN 접근를 사용 하시겠습니까? +message.enabled.vpn.ip.sec=IPSec 사전 공유 키: +message.enabled.vpn=현재 VPN ì ‘ê·¼ 사용 설정ë˜ì–´ 있습니다. ë‹¤ìŒ IP 주소 경유로 ì ‘ê·¼ í•  수 있습니다. +message.launch.vm.on.private.network=ì‚¬ì  ì „ìš© 네트워í¬ë¡œ ì¸ìŠ¤í„´ìŠ¤ë¥¼ 시작합니까? +message.lock.account=현재 계정 정보를 ìž ê·¸ì–´ë„ ì¢‹ìŠµë‹ˆê¹Œ? ì´ ê³„ì • ì •ë³´ 모든 사용ìžê°€ í´ë¼ìš°ë“œ ìžì›ì„ 관리할 수 없게 ë©ë‹ˆë‹¤. ê·¸ í›„ë„ ê¸°ì¡´ Zone ìžì›ì—는 ì ‘ê·¼ í•  수 있습니다. +message.migrate.instance.confirm=ê°€ìƒ ì¸ìŠ¤í„´ìŠ¤ ì´ì „ 위치는 ë‹¤ìŒ í˜¸ìŠ¤íŠ¸ë¡œ 하시겠습니까? +message.new.user=계정 ì •ë³´ì— ìƒˆë¡œìš´ 사용ìžë¥¼ 추가하기 위해 아래 정보를 지정해 주십시오. +message.no.network.support.configuration.not.true=보안 ê·¸ë£¹ì´ ìœ íš¨í•œ Zoneì´ ì—†ê¸° ë•Œë¬¸ì— ì¶”ê°€ ë„¤íŠ¸ì›Œí¬ ê¸°ëŠ¥ì€ ì—†ìŠµë‹ˆë‹¤. 단계 5로 진행해 주십시오. +message.no.network.support=하ì´í¼ ë°”ì´ì €ë¡œì„œ vSphere를 ì„ íƒí–ˆìœ¼ë‚˜ ì´ í•˜ì´í¼ ë°”ì´ì €ì— 추가 ë„¤íŠ¸ì›Œí¬ ê¸°ëŠ¥ì€ ì—†ìŠµë‹ˆë‹¤. 단계 5로 진행해 주십시오. +message.number.clusters=

í´ëŸ¬ìŠ¤í„°ìˆ˜

+message.number.hosts=

호스트수

+message.number.pods=

Pod수

+message.number.storage=

기본 스토리지 볼륨수

+message.number.zones=

Zone수

+message.remove.vpn.access=ë‹¤ìŒ ì‚¬ìš©ìžì—서 VPN 접근를 삭제하시겠습니까? +message.restart.mgmt.server=새로운 ì„¤ì •ì„ ì‚¬ìš© 하기 위해 관리 서버를 재시작해 주십시오. +message.restart.mgmt.usage.server=새로운 ì„¤ì •ì„ ì‚¬ìš© 하기 위해 관리 서버와 사용 ìƒí™© 측정 서버를 재시작해 주십시오. +message.security.group.usage=(해당하는 보안 ê·¸ë£¹ì„ ëª¨ë‘ ì„ íƒí•˜ë ¤ë©´ Ctrl 키를 누르면서 í´ë¦­í•´ 주십시오) +message.snapshot.schedule=ë‹¤ìŒ ì˜µì…˜ì—서 ì„ íƒí•œ ì •ì±… 기본 ì„¤ì •ì„ ì ìš©í•˜ì—¬ 정기 스냅샷 ìŠ¤ì¼€ì¤„ì„ ì„¤ì • í•  수 있습니다. +message.step.1.continue=실행하려면 템플릿 ë˜ëŠ” ISO를 ì„ íƒí•´ 주십시오. +message.step.1.desc=새로운 ê°€ìƒ ì¸ìŠ¤í„´ìŠ¤ìš© í…œí”Œë¦¿ì„ ì„ íƒí•´ 주십시오.ISO를 설치 í•  수 있는 공백 í…œí”Œë¦¿ì„ ì„ íƒí•  ìˆ˜ë„ ìžˆìŠµë‹ˆë‹¤. +message.step.2.continue=실행하려면 ì„œë¹„ìŠ¤ì œê³µì„ ì„ íƒí•´ 주십시오. +message.step.2.desc= +message.step.3.continue=실행하려면 디스í¬ì œê³µì„ ì„ íƒí•´ 주십시오. +message.step.3.desc= +message.step.4.continue=실행하려면 네트워í¬ë¥¼ ì ì–´ë„ 한 ê°œ ì´ìƒ ì„ íƒí•´ 주십시오. +message.step.4.desc=ê°€ìƒ ì¸ìŠ¤í„´ìŠ¤ê°€ ì ‘ì†í•˜ëŠ” 기본 네트워í¬ë¥¼ ì„ íƒí•´ 주십시오. +message.update.os.preference=현재 호스트 OS 기본 ì„¤ì •ì„ ì„ íƒí•´ 주십시오.ê°™ì€ ê¸°ë³¸ ì„¤ì •ì„ ê°€ì§€ëŠ” 모든 ê°€ìƒ ì¸ìŠ¤í„´ìŠ¤ëŠ” 다른 호스트를 ì„ íƒí•˜ê¸° ì „ì— ìš°ì„ ì´ í˜¸ìŠ¤íŠ¸ê°€ 할당할 수 있습니다. +message.update.ssl=ê° ì½˜ì†” 프ë¡ì‹œ ê°€ìƒ ì¸ìŠ¤í„´ìŠ¤ë¡œ ì—…ë°ì´íŠ¸í•˜ëŠ” X.509 기반 새 SSL ì¸ì¦ì„œë¥¼ 전송해 주십시오: +message.virtual.network.desc=계정 ì •ë³´ ì „ìš© ê°€ìƒ ë„¤íŠ¸ì›Œí¬ìž…니다. 브로드ìºìŠ¤íŠ¸ ë„ë©”ì¸ì€ VLAN ë‚´ì— ë°°ì¹˜ë˜ì–´ 공개 네트워í¬ì— 접근는 ëª¨ë‘ ê°€ìƒ ë¼ìš°í„°ì— 해서 루팅 ë©ë‹ˆë‹¤. +message.volume.create.template.confirm=현재 ë””ìŠ¤í¬ ë³¼ë¥¨ í…œí”Œë¦¿ì„ ë§Œë“œì‹œê² ìŠµë‹ˆê¹Œ? 볼륨 í¬ê¸°ì— ë”°ë¼ í…œí”Œë¦¿ ë§Œë“¤ê¸°ì— ëª‡ ë¶„ ì´ìƒ 걸릴 ê°€ëŠ¥ì„±ì´ ìžˆìŠµë‹ˆë‹¤. +message.zone.step.1.desc=Zone ë„¤íŠ¸ì›Œí¬ ëª¨ë¸ì„ ì„ íƒí•´ 주십시오. +message.zone.step.2.desc=새 Zoneì„ ì¶”ê°€í•˜ê¸° 위해 아래 정보를 입력해 주십시오. +message.zone.step.3.desc=새 Pod를 추가하기 위해 아래 정보를 입력해 주십시오. +message.apply.snapshot.policy=현재 스냅샷 정책를 ì—…ë°ì´íŠ¸í–ˆìŠµë‹ˆë‹¤. +message.disable.snapshot.policy=현재 스냅샷 정책를 사용 안 함으로 설정했습니다. +message.action.change.service.warning.for.instance=현재 서비스 ì œê³µì„ ë³€ê²½í•˜ê¸° ì „ì— ì¸ìŠ¤í„´ìŠ¤ë¥¼ 정지해야 합니다. +message.action.change.service.warning.for.router=현재 서비스 ì œê³µì„ ë³€ê²½í•˜ê¸° ì „ì— ë¼ìš°í„°ë¥¼ 정지해야 합니다. +message.action.reset.password.warning=현재 암호를 변경하기 ì „ì— ì¸ìŠ¤í„´ìŠ¤ë¥¼ 정지해야 합니다. +message.action.reset.password.off=ì¸ìŠ¤í„´ìŠ¤ëŠ” 현재 ê¸°ëŠ¥ì„ ì§€ì› í•˜ì§€ 않습니다. + +#Errors +error.login=사용ìžëª…/암호가 기ë¡ê³¼ ì¼ì¹˜í•˜ì§€ 않습니다. +error.menu.select=í•­ëª©ì´ ì„ íƒë˜ì–´ 있지 않기 ë•Œë¬¸ì— ìž‘ì—…ì„ ì‹¤í–‰í•  수 없습니다. +error.mgmt.server.inaccessible=관리 ì„œë²„ì— ì ‘ê·¼ í•  수 없습니다. 다ìŒì— 재실행해 주십시오. +error.session.expired=세션 ìœ íš¨ê¸°ê°„ì´ ëŠì–´ì¡ŒìŠµë‹ˆë‹¤. + +#resizeVolumes +label.resize.new.size=새 í¬ê¸°(GB) +label.action.resize.volume=볼륨 í¬ê¸° 변경 +label.action.resize.volume.processing=볼륨 í¬ê¸° 변경 중... +label.resize.new.offering.id=새로 제공 +label.resize.shrink.ok=변경 완료 diff --git a/client/WEB-INF/classes/resources/messages_pt_BR.properties b/client/WEB-INF/classes/resources/messages_pt_BR.properties index 3bc435b97..5202f562c 100644 --- a/client/WEB-INF/classes/resources/messages_pt_BR.properties +++ b/client/WEB-INF/classes/resources/messages_pt_BR.properties @@ -1114,6 +1114,7 @@ label.keep=Manter label.lang.chinese=Chinese (Simplified) label.lang.english=English label.lang.japanese=Japanese +label.lang.korean=Coreano label.lang.spanish=Spanish label.last.disconnected=Last Disconnected label.last.name=Ã\u009altimo Nome @@ -1510,3 +1511,9 @@ error.menu.select=N error.mgmt.server.inaccessible=O servidor de gerenciamento está inacessível. Tente novamente mais tarde. error.session.expired=Sua sessão expirou. error.unresolved.internet.name=Impossível resolver DNS +#resizeVolumes +label.resize.new.size=New Size(GB) +label.action.resize.volume=Resize Volume +label.action.resize.volume.processing=Resizing Volume.... +label.resize.new.offering.id=New Offering +label.resize.shrink.ok=Shrink OK diff --git a/client/WEB-INF/classes/resources/messages_ru_RU.properties b/client/WEB-INF/classes/resources/messages_ru_RU.properties index dd7e74607..c66311920 100644 --- a/client/WEB-INF/classes/resources/messages_ru_RU.properties +++ b/client/WEB-INF/classes/resources/messages_ru_RU.properties @@ -1114,6 +1114,7 @@ label.keep=Хранить label.lang.chinese=КитайÑкий (упрощённый) label.lang.english=ÐнглийÑкий label.lang.japanese=ЯпонÑкий +label.lang.korean=корейÑкий label.lang.spanish=ИÑпанÑкий label.last.disconnected=ПоÑледнее Ñоединение label.last.name=ПоÑледнее Ð¸Ð¼Ñ @@ -1510,3 +1511,11 @@ error.menu.select=Ðе удаетÑÑ Ð²Ñ‹Ð¿Ð¾Ð»Ð½Ð¸Ñ‚ÑŒ дейÑтвие из- error.mgmt.server.inaccessible=Сервер ÑƒÐ¿Ñ€Ð°Ð²Ð»ÐµÐ½Ð¸Ñ Ð½ÐµÐ´Ð¾Ñтупна. Попробуйте обратитьÑÑ Ðº нему позже. error.session.expired=Ваша ÑеÑÑÐ¸Ñ Ð±Ñ‹Ð»Ð° завершена error.unresolved.internet.name=Ваше интернет-Ð¸Ð¼Ñ Ð¾Ð¿Ñ€ÐµÐ´ÐµÐ»Ð¸Ñ‚ÑŒ не удалоÑÑŒ + +#resizeVolumes +label.resize.new.size=New Size(GB) +label.action.resize.volume=Resize Volume +label.action.resize.volume.processing=Resizing Volume.... +label.resize.new.offering.id=New Offering +label.resize.shrink.ok=Shrink OK + diff --git a/client/WEB-INF/classes/resources/messages_zh_CN.properties b/client/WEB-INF/classes/resources/messages_zh_CN.properties index 62160d984..d49cefacf 100644 --- a/client/WEB-INF/classes/resources/messages_zh_CN.properties +++ b/client/WEB-INF/classes/resources/messages_zh_CN.properties @@ -1116,6 +1116,7 @@ label.keep=ä¿ç•™ label.lang.chinese=简体中文 label.lang.english=英语 label.lang.japanese=日语 +label.lang.korean=韩国语 label.lang.spanish=西ç­ç‰™è¯­ label.last.disconnected=上次断开连接时间 label.last.name=å§“æ° @@ -1511,3 +1512,9 @@ error.mgmt.server.inaccessible=æ— æ³•è®¿é—®ç®¡ç†æœåŠ¡å™¨ã€‚è¯·ç¨åŽå†è¯•。 error.session.expired=您的会è¯å·²è¿‡æœŸã€‚ error.unresolved.internet.name=æ— æ³•è§£æžæ‚¨çš„ Internet å称。 +#resizeVolumes +label.resize.new.size=New Size(GB) +label.action.resize.volume=Resize Volume +label.action.resize.volume.processing=Resizing Volume.... +label.resize.new.offering.id=New Offering +label.resize.shrink.ok=Shrink OK diff --git a/client/WEB-INF/web.xml b/client/WEB-INF/web.xml index 50f2455e8..da2f13c8c 100644 --- a/client/WEB-INF/web.xml +++ b/client/WEB-INF/web.xml @@ -19,8 +19,23 @@ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" version="2.5"> + + + log4jConfigLocation + classpath:log4j-cloud.xml + + + org.springframework.web.util.Log4jConfigListener + - + + org.springframework.web.context.ContextLoaderListener + + + contextConfigLocation + classpath:applicationContext.xml, classpath:componentContext.xml + + cloudStartupServlet com.cloud.servlet.CloudStartupServlet diff --git a/client/bindir/cloud-setup-management.in b/client/bindir/cloud-setup-management.in index ca1327ae7..aa9a46ba6 100755 --- a/client/bindir/cloud-setup-management.in +++ b/client/bindir/cloud-setup-management.in @@ -24,7 +24,7 @@ from cloudutils.globalEnv import globalEnv from cloudutils.serviceConfigServer import cloudManagementConfig from optparse import OptionParser if __name__ == '__main__': - initLoging("/var/log/cloud/setupManagement.log") + initLoging("@MSLOGDIR@/setupManagement.log") glbEnv = globalEnv() parser = OptionParser() diff --git a/client/cloudstack-ui.launch b/client/cloudstack-ui.launch deleted file mode 100644 index 1943d17ae..000000000 --- a/client/cloudstack-ui.launch +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/client/pom.xml b/client/pom.xml index 63ec2ef66..743cd3630 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -17,7 +17,7 @@ org.apache.cloudstack cloudstack - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT @@ -75,11 +75,26 @@ cloud-plugin-network-elb ${project.version} + + org.apache.cloudstack + cloud-plugin-network-vns + ${project.version} + + + org.apache.cloudstack + cloud-plugin-network-midonet + ${project.version} + org.apache.cloudstack cloud-plugin-hypervisor-xen ${project.version} + + org.apache.cloudstack + cloud-plugin-hypervisor-baremetal + ${project.version} + org.apache.cloudstack cloud-plugin-hypervisor-ovm @@ -127,6 +142,103 @@ ${cs.mysql.version} runtime + + org.apache.cloudstack + cloud-framework-ipc + ${project.version} + + + org.apache.cloudstack + cloud-framework-rest + ${project.version} + + + org.apache.cloudstack + cloud-engine-api + ${project.version} + + + org.apache.cloudstack + cloud-engine-components-api + ${project.version} + + + + org.apache.cloudstack + cloud-engine-compute + ${project.version} + + + + org.apache.cloudstack + cloud-engine-network + ${project.version} + + + org.apache.cloudstack + cloud-engine-orchestration + ${project.version} + + + org.apache.cloudstack + cloud-engine-schema + ${project.version} + + + org.apache.cloudstack + cloud-engine-storage + ${project.version} + + + org.apache.cloudstack + cloud-engine-storage-backup + ${project.version} + + + org.apache.cloudstack + cloud-engine-storage-image + ${project.version} + + + org.apache.cloudstack + cloud-engine-storage-imagemotion + ${project.version} + + + org.apache.cloudstack + cloud-engine-storage-snapshot + ${project.version} + + + org.apache.cloudstack + cloud-engine-storage-volume + ${project.version} + + + org.apache.cloudstack + cloud-plugin-hypervisor-simulator + ${project.version} + + + org.apache.cloudstack + cloud-plugin-storage-volume-default + ${project.version} + + + org.apache.cloudstack + cloud-plugin-syslog-alerts + ${project.version} + + + org.apache.cloudstack + cloud-plugin-snmp-alerts + ${project.version} + + + org.apache.cloudstack + cloud-plugin-host-anti-affinity + ${project.version} + install @@ -136,7 +248,7 @@ maven-war-plugin 2.3 - ./WEB-INF/web.xml + ./target/generated-webapp/WEB-INF/web.xml ./target/generated-webapp @@ -151,9 +263,12 @@ 60000 - /client - ${basedir}/WEB-INF/web.xml + ${project.build.directory}/${project.build.finalName}/WEB-INF/web.xml ${project.build.directory}/${project.build.finalName} + + /client + ${project.build.directory}/utilities/scripts/db/;${project.build.directory}/utilities/scripts/db/db/ + @@ -169,6 +284,26 @@ maven-antrun-plugin 1.7 + + + copy-systemvm + process-resources + + run + + + + + + + + + + + + generate-resource generate-resources @@ -177,21 +312,23 @@ - - - - + + + + + + - + todir="${basedir}/target/generated-webapp/WEB-INF/"> + + + - - - + todir="${basedir}/target/generated-webapp/WEB-INF/classes"> + + @@ -207,7 +344,7 @@ + value="${cs.replace.properties}" /> @@ -218,7 +355,7 @@ - + @@ -229,7 +366,7 @@ - + @@ -240,7 +377,7 @@ - + @@ -250,29 +387,98 @@ - + + + + + + + + + + + + + + + + + + + + + + process-nonoss + process-resources + + run + + + + test + + + + + + process-simulator-context + process-resources + + run + + + + test + + + + + + process-nonoss-spring-context + process-resources + + run + + + + test + + + + + + + + + + + process-quickcloud-spring-context + process-resources + + run + + + + quickcloud + - - process-nonoss - process-resources - - run - - - - test - - - - @@ -292,14 +498,14 @@ org.jasypt jasypt - 1.9.0` + 1.9.0 false ${project.build.directory}/pythonlibs org.jasypt jasypt - 1.8` + 1.8 false ${project.build.directory}/pythonlibs @@ -346,19 +552,19 @@ - simulator - - - simulator - - - - - org.apache.cloudstack - cloud-plugin-hypervisor-simulator - ${project.version} - - + developer + + + simulator + + + + + org.apache.cloudstack + cloud-plugin-hypervisor-simulator + ${project.version} + + netapp @@ -438,6 +644,11 @@ cloud-vmware-base ${project.version}
+ + org.apache.cloudstack + cloud-plugin-network-cisco-vnmc + ${project.version} +
diff --git a/client/tomcatconf/applicationContext.xml.in b/client/tomcatconf/applicationContext.xml.in new file mode 100644 index 000000000..866e3ed32 --- /dev/null +++ b/client/tomcatconf/applicationContext.xml.in @@ -0,0 +1,855 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.apache.cloudstack.framework + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/tomcatconf/commands.properties.in b/client/tomcatconf/commands.properties.in index 755a5f275..10fcfe3f6 100644 --- a/client/tomcatconf/commands.properties.in +++ b/client/tomcatconf/commands.properties.in @@ -66,6 +66,7 @@ listVirtualMachines=15 getVMPassword=15 restoreVirtualMachine=15 changeServiceForVirtualMachine=15 +scaleVirtualMachine=15 assignVirtualMachine=1 migrateVirtualMachine=1 recoverVirtualMachine=7 @@ -123,6 +124,8 @@ listDiskOfferings=15 createVlanIpRange=1 deleteVlanIpRange=1 listVlanIpRanges=1 +dedicatePublicIpRange=1 +releasePublicIpRange=1 #### address commands associateIpAddress=15 @@ -151,6 +154,9 @@ createLBStickinessPolicy=15 deleteLBStickinessPolicy=15 listLoadBalancerRules=15 listLBStickinessPolicies=15 +listLBHealthCheckPolicies=15 +createLBHealthCheckPolicy=15 +deleteLBHealthCheckPolicy=15 listLoadBalancerRuleInstances=15 updateLoadBalancerRule=15 @@ -218,9 +224,13 @@ listZones=15 #### events commands listEvents=15 listEventTypes=15 +archiveEvents=15 +deleteEvents=15 #### alerts commands listAlerts=3 +archiveAlerts=1 +deleteAlerts=1 #### system capacity commands listCapacity=3 @@ -271,6 +281,7 @@ listAsyncJobs=15 #### storage pools commands listStoragePools=3 +listStorageProviders=3 createStoragePool=1 updateStoragePool=1 deleteStoragePool=1 @@ -326,6 +337,11 @@ addNicToVirtualMachine=15 removeNicFromVirtualMachine=15 updateDefaultNicForVirtualMachine=15 +#### +addIpToNic=15 +removeIpFromNic=15 +listNics=15 + #### SSH key pair commands registerSSHKeyPair=15 createSSHKeyPair=15 @@ -513,6 +529,12 @@ listNiciraNvpDeviceNetworks=1 # Not implemented (yet) #configureNiciraNvpDevice=1 +#### bigswitch vns commands + +addBigSwitchVnsDevice=1 +deleteBigSwitchVnsDevice=1 +listBigSwitchVnsDevices=1 + #### host simulator commands configureSimulator=1 @@ -525,3 +547,44 @@ listApis=15 getApiLimit=15 resetApiLimit=1 + +#### Region commands +addRegion=1 +updateRegion=1 +removeRegion=1 +listRegions=15 + +#### GSLB (Global Server Load Balancing) commands +createGlobalLoadBalancerRule=15 +deleteGlobalLoadBalancerRule=15 +updateGlobalLoadBalancerRule=15 +listGlobalLoadBalancerRules=15 +assignToGlobalLoadBalancerRule=15 +removeFromGlobalLoadBalancerRule=15 + +### VM Snapshot commands +listVMSnapshot=15 +createVMSnapshot=15 +deleteVMSnapshot=15 +revertToSnapshot=15 + +#### Baremetal commands +addBaremetalHost=1 + +#### Affinity group commands +createAffinityGroup=15 +deleteAffinityGroup=15 +listAffinityGroups=15 +updateVMAffinityGroup=15 +listAffinityGroupTypes=15 + +#### Cisco Vnmc commands +addCiscoVnmcResource=1 +deleteCiscoVnmcResource=1 +listCiscoVnmcResources=1 + +#### Cisco Asa1000v commands +addCiscoAsa1000vResource=1 +deleteCiscoAsa1000vResource=1 +listCiscoAsa1000vResources=1 + diff --git a/client/tomcatconf/componentContext.xml.in b/client/tomcatconf/componentContext.xml.in new file mode 100644 index 000000000..7a469816f --- /dev/null +++ b/client/tomcatconf/componentContext.xml.in @@ -0,0 +1,269 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/tomcatconf/components-cloudzones.xml.in b/client/tomcatconf/components-cloudzones.xml.in deleted file mode 100755 index 4bd39108e..000000000 --- a/client/tomcatconf/components-cloudzones.xml.in +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - true - - - diff --git a/client/tomcatconf/components-nonoss.xml.in b/client/tomcatconf/components-nonoss.xml.in deleted file mode 100755 index fbfc5cc27..000000000 --- a/client/tomcatconf/components-nonoss.xml.in +++ /dev/null @@ -1,97 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - true - - - - - - diff --git a/client/tomcatconf/components.xml.in b/client/tomcatconf/components.xml.in deleted file mode 100755 index e9bd56a59..000000000 --- a/client/tomcatconf/components.xml.in +++ /dev/null @@ -1,303 +0,0 @@ - - - - - - - - - - - - - - - true - - - - 1 - 25 - 50000 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/client/tomcatconf/db-enc.properties.in b/client/tomcatconf/db-enc.properties.in deleted file mode 100644 index a9404fa49..000000000 --- a/client/tomcatconf/db-enc.properties.in +++ /dev/null @@ -1,68 +0,0 @@ -# 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. - -# management server clustering parameters, change cluster.node.IP to the machine IP address -# in which the management server(Tomcat) is running -cluster.node.IP=127.0.0.1 -cluster.servlet.port=9090 - -# CloudStack database settings -db.cloud.username=@DBUSER@ -db.cloud.password=@DBPW@ -db.cloud.host=@DBHOST@ -db.cloud.port=3306 -db.cloud.name=cloud - -# CloudStack database tuning parameters -db.cloud.maxActive=250 -db.cloud.maxIdle=30 -db.cloud.maxWait=10000 -db.cloud.autoReconnect=true -db.cloud.validationQuery=SELECT 1 -db.cloud.testOnBorrow=true -db.cloud.testWhileIdle=true -db.cloud.timeBetweenEvictionRunsMillis=40000 -db.cloud.minEvictableIdleTimeMillis=240000 -db.cloud.poolPreparedStatements=false -db.cloud.url.params=prepStmtCacheSize=517&cachePrepStmts=true - -# CloudStack database SSL settings -db.cloud.useSSL=false -db.cloud.keyStore= -db.cloud.keyStorePassword= -db.cloud.trustStore= -db.cloud.trustStorePassword= - -# Encryption Settings -db.cloud.encryption.type=file -db.cloud.encrypt.secret=password - -# usage database settings -db.usage.username=@DBUSER@ -db.usage.password=@DBPW@ -db.usage.host=@DBHOST@ -db.usage.port=3306 -db.usage.name=cloud_usage - -# usage database tuning parameters -db.usage.maxActive=100 -db.usage.maxIdle=30 -db.usage.maxWait=10000 -db.usage.autoReconnect=true - -# awsapi database settings -db.awsapi.name=cloudbridge diff --git a/client/tomcatconf/db.properties.in b/client/tomcatconf/db.properties.in index e38366706..e159907cb 100644 --- a/client/tomcatconf/db.properties.in +++ b/client/tomcatconf/db.properties.in @@ -19,6 +19,7 @@ # in which the management server(Tomcat) is running cluster.node.IP=127.0.0.1 cluster.servlet.port=9090 +region.id=1 # CloudStack database settings db.cloud.username=@DBUSER@ @@ -65,6 +66,10 @@ db.usage.maxWait=10000 db.usage.autoReconnect=true # awsapi database settings +db.awsapi.username=@DBUSER@ +db.awsapi.password=@DBPW@ +db.awsapi.host=@DBHOST@ +db.awsapi.port=3306 db.awsapi.name=cloudbridge # Simulator database settings diff --git a/client/tomcatconf/environment.properties.in b/client/tomcatconf/environment.properties.in index 49544a1ae..f2956cc4a 100644 --- a/client/tomcatconf/environment.properties.in +++ b/client/tomcatconf/environment.properties.in @@ -19,4 +19,4 @@ paths.script=@COMMONLIBDIR@ mount.parent=@MSMNTDIR@ -cloud-stack-components-specification=@COMPONENTS-SPEC@ +cloud-stack-components-specification=components.xml diff --git a/client/tomcatconf/log4j-cloud.xml.in b/client/tomcatconf/log4j-cloud.xml.in index 02f70998d..0e7f004eb 100755 --- a/client/tomcatconf/log4j-cloud.xml.in +++ b/client/tomcatconf/log4j-cloud.xml.in @@ -75,6 +75,34 @@ under the License. + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -105,7 +133,7 @@ under the License. - + @@ -142,6 +170,18 @@ under the License. + + + + + + + + + + + + diff --git a/client/tomcatconf/nonossComponentContext.xml.in b/client/tomcatconf/nonossComponentContext.xml.in new file mode 100644 index 000000000..2359ba806 --- /dev/null +++ b/client/tomcatconf/nonossComponentContext.xml.in @@ -0,0 +1,371 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/tomcatconf/server-ssl.xml.in b/client/tomcatconf/server-ssl.xml.in index 5d68f1d3d..37bc53d25 100755 --- a/client/tomcatconf/server-ssl.xml.in +++ b/client/tomcatconf/server-ssl.xml.in @@ -94,7 +94,7 @@ maxThreads="150" scheme="https" secure="true" URIEncoding="UTF-8" clientAuth="false" sslProtocol="TLS" keystoreType="JKS" - keystoreFile="/etc/cloud/management/cloudmanagementserver.keystore" + keystoreFile="/etc/cloudstack/management/cloudmanagementserver.keystore" keystorePass="vmops.com"/> @@ -200,7 +200,7 @@ maxThreads="150" scheme="https" secure="true" clientAuth="false" sslProtocol="TLS" keystoreType="JKS" - keystoreFile="/etc/cloud/management/cloudmanagementserver.keystore" + keystoreFile="/etc/cloudstack/management/cloudmanagementserver.keystore" keystorePass="vmops.com"/> diff --git a/client/tomcatconf/server.xml.in b/client/tomcatconf/server.xml.in deleted file mode 100644 index 30e6a6cd6..000000000 --- a/client/tomcatconf/server.xml.in +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/client/tomcatconf/simulatorComponentContext.xml.in b/client/tomcatconf/simulatorComponentContext.xml.in new file mode 100644 index 000000000..9d8c6c0ce --- /dev/null +++ b/client/tomcatconf/simulatorComponentContext.xml.in @@ -0,0 +1,236 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/client/tomcatconf/tomcat6-nonssl.conf.in b/client/tomcatconf/tomcat6-nonssl.conf.in index c9342e0ac..4a9a70f61 100644 --- a/client/tomcatconf/tomcat6-nonssl.conf.in +++ b/client/tomcatconf/tomcat6-nonssl.conf.in @@ -41,7 +41,7 @@ CATALINA_TMPDIR="@MSENVIRON@/temp" # Use JAVA_OPTS to set java.library.path for libtcnative.so #JAVA_OPTS="-Djava.library.path=/usr/lib64" -JAVA_OPTS="-Djava.awt.headless=true -Dcom.sun.management.jmxremote.port=45219 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=@MSLOGDIR@ -XX:PermSize=128M" +JAVA_OPTS="-Djava.awt.headless=true -Dcom.sun.management.jmxremote.port=45219 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Xmx2g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=@MSLOGDIR@ -XX:PermSize=512M -XX:MaxPermSize=800m" # What user should run tomcat TOMCAT_USER="@MSUSER@" diff --git a/client/tomcatconf/tomcat6-ssl.conf.in b/client/tomcatconf/tomcat6-ssl.conf.in index ddca44fb3..0d2650871 100644 --- a/client/tomcatconf/tomcat6-ssl.conf.in +++ b/client/tomcatconf/tomcat6-ssl.conf.in @@ -40,7 +40,7 @@ CATALINA_TMPDIR="@MSENVIRON@/temp" # Use JAVA_OPTS to set java.library.path for libtcnative.so #JAVA_OPTS="-Djava.library.path=/usr/lib64" -JAVA_OPTS="-Djava.awt.headless=true -Djavax.net.ssl.trustStore=/etc/cloud/management/cloudmanagementserver.keystore -Djavax.net.ssl.trustStorePassword=vmops.com -Dcom.sun.management.jmxremote.port=45219 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=@MSLOGDIR@ -XX:PermSize=128M" +JAVA_OPTS="-Djava.awt.headless=true -Djavax.net.ssl.trustStore=/etc/cloudstack/management/cloudmanagementserver.keystore -Djavax.net.ssl.trustStorePassword=vmops.com -Dcom.sun.management.jmxremote.port=45219 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Xmx2g -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=@MSLOGDIR@ -XX:MaxPermSize=800m -XX:PermSize=512M" # What user should run tomcat TOMCAT_USER="@MSUSER@" diff --git a/cloud.spec b/cloud.spec deleted file mode 100644 index 9f46dd6fe..000000000 --- a/cloud.spec +++ /dev/null @@ -1,646 +0,0 @@ -# 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. - -%define __os_install_post %{nil} -%global debug_package %{nil} - -# DISABLE the post-percentinstall java repacking and line number stripping -# we need to find a way to just disable the java repacking and line number stripping, but not the autodeps - -Name: cloud -Summary: CloudStack IaaS Platform -Version: %{_ver} -#http://fedoraproject.org/wiki/PackageNamingGuidelines#Pre-Release_packages -%if "%{?_prerelease}" != "" -Release: 0.%{_build_number}%{dist}.%{_prerelease} -%else -Release: %{_rel}%{dist} -%endif -License: Apache License 2.0 -Vendor: CloudStack -Packager: CloudStack -Group: System Environment/Libraries -# FIXME do groups for every single one of the subpackages -Source0: %{name}-%{_ver}.tar.bz2 -BuildRoot: %{_tmppath}/%{name}-%{_ver}-%{release}-build - -%if 0%{?fedora} >= 17 -BuildRequires: java-1.7.0-openjdk-devel -%else -BuildRequires: java-1.6.0-openjdk-devel -%endif -BuildRequires: tomcat6 -BuildRequires: ws-commons-util -BuildRequires: jpackage-utils -BuildRequires: gcc -BuildRequires: glibc-devel -BuildRequires: /usr/bin/mkisofs -BuildRequires: MySQL-python - -%description -CloudStack is a highly-scalable elastic, open source, -intelligent IaaS cloud implementation. - -%package utils -Summary: CloudStack utility library -Requires: java >= 1.6.0 -Requires: python -Group: System Environment/Libraries -Obsoletes: vmops-utils < %{version}-%{release} -%description utils -Utility libraries and set of Java classes used -by CloudStack. - -%package client-ui -Summary: CloudStack management server UI -Requires: %{name}-client -Group: System Environment/Libraries -Obsoletes: vmops-client-ui < %{version}-%{release} -%description client-ui -The CloudStack management server is the central point of coordination, -management, and intelligence in CloudStack. This package -is a requirement of the %{name}-client package, which installs the -CloudStack management server. - -%package server -Summary: CloudStack server library -Requires: java >= 1.6.0 -Obsoletes: vmops-server < %{version}-%{release} -Requires: %{name}-utils = %{version}, %{name}-core = %{version}, %{name}-deps = %{version}, %{name}-scripts = %{version}, tomcat6-servlet-2.5-api -Group: System Environment/Libraries -%description server -The CloudStack server libraries provide a set of Java classes for CloudStack. - -%package scripts -Summary: CloudStack scripts -# FIXME nuke the archdependency -Requires: python -Requires: bash -Requires: bzip2 -Requires: gzip -Requires: unzip -Requires: /sbin/mount.nfs -Requires: openssh-clients -Requires: nfs-utils -Requires: wget -# there is a fsimage.so in the source code, which adds xen-libs as a dependence, needs to supress it, as rhel doesn't have this pacakge -AutoReqProv: no -Provides: cloud-agent-scripts = %{version}-%{release} -Obsoletes: cloud-agent-scripts < %{version}-%{release} -Group: System Environment/Libraries -%description scripts -This package contains common scripts used by the Agent and Management server - -%package python -Summary: CloudStack Python library -# FIXME nuke the archdependency -Requires: python -Group: System Environment/Libraries -%description python -The CloudStack Python library contains a few Python modules that the -CloudStack uses. - -%package deps -Summary: CloudStack library dependencies -Requires: java >= 1.6.0 -Requires: mysql-connector-java -Obsoletes: vmops-deps < %{version}-%{release} -Group: System Environment/Libraries -%description deps -This package contains a number of third-party dependencies -not shipped by distributions, required to run CloudStack - - -%package core -Summary: CloudStack core library -Requires: java >= 1.6.0 -Requires: %{name}-utils = %{version}, %{name}-deps = %{version} -Group: System Environment/Libraries -Obsoletes: vmops-core < %{version}-%{release} -%description core -The CloudStack core libraries provide a set of Java classes used -in CloudStack. - -%package client -Summary: CloudStack management server -# If GCJ is present, a setPerformanceSomething method fails to load Catalina -Conflicts: java-1.5.0-gcj-devel -Obsoletes: vmops-client < %{version}-%{release} -Obsoletes: cloud-premium < %{version}-%{release} -Requires: java >= 1.6.0 -Requires: %{name}-deps = %{version}, %{name}-utils = %{version}, %{name}-server = %{version} -Requires: %{name}-client-ui = %{version} -Requires: %{name}-setup = %{version} -Requires: %{name}-scripts = %{version} -Requires: %{name}-python = %{version} -Requires: %{name}-aws-api = %{version} -# for consoleproxy -# Requires: %{name}-agent -Requires: tomcat6 -Requires: ws-commons-util -Requires: jpackage-utils -Requires: sudo -Requires: /sbin/service -Requires: /sbin/chkconfig -Requires: /usr/bin/ssh-keygen -Requires: mkisofs -Requires: MySQL-python -Requires: python-paramiko -Requires: ipmitool -Requires: %{name}-utils = %{version} -%if 0%{?fedora} > 14 -Requires: apache-commons-dbcp -Requires: apache-commons-collections -Requires: jakarta-commons-httpclient -Requires: jakarta-taglibs-standard -Requires: mysql-connector-java -%endif - -Group: System Environment/Libraries -%description client -The CloudStack management server is the central point of coordination, -management, and intelligence in CloudStack and installs the management server. - -%package setup -Summary: CloudStack setup tools -Obsoletes: vmops-setup < %{version}-%{release} -Requires: java >= 1.6.0 -Requires: python -Requires: MySQL-python -Requires: %{name}-utils = %{version} -Requires: %{name}-server = %{version} -Requires: %{name}-deps = %{version} -Requires: %{name}-python = %{version} -Group: System Environment/Libraries -%description setup -The CloudStack setup tools let you set up your Management Server and Usage Server. - -%package agent-libs -Summary: CloudStack agent libraries -Requires: java >= 1.6.0 -Requires: %{name}-utils = %{version}, %{name}-core = %{version}, %{name}-deps = %{version} -Requires: commons-httpclient -Requires: jakarta-commons-logging -Requires: jpackage-utils -Group: System Environment/Libraries -%description agent-libs -The CloudStack agent libraries are used by the KVM Agent - -%package agent -Summary: CloudStack agent -Obsoletes: vmops-agent < %{version}-%{release} -Obsoletes: vmops-console < %{version}-%{release} -Obsoletes: cloud-console < %{version}-%{release} -Obsoletes: cloud-vnet < %{version}-%{release} -Obsoletes: cloud-premium-agent < %{version}-%{release} -Requires: java >= 1.6.0 -Requires: %{name}-utils = %{version}, %{name}-core = %{version}, %{name}-deps = %{version} -Requires: %{name}-agent-libs = %{version} -Requires: %{name}-scripts = %{version} -Requires: python -Requires: %{name}-python = %{version} -Requires: commons-httpclient -Requires: jakarta-commons-logging -Requires: libvirt -Requires: /usr/sbin/libvirtd -Requires: jpackage-utils -Requires: /sbin/service -Requires: /sbin/chkconfig -Requires: jna -Requires: ebtables -Requires: jsvc -Requires: jakarta-commons-daemon -Requires: bridge-utils -Group: System Environment/Libraries - -Requires: kvm - -%if 0%{?fedora} >= 14 && 0%{?fedora} != 16 -Requires: cloud-qemu-kvm -Requires: cloud-qemu-img -%endif - -%if 0%{?rhel} >= 5 -Requires: qemu-img -%endif - -Requires: libcgroup -%if 0%{?fedora} >= 16 -Requires: libcgroup-tools -%endif -Requires: /usr/bin/uuidgen -Requires: rsync -Requires: /bin/egrep -Requires: /sbin/ip -Requires: vconfig -Group: System Environment/Libraries -%description agent -The CloudStack agent is in charge of managing KVM shared computing resources in -a CloudStack-powered cloud. Install this package if this computer -will participate in your cloud. - -%package baremetal-agent -Summary: CloudStack baremetal agent -Requires: PING -Requires: tftp-server -Requires: xinetd -Requires: syslinux -Requires: chkconfig -Requires: dhcp -Group: System Environment/Libraries -%description baremetal-agent -The CloudStack baremetal agent - -%package cli -Summary: CloudStack command line tools -Requires: python -Group: System Environment/Libraries -%description cli -The CloudStack command line tools contain a few Python modules that can call cloudStack APIs. - -%package usage -Summary: CloudStack usage monitor -Obsoletes: vmops-usage < %{version}-%{release} -Requires: java >= 1.6.0 -Requires: %{name}-utils = %{version}, %{name}-core = %{version}, %{name}-deps = %{version}, %{name}-server = %{version} -Requires: %{name}-setup = %{version} -Requires: %{name}-client = %{version} -Requires: jsvc -License: Apache License 2.0 -Group: System Environment/Libraries -%description usage -The CloudStack usage monitor provides usage accounting across the entire cloud for -cloud operators to charge based on usage parameters. - -%package aws-api -Summary: CloudStack CloudBridge -Group: System Environment/Libraries -Requires: java >= 1.6.0 -Requires: tomcat6 -Requires: %{name}-deps = %{version} -%if 0%{?fedora} > 15 -Requires: apache-commons-lang -%endif -%if 0%{?rhel} >= 5 -Requires: jakarta-commons-lang -%endif -Obsoletes: cloud-bridge < %{version}-%{release} -%description aws-api -This is the CloudStack CloudBridge - -%prep - -echo Doing CloudStack build - -%setup -q -n %{name}-%{_ver} - -%build - -# this fixes the /usr/com bug on centos5 -%define _localstatedir /var -%define _sharedstatedir /var/lib -./waf configure --prefix=%{_prefix} --libdir=%{_libdir} --bindir=%{_bindir} --javadir=%{_javadir} --sharedstatedir=%{_sharedstatedir} --localstatedir=%{_localstatedir} --sysconfdir=%{_sysconfdir} --mandir=%{_mandir} --docdir=%{_docdir}/%{name}-%{version} --with-tomcat=%{_datadir}/tomcat6 --tomcat-user=%{name} --fast --build-number=%{_ver}-%{release} --package-version=%{_ver} -./waf build --build-number=%{?_build_number} --package-version=%{_ver} - -%install -[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT} -# we put the build number again here, otherwise state checking will cause an almost-full recompile -./waf install --destdir=$RPM_BUILD_ROOT --nochown --build-number=%{?_build_number} -rm $RPM_BUILD_ROOT/etc/rc.d/init.d/cloud-console-proxy -rm $RPM_BUILD_ROOT/usr/bin/cloud-setup-console-proxy -rm $RPM_BUILD_ROOT/usr/libexec/console-proxy-runner -ant deploy-rpm-install -Drpm.install.dir=$RPM_BUILD_ROOT - -%clean - -[ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT} - - -%preun client -/sbin/service %{name}-management stop || true -if [ "$1" == "0" ] ; then - /sbin/chkconfig --del %{name}-management > /dev/null 2>&1 || true - /sbin/service %{name}-management stop > /dev/null 2>&1 || true -fi - -%pre aws-api -id %{name} > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \ - -r -s /bin/sh -d %{_sharedstatedir}/%{name}/management %{name}|| true - -rm -rf %{_localstatedir}/cache/%{name} -# user harcoded here, also hardcoded on wscript - -%pre client-ui -if [ -d %{_datadir}/%{name}/management/webapps/client/ ]; then - pushd /tmp &>/dev/null - file=cloud-ui-backup-%(date +%%F).tar.bz2 - cp -r %{_datadir}/%{name}/management/webapps/client/ . - tar cjf "$file" client/ - rm -rf client/ - mkdir -p /usr/share/cloud/ui-backup/ - mv "$file" /usr/share/cloud/ui-backup/ - popd &>/dev/null -fi - -%preun usage -if [ "$1" == "0" ] ; then - /sbin/chkconfig --del %{name}-usage > /dev/null 2>&1 || true - /sbin/service %{name}-usage stop > /dev/null 2>&1 || true -fi - -%pre usage -id %{name} > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \ - -r -s /bin/sh -d %{_sharedstatedir}/%{name}/management %{name}|| true -# user harcoded here, also hardcoded on wscript - -%post usage -if [ "$1" == "1" ] ; then - /sbin/chkconfig --add %{name}-usage > /dev/null 2>&1 || true - /sbin/chkconfig --level 345 %{name}-usage on > /dev/null 2>&1 || true -else - /sbin/service %{name}-usage condrestart >/dev/null 2>&1 || true -fi - -%preun agent -if [ "$1" == "0" ] ; then - /sbin/chkconfig --del %{name}-agent > /dev/null 2>&1 || true - /sbin/service %{name}-agent stop > /dev/null 2>&1 || true -fi - -%post agent -if [ "$1" == "1" ] ; then - /sbin/chkconfig --add %{name}-agent > /dev/null 2>&1 || true - /sbin/chkconfig --level 345 %{name}-agent on > /dev/null 2>&1 || true -else - /sbin/service %{name}-agent condrestart >/dev/null 2>&1 || true -fi - -if [ -x /etc/sysconfig/modules/kvm.modules ] ; then - /bin/sh /etc/sysconfig/modules/kvm.modules -fi - -%post client - /sbin/chkconfig --add %{name}-management > /dev/null 2>&1 || true - /sbin/chkconfig --level 345 %{name}-management on > /dev/null 2>&1 || true - - root=/usr/share/cloud/bridge - target=/usr/share/cloud/management - - mkdir -p $target/webapps7080 - if [ ! -h $target/webapps7080/awsapi ]; then - ln -sf $root/webapps7080/awsapi $target/webapps7080/awsapi - fi - -# jars=`ls $root/lib` -# for j in $jars -# do -# cp -f $root/lib/$j $root/webapps/awsapi/WEB-INF/lib/ -# done - - confs="cloud-bridge.properties ec2-service.properties" - for c in $confs - do - cp -f $root/conf/$c $target/conf - done - -%files utils -%defattr(0644,root,root,0755) -%{_javadir}/%{name}-utils.jar -%{_javadir}/%{name}-api.jar -%attr(0755,root,root) %{_bindir}/cloud-sccs -%attr(0755,root,root) %{_bindir}/cloud-gitrevs -%doc %{_docdir}/%{name}-%{version}/version-info -%doc LICENSE -%doc NOTICE - -%files client-ui -%defattr(0644,root,root,0755) -%{_datadir}/%{name}/management/webapps/client/* -%doc LICENSE -%doc NOTICE - -%files server -%defattr(0644,root,root,0755) -%{_javadir}/%{name}-server.jar -%{_javadir}/%{name}-ovm.jar -%{_javadir}/%{name}-dp-user-concentrated-pod.jar -%{_javadir}/%{name}-dp-user-dispersing.jar -%{_javadir}/%{name}-host-allocator-random.jar -%{_javadir}/%{name}-plugin-ovs.jar -%{_javadir}/%{name}-storage-allocator-random.jar -%{_javadir}/%{name}-user-authenticator-ldap.jar -%{_javadir}/%{name}-user-authenticator-md5.jar -%{_javadir}/%{name}-user-authenticator-plaintext.jar -%{_javadir}/%{name}-plugin-hypervisor-xen.jar -%{_javadir}/%{name}-plugin-elb.jar -%{_javadir}/%{name}-plugin-nicira-nvp.jar -%config(noreplace) %{_sysconfdir}/%{name}/server/* -%doc LICENSE -%doc NOTICE - -%files scripts -%defattr(-,root,root,-) -%{_libdir}/%{name}/common/scripts/* -# maintain the following list in sync with files scripts -%{_libdir}/%{name}/common/vms/systemvm.zip -%{_libdir}/%{name}/common/vms/systemvm.iso -%doc LICENSE -%doc NOTICE - -%files deps -%defattr(0644,root,root,0755) -%{_javadir}/axiom-*.jar -%{_javadir}/axis2-*.jar -%{_javadir}/antlr*.jar -%{_javadir}/XmlSchema-*.jar -%{_javadir}/json-simple*.jar -%{_javadir}/neethi*.jar -%{_javadir}/woden*.jar -%{_javadir}/xercesImpl*.jar -%{_javadir}/xml-apis*.jar -%{_javadir}/dom4j*.jar -%{_javadir}/javassist*.jar -%{_javadir}/commons-fileupload*.jar -%{_javadir}/commons-codec-1.6.jar -%{_javadir}/commons-dbcp-1.4.jar -%{_javadir}/commons-pool-1.6.jar -%{_javadir}/gson-1.7.1.jar -%{_javadir}/CAStorSDK-*.jar -%{_javadir}/backport-util-concurrent-3.1.jar -%{_javadir}/ehcache-1.5.0.jar -%{_javadir}/httpcore-4.0.jar -%{_javadir}/mail-1.4.jar -%{_javadir}/activation-1.1.jar -%{_javadir}/xapi-5.6.100-1-SNAPSHOT.jar -%{_javadir}/log4j-*.jar -%{_javadir}/apache-log4j-extras-1.1.jar -%{_javadir}/trilead-ssh2-build213-svnkit-1.3-patch.jar -%{_javadir}/cglib-nodep-2.2.2.jar -%{_javadir}/xmlrpc-common-3.*.jar -%{_javadir}/xmlrpc-client-3.*.jar -%{_javadir}/wsdl4j-1.6.2.jar -%{_javadir}/jsch-0.1.42.jar -%{_javadir}/jasypt-1.*.jar -%{_javadir}/commons-configuration-1.8.jar -%{_javadir}/ejb-api-3.0.jar -%{_javadir}/axis2-1.5.1.jar -%{_javadir}/commons-discovery-0.5.jar -%{_javadir}/jstl-1.2.jar -%{_javadir}/javax.persistence-2.0.0.jar -%{_javadir}/bcprov-jdk16-1.45.jar -%doc LICENSE -%doc NOTICE - -%files core -%defattr(0644,root,root,0755) -%{_javadir}/%{name}-core.jar -%doc LICENSE -%doc NOTICE - -%files python -%defattr(0644,root,root,0755) -%{_prefix}/lib*/python*/site-packages/%{name}* -%attr(0755,root,root) %{_bindir}/cloud-external-ipallocator.py -%attr(0755,root,root) %{_initrddir}/cloud-ipallocator -%dir %attr(0770,root,root) %{_localstatedir}/log/%{name}/ipallocator -%doc LICENSE -%doc NOTICE - -%files setup -%attr(0755,root,root) %{_bindir}/%{name}-setup-databases -%attr(0755,root,root) %{_bindir}/%{name}-migrate-databases -%attr(0755,root,root) %{_bindir}/%{name}-set-guest-password -%attr(0755,root,root) %{_bindir}/%{name}-set-guest-sshkey -%attr(0755,root,root) %{_bindir}/%{name}-sysvmadm -%attr(0755,root,root) %{_bindir}/%{name}-setup-encryption -%dir %{_datadir}/%{name}/setup -%{_datadir}/%{name}/setup/*.sql -%{_datadir}/%{name}/setup/db/*.sql -%{_datadir}/%{name}/setup/*.sh -%{_datadir}/%{name}/setup/server-setup.xml -%doc LICENSE -%doc NOTICE - -%files client -%defattr(0644,root,root,0775) -%config(noreplace) %{_sysconfdir}/%{name}/management -%config(noreplace) %attr(0640,root,%{name}) %{_sysconfdir}/%{name}/management/db.properties -%config(noreplace) %{_sysconfdir}/%{name}/management/log4j-%{name}.xml -%config(noreplace) %{_sysconfdir}/%{name}/management/tomcat6.conf -%dir %attr(0770,root,%{name}) %{_sysconfdir}/%{name}/management/Catalina -%dir %attr(0770,root,%{name}) %{_sysconfdir}/%{name}/management/Catalina/localhost -%dir %attr(0770,root,%{name}) %{_sysconfdir}/%{name}/management/Catalina/localhost/client -%config(noreplace) %{_sysconfdir}/sysconfig/%{name}-management -%attr(0755,root,root) %{_initrddir}/%{name}-management -%dir %{_datadir}/%{name}/management -%{_datadir}/%{name}/management/* -%attr(0755,root,root) %{_bindir}/%{name}-setup-management -%attr(0755,root,root) %{_bindir}/%{name}-update-xenserver-licenses -%dir %attr(0770,root,%{name}) %{_sharedstatedir}/%{name}/mnt -%dir %attr(0770,%{name},%{name}) %{_sharedstatedir}/%{name}/management -%dir %attr(0770,root,%{name}) %{_localstatedir}/cache/%{name}/management -%dir %attr(0770,root,%{name}) %{_localstatedir}/cache/%{name}/management/work -%dir %attr(0770,root,%{name}) %{_localstatedir}/cache/%{name}/management/temp -%dir %attr(0770,root,%{name}) %{_localstatedir}/log/%{name}/management -%dir %attr(0770,root,%{name}) %{_localstatedir}/log/%{name}/agent -%doc LICENSE -%doc NOTICE - -%files agent-libs -%defattr(0644,root,root,0755) -%{_javadir}/%{name}-agent.jar -%{_javadir}/%{name}-plugin-hypervisor-kvm.jar -%{_javadir}/libvirt-0.4.9.jar -%doc LICENSE -%doc NOTICE - -%files agent -%defattr(0644,root,root,0755) -%config(noreplace) %{_sysconfdir}/%{name}/agent/agent.properties -%config(noreplace) %{_sysconfdir}/%{name}/agent/developer.properties.template -%config(noreplace) %{_sysconfdir}/%{name}/agent/environment.properties -%config(noreplace) %{_sysconfdir}/%{name}/agent/log4j-%{name}.xml -%attr(0755,root,root) %{_initrddir}/%{name}-agent -%attr(0755,root,root) %{_bindir}/%{name}-setup-agent -%attr(0755,root,root) %{_bindir}/%{name}-ssh -%dir %attr(0770,root,root) %{_localstatedir}/log/%{name}/agent -%doc LICENSE -%doc NOTICE - -%files cli -%{_bindir}/%{name}-tool -%{_bindir}/cloudvoladm -%{_bindir}/cloud-grab-dependent-library-versions -%config(noreplace) %{_sysconfdir}/%{name}/cli/commands.xml -%dir %{_prefix}/lib*/python*/site-packages/%{name}tool -%{_prefix}/lib*/python*/site-packages/%{name}tool/* -%{_prefix}/lib*/python*/site-packages/%{name}apis.py -%doc LICENSE -%doc NOTICE - -%files baremetal-agent -%attr(0755,root,root) %{_bindir}/cloud-setup-baremetal -%doc LICENSE -%doc NOTICE - -%files usage -%defattr(0644,root,root,0775) -%{_javadir}/%{name}-usage.jar -%attr(0755,root,root) %{_initrddir}/%{name}-usage -%dir %attr(0770,root,%{name}) %{_localstatedir}/log/%{name}/usage -%config(noreplace) %{_sysconfdir}/%{name}/usage/usage-components.xml -%config(noreplace) %{_sysconfdir}/%{name}/usage/log4j-%{name}_usage.xml -%config(noreplace) %attr(0640,root,%{name}) %{_sysconfdir}/%{name}/usage/db.properties -%doc LICENSE -%doc NOTICE - -%files aws-api -%defattr(0644,cloud,cloud,0755) -%{_datadir}/cloud/bridge/conf/* -%{_datadir}/cloud/bridge/webapps7080/* -%attr(0644,root,root) %{_datadir}/cloud/setup/bridge/db/* -%attr(0755,root,root) %{_bindir}/cloudstack-aws-api-register -%attr(0755,root,root) %{_bindir}/cloud-setup-bridge -%doc LICENSE -%doc NOTICE - -%changelog -* Mon Nov 19 2012 Satoshi Kobayashi 4.0.1 -- adding dependency bridge-utils to fix a system requirement - -* Fri Sep 14 2012 Marcus Sorensen 4.0.1 -- adding dependency jakarta-commons-daemon to fix "cannot find daemon loader" - -* Thu Aug 16 2012 Marcus Sorensen 4.0 -- rearranged files sections to match currently built files - -* Mon May 3 2010 Manuel Amador (Rudd-O) 1.9.12 -- Bump version for RC4 release - -* Fri Apr 30 2010 Manuel Amador (Rudd-O) 1.9.11 -- Rename to CloudStack everywhere - -* Wed Apr 28 2010 Manuel Amador (Rudd-O) 1.9.10 -- FOSS release - -* Mon Apr 05 2010 Manuel Amador (Rudd-O) 1.9.8 -- RC3 branched - -* Wed Feb 17 2010 Manuel Amador (Rudd-O) 1.9.7 -- First initial broken-up release - - diff --git a/console-proxy/conf/agent.properties b/console-proxy/conf/agent.properties deleted file mode 100644 index 4e217f211..000000000 --- a/console-proxy/conf/agent.properties +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -instance=ConsoleProxy -resource=com.cloud.agent.resource.consoleproxy.ConsoleProxyResource diff --git a/console-proxy/conf/log4j-cloud.xml b/console-proxy/conf/log4j-cloud.xml deleted file mode 100644 index 5b31c9db9..000000000 --- a/console-proxy/conf/log4j-cloud.xml +++ /dev/null @@ -1,102 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/console-proxy/pom.xml b/console-proxy/pom.xml deleted file mode 100644 index 0e12db090..000000000 --- a/console-proxy/pom.xml +++ /dev/null @@ -1,246 +0,0 @@ - - - 4.0.0 - cloud-console-proxy - Apache CloudStack Console Proxy - - org.apache.cloudstack - cloudstack - 4.1.0-SNAPSHOT - - - mkisofs - - - - log4j - log4j - ${cs.log4j.version} - - - com.google.code.gson - gson - ${cs.gson.version} - - - commons-codec - commons-codec - ${cs.codec.version} - - - - org.apache.cloudstack - cloud-agent - ${project.version} - - - org.apache.cloudstack - cloud-patches - ${project.version} - pom - - - - install - src - - - certs - - realhostip.csr - - - - - - maven-assembly-plugin - 2.3 - - systemvm - false - - systemvm-descriptor.xml - - - - - make-systemvm - package - - single - - - - - - maven-resources-plugin - 2.6 - - - copy-resources - - package - - copy-resources - - - dist - - - target - - systemvm.zip - - - - ../patches/systemvm/debian/config/root/.ssh - - authorized_keys - - - - - - - - - maven-antrun-plugin - 1.7 - - - generate-resource - generate-resources - - run - - - - - - - - - - - - - - - - genisoimage - - - /usr/bin/genisoimage - - - - genisoimage - - - - vmware - - - nonoss - - - - - org.apache.cloudstack - cloud-plugin-hypervisor-vmware - ${project.version} - - - org.apache.cloudstack - cloud-vmware-base - ${project.version} - - - - - systemvm - - - systemvm - - - - - - org.codehaus.mojo - exec-maven-plugin - 1.2.1 - - - package - - exec - - - - - ${mkisofs} - dist - - -quiet - -r - -o - systemvm.iso - systemvm.zip - cloud-scripts.tgz - authorized_keys - - - - - - - - - diff --git a/console-proxy/scripts/_run.sh b/console-proxy/scripts/_run.sh deleted file mode 100755 index e408378af..000000000 --- a/console-proxy/scripts/_run.sh +++ /dev/null @@ -1,63 +0,0 @@ -#!/usr/bin/env bash -# 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. - - - - - -#run.sh runs the console proxy. - -# make sure we delete the old files from the original template -rm console-proxy.jar -rm console-common.jar -rm conf/cloud.properties - -set -x - -CP=./:./conf -for file in *.jar -do - CP=${CP}:$file -done -keyvalues= - -CMDLINE=$(cat /var/cache/cloud/cmdline) - -#CMDLINE="graphical utf8 eth0ip=0.0.0.0 eth0mask=255.255.255.0 eth1ip=192.168.140.40 eth1mask=255.255.255.0 eth2ip=172.24.0.50 eth2mask=255.255.0.0 gateway=172.24.0.1 dns1=72.52.126.11 template=domP dns2=72.52.126.12 host=192.168.1.142 port=8250 mgmtcidr=192.168.1.0/24 localgw=192.168.140.1 zone=5 pod=5" -for i in $CMDLINE - do - KEY=$(echo $i | cut -s -d= -f1) - VALUE=$(echo $i | cut -s -d= -f2) - [ "$KEY" == "" ] && continue - case $KEY in - *) - keyvalues="${keyvalues} $KEY=$VALUE" - esac - done - -tot_mem_k=$(cat /proc/meminfo | grep MemTotal | awk '{print $2}') -let "tot_mem_m=tot_mem_k>>10" -let "eightypcnt=$tot_mem_m*8/10" -let "maxmem=$tot_mem_m-80" - -if [ $maxmem -gt $eightypcnt ] -then - maxmem=$eightypcnt -fi - -java -Djavax.net.ssl.trustStore=./certs/realhostip.keystore -mx${maxmem}m -cp $CP com.cloud.agent.AgentShell $keyvalues $@ diff --git a/console-proxy/src/com/cloud/consoleproxy/ConsoleProxyPasswordBasedEncryptor.java b/console-proxy/src/com/cloud/consoleproxy/ConsoleProxyPasswordBasedEncryptor.java deleted file mode 100644 index 29826f0ea..000000000 --- a/console-proxy/src/com/cloud/consoleproxy/ConsoleProxyPasswordBasedEncryptor.java +++ /dev/null @@ -1,142 +0,0 @@ -// 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.consoleproxy; - -import java.security.InvalidKeyException; -import java.security.NoSuchAlgorithmException; - -import javax.crypto.BadPaddingException; -import javax.crypto.Cipher; -import javax.crypto.IllegalBlockSizeException; -import javax.crypto.NoSuchPaddingException; -import javax.crypto.spec.SecretKeySpec; - -import org.apache.commons.codec.binary.Base64; -import org.apache.log4j.Logger; - -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - -/** - * - * A simple password based encyrptor based on DES. It can serialize simple POJO object into URL safe string - * and deserialize it back. - * - */ -public class ConsoleProxyPasswordBasedEncryptor { - private static final Logger s_logger = Logger.getLogger(ConsoleProxyPasswordBasedEncryptor.class); - - private String password; - private Gson gson; - - public ConsoleProxyPasswordBasedEncryptor(String password) { - this.password = password; - gson = new GsonBuilder().create(); - } - - public String encryptText(String text) { - if(text == null || text.isEmpty()) - return text; - - assert(password != null); - assert(!password.isEmpty()); - - try { - Cipher cipher = Cipher.getInstance("DES"); - int maxKeySize = 8; - SecretKeySpec keySpec = new SecretKeySpec(normalizeKey(password.getBytes(), maxKeySize), "DES"); - cipher.init(Cipher.ENCRYPT_MODE, keySpec); - byte[] encryptedBytes = cipher.doFinal(text.getBytes()); - return Base64.encodeBase64URLSafeString(encryptedBytes); - } catch (NoSuchAlgorithmException e) { - s_logger.error("Unexpected exception ", e); - return null; - } catch (NoSuchPaddingException e) { - s_logger.error("Unexpected exception ", e); - return null; - } catch (IllegalBlockSizeException e) { - s_logger.error("Unexpected exception ", e); - return null; - } catch (BadPaddingException e) { - s_logger.error("Unexpected exception ", e); - return null; - } catch (InvalidKeyException e) { - s_logger.error("Unexpected exception ", e); - return null; - } - } - - public String decryptText(String encryptedText) { - if(encryptedText == null || encryptedText.isEmpty()) - return encryptedText; - - assert(password != null); - assert(!password.isEmpty()); - - try { - Cipher cipher = Cipher.getInstance("DES"); - int maxKeySize = 8; - SecretKeySpec keySpec = new SecretKeySpec(normalizeKey(password.getBytes(), maxKeySize), "DES"); - cipher.init(Cipher.DECRYPT_MODE, keySpec); - - byte[] encryptedBytes = Base64.decodeBase64(encryptedText); - return new String(cipher.doFinal(encryptedBytes)); - } catch (NoSuchAlgorithmException e) { - s_logger.error("Unexpected exception ", e); - return null; - } catch (NoSuchPaddingException e) { - s_logger.error("Unexpected exception ", e); - return null; - } catch (IllegalBlockSizeException e) { - s_logger.error("Unexpected exception ", e); - return null; - } catch (BadPaddingException e) { - s_logger.error("Unexpected exception ", e); - return null; - } catch (InvalidKeyException e) { - s_logger.error("Unexpected exception ", e); - return null; - } - } - - public String encryptObject(Class clz, T obj) { - if(obj == null) - return null; - - String json = gson.toJson(obj); - return encryptText(json); - } - - @SuppressWarnings("unchecked") - public T decryptObject(Class clz, String encrypted) { - if(encrypted == null || encrypted.isEmpty()) - return null; - - String json = decryptText(encrypted); - return (T)gson.fromJson(json, clz); - } - - private static byte[] normalizeKey(byte[] keyBytes, int keySize) { - assert(keySize > 0); - byte[] key = new byte[keySize]; - - for(int i = 0; i < keyBytes.length; i++) - key[i%keySize] ^= keyBytes[i]; - - return key; - } -} diff --git a/core/pom.xml b/core/pom.xml index 3d6356e56..0da695294 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -23,7 +23,7 @@ org.apache.cloudstack cloudstack - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT @@ -31,7 +31,11 @@ cloud-api ${project.version} - + + org.apache.cloudstack + cloud-engine-api + ${project.version} + commons-httpclient commons-httpclient diff --git a/core/src/com/cloud/agent/api/NetworkRulesVmSecondaryIpCommand.java b/core/src/com/cloud/agent/api/NetworkRulesVmSecondaryIpCommand.java new file mode 100644 index 000000000..ce4080878 --- /dev/null +++ b/core/src/com/cloud/agent/api/NetworkRulesVmSecondaryIpCommand.java @@ -0,0 +1,71 @@ +// 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.agent.api; + +import com.cloud.vm.VirtualMachine; + +public class NetworkRulesVmSecondaryIpCommand extends Command { + + private String vmName; + private VirtualMachine.Type type; + private String vmSecIp; + private String vmMac; + private String action; + + public NetworkRulesVmSecondaryIpCommand(String vmName, VirtualMachine.Type type) { + this.vmName = vmName; + this.type = type; + } + + + public NetworkRulesVmSecondaryIpCommand(String vmName, String vmMac, + String secondaryIp, boolean action) { + this.vmName = vmName; + this.vmMac = vmMac; + this.vmSecIp = secondaryIp; + if (action) { + this.action = "-A"; + } else { + this.action = "-D"; + } + } + + public String getVmName() { + return vmName; + } + + public VirtualMachine.Type getType() { + return type; + } + + public String getVmSecIp() { + return vmSecIp; + } + + public String getVmMac() { + return vmMac; + } + + public String getAction() { + return action; + } + + @Override + public boolean executeInSequence() { + return false; + } +} diff --git a/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java b/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java index 176720733..7148e0710 100755 --- a/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java +++ b/core/src/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java @@ -78,6 +78,7 @@ import com.cloud.network.LoadBalancerConfigurator; import com.cloud.network.rules.FirewallRule; import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.ComponentLifecycle; import com.cloud.utils.component.Manager; import com.cloud.utils.net.NetUtils; import com.cloud.utils.script.OutputInterpreter; @@ -223,7 +224,7 @@ private Answer execute(SetFirewallRulesCommand cmd) { final Script command = new Script(_firewallPath, _timeout, s_logger); command.add(routerIp); command.add("-F"); - + if (trafficType == FirewallRule.TrafficType.Egress){ command.add("-E"); } @@ -579,7 +580,7 @@ protected synchronized Answer execute (final DhcpEntryCommand cmd) { final Script command = new Script(_dhcpEntryPath, _timeout, s_logger); command.add("-r", cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP)); if (cmd.getVmIpAddress() != null) { - command.add("-v", cmd.getVmIpAddress()); + command.add("-v", cmd.getVmIpAddress()); } command.add("-m", cmd.getVmMac()); command.add("-n", cmd.getVmName()); @@ -594,11 +595,15 @@ protected synchronized Answer execute (final DhcpEntryCommand cmd) { if (cmd.getDefaultDns() != null) { command.add("-N", cmd.getDefaultDns()); } - + if (cmd.getVmIp6Address() != null) { command.add("-6", cmd.getVmIp6Address()); command.add("-u", cmd.getDuid()); } + + if (!cmd.isDefault()) { + command.add("-z"); + } final String result = command.execute(); return new Answer(cmd, result==null, result); @@ -858,35 +863,29 @@ private SetPortForwardingRulesAnswer execute(SetPortForwardingRulesVpcCommand cm } public void assignVpcIpToRouter(final String routerIP, final boolean add, final String pubIP, - final String nicname, final String gateway, final String netmask, final String subnet) throws Exception { - try { - String args = ""; - - if (add) { - args += " -A "; - } else { - args += " -D "; - } + final String nicname, final String gateway, final String netmask, final String subnet) throws InternalErrorException { + String args = ""; - args += " -l "; - args += pubIP; - args += " -c "; - args += nicname; - args += " -g "; - args += gateway; - args += " -m "; - args += netmask; - args += " -n "; - args += subnet; + if (add) { + args += " -A "; + } else { + args += " -D "; + } - String result = routerProxy("vpc_ipassoc.sh", routerIP, args); - if (result != null) { - throw new InternalErrorException("KVM plugin \"vpc_ipassoc\" failed:"+result); - } - } catch (Exception e) { - String msg = "Unable to assign public IP address due to " + e.toString(); - s_logger.warn(msg, e); - throw new Exception(msg); + args += " -l "; + args += pubIP; + args += " -c "; + args += nicname; + args += " -g "; + args += gateway; + args += " -m "; + args += netmask; + args += " -n "; + args += subnet; + + String result = routerProxy("vpc_ipassoc.sh", routerIP, args); + if (result != null) { + throw new InternalErrorException("KVM plugin \"vpc_ipassoc\" failed:"+result); } } @@ -1168,7 +1167,11 @@ public String connect(final String ipAddress, final int port) { public String getName() { return _name; } - + + @Override + public void setName(String name) { + _name = name; + } @Override @@ -1176,14 +1179,36 @@ public boolean start() { return true; } - - @Override public boolean stop() { return true; } + @Override + public int getRunLevel() { + return ComponentLifecycle.RUN_LEVEL_COMPONENT; + } + + public void setRunLevel() { + } + @Override + public void setConfigParams(Map params) { + // TODO Auto-generated method stub + + } + + @Override + public Map getConfigParams() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setRunLevel(int level) { + // TODO Auto-generated method stub + + } } diff --git a/core/src/com/cloud/alert/AlertManager.java b/core/src/com/cloud/alert/AlertManager.java index a24e18c83..b6d005a5f 100755 --- a/core/src/com/cloud/alert/AlertManager.java +++ b/core/src/com/cloud/alert/AlertManager.java @@ -27,26 +27,27 @@ public interface AlertManager extends Manager { public static final short ALERT_TYPE_VIRTUAL_NETWORK_PUBLIC_IP = CapacityVO.CAPACITY_TYPE_VIRTUAL_NETWORK_PUBLIC_IP; public static final short ALERT_TYPE_PRIVATE_IP = CapacityVO.CAPACITY_TYPE_PRIVATE_IP; public static final short ALERT_TYPE_SECONDARY_STORAGE = CapacityVO.CAPACITY_TYPE_SECONDARY_STORAGE; - public static final short ALERT_TYPE_HOST = 6; - public static final short ALERT_TYPE_USERVM = 7; - public static final short ALERT_TYPE_DOMAIN_ROUTER = 8; - public static final short ALERT_TYPE_CONSOLE_PROXY = 9; - public static final short ALERT_TYPE_ROUTING = 10; // lost connection to default route (to the gateway) - public static final short ALERT_TYPE_STORAGE_MISC = 11; // lost connection to default route (to the gateway) - public static final short ALERT_TYPE_USAGE_SERVER = 12; // lost connection to default route (to the gateway) - public static final short ALERT_TYPE_MANAGMENT_NODE = 13; // lost connection to default route (to the gateway) - public static final short ALERT_TYPE_DOMAIN_ROUTER_MIGRATE = 14; - public static final short ALERT_TYPE_CONSOLE_PROXY_MIGRATE = 15; - public static final short ALERT_TYPE_USERVM_MIGRATE = 16; - public static final short ALERT_TYPE_VLAN = 17; - public static final short ALERT_TYPE_SSVM = 18; - public static final short ALERT_TYPE_USAGE_SERVER_RESULT = 19; // Usage job result - public static final short ALERT_TYPE_STORAGE_DELETE = 20; - public static final short ALERT_TYPE_UPDATE_RESOURCE_COUNT = 21; // Generated when we fail to update the resource count - public static final short ALERT_TYPE_USAGE_SANITY_RESULT = 22; - public static final short ALERT_TYPE_DIRECT_ATTACHED_PUBLIC_IP = 23; - public static final short ALERT_TYPE_LOCAL_STORAGE = 24; - public static final short ALERT_TYPE_RESOURCE_LIMIT_EXCEEDED = 25; // Generated when the resource limit exceeds the limit. Currently used for recurring snapshots only + public static final short ALERT_TYPE_HOST = 7; + public static final short ALERT_TYPE_USERVM = 8; + public static final short ALERT_TYPE_DOMAIN_ROUTER = 9; + public static final short ALERT_TYPE_CONSOLE_PROXY = 10; + public static final short ALERT_TYPE_ROUTING = 11; // lost connection to default route (to the gateway) + public static final short ALERT_TYPE_STORAGE_MISC = 12; // lost connection to default route (to the gateway) + public static final short ALERT_TYPE_USAGE_SERVER = 13; // lost connection to default route (to the gateway) + public static final short ALERT_TYPE_MANAGMENT_NODE = 14; // lost connection to default route (to the gateway) + public static final short ALERT_TYPE_DOMAIN_ROUTER_MIGRATE = 15; + public static final short ALERT_TYPE_CONSOLE_PROXY_MIGRATE = 16; + public static final short ALERT_TYPE_USERVM_MIGRATE = 17; + public static final short ALERT_TYPE_VLAN = 18; + public static final short ALERT_TYPE_SSVM = 19; + public static final short ALERT_TYPE_USAGE_SERVER_RESULT = 20; // Usage job result + public static final short ALERT_TYPE_STORAGE_DELETE = 21; + public static final short ALERT_TYPE_UPDATE_RESOURCE_COUNT = 22; // Generated when we fail to update the resource + // count + public static final short ALERT_TYPE_USAGE_SANITY_RESULT = 23; + public static final short ALERT_TYPE_DIRECT_ATTACHED_PUBLIC_IP = 24; + public static final short ALERT_TYPE_LOCAL_STORAGE = 25; + public static final short ALERT_TYPE_RESOURCE_LIMIT_EXCEEDED = 26; // Generated when the resource limit exceeds the limit. Currently used for recurring snapshots only void clearAlert(short alertType, long dataCenterId, long podId); diff --git a/core/src/com/cloud/alert/AlertVO.java b/core/src/com/cloud/alert/AlertVO.java index f6089d650..3f014aa2b 100755 --- a/core/src/com/cloud/alert/AlertVO.java +++ b/core/src/com/cloud/alert/AlertVO.java @@ -28,9 +28,7 @@ import javax.persistence.Temporal; import javax.persistence.TemporalType; -import org.apache.cloudstack.api.Identity; import com.cloud.utils.db.GenericDao; -import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="alert") @@ -68,16 +66,19 @@ public class AlertVO implements Alert { @Temporal(TemporalType.TIMESTAMP) @Column(name="resolved", updatable=true, nullable=true) private Date resolved; - + @Column(name="uuid") private String uuid; + @Column(name="archived") + private boolean archived; + public AlertVO() { - this.uuid = UUID.randomUUID().toString(); + this.uuid = UUID.randomUUID().toString(); } public AlertVO(Long id) { this.id = id; - this.uuid = UUID.randomUUID().toString(); + this.uuid = UUID.randomUUID().toString(); } @Override @@ -103,12 +104,12 @@ public void setSubject(String subject) { } public Long getClusterId() { - return clusterId; - } - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - @Override + return clusterId; + } + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + @Override public Long getPodId() { return podId; } @@ -164,10 +165,19 @@ public void setResolved(Date resolved) { @Override public String getUuid() { - return this.uuid; + return this.uuid; } - + public void setUuid(String uuid) { - this.uuid = uuid; + this.uuid = uuid; + } + + @Override + public boolean getArchived() { + return archived; + } + + public void setArchived(Boolean archived) { + this.archived = archived; } } diff --git a/core/src/com/cloud/event/EventVO.java b/core/src/com/cloud/event/EventVO.java index ac46f24b2..2c30eadeb 100644 --- a/core/src/com/cloud/event/EventVO.java +++ b/core/src/com/cloud/event/EventVO.java @@ -29,74 +29,75 @@ import javax.persistence.Table; import javax.persistence.Transient; -import org.apache.cloudstack.api.Identity; import com.cloud.utils.db.GenericDao; -import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="event") public class EventVO implements Event { - @Id + @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") - private long id = -1; + private long id = -1; - @Column(name="type") - private String type; - - @Enumerated(value=EnumType.STRING) - @Column(name="state") + @Column(name="type") + private String type; + + @Enumerated(value=EnumType.STRING) + @Column(name="state") private State state = State.Completed; - @Column(name="description", length=1024) - private String description; + @Column(name="description", length=1024) + private String description; - @Column(name=GenericDao.CREATED_COLUMN) - private Date createDate; + @Column(name=GenericDao.CREATED_COLUMN) + private Date createDate; @Column(name="user_id") private long userId; - @Column(name="account_id") - private long accountId; + @Column(name="account_id") + private long accountId; @Column(name="domain_id") private long domainId; - @Column(name="level") - private String level = LEVEL_INFO; - - @Column(name="start_id") + @Column(name="level") + private String level = LEVEL_INFO; + + @Column(name="start_id") private long startId; - @Column(name="parameters", length=1024) - private String parameters; - - @Column(name="uuid") - private String uuid; - - @Transient - private int totalSize; - - public static final String LEVEL_INFO = "INFO"; - public static final String LEVEL_WARN = "WARN"; - public static final String LEVEL_ERROR = "ERROR"; - - public EventVO() { - this.uuid = UUID.randomUUID().toString(); - } - - public long getId() { - return id; - } - @Override + @Column(name="parameters", length=1024) + private String parameters; + + @Column(name="uuid") + private String uuid; + + @Column(name="archived") + private boolean archived; + + @Transient + private int totalSize; + + public static final String LEVEL_INFO = "INFO"; + public static final String LEVEL_WARN = "WARN"; + public static final String LEVEL_ERROR = "ERROR"; + + public EventVO() { + this.uuid = UUID.randomUUID().toString(); + } + + public long getId() { + return id; + } + @Override public String getType() { - return type; - } - public void setType(String type) { - this.type = type; - } - @Override + return type; + } + public void setType(String type) { + this.type = type; + } + @Override public State getState() { return state; } @@ -105,27 +106,27 @@ public void setState(State state) { this.state = state; } - @Override + @Override public String getDescription() { - return description; - } - public void setDescription(String description) { - this.description = description; - } - @Override + return description; + } + public void setDescription(String description) { + this.description = description; + } + @Override public Date getCreateDate() { - return createDate; - } - public void setCreatedDate(Date createdDate) { - createDate = createdDate; - } - @Override + return createDate; + } + public void setCreatedDate(Date createdDate) { + createDate = createdDate; + } + @Override public long getUserId() { - return userId; - } - public void setUserId(long userId) { - this.userId = userId; - } + return userId; + } + public void setUserId(long userId) { + this.userId = userId; + } @Override public long getAccountId() { return accountId; @@ -165,21 +166,29 @@ public void setStartId(long startId) { this.startId = startId; } - @Override + @Override public String getParameters() { - return parameters; - } - public void setParameters(String parameters) { - this.parameters = parameters; - } - - @Override - public String getUuid() { - return this.uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } + return parameters; + } + public void setParameters(String parameters) { + this.parameters = parameters; + } + + @Override + public String getUuid() { + return this.uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + @Override + public boolean getArchived() { + return archived; + } + + public void setArchived(Boolean archived) { + this.archived = archived; + } } diff --git a/core/src/com/cloud/event/dao/EventDao.java b/core/src/com/cloud/event/dao/EventDao.java index bfcb818f2..da5f47a90 100644 --- a/core/src/com/cloud/event/dao/EventDao.java +++ b/core/src/com/cloud/event/dao/EventDao.java @@ -30,4 +30,9 @@ public interface EventDao extends GenericDao { public List listOlderEvents(Date oldTime); EventVO findCompletedEvent(long startId); + + public List listToArchiveOrDeleteEvents(List ids, String type, Date olderThan, Long accountId); + + public void archiveEvents(List events); + } diff --git a/core/src/com/cloud/event/dao/EventDaoImpl.java b/core/src/com/cloud/event/dao/EventDaoImpl.java index abeefbe4f..6ba59c56b 100644 --- a/core/src/com/cloud/event/dao/EventDaoImpl.java +++ b/core/src/com/cloud/event/dao/EventDaoImpl.java @@ -22,6 +22,7 @@ import javax.ejb.Local; import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; import com.cloud.event.Event.State; import com.cloud.event.EventVO; @@ -29,23 +30,34 @@ import com.cloud.utils.db.GenericDaoBase; import com.cloud.utils.db.SearchBuilder; import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.Transaction; +import com.cloud.utils.db.SearchCriteria.Op; +@Component @Local(value={EventDao.class}) public class EventDaoImpl extends GenericDaoBase implements EventDao { - public static final Logger s_logger = Logger.getLogger(EventDaoImpl.class.getName()); - protected final SearchBuilder CompletedEventSearch; - - public EventDaoImpl () { - CompletedEventSearch = createSearchBuilder(); - CompletedEventSearch.and("state",CompletedEventSearch.entity().getState(),SearchCriteria.Op.EQ); - CompletedEventSearch.and("startId", CompletedEventSearch.entity().getStartId(), SearchCriteria.Op.EQ); - CompletedEventSearch.done(); - } + public static final Logger s_logger = Logger.getLogger(EventDaoImpl.class.getName()); + protected final SearchBuilder CompletedEventSearch; + protected final SearchBuilder ToArchiveOrDeleteEventSearch; - @Override - public List searchAllEvents(SearchCriteria sc, Filter filter) { - return listIncludingRemovedBy(sc, filter); - } + public EventDaoImpl () { + CompletedEventSearch = createSearchBuilder(); + CompletedEventSearch.and("state",CompletedEventSearch.entity().getState(),SearchCriteria.Op.EQ); + CompletedEventSearch.and("startId", CompletedEventSearch.entity().getStartId(), SearchCriteria.Op.EQ); + CompletedEventSearch.done(); + + ToArchiveOrDeleteEventSearch = createSearchBuilder(); + ToArchiveOrDeleteEventSearch.and("id", ToArchiveOrDeleteEventSearch.entity().getId(), Op.IN); + ToArchiveOrDeleteEventSearch.and("type", ToArchiveOrDeleteEventSearch.entity().getType(), Op.EQ); + ToArchiveOrDeleteEventSearch.and("accountId", ToArchiveOrDeleteEventSearch.entity().getAccountId(), Op.EQ); + ToArchiveOrDeleteEventSearch.and("createDateL", ToArchiveOrDeleteEventSearch.entity().getCreateDate(), Op.LT); + ToArchiveOrDeleteEventSearch.done(); + } + + @Override + public List searchAllEvents(SearchCriteria sc, Filter filter) { + return listIncludingRemovedBy(sc, filter); + } @Override public List listOlderEvents(Date oldTime) { @@ -53,9 +65,8 @@ public List listOlderEvents(Date oldTime) { SearchCriteria sc = createSearchCriteria(); sc.addAnd("createDate", SearchCriteria.Op.LT, oldTime); return listIncludingRemovedBy(sc, null); - } - + @Override public EventVO findCompletedEvent(long startId) { SearchCriteria sc = CompletedEventSearch.create(); @@ -63,4 +74,36 @@ public EventVO findCompletedEvent(long startId) { sc.setParameters("startId", startId); return findOneIncludingRemovedBy(sc); } + + @Override + public List listToArchiveOrDeleteEvents(List ids, String type, Date olderThan, Long accountId) { + SearchCriteria sc = ToArchiveOrDeleteEventSearch.create(); + if (ids != null) { + sc.setParameters("id", ids.toArray(new Object[ids.size()])); + } + if (type != null) { + sc.setParameters("type", type); + } + if (olderThan != null) { + sc.setParameters("createDateL", olderThan); + } + if (accountId != null) { + sc.setParameters("accountId", accountId); + } + return search(sc, null); + } + + @Override + public void archiveEvents(List events) { + + Transaction txn = Transaction.currentTxn(); + txn.start(); + for (EventVO event : events) { + event = lockRow(event.getId(), true); + event.setArchived(true); + update(event.getId(), event); + txn.commit(); + } + txn.close(); + } } diff --git a/core/src/com/cloud/event/dao/UsageEventDaoImpl.java b/core/src/com/cloud/event/dao/UsageEventDaoImpl.java index ea93d53e0..dafc8d4d5 100644 --- a/core/src/com/cloud/event/dao/UsageEventDaoImpl.java +++ b/core/src/com/cloud/event/dao/UsageEventDaoImpl.java @@ -25,6 +25,7 @@ import javax.ejb.Local; import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; import com.cloud.dc.Vlan; import com.cloud.event.EventTypes; @@ -38,6 +39,7 @@ import com.cloud.utils.db.SearchCriteria; import com.cloud.utils.db.Transaction; +@Component @Local(value={UsageEventDao.class}) public class UsageEventDaoImpl extends GenericDaoBase implements UsageEventDao { public static final Logger s_logger = Logger.getLogger(UsageEventDaoImpl.class.getName()); diff --git a/core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java b/core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java index 56e8e0a73..fafc0a33a 100644 --- a/core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java +++ b/core/src/com/cloud/hypervisor/HypervisorCapabilitiesVO.java @@ -59,6 +59,12 @@ public class HypervisorCapabilitiesVO implements HypervisorCapabilities { @Column(name="max_data_volumes_limit") private Integer maxDataVolumesLimit; + @Column(name="max_hosts_per_cluster") + private Integer maxHostsPerCluster; + + @Column(name="vm_snapshot_enabled") + private Boolean vmSnapshotEnabled; + protected HypervisorCapabilitiesVO() { this.uuid = UUID.randomUUID().toString(); } @@ -158,6 +164,23 @@ public void setMaxDataVolumesLimit(Integer maxDataVolumesLimit) { } @Override + public Integer getMaxHostsPerCluster() { + return maxHostsPerCluster; + } + + public void setMaxHostsPerCluster(Integer maxHostsPerCluster) { + this.maxHostsPerCluster = maxHostsPerCluster; + } + + public Boolean getVmSnapshotEnabled() { + return vmSnapshotEnabled; + } + + public void setVmSnapshotEnabled(Boolean vmSnapshotEnabled) { + this.vmSnapshotEnabled = vmSnapshotEnabled; + } + + @Override public boolean equals(Object obj) { if (obj instanceof HypervisorCapabilitiesVO) { return ((HypervisorCapabilitiesVO)obj).getId() == this.getId(); diff --git a/core/src/com/cloud/hypervisor/hyperv/resource/HypervDummyResourceBase.java b/core/src/com/cloud/hypervisor/hyperv/resource/HypervDummyResourceBase.java index 6e52924db..a66577a8a 100644 --- a/core/src/com/cloud/hypervisor/hyperv/resource/HypervDummyResourceBase.java +++ b/core/src/com/cloud/hypervisor/hyperv/resource/HypervDummyResourceBase.java @@ -16,6 +16,8 @@ // under the License. package com.cloud.hypervisor.hyperv.resource; +import java.util.Map; + import com.cloud.agent.api.Answer; import com.cloud.agent.api.Command; import com.cloud.agent.api.PingCommand; @@ -61,4 +63,34 @@ protected String getDefaultScriptsDir() { return null; } + @Override + public void setName(String name) { + // TODO Auto-generated method stub + + } + + @Override + public void setConfigParams(Map params) { + // TODO Auto-generated method stub + + } + + @Override + public Map getConfigParams() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getRunLevel() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void setRunLevel(int level) { + // TODO Auto-generated method stub + + } + } diff --git a/core/src/com/cloud/hypervisor/hyperv/resource/HypervResource.java b/core/src/com/cloud/hypervisor/hyperv/resource/HypervResource.java index ede6301d9..0f9b3dd9c 100755 --- a/core/src/com/cloud/hypervisor/hyperv/resource/HypervResource.java +++ b/core/src/com/cloud/hypervisor/hyperv/resource/HypervResource.java @@ -945,4 +945,34 @@ protected String getDefaultScriptsDir() { // TODO Auto-generated method stub return null; } + + @Override + public void setName(String name) { + // TODO Auto-generated method stub + + } + + @Override + public void setConfigParams(Map params) { + // TODO Auto-generated method stub + + } + + @Override + public Map getConfigParams() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getRunLevel() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void setRunLevel(int level) { + // TODO Auto-generated method stub + + } } diff --git a/core/src/com/cloud/network/resource/TrafficSentinelResource.java b/core/src/com/cloud/network/resource/TrafficSentinelResource.java index 22deccffd..7edb67bf0 100644 --- a/core/src/com/cloud/network/resource/TrafficSentinelResource.java +++ b/core/src/com/cloud/network/resource/TrafficSentinelResource.java @@ -313,4 +313,34 @@ private String getDateString(Date date){ DateFormat dfDate = new SimpleDateFormat("yyyyMMdd HH:mm:ss"); return dfDate.format(date); } + + @Override + public void setName(String name) { + // TODO Auto-generated method stub + + } + + @Override + public void setConfigParams(Map params) { + // TODO Auto-generated method stub + + } + + @Override + public Map getConfigParams() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getRunLevel() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void setRunLevel(int level) { + // TODO Auto-generated method stub + + } } \ No newline at end of file diff --git a/core/src/com/cloud/resource/DiskPreparer.java b/core/src/com/cloud/resource/DiskPreparer.java deleted file mode 100644 index 77b8f7c1b..000000000 --- a/core/src/com/cloud/resource/DiskPreparer.java +++ /dev/null @@ -1,42 +0,0 @@ -// 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.resource; - -import com.cloud.storage.VolumeVO; -import com.cloud.template.VirtualMachineTemplate.BootloaderType; -import com.cloud.utils.component.Adapter; - -/** - * DiskMounter mounts and unmounts disk for VMs - * to consume. - * - */ -public interface DiskPreparer extends Adapter { - /** - * Mounts a volumeVO and returns a path. - * - * @param vol - * @return - */ - public String mount(String vmName, VolumeVO vol, BootloaderType type); - - /** - * Unmounts - */ - public boolean unmount(String path); - -} diff --git a/core/src/com/cloud/resource/NetworkPreparer.java b/core/src/com/cloud/resource/NetworkPreparer.java deleted file mode 100644 index d7034535e..000000000 --- a/core/src/com/cloud/resource/NetworkPreparer.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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.resource; - -import com.cloud.utils.component.Adapter; - -/** - * Prepares the network for VM. - */ -public interface NetworkPreparer extends Adapter { - - String setup(String vnet); - - void cleanup(String vnet); -} diff --git a/core/src/com/cloud/resource/ServerResourceBase.java b/core/src/com/cloud/resource/ServerResourceBase.java index 9449b0585..e381fcbec 100755 --- a/core/src/com/cloud/resource/ServerResourceBase.java +++ b/core/src/com/cloud/resource/ServerResourceBase.java @@ -80,7 +80,7 @@ public boolean configure(final String name, Map params) throws _storageNic2 = getNetworkInterface(storageNic2); if (_privateNic == null) { - s_logger.error("Nics are not configured!"); + s_logger.warn("Nics are not specified in properties file/db, will try to autodiscover"); Enumeration nics = null; try { diff --git a/core/src/com/cloud/resource/storage/PrimaryStorageHeadResource.java b/core/src/com/cloud/resource/storage/PrimaryStorageHeadResource.java deleted file mode 100644 index 65297a39b..000000000 --- a/core/src/com/cloud/resource/storage/PrimaryStorageHeadResource.java +++ /dev/null @@ -1,52 +0,0 @@ -// 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.resource.storage; - -import com.cloud.agent.api.storage.CreateAnswer; -import com.cloud.agent.api.storage.CreateCommand; -import com.cloud.agent.api.storage.DestroyAnswer; -import com.cloud.agent.api.storage.DestroyCommand; -import com.cloud.agent.api.storage.DownloadAnswer; -import com.cloud.agent.api.storage.PrimaryStorageDownloadCommand; -import com.cloud.resource.ServerResource; - -/** - * a primary storage. - * - */ -public interface PrimaryStorageHeadResource extends ServerResource { - /** - * Downloads the template to the primary storage. - * @param cmd - * @return - */ - DownloadAnswer execute(PrimaryStorageDownloadCommand cmd); - - /** - * Creates volumes for the VM. - * @param cmd - * @return - */ - CreateAnswer execute(CreateCommand cmd); - - /** - * Destroys volumes for the VM. - * @param cmd - * @return - */ - DestroyAnswer execute(DestroyCommand cmd); -} diff --git a/core/src/com/cloud/storage/DiskOfferingVO.java b/core/src/com/cloud/storage/DiskOfferingVO.java index 5f4f18bcd..e4fc21c7c 100755 --- a/core/src/com/cloud/storage/DiskOfferingVO.java +++ b/core/src/com/cloud/storage/DiskOfferingVO.java @@ -311,4 +311,8 @@ public void setSortKey(int key) { public int getSortKey() { return sortKey; } + + public void setRecreatable(boolean recreatable) { + this.recreatable = recreatable; + } } diff --git a/core/src/com/cloud/storage/JavaStorageLayer.java b/core/src/com/cloud/storage/JavaStorageLayer.java index c4aa74a25..525d42997 100644 --- a/core/src/com/cloud/storage/JavaStorageLayer.java +++ b/core/src/com/cloud/storage/JavaStorageLayer.java @@ -250,6 +250,36 @@ public long getUsedSpace(String path) { File file = new File(path); return file.getTotalSpace() - file.getFreeSpace(); } + + @Override + public void setName(String name) { + // TODO Auto-generated method stub + + } + + @Override + public void setConfigParams(Map params) { + // TODO Auto-generated method stub + + } + + @Override + public Map getConfigParams() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getRunLevel() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void setRunLevel(int level) { + // TODO Auto-generated method stub + + } diff --git a/core/src/com/cloud/storage/SnapshotVO.java b/core/src/com/cloud/storage/SnapshotVO.java index c1c5f214d..78b96ec97 100644 --- a/core/src/com/cloud/storage/SnapshotVO.java +++ b/core/src/com/cloud/storage/SnapshotVO.java @@ -31,7 +31,7 @@ public class SnapshotVO implements Snapshot { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) @Column(name="id") - private long id = -1; + private long id; @Column(name="data_center_id") long dataCenterId; @@ -59,7 +59,7 @@ public class SnapshotVO implements Snapshot { @Expose @Column(name="status", updatable = true, nullable=false) @Enumerated(value=EnumType.STRING) - private State status; + private State state; @Column(name="snapshot_type") short snapshotType; @@ -103,7 +103,7 @@ public class SnapshotVO implements Snapshot { String uuid; public SnapshotVO() { - this.uuid = UUID.randomUUID().toString(); + this.uuid = UUID.randomUUID().toString(); } public SnapshotVO(long dcId, long accountId, long domainId, Long volumeId, Long diskOfferingId, String path, String name, short snapshotType, String typeDescription, long size, HypervisorType hypervisorType ) { @@ -117,11 +117,11 @@ public SnapshotVO(long dcId, long accountId, long domainId, Long volumeId, Long this.snapshotType = snapshotType; this.typeDescription = typeDescription; this.size = size; - this.status = State.Creating; + this.state = State.Allocated; this.prevSnapshotId = 0; this.hypervisorType = hypervisorType; this.version = "2.2"; - this.uuid = UUID.randomUUID().toString(); + this.uuid = UUID.randomUUID().toString(); } @Override @@ -138,6 +138,7 @@ public long getAccountId() { return accountId; } + @Override public long getDomainId() { return domainId; } @@ -161,7 +162,7 @@ public String getPath() { } public void setPath(String path) { - this.path = path; + this.path = path; } @Override @@ -174,7 +175,7 @@ public short getsnapshotType() { } @Override - public Type getType() { + public Type getRecurringType() { if (snapshotType < 0 || snapshotType >= Type.values().length) { return null; } @@ -199,7 +200,7 @@ public void setSecHostId(Long secHostId) { @Override public HypervisorType getHypervisorType() { - return hypervisorType; + return hypervisorType; } public void setSnapshotType(short snapshotType) { @@ -233,6 +234,7 @@ public void setVersion(String version) { this.version = version; } + @Override public Date getCreated() { return created; } @@ -241,30 +243,31 @@ public Date getRemoved() { return removed; } - @Override + @Override public State getState() { - return status; - } + return state; + } - public void setStatus(State status) { - this.status = status; - } - public String getBackupSnapshotId(){ - return backupSnapshotId; - } + public void setState(State state) { + this.state = state; + } + + public String getBackupSnapshotId(){ + return backupSnapshotId; + } public long getPrevSnapshotId(){ - return prevSnapshotId; - } + return prevSnapshotId; + } - public void setBackupSnapshotId(String backUpSnapshotId){ - this.backupSnapshotId = backUpSnapshotId; - } + public void setBackupSnapshotId(String backUpSnapshotId){ + this.backupSnapshotId = backUpSnapshotId; + } - public void setPrevSnapshotId(long prevSnapshotId){ - this.prevSnapshotId = prevSnapshotId; - } + public void setPrevSnapshotId(long prevSnapshotId){ + this.prevSnapshotId = prevSnapshotId; + } public static Type getSnapshotType(String snapshotType) { for ( Type type : Type.values()) { @@ -277,11 +280,11 @@ public static Type getSnapshotType(String snapshotType) { @Override public String getUuid() { - return this.uuid; + return this.uuid; } public void setUuid(String uuid) { - this.uuid = uuid; + this.uuid = uuid; } public Long getS3Id() { diff --git a/core/src/com/cloud/storage/StoragePoolDiscoverer.java b/core/src/com/cloud/storage/StoragePoolDiscoverer.java index 816e899f9..c7dd362a5 100644 --- a/core/src/com/cloud/storage/StoragePoolDiscoverer.java +++ b/core/src/com/cloud/storage/StoragePoolDiscoverer.java @@ -19,6 +19,8 @@ import java.net.URI; import java.util.Map; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; + import com.cloud.exception.DiscoveryException; import com.cloud.utils.component.Adapter; diff --git a/core/src/com/cloud/storage/StoragePoolVO.java b/core/src/com/cloud/storage/StoragePoolVO.java deleted file mode 100644 index cb5209f3e..000000000 --- a/core/src/com/cloud/storage/StoragePoolVO.java +++ /dev/null @@ -1,321 +0,0 @@ -// 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.storage; - -import java.util.Date; -import java.util.UUID; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.Id; -import javax.persistence.Table; -import javax.persistence.TableGenerator; -import javax.persistence.Temporal; -import javax.persistence.TemporalType; -import javax.persistence.Transient; - -import org.apache.cloudstack.api.Identity; -import com.cloud.storage.Storage.StoragePoolType; -import com.cloud.utils.db.GenericDao; -import org.apache.cloudstack.api.InternalIdentity; - -@Entity -@Table(name="storage_pool") -public class StoragePoolVO implements StoragePool { - @Id - @TableGenerator(name="storage_pool_sq", table="sequence", pkColumnName="name", valueColumnName="value", pkColumnValue="storage_pool_seq", allocationSize=1) - @Column(name="id", updatable=false, nullable = false) - private long id; - - @Column(name="name", updatable=false, nullable=false, length=255) - private String name = null; - - @Column(name="uuid", length=255) - private String uuid = null; - - @Column(name="pool_type", updatable=false, nullable=false, length=32) - @Enumerated(value=EnumType.STRING) - private StoragePoolType poolType; - - @Column(name=GenericDao.CREATED_COLUMN) - Date created; - - @Column(name=GenericDao.REMOVED_COLUMN) - private Date removed; - - @Column(name="update_time", updatable=true) - @Temporal(value=TemporalType.TIMESTAMP) - private Date updateTime; - - @Column(name="data_center_id", updatable=true, nullable=false) - private long dataCenterId; - - @Column(name="pod_id", updatable=true) - private Long podId; - - @Column(name="available_bytes", updatable=true, nullable=true) - private long availableBytes; - - @Column(name="capacity_bytes", updatable=true, nullable=true) - private long capacityBytes; - - @Column(name="status", updatable=true, nullable=false) - @Enumerated(value=EnumType.STRING) - private StoragePoolStatus status; - - @Override - public long getId() { - return id; - } - - @Override - public StoragePoolStatus getStatus() { - return status; - } - - public StoragePoolVO() { - // TODO Auto-generated constructor stub - } - - @Override - public String getName() { - return name; - } - - @Override - public String getUuid() { - return uuid; - } - - @Override - public StoragePoolType getPoolType() { - return poolType; - } - - @Override - public Date getCreated() { - return created; - } - - public Date getRemoved() { - return removed; - } - - @Override - public Date getUpdateTime() { - return updateTime; - } - - @Override - public long getDataCenterId() { - return dataCenterId; - } - - @Override - public long getAvailableBytes() { - return availableBytes; - } - - @Override - public long getCapacityBytes() { - return capacityBytes; - } - - public void setAvailableBytes(long available) { - availableBytes = available; - } - - public void setCapacityBytes(long capacity) { - capacityBytes = capacity; - } - - @Column(name="host_address") - private String hostAddress; - - @Column(name="path") - private String path; - - @Column(name="port") - private int port; - - @Column(name="user_info") - private String userInfo; - - @Column(name="cluster_id") - private Long clusterId; - - - @Override - public Long getClusterId() { - return clusterId; - } - - public void setClusterId(Long clusterId) { - this.clusterId = clusterId; - } - - @Override - public String getHostAddress() { - return hostAddress; - } - - @Override - public String getPath() { - return path; - } - - @Override - public String getUserInfo() { - return userInfo; - } - - public StoragePoolVO(long poolId, String name, String uuid, StoragePoolType type, - long dataCenterId, Long podId, long availableBytes, long capacityBytes, String hostAddress, int port, String hostPath) { - this.name = name; - this.id = poolId; - this.uuid = uuid; - this.poolType = type; - this.dataCenterId = dataCenterId; - this.availableBytes = availableBytes; - this.capacityBytes = capacityBytes; - this.hostAddress = hostAddress; - this.path = hostPath; - this.port = port; - this.podId = podId; - this.setStatus(StoragePoolStatus.Up); - } - - public StoragePoolVO(StoragePoolVO that) { - this(that.id, that.name, that.uuid, that.poolType, that.dataCenterId, that.podId, that.availableBytes, that.capacityBytes, that.hostAddress, that.port, that.path); - } - - public StoragePoolVO(StoragePoolType type, String hostAddress, int port, String path) { - this.poolType = type; - this.hostAddress = hostAddress; - this.port = port; - this.path = path; - this.setStatus(StoragePoolStatus.Up); - this.uuid = UUID.randomUUID().toString(); - } - - public StoragePoolVO(StoragePoolType type, String hostAddress, int port, String path, String userInfo) { - this.poolType = type; - this.hostAddress = hostAddress; - this.port = port; - this.path = path; - this.userInfo = userInfo; - this.setStatus(StoragePoolStatus.Up); - this.uuid = UUID.randomUUID().toString(); - } - - public void setStatus(StoragePoolStatus status) - { - this.status = status; - } - - public void setId(long id) { - this.id = id; - } - - public void setDataCenterId(long dcId) { - this.dataCenterId = dcId; - } - - public void setPodId(Long podId) { - this.podId = podId; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } - - public void setPath(String path) { - this.path = path; - } - - public void setUserInfo(String userInfo) { - this.userInfo = userInfo; - } - - @Override - public int getPort() { - return port; - } - - @Override - public boolean isShared() { - return poolType.isShared(); - } - - @Override - public boolean isLocal() { - return !poolType.isShared(); - } - - @Transient - public String toUri() { - /* - URI uri = new URI(); - try { - if (type == StoragePoolType.Filesystem) { - uri.setScheme("file"); - } else if (type == StoragePoolType.NetworkFilesystem) { - uri.setScheme("nfs"); - } else if (type == StoragePoolType.IscsiLUN) { - } - } catch (MalformedURIException e) { - throw new VmopsRuntimeException("Unable to form the uri " + id); - } - return uri.toString(); - */ - return null; - } - - @Override - public Long getPodId() { - return podId; - } - - public void setName(String name) { - this.name = name; - } - - public boolean isInMaintenance() { - return status == StoragePoolStatus.PrepareForMaintenance || status == StoragePoolStatus.Maintenance || status == StoragePoolStatus.ErrorInMaintenance || removed != null; - } - - @Override - public boolean equals(Object obj) { - if (!(obj instanceof StoragePoolVO) || obj == null) { - return false; - } - StoragePoolVO that = (StoragePoolVO)obj; - return this.id == that.id; - } - - @Override - public int hashCode() { - return new Long(id).hashCode(); - } - - @Override - public String toString() { - return new StringBuilder("Pool[").append(id).append("|").append(poolType).append("]").toString(); - } -} diff --git a/core/src/com/cloud/storage/VMTemplateHostVO.java b/core/src/com/cloud/storage/VMTemplateHostVO.java index 9eae1a003..b8dfc41d5 100755 --- a/core/src/com/cloud/storage/VMTemplateHostVO.java +++ b/core/src/com/cloud/storage/VMTemplateHostVO.java @@ -29,8 +29,10 @@ import javax.persistence.Temporal; import javax.persistence.TemporalType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; + import com.cloud.utils.db.GenericDaoBase; -import org.apache.cloudstack.api.InternalIdentity; /** * Join table for storage hosts and templates @@ -38,7 +40,7 @@ */ @Entity @Table(name="template_host_ref") -public class VMTemplateHostVO implements VMTemplateStorageResourceAssoc { +public class VMTemplateHostVO implements VMTemplateStorageResourceAssoc, DataObjectInStore { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) Long id; @@ -90,6 +92,18 @@ public class VMTemplateHostVO implements VMTemplateStorageResourceAssoc { @Column(name="destroyed") boolean destroyed = false; + @Column(name="update_count", updatable = true, nullable=false) + protected long updatedCount; + + @Column(name = "updated") + @Temporal(value = TemporalType.TIMESTAMP) + Date updated; + + @Column(name = "state") + @Enumerated(EnumType.STRING) + ObjectInDataStoreStateMachine.State state; + + @Override public String getInstallPath() { return installPath; @@ -162,6 +176,7 @@ public VMTemplateHostVO(long hostId, long templateId) { super(); this.hostId = hostId; this.templateId = templateId; + this.state = ObjectInDataStoreStateMachine.State.Allocated; } public VMTemplateHostVO(long hostId, long templateId, Date lastUpdated, @@ -282,4 +297,26 @@ public String toString() { return new StringBuilder("TmplHost[").append(id).append("-").append(templateId).append("-").append(hostId).append(installPath).append("]").toString(); } + @Override + public ObjectInDataStoreStateMachine.State getState() { + // TODO Auto-generated method stub + return this.state; + } + + public long getUpdatedCount() { + return this.updatedCount; + } + + public void incrUpdatedCount() { + this.updatedCount++; + } + + public void decrUpdatedCount() { + this.updatedCount--; + } + + public Date getUpdated() { + return updated; + } + } diff --git a/core/src/com/cloud/storage/VMTemplateStoragePoolVO.java b/core/src/com/cloud/storage/VMTemplateStoragePoolVO.java index 32c9dd2ec..9b7617643 100644 --- a/core/src/com/cloud/storage/VMTemplateStoragePoolVO.java +++ b/core/src/com/cloud/storage/VMTemplateStoragePoolVO.java @@ -29,8 +29,11 @@ import javax.persistence.Temporal; import javax.persistence.TemporalType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.State; + import com.cloud.utils.db.GenericDaoBase; -import org.apache.cloudstack.api.InternalIdentity; /** * Join table for storage pools and templates @@ -38,7 +41,7 @@ */ @Entity @Table(name="template_spool_ref") -public class VMTemplateStoragePoolVO implements VMTemplateStorageResourceAssoc { +public class VMTemplateStoragePoolVO implements VMTemplateStorageResourceAssoc, DataObjectInStore { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) long id; @@ -69,7 +72,18 @@ public class VMTemplateStoragePoolVO implements VMTemplateStorageResourceAssoc { @Column (name="template_size") long templateSize; @Column (name="marked_for_gc") boolean markedForGC; - + + @Column(name="update_count", updatable = true, nullable=false) + protected long updatedCount; + + @Column(name = "updated") + @Temporal(value = TemporalType.TIMESTAMP) + Date updated; + + @Column(name = "state") + @Enumerated(EnumType.STRING) + ObjectInDataStoreStateMachine.State state; + @Override public String getInstallPath() { return installPath; @@ -148,6 +162,7 @@ public VMTemplateStoragePoolVO(long poolId, long templateId) { this.poolId = poolId; this.templateId = templateId; this.downloadState = Status.NOT_DOWNLOADED; + this.state = ObjectInDataStoreStateMachine.State.Allocated; this.markedForGC = false; } @@ -235,4 +250,26 @@ public String toString() { return new StringBuilder("TmplPool[").append(id).append("-").append(templateId).append("-").append("poolId").append("-").append(installPath).append("]").toString(); } + @Override + public State getState() { + return this.state; + } + + public long getUpdatedCount() { + return this.updatedCount; + } + + public void incrUpdatedCount() { + this.updatedCount++; + } + + public void decrUpdatedCount() { + this.updatedCount--; + } + + public Date getUpdated() { + return updated; + } + + } diff --git a/core/src/com/cloud/storage/VMTemplateVO.java b/core/src/com/cloud/storage/VMTemplateVO.java index fcfdd0067..e643d75bf 100755 --- a/core/src/com/cloud/storage/VMTemplateVO.java +++ b/core/src/com/cloud/storage/VMTemplateVO.java @@ -31,17 +31,18 @@ import javax.persistence.TemporalType; import javax.persistence.Transient; -import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateState; + import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.storage.Storage.ImageFormat; import com.cloud.storage.Storage.TemplateType; import com.cloud.template.VirtualMachineTemplate; import com.cloud.utils.db.GenericDao; -import org.apache.cloudstack.api.InternalIdentity; +import com.cloud.utils.fsm.StateObject; @Entity @Table(name="vm_template") -public class VMTemplateVO implements VirtualMachineTemplate { +public class VMTemplateVO implements VirtualMachineTemplate, StateObject { @Id @TableGenerator(name="vm_template_sq", table="sequence", pkColumnName="name", valueColumnName="value", pkColumnValue="vm_template_seq", allocationSize=1) @Column(name="id", nullable = false) @@ -127,6 +128,22 @@ public class VMTemplateVO implements VirtualMachineTemplate { @Column(name="enable_sshkey") private boolean enableSshKey; + + @Column(name = "image_data_store_id") + private long imageDataStoreId; + + @Column(name = "size") + private Long size; + + @Column(name = "state") + private TemplateState state; + + @Column(name="update_count", updatable = true) + protected long updatedCount; + + @Column(name = "updated") + @Temporal(value = TemporalType.TIMESTAMP) + Date updated; @Transient Map details; @@ -140,8 +157,9 @@ public void setUniqueName(String uniqueName) { this.uniqueName = uniqueName; } - protected VMTemplateVO() { + public VMTemplateVO() { this.uuid = UUID.randomUUID().toString(); + this.state = TemplateState.Allocated; } /** @@ -150,12 +168,14 @@ protected VMTemplateVO() { public VMTemplateVO(long id, String name, ImageFormat format, boolean isPublic, boolean featured, boolean isExtractable, TemplateType type, String url, boolean requiresHvm, int bits, long accountId, String cksum, String displayText, boolean enablePassword, long guestOSId, boolean bootable, HypervisorType hyperType, Map details) { this(id, generateUniqueName(id, accountId, name), name, format, isPublic, featured, isExtractable, type, url, null, requiresHvm, bits, accountId, cksum, displayText, enablePassword, guestOSId, bootable, hyperType, details); this.uuid = UUID.randomUUID().toString(); + this.state = TemplateState.Allocated; } public VMTemplateVO(long id, String name, ImageFormat format, boolean isPublic, boolean featured, boolean isExtractable, TemplateType type, String url, boolean requiresHvm, int bits, long accountId, String cksum, String displayText, boolean enablePassword, long guestOSId, boolean bootable, HypervisorType hyperType, String templateTag, Map details, boolean sshKeyEnabled) { this(id, name, format, isPublic, featured, isExtractable, type, url, requiresHvm, bits, accountId, cksum, displayText, enablePassword, guestOSId, bootable, hyperType, details); this.templateTag = templateTag; this.uuid = UUID.randomUUID().toString(); + this.state = TemplateState.Allocated; this.enableSshKey = sshKeyEnabled; } @@ -179,6 +199,7 @@ public VMTemplateVO(Long id, String uniqueName, String name, ImageFormat format, this.bootable = bootable; this.hypervisorType = hyperType; this.uuid = UUID.randomUUID().toString(); + this.state = TemplateState.Allocated; } // Has an extra attribute - isExtractable @@ -468,5 +489,46 @@ public boolean getEnableSshKey() { public void setEnableSshKey(boolean enable) { enableSshKey = enable; } + + public Long getImageDataStoreId() { + return this.imageDataStoreId; + } + + public void setImageDataStoreId(long dataStoreId) { + this.imageDataStoreId = dataStoreId; + } + + public void setSize(Long size) { + this.size = size; + } + + public Long getSize() { + return this.size; + } + + public TemplateState getState() { + return this.state; + } + + public long getUpdatedCount() { + return this.updatedCount; + } + + public void incrUpdatedCount() { + this.updatedCount++; + } + + public void decrUpdatedCount() { + this.updatedCount--; + } + + public Date getUpdated() { + return updated; + } + + public void setUpdated(Date updated) { + this.updated = updated; + } + } diff --git a/core/src/com/cloud/storage/VolumeHostVO.java b/core/src/com/cloud/storage/VolumeHostVO.java index f4fc7abc4..40bae4991 100755 --- a/core/src/com/cloud/storage/VolumeHostVO.java +++ b/core/src/com/cloud/storage/VolumeHostVO.java @@ -29,11 +29,13 @@ import javax.persistence.Temporal; import javax.persistence.TemporalType; -//import com.cloud.storage.VMVolumeStorageResourceAssoc.Status; +import org.apache.cloudstack.api.InternalIdentity; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; + import com.cloud.storage.Storage.ImageFormat; import com.cloud.storage.VMTemplateStorageResourceAssoc.Status; import com.cloud.utils.db.GenericDaoBase; -import org.apache.cloudstack.api.InternalIdentity; /** * Join table for storage hosts and volumes @@ -41,7 +43,7 @@ */ @Entity @Table(name="volume_host_ref") -public class VolumeHostVO implements InternalIdentity { +public class VolumeHostVO implements InternalIdentity, DataObjectInStore { @Id @GeneratedValue(strategy=GenerationType.IDENTITY) Long id; @@ -99,6 +101,16 @@ public class VolumeHostVO implements InternalIdentity { @Column(name="destroyed") boolean destroyed = false; + @Column(name="update_count", updatable = true, nullable=false) + protected long updatedCount; + + @Column(name = "updated") + @Temporal(value = TemporalType.TIMESTAMP) + Date updated; + + @Column(name = "state") + @Enumerated(EnumType.STRING) + ObjectInDataStoreStateMachine.State state; public String getInstallPath() { return installPath; @@ -187,6 +199,7 @@ public VolumeHostVO(long hostId, long volumeId) { super(); this.hostId = hostId; this.volumeId = volumeId; + this.state = ObjectInDataStoreStateMachine.State.Allocated; } public VolumeHostVO(long hostId, long volumeId, long zoneId, Date lastUpdated, @@ -308,5 +321,27 @@ public long getVolumeSize() { public String toString() { return new StringBuilder("VolumeHost[").append(id).append("-").append(volumeId).append("-").append(hostId).append(installPath).append("]").toString(); } + + public long getUpdatedCount() { + return this.updatedCount; + } + + public void incrUpdatedCount() { + this.updatedCount++; + } + + public void decrUpdatedCount() { + this.updatedCount--; + } + + public Date getUpdated() { + return updated; + } + + @Override + public ObjectInDataStoreStateMachine.State getState() { + // TODO Auto-generated method stub + return this.state; + } } diff --git a/core/src/com/cloud/storage/VolumeVO.java b/core/src/com/cloud/storage/VolumeVO.java index aac82df80..a287c2634 100755 --- a/core/src/com/cloud/storage/VolumeVO.java +++ b/core/src/com/cloud/storage/VolumeVO.java @@ -30,12 +30,11 @@ import javax.persistence.TableGenerator; import javax.persistence.Temporal; import javax.persistence.TemporalType; +import javax.persistence.Transient; -import org.apache.cloudstack.api.Identity; import com.cloud.storage.Storage.StoragePoolType; import com.cloud.utils.NumbersUtil; import com.cloud.utils.db.GenericDao; -import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name = "volumes") @@ -68,7 +67,7 @@ public class VolumeVO implements Volume { Long deviceId = null; @Column(name = "size") - long size; + Long size; @Column(name = "folder") String folder; @@ -132,6 +131,10 @@ public class VolumeVO implements Volume { @Column(name = "uuid") String uuid; + @Transient + // @Column(name="reservation") + String reservationId; + // Real Constructor public VolumeVO(Type type, String name, long dcId, long domainId, long accountId, long diskOfferingId, long size) { this.volumeType = type; @@ -252,11 +255,11 @@ protected VolumeVO() { } @Override - public long getSize() { + public Long getSize() { return size; } - public void setSize(long size) { + public void setSize(Long size) { this.size = size; } @@ -430,6 +433,16 @@ public boolean equals(Object obj) { } } + @Override + public String getReservationId() { + return this.reservationId; + } + + @Override + public void setReservationId(String reserv) { + this.reservationId = reserv; + } + @Override public String getUuid() { return this.uuid; diff --git a/core/src/com/cloud/storage/resource/CifsSecondaryStorageResource.java b/core/src/com/cloud/storage/resource/CifsSecondaryStorageResource.java deleted file mode 100755 index c606fca1f..000000000 --- a/core/src/com/cloud/storage/resource/CifsSecondaryStorageResource.java +++ /dev/null @@ -1,726 +0,0 @@ -// 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.storage.resource; - -import java.io.File; -import java.net.InetAddress; -import java.net.UnknownHostException; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; -import java.util.Random; - -import javax.naming.ConfigurationException; - -import org.apache.log4j.Logger; - -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.CheckHealthAnswer; -import com.cloud.agent.api.CheckHealthCommand; -import com.cloud.agent.api.Command; -import com.cloud.agent.api.GetStorageStatsAnswer; -import com.cloud.agent.api.GetStorageStatsCommand; -import com.cloud.agent.api.PingCommand; -import com.cloud.agent.api.PingStorageCommand; -import com.cloud.agent.api.ReadyAnswer; -import com.cloud.agent.api.ReadyCommand; -import com.cloud.agent.api.SecStorageFirewallCfgCommand; -import com.cloud.agent.api.SecStorageSetupCommand; -import com.cloud.agent.api.SecStorageFirewallCfgCommand.PortConfig; -import com.cloud.agent.api.SecStorageVMSetupCommand; -import com.cloud.agent.api.StartupCommand; -import com.cloud.agent.api.StartupStorageCommand; -import com.cloud.agent.api.storage.CreateEntityDownloadURLCommand; -import com.cloud.agent.api.storage.DeleteEntityDownloadURLCommand; -import com.cloud.agent.api.storage.DeleteTemplateCommand; -import com.cloud.agent.api.storage.DownloadCommand; -import com.cloud.agent.api.storage.DownloadProgressCommand; -import com.cloud.agent.api.storage.UploadCommand; -import com.cloud.agent.api.storage.ssCommand; -import com.cloud.host.Host; -import com.cloud.host.Host.Type; -import com.cloud.resource.ServerResource; -import com.cloud.resource.ServerResourceBase; -import com.cloud.storage.Storage; -import com.cloud.storage.Storage.StoragePoolType; -import com.cloud.storage.StorageLayer; -import com.cloud.storage.template.DownloadManager; -import com.cloud.storage.template.DownloadManagerImpl; -import com.cloud.storage.template.TemplateInfo; -import com.cloud.storage.template.UploadManager; -import com.cloud.storage.template.UploadManagerImpl; -import com.cloud.utils.NumbersUtil; -import com.cloud.utils.component.ComponentLocator; -import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.net.NetUtils; -import com.cloud.utils.net.NfsUtils; -import com.cloud.utils.script.Script; - -/** - * Implementation of Secondary Storage Resource to handle CIFS share - * - * TODOD: After mount rest of the functionality should be similar to NfsSecondaryStroage. - * Move common functionality of NFS and CIFS secondary storage resource class to base class - **/ - -public class CifsSecondaryStorageResource extends ServerResourceBase implements SecondaryStorageResource { - private static final Logger s_logger = Logger.getLogger(CifsSecondaryStorageResource.class); - int _timeout; - - String _instance; - String _parent; - - String _dc; - String _pod; - String _guid; - String _nfsPath; - String _mountParent; - Map _params; - StorageLayer _storage; - boolean _inSystemVM = false; - boolean _sslCopy = false; - - Random _rand = new Random(System.currentTimeMillis()); - - DownloadManager _dlMgr; - UploadManager _upldMgr; - private String _configSslScr; - private String _configAuthScr; - private String _configIpFirewallScr; - private String _publicIp; - private String _hostname; - private String _localgw; - private String _eth1mask; - private String _eth1ip; - - @Override - public void disconnected() { - if (_parent != null && !_inSystemVM) { - Script script = new Script(!_inSystemVM, "umount", _timeout, s_logger); - script.add(_parent); - script.execute(); - - File file = new File(_parent); - file.delete(); - } - } - - @Override - public Answer executeRequest(Command cmd) { - if (cmd instanceof DownloadProgressCommand) { - return _dlMgr.handleDownloadCommand(this, (DownloadProgressCommand)cmd); - } else if (cmd instanceof DownloadCommand) { - return _dlMgr.handleDownloadCommand(this, (DownloadCommand)cmd); - } else if (cmd instanceof UploadCommand) { - return _upldMgr.handleUploadCommand(this, (UploadCommand)cmd); - } else if (cmd instanceof CreateEntityDownloadURLCommand){ - return _upldMgr.handleCreateEntityURLCommand((CreateEntityDownloadURLCommand)cmd); - } else if(cmd instanceof DeleteEntityDownloadURLCommand){ - return _upldMgr.handleDeleteEntityDownloadURLCommand((DeleteEntityDownloadURLCommand)cmd); - } else if (cmd instanceof GetStorageStatsCommand) { - return execute((GetStorageStatsCommand)cmd); - } else if (cmd instanceof CheckHealthCommand) { - return new CheckHealthAnswer((CheckHealthCommand)cmd, true); - } else if (cmd instanceof DeleteTemplateCommand) { - return execute((DeleteTemplateCommand) cmd); - } else if (cmd instanceof ReadyCommand) { - return new ReadyAnswer((ReadyCommand)cmd); - } else if (cmd instanceof SecStorageFirewallCfgCommand){ - return execute((SecStorageFirewallCfgCommand)cmd); - } else if (cmd instanceof SecStorageVMSetupCommand){ - return execute((SecStorageVMSetupCommand)cmd); - } else if (cmd instanceof SecStorageSetupCommand){ - return new Answer(cmd, true, "success"); - } else { - return Answer.createUnsupportedCommandAnswer(cmd); - } - } - - private Answer execute(SecStorageVMSetupCommand cmd) { - if (!_inSystemVM){ - return new Answer(cmd, true, null); - } - boolean success = true; - StringBuilder result = new StringBuilder(); - for (String cidr: cmd.getAllowedInternalSites()) { - String tmpresult = allowOutgoingOnPrivate(cidr); - if (tmpresult != null) { - result.append(", ").append(tmpresult); - success = false; - } - } - if (success) { - if (cmd.getCopyPassword() != null && cmd.getCopyUserName() != null) { - String tmpresult = configureAuth(cmd.getCopyUserName(), cmd.getCopyPassword()); - if (tmpresult != null) { - result.append("Failed to configure auth for copy ").append(tmpresult); - success = false; - } - } - } - return new Answer(cmd, success, result.toString()); - - } - - private String allowOutgoingOnPrivate(String destCidr) { - - Script command = new Script("/bin/bash", s_logger); - String intf = "eth1"; - command.add("-c"); - command.add("iptables -I OUTPUT -o " + intf + " -d " + destCidr + " -p tcp -m state --state NEW -m tcp -j ACCEPT"); - - String result = command.execute(); - if (result != null) { - s_logger.warn("Error in allowing outgoing to " + destCidr + ", err=" + result ); - return "Error in allowing outgoing to " + destCidr + ", err=" + result; - } - addRouteToInternalIpOrCidr(_localgw, _eth1ip, _eth1mask, destCidr); - return null; - } - - - - private Answer execute(SecStorageFirewallCfgCommand cmd) { - if (!_inSystemVM){ - return new Answer(cmd, true, null); - } - - List ipList = new ArrayList(); - - for (PortConfig pCfg:cmd.getPortConfigs()){ - if (pCfg.isAdd()) { - ipList.add(pCfg.getSourceIp()); - } - } - boolean success = true; - String result; - result = configureIpFirewall(ipList); - if (result !=null) - success = false; - - return new Answer(cmd, success, result); - } - - protected GetStorageStatsAnswer execute(final GetStorageStatsCommand cmd) { - final long usedSize = getUsedSize(); - final long totalSize = getTotalSize(); - if (usedSize == -1 || totalSize == -1) { - return new GetStorageStatsAnswer(cmd, "Unable to get storage stats"); - } else { - return new GetStorageStatsAnswer(cmd, totalSize, usedSize) ; - } - } - - @Override - public String getRootDir(ssCommand cmd){ - return null; - } - - protected Answer execute(final DeleteTemplateCommand cmd) { - String relativeTemplatePath = cmd.getTemplatePath(); - String parent = _parent; - - if (relativeTemplatePath.startsWith(File.separator)) { - relativeTemplatePath = relativeTemplatePath.substring(1); - } - - if (!parent.endsWith(File.separator)) { - parent += File.separator; - } - String absoluteTemplatePath = parent + relativeTemplatePath; - File tmpltParent = new File(absoluteTemplatePath).getParentFile(); - String details = null; - if (!tmpltParent.exists()) { - details = "template parent directory " + tmpltParent.getName() + " doesn't exist"; - s_logger.debug(details); - return new Answer(cmd, true, details); - } - File[] tmpltFiles = tmpltParent.listFiles(); - if (tmpltFiles == null || tmpltFiles.length == 0) { - details = "No files under template parent directory " + tmpltParent.getName(); - s_logger.debug(details); - } else { - boolean found = false; - for (File f : tmpltFiles) { - if (!found && f.getName().equals("template.properties")) { - found = true; - } - if (!f.delete()) { - return new Answer(cmd, false, "Unable to delete file " + f.getName() + " under Template path " - + relativeTemplatePath); - } - } - if (!found) { - details = "Can not find template.properties under " + tmpltParent.getName(); - s_logger.debug(details); - } - } - if (!tmpltParent.delete()) { - details = "Unable to delete directory " + tmpltParent.getName() + " under Template path " - + relativeTemplatePath; - s_logger.debug(details); - return new Answer(cmd, false, details); - } - return new Answer(cmd, true, null); - } - - protected long getUsedSize() { - return _storage.getUsedSpace(_parent); - } - - protected long getTotalSize() { - return _storage.getTotalSpace(_parent); - } - - protected long convertFilesystemSize(final String size) { - if (size == null || size.isEmpty()) { - return -1; - } - - long multiplier = 1; - if (size.endsWith("T")) { - multiplier = 1024l * 1024l * 1024l * 1024l; - } else if (size.endsWith("G")) { - multiplier = 1024l * 1024l * 1024l; - } else if (size.endsWith("M")) { - multiplier = 1024l * 1024l; - } else { - assert (false) : "Well, I have no idea what this is: " + size; - } - - return (long)(Double.parseDouble(size.substring(0, size.length() - 1)) * multiplier); - } - - - @Override - public Type getType() { - return Host.Type.SecondaryStorage; - } - - @Override - public PingCommand getCurrentStatus(final long id) { - return new PingStorageCommand(Host.Type.Storage, id, new HashMap()); - } - - @Override - public boolean configure(String name, Map params) throws ConfigurationException { - _eth1ip = (String)params.get("eth1ip"); - if (_eth1ip != null) { //can only happen inside service vm - params.put("private.network.device", "eth1"); - } else { - s_logger.warn("Wait, what's going on? eth1ip is null!!"); - } - String eth2ip = (String) params.get("eth2ip"); - if (eth2ip != null) { - params.put("public.network.device", "eth2"); - } - _publicIp = (String) params.get("eth2ip"); - _hostname = (String) params.get("name"); - - super.configure(name, params); - - _params = params; - String value = (String)params.get("scripts.timeout"); - _timeout = NumbersUtil.parseInt(value, 1440) * 1000; - - _storage = (StorageLayer)params.get(StorageLayer.InstanceConfigKey); - if (_storage == null) { - value = (String)params.get(StorageLayer.ClassConfigKey); - if (value == null) { - value = "com.cloud.storage.JavaStorageLayer"; - } - - try { - Class clazz = Class.forName(value); - _storage = (StorageLayer)ComponentLocator.inject(clazz); - _storage.configure("StorageLayer", params); - } catch (ClassNotFoundException e) { - throw new ConfigurationException("Unable to find class " + value); - } - } - _configSslScr = Script.findScript(getDefaultScriptsDir(), "config_ssl.sh"); - if (_configSslScr != null) { - s_logger.info("config_ssl.sh found in " + _configSslScr); - } - - _configAuthScr = Script.findScript(getDefaultScriptsDir(), "config_auth.sh"); - if (_configSslScr != null) { - s_logger.info("config_auth.sh found in " + _configAuthScr); - } - - _configIpFirewallScr = Script.findScript(getDefaultScriptsDir(), "ipfirewall.sh"); - if (_configIpFirewallScr != null) { - s_logger.info("_configIpFirewallScr found in " + _configIpFirewallScr); - } - - _guid = (String)params.get("guid"); - if (_guid == null) { - throw new ConfigurationException("Unable to find the guid"); - } - - _dc = (String)params.get("zone"); - if (_dc == null) { - throw new ConfigurationException("Unable to find the zone"); - } - _pod = (String)params.get("pod"); - - _instance = (String)params.get("instance"); - - _mountParent = (String)params.get("mount.parent"); - if (_mountParent == null) { - _mountParent = File.separator + "mnt"; - } - - if (_instance != null) { - _mountParent = _mountParent + File.separator + _instance; - } - - _nfsPath = (String)params.get("mount.path"); - if (_nfsPath == null) { - throw new ConfigurationException("Unable to find mount.path"); - } - - - - String inSystemVM = (String)params.get("secondary.storage.vm"); - if (inSystemVM == null || "true".equalsIgnoreCase(inSystemVM)) { - _inSystemVM = true; - _localgw = (String)params.get("localgw"); - if (_localgw != null) { //can only happen inside service vm - _eth1mask = (String)params.get("eth1mask"); - String internalDns1 = (String)params.get("dns1"); - String internalDns2 = (String)params.get("dns2"); - - if (internalDns1 == null) { - s_logger.warn("No DNS entry found during configuration of NfsSecondaryStorage"); - } else { - addRouteToInternalIpOrCidr(_localgw, _eth1ip, _eth1mask, internalDns1); - } - - String mgmtHost = (String)params.get("host"); - String nfsHost = NfsUtils.getHostPart(_nfsPath); - if (nfsHost == null) { - s_logger.error("Invalid or corrupt nfs url " + _nfsPath); - throw new CloudRuntimeException("Unable to determine host part of nfs path"); - } - try { - InetAddress nfsHostAddr = InetAddress.getByName(nfsHost); - nfsHost = nfsHostAddr.getHostAddress(); - } catch (UnknownHostException uhe) { - s_logger.error("Unable to resolve nfs host " + nfsHost); - throw new CloudRuntimeException("Unable to resolve nfs host to an ip address " + nfsHost); - } - addRouteToInternalIpOrCidr(_localgw, _eth1ip, _eth1mask, nfsHost); - addRouteToInternalIpOrCidr(_localgw, _eth1ip, _eth1mask, mgmtHost); - if (internalDns2 != null) { - addRouteToInternalIpOrCidr(_localgw, _eth1ip, _eth1mask, internalDns2); - } - - } - String useSsl = (String)params.get("sslcopy"); - if (useSsl != null) { - _sslCopy = Boolean.parseBoolean(useSsl); - if (_sslCopy) { - configureSSL(); - } - } - startAdditionalServices(); - _params.put("install.numthreads", "50"); - _params.put("secondary.storage.vm", "true"); - } - _parent = mount(_nfsPath, _mountParent); - if (_parent == null) { - throw new ConfigurationException("Unable to create mount point"); - } - - - s_logger.info("Mount point established at " + _parent); - - try { - _params.put("template.parent", _parent); - _params.put(StorageLayer.InstanceConfigKey, _storage); - _dlMgr = new DownloadManagerImpl(); - _dlMgr.configure("DownloadManager", _params); - _upldMgr = new UploadManagerImpl(); - _upldMgr.configure("UploadManager", params); - } catch (ConfigurationException e) { - s_logger.warn("Caught problem while configuring DownloadManager", e); - return false; - } - return true; - } - - private void startAdditionalServices() { - Script command = new Script("/bin/bash", s_logger); - command.add("-c"); - command.add("if [ -f /etc/init.d/ssh ]; then service ssh restart; else service sshd restart; fi "); - String result = command.execute(); - if (result != null) { - s_logger.warn("Error in starting sshd service err=" + result ); - } - command = new Script("/bin/bash", s_logger); - command.add("-c"); - command.add("iptables -I INPUT -i eth1 -p tcp -m state --state NEW -m tcp --dport 3922 -j ACCEPT"); - result = command.execute(); - if (result != null) { - s_logger.warn("Error in opening up ssh port err=" + result ); - } - } - - private void addRouteToInternalIpOrCidr(String localgw, String eth1ip, String eth1mask, String destIpOrCidr) { - s_logger.debug("addRouteToInternalIp: localgw=" + localgw + ", eth1ip=" + eth1ip + ", eth1mask=" + eth1mask + ",destIp=" + destIpOrCidr); - if (destIpOrCidr == null) { - s_logger.debug("addRouteToInternalIp: destIp is null"); - return; - } - if (!NetUtils.isValidIp(destIpOrCidr) && !NetUtils.isValidCIDR(destIpOrCidr)){ - s_logger.warn(" destIp is not a valid ip address or cidr destIp=" + destIpOrCidr); - return; - } - boolean inSameSubnet = false; - if (NetUtils.isValidIp(destIpOrCidr)) { - if (eth1ip != null && eth1mask != null) { - inSameSubnet = NetUtils.sameSubnet(eth1ip, destIpOrCidr, eth1mask); - } else { - s_logger.warn("addRouteToInternalIp: unable to determine same subnet: _eth1ip=" + eth1ip + ", dest ip=" + destIpOrCidr + ", _eth1mask=" + eth1mask); - } - } else { - inSameSubnet = NetUtils.isNetworkAWithinNetworkB(destIpOrCidr, NetUtils.ipAndNetMaskToCidr(eth1ip, eth1mask)); - } - if (inSameSubnet) { - s_logger.debug("addRouteToInternalIp: dest ip " + destIpOrCidr + " is in the same subnet as eth1 ip " + eth1ip); - return; - } - Script command = new Script("/bin/bash", s_logger); - command.add("-c"); - command.add("ip route delete " + destIpOrCidr); - command.execute(); - command = new Script("/bin/bash", s_logger); - command.add("-c"); - command.add("ip route add " + destIpOrCidr + " via " + localgw); - String result = command.execute(); - if (result != null) { - s_logger.warn("Error in configuring route to internal ip err=" + result ); - } else { - s_logger.debug("addRouteToInternalIp: added route to internal ip=" + destIpOrCidr + " via " + localgw); - } - } - - private void configureSSL() { - Script command = new Script(_configSslScr); - command.add(_publicIp); - command.add(_hostname); - String result = command.execute(); - if (result != null) { - s_logger.warn("Unable to configure httpd to use ssl"); - } - } - - private String configureAuth(String user, String passwd) { - Script command = new Script(_configAuthScr); - command.add(user); - command.add(passwd); - String result = command.execute(); - if (result != null) { - s_logger.warn("Unable to configure httpd to use auth"); - } - return result; - } - - private String configureIpFirewall(List ipList){ - Script command = new Script(_configIpFirewallScr); - for (String ip : ipList){ - command.add(ip); - } - - String result = command.execute(); - if (result != null) { - s_logger.warn("Unable to configure firewall for command : " +command); - } - return result; - } - - protected String mount(String path, String parent) { - String mountPoint = null; - for (int i = 0; i < 10; i++) { - String mntPt = parent + File.separator + Integer.toHexString(_rand.nextInt(Integer.MAX_VALUE)); - File file = new File(mntPt); - if (!file.exists()) { - if (_storage.mkdir(mntPt)) { - mountPoint = mntPt; - break; - } - } - s_logger.debug("Unable to create mount: " + mntPt); - } - - if (mountPoint == null) { - s_logger.warn("Unable to create a mount point"); - return null; - } - - Script script = null; - String result = null; - script = new Script(!_inSystemVM, "umount", _timeout, s_logger); - script.add(path); - result = script.execute(); - - if( _parent != null ) { - script = new Script("rmdir", _timeout, s_logger); - script.add(_parent); - result = script.execute(); - } - - Script command = new Script(!_inSystemVM, "mount", _timeout, s_logger); - command.add("-t", "cifs"); - if (_inSystemVM) { - //Fedora Core 12 errors out with any -o option executed from java - //command.add("-o", "soft,timeo=133,retrans=2147483647,tcp,acdirmax=0,acdirmin=0"); - } - String tok[] = path.split(":"); - //command.add(path); - command.add("//"+tok[0]+tok[1]); - command.add(mountPoint); - result = command.execute(); - if (result != null) { - s_logger.warn("Unable to mount " + path + " due to " + result); - File file = new File(mountPoint); - if (file.exists()) - file.delete(); - return null; - } - - - - // XXX: Adding the check for creation of snapshots dir here. Might have to move it somewhere more logical later. - if (!checkForSnapshotsDir(mountPoint)) { - return null; - } - - // Create the volumes dir - if (!checkForVolumesDir(mountPoint)) { - return null; - } - - return mountPoint; - } - - @Override - public boolean start() { - return true; - } - - @Override - public boolean stop() { - return true; - } - - @Override - public StartupCommand[] initialize() { - /*disconnected(); - - _parent = mount(_nfsPath, _mountParent); - - if( _parent == null ) { - s_logger.warn("Unable to mount the nfs server"); - return null; - } - - try { - _params.put("template.parent", _parent); - _params.put(StorageLayer.InstanceConfigKey, _storage); - _dlMgr = new DownloadManagerImpl(); - _dlMgr.configure("DownloadManager", _params); - } catch (ConfigurationException e) { - s_logger.warn("Caught problem while configuring folers", e); - return null; - }*/ - - final StartupStorageCommand cmd = new StartupStorageCommand(_parent, StoragePoolType.NetworkFilesystem, getTotalSize(), new HashMap()); - - cmd.setResourceType(Storage.StorageResourceType.SECONDARY_STORAGE); - cmd.setIqn(null); - - fillNetworkInformation(cmd); - cmd.setDataCenter(_dc); - cmd.setPod(_pod); - cmd.setGuid(_guid); - cmd.setName(_guid); - cmd.setVersion(NfsSecondaryStorageResource.class.getPackage().getImplementationVersion()); - cmd.getHostDetails().put("mount.parent", _mountParent); - cmd.getHostDetails().put("mount.path", _nfsPath); - String tok[] = _nfsPath.split(":"); - cmd.setNfsShare("nfs://" + tok[0] + tok[1]); - if (cmd.getHostDetails().get("orig.url") == null) { - if (tok.length != 2) { - throw new CloudRuntimeException("Not valid NFS path" + _nfsPath); - } - String nfsUrl = "nfs://" + tok[0] + tok[1]; - cmd.getHostDetails().put("orig.url", nfsUrl); - } - InetAddress addr; - try { - addr = InetAddress.getByName(tok[0]); - cmd.setPrivateIpAddress(addr.getHostAddress()); - } catch (UnknownHostException e) { - cmd.setPrivateIpAddress(tok[0]); - } - return new StartupCommand [] {cmd}; - } - - protected boolean checkForSnapshotsDir(String mountPoint) { - String snapshotsDirLocation = mountPoint + File.separator + "snapshots"; - return createDir("snapshots", snapshotsDirLocation, mountPoint); - } - - protected boolean checkForVolumesDir(String mountPoint) { - String volumesDirLocation = mountPoint + "/" + "volumes"; - return createDir("volumes", volumesDirLocation, mountPoint); - } - - protected boolean createDir(String dirName, String dirLocation, String mountPoint) { - boolean dirExists = false; - - File dir = new File(dirLocation); - if (dir.exists()) { - if (dir.isDirectory()) { - s_logger.debug(dirName + " already exists on secondary storage, and is mounted at " + mountPoint); - dirExists = true; - } else { - if (dir.delete() && _storage.mkdir(dirLocation)) { - dirExists = true; - } - } - } else if (_storage.mkdir(dirLocation)) { - dirExists = true; - } - - if (dirExists) { - s_logger.info(dirName + " directory created/exists on Secondary Storage."); - } else { - s_logger.info(dirName + " directory does not exist on Secondary Storage."); - } - - return dirExists; - } - - @Override - protected String getDefaultScriptsDir() { - return "./scripts/storage/secondary"; - } -} diff --git a/core/src/com/cloud/storage/template/IsoProcessor.java b/core/src/com/cloud/storage/template/IsoProcessor.java index 112002a64..c8cde6573 100644 --- a/core/src/com/cloud/storage/template/IsoProcessor.java +++ b/core/src/com/cloud/storage/template/IsoProcessor.java @@ -26,12 +26,12 @@ import com.cloud.storage.StorageLayer; import com.cloud.storage.Storage.ImageFormat; +import com.cloud.utils.component.AdapterBase; @Local(value=Processor.class) -public class IsoProcessor implements Processor { +public class IsoProcessor extends AdapterBase implements Processor { private static final Logger s_logger = Logger.getLogger(IsoProcessor.class); - String _name; StorageLayer _storage; @Override @@ -59,26 +59,10 @@ public FormatInfo process(String templatePath, ImageFormat format, String templa @Override public boolean configure(String name, Map params) throws ConfigurationException { - _name = name; _storage = (StorageLayer)params.get(StorageLayer.InstanceConfigKey); if (_storage == null) { throw new ConfigurationException("Unable to get storage implementation"); } return true; } - - @Override - public String getName() { - return _name; - } - - @Override - public boolean start() { - return true; - } - - @Override - public boolean stop() { - return true; - } } diff --git a/core/src/com/cloud/storage/template/QCOW2Processor.java b/core/src/com/cloud/storage/template/QCOW2Processor.java index 15af8490e..09dcfe2ea 100644 --- a/core/src/com/cloud/storage/template/QCOW2Processor.java +++ b/core/src/com/cloud/storage/template/QCOW2Processor.java @@ -29,11 +29,11 @@ import com.cloud.storage.Storage.ImageFormat; import com.cloud.storage.StorageLayer; import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.AdapterBase; @Local(value=Processor.class) -public class QCOW2Processor implements Processor { +public class QCOW2Processor extends AdapterBase implements Processor { private static final Logger s_logger = Logger.getLogger(QCOW2Processor.class); - String _name; StorageLayer _storage; @Override @@ -85,7 +85,6 @@ public FormatInfo process(String templatePath, ImageFormat format, @Override public boolean configure(String name, Map params) throws ConfigurationException { - _name = name; _storage = (StorageLayer)params.get(StorageLayer.InstanceConfigKey); if (_storage == null) { throw new ConfigurationException("Unable to get storage implementation"); @@ -93,22 +92,4 @@ public boolean configure(String name, Map params) return true; } - - @Override - public String getName() { - return _name; - } - - @Override - public boolean start() { - // TODO Auto-generated method stub - return true; - } - - @Override - public boolean stop() { - // TODO Auto-generated method stub - return true; - } - } diff --git a/core/src/com/cloud/storage/template/RawImageProcessor.java b/core/src/com/cloud/storage/template/RawImageProcessor.java index 694c76a70..a002df5c9 100644 --- a/core/src/com/cloud/storage/template/RawImageProcessor.java +++ b/core/src/com/cloud/storage/template/RawImageProcessor.java @@ -28,17 +28,16 @@ import com.cloud.storage.StorageLayer; import com.cloud.storage.Storage.ImageFormat; import com.cloud.storage.template.Processor.FormatInfo; +import com.cloud.utils.component.AdapterBase; @Local(value=Processor.class) -public class RawImageProcessor implements Processor { +public class RawImageProcessor extends AdapterBase implements Processor { private static final Logger s_logger = Logger.getLogger(RawImageProcessor.class); - String _name; StorageLayer _storage; @Override public boolean configure(String name, Map params) throws ConfigurationException { - _name = name; _storage = (StorageLayer)params.get(StorageLayer.InstanceConfigKey); if (_storage == null) { throw new ConfigurationException("Unable to get storage implementation"); @@ -47,21 +46,6 @@ public boolean configure(String name, Map params) return true; } - @Override - public String getName() { - return _name; - } - - @Override - public boolean start() { - return true; - } - - @Override - public boolean stop() { - return true; - } - @Override public FormatInfo process(String templatePath, ImageFormat format, String templateName) throws InternalErrorException { @@ -73,6 +57,7 @@ public FormatInfo process(String templatePath, ImageFormat format, String imgPath = templatePath + File.separator + templateName + "." + ImageFormat.RAW.getFileExtension(); if (!_storage.exists(imgPath)) { s_logger.debug("Unable to find raw image:" + imgPath); + return null; } FormatInfo info = new FormatInfo(); info.format = ImageFormat.RAW; diff --git a/core/src/com/cloud/storage/template/UploadManagerImpl.java b/core/src/com/cloud/storage/template/UploadManagerImpl.java deleted file mode 100755 index 2dd1751ae..000000000 --- a/core/src/com/cloud/storage/template/UploadManagerImpl.java +++ /dev/null @@ -1,658 +0,0 @@ -// 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.storage.template; - -import java.io.File; -import java.net.URI; -import java.net.URISyntaxException; -import java.text.SimpleDateFormat; -import java.util.Date; -import java.util.Map; -import java.util.UUID; -import java.util.concurrent.ConcurrentHashMap; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - -import javax.naming.ConfigurationException; - -import org.apache.log4j.Logger; - -import com.cloud.agent.api.storage.CreateEntityDownloadURLAnswer; -import com.cloud.agent.api.storage.CreateEntityDownloadURLCommand; -import com.cloud.agent.api.storage.DeleteEntityDownloadURLAnswer; -import com.cloud.agent.api.storage.DeleteEntityDownloadURLCommand; -import com.cloud.agent.api.storage.UploadAnswer; -import com.cloud.agent.api.storage.UploadCommand; -import com.cloud.agent.api.storage.UploadProgressCommand; -import com.cloud.storage.Storage.ImageFormat; -import com.cloud.storage.StorageLayer; -import com.cloud.storage.Upload; -import com.cloud.storage.UploadVO; -import com.cloud.storage.resource.SecondaryStorageResource; -import com.cloud.storage.template.TemplateUploader.Status; -import com.cloud.storage.template.TemplateUploader.UploadCompleteCallback; -import com.cloud.utils.NumbersUtil; -import com.cloud.utils.component.Adapters; -import com.cloud.utils.component.ComponentLocator; -import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.utils.script.Script; - -public class UploadManagerImpl implements UploadManager { - - - public class Completion implements UploadCompleteCallback { - private final String jobId; - - public Completion(String jobId) { - this.jobId = jobId; - } - - @Override - public void uploadComplete(Status status) { - setUploadStatus(jobId, status); - } - } - - private static class UploadJob { - private final TemplateUploader tu; - private final String jobId; - private final String name; - private final ImageFormat format; - private String tmpltPath; - private String description; - private String checksum; - private Long accountId; - private String installPathPrefix; - private long templatesize; - private long id; - - public UploadJob(TemplateUploader tu, String jobId, long id, String name, ImageFormat format, boolean hvm, Long accountId, String descr, String cksum, String installPathPrefix) { - super(); - this.tu = tu; - this.jobId = jobId; - this.name = name; - this.format = format; - this.accountId = accountId; - this.description = descr; - this.checksum = cksum; - this.installPathPrefix = installPathPrefix; - this.templatesize = 0; - this.id = id; - } - - public TemplateUploader getTd() { - return tu; - } - - public String getDescription() { - return description; - } - - public String getChecksum() { - return checksum; - } - - public UploadJob(TemplateUploader td, String jobId, UploadCommand cmd) { - this.tu = td; - this.jobId = jobId; - this.name = cmd.getName(); - this.format = cmd.getFormat(); - } - - public TemplateUploader getTemplateUploader() { - return tu; - } - - public String getJobId() { - return jobId; - } - - public String getTmpltName() { - return name; - } - - public ImageFormat getFormat() { - return format; - } - - public Long getAccountId() { - return accountId; - } - - public long getId() { - return id; - } - - public void setTmpltPath(String tmpltPath) { - this.tmpltPath = tmpltPath; - } - - public String getTmpltPath() { - return tmpltPath; - } - - public String getInstallPathPrefix() { - return installPathPrefix; - } - - public void cleanup() { - if (tu != null) { - String upldPath = tu.getUploadLocalPath(); - if (upldPath != null) { - File f = new File(upldPath); - f.delete(); - } - } - } - - public void setTemplatesize(long templatesize) { - this.templatesize = templatesize; - } - - public long getTemplatesize() { - return templatesize; - } - } - public static final Logger s_logger = Logger.getLogger(UploadManagerImpl.class); - private ExecutorService threadPool; - private final Map jobs = new ConcurrentHashMap(); - private String parentDir; - private Adapters _processors; - private String publicTemplateRepo; - private String extractMountPoint = "/mnt/SecStorage/extractmnt"; - private StorageLayer _storage; - private int installTimeoutPerGig; - private boolean _sslCopy; - private String _name; - private boolean hvm; - - - @Override - public String uploadPublicTemplate(long id, String url, String name, - ImageFormat format, Long accountId, String descr, - String cksum, String installPathPrefix, String userName, - String passwd, long templateSizeInBytes) { - - UUID uuid = UUID.randomUUID(); - String jobId = uuid.toString(); - - String completePath = parentDir + File.separator + installPathPrefix; - s_logger.debug("Starting upload from " + completePath); - - URI uri; - try { - uri = new URI(url); - } catch (URISyntaxException e) { - s_logger.error("URI is incorrect: " + url); - throw new CloudRuntimeException("URI is incorrect: " + url); - } - TemplateUploader tu; - if ((uri != null) && (uri.getScheme() != null)) { - if (uri.getScheme().equalsIgnoreCase("ftp")) { - tu = new FtpTemplateUploader(completePath, url, new Completion(jobId), templateSizeInBytes); - } else { - s_logger.error("Scheme is not supported " + url); - throw new CloudRuntimeException("Scheme is not supported " + url); - } - } else { - s_logger.error("Unable to download from URL: " + url); - throw new CloudRuntimeException("Unable to download from URL: " + url); - } - UploadJob uj = new UploadJob(tu, jobId, id, name, format, hvm, accountId, descr, cksum, installPathPrefix); - jobs.put(jobId, uj); - threadPool.execute(tu); - - return jobId; - - } - - @Override - public String getUploadError(String jobId) { - UploadJob uj = jobs.get(jobId); - if (uj != null) { - return uj.getTemplateUploader().getUploadError(); - } - return null; - } - - @Override - public int getUploadPct(String jobId) { - UploadJob uj = jobs.get(jobId); - if (uj != null) { - return uj.getTemplateUploader().getUploadPercent(); - } - return 0; - } - - @Override - public Status getUploadStatus(String jobId) { - UploadJob job = jobs.get(jobId); - if (job != null) { - TemplateUploader tu = job.getTemplateUploader(); - if (tu != null) { - return tu.getStatus(); - } - } - return Status.UNKNOWN; - } - - public static UploadVO.Status convertStatus(Status tds) { - switch (tds) { - case ABORTED: - return UploadVO.Status.NOT_UPLOADED; - case UPLOAD_FINISHED: - return UploadVO.Status.UPLOAD_IN_PROGRESS; - case IN_PROGRESS: - return UploadVO.Status.UPLOAD_IN_PROGRESS; - case NOT_STARTED: - return UploadVO.Status.NOT_UPLOADED; - case RECOVERABLE_ERROR: - return UploadVO.Status.NOT_UPLOADED; - case UNKNOWN: - return UploadVO.Status.UNKNOWN; - case UNRECOVERABLE_ERROR: - return UploadVO.Status.UPLOAD_ERROR; - case POST_UPLOAD_FINISHED: - return UploadVO.Status.UPLOADED; - default: - return UploadVO.Status.UNKNOWN; - } - } - - @Override - public com.cloud.storage.UploadVO.Status getUploadStatus2(String jobId) { - return convertStatus(getUploadStatus(jobId)); - } - @Override - public String getPublicTemplateRepo() { - // TODO Auto-generated method stub - return null; - } - - private UploadAnswer handleUploadProgressCmd(UploadProgressCommand cmd) { - String jobId = cmd.getJobId(); - UploadAnswer answer; - UploadJob uj = null; - if (jobId != null) - uj = jobs.get(jobId); - if (uj == null) { - return new UploadAnswer(null, 0, "Cannot find job", com.cloud.storage.UploadVO.Status.UNKNOWN, "", "", 0); - } - TemplateUploader td = uj.getTemplateUploader(); - switch (cmd.getRequest()) { - case GET_STATUS: - break; - case ABORT: - td.stopUpload(); - sleep(); - break; - /*case RESTART: - td.stopUpload(); - sleep(); - threadPool.execute(td); - break;*/ - case PURGE: - td.stopUpload(); - answer = new UploadAnswer(jobId, getUploadPct(jobId), getUploadError(jobId), getUploadStatus2(jobId), getUploadLocalPath(jobId), getInstallPath(jobId), getUploadTemplateSize(jobId)); - jobs.remove(jobId); - return answer; - default: - break; // TODO - } - return new UploadAnswer(jobId, getUploadPct(jobId), getUploadError(jobId), getUploadStatus2(jobId), getUploadLocalPath(jobId), getInstallPath(jobId), - getUploadTemplateSize(jobId)); - } - - @Override - public UploadAnswer handleUploadCommand(SecondaryStorageResource resource, UploadCommand cmd) { - s_logger.warn("Handling the upload " +cmd.getInstallPath() + " " + cmd.getId()); - if (cmd instanceof UploadProgressCommand) { - return handleUploadProgressCmd((UploadProgressCommand) cmd); - } - - String user = null; - String password = null; - String jobId = uploadPublicTemplate(cmd.getId(), cmd.getUrl(), cmd.getName(), - cmd.getFormat(), cmd.getAccountId(), cmd.getDescription(), - cmd.getChecksum(), cmd.getInstallPath(), user, password, - cmd.getTemplateSizeInBytes()); - sleep(); - if (jobId == null) { - return new UploadAnswer(null, 0, "Internal Error", com.cloud.storage.UploadVO.Status.UPLOAD_ERROR, "", "", 0); - } - return new UploadAnswer(jobId, getUploadPct(jobId), getUploadError(jobId), getUploadStatus2(jobId), getUploadLocalPath(jobId), getInstallPath(jobId), - getUploadTemplateSize(jobId)); - } - - @Override - public CreateEntityDownloadURLAnswer handleCreateEntityURLCommand(CreateEntityDownloadURLCommand cmd){ - - boolean isApacheUp = checkAndStartApache(); - if (!isApacheUp){ - String errorString = "Error in starting Apache server "; - s_logger.error(errorString); - return new CreateEntityDownloadURLAnswer(errorString, CreateEntityDownloadURLAnswer.RESULT_FAILURE); - } - // Create the directory structure so that its visible under apache server root - String extractDir = "/var/www/html/userdata/"; - Script command = new Script("mkdir", s_logger); - command.add("-p"); - command.add(extractDir); - String result = command.execute(); - if (result != null) { - String errorString = "Error in creating directory =" + result; - s_logger.error(errorString); - return new CreateEntityDownloadURLAnswer(errorString, CreateEntityDownloadURLAnswer.RESULT_FAILURE); - } - - // Create a random file under the directory for security reasons. - String uuid = cmd.getExtractLinkUUID(); - command = new Script("touch", s_logger); - command.add(extractDir + uuid); - result = command.execute(); - if (result != null) { - String errorString = "Error in creating file " +uuid+ " ,error: " + result; - s_logger.warn(errorString); - return new CreateEntityDownloadURLAnswer(errorString, CreateEntityDownloadURLAnswer.RESULT_FAILURE); - } - - - // Create a symbolic link from the actual directory to the template location. The entity would be directly visible under /var/www/html/userdata/cmd.getInstallPath(); - command = new Script("/bin/bash", s_logger); - command.add("-c"); - command.add("ln -sf /mnt/SecStorage/" + cmd.getParent() + File.separator + cmd.getInstallPath() + " " + extractDir + uuid); - result = command.execute(); - if (result != null) { - String errorString = "Error in linking err=" + result; - s_logger.error(errorString); - return new CreateEntityDownloadURLAnswer(errorString, CreateEntityDownloadURLAnswer.RESULT_FAILURE); - } - - return new CreateEntityDownloadURLAnswer("", CreateEntityDownloadURLAnswer.RESULT_SUCCESS); - - } - - @Override - public DeleteEntityDownloadURLAnswer handleDeleteEntityDownloadURLCommand(DeleteEntityDownloadURLCommand cmd){ - - //Delete the soft link. Example path = volumes/8/74eeb2c6-8ab1-4357-841f-2e9d06d1f360.vhd - s_logger.warn("handleDeleteEntityDownloadURLCommand Path:"+cmd.getPath() + " Type:" +cmd.getType().toString()); - String path = cmd.getPath(); - Script command = new Script("/bin/bash", s_logger); - command.add("-c"); - - //We just need to remove the UUID.vhd - String extractUrl = cmd.getExtractUrl(); - command.add("unlink /var/www/html/userdata/" +extractUrl.substring(extractUrl.lastIndexOf(File.separator) + 1)); - String result = command.execute(); - if (result != null) { - String errorString = "Error in deleting =" + result; - s_logger.warn(errorString); - return new DeleteEntityDownloadURLAnswer(errorString, CreateEntityDownloadURLAnswer.RESULT_FAILURE); - } - - // If its a volume also delete the Hard link since it was created only for the purpose of download. - if(cmd.getType() == Upload.Type.VOLUME){ - command = new Script("/bin/bash", s_logger); - command.add("-c"); - command.add("rm -f /mnt/SecStorage/" + cmd.getParentPath() +File.separator+ path); - s_logger.warn(" " +parentDir +File.separator+ path); - result = command.execute(); - if (result != null) { - String errorString = "Error in linking err=" + result; - s_logger.warn(errorString); - return new DeleteEntityDownloadURLAnswer(errorString, CreateEntityDownloadURLAnswer.RESULT_FAILURE); - } - } - - return new DeleteEntityDownloadURLAnswer("", CreateEntityDownloadURLAnswer.RESULT_SUCCESS); - } - - private String getInstallPath(String jobId) { - // TODO Auto-generated method stub - return null; - } - - private String getUploadLocalPath(String jobId) { - // TODO Auto-generated method stub - return null; - } - - private long getUploadTemplateSize(String jobId){ - UploadJob uj = jobs.get(jobId); - if (uj != null) { - return uj.getTemplatesize(); - } - return 0; - } - - @Override - public boolean configure(String name, Map params) - throws ConfigurationException { - _name = name; - - String value = null; - - _storage = (StorageLayer) params.get(StorageLayer.InstanceConfigKey); - if (_storage == null) { - value = (String) params.get(StorageLayer.ClassConfigKey); - if (value == null) { - throw new ConfigurationException("Unable to find the storage layer"); - } - - Class clazz; - try { - clazz = (Class) Class.forName(value); - } catch (ClassNotFoundException e) { - throw new ConfigurationException("Unable to instantiate " + value); - } - _storage = ComponentLocator.inject(clazz); - } - String useSsl = (String)params.get("sslcopy"); - if (useSsl != null) { - _sslCopy = Boolean.parseBoolean(useSsl); - - } - String inSystemVM = (String)params.get("secondary.storage.vm"); - if (inSystemVM != null && "true".equalsIgnoreCase(inSystemVM)) { - s_logger.info("UploadManager: starting additional services since we are inside system vm"); - startAdditionalServices(); - //blockOutgoingOnPrivate(); - } - - value = (String) params.get("install.timeout.pergig"); - this.installTimeoutPerGig = NumbersUtil.parseInt(value, 15 * 60) * 1000; - - value = (String) params.get("install.numthreads"); - final int numInstallThreads = NumbersUtil.parseInt(value, 10); - - String scriptsDir = (String) params.get("template.scripts.dir"); - if (scriptsDir == null) { - scriptsDir = "scripts/storage/secondary"; - } - - // Add more processors here. - threadPool = Executors.newFixedThreadPool(numInstallThreads); - - return true; - } - - private void startAdditionalServices() { - - - Script command = new Script("rm", s_logger); - command.add("-rf"); - command.add(extractMountPoint); - String result = command.execute(); - if (result != null) { - s_logger.warn("Error in creating file " +extractMountPoint+ " ,error: " + result ); - return; - } - - command = new Script("touch", s_logger); - command.add(extractMountPoint); - result = command.execute(); - if (result != null) { - s_logger.warn("Error in creating file " +extractMountPoint+ " ,error: " + result ); - return; - } - - command = new Script("/bin/bash", s_logger); - command.add("-c"); - command.add("ln -sf " + parentDir + " " +extractMountPoint); - result = command.execute(); - if (result != null) { - s_logger.warn("Error in linking err=" + result ); - return; - } - - } - - @Override - public String getName() { - return _name; - } - - @Override - public boolean start() { - return true; - } - - @Override - public boolean stop() { - return true; - } - - /** - * Get notified of change of job status. Executed in context of uploader thread - * - * @param jobId - * the id of the job - * @param status - * the status of the job - */ - public void setUploadStatus(String jobId, Status status) { - UploadJob uj = jobs.get(jobId); - if (uj == null) { - s_logger.warn("setUploadStatus for jobId: " + jobId + ", status=" + status + " no job found"); - return; - } - TemplateUploader tu = uj.getTemplateUploader(); - s_logger.warn("Upload Completion for jobId: " + jobId + ", status=" + status); - s_logger.warn("UploadedBytes=" + tu.getUploadedBytes() + ", error=" + tu.getUploadError() + ", pct=" + tu.getUploadPercent()); - - switch (status) { - case ABORTED: - case NOT_STARTED: - case UNRECOVERABLE_ERROR: - // Delete the entity only if its a volume. TO DO - find a better way of finding it a volume. - if(uj.getTemplateUploader().getUploadLocalPath().indexOf("volume") > -1){ - uj.cleanup(); - } - break; - case UNKNOWN: - return; - case IN_PROGRESS: - s_logger.info("Resuming jobId: " + jobId + ", status=" + status); - tu.setResume(true); - threadPool.execute(tu); - break; - case RECOVERABLE_ERROR: - threadPool.execute(tu); - break; - case UPLOAD_FINISHED: - tu.setUploadError("Upload success, starting install "); - String result = postUpload(jobId); - if (result != null) { - s_logger.error("Failed post upload script: " + result); - tu.setStatus(Status.UNRECOVERABLE_ERROR); - tu.setUploadError("Failed post upload script: " + result); - } else { - s_logger.warn("Upload completed successfully at " + new SimpleDateFormat().format(new Date())); - tu.setStatus(Status.POST_UPLOAD_FINISHED); - tu.setUploadError("Upload completed successfully at " + new SimpleDateFormat().format(new Date())); - } - // Delete the entity only if its a volume. TO DO - find a better way of finding it a volume. - if(uj.getTemplateUploader().getUploadLocalPath().indexOf("volume") > -1){ - uj.cleanup(); - } - break; - default: - break; - } - } - - private String postUpload(String jobId) { - return null; - } - - private void sleep() { - try { - Thread.sleep(3000); - } catch (InterruptedException e) { - // ignore - } - } - - private boolean checkAndStartApache() { - - //Check whether the Apache server is running - Script command = new Script("/bin/bash", s_logger); - command.add("-c"); - command.add("if [ -d /etc/apache2 ] ; then service apache2 status | grep pid; else service httpd status | grep pid; fi "); - String result = command.execute(); - - //Apache Server is not running. Try to start it. - if (result != null) { - - /*s_logger.warn("Apache server not running, trying to start it"); - String port = Integer.toString(TemplateConstants.DEFAULT_TMPLT_COPY_PORT); - String intf = TemplateConstants.DEFAULT_TMPLT_COPY_INTF; - - command = new Script("/bin/bash", s_logger); - command.add("-c"); - command.add("iptables -D INPUT -i " + intf + " -p tcp -m state --state NEW -m tcp --dport " + port + " -j DROP;" + - "iptables -D INPUT -i " + intf + " -p tcp -m state --state NEW -m tcp --dport " + port + " -j HTTP;" + - "iptables -D INPUT -i " + intf + " -p tcp -m state --state NEW -m tcp --dport " + "443" + " -j DROP;" + - "iptables -D INPUT -i " + intf + " -p tcp -m state --state NEW -m tcp --dport " + "443" + " -j HTTP;" + - "iptables -F HTTP;" + - "iptables -X HTTP;" + - "iptables -N HTTP;" + - "iptables -I INPUT -i " + intf + " -p tcp -m state --state NEW -m tcp --dport " + port + " -j DROP;" + - "iptables -I INPUT -i " + intf + " -p tcp -m state --state NEW -m tcp --dport " + "443" + " -j DROP;" + - "iptables -I INPUT -i " + intf + " -p tcp -m state --state NEW -m tcp --dport " + port + " -j HTTP;" + - "iptables -I INPUT -i " + intf + " -p tcp -m state --state NEW -m tcp --dport " + "443" + " -j HTTP;"); - - result = command.execute(); - if (result != null) { - s_logger.warn("Error in opening up httpd port err=" + result ); - return false; - }*/ - - command = new Script("/bin/bash", s_logger); - command.add("-c"); - command.add("if [ -d /etc/apache2 ] ; then service apache2 start; else service httpd start; fi "); - result = command.execute(); - if (result != null) { - s_logger.warn("Error in starting httpd service err=" + result ); - return false; - } - } - - return true; - } -} diff --git a/core/src/com/cloud/storage/template/VhdProcessor.java b/core/src/com/cloud/storage/template/VhdProcessor.java index b65b1dc87..cabc74b40 100644 --- a/core/src/com/cloud/storage/template/VhdProcessor.java +++ b/core/src/com/cloud/storage/template/VhdProcessor.java @@ -31,6 +31,7 @@ import com.cloud.storage.Storage.ImageFormat; import com.cloud.storage.StorageLayer; import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.AdapterBase; /** * VhdProcessor processes the downloaded template for VHD. It @@ -39,10 +40,9 @@ * */ @Local(value=Processor.class) -public class VhdProcessor implements Processor { +public class VhdProcessor extends AdapterBase implements Processor { private static final Logger s_logger = Logger.getLogger(VhdProcessor.class); - String _name; StorageLayer _storage; private int vhd_footer_size = 512; private int vhd_footer_creator_app_offset = 28; @@ -110,21 +110,6 @@ public boolean configure(String name, Map params) throws Configu return true; } - - @Override - public String getName() { - return _name; - } - - @Override - public boolean start() { - return true; - } - - @Override - public boolean stop() { - return true; - } private void imageSignatureCheck(byte[] creatorApp) throws InternalErrorException { boolean findKnownCreator = false; diff --git a/core/src/com/cloud/storage/template/VmdkProcessor.java b/core/src/com/cloud/storage/template/VmdkProcessor.java index ec7f014b4..e0740411b 100644 --- a/core/src/com/cloud/storage/template/VmdkProcessor.java +++ b/core/src/com/cloud/storage/template/VmdkProcessor.java @@ -32,13 +32,13 @@ import com.cloud.exception.InternalErrorException; import com.cloud.storage.Storage.ImageFormat; import com.cloud.storage.StorageLayer; +import com.cloud.utils.component.AdapterBase; import com.cloud.utils.script.Script; @Local(value=Processor.class) -public class VmdkProcessor implements Processor { +public class VmdkProcessor extends AdapterBase implements Processor { private static final Logger s_logger = Logger.getLogger(VmdkProcessor.class); - String _name; StorageLayer _storage; @Override @@ -137,7 +137,6 @@ private String getOVFFilePath(String srcOVAFileName) { @Override public boolean configure(String name, Map params) throws ConfigurationException { - _name = name; _storage = (StorageLayer)params.get(StorageLayer.InstanceConfigKey); if (_storage == null) { throw new ConfigurationException("Unable to get storage implementation"); @@ -145,19 +144,4 @@ public boolean configure(String name, Map params) throws Configu return true; } - - @Override - public String getName() { - return _name; - } - - @Override - public boolean start() { - return true; - } - - @Override - public boolean stop() { - return true; - } } diff --git a/core/src/com/cloud/user/AccountVO.java b/core/src/com/cloud/user/AccountVO.java index 922c8b99e..5e939c521 100644 --- a/core/src/com/cloud/user/AccountVO.java +++ b/core/src/com/cloud/user/AccountVO.java @@ -28,9 +28,7 @@ import javax.persistence.Id; import javax.persistence.Table; -import org.apache.cloudstack.api.Identity; import com.cloud.utils.db.GenericDao; -import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="account") @@ -76,14 +74,14 @@ public AccountVO(long id) { this.id = id; this.uuid = UUID.randomUUID().toString(); } - - public AccountVO(String accountName, long domainId, String networkDomain, short type) { + + public AccountVO(String accountName, long domainId, String networkDomain, short type, String uuid) { this.accountName = accountName; this.domainId = domainId; this.networkDomain = networkDomain; this.type = type; this.state = State.enabled; - this.uuid = UUID.randomUUID().toString(); + this.uuid = uuid; } public void setNeedsCleanup(boolean value) { @@ -99,7 +97,11 @@ public long getId() { return id; } - @Override + public void setId(long id) { + this.id = id; + } + + @Override public String getAccountName() { return accountName; } @@ -176,4 +178,5 @@ public String getUuid() { public void setUuid(String uuid) { this.uuid = uuid; } + } diff --git a/core/src/com/cloud/user/UserVO.java b/core/src/com/cloud/user/UserVO.java index 919f4134e..8b7c4e3f1 100644 --- a/core/src/com/cloud/user/UserVO.java +++ b/core/src/com/cloud/user/UserVO.java @@ -101,8 +101,8 @@ public UserVO(long id) { this.id = id; this.uuid = UUID.randomUUID().toString(); } - - public UserVO(long accountId, String username, String password, String firstName, String lastName, String email, String timezone) { + + public UserVO(long accountId, String username, String password, String firstName, String lastName, String email, String timezone, String uuid) { this.accountId = accountId; this.username = username; this.password = password; @@ -111,9 +111,9 @@ public UserVO(long accountId, String username, String password, String firstName this.email = email; this.timezone = timezone; this.state = State.enabled; - this.uuid = UUID.randomUUID().toString(); + this.uuid = uuid; } - + @Override public long getId() { return id; @@ -261,4 +261,5 @@ public String getUuid() { public void setUuid(String uuid) { this.uuid = uuid; } + } diff --git a/core/src/com/cloud/vm/DomainRouterVO.java b/core/src/com/cloud/vm/DomainRouterVO.java index 052d2054f..2cc936470 100755 --- a/core/src/com/cloud/vm/DomainRouterVO.java +++ b/core/src/com/cloud/vm/DomainRouterVO.java @@ -36,45 +36,45 @@ public class DomainRouterVO extends VMInstanceVO implements VirtualRouter { @Column(name="element_id") private long elementId; - + @Column(name="public_ip_address") private String publicIpAddress; - + @Column(name="public_mac_address") private String publicMacAddress; - + @Column(name="public_netmask") private String publicNetmask; @Column(name="is_redundant_router") boolean isRedundantRouter; - + @Column(name="priority") int priority; - + @Column(name="is_priority_bumpup") boolean isPriorityBumpUp; - + @Column(name="redundant_state") @Enumerated(EnumType.STRING) private RedundantState redundantState; - + @Column(name="stop_pending") boolean stopPending; - + @Column(name="role") @Enumerated(EnumType.STRING) private Role role = Role.VIRTUAL_ROUTER; - + @Column(name="template_version") private String templateVersion; - + @Column(name="scripts_version") private String scriptsVersion; - + @Column(name="vpc_id") private Long vpcId; - + public DomainRouterVO(long id, long serviceOfferingId, long elementId, @@ -99,7 +99,7 @@ public DomainRouterVO(long id, this.stopPending = stopPending; this.vpcId = vpcId; } - + public DomainRouterVO(long id, long serviceOfferingId, long elementId, @@ -143,97 +143,97 @@ public void setPublicNetmask(String publicNetmask) { } @Override - public long getDataCenterIdToDeployIn() { - return dataCenterIdToDeployIn; + public long getDataCenterId() { + return dataCenterId; } - + public String getPublicNetmask() { return publicNetmask; } - + public String getPublicMacAddress() { return publicMacAddress; } - + protected DomainRouterVO() { super(); } - + @Override public String getPublicIpAddress() { return publicIpAddress; } - - @Override - public Role getRole() { - return role; - } - - public void setRole(Role role) { - this.role = role; - } - - @Override - public boolean getIsRedundantRouter() { - return this.isRedundantRouter; - } - - public void setIsRedundantRouter(boolean isRedundantRouter) { - this.isRedundantRouter = isRedundantRouter; - } - - @Override - public long getServiceOfferingId() { - return serviceOfferingId; - } - - public int getPriority() { - return this.priority; - } - - public void setPriority(int priority) { - this.priority = priority; - } - - @Override - public RedundantState getRedundantState() { - return this.redundantState; - } - - public void setRedundantState(RedundantState redundantState) { - this.redundantState = redundantState; - } - - public boolean getIsPriorityBumpUp() { - return this.isPriorityBumpUp; - } - - public void setIsPriorityBumpUp(boolean isPriorityBumpUp) { - this.isPriorityBumpUp = isPriorityBumpUp; - } @Override - public boolean isStopPending() { - return this.stopPending; - } + public Role getRole() { + return role; + } + + public void setRole(Role role) { + this.role = role; + } + + @Override + public boolean getIsRedundantRouter() { + return this.isRedundantRouter; + } + + public void setIsRedundantRouter(boolean isRedundantRouter) { + this.isRedundantRouter = isRedundantRouter; + } @Override - public void setStopPending(boolean stopPending) { - this.stopPending = stopPending; - } - + public long getServiceOfferingId() { + return serviceOfferingId; + } + + public int getPriority() { + return this.priority; + } + + public void setPriority(int priority) { + this.priority = priority; + } + + @Override + public RedundantState getRedundantState() { + return this.redundantState; + } + + public void setRedundantState(RedundantState redundantState) { + this.redundantState = redundantState; + } + + public boolean getIsPriorityBumpUp() { + return this.isPriorityBumpUp; + } + + public void setIsPriorityBumpUp(boolean isPriorityBumpUp) { + this.isPriorityBumpUp = isPriorityBumpUp; + } + + @Override + public boolean isStopPending() { + return this.stopPending; + } + + @Override + public void setStopPending(boolean stopPending) { + this.stopPending = stopPending; + } + public String getTemplateVersion() { return this.templateVersion; } - + public void setTemplateVersion(String templateVersion) { this.templateVersion = templateVersion; } - + public String getScriptsVersion() { return this.scriptsVersion; } - + public void setScriptsVersion(String scriptsVersion) { this.scriptsVersion = scriptsVersion; } @@ -242,9 +242,5 @@ public void setScriptsVersion(String scriptsVersion) { public Long getVpcId() { return vpcId; } - - @Override - public boolean canPlugNics() { - return true; - } + } diff --git a/core/src/com/cloud/vm/UserVmCloneSettingVO.java b/core/src/com/cloud/vm/UserVmCloneSettingVO.java new file mode 100644 index 000000000..24bb1e87c --- /dev/null +++ b/core/src/com/cloud/vm/UserVmCloneSettingVO.java @@ -0,0 +1,50 @@ +// 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.vm; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Table; + +@Entity +@Table(name="user_vm_clone_setting") +public class UserVmCloneSettingVO { + + @Column(name="vm_id") + private Long vmId; + + @Column(name="clone_type") + private String cloneType; + + public UserVmCloneSettingVO() { + + } + + public UserVmCloneSettingVO(long id, + String cloneType) { + this.vmId = id; + this.cloneType = cloneType; + } + + public long getVmId() { + return this.vmId; + } + + public String getCloneType() { + return this.cloneType; + } +} diff --git a/core/src/com/cloud/vm/UserVmVO.java b/core/src/com/cloud/vm/UserVmVO.java index 05a4bd1a6..a16eaf9dc 100755 --- a/core/src/com/cloud/vm/UserVmVO.java +++ b/core/src/com/cloud/vm/UserVmVO.java @@ -78,8 +78,8 @@ public UserVmVO(long id, long accountId, long serviceOfferingId, String userData, - String name) { - super(id, serviceOfferingId, name, instanceName, Type.User, templateId, hypervisorType, guestOsId, domainId, accountId, haEnabled, limitCpuUse); + String name, Long diskOfferingId) { + super(id, serviceOfferingId, name, instanceName, Type.User, templateId, hypervisorType, guestOsId, domainId, accountId, haEnabled, limitCpuUse, diskOfferingId); this.userData = userData; this.displayName = displayName; this.details = new HashMap(); diff --git a/core/src/com/cloud/vm/VMInstanceVO.java b/core/src/com/cloud/vm/VMInstanceVO.java index 13c1cf359..77e9c0279 100644 --- a/core/src/com/cloud/vm/VMInstanceVO.java +++ b/core/src/com/cloud/vm/VMInstanceVO.java @@ -42,28 +42,27 @@ import com.cloud.utils.db.StateMachine; import com.cloud.utils.fsm.FiniteStateObject; import com.cloud.vm.VirtualMachine.State; -import org.apache.cloudstack.api.InternalIdentity; @Entity @Table(name="vm_instance") @Inheritance(strategy=InheritanceType.JOINED) @DiscriminatorColumn(name="type", discriminatorType=DiscriminatorType.STRING, length=32) public class VMInstanceVO implements VirtualMachine, FiniteStateObject { - @Id + @Id @TableGenerator(name="vm_instance_sq", table="sequence", pkColumnName="name", valueColumnName="value", pkColumnValue="vm_instance_seq", allocationSize=1) @Column(name="id", updatable=false, nullable = false) - protected long id; + protected long id; @Column(name="name", updatable=false, nullable=false, length=255) - protected String hostName = null; + protected String hostName = null; @Encrypt @Column(name="vnc_password", updatable=true, nullable=false, length=255) protected String vncPassword; - + @Column(name="proxy_id", updatable=true, nullable=true) protected Long proxyId; - + @Temporal(TemporalType.TIMESTAMP) @Column(name="proxy_assign_time", updatable=true, nullable=true) protected Date proxyAssignTime; @@ -79,20 +78,20 @@ public class VMInstanceVO implements VirtualMachine, FiniteStateObject details; @Column(name="uuid") protected String uuid = UUID.randomUUID().toString(); ; + + @Column(name="disk_offering_id") + protected Long diskOfferingId; public VMInstanceVO(long id, - long serviceOfferingId, - String name, - String instanceName, - Type type, - Long vmTemplateId, - HypervisorType hypervisorType, - long guestOSId, - long domainId, - long accountId, - boolean haEnabled) { + long serviceOfferingId, + String name, + String instanceName, + Type type, + Long vmTemplateId, + HypervisorType hypervisorType, + long guestOSId, + long domainId, + long accountId, + boolean haEnabled) { this.id = id; this.hostName = name != null ? name : this.uuid; if (vmTemplateId != null) { @@ -191,178 +198,179 @@ public VMInstanceVO(long id, long domainId, long accountId, boolean haEnabled, - boolean limitResourceUse) { - this(id, serviceOfferingId, name, instanceName, type, vmTemplateId, hypervisorType, guestOSId, domainId, accountId, haEnabled); + boolean limitResourceUse, Long diskOfferingId) { + this(id, serviceOfferingId, name, instanceName, type, vmTemplateId, hypervisorType, guestOSId, domainId, accountId, haEnabled); this.limitCpuUse = limitResourceUse; + this.diskOfferingId = diskOfferingId; } - + protected VMInstanceVO() { } - + public Date getRemoved() { - return removed; + return removed; } - + @Override public long getDomainId() { return domainId; } - + @Override public long getAccountId() { return accountId; } - + @Override public Type getType() { return type; } - + public long getUpdated() { - return updated; + return updated; } - - @Override + + @Override public long getId() { - return id; - } - - @Override - public String getUuid() { - return uuid; - } + return id; + } - public void setUuid(String uuid) { - this.uuid = uuid; - } - - @Override + @Override + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + @Override public HypervisorType getHypervisorType() { - return hypervisorType; - } - - @Override + return hypervisorType; + } + + @Override public Date getCreated() { - return created; - } - - public Date getUpdateTime() { - return updateTime; - } - - @Override - public long getDataCenterIdToDeployIn() { - return dataCenterIdToDeployIn; - } - - @Override - public String getHostName() { - return hostName; - } - - @Override - public String getInstanceName() { - return instanceName; - } - - @Override - public State getState() { - return state; - } - - // don't use this directly, use VM state machine instead, this method is added for migration tool only - @Override + return created; + } + + public Date getUpdateTime() { + return updateTime; + } + + @Override + public long getDataCenterId() { + return dataCenterId; + } + + @Override + public String getHostName() { + return hostName; + } + + @Override + public String getInstanceName() { + return instanceName; + } + + @Override + public State getState() { + return state; + } + + // don't use this directly, use VM state machine instead, this method is added for migration tool only + @Override public void setState(State state) { - this.state = state; - } - - @Override - public String getPrivateIpAddress() { - return privateIpAddress; - } - - public void setPrivateIpAddress(String address) { - privateIpAddress = address; - } - + this.state = state; + } + + @Override + public String getPrivateIpAddress() { + return privateIpAddress; + } + + public void setPrivateIpAddress(String address) { + privateIpAddress = address; + } + public void setVncPassword(String vncPassword) { this.vncPassword = vncPassword; } - + @Override public String getVncPassword() { return vncPassword; } - + @Override public long getServiceOfferingId() { return serviceOfferingId; } - - public Long getProxyId() { - return proxyId; + + public Long getProxyId() { + return proxyId; } - + public void setProxyId(Long proxyId) { - this.proxyId = proxyId; + this.proxyId = proxyId; } - + public Date getProxyAssignTime() { - return this.proxyAssignTime; + return this.proxyAssignTime; } - + public void setProxyAssignTime(Date time) { - this.proxyAssignTime = time; + this.proxyAssignTime = time; } - - @Override - public long getTemplateId() { - if (templateId == null) { + + @Override + public long getTemplateId() { + if (templateId == null) { return -1; } else { return templateId; } - } - - public void setTemplateId(Long templateId) { - this.templateId = templateId; - } + } - @Override + public void setTemplateId(Long templateId) { + this.templateId = templateId; + } + + @Override public long getGuestOSId() { - return guestOSId; - } - - public void setGuestOSId(long guestOSId) { - this.guestOSId = guestOSId; - } + return guestOSId; + } - public void incrUpdated() { - updated++; - } - - public void decrUpdated() { - updated--; - } + public void setGuestOSId(long guestOSId) { + this.guestOSId = guestOSId; + } + + public void incrUpdated() { + updated++; + } + + public void decrUpdated() { + updated--; + } + + @Override + public Long getHostId() { + return hostId; + } + + @Override + public Long getLastHostId() { + return lastHostId; + } - @Override - public Long getHostId() { - return hostId; - } - - @Override - public Long getLastHostId() { - return lastHostId; - } - public void setLastHostId(Long lastHostId) { - this.lastHostId = lastHostId; - } - - public void setHostId(Long hostId) { - this.hostId = hostId; - } - + this.lastHostId = lastHostId; + } + + public void setHostId(Long hostId) { + this.hostId = hostId; + } + @Override public boolean isHaEnabled() { return haEnabled; @@ -374,7 +382,7 @@ public boolean limitCpuUse() { } public void setLimitCpuUse(boolean value) { - limitCpuUse = value; + limitCpuUse = value; } @Override @@ -386,7 +394,7 @@ public String getPrivateMacAddress() { public Long getPodIdToDeployIn() { return podIdToDeployIn; } - + public void setPodId(long podId) { this.podIdToDeployIn = podId; } @@ -396,80 +404,80 @@ public void setPrivateMacAddress(String privateMacAddress) { } public void setDataCenterId(long dataCenterId) { - this.dataCenterIdToDeployIn = dataCenterId; + this.dataCenterId = dataCenterId; } - + public boolean isRemoved() { return removed != null; } - + public void setHaEnabled(boolean value) { haEnabled = value; } - public void setReservationId(String reservationId) { - this.reservationId = reservationId; - } - - public String getReservationId() { - return this.reservationId; - } - + public void setReservationId(String reservationId) { + this.reservationId = reservationId; + } + + public String getReservationId() { + return this.reservationId; + } + @Override public Map getDetails() { return details; } - + public void setDetail(String name, String value) { assert (details != null) : "Did you forget to load the details?"; - + details.put(name, value); } - + public void setDetails(Map details) { this.details = details; } - transient String toString; + transient String toString; @Override - public String toString() { + public String toString() { if (toString == null) { toString = new StringBuilder("VM[").append(type.toString()).append("|").append(hostName).append("]").toString(); } return toString; } - + @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result + (int) (id ^ (id >>> 32)); - return result; - } + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + (int) (id ^ (id >>> 32)); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + VMInstanceVO other = (VMInstanceVO) obj; + if (id != other.id) + return false; + return true; + } + - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - VMInstanceVO other = (VMInstanceVO) obj; - if (id != other.id) - return false; - return true; - } - - public void setServiceOfferingId(long serviceOfferingId) { this.serviceOfferingId = serviceOfferingId; } - - @Override - public boolean canPlugNics() { - return false; - } + + @Override + public Long getDiskOfferingId() { + return diskOfferingId; + } } diff --git a/core/src/com/cloud/vm/VirtualEnvironment.java b/core/src/com/cloud/vm/VirtualEnvironment.java deleted file mode 100644 index 79d4a59bb..000000000 --- a/core/src/com/cloud/vm/VirtualEnvironment.java +++ /dev/null @@ -1,46 +0,0 @@ -// 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.vm; - -import java.util.List; - -/** - * - * be an information carrier within one thread only. - * - */ -public class VirtualEnvironment { - /** - * The actual machine - */ - public VirtualMachine machine; - - /** - * Disks to assign to the machine in order. - */ - public List disks; - - /** - * Networks to assign to the machine. - */ - public List networks; - - /** - * Boot options to assign to the machine. - */ - public String bootOptions; -} diff --git a/core/src/com/cloud/vm/VirtualNetwork.java b/core/src/com/cloud/vm/VirtualNetwork.java deleted file mode 100644 index ace3b8076..000000000 --- a/core/src/com/cloud/vm/VirtualNetwork.java +++ /dev/null @@ -1,72 +0,0 @@ -// 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.vm; - -import com.cloud.network.Networks.IsolationType; -import com.cloud.network.Networks.Mode; - -/** - * VirtualNetwork describes from a management level the - * machine. - */ -public class VirtualNetwork { - /** - * The gateway for this network. - */ - public String gateway; - - /** - * Netmask - */ - public String netmask; - - /** - * ip address. null if mode is DHCP. - */ - public String ip; - - /** - * Mac Address. - */ - public String mac; - - /** - * rate limit on this network. -1 if no limit. - */ - public long rate; - - /** - * tag for virtualization. - */ - public String tag; - - /** - * mode to acquire ip address. - */ - public Mode mode; - - /** - * Isolation method for networking. - */ - public IsolationType method; - - public boolean firewalled; - - public int[] openPorts; - - public int[] closedPorts; -} diff --git a/core/src/com/cloud/vm/VmDetailConstants.java b/core/src/com/cloud/vm/VmDetailConstants.java index 90068d1b7..5ff3ce02f 100644 --- a/core/src/com/cloud/vm/VmDetailConstants.java +++ b/core/src/com/cloud/vm/VmDetailConstants.java @@ -20,4 +20,5 @@ public interface VmDetailConstants { public static final String KEYBOARD = "keyboard"; public static final String NIC_ADAPTER = "nicAdapter"; public static final String ROOK_DISK_CONTROLLER = "rootDiskController"; + public static final String NESTED_VIRTUALIZATION_FLAG = "nestedVirtualizationFlag"; } diff --git a/core/src/com/cloud/vm/snapshot/VMSnapshotVO.java b/core/src/com/cloud/vm/snapshot/VMSnapshotVO.java new file mode 100644 index 000000000..03d4945fd --- /dev/null +++ b/core/src/com/cloud/vm/snapshot/VMSnapshotVO.java @@ -0,0 +1,224 @@ +// 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.vm.snapshot; + +import java.util.Date; +import java.util.UUID; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.TableGenerator; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import com.cloud.utils.db.GenericDao; + +@Entity +@Table(name = "vm_snapshots") +public class VMSnapshotVO implements VMSnapshot { + @Id + @TableGenerator(name = "vm_snapshots_sq", table = "sequence", pkColumnName = "name", valueColumnName = "value", pkColumnValue = "vm_snapshots_seq", allocationSize = 1) + @GeneratedValue(strategy = GenerationType.TABLE) + @Column(name = "id") + long id; + + @Column(name = "uuid") + String uuid = UUID.randomUUID().toString(); + + @Column(name = "name") + String name; + + @Column(name = "display_name") + String displayName; + + @Column(name = "description") + String description; + + @Column(name = "vm_id") + long vmId; + + @Column(name = "account_id") + long accountId; + + @Column(name = "domain_id") + long domainId; + + @Column(name = "vm_snapshot_type") + @Enumerated(EnumType.STRING) + VMSnapshot.Type type; + + @Column(name = "state", updatable = true, nullable = false) + @Enumerated(value = EnumType.STRING) + private State state; + + @Column(name = GenericDao.CREATED_COLUMN) + Date created; + + @Column(name = GenericDao.REMOVED_COLUMN) + Date removed; + + @Column(name = "current") + Boolean current; + + @Column(name = "parent") + Long parent; + + @Column(name = "updated") + @Temporal(value = TemporalType.TIMESTAMP) + Date updated; + + @Column(name="update_count", updatable = true, nullable=false) + protected long updatedCount; + + public Long getParent() { + return parent; + } + + public void setParent(Long parent) { + this.parent = parent; + } + + public VMSnapshotVO() { + + } + + public Date getRemoved() { + return removed; + } + + public VMSnapshotVO(Long accountId, Long domainId, Long vmId, + String description, String vmSnapshotName, String vsDisplayName, + Long serviceOfferingId, Type type, Boolean current) { + this.accountId = accountId; + this.domainId = domainId; + this.vmId = vmId; + this.state = State.Allocated; + this.description = description; + this.name = vmSnapshotName; + this.displayName = vsDisplayName; + this.type = type; + this.current = current; + } + + public String getDescription() { + return description; + } + + @Override + public Date getCreated() { + return created; + } + + public void setCreated(Date created) { + this.created = created; + } + + @Override + public long getId() { + return id; + } + + @Override + public Long getVmId() { + return vmId; + } + + public void setVmId(Long vmId) { + this.vmId = vmId; + } + + @Override + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public State getState() { + return state; + } + + public void setState(State state) { + this.state = state; + } + + @Override + public String getUuid() { + return uuid; + } + + @Override + public long getAccountId() { + return accountId; + } + + @Override + public long getDomainId() { + return domainId; + } + + @Override + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public Boolean getCurrent() { + return current; + } + + public void setCurrent(Boolean current) { + this.current = current; + } + + @Override + public long getUpdatedCount() { + return updatedCount; + } + + @Override + public void incrUpdatedCount() { + this.updatedCount++; + } + + @Override + public Date getUpdated() { + return updated; + } + + @Override + public Type getType() { + return type; + } + + public void setRemoved(Date removed) { + this.removed = removed; + } +} diff --git a/debian/README b/debian/README deleted file mode 100644 index cbfbf1bb9..000000000 --- a/debian/README +++ /dev/null @@ -1,6 +0,0 @@ -The Debian Package ----------------------------- - -This is part of the Cloud Stack collection of packages. - - -- Manuel Amador (Rudd-O) Thu, 25 Mar 2010 15:12:06 -0700 diff --git a/debian/changelog b/debian/changelog index c3243aad5..f56dbd820 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,15 @@ +cloudstack (4.2.0-incubating-0.0.snapshot) unstable; urgency=low + + * Update the version to 4.2.0 to be in sync with Maven + + -- Wido den Hollander Wed, 13 Mar 2013 19:15:00 +0100 + +cloudstack (4.1.0-incubating-0.0.snapshot) unstable; urgency=low + + * Incorporate incubating into version, remove epoch + + -- Noa Resare Tue, 05 Feb 2013 18:05:28 +0000 + cloud (1:4.0.0-1) unstable; urgency=low * Bumping the version to 4.0.0 diff --git a/debian/cloud-agent-deps.install b/debian/cloud-agent-deps.install deleted file mode 100644 index b05b7d1d9..000000000 --- a/debian/cloud-agent-deps.install +++ /dev/null @@ -1,18 +0,0 @@ -# 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. - -/usr/share/java/libvirt-0.4.9.jar diff --git a/debian/cloud-agent-libs.install b/debian/cloud-agent-libs.install deleted file mode 100644 index ba2593558..000000000 --- a/debian/cloud-agent-libs.install +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -/usr/share/java/cloud-agent.jar -/usr/share/java/cloud-plugin-hypervisor-kvm.jar diff --git a/debian/cloud-agent.config b/debian/cloud-agent.config deleted file mode 100644 index 00ae6c00d..000000000 --- a/debian/cloud-agent.config +++ /dev/null @@ -1,17 +0,0 @@ -# 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. - diff --git a/debian/cloud-agent.install b/debian/cloud-agent.install deleted file mode 100644 index c67e90ab4..000000000 --- a/debian/cloud-agent.install +++ /dev/null @@ -1,25 +0,0 @@ -# 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. - -/etc/cloud/agent/agent.properties -/etc/cloud/agent/developer.properties.template -/etc/cloud/agent/environment.properties -/etc/cloud/agent/log4j-cloud.xml -/etc/init.d/cloud-agent -/usr/bin/cloud-setup-agent -/usr/bin/cloud-ssh -/var/log/cloud/agent diff --git a/debian/cloud-agent.postinst b/debian/cloud-agent.postinst deleted file mode 100644 index f022f6d16..000000000 --- a/debian/cloud-agent.postinst +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/sh -e -# 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. - -case "$1" in - configure) - - for i in /var/log/cloud/agent - do - chmod 0770 $i - done - - if [ "$2" = "" ] ; then # no recently configured version, this is a first install - /usr/sbin/update-rc.d cloud-agent defaults || true - fi - - ;; -esac - -#DEBHELPER# diff --git a/debian/cloud-cli.config b/debian/cloud-cli.config deleted file mode 100644 index 00ae6c00d..000000000 --- a/debian/cloud-cli.config +++ /dev/null @@ -1,17 +0,0 @@ -# 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. - diff --git a/debian/cloud-cli.install b/debian/cloud-cli.install deleted file mode 100644 index ce1784611..000000000 --- a/debian/cloud-cli.install +++ /dev/null @@ -1,21 +0,0 @@ -# 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. - -/etc/cloud/cli/commands.xml -/usr/bin/cloud-grab-dependent-library-versions -/usr/bin/cloud-tool -/usr/bin/cloudvoladm diff --git a/debian/cloud-client-ui.install b/debian/cloud-client-ui.install deleted file mode 100644 index ba1408afc..000000000 --- a/debian/cloud-client-ui.install +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -/usr/share/cloud/management/webapps/client/* - diff --git a/debian/cloud-client.config b/debian/cloud-client.config deleted file mode 100644 index 00ae6c00d..000000000 --- a/debian/cloud-client.config +++ /dev/null @@ -1,17 +0,0 @@ -# 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. - diff --git a/debian/cloud-client.install b/debian/cloud-client.install deleted file mode 100644 index aadb145ae..000000000 --- a/debian/cloud-client.install +++ /dev/null @@ -1,58 +0,0 @@ -# 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. - -/etc/cloud/management/catalina.policy -/etc/cloud/management/catalina.properties -/etc/cloud/management/commands.properties -/etc/cloud/management/components.xml -/etc/cloud/management/context.xml -/etc/cloud/management/db.properties -/etc/cloud/management/environment.properties -/etc/cloud/management/ehcache.xml -/etc/cloud/management/log4j-cloud.xml -/etc/cloud/management/logging.properties -/etc/cloud/management/server.xml -/etc/cloud/management/tomcat6.conf -/etc/cloud/management/classpath.conf -/etc/cloud/management/tomcat-users.xml -/etc/cloud/management/web.xml -/etc/cloud/management/server-nonssl.xml -/etc/cloud/management/tomcat6-nonssl.conf -/etc/cloud/management/virtualrouter_commands.properties -/etc/cloud/management/f5bigip_commands.properties -/etc/cloud/management/junipersrx_commands.properties -/etc/cloud/management/netscalerloadbalancer_commands.properties -/etc/cloud/management/cisconexusvsm_commands.properties -/etc/cloud/management/Catalina -/etc/cloud/management/Catalina/localhost -/etc/cloud/management/Catalina/localhost/client -/etc/init.d/cloud-management -/usr/share/cloud/management/bin -/usr/share/cloud/management/conf -/usr/share/cloud/management/lib -/usr/share/cloud/management/logs -/usr/share/cloud/management/temp -/usr/share/cloud/management/work -/var/cache/cloud/management -/var/cache/cloud/management/work -/var/cache/cloud/management/temp -/var/log/cloud/management -/var/lib/cloud/mnt -/var/lib/cloud/management -/usr/bin/cloud-setup-management -/usr/bin/cloud-update-xenserver-licenses -/etc/cloud/management/commands-ext.properties diff --git a/debian/cloud-client.postinst b/debian/cloud-client.postinst deleted file mode 100644 index 87c761032..000000000 --- a/debian/cloud-client.postinst +++ /dev/null @@ -1,49 +0,0 @@ -#!/bin/sh -e -# 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. - -case "$1" in - configure) - if ! id cloud > /dev/null 2>&1 ; then - adduser --system --home /var/lib/cloud/management --no-create-home \ - --group --disabled-password --shell /bin/sh cloud - # update me in all the .postinst that you can find me in, as well - fi - - for i in /var/lib/cloud/mnt /var/cache/cloud/management \ - /var/cache/cloud/management/work /var/cache/cloud/management/temp \ - /var/log/cloud/management /etc/cloud/management/Catalina \ - /etc/cloud/management/Catalina/localhost /var/lib/cloud/management /etc/cloud/management/Catalina/localhost/client - do - chmod 0770 $i - chgrp cloud $i - done - - for i in /etc/cloud/management/db.properties - do - chmod 0640 $i - chgrp cloud $i - done - - if [ "$2" = "" ] ; then # no recently configured version, this is a first install - /usr/sbin/update-rc.d cloud-management defaults || true - fi - - ;; -esac - -#DEBHELPER# diff --git a/debian/cloud-core.install b/debian/cloud-core.install deleted file mode 100644 index 00a43d482..000000000 --- a/debian/cloud-core.install +++ /dev/null @@ -1,19 +0,0 @@ -# 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. - -/usr/share/java/cloud-core.jar - diff --git a/debian/cloud-deps.install b/debian/cloud-deps.install deleted file mode 100644 index 74aade125..000000000 --- a/debian/cloud-deps.install +++ /dev/null @@ -1,34 +0,0 @@ -# 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. - -/usr/share/java/ehcache-1.5.0.jar -/usr/share/java/mail-1.4.jar -/usr/share/java/httpcore-4.0.jar -/usr/share/java/log4j-*.jar -/usr/share/java/apache-log4j-extras-1.1.jar -/usr/share/java/trilead-ssh2-build213-svnkit-1.3-patch.jar -/usr/share/java/xmlrpc-common-3.*.jar -/usr/share/java/xmlrpc-client-3.*.jar -/usr/share/java/jstl-1.2.jar -/usr/share/java/axis2-1.5.1.jar -/usr/share/java/wsdl4j-1.6.2.jar -/usr/share/java/bcprov-*.jar -/usr/share/java/jasypt-1.*.jar -/usr/share/java/ejb-api-3.0.jar -/usr/share/java/javax.persistence-2.0.0.jar -/usr/share/java/gson-1.7.1.jar -/usr/share/java/xapi-5.6.100-1-SNAPSHOT.jar diff --git a/debian/cloud-management.config b/debian/cloud-management.config deleted file mode 100644 index 00ae6c00d..000000000 --- a/debian/cloud-management.config +++ /dev/null @@ -1,17 +0,0 @@ -# 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. - diff --git a/debian/cloud-python.install b/debian/cloud-python.install deleted file mode 100644 index b8eac722a..000000000 --- a/debian/cloud-python.install +++ /dev/null @@ -1,18 +0,0 @@ -# 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. - -/usr/lib/python*/dist-packages/cloud* diff --git a/debian/cloud-scripts.install b/debian/cloud-scripts.install deleted file mode 100644 index 5e8896d43..000000000 --- a/debian/cloud-scripts.install +++ /dev/null @@ -1,27 +0,0 @@ -# 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. - -/usr/lib/cloud/common/scripts/installer/* -/usr/lib/cloud/common/scripts/network/* -/usr/lib/cloud/common/scripts/storage/* -/usr/lib/cloud/common/scripts/util/* -/usr/lib/cloud/common/scripts/vm/network/* -/usr/lib/cloud/common/scripts/vm/systemvm/* -/usr/lib/cloud/common/scripts/vm/pingtest.sh -/usr/lib/cloud/common/scripts/vm/hypervisor/kvm/* -/usr/lib/cloud/common/scripts/vm/hypervisor/versions.sh -/usr/lib/cloud/common/scripts/vm/hypervisor/xenserver/* diff --git a/debian/cloud-server.install b/debian/cloud-server.install deleted file mode 100644 index 9cd1eebb5..000000000 --- a/debian/cloud-server.install +++ /dev/null @@ -1,31 +0,0 @@ -# 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. - -/usr/share/java/cloud-server.jar -/usr/share/java/cloud-ovm.jar -/etc/cloud/server/* -/usr/share/java/cloud-dp-user-concentrated-pod.jar -/usr/share/java/cloud-dp-user-dispersing.jar -/usr/share/java/cloud-host-allocator-random.jar -/usr/share/java/cloud-plugin-elb.jar -/usr/share/java/cloud-plugin-ovs.jar -/usr/share/java/cloud-plugin-nicira-nvp.jar -/usr/share/java/cloud-storage-allocator-random.jar -/usr/share/java/cloud-user-authenticator-ldap.jar -/usr/share/java/cloud-user-authenticator-md5.jar -/usr/share/java/cloud-user-authenticator-plaintext.jar -/usr/share/java/cloud-plugin-hypervisor-xen.jar diff --git a/debian/cloud-setup.install b/debian/cloud-setup.install deleted file mode 100644 index 5c37c6492..000000000 --- a/debian/cloud-setup.install +++ /dev/null @@ -1,25 +0,0 @@ -# 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. - -/usr/bin/cloud-setup-databases -/usr/bin/cloud-migrate-databases -/usr/bin/cloud-set-guest-password -/usr/bin/cloud-set-guest-sshkey -/usr/share/cloud/setup/*.sql -/usr/share/cloud/setup/*.sh -/usr/share/cloud/setup/server-setup.xml -/usr/share/cloud/setup/db/*.sql diff --git a/debian/cloud-system-iso.install b/debian/cloud-system-iso.install deleted file mode 100644 index 5a0b6364f..000000000 --- a/debian/cloud-system-iso.install +++ /dev/null @@ -1,18 +0,0 @@ -# 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. - -/usr/lib/cloud/common/vms/systemvm.iso diff --git a/debian/cloud-usage.install b/debian/cloud-usage.install deleted file mode 100644 index 22f583441..000000000 --- a/debian/cloud-usage.install +++ /dev/null @@ -1,23 +0,0 @@ -# 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. - -/usr/share/java/cloud-usage.jar -/etc/init.d/cloud-usage -/var/log/cloud/usage -/etc/cloud/usage/usage-components.xml -/etc/cloud/usage/log4j-cloud_usage.xml -/etc/cloud/usage/db.properties diff --git a/debian/cloud-usage.postinst b/debian/cloud-usage.postinst deleted file mode 100644 index 56f895df6..000000000 --- a/debian/cloud-usage.postinst +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh -e -# 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. - -case "$1" in - configure) - - if ! id cloud > /dev/null 2>&1 ; then - adduser --system --home /var/lib/cloud/management --no-create-home \ - --group --disabled-password --shell /bin/sh cloud - # update me in cloud-client.postinst as well - fi - - for i in /var/log/cloud/usage - do - chmod 0770 $i - chgrp cloud $i - done - - for i in /etc/cloud/usage/db.properties - do - chmod 0640 $i - chgrp cloud $i - done - - if [ "$2" = "" ] ; then # no recently configured version, this is a first install - /usr/sbin/update-rc.d cloud-usage defaults || true - fi - - ;; -esac - -#DEBHELPER# diff --git a/debian/cloud-utils.install b/debian/cloud-utils.install deleted file mode 100644 index 39c357a1f..000000000 --- a/debian/cloud-utils.install +++ /dev/null @@ -1,22 +0,0 @@ -# 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. - -/usr/share/java/cloud-utils.jar -/usr/share/java/cloud-api.jar -/usr/share/doc/cloud/version-info -/usr/bin/cloud-sccs -/usr/bin/cloud-gitrevs diff --git a/debian/cloudstack-agent.install b/debian/cloudstack-agent.install new file mode 100644 index 000000000..a3cc86964 --- /dev/null +++ b/debian/cloudstack-agent.install @@ -0,0 +1,26 @@ +# 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. + +/etc/cloudstack/agent/agent.properties +/etc/cloudstack/agent/environment.properties +/etc/cloudstack/agent/log4j-cloud.xml +/etc/init.d/cloudstack-agent +/usr/bin/cloudstack-setup-agent +/usr/bin/cloudstack-ssh +/var/log/cloudstack/agent +/usr/share/cloudstack-agent/lib/* +/usr/share/cloudstack-agent/plugins diff --git a/debian/cloudstack-agent.postinst b/debian/cloudstack-agent.postinst new file mode 100644 index 000000000..499ae6a69 --- /dev/null +++ b/debian/cloudstack-agent.postinst @@ -0,0 +1,40 @@ +#!/bin/bash + +# 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. + +set -e + +case "$1" in + configure) + OLDCONFDIR="/etc/cloud/agent" + NEWCONFDIR="/etc/cloudstack/agent" + CONFFILES="agent.properties log4j.xml log4j-cloud.xml" + + # Copy old configuration so the admin doesn't have to do that + # Only do so when we are installing for the first time + if [ -z "$2" ]; then + for FILE in $CONFFILES; do + if [ -f "$OLDCONFDIR/${FILE}" ]; then + cp -a $OLDCONFDIR/$FILE $NEWCONFDIR/$FILE + fi + done + fi + ;; +esac + +exit 0 \ No newline at end of file diff --git a/debian/cloudstack-awsapi.install b/debian/cloudstack-awsapi.install new file mode 100644 index 000000000..675b84def --- /dev/null +++ b/debian/cloudstack-awsapi.install @@ -0,0 +1,26 @@ +# 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. + +/etc/cloudstack/management/cloud-bridge.properties +/etc/cloudstack/management/commons-logging.properties +/etc/cloudstack/management/crypto.properties +/etc/cloudstack/management/xes.keystore +/etc/cloudstack/management/ec2-service.properties +/var/log/cloudstack/awsapi +/usr/bin/cloudstack-setup-bridge +/usr/bin/cloudstack-aws-api-register +/usr/share/cloudstack-bridge \ No newline at end of file diff --git a/debian/cloudstack-cli.install b/debian/cloudstack-cli.install new file mode 100644 index 000000000..287f9b1f6 --- /dev/null +++ b/debian/cloudstack-cli.install @@ -0,0 +1,16 @@ +# 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. \ No newline at end of file diff --git a/debian/cloudstack-common.install b/debian/cloudstack-common.install new file mode 100644 index 000000000..7e01adade --- /dev/null +++ b/debian/cloudstack-common.install @@ -0,0 +1,32 @@ +# 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. + +/usr/share/cloudstack-common/vms/systemvm.iso +/usr/share/cloudstack-common/scripts/installer/* +/usr/share/cloudstack-common/scripts/network/* +/usr/share/cloudstack-common/scripts/storage/* +/usr/share/cloudstack-common/scripts/util/* +/usr/share/cloudstack-common/scripts/vm/network/* +/usr/share/cloudstack-common/scripts/vm/systemvm/* +/usr/share/cloudstack-common/scripts/vm/pingtest.sh +/usr/share/cloudstack-common/scripts/vm/hypervisor/kvm/* +/usr/share/cloudstack-common/scripts/vm/hypervisor/versions.sh +/usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver/* +/usr/share/cloudstack-common/lib/* +/usr/bin/cloudstack-set-guest-password +/usr/bin/cloudstack-set-guest-sshkey +/usr/lib/python2.?/*-packages/* diff --git a/debian/cloudstack-docs.install b/debian/cloudstack-docs.install new file mode 100644 index 000000000..287f9b1f6 --- /dev/null +++ b/debian/cloudstack-docs.install @@ -0,0 +1,16 @@ +# 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. \ No newline at end of file diff --git a/debian/cloudstack-management.install b/debian/cloudstack-management.install new file mode 100644 index 000000000..5a682d458 --- /dev/null +++ b/debian/cloudstack-management.install @@ -0,0 +1,34 @@ +# 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. + +/etc/cloudstack/management/* +/etc/init.d/cloudstack-management +/etc/security/limits.d/cloudstack-limits.conf +/etc/sudoers.d/cloudstack +/var/cache/cloudstack/management +/var/cache/cloudstack/management/work +/var/cache/cloudstack/management/temp +/var/log/cloudstack/management +/var/lib/cloudstack/mnt +/var/lib/cloudstack/management +/usr/bin/cloudstack-update-xenserver-licenses +/usr/bin/cloudstack-setup-management +/usr/bin/cloudstack-setup-databases +/usr/bin/cloudstack-migrate-databases +/usr/bin/cloudstack-setup-encryption +/usr/bin/cloudstack-sysvmadm +/usr/share/cloudstack-management/* diff --git a/debian/cloudstack-management.postinst b/debian/cloudstack-management.postinst new file mode 100644 index 000000000..a1219cc78 --- /dev/null +++ b/debian/cloudstack-management.postinst @@ -0,0 +1,52 @@ +#!/bin/sh -e +# 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. + +if [ "$1" = configure ]; then + if ! getent passwd cloud >/dev/null; then + adduser --quiet --system --group --no-create-home --home /var/lib/cloudstack/management cloud + else + usermod -m -d /var/lib/cloudstack/management cloud || true + fi + + for i in /var/cache/cloudstack/management \ + /var/cache/cloudstack/management/work \ + /var/cache/cloudstack/management/temp \ + /var/log/cloudstack/management \ + /var/lib/cloudstack/management + do + chmod 0770 $i + chgrp cloud $i + done + + OLDCONFDIR="/etc/cloud/management" + NEWCONFDIR="/etc/cloudstack/management" + CONFFILES="db.properties cloud.keystore key" + + # Copy old configuration so the admin doesn't have to do that + # Only do so when we are installing for the first time + if [ -z "$2" ]; then + for FILE in $CONFFILES; do + if [ -f "$OLDCONFDIR/${FILE}" ]; then + cp -a $OLDCONFDIR/$FILE $NEWCONFDIR/$FILE + fi + done + fi + + chmod 0640 /etc/cloudstack/management/db.properties + chgrp cloud /etc/cloudstack/management/db.properties +fi diff --git a/debian/cloudstack-usage.install b/debian/cloudstack-usage.install new file mode 100644 index 000000000..4722e688d --- /dev/null +++ b/debian/cloudstack-usage.install @@ -0,0 +1,22 @@ +# 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. + +/usr/share/cloudstack-usage/lib/* +/usr/share/cloudstack-usage/plugins +/etc/init.d/cloudstack-usage +/var/log/cloudstack/usage +/etc/cloudstack/usage/* diff --git a/debian/cloudstack-usage.postinst b/debian/cloudstack-usage.postinst new file mode 100644 index 000000000..2e15d5d3a --- /dev/null +++ b/debian/cloudstack-usage.postinst @@ -0,0 +1,37 @@ +#!/bin/bash + +# 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. + +set -e + +case "$1" in + configure) + # We copy the db.properties file from the management server to the usage server + # This used to be a symlink, but we don't do that anymore + if [ -f "/etc/cloud/management/db.properties" ]; then + cp -a /etc/cloud/management/db.properties /etc/cloudstack/usage/db.properties + fi + + # We also retain the log4j configuration + if [ -f "/etc/cloud/usage/log4j-cloud_usage.xml" ]; then + cp -a /etc/cloud/usage/log4j-cloud_usage.xml /etc/cloudstack/usage/log4j-cloud_usage.xml + fi + ;; +esac + +exit 0 \ No newline at end of file diff --git a/debian/control b/debian/control index 380b2e4a7..eec9ca25c 100644 --- a/debian/control +++ b/debian/control @@ -1,118 +1,51 @@ -Source: cloud +Source: cloudstack Section: libs Priority: extra Maintainer: Wido den Hollander -Build-Depends: debhelper (>= 7), openjdk-6-jdk, tomcat6, libws-commons-util-java, libcommons-codec-java (>= 1.5), libcommons-httpclient-java (>= 3.1), libservlet2.5-java, genisoimage, python-mysqldb, maven3 | maven (>= 3), liblog4j1.2-java (>= 1.2.16) +Build-Depends: debhelper (>= 7), openjdk-6-jdk | openjdk-7-jdk, tomcat6, genisoimage, + python-mysqldb, maven3 | maven (>= 3), python (>= 2.6.6-3~) Standards-Version: 3.8.1 Homepage: http://www.cloudstack.org/ -Package: cloud-deps -Architecture: any -Depends: openjdk-6-jre, libcommons-codec-java (>= 1.5), libcommons-httpclient-java (>= 3.1) -Description: CloudStack library dependencies - This package contains a number of third-party dependencies - not shipped by distributions, required to run the CloudStack - Management Server. +Package: cloudstack-common +Architecture: all +Depends: bash, genisoimage +Conflicts: cloud-scripts, cloud-utils, cloud-system-iso, cloud-console-proxy, cloud-daemonize, cloud-deps, cloud-python, cloud-setup +Description: A common package which contains files which are shared by several CloudStack packages -Package: cloud-agent-deps -Architecture: any -Depends: openjdk-6-jre, cloud-deps (= ${source:Version}) -Description: CloudStack agent library dependencies - This package contains a number of third-party dependencies - not shipped by distributions, required to run the CloudStack - Agent. - -Package: cloud-utils -Architecture: any -Depends: openjdk-6-jre, python, libcglib-java (>= 2.2.2), libjsch-java (>= 0.1.42), libbackport-util-concurrent-java (>= 3.1), libcommons-dbcp-java (>= 1.4), libcommons-pool-java (>= 1.5.6) -Description: CloudStack utility library - The CloudStack utility libraries provide a set of Java classes used - in the CloudStack environment. - -Package: cloud-client-ui -Architecture: any -Depends: openjdk-6-jre, cloud-client (= ${source:Version}) -Description: CloudStack management server UI - The CloudStack management server is the central point of coordination, - management, and intelligence in the CloudStack Cloud Stack. This package - is a requirement of the cloud-client package, which installs the - CloudStack management server. - -Package: cloud-server -Architecture: any -Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-deps (= ${source:Version}), cloud-scripts (= ${source:Version}), libservlet2.5-java +Package: cloudstack-management +Architecture: all +Depends: cloudstack-common (= ${source:Version}), tomcat6, sysvinit-utils, sudo, jsvc, python-mysqldb, python-paramiko, augeas-tools +Conflicts: cloud-server, cloud-client, cloud-client-ui Description: CloudStack server library - The CloudStack server libraries provide a set of Java classes used - in the CloudStack management server. - -Package: cloud-scripts -Replaces: cloud-agent-scripts -Architecture: any -Depends: openjdk-6-jre, python, bash, bzip2, gzip, unzip, nfs-common, openssh-client -Description: CloudStack scripts - This package contains a number of scripts needed for the CloudStack Agent and Management Server. - Both the CloudStack Agent and Management server depend on this package - -Package: cloud-core -Architecture: any -Depends: openjdk-6-jre, cloud-utils (= ${source:Version}) -Description: CloudStack core library - The CloudStack core libraries provide a set of Java classes used - in the CloudStack Cloud Stack. - - -Package: cloud-client -Architecture: any -Depends: openjdk-6-jre, cloud-deps (= ${source:Version}), cloud-utils (= ${source:Version}), cloud-server (= ${source:Version}), cloud-client-ui (= ${source:Version}), cloud-setup (= ${source:Version}), cloud-python (= ${source:Version}), tomcat6, libws-commons-util-java, sysvinit-utils, chkconfig, sudo, jsvc, python-mysqldb, python-paramiko, augeas-tools, genisoimage, cloud-system-iso, libmysql-java (>= 5.1) -Description: CloudStack client - The CloudStack management server is the central point of coordination, - management, and intelligence in the CloudStack Cloud Stack. This package - is required for the management server to work. - -Package: cloud-setup -Architecture: any -Depends: openjdk-6-jre, python, cloud-utils (= ${source:Version}), cloud-deps (= ${source:Version}), cloud-server (= ${source:Version}), cloud-python (= ${source:Version}), python-mysqldb -Description: CloudStack client - The CloudStack setup tools let you set up your Management Server and Usage Server. + The CloudStack management server -Package: cloud-python -Architecture: any -Depends: python -Description: CloudStack Python library - The CloudStack Python library contains a few Python modules that the - CloudStack uses. - -Package: cloud-agent-libs -Architecture: any -Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-agent-deps (= ${source:Version}) -Description: CloudStack agent libraries - The CloudStack agent libraries are used by the Cloud Agent. - -Package: cloud-agent -Architecture: any -Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-agent-deps (= ${source:Version}), cloud-python (= ${source:Version}), cloud-agent-libs (= ${source:Version}), cloud-scripts (= ${source:Version}), cloud-system-iso (= ${source:Version}), libvirt0, sysvinit-utils, chkconfig, qemu-kvm, libvirt-bin, uuid-runtime, rsync, grep, iproute, ebtables, vlan, liblog4j1.2-java (>= 1.2.16), libjna-java, wget, jsvc, lsb-base (>= 3.2) +Package: cloudstack-agent +Architecture: all +Depends: openjdk-6-jre | openjdk-7-jre, cloudstack-common (= ${source:Version}), lsb-base (>= 3.2), libcommons-daemon-java, libjna-java, openssh-client, libvirt0, sysvinit-utils, qemu-kvm, libvirt-bin, uuid-runtime, rsync, grep, iproute, perl-base, perl-modules, ebtables, vlan, wget, jsvc, ipset +Conflicts: cloud-agent, cloud-agent-libs, cloud-agent-deps, cloud-agent-scripts Description: CloudStack agent The CloudStack agent is in charge of managing shared computing resources in a CloudStack powered cloud. Install this package if this computer will participate in your cloud as a KVM HyperVisor. -Package: cloud-system-iso -Architecture: any -Description: CloudStack system iso - The CloudStack agent is in charge of managing shared computing resources in - a CloudStack powered cloud. Install this package if this computer - will participate in your cloud. - -Package: cloud-usage -Architecture: any -Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-deps (= ${source:Version}), cloud-server (= ${source:Version}), cloud-setup (= ${source:Version}), cloud-client (= ${source:Version}), jsvc +Package: cloudstack-usage +Architecture: all +Depends: openjdk-6-jre | openjdk-7-jre, cloudstack-common (= ${source:Version}), jsvc Description: CloudStack usage monitor The CloudStack usage monitor provides usage accounting across the entire cloud for cloud operators to charge based on usage parameters. -Package: cloud-cli -Provides: cloud-cli -Architecture: any -Depends: openjdk-6-jre, cloud-utils (= ${source:Version}), cloud-core (= ${source:Version}), cloud-deps (= ${source:Version}), cloud-server (= ${source:Version}), cloud-setup (= ${source:Version}), cloud-client (= ${source:Version}) -Description: CloudStack commandline tool - The CloudStack commandline tool for invoking APi +Package: cloudstack-awsapi +Architecture: all +Depends: cloudstack-common (= ${source:Version}), cloudstack-management (= ${source:Version}) +Description: CloudStack Amazon EC2 API + +Package: cloudstack-cli +Architecture: all +Depends: cloudstack-common (= ${source:Version}) +Description: The CloudStack CLI called CloudMonkey + +Package: cloudstack-docs +Architecture: all +Description: The CloudStack documentation diff --git a/debian/rules b/debian/rules index 36b611ddc..f5f68aba0 100755 --- a/debian/rules +++ b/debian/rules @@ -10,6 +10,12 @@ # Modified to make a template file for a multi-binary package with separated # build-arch and build-indep targets by Bill Allombert 2001 +DEBVERS := $(shell dpkg-parsechangelog | sed -n -e 's/^Version: //p') +VERSION := $(shell echo '$(DEBVERS)' | sed -e 's/^[[:digit:]]*://' -e 's/[~-].*//') +PACKAGE = $(shell dh_listpackages|head -n 1|cut -d '-' -f 1) +SYSCONFDIR = "/etc" +DESTDIR = "debian/tmp" + # Uncomment this to turn on verbose mode. export DH_VERBOSE=1 @@ -19,60 +25,156 @@ export DH_OPTIONS configure: configure-stamp configure-stamp: dh_testdir - cp packaging/debian/replace.properties build/replace.properties - echo VERSION=$VERSION >> build/replace.properties + cp packaging/debian/replace.properties replace.properties.tmp + echo VERSION=${VERSION} >> replace.properties.tmp touch configure-stamp -build: build-arch +build: build-indep + +build-indep: build-indep-stamp -build-arch: build-arch-stamp -build-arch-stamp: configure-stamp - mvn package -Dsystemvm +build-indep-stamp: configure + mvn -Pawsapi package -DskipTests -Dsystemvm \ + -Dcs.replace.properties=replace.properties.tmp touch $@ -clean: +clean: dh_testdir dh_testroot rm -f build-arch-stamp build-indep-stamp configure-stamp - dh_clean + rm -f replace.properties.tmp + dh_clean install: dh_testdir dh_testroot dh_prep -s - mkdir -p debian/tmp/usr/bin - mkdir -p debian/tmp/usr/share/cloud/management - mkdir -p debian/tmp/var/log/cloud - mkdir debian/tmp/var/log/cloud/managament - mkdir debian/tmp/var/log/cloud/awsapi - mkdir debian/tmp/var/log/cloud/agent - mkdir debian/tmp/var/log/cloud/ipallocator - mkdir debian/tmp/var/log/cloud/usage - mkdir -p debian/tmp/etc/cloud - mkdir debian/tmp/etc/cloud/agent - mkdir debian/tmp/etc/cloud/server - mkdir debian/tmp/etc/cloud/management - mkdir debian/tmp/etc/cloud/usage - mkdir -p debian/tmp/var/cache/cloud - mkdir debian/tmp/var/cache/cloud/management - mkdir -p debian/tmp/usr/share/cloud - mkdir debian/tmp/usr/share/cloud/setup - mkdir -p debian/tmp/usr/share/cloud/management/webapps/client - - cp -r client/target/utilities/scripts/db/* debian/tmp/usr/share/cloud/setup/ - cp -r client/target/cloud-client-ui-4.1.0-SNAPSHOT/* debian/tmp/usr/share/cloud/management/webapps/client/ - dh_installdirs -s - dh_install -s - -binary: binary-common -binary-common: - dh_testdir - dh_testroot + + # Common packages + mkdir -p $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE) + mkdir -p $(DESTDIR)/$(SYSCONFDIR)/init.d + mkdir -p $(DESTDIR)/var/cache/$(PACKAGE) + mkdir -p $(DESTDIR)/var/log/$(PACKAGE) + mkdir -p $(DESTDIR)/var/lib/$(PACKAGE) + mkdir -p $(DESTDIR)/usr/bin + mkdir -p $(DESTDIR)/usr/share + + # cloudstack-agent + mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/agent + mkdir $(DESTDIR)/var/log/$(PACKAGE)/agent + mkdir $(DESTDIR)/usr/share/$(PACKAGE)-agent + mkdir $(DESTDIR)/usr/share/$(PACKAGE)-agent/plugins + install -D agent/target/cloud-agent-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/$(PACKAGE)-agent.jar + install -D plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/ + install -D plugins/hypervisors/kvm/target/dependencies/* $(DESTDIR)/usr/share/$(PACKAGE)-agent/lib/ + install -D packaging/debian/init/cloud-agent $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-agent + install -D agent/bindir/cloud-setup-agent.in $(DESTDIR)/usr/bin/cloudstack-setup-agent + install -D agent/bindir/cloud-ssh.in $(DESTDIR)/usr/bin/cloudstack-ssh + install -D agent/target/transformed/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/agent + + # cloudstack-management + mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/server + mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management + mkdir -p $(DESTDIR)/$(SYSCONFDIR)/security/limits.d/ + mkdir -p $(DESTDIR)/$(SYSCONFDIR)/sudoers.d/ + mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-management + mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-management/webapps/client + mkdir $(DESTDIR)/usr/share/$(PACKAGE)-management/setup + mkdir $(DESTDIR)/var/log/$(PACKAGE)/management + mkdir $(DESTDIR)/var/cache/$(PACKAGE)/management + mkdir $(DESTDIR)/var/cache/$(PACKAGE)/management/work + mkdir $(DESTDIR)/var/cache/$(PACKAGE)/management/temp + mkdir $(DESTDIR)/var/log/$(PACKAGE)/ipallocator + mkdir $(DESTDIR)/var/lib/$(PACKAGE)/management + mkdir $(DESTDIR)/var/lib/$(PACKAGE)/mnt + cp -r client/target/utilities/scripts/db/* $(DESTDIR)/usr/share/$(PACKAGE)-management/setup/ + cp -r client/target/cloud-client-ui-$(VERSION)-SNAPSHOT/* $(DESTDIR)/usr/share/$(PACKAGE)-management/webapps/client/ + cp server/target/conf/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/server/ + cp client/target/conf/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/ + + # nast hack for a couple of configuration files + mv $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/server/cloudstack-limits.conf $(DESTDIR)/$(SYSCONFDIR)/security/limits.d/ + mv $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/server/cloudstack-sudoers $(DESTDIR)/$(SYSCONFDIR)/sudoers.d/cloudstack + chmod 0440 $(DESTDIR)/$(SYSCONFDIR)/sudoers.d/cloudstack + + ln -s tomcat6-nonssl.conf $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/tomcat6.conf + ln -s server-nonssl.xml $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/server.xml + install -D packaging/debian/init/cloud-management $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-management + install -D client/bindir/cloud-update-xenserver-licenses.in $(DESTDIR)/usr/bin/cloudstack-update-xenserver-licenses + ln -s /usr/share/tomcat6/bin $(DESTDIR)/usr/share/$(PACKAGE)-management/bin + # Remove configuration in /ur/share/cloudstack-management/webapps/client/WEB-INF + # This should all be in /etc/cloudstack/management + rm $(DESTDIR)/usr/share/$(PACKAGE)-management/webapps/client/WEB-INF/classes/*.* + ln -s ../../..$(SYSCONFDIR)/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/conf + ln -s ../../../usr/share/tomcat6/lib $(DESTDIR)/usr/share/$(PACKAGE)-management/lib + ln -s ../../../var/log/$(PACKAGE)/management $(DESTDIR)/usr/share/$(PACKAGE)-management/logs + ln -s ../../../var/cache/$(PACKAGE)/management/temp $(DESTDIR)/usr/share/$(PACKAGE)-management/temp + ln -s ../../../var/cache/$(PACKAGE)/management/work $(DESTDIR)/usr/share/$(PACKAGE)-management/work + + # cloudstack-common + mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-common + mkdir $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts + mkdir $(DESTDIR)/usr/share/$(PACKAGE)-common/setup + mkdir $(DESTDIR)/usr/share/$(PACKAGE)-common/lib + cp -r scripts/installer $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts + cp -r scripts/network $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts + cp -r scripts/storage $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts + cp -r scripts/util $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts + cp -r scripts/vm $(DESTDIR)/usr/share/$(PACKAGE)-common/scripts + install -D client/target/utilities/bin/cloud-migrate-databases $(DESTDIR)/usr/bin/cloudstack-migrate-databases + install -D client/target/utilities/bin/cloud-set-guest-password $(DESTDIR)/usr/bin/cloudstack-set-guest-password + install -D client/target/utilities/bin/cloud-set-guest-sshkey $(DESTDIR)/usr/bin/cloudstack-set-guest-sshkey + install -D client/target/utilities/bin/cloud-setup-databases $(DESTDIR)/usr/bin/cloudstack-setup-databases + install -D client/target/utilities/bin/cloud-setup-management $(DESTDIR)/usr/bin/cloudstack-setup-management + install -D client/target/utilities/bin/cloud-setup-encryption $(DESTDIR)/usr/bin/cloudstack-setup-encryption + install -D client/target/utilities/bin/cloud-sysvmadm $(DESTDIR)/usr/bin/cloudstack-sysvmadm + install -D services/console-proxy/server/dist/systemvm.iso $(DESTDIR)/usr/share/$(PACKAGE)-common/vms/systemvm.iso + # We need jasypt for cloud-install-sys-tmplt, so this is a nasty hack to get it into the right place + install -D agent/target/dependencies/jasypt-1.9.0.jar $(DESTDIR)/usr/share/$(PACKAGE)-common/lib + + # cloudstack-python + mkdir -p $(DESTDIR)/usr/lib/python2.7/dist-packages + cp -r python/lib/cloud* $(DESTDIR)/usr/lib/python2.7/dist-packages + + # cloudstack-usage + mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/usage + mkdir $(DESTDIR)/var/log/$(PACKAGE)/usage + mkdir $(DESTDIR)/usr/share/$(PACKAGE)-usage + mkdir $(DESTDIR)/usr/share/$(PACKAGE)-usage/plugins + install -D usage/target/cloud-usage-$(VERSION)-SNAPSHOT.jar $(DESTDIR)/usr/share/$(PACKAGE)-usage/lib/$(PACKAGE)-usage.jar + install -D usage/target/dependencies/* $(DESTDIR)/usr/share/$(PACKAGE)-usage/lib/ + cp usage/target/transformed/* $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/usage/ + install -D packaging/debian/init/cloud-usage $(DESTDIR)/$(SYSCONFDIR)/init.d/$(PACKAGE)-usage + + # cloudstack-awsapi + mkdir $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/awsapi + mkdir $(DESTDIR)/var/log/$(PACKAGE)/awsapi + mkdir $(DESTDIR)/usr/share/$(PACKAGE)-bridge + mkdir -p $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi + mkdir $(DESTDIR)/usr/share/$(PACKAGE)-bridge/setup + cp -r awsapi/target/cloud-awsapi-$(VERSION)-SNAPSHOT/* $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi + install -D awsapi-setup/setup/cloud-setup-bridge $(DESTDIR)/usr/bin/cloudstack-setup-bridge + install -D awsapi-setup/setup/cloudstack-aws-api-register $(DESTDIR)/usr/bin/cloudstack-aws-api-register + cp -r awsapi-setup/db/mysql/* $(DESTDIR)/usr/share/$(PACKAGE)-bridge/setup + for i in applicationContext.xml cloud-bridge.properties commons-logging.properties crypto.properties xes.keystore ec2-service.properties; do \ + mv $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/$$i $(DESTDIR)/$(SYSCONFDIR)/$(PACKAGE)/management/; \ + done + rm $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/log4j-vmops.xml + rm $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/log4j.properties + rm $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/db.properties + rm $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/LICENSE.txt + rm $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/NOTICE.txt + rm $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/services.xml + rm -rf $(DESTDIR)/usr/share/$(PACKAGE)-bridge/webapps/awsapi/WEB-INF/classes/META-INF + + dh_installdirs + dh_install + dh_python2 + +binary: install + dh_install dh_installchangelogs - dh_installdocs LICENSE - dh_installdocs DISCLAIMER - dh_installdocs NOTICE - dh_installdocs INSTALL.md + dh_installdocs -A tools/whisker/LICENSE tools/whisker/NOTICE INSTALL.md dh_installman dh_link dh_strip diff --git a/deps/XenServerJava/pom.xml b/deps/XenServerJava/pom.xml index 18ba54f56..0f2cdf427 100644 --- a/deps/XenServerJava/pom.xml +++ b/deps/XenServerJava/pom.xml @@ -21,7 +21,7 @@ org.apache.cloudstack cloudstack - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT ../../pom.xml xapi diff --git a/deps/XenServerJava/src/com/xensource/xenapi/Marshalling.java b/deps/XenServerJava/src/com/xensource/xenapi/Marshalling.java index 416aad94b..e2ee9d6ed 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/Marshalling.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/Marshalling.java @@ -1,32 +1,15 @@ -/* Copyright (c) Citrix Systems, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1) Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2) Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - +// Copyright 2012 Citrix Systems, Inc. Licensed under the +// Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. Citrix Systems, Inc. +// reserves all rights not expressly granted by 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. +// +// Automatically generated by addcopyright.py at 04/03/2012 package com.xensource.xenapi; import java.util.*; diff --git a/deps/XenServerJava/src/com/xensource/xenapi/XenAPIObject.java b/deps/XenServerJava/src/com/xensource/xenapi/XenAPIObject.java index b678a7fa1..700e32996 100644 --- a/deps/XenServerJava/src/com/xensource/xenapi/XenAPIObject.java +++ b/deps/XenServerJava/src/com/xensource/xenapi/XenAPIObject.java @@ -1,32 +1,15 @@ -/* Copyright (c) Citrix Systems, Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1) Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2) Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following - * disclaimer in the documentation and/or other materials - * provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES - * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR - * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) - * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED - * OF THE POSSIBILITY OF SUCH DAMAGE. - */ - +// Copyright 2012 Citrix Systems, Inc. Licensed under the +// Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. Citrix Systems, Inc. +// reserves all rights not expressly granted by 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. +// +// Automatically generated by addcopyright.py at 04/03/2012 package com.xensource.xenapi; public abstract class XenAPIObject diff --git a/deps/install-non-oss.sh b/deps/install-non-oss.sh index 28eb03e15..0bf8e48d7 100755 --- a/deps/install-non-oss.sh +++ b/deps/install-non-oss.sh @@ -17,15 +17,13 @@ # under the License. mvn install:install-file -Dfile=cloud-iControl.jar -DgroupId=com.cloud.com.f5 -DartifactId=icontrol -Dversion=1.0 -Dpackaging=jar -mvn install:install-file -Dfile=cloud-netscaler.jar -DgroupId=com.cloud.com.citrix -DartifactId=netscaler -Dversion=1.0 -Dpackaging=jar mvn install:install-file -Dfile=cloud-netscaler-sdx.jar -DgroupId=com.cloud.com.citrix -DartifactId=netscaler-sdx -Dversion=1.0 -Dpackaging=jar -# + # From http://support.netapp.com/ (not available online, contact your support representative) # Version: 4.0 +if [ -e cloud-manageontap.jar ]; then mv cloud-manageontap.jar manageontap.jar; fi mvn install:install-file -Dfile=manageontap.jar -DgroupId=com.cloud.com.netapp -DartifactId=manageontap -Dversion=4.0 -Dpackaging=jar -# -# From https://my.vmware.com/group/vmware/get-download?downloadGroup=VSDK41 -# Version: 4.1, Release-date: 2010-07-13, Build: 257238 -mvn install:install-file -Dfile=vim25.jar -DgroupId=com.cloud.com.vmware -DartifactId=vmware-vim25 -Dversion=4.1 -Dpackaging=jar -mvn install:install-file -Dfile=apputils.jar -DgroupId=com.cloud.com.vmware -DartifactId=vmware-apputils -Dversion=4.1 -Dpackaging=jar -mvn install:install-file -Dfile=vim.jar -DgroupId=com.cloud.com.vmware -DartifactId=vmware-vim -Dversion=4.1 -Dpackaging=jar + +# From https://my.vmware.com/group/vmware/get-download?downloadGroup=VSP510-WEBSDK-510 +# Version: 5.1, Release-date: 2012-09-10, Build: 774886 +mvn install:install-file -Dfile=vim25_51.jar -DgroupId=com.cloud.com.vmware -DartifactId=vmware-vim25 -Dversion=5.1 -Dpackaging=jar diff --git a/developer/developer-prefill.sql b/developer/developer-prefill.sql index 6300d35df..e4f90cad6 100644 --- a/developer/developer-prefill.sql +++ b/developer/developer-prefill.sql @@ -36,7 +36,7 @@ INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname, -- Add system user with encrypted password=password INSERT INTO `cloud`.`user` (id, uuid, username, password, account_id, firstname, lastname, email, state, created) VALUES (2, UUID(), 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', - '2', 'Admin', 'User', 'admin@mailprovider.com', 'enabled', NOW()); + '2', 'Admin', 'User', 'admin@mailprovider.com', 'disabled', NOW()); -- Add configurations INSERT INTO `cloud`.`configuration` (category, instance, component, name, value) diff --git a/developer/pom.xml b/developer/pom.xml index 684eb0cf6..3dc276adc 100644 --- a/developer/pom.xml +++ b/developer/pom.xml @@ -1,4 +1,4 @@ - + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 cloud-developer Apache CloudStack Developer Tools @@ -18,22 +18,101 @@ org.apache.cloudstack cloudstack - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT + mysql mysql-connector-java - 5.1.21 - runtime + ${cs.mysql.version} + + + commons-dbcp + commons-dbcp + ${cs.dbcp.version} + + + commons-pool + commons-pool + ${cs.pool.version} + + + org.jasypt + jasypt + ${cs.jasypt.version} + + + org.apache.cloudstack + cloud-utils + ${project.version} + + + org.apache.cloudstack + cloud-server + ${project.version} + + + org.apache.cloudstack + cloud-plugin-hypervisor-simulator + ${project.version} + compile install + + + org.codehaus.mojo + properties-maven-plugin + 1.0-alpha-2 + + + initialize + + read-project-properties + + + + ${basedir}/../utils/conf/db.properties + ${basedir}/../utils/conf/db.properties.override + + true + + + + + + maven-antrun-plugin + 1.7 + + + generate-resources + + run + + + + + + + + + + + + + + + + + + - + deploydb @@ -44,406 +123,113 @@ org.codehaus.mojo - properties-maven-plugin - 1.0-alpha-2 + exec-maven-plugin + 1.2.1 - initialize + process-resources + create-schema - read-project-properties + java - - - ${project.parent.basedir}/utils/conf/db.properties - ${project.parent.basedir}/utils/conf/db.properties.override - - true - + + com.cloud.upgrade.DatabaseCreator + + + ${basedir}/../utils/conf/db.properties + ${basedir}/../utils/conf/db.properties.override + + ${basedir}/target/db/create-schema.sql + ${basedir}/target/db/create-schema-premium.sql + + ${basedir}/target/db/templates.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 + + ${basedir}/developer-prefill.sql + + com.cloud.upgrade.DatabaseUpgradeChecker + --database=cloud,usage,awsapi + --rootpassword=${db.root.password} + + + + + + + catalina.home + ${basedir}/../utils + + + paths.script + ${basedir}/target/db + + + + + + + + + deploydb-simulator + + + deploydb-simulator + + + + - maven-antrun-plugin - 1.7 + org.codehaus.mojo + exec-maven-plugin + 1.2.1 - generate-resources + process-resources + create-schema-simulator - run + java - - - - - - - - - - - - - - - - - org.codehaus.mojo - sql-maven-plugin - 1.5 - - - - mysql - mysql-connector-java - ${cs.mysql.version} - - - - org.gjt.mm.mysql.Driver - jdbc:mysql://${db.cloud.host}:${db.cloud.port}/cloud - ${db.cloud.username} - ${db.cloud.password} - - ${maven.test.skip} - true + com.cloud.upgrade.DatabaseCreator + + + ${basedir}/../utils/conf/db.properties + ${basedir}/../utils/conf/db.properties.override + + ${basedir}/target/db/create-schema-simulator.sql + ${basedir}/target/db/templates.simulator.sql + + com.cloud.upgrade.DatabaseUpgradeChecker + --database=simulator + --rootpassword=${db.root.password} + + + + catalina.home + ${basedir}/../utils + + + paths.script + ${basedir}/target/db + + - - - drop-database - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - drop database if exists `cloud` - - - - create-database - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - create database `cloud` - - - - grant-user-cloud - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - GRANT ALL ON cloud.* to - ${db.cloud.username}@`localhost` identified by - '${db.cloud.password}'; - - - - grant-user-cloud-all - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - GRANT ALL ON cloud.* to - ${db.cloud.username}@`%` identified by - '${db.cloud.password}'; - - - - drop-database-usage - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - drop database if exists `cloud_usage` - - - - create-database-usage - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - create database `cloud_usage` - - - - grant-user-cloud-usage - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - GRANT ALL ON cloud_usage.* to - ${db.cloud.username}@`localhost` identified by - '${db.cloud.password}'; - - - - grant-user-cloud-usage-all - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - GRANT ALL ON cloud_usage.* to - ${db.cloud.username}@`%` identified by - '${db.cloud.password}'; - - - - drop-database-cloudbridge - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - drop database if exists `cloudbridge` - - - - create-database-cloudbridge - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - create database `cloudbridge` - - - - grant-user-cloud-bridge - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - GRANT ALL ON cloudbridge.* to - ${db.cloud.username}@`localhost` identified by - '${db.cloud.password}'; - - - - grant-user-cloud-bridge-all - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.cloud.host}:${db.cloud.port} - GRANT ALL ON cloudbridge.* to - ${db.cloud.username}@`%` identified by - '${db.cloud.password}'; - - - - create-schema - process-test-resources - - execute - - - - ${basedir}/target/db/create-schema.sql - ${basedir}/target/db/create-schema-view.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 - - - - - prefill-developer-schema - process-test-resources - - execute - - - true - - ${basedir}/developer-prefill.sql - - - - - - - - simulator - - deploydb-simulator - - - - - org.codehaus.mojo - properties-maven-plugin - 1.0-alpha-2 - - - initialize - - read-project-properties - - - - ${project.parent.basedir}/utils/conf/db.properties - ${project.parent.basedir}/utils/conf/db.properties.override - - true - - - - - - org.codehaus.mojo - sql-maven-plugin - 1.5 - - - mysql - mysql-connector-java - ${cs.mysql.version} - - - - org.gjt.mm.mysql.Driver - jdbc:mysql://${db.simulator.host}:3306/simulator - ${db.simulator.username} - ${db.simulator.password} - ${maven.test.skip} - true - - - - drop-database - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.simulator.host}:3306 - drop database if exists `simulator` - - - - create-database - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.simulator.host}:3306 - create database `simulator` - - - - grant-user-cloud - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.simulator.host}:3306 - GRANT ALL ON simulator.* to - ${db.simulator.username}@`localhost` identified by - '${db.simulator.password}'; - - - - grant-user-cloud-all - process-test-resources - - execute - - - root - ${db.root.password} - jdbc:mysql://${db.simulator.host}:3306 - GRANT ALL ON simulator.* to - ${db.simulator.username}@`%` identified by - '${db.simulator.password}'; - - - - create-schema - process-test-resources - - execute - - - - ${basedir}/target/db/create-schema-simulator.sql - ${basedir}/target/db/templates.simulator.sql - - - - - - - - - + \ No newline at end of file diff --git a/docs/.tx/config b/docs/.tx/config index 9b02286ea..ec3df8620 100644 --- a/docs/.tx/config +++ b/docs/.tx/config @@ -1,25 +1,106 @@ -# 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. - +#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. [main] -host = https://www.transifex.net +host = https://www.transifex.com + +[ACS_DOCS.Admin_Guide] +file_filter = /Admin_Guide.po +source_file = pot/Admin_Guide.pot +source_lang = en +type = PO + +[ACS_DOCS.Author_Group] +file_filter = /Author_Group.po +source_file = pot/Author_Group.pot +source_lang = en +type = PO + +[ACS_DOCS.Book_Info] +file_filter = /Book_Info.po +source_file = pot/Book_Info.pot +source_lang = en +type = PO + +[ACS_DOCS.Book_Info_Release_Notes_4-0] +file_filter = /Book_Info_Release_Notes_4-0.po +source_file = pot/Book_Info_Release_Notes_4-0.pot +source_lang = en +type = PO + +[ACS_DOCS.CloudStack_Nicira_NVP_Guide] +file_filter = /CloudStack_Nicira_NVP_Guide.po +source_file = pot/CloudStack_Nicira_NVP_Guide.pot +source_lang = en +type = PO + +[ACS_DOCS.Developers_Guide] +file_filter = /Developers_Guide.po +source_file = pot/Developers_Guide.pot +source_lang = en +type = PO + +[ACS_DOCS.Installation_Guide] +file_filter = /Installation_Guide.po +source_file = pot/Installation_Guide.pot +source_lang = en +type = PO + +[ACS_DOCS.LDAPserver-for-user-authentication] +file_filter = /LDAPserver-for-user-authentication.po +source_file = pot/LDAPserver-for-user-authentication.pot +source_lang = en +type = PO + +[ACS_DOCS.Preface] +file_filter = /Preface.po +source_file = pot/Preface.pot +source_lang = en +type = PO + +[ACS_DOCS.Release_Notes] +file_filter = /Release_Notes.po +source_file = pot/Release_Notes.pot +source_lang = en +type = PO + +[ACS_DOCS.Revision_History] +file_filter = /Revision_History.po +source_file = pot/Revision_History.pot +source_lang = en +type = PO + +[ACS_DOCS.Revision_History_Install_Guide] +file_filter = /Revision_History_Install_Guide.po +source_file = pot/Revision_History_Install_Guide.pot +source_lang = en +type = PO + +[ACS_DOCS.SSL-keystore-path-and-password] +file_filter = /SSL-keystore-path-and-password.po +source_file = pot/SSL-keystore-path-and-password.pot +source_lang = en +type = PO + +[ACS_DOCS.VPN-user-usage-record-format] +file_filter = /VPN-user-usage-record-format.po +source_file = pot/VPN-user-usage-record-format.pot +source_lang = en +type = PO [ACS_DOCS.about-clusters] -file_filter = /about-cluster.po +file_filter = /about-clusters.po source_file = pot/about-clusters.pot source_lang = en type = PO @@ -30,14 +111,18 @@ source_file = pot/about-hosts.pot source_lang = en type = PO +[ACS_DOCS.about-password-encryption] +file_filter = /about-password-encryption.po +source_file = pot/about-password-encryption.pot +source_lang = en +type = PO + [ACS_DOCS.about-physical-networks] file_filter = /about-physical-networks.po source_file = pot/about-physical-networks.pot source_lang = en type = PO - - [ACS_DOCS.about-pods] file_filter = /about-pods.po source_file = pot/about-pods.pot @@ -56,6 +141,12 @@ source_file = pot/about-secondary-storage.pot source_lang = en type = PO +[ACS_DOCS.about-security-groups] +file_filter = /about-security-groups.po +source_file = pot/about-security-groups.pot +source_lang = en +type = PO + [ACS_DOCS.about-virtual-networks] file_filter = /about-virtual-networks.po source_file = pot/about-virtual-networks.pot @@ -86,45 +177,57 @@ source_file = pot/accessing-vms.pot source_lang = en type = PO -[ACS_DOCS.accounts] -file_filter = /accounts.po -source_file = pot/accounts.pot -source_lang = en -type = PO - [ACS_DOCS.accounts-users-domains] file_filter = /accounts-users-domains.po source_file = pot/accounts-users-domains.pot source_lang = en type = PO +[ACS_DOCS.accounts] +file_filter = /accounts.po +source_file = pot/accounts.pot +source_lang = en +type = PO + [ACS_DOCS.acquire-new-ip-address] file_filter = /acquire-new-ip-address.po source_file = pot/acquire-new-ip-address.pot source_lang = en type = PO +[ACS_DOCS.acquire-new-ip-for-vpc] +file_filter = /acquire-new-ip-for-vpc.po +source_file = pot/acquire-new-ip-for-vpc.pot +source_lang = en +type = PO + [ACS_DOCS.add-additional-guest-network] file_filter = /add-additional-guest-network.po source_file = pot/add-additional-guest-network.pot source_lang = en type = PO -[ACS_DOCS.added-API-commands] -file_filter = /added-API-commands.po -source_file = pot/added-API-commands.pot +[ACS_DOCS.add-clusters-kvm-xenserver] +file_filter = /add-clusters-kvm-xenserver.po +source_file = pot/add-clusters-kvm-xenserver.pot source_lang = en type = PO -[ACS_DOCS.added-cloudPlatform-error-codes] -file_filter = /added-cloudPlatform-error-codes.po -source_file = pot/added-cloudPlatform-error-codes.pot +[ACS_DOCS.add-clusters-ovm] +file_filter = /add-clusters-ovm.po +source_file = pot/add-clusters-ovm.pot source_lang = en type = PO -[ACS_DOCS.adding-IP-addresses-for-the-public-network] -file_filter = /adding-IP-addresses-for-the-public-network.po -source_file = pot/adding-IP-addresses-for-the-public-network.pot +[ACS_DOCS.add-clusters-vsphere] +file_filter = /add-clusters-vsphere.po +source_file = pot/add-clusters-vsphere.pot +source_lang = en +type = PO + +[ACS_DOCS.add-gateway-vpc] +file_filter = /add-gateway-vpc.po +source_file = pot/add-gateway-vpc.pot source_lang = en type = PO @@ -146,6 +249,12 @@ source_file = pot/add-load-balancer-rule.pot source_lang = en type = PO +[ACS_DOCS.add-loadbalancer-rule-vpc] +file_filter = /add-loadbalancer-rule-vpc.po +source_file = pot/add-loadbalancer-rule-vpc.pot +source_lang = en +type = PO + [ACS_DOCS.add-members-to-projects] file_filter = /add-members-to-projects.po source_file = pot/add-members-to-projects.pot @@ -164,6 +273,12 @@ source_file = pot/add-password-management-to-templates.pot source_lang = en type = PO +[ACS_DOCS.add-portforward-rule-vpc] +file_filter = /add-portforward-rule-vpc.po +source_file = pot/add-portforward-rule-vpc.pot +source_lang = en +type = PO + [ACS_DOCS.add-primary-storage] file_filter = /add-primary-storage.po source_file = pot/add-primary-storage.pot @@ -188,6 +303,54 @@ source_file = pot/add-security-group.pot source_lang = en type = PO +[ACS_DOCS.add-tier] +file_filter = /add-tier.po +source_file = pot/add-tier.pot +source_lang = en +type = PO + +[ACS_DOCS.add-vm-to-tier] +file_filter = /add-vm-to-tier.po +source_file = pot/add-vm-to-tier.pot +source_lang = en +type = PO + +[ACS_DOCS.add-vpc] +file_filter = /add-vpc.po +source_file = pot/add-vpc.pot +source_lang = en +type = PO + +[ACS_DOCS.added-API-commands-4-0] +file_filter = /added-API-commands-4-0.po +source_file = pot/added-API-commands-4-0.pot +source_lang = en +type = PO + +[ACS_DOCS.added-API-commands] +file_filter = /added-API-commands.po +source_file = pot/added-API-commands.pot +source_lang = en +type = PO + +[ACS_DOCS.added-error-codes] +file_filter = /added-error-codes.po +source_file = pot/added-error-codes.pot +source_lang = en +type = PO + +[ACS_DOCS.adding-IP-addresses-for-the-public-network] +file_filter = /adding-IP-addresses-for-the-public-network.po +source_file = pot/adding-IP-addresses-for-the-public-network.pot +source_lang = en +type = PO + +[ACS_DOCS.additional-installation-options] +file_filter = /additional-installation-options.po +source_file = pot/additional-installation-options.pot +source_lang = en +type = PO + [ACS_DOCS.admin-alerts] file_filter = /admin-alerts.po source_file = pot/admin-alerts.pot @@ -200,6 +363,12 @@ source_file = pot/admin-guide.pot source_lang = en type = PO +[ACS_DOCS.adv-zone-topology-req] +file_filter = /adv-zone-topology-req.po +source_file = pot/adv-zone-topology-req.pot +source_lang = en +type = PO + [ACS_DOCS.advanced-zone-configuration] file_filter = /advanced-zone-configuration.po source_file = pot/advanced-zone-configuration.pot @@ -242,15 +411,21 @@ source_file = pot/allocators.pot source_lang = en type = PO -[ACS_DOCS.api-reference] -file_filter = /api-reference.po -source_file = pot/api-reference.pot +[ACS_DOCS.api-calls] +file_filter = /api-calls.po +source_file = pot/api-calls.pot source_lang = en type = PO -[ACS_DOCS.appendix-a-time-zones] -file_filter = /appendix-a-time-zones.po -source_file = pot/appendix-a-time-zones.pot +[ACS_DOCS.api-overview] +file_filter = /api-overview.po +source_file = pot/api-overview.pot +source_lang = en +type = PO + +[ACS_DOCS.api-reference] +file_filter = /api-reference.po +source_file = pot/api-reference.pot source_lang = en type = PO @@ -266,21 +441,15 @@ source_file = pot/asynchronous-commands.pot source_lang = en type = PO -[ACS_DOCS.attaching-volume] -file_filter = /attaching-volume.po -source_file = pot/attaching-volume.pot -source_lang = en -type = PO - [ACS_DOCS.attach-iso-to-vm] file_filter = /attach-iso-to-vm.po source_file = pot/attach-iso-to-vm.pot source_lang = en type = PO -[ACS_DOCS.Author_Group] -file_filter = /Author_Group.po -source_file = pot/Author_Group.pot +[ACS_DOCS.attaching-volume] +file_filter = /attaching-volume.po +source_file = pot/attaching-volume.pot source_lang = en type = PO @@ -290,6 +459,18 @@ source_file = pot/automatic-snapshot-creation-retention.pot source_lang = en type = PO +[ACS_DOCS.autoscale] +file_filter = /autoscale.po +source_file = pot/autoscale.pot +source_lang = en +type = PO + +[ACS_DOCS.aws-api-examples] +file_filter = /aws-api-examples.po +source_file = pot/aws-api-examples.pot +source_lang = en +type = PO + [ACS_DOCS.aws-ec2-configuration] file_filter = /aws-ec2-configuration.po source_file = pot/aws-ec2-configuration.pot @@ -314,15 +495,27 @@ source_file = pot/aws-ec2-supported-commands.pot source_lang = en type = PO +[ACS_DOCS.aws-ec2-timeouts] +file_filter = /aws-ec2-timeouts.po +source_file = pot/aws-ec2-timeouts.pot +source_lang = en +type = PO + [ACS_DOCS.aws-ec2-user-setup] file_filter = /aws-ec2-user-setup.po source_file = pot/aws-ec2-user-setup.pot source_lang = en type = PO -[ACS_DOCS.aws-interface-guide] -file_filter = /aws-interface-guide.po -source_file = pot/aws-interface-guide.pot +[ACS_DOCS.aws-interface-compatibility] +file_filter = /aws-interface-compatibility.po +source_file = pot/aws-interface-compatibility.pot +source_lang = en +type = PO + +[ACS_DOCS.basic-adv-networking] +file_filter = /basic-adv-networking.po +source_file = pot/basic-adv-networking.pot source_lang = en type = PO @@ -380,15 +573,57 @@ source_file = pot/best-practices-virtual-router.pot source_lang = en type = PO -[ACS_DOCS.Book_Info_Build_All] -file_filter = /Book_Info_Build_All.po -source_file = pot/Book_Info_Build_All.pot +[ACS_DOCS.build-deb] +file_filter = /build-deb.po +source_file = pot/build-deb.pot source_lang = en type = PO -[ACS_DOCS.Book_Info] -file_filter = /Book_Info.po -source_file = pot/Book_Info.pot +[ACS_DOCS.build-rpm] +file_filter = /build-rpm.po +source_file = pot/build-rpm.pot +source_lang = en +type = PO + +[ACS_DOCS.building-devcloud] +file_filter = /building-devcloud.po +source_file = pot/building-devcloud.pot +source_lang = en +type = PO + +[ACS_DOCS.building-marvin] +file_filter = /building-marvin.po +source_file = pot/building-marvin.pot +source_lang = en +type = PO + +[ACS_DOCS.building-prerequisites] +file_filter = /building-prerequisites.po +source_file = pot/building-prerequisites.pot +source_lang = en +type = PO + +[ACS_DOCS.building-with-maven-deploy] +file_filter = /building-with-maven-deploy.po +source_file = pot/building-with-maven-deploy.pot +source_lang = en +type = PO + +[ACS_DOCS.building-with-maven-steps] +file_filter = /building-with-maven-steps.po +source_file = pot/building-with-maven-steps.pot +source_lang = en +type = PO + +[ACS_DOCS.building-with-maven] +file_filter = /building-with-maven.po +source_file = pot/building-with-maven.pot +source_lang = en +type = PO + +[ACS_DOCS.castor-with-cs] +file_filter = /castor-with-cs.po +source_file = pot/castor-with-cs.pot source_lang = en type = PO @@ -398,6 +633,18 @@ source_file = pot/change-console-proxy-ssl-certificate-domain.pot source_lang = en type = PO +[ACS_DOCS.change-database-config] +file_filter = /change-database-config.po +source_file = pot/change-database-config.pot +source_lang = en +type = PO + +[ACS_DOCS.change-database-password] +file_filter = /change-database-password.po +source_file = pot/change-database-password.pot +source_lang = en +type = PO + [ACS_DOCS.change-host-password] file_filter = /change-host-password.po source_file = pot/change-host-password.pot @@ -416,6 +663,12 @@ source_file = pot/change-to-behavior-of-list-commands.pot source_lang = en type = PO +[ACS_DOCS.changed-apicommands-4-0] +file_filter = /changed-apicommands-4-0.po +source_file = pot/changed-apicommands-4-0.pot +source_lang = en +type = PO + [ACS_DOCS.changing-root-password] file_filter = /changing-root-password.po source_file = pot/changing-root-password.pot @@ -434,12 +687,6 @@ source_file = pot/changing-secondary-storage-servers.pot source_lang = en type = PO -[ACS_DOCS.changing-secondary-storage-serversp] -file_filter = /changing-secondary-storage-serversp.po -source_file = pot/changing-secondary-storage-serversp.pot -source_lang = en -type = PO - [ACS_DOCS.changing-service-offering-for-vm] file_filter = /changing-service-offering-for-vm.po source_file = pot/changing-service-offering-for-vm.pot @@ -452,9 +699,21 @@ source_file = pot/changing-vm-name-os-group.pot source_lang = en type = PO -[ACS_DOCS.choosing_a_deployment_architecture] -file_filter = /choosing_a_deployment_architecture.po -source_file = pot/choosing_a_deployment_architecture.pot +[ACS_DOCS.choosing-a-deployment-architecture] +file_filter = /choosing-a-deployment-architecture.po +source_file = pot/choosing-a-deployment-architecture.pot +source_lang = en +type = PO + +[ACS_DOCS.cisco3750-hardware] +file_filter = /cisco3750-hardware.po +source_file = pot/cisco3750-hardware.pot +source_lang = en +type = PO + +[ACS_DOCS.cisco3750-layer2] +file_filter = /cisco3750-layer2.po +source_file = pot/cisco3750-layer2.pot source_lang = en type = PO @@ -476,33 +735,9 @@ source_file = pot/cloud-infrastructure-overview.pot source_lang = en type = PO -[ACS_DOCS.cloudplatform-api] -file_filter = /cloudplatform-api.po -source_file = pot/cloudplatform-api.pot -source_lang = en -type = PO - -[ACS_DOCS.cloudstack_admin] -file_filter = /cloudstack_admin.po -source_file = pot/cloudstack_admin.pot -source_lang = en -type = PO - -[ACS_DOCS.cloudstack_developers] -file_filter = /cloudstack_developers.po -source_file = pot/cloudstack_developers.pot -source_lang = en -type = PO - -[ACS_DOCS.cloudstack_features] -file_filter = /cloudstack_features.po -source_file = pot/cloudstack_features.pot -source_lang = en -type = PO - -[ACS_DOCS.cloudstack_installation] -file_filter = /cloudstack_installation.po -source_file = pot/cloudstack_installation.pot +[ACS_DOCS.cloudstack-api] +file_filter = /cloudstack-api.po +source_file = pot/cloudstack-api.pot source_lang = en type = PO @@ -512,18 +747,6 @@ source_file = pot/cloudstack.pot source_lang = en type = PO -[ACS_DOCS.cloudstack_system_requirements] -file_filter = /cloudstack_system_requirements.po -source_file = pot/cloudstack_system_requirements.pot -source_lang = en -type = PO - -[ACS_DOCS.cloudstack_whatis] -file_filter = /cloudstack_whatis.po -source_file = pot/cloudstack_whatis.pot -source_lang = en -type = PO - [ACS_DOCS.cluster-add] file_filter = /cluster-add.po source_file = pot/cluster-add.pot @@ -548,18 +771,36 @@ source_file = pot/concepts.pot source_lang = en type = PO +[ACS_DOCS.configure-acl] +file_filter = /configure-acl.po +source_file = pot/configure-acl.pot +source_lang = en +type = PO + [ACS_DOCS.configure-guest-traffic-in-advanced-zone] file_filter = /configure-guest-traffic-in-advanced-zone.po source_file = pot/configure-guest-traffic-in-advanced-zone.pot source_lang = en type = PO +[ACS_DOCS.configure-package-repository] +file_filter = /configure-package-repository.po +source_file = pot/configure-package-repository.pot +source_lang = en +type = PO + [ACS_DOCS.configure-public-traffic-in-an-advanced-zone] file_filter = /configure-public-traffic-in-an-advanced-zone.po source_file = pot/configure-public-traffic-in-an-advanced-zone.pot source_lang = en type = PO +[ACS_DOCS.configure-snmp-rhel] +file_filter = /configure-snmp-rhel.po +source_file = pot/configure-snmp-rhel.pot +source_lang = en +type = PO + [ACS_DOCS.configure-usage-server] file_filter = /configure-usage-server.po source_file = pot/configure-usage-server.pot @@ -572,6 +813,12 @@ source_file = pot/configure-virtual-router.pot source_lang = en type = PO +[ACS_DOCS.configure-vpc] +file_filter = /configure-vpc.po +source_file = pot/configure-vpc.pot +source_lang = en +type = PO + [ACS_DOCS.configure-vpn] file_filter = /configure-vpn.po source_file = pot/configure-vpn.pot @@ -584,12 +831,6 @@ source_file = pot/configure-xenserver-dom0-memory.pot source_lang = en type = PO -[ACS_DOCS.configure-xenserver-dom-memory] -file_filter = /configure-xenserver-dom-memory.po -source_file = pot/configure-xenserver-dom-memory.pot -source_lang = en -type = PO - [ACS_DOCS.configuring-projects] file_filter = /configuring-projects.po source_file = pot/configuring-projects.pot @@ -656,6 +897,12 @@ source_file = pot/create-vpn-gateway-for-vpc.pot source_lang = en type = PO +[ACS_DOCS.create-vr-network-offering] +file_filter = /create-vr-network-offering.po +source_file = pot/create-vr-network-offering.pot +source_lang = en +type = PO + [ACS_DOCS.create-windows-template] file_filter = /create-windows-template.po source_file = pot/create-windows-template.pot @@ -704,6 +951,12 @@ source_file = pot/customizing-dns.pot source_lang = en type = PO +[ACS_DOCS.database-replication] +file_filter = /database-replication.po +source_file = pot/database-replication.pot +source_lang = en +type = PO + [ACS_DOCS.dates-in-usage-record] file_filter = /dates-in-usage-record.po source_file = pot/dates-in-usage-record.pot @@ -728,6 +981,12 @@ source_file = pot/default-template.pot source_lang = en type = PO +[ACS_DOCS.delete-reset-vpn] +file_filter = /delete-reset-vpn.po +source_file = pot/delete-reset-vpn.pot +source_lang = en +type = PO + [ACS_DOCS.delete-templates] file_filter = /delete-templates.po source_file = pot/delete-templates.pot @@ -740,6 +999,18 @@ source_file = pot/deleting-vms.pot source_lang = en type = PO +[ACS_DOCS.dell62xx-hardware] +file_filter = /dell62xx-hardware.po +source_file = pot/dell62xx-hardware.pot +source_lang = en +type = PO + +[ACS_DOCS.dell62xx-layer2] +file_filter = /dell62xx-layer2.po +source_file = pot/dell62xx-layer2.pot +source_lang = en +type = PO + [ACS_DOCS.deployment-architecture-overview] file_filter = /deployment-architecture-overview.po source_file = pot/deployment-architecture-overview.pot @@ -752,21 +1023,21 @@ source_file = pot/detach-move-volumes.pot source_lang = en type = PO -[ACS_DOCS.developer-getting-started] -file_filter = /developer-getting-started.po -source_file = pot/developer-getting-started.pot +[ACS_DOCS.devcloud-usage-mode] +file_filter = /devcloud-usage-mode.po +source_file = pot/devcloud-usage-mode.pot source_lang = en type = PO -[ACS_DOCS.developer_guide] -file_filter = /developer_guide.po -source_file = pot/developer_guide.pot +[ACS_DOCS.devcloud] +file_filter = /devcloud.po +source_file = pot/devcloud.pot source_lang = en type = PO -[ACS_DOCS.developer-guide] -file_filter = /developer-guide.po -source_file = pot/developer-guide.pot +[ACS_DOCS.developer-getting-started] +file_filter = /developer-getting-started.po +source_file = pot/developer-getting-started.pot source_lang = en type = PO @@ -800,6 +1071,12 @@ source_file = pot/domains.pot source_lang = en type = PO +[ACS_DOCS.enable-disable-static-nat-vpc] +file_filter = /enable-disable-static-nat-vpc.po +source_file = pot/enable-disable-static-nat-vpc.pot +source_lang = en +type = PO + [ACS_DOCS.enable-disable-static-nat] file_filter = /enable-disable-static-nat.po source_file = pot/enable-disable-static-nat.pot @@ -842,6 +1119,12 @@ source_file = pot/event-log-queries.pot source_lang = en type = PO +[ACS_DOCS.event-types] +file_filter = /event-types.po +source_file = pot/event-types.pot +source_lang = en +type = PO + [ACS_DOCS.events-log] file_filter = /events-log.po source_file = pot/events-log.pot @@ -854,12 +1137,6 @@ source_file = pot/events.pot source_lang = en type = PO -[ACS_DOCS.event-types] -file_filter = /event-types.po -source_file = pot/event-types.pot -source_lang = en -type = PO - [ACS_DOCS.example-LDAP-configuration-commands] file_filter = /example-LDAP-configuration-commands.po source_file = pot/example-LDAP-configuration-commands.pot @@ -884,6 +1161,30 @@ source_file = pot/external-firewalls-and-load-balancers.pot source_lang = en type = PO +[ACS_DOCS.external-fw-topology-req] +file_filter = /external-fw-topology-req.po +source_file = pot/external-fw-topology-req.pot +source_lang = en +type = PO + +[ACS_DOCS.external-guest-firewall-integration] +file_filter = /external-guest-firewall-integration.po +source_file = pot/external-guest-firewall-integration.pot +source_lang = en +type = PO + +[ACS_DOCS.external-guest-lb-integration] +file_filter = /external-guest-lb-integration.po +source_file = pot/external-guest-lb-integration.pot +source_lang = en +type = PO + +[ACS_DOCS.extracting-source] +file_filter = /extracting-source.po +source_file = pot/extracting-source.pot +source_lang = en +type = PO + [ACS_DOCS.feature-overview] file_filter = /feature-overview.po source_file = pot/feature-overview.pot @@ -902,9 +1203,21 @@ source_file = pot/first_ms_node_install.pot source_lang = en type = PO -[ACS_DOCS.globally-configured-limit] -file_filter = /globally-configured-limit.po -source_file = pot/globally-configured-limit.pot +[ACS_DOCS.generic-firewall-provisions] +file_filter = /generic-firewall-provisions.po +source_file = pot/generic-firewall-provisions.pot +source_lang = en +type = PO + +[ACS_DOCS.getting-release] +file_filter = /getting-release.po +source_file = pot/getting-release.pot +source_lang = en +type = PO + +[ACS_DOCS.global-config] +file_filter = /global-config.po +source_file = pot/global-config.pot source_lang = en type = PO @@ -926,6 +1239,12 @@ source_file = pot/guest-network.pot source_lang = en type = PO +[ACS_DOCS.guest-nw-usage-with-traffic-sentinel] +file_filter = /guest-nw-usage-with-traffic-sentinel.po +source_file = pot/guest-nw-usage-with-traffic-sentinel.pot +source_lang = en +type = PO + [ACS_DOCS.guest-traffic] file_filter = /guest-traffic.po source_file = pot/guest-traffic.pot @@ -950,6 +1269,30 @@ source_file = pot/ha-management-server.pot source_lang = en type = PO +[ACS_DOCS.hardware-config-eg] +file_filter = /hardware-config-eg.po +source_file = pot/hardware-config-eg.pot +source_lang = en +type = PO + +[ACS_DOCS.hardware-firewall] +file_filter = /hardware-firewall.po +source_file = pot/hardware-firewall.pot +source_lang = en +type = PO + +[ACS_DOCS.host-add-vsphere] +file_filter = /host-add-vsphere.po +source_file = pot/host-add-vsphere.pot +source_lang = en +type = PO + +[ACS_DOCS.host-add-xenserver-kvm-ovm] +file_filter = /host-add-xenserver-kvm-ovm.po +source_file = pot/host-add-xenserver-kvm-ovm.pot +source_lang = en +type = PO + [ACS_DOCS.host-add] file_filter = /host-add.po source_file = pot/host-add.pot @@ -968,15 +1311,15 @@ source_file = pot/hypervisor-host-install-agent.pot source_lang = en type = PO -[ACS_DOCS.hypervisor-host-install-firewall] -file_filter = /hypervisor-host-install-firewall.po -source_file = pot/hypervisor-host-install-firewall.pot +[ACS_DOCS.hypervisor-host-install-finish] +file_filter = /hypervisor-host-install-finish.po +source_file = pot/hypervisor-host-install-finish.pot source_lang = en type = PO -[ACS_DOCS.hypervisor-host-install-flow] -file_filter = /hypervisor-host-install-flow.po -source_file = pot/hypervisor-host-install-flow.pot +[ACS_DOCS.hypervisor-host-install-firewall] +file_filter = /hypervisor-host-install-firewall.po +source_file = pot/hypervisor-host-install-firewall.pot source_lang = en type = PO @@ -986,6 +1329,12 @@ source_file = pot/hypervisor-host-install-libvirt.pot source_lang = en type = PO +[ACS_DOCS.hypervisor-host-install-network-openvswitch] +file_filter = /hypervisor-host-install-network-openvswitch.po +source_file = pot/hypervisor-host-install-network-openvswitch.pot +source_lang = en +type = PO + [ACS_DOCS.hypervisor-host-install-network] file_filter = /hypervisor-host-install-network.po source_file = pot/hypervisor-host-install-network.pot @@ -1010,6 +1359,24 @@ source_file = pot/hypervisor-host-install-security-policies.pot source_lang = en type = PO +[ACS_DOCS.hypervisor-installation] +file_filter = /hypervisor-installation.po +source_file = pot/hypervisor-installation.pot +source_lang = en +type = PO + +[ACS_DOCS.hypervisor-kvm-install-flow] +file_filter = /hypervisor-kvm-install-flow.po +source_file = pot/hypervisor-kvm-install-flow.pot +source_lang = en +type = PO + +[ACS_DOCS.hypervisor-kvm-requirements] +file_filter = /hypervisor-kvm-requirements.po +source_file = pot/hypervisor-kvm-requirements.pot +source_lang = en +type = PO + [ACS_DOCS.hypervisor-support-for-primarystorage] file_filter = /hypervisor-support-for-primarystorage.po source_file = pot/hypervisor-support-for-primarystorage.pot @@ -1034,15 +1401,21 @@ source_file = pot/incremental-snapshots-backup.pot source_lang = en type = PO +[ACS_DOCS.initial-setup-of-external-firewalls-loadbalancers] +file_filter = /initial-setup-of-external-firewalls-loadbalancers.po +source_file = pot/initial-setup-of-external-firewalls-loadbalancers.pot +source_lang = en +type = PO + [ACS_DOCS.initialize-and-test] file_filter = /initialize-and-test.po source_file = pot/initialize-and-test.pot source_lang = en type = PO -[ACS_DOCS.initial-setup-of-external-firewalls-loadbalancers] -file_filter = /initial-setup-of-external-firewalls-loadbalancers.po -source_file = pot/initial-setup-of-external-firewalls-loadbalancers.pot +[ACS_DOCS.install-usage-server] +file_filter = /install-usage-server.po +source_file = pot/install-usage-server.pot source_lang = en type = PO @@ -1052,9 +1425,9 @@ source_file = pot/installation-complete.pot source_lang = en type = PO -[ACS_DOCS.installation_overview] -file_filter = /installation_overview.po -source_file = pot/installation_overview.pot +[ACS_DOCS.installation-steps-overview] +file_filter = /installation-steps-overview.po +source_file = pot/installation-steps-overview.pot source_lang = en type = PO @@ -1070,9 +1443,9 @@ source_file = pot/installation_steps_overview.pot source_lang = en type = PO -[ACS_DOCS.installation-steps-overview] -file_filter = /installation-steps-overview.po -source_file = pot/installation-steps-overview.pot +[ACS_DOCS.inter-vlan-routing] +file_filter = /inter-vlan-routing.po +source_file = pot/inter-vlan-routing.pot source_lang = en type = PO @@ -1082,12 +1455,6 @@ source_file = pot/introduction.pot source_lang = en type = PO -[ACS_DOCS.ipaddress-usage-record-format] -file_filter = /ipaddress-usage-record-format.po -source_file = pot/ipaddress-usage-record-format.pot -source_lang = en -type = PO - [ACS_DOCS.ip-forwarding-firewalling] file_filter = /ip-forwarding-firewalling.po source_file = pot/ip-forwarding-firewalling.pot @@ -1100,6 +1467,12 @@ source_file = pot/ip-load-balancing.pot source_lang = en type = PO +[ACS_DOCS.ipaddress-usage-record-format] +file_filter = /ipaddress-usage-record-format.po +source_file = pot/ipaddress-usage-record-format.pot +source_lang = en +type = PO + [ACS_DOCS.isolated-networks] file_filter = /isolated-networks.po source_file = pot/isolated-networks.pot @@ -1112,27 +1485,33 @@ source_file = pot/job-status.pot source_lang = en type = PO +[ACS_DOCS.kvm-topology-req] +file_filter = /kvm-topology-req.po +source_file = pot/kvm-topology-req.pot +source_lang = en +type = PO + [ACS_DOCS.large_scale_redundant_setup] file_filter = /large_scale_redundant_setup.po source_file = pot/large_scale_redundant_setup.pot source_lang = en type = PO -[ACS_DOCS.LDAPserver-for-user-authentication] -file_filter = /LDAPserver-for-user-authentication.po -source_file = pot/LDAPserver-for-user-authentication.pot +[ACS_DOCS.layer2-switch] +file_filter = /layer2-switch.po +source_file = pot/layer2-switch.pot source_lang = en type = PO -[ACS_DOCS.linux-installation] -file_filter = /linux-installation.po -source_file = pot/linux-installation.pot +[ACS_DOCS.lb-policy-pfwd-rule-usage-record-format] +file_filter = /lb-policy-pfwd-rule-usage-record-format.po +source_file = pot/lb-policy-pfwd-rule-usage-record-format.pot source_lang = en type = PO -[ACS_DOCS.loadbal-policy-port-fwd-rule-usage-record-fmt] -file_filter = /loadbalancer-policy-port-forwarding-rule-usage-record-format.po -source_file = pot/loadbalancer-policy-port-forwarding-rule-usage-record-format.pot +[ACS_DOCS.linux-installation] +file_filter = /linux-installation.po +source_file = pot/linux-installation.pot source_lang = en type = PO @@ -1142,18 +1521,18 @@ source_file = pot/load-balancer-rules.pot source_lang = en type = PO -[ACS_DOCS.log-in] -file_filter = /log-in.po -source_file = pot/log-in.pot -source_lang = en -type = PO - [ACS_DOCS.log-in-root-admin] file_filter = /log-in-root-admin.po source_file = pot/log-in-root-admin.pot source_lang = en type = PO +[ACS_DOCS.log-in] +file_filter = /log-in.po +source_file = pot/log-in.pot +source_lang = en +type = PO + [ACS_DOCS.long-running-job-events] file_filter = /long-running-job-events.po source_file = pot/long-running-job-events.pot @@ -1196,12 +1575,6 @@ source_file = pot/management-server-install-complete.pot source_lang = en type = PO -[ACS_DOCS.management-server-install-db] -file_filter = /management-server-install-db.po -source_file = pot/management-server-install-db.pot -source_lang = en -type = PO - [ACS_DOCS.management-server-install-db-external] file_filter = /management-server-install-db-external.po source_file = pot/management-server-install-db-external.pot @@ -1214,6 +1587,12 @@ source_file = pot/management-server-install-db-local.pot source_lang = en type = PO +[ACS_DOCS.management-server-install-db] +file_filter = /management-server-install-db.po +source_file = pot/management-server-install-db.pot +source_lang = en +type = PO + [ACS_DOCS.management-server-install-flow] file_filter = /management-server-install-flow.po source_file = pot/management-server-install-flow.pot @@ -1250,6 +1629,12 @@ source_file = pot/management-server-install-systemvm.pot source_lang = en type = PO +[ACS_DOCS.management-server-lb] +file_filter = /management-server-lb.po +source_file = pot/management-server-lb.pot +source_lang = en +type = PO + [ACS_DOCS.management-server-overview] file_filter = /management-server-overview.po source_file = pot/management-server-overview.pot @@ -1262,6 +1647,12 @@ source_file = pot/manual-live-migration.pot source_lang = en type = PO +[ACS_DOCS.marvin] +file_filter = /marvin.po +source_file = pot/marvin.pot +source_lang = en +type = PO + [ACS_DOCS.max-result-page-returned] file_filter = /max-result-page-returned.po source_file = pot/max-result-page-returned.pot @@ -1286,123 +1677,243 @@ source_file = pot/minimum-system-requirements.pot source_lang = en type = PO -[ACS_DOCS.modify-delete-service-offerings] -file_filter = /modify-delete-service-offerings.po -source_file = pot/modify-delete-service-offerings.pot +[ACS_DOCS.modify-delete-service-offerings] +file_filter = /modify-delete-service-offerings.po +source_file = pot/modify-delete-service-offerings.pot +source_lang = en +type = PO + +[ACS_DOCS.multi_node_management_server] +file_filter = /multi_node_management_server.po +source_file = pot/multi_node_management_server.pot +source_lang = en +type = PO + +[ACS_DOCS.multi_node_overview] +file_filter = /multi_node_overview.po +source_file = pot/multi_node_overview.pot +source_lang = en +type = PO + +[ACS_DOCS.multi_site_deployment] +file_filter = /multi_site_deployment.po +source_file = pot/multi_site_deployment.pot +source_lang = en +type = PO + +[ACS_DOCS.multiple-system-vm-vmware] +file_filter = /multiple-system-vm-vmware.po +source_file = pot/multiple-system-vm-vmware.pot +source_lang = en +type = PO + +[ACS_DOCS.network-offering-usage-record-format] +file_filter = /network-offering-usage-record-format.po +source_file = pot/network-offering-usage-record-format.pot +source_lang = en +type = PO + +[ACS_DOCS.network-offerings] +file_filter = /network-offerings.po +source_file = pot/network-offerings.pot +source_lang = en +type = PO + +[ACS_DOCS.network-rate] +file_filter = /network-rate.po +source_file = pot/network-rate.pot +source_lang = en +type = PO + +[ACS_DOCS.network-service-providers] +file_filter = /network-service-providers.po +source_file = pot/network-service-providers.pot +source_lang = en +type = PO + +[ACS_DOCS.network-setup] +file_filter = /network-setup.po +source_file = pot/network-setup.pot +source_lang = en +type = PO + +[ACS_DOCS.network-usage-record-format] +file_filter = /network-usage-record-format.po +source_file = pot/network-usage-record-format.pot +source_lang = en +type = PO + +[ACS_DOCS.networking-in-a-pod] +file_filter = /networking-in-a-pod.po +source_file = pot/networking-in-a-pod.pot +source_lang = en +type = PO + +[ACS_DOCS.networking-in-a-zone] +file_filter = /networking-in-a-zone.po +source_file = pot/networking-in-a-zone.pot +source_lang = en +type = PO + +[ACS_DOCS.networking-overview] +file_filter = /networking-overview.po +source_file = pot/networking-overview.pot +source_lang = en +type = PO + +[ACS_DOCS.networking_overview] +file_filter = /networking_overview.po +source_file = pot/networking_overview.pot +source_lang = en +type = PO + +[ACS_DOCS.networks-for-users-overview] +file_filter = /networks-for-users-overview.po +source_file = pot/networks-for-users-overview.pot +source_lang = en +type = PO + +[ACS_DOCS.networks] +file_filter = /networks.po +source_file = pot/networks.pot +source_lang = en +type = PO + +[ACS_DOCS.nfs-shares-on-management-server] +file_filter = /nfs-shares-on-management-server.po +source_file = pot/nfs-shares-on-management-server.pot +source_lang = en +type = PO + +[ACS_DOCS.nfs-shares-on-separate-server] +file_filter = /nfs-shares-on-separate-server.po +source_file = pot/nfs-shares-on-separate-server.pot +source_lang = en +type = PO + +[ACS_DOCS.offerings] +file_filter = /offerings.po +source_file = pot/offerings.pot +source_lang = en +type = PO + +[ACS_DOCS.ongoing-config-of-external-firewalls-lb] +file_filter = /ongoing-config-of-external-firewalls-lb.po +source_file = pot/ongoing-config-of-external-firewalls-lb.pot source_lang = en type = PO -[ACS_DOCS.multi_node_management_server] -file_filter = /multi_node_management_server.po -source_file = pot/multi_node_management_server.pot +[ACS_DOCS.over-provisioning-service-offering-limits] +file_filter = /over-provisioning-service-offering-limits.po +source_file = pot/over-provisioning-service-offering-limits.pot source_lang = en type = PO -[ACS_DOCS.multi_node_overview] -file_filter = /multi_node_overview.po -source_file = pot/multi_node_overview.pot +[ACS_DOCS.ovm-install] +file_filter = /ovm-install.po +source_file = pot/ovm-install.pot source_lang = en type = PO -[ACS_DOCS.multiple-system-vm-vmware] -file_filter = /multiple-system-vm-vmware.po -source_file = pot/multiple-system-vm-vmware.pot +[ACS_DOCS.ovm-requirements] +file_filter = /ovm-requirements.po +source_file = pot/ovm-requirements.pot source_lang = en type = PO -[ACS_DOCS.multi_site_deployment] -file_filter = /multi_site_deployment.po -source_file = pot/multi_site_deployment.pot +[ACS_DOCS.per-domain-limits] +file_filter = /per-domain-limits.po +source_file = pot/per-domain-limits.pot source_lang = en type = PO -[ACS_DOCS.networking-in-a-pod] -file_filter = /networking-in-a-pod.po -source_file = pot/networking-in-a-pod.pot +[ACS_DOCS.performance-monitoring] +file_filter = /performance-monitoring.po +source_file = pot/performance-monitoring.pot source_lang = en type = PO -[ACS_DOCS.networking-in-a-zone] -file_filter = /networking-in-a-zone.po -source_file = pot/networking-in-a-zone.pot +[ACS_DOCS.physical-network-configuration-settings] +file_filter = /physical-network-configuration-settings.po +source_file = pot/physical-network-configuration-settings.pot source_lang = en type = PO -[ACS_DOCS.networking_overview] -file_filter = /networking_overview.po -source_file = pot/networking-overview.pot +[ACS_DOCS.plugin-niciranvp-about] +file_filter = /plugin-niciranvp-about.po +source_file = pot/plugin-niciranvp-about.pot source_lang = en type = PO -[ACS_DOCS.networking-overview] -file_filter = /networking-overview.po -source_file = pot/networking-overview.pot +[ACS_DOCS.plugin-niciranvp-devicemanagement] +file_filter = /plugin-niciranvp-devicemanagement.po +source_file = pot/plugin-niciranvp-devicemanagement.pot source_lang = en type = PO -[ACS_DOCS.network-offerings] -file_filter = /network-offerings.po -source_file = pot/network-offerings.pot +[ACS_DOCS.plugin-niciranvp-features] +file_filter = /plugin-niciranvp-features.po +source_file = pot/plugin-niciranvp-features.pot source_lang = en type = PO -[ACS_DOCS.network-offering-usage-record-format] -file_filter = /network-offering-usage-record-format.po -source_file = pot/network-offering-usage-record-format.pot +[ACS_DOCS.plugin-niciranvp-guide] +file_filter = /plugin-niciranvp-guide.po +source_file = pot/plugin-niciranvp-guide.pot source_lang = en type = PO -[ACS_DOCS.network-service-providers] -file_filter = /network-service-providers.po -source_file = pot/network-service-providers.pot +[ACS_DOCS.plugin-niciranvp-introduction] +file_filter = /plugin-niciranvp-introduction.po +source_file = pot/plugin-niciranvp-introduction.pot source_lang = en type = PO -[ACS_DOCS.network-usage-record-format] -file_filter = /network-usage-record-format.po -source_file = pot/network-usage-record-format.pot +[ACS_DOCS.plugin-niciranvp-preparations] +file_filter = /plugin-niciranvp-preparations.po +source_file = pot/plugin-niciranvp-preparations.pot source_lang = en type = PO -[ACS_DOCS.nfs-shares-on-management-server] -file_filter = /nfs-shares-on-management-server.po -source_file = pot/nfs-shares-on-management-server.pot +[ACS_DOCS.plugin-niciranvp-provider] +file_filter = /plugin-niciranvp-provider.po +source_file = pot/plugin-niciranvp-provider.pot source_lang = en type = PO -[ACS_DOCS.nfs-shares-on-separate-server] -file_filter = /nfs-shares-on-separate-server.po -source_file = pot/nfs-shares-on-separate-server.pot +[ACS_DOCS.plugin-niciranvp-revisions] +file_filter = /plugin-niciranvp-revisions.po +source_file = pot/plugin-niciranvp-revisions.pot source_lang = en type = PO -[ACS_DOCS.ongoing-config-of-external-firewall-loadbalancer] -file_filter = /ongoing-configuration-of-external-firewalls-loadbalancer.po -source_file = pot/ongoing-configuration-of-external-firewalls-loadbalancer.pot +[ACS_DOCS.plugin-niciranvp-tables] +file_filter = /plugin-niciranvp-tables.po +source_file = pot/plugin-niciranvp-tables.pot source_lang = en type = PO -[ACS_DOCS.over-provisioning-service-offering-limits] -file_filter = /over-provisioning-service-offering-limits.po -source_file = pot/over-provisioning-service-offering-limits.pot +[ACS_DOCS.plugin-niciranvp-troubleshooting] +file_filter = /plugin-niciranvp-troubleshooting.po +source_file = pot/plugin-niciranvp-troubleshooting.pot source_lang = en type = PO -[ACS_DOCS.per-domain-limits] -file_filter = /per-domain-limits.po -source_file = pot/per-domain-limits.pot +[ACS_DOCS.plugin-niciranvp-ui] +file_filter = /plugin-niciranvp-ui.po +source_file = pot/plugin-niciranvp-ui.pot source_lang = en type = PO -[ACS_DOCS.performance-monitoring] -file_filter = /performance-monitoring.po -source_file = pot/performance-monitoring.pot +[ACS_DOCS.plugin-niciranvp-usage] +file_filter = /plugin-niciranvp-usage.po +source_file = pot/plugin-niciranvp-usage.pot source_lang = en type = PO -[ACS_DOCS.physical-network-configuration-settings] -file_filter = /physical-network-configuration-settings.po -source_file = pot/physical-network-configuration-settings.pot +[ACS_DOCS.plugin-niciranvp-uuidreferences] +file_filter = /plugin-niciranvp-uuidreferences.po +source_file = pot/plugin-niciranvp-uuidreferences.pot source_lang = en type = PO @@ -1418,18 +1929,6 @@ source_file = pot/port-forwarding.pot source_lang = en type = PO -[ACS_DOCS.Preface] -file_filter = /Preface.po -source_file = pot/Preface.pot -source_lang = en -type = PO - -[ACS_DOCS.prepare_os] -file_filter = /prepare_os.po -source_file = pot/prepare_os.pot -source_lang = en -type = PO - [ACS_DOCS.prepare-system-vm-template] file_filter = /prepare-system-vm-template.po source_file = pot/prepare-system-vm-template.pot @@ -1460,6 +1959,12 @@ source_file = pot/private-public-template.pot source_lang = en type = PO +[ACS_DOCS.projects-overview] +file_filter = /projects-overview.po +source_file = pot/projects-overview.pot +source_lang = en +type = PO + [ACS_DOCS.projects] file_filter = /projects.po source_file = pot/projects.pot @@ -1472,12 +1977,6 @@ source_file = pot/provisioning-auth-api.pot source_lang = en type = PO -[ACS_DOCS.provisioning] -file_filter = /provisioning.po -source_file = pot/provisioning.pot -source_lang = en -type = PO - [ACS_DOCS.provisioning-steps-overview] file_filter = /provisioning-steps-overview.po source_file = pot/provisioning-steps-overview.pot @@ -1496,15 +1995,21 @@ source_file = pot/query-filter.pot source_lang = en type = PO +[ACS_DOCS.re-install-hosts] +file_filter = /re-install-hosts.po +source_file = pot/re-install-hosts.pot +source_lang = en +type = PO + [ACS_DOCS.release-ip-address] file_filter = /release-ip-address.po source_file = pot/release-ip-address.pot source_lang = en type = PO -[ACS_DOCS.removed-API-commands] -file_filter = /removed-API-commands.po -source_file = pot/removed-API-commands.pot +[ACS_DOCS.release-ip-for-vpc] +file_filter = /release-ip-for-vpc.po +source_file = pot/release-ip-for-vpc.pot source_lang = en type = PO @@ -1514,6 +2019,30 @@ source_file = pot/remove-member-from-project.pot source_lang = en type = PO +[ACS_DOCS.remove-tier] +file_filter = /remove-tier.po +source_file = pot/remove-tier.pot +source_lang = en +type = PO + +[ACS_DOCS.remove-vpc] +file_filter = /remove-vpc.po +source_file = pot/remove-vpc.pot +source_lang = en +type = PO + +[ACS_DOCS.removed-API-commands] +file_filter = /removed-API-commands.po +source_file = pot/removed-API-commands.pot +source_lang = en +type = PO + +[ACS_DOCS.removing-hosts] +file_filter = /removing-hosts.po +source_file = pot/removing-hosts.pot +source_lang = en +type = PO + [ACS_DOCS.removing-vsphere-hosts] file_filter = /removing-vsphere-hosts.po source_file = pot/removing-vsphere-hosts.pot @@ -1550,12 +2079,6 @@ source_file = pot/responses.pot source_lang = en type = PO -[ACS_DOCS.Revision_History] -file_filter = /Revision_History.po -source_file = pot/Revision_History.pot -source_lang = en -type = PO - [ACS_DOCS.roles] file_filter = /roles.po source_file = pot/roles.pot @@ -1580,6 +2103,12 @@ source_file = pot/runtime-behavior-of-primary-storage.pot source_lang = en type = PO +[ACS_DOCS.runtime-internal-comm-req] +file_filter = /runtime-internal-comm-req.po +source_file = pot/runtime-internal-comm-req.pot +source_lang = en +type = PO + [ACS_DOCS.scheduled-maintenance-maintenance-mode-hosts] file_filter = /scheduled-maintenance-maintenance-mode-hosts.po source_file = pot/scheduled-maintenance-maintenance-mode-hosts.pot @@ -1610,24 +2139,30 @@ source_file = pot/secondary-storage-outage-and-data-loss.pot source_lang = en type = PO -[ACS_DOCS.secondary-storage] -file_filter = /secondary-storage.po -source_file = pot/secondary-storage.pot -source_lang = en -type = PO - [ACS_DOCS.secondary-storage-vm] file_filter = /secondary-storage-vm.po source_file = pot/secondary-storage-vm.pot source_lang = en type = PO +[ACS_DOCS.secondary-storage] +file_filter = /secondary-storage.po +source_file = pot/secondary-storage.pot +source_lang = en +type = PO + [ACS_DOCS.security-groups] file_filter = /security-groups.po source_file = pot/security-groups.pot source_lang = en type = PO +[ACS_DOCS.security-req] +file_filter = /security-req.po +source_file = pot/security-req.pot +source_lang = en +type = PO + [ACS_DOCS.send-projects-membership-invitation] file_filter = /send-projects-membership-invitation.po source_file = pot/send-projects-membership-invitation.pot @@ -1652,12 +2187,24 @@ source_file = pot/set-database-buffer-pool-size.pot source_lang = en type = PO +[ACS_DOCS.set-global-project-resource-limits] +file_filter = /set-global-project-resource-limits.po +source_file = pot/set-global-project-resource-limits.pot +source_lang = en +type = PO + [ACS_DOCS.set-monitor-total-vm-limits-per-host] file_filter = /set-monitor-total-vm-limits-per-host.po source_file = pot/set-monitor-total-vm-limits-per-host.pot source_lang = en type = PO +[ACS_DOCS.set-per-project-resource-limits] +file_filter = /set-per-project-resource-limits.po +source_file = pot/set-per-project-resource-limits.pot +source_lang = en +type = PO + [ACS_DOCS.set-projects-creator-permissions] file_filter = /set-projects-creator-permissions.po source_file = pot/set-projects-creator-permissions.pot @@ -1688,6 +2235,12 @@ source_file = pot/set-usage-limit.pot source_lang = en type = PO +[ACS_DOCS.set-zone-vlan-run-vm-max] +file_filter = /set-zone-vlan-run-vm-max.po +source_file = pot/set-zone-vlan-run-vm-max.pot +source_lang = en +type = PO + [ACS_DOCS.shared-networks] file_filter = /shared-networks.po source_file = pot/shared-networks.pot @@ -1718,9 +2271,27 @@ source_file = pot/snapshot-restore.pot source_lang = en type = PO -[ACS_DOCS.SSL-keystore-path-and-password] -file_filter = /SSL-keystore-path-and-password.po -source_file = pot/SSL-keystore-path-and-password.pot +[ACS_DOCS.source-build] +file_filter = /source-build.po +source_file = pot/source-build.pot +source_lang = en +type = PO + +[ACS_DOCS.source-prereqs] +file_filter = /source-prereqs.po +source_file = pot/source-prereqs.pot +source_lang = en +type = PO + +[ACS_DOCS.source] +file_filter = /source.po +source_file = pot/source.pot +source_lang = en +type = PO + +[ACS_DOCS.ssl] +file_filter = /ssl.po +source_file = pot/ssl.pot source_lang = en type = PO @@ -1742,6 +2313,12 @@ source_file = pot/sticky-session-policies-for-lb-rules.pot source_lang = en type = PO +[ACS_DOCS.stop-restart-management-server] +file_filter = /stop-restart-management-server.po +source_file = pot/stop-restart-management-server.pot +source_lang = en +type = PO + [ACS_DOCS.stopped-vm] file_filter = /stopped-vm.po source_file = pot/stopped-vm.pot @@ -1754,15 +2331,15 @@ source_file = pot/stopping-and-starting-vms.pot source_lang = en type = PO -[ACS_DOCS.stop-restart-management-server] -file_filter = /stop-restart-management-server.po -source_file = pot/stop-restart-management-server.pot +[ACS_DOCS.storage-nw-topology-req] +file_filter = /storage-nw-topology-req.po +source_file = pot/storage-nw-topology-req.pot source_lang = en type = PO -[ACS_DOCS.storage] -file_filter = /storage.po -source_file = pot/storage.pot +[ACS_DOCS.storage-overview] +file_filter = /storage-overview.po +source_file = pot/storage-overview.pot source_lang = en type = PO @@ -1772,12 +2349,30 @@ source_file = pot/storage-tags.pot source_lang = en type = PO +[ACS_DOCS.storage] +file_filter = /storage.po +source_file = pot/storage.pot +source_lang = en +type = PO + [ACS_DOCS.suspend-project] file_filter = /suspend-project.po source_file = pot/suspend-project.pot source_lang = en type = PO +[ACS_DOCS.sys-offering-sysvm] +file_filter = /sys-offering-sysvm.po +source_file = pot/sys-offering-sysvm.pot +source_lang = en +type = PO + +[ACS_DOCS.sys-reliability-and-ha] +file_filter = /sys-reliability-and-ha.po +source_file = pot/sys-reliability-and-ha.pot +source_lang = en +type = PO + [ACS_DOCS.sysprep-for-windows-server-2003R2] file_filter = /sysprep-for-windows-server-2003R2.po source_file = pot/sysprep-for-windows-server-2003R2.pot @@ -1790,12 +2385,6 @@ source_file = pot/sysprep-windows-server-2008R2.pot source_lang = en type = PO -[ACS_DOCS.sys-reliability-and-ha] -file_filter = /sys-reliability-and-ha.po -source_file = pot/sys-reliability-and-ha.pot -source_lang = en -type = PO - [ACS_DOCS.system-reserved-ip-addresses] file_filter = /system-reserved-ip-addresses.po source_file = pot/system-reserved-ip-addresses.pot @@ -1814,6 +2403,12 @@ source_file = pot/system-vm-template.pot source_lang = en type = PO +[ACS_DOCS.tagging-resources] +file_filter = /tagging-resources.po +source_file = pot/tagging-resources.pot +source_lang = en +type = PO + [ACS_DOCS.template-iso-snapshot-usage-record-format] file_filter = /template-iso-snapshot-usage-record-format.po source_file = pot/template-iso-snapshot-usage-record-format.pot @@ -1832,33 +2427,27 @@ source_file = pot/time-zones.pot source_lang = en type = PO -[ACS_DOCS.troubleshooting-alerts] -file_filter = /troubleshooting-alerts.po -source_file = pot/troubleshooting-alerts.pot -source_lang = en -type = PO - -[ACS_DOCS.troubleshoot-dataloss-on-exported-primary-storage] -file_filter = /troubleshooting-dataloss-on-exported-primary-storage.po -source_file = pot/troubleshooting-dataloss-on-exported-primary-storage.pot +[ACS_DOCS.tools] +file_filter = /tools.po +source_file = pot/tools.pot source_lang = en type = PO -[ACS_DOCS.troubleshooting-lb-rules-fails] -file_filter = /troubleshooting-lb-rules-fails.po -source_file = pot/troubleshooting-lb-rules-fails.pot +[ACS_DOCS.topology-req] +file_filter = /topology-req.po +source_file = pot/topology-req.pot source_lang = en type = PO -[ACS_DOCS.troubleshoot-maint-mode-not-working-on-vCenter] -file_filter = /troubleshooting-maintenance-mode-not-working-on-vCenter.po -source_file = pot/troubleshooting-maintenance-mode-not-working-on-vCenter.pot +[ACS_DOCS.troubleshooting-alerts] +file_filter = /troubleshooting-alerts.po +source_file = pot/troubleshooting-alerts.pot source_lang = en type = PO -[ACS_DOCS.troubleshooting] -file_filter = /troubleshooting.po -source_file = pot/troubleshooting.pot +[ACS_DOCS.troubleshooting-lb-rules-fails] +file_filter = /troubleshooting-lb-rules-fails.po +source_file = pot/troubleshooting-lb-rules-fails.pot source_lang = en type = PO @@ -1886,6 +2475,24 @@ source_file = pot/troubleshooting-working-with-server-logs.pot source_lang = en type = PO +[ACS_DOCS.troubleshooting] +file_filter = /troubleshooting.po +source_file = pot/troubleshooting.pot +source_lang = en +type = PO + +[ACS_DOCS.troublesht-dataloss-on-exp-primary-storage] +file_filter = /troublesht-dataloss-on-exp-primary-storage.po +source_file = pot/troublesht-dataloss-on-exp-primary-storage.pot +source_lang = en +type = PO + +[ACS_DOCS.troublesht-mtn-mode-not-working-on-vCenter] +file_filter = /troublesht-mtn-mode-not-working-on-vCenter.po +source_file = pot/troublesht-mtn-mode-not-working-on-vCenter.pot +source_lang = en +type = PO + [ACS_DOCS.tuning] file_filter = /tuning.po source_file = pot/tuning.pot @@ -1988,18 +2595,36 @@ source_file = pot/vcenter-maintenance-mode.pot source_lang = en type = PO +[ACS_DOCS.verifying-source] +file_filter = /verifying-source.po +source_file = pot/verifying-source.pot +source_lang = en +type = PO + [ACS_DOCS.virtual-machine-usage-record-format] file_filter = /virtual-machine-usage-record-format.po source_file = pot/virtual-machine-usage-record-format.pot source_lang = en type = PO +[ACS_DOCS.virtual-machines] +file_filter = /virtual-machines.po +source_file = pot/virtual-machines.pot +source_lang = en +type = PO + [ACS_DOCS.virtual-router] file_filter = /virtual-router.po source_file = pot/virtual-router.pot source_lang = en type = PO +[ACS_DOCS.vlan-allocation-eg] +file_filter = /vlan-allocation-eg.po +source_file = pot/vlan-allocation-eg.pot +source_lang = en +type = PO + [ACS_DOCS.vlan-provisioning] file_filter = /vlan-provisioning.po source_file = pot/vlan-provisioning.pot @@ -2018,6 +2643,24 @@ source_file = pot/vm-storage-migration.pot source_lang = en type = PO +[ACS_DOCS.vmware-install] +file_filter = /vmware-install.po +source_file = pot/vmware-install.pot +source_lang = en +type = PO + +[ACS_DOCS.vmware-requirements] +file_filter = /vmware-requirements.po +source_file = pot/vmware-requirements.pot +source_lang = en +type = PO + +[ACS_DOCS.vmware-topology-req] +file_filter = /vmware-topology-req.po +source_file = pot/vmware-topology-req.pot +source_lang = en +type = PO + [ACS_DOCS.volume-deletion-garbage-collection] file_filter = /volume-deletion-garbage-collection.po source_file = pot/volume-deletion-garbage-collection.pot @@ -2042,12 +2685,6 @@ source_file = pot/vpn.pot source_lang = en type = PO -[ACS_DOCS.VPN-user-usage-record-format] -file_filter = /VPN-user-usage-record-format.po -source_file = pot/VPN-user-usage-record-format.pot -source_lang = en -type = PO - [ACS_DOCS.whatis] file_filter = /whatis.po source_file = pot/whatis.pot @@ -2078,6 +2715,12 @@ source_file = pot/windows-installation.pot source_lang = en type = PO +[ACS_DOCS.work-with-usage] +file_filter = /work-with-usage.po +source_file = pot/work-with-usage.pot +source_lang = en +type = PO + [ACS_DOCS.working-with-hosts] file_filter = /working-with-hosts.po source_file = pot/working-with-hosts.pot @@ -2120,20 +2763,21 @@ source_file = pot/working-with-volumes.pot source_lang = en type = PO -[ACS_DOCS.work-with-usage] -file_filter = /work-with-usage.po -source_file = pot/work-with-usage.pot -source_lang = en -type = PO - [ACS_DOCS.xenserver-maintenance-mode] file_filter = /xenserver-maintenance-mode.po source_file = pot/xenserver-maintenance-mode.pot source_lang = en type = PO +[ACS_DOCS.xenserver-topology-req] +file_filter = /xenserver-topology-req.po +source_file = pot/xenserver-topology-req.pot +source_lang = en +type = PO + [ACS_DOCS.zone-add] file_filter = /zone-add.po source_file = pot/zone-add.pot source_lang = en type = PO + diff --git a/docs/en-US/Admin_Guide.xml b/docs/en-US/Admin_Guide.xml index 07f5e889f..d3b9706f8 100644 --- a/docs/en-US/Admin_Guide.xml +++ b/docs/en-US/Admin_Guide.xml @@ -26,7 +26,7 @@ &PRODUCT; Administrator's Guide Apache CloudStack - 4.0.0-incubating + 4.2.0 1 diff --git a/docs/en-US/Book_Info.xml b/docs/en-US/Book_Info.xml index c125ab8de..327668dfc 100644 --- a/docs/en-US/Book_Info.xml +++ b/docs/en-US/Book_Info.xml @@ -27,7 +27,7 @@ &PRODUCT; Guide Revised August 9, 2012 10:48 pm Pacific Apache CloudStack - 4.0.0-incubating + 4.2.0 1 diff --git a/docs/en-US/Book_Info_Release_Notes_4-0.xml b/docs/en-US/Book_Info_Release_Notes_4-0.xml index 0d57fb6d9..9655986cc 100644 --- a/docs/en-US/Book_Info_Release_Notes_4-0.xml +++ b/docs/en-US/Book_Info_Release_Notes_4-0.xml @@ -18,14 +18,13 @@ specific language governing permissions and limitations under the License. --> - - Version 4.0.0-incubating Release Notes - Revised October 17, 2012 19:49 UTC + + Version 4.1.0 Release Notes Apache CloudStack - Release notes for the Apache CloudStack 4.0.0-incubating release. + Release notes for the Apache CloudStack 4.1.0 release. diff --git a/docs/en-US/CloudStack_Nicira_NVP_Guide.xml b/docs/en-US/CloudStack_Nicira_NVP_Guide.xml index a4c367c26..7f156d5dc 100644 --- a/docs/en-US/CloudStack_Nicira_NVP_Guide.xml +++ b/docs/en-US/CloudStack_Nicira_NVP_Guide.xml @@ -28,7 +28,7 @@ &PRODUCT; Plugin Guide for the Nicira NVP Plugin Apache CloudStack - 4.0.0-incubating + 4.2.0 1 diff --git a/docs/en-US/Developers_Guide.xml b/docs/en-US/Developers_Guide.xml index 6c09354f6..87dc8a667 100644 --- a/docs/en-US/Developers_Guide.xml +++ b/docs/en-US/Developers_Guide.xml @@ -26,7 +26,7 @@ &PRODUCT; Developer's Guide Apache CloudStack - 4.0.0-incubating + 4.2.0 @@ -50,6 +50,7 @@ + diff --git a/docs/en-US/Installation_Guide.xml b/docs/en-US/Installation_Guide.xml index 2f60acac9..e6a803186 100644 --- a/docs/en-US/Installation_Guide.xml +++ b/docs/en-US/Installation_Guide.xml @@ -21,41 +21,41 @@ specific language governing permissions and limitations under the License. --> - - - &PRODUCT; Installation Guide - Apache CloudStack - 4.0.0-incubating - 1 - - - - Installation Guide for &PRODUCT;. - - - - - - - - - - - - - - - - - - - - - - - - - - + + &PRODUCT; Installation Guide + Apache CloudStack + 4.2.0 + 1 + + + Installation Guide for &PRODUCT;. + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/en-US/LDAPserver-for-user-authentication.xml b/docs/en-US/LDAPserver-for-user-authentication.xml index 5fcb300af..376631cbb 100644 --- a/docs/en-US/LDAPserver-for-user-authentication.xml +++ b/docs/en-US/LDAPserver-for-user-authentication.xml @@ -5,23 +5,22 @@ ]> -
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.. @@ -37,4 +36,4 @@ -
+ diff --git a/docs/en-US/Release_Notes.xml b/docs/en-US/Release_Notes.xml index c8cc68697..f44951840 100644 --- a/docs/en-US/Release_Notes.xml +++ b/docs/en-US/Release_Notes.xml @@ -4,2920 +4,5255 @@ %BOOK_ENTITIES; ]> - - - Submitting Feedback and Getting Help - The Apache CloudStack project has mailing lists for users and developers. These are the - official channels of communication for the project and are the best way to get answers about - using and contributing to CloudStack. It's a good idea to subscribe to the cloudstack-users - mailing list if you've deployed or are deploying CloudStack into production, and even for test - deployments. - The CloudStack developer's mailing list (cloudstack-dev) is for discussions about - CloudStack development, and is the best list for discussing possible bugs in CloudStack. - Anyone contributing to CloudStack should be on this mailing list. - You can also report bugs in CloudStack using the Apache Defect Tracking - System. - To posts to the lists, you'll need to be subscribed. See the CloudStack Web site - for instructions. - - - Upgrade Instructions -
- Upgrade from 3.0.2 to 4.0.0-incubating - Perform the following to upgrade from version 3.0.2 to version 4.0.0-incubating. Note - that some of the steps here are only required if you're using a specific hypervisor. The - steps that are hypervisor-specific are called out with a note. - - - Ensure that you query your IP address usage records and process them or make a - backup. During the upgrade you will lose the old IP address usage records. - Starting in 3.0.2, the usage record format for IP addresses is the same as the rest - of the usage types. Instead of a single record with the assignment and release dates, - separate records are generated per aggregation period with start and end dates. After - upgrading, any existing IP address usage records in the old format will no longer be - available. - - - - The following upgrade instructions apply only if you're using VMware hosts. If - you're not using VMware hosts, skip this step and move on to step 3: stopping all - usage servers. - - In each zone that includes VMware hosts, you need to add a new system VM template. - - - While running the existing 3.0.2 system, log in to the UI as root - administrator. - - - In the left navigation bar, click Templates. - - - In Select view, click Templates. - - - Click Register template. - The Register template dialog box is displayed. - - - In the Register template dialog box, specify the following values (do not change - these): - + + + + Welcome to &PRODUCT; 4.1 + Welcome to the 4.1.0 release of &PRODUCT;, the first major release from the Apache CloudStack project since its graduation from the Apache Incubator. + This document contains information specific to this release of &PRODUCT;, including upgrade instructions from prior releases, new features added to &PRODUCT;, API changes, and issues fixed in the release. For installation instructions, please see the Installation Guide. For usage and administration instructions, please see the &PRODUCT; Administrator's Guide. Developers and users who wish to work with the API will find instruction in the &PRODUCT; API Developer's Guide + If you find any errors or problems in this guide, please see . We hope you enjoy working with &PRODUCT;! + + + Version 4.1.0 +
+ What’s New in 4.1 + Apache CloudStack 4.1.0 includes many new features. This section covers the most prominent new features and changes. +
+ Localization + The 4.1.0 release adds partial User Interface (UI) support for Catalan, Chinese, French, German, Italian, Japanese, Korean, Norwegian, Portuguese, Russian, and Spanish. Not all languages are complete. + The 4.1.0 release also adds documentation translations for Chinese, Chinese (Taiwan), Italian, Japanese, Korean, and Portuguese. +
+
+ Added Region Support + CLOUDSTACK-241: This feature adds a "region" construct that spans several management servers. The objective of this feature is to add AWS EC2 like Regions implementation into CloudStack. Regions are dispersed and located in separate geographic areas. Availability Zones (or Zones in CloudStack) are distinct locations within a Region that are engineered to be isolated from failures in other Zones and provide inexpensive, low latency network connectivity to other Zones in the same Region. + Regions are expected to add the following benefits + + Higher availability of the services: users can deploy services across AZs and even if one of the AZ goes down the services are still available to the end-user through VMs deployed in other zones. + Higher availability of the Management Server (MS): Since each MS Cluster only manages a single Region, if that MS Cluster goes down, only that particular Region is impacted. Admin should be able to access all the other Regions. + Scalability: The scalability limit of CloudStack dramatically improves, as the scalability limit of MS Cluster is limited to a single Region. + Object Store: With Regions construct, CloudStack would also allow users to define Object Store (Secondary Storage) across AZs. This helps users easily deploy VMs in different AZs using the same template, offerings. + Geographical Grouping: Regions allow admins to group AZs (that have low latency and are geographically located nearby) into a broader region construct. + + Currently the Region feature is exposed in the API, but does not have a UI component. +
+
+ Support for EC2 Query API + CLOUDSTACK-197: This introduces a query API for the AWS APIs that are currently only supported by SOAP. The AWS Java SDK and AWS PHP SDK should now be supported by the AWSAPI in CloudStack. + Supported Query APIs in 4.1.0: + + AllocateAddress + AssociateAddress + AttachVolume + AuthorizeSecurityGroupIngress + CreateImage + CreateKeyPair + CreateSecurityGroup + CreateSnapshot + CreateTags + CreateVolume + DeleteKeyPair + DeleteSecurityGroup + DeleteSnapshot + DeleteTags + DeleteVolume + DeregisterImage + DescribeAddresses + DescribeAvailabilityZones + DescribeImageAttribute + DescribeImages + DescribeInstanceAttribute + DescribeInstances + DescribeKeyPairs + DescribeSecurityGroups + DescribeSnapshots + DescribeTags + DescribeVolumes + DetachVolume + DisassociateAddress + GetPasswordData + ImportkeyPair + ModifyImageAttribute + RebootInstances + RegisterImage + ReleaseAddress + ResetImageAttribute + RevokeSecurityGroupIngress + RunInstances + StartInstances + StopInstances + TerminateInstances + + See the Feature Specification for more information on the Query API support. +
+
+ Auto-Completing Shell for CloudStack (CloudMonkey) + CLOUDSTACK-132: Adds a auto-completing shell and command-line tool for &PRODUCT; written in Python, called CloudMonkey. + CloudMonkey includes the following features: + + Usable as a command line tool and interactive shell. + All commands are lowercase unlike API. + Api Discovery using sync feature, with build time api precaching for failsafe sync. + Raw api execution support. + Auto-completion via double tab. + Reverse search using Ctrl+R + Emacs compatible key bindings. + Output that's "pipeable" to other *nix programs. + Unix shell execution. + Support to handle asynchronous jobs using user defined blocking or non-blocking way. + Tabular or JSON output with filtering of table columns. + Colored output. + API parameter value completion (based on predication, fuzzy results may fail sometimes). + + CloudMonkey has a few requirements above and beyond CloudStack, and does not need to be run on the same machine as a management server. If you wish to run CloudMonkey you'll need Python 2.5 or later, readline, Pygments, and prettytable. CloudMonkey can be installed with pip: + $ pip install cloudmonkey + See the Developer's Guide and the CloudStack wiki for the latest information on CloudMonkey installation and use. +
+
+ API Discovery Service + CLOUDSTACK-926: CloudStack has more than 300 APIs and more are added in each major release. CloudStack admins can enable or disable APIs, or add plugins which provide more APIs. The API Discovery Service is a plugin which will help users discover the APIs available to them on a CloudStack Management Server. + The discovery service implements a method called listApis which will return information about APIs for a user. It currently accepts an apiName to list api information of that particular API. The method ensures that user can only list APIs they are entitled to. + All CloudStack APIs are implemented by annotated command class and PluggableService is a contract implemented by all the components such as the Management Server and all the plugins which provide an API. During load time, API discovery service asks all the pluggable services to return list of API cmd classes from whose fields and annotations it gathers information about each API, the information consists of name, description, parameter name, parameter description, etc. + For more information on the implementation of the API Discovery Service for 4.1.0, see the CloudStack wiki. +
+
+ Events Framework + CLOUDSTACK-820: The Events Framework provides a mechanism to publish and subscribe to events in &PRODUCT;. +
+
+ Additional VMX Settings + ### +
+
+ L3 Router Functionality in Nicira Nvp Plugin + ### +
+
+ Persistent Networks without Running VM + ### +
+
+ Add/Remove Network on VM + ### +
+
+ Resize Volumes Feature + ### +
+
+ Autoscale + ### +
+
+ API Request Throttling + CLOUDSTACK-618: Limits the number of API requests per second that can be placed against a management server to avoid DoS attacks via API requests. + The throttling is controlled by the api.throttling.enabled, api.throttling.interval, and api.throttling.max configuration settings. Note that api.throttling.enabled is set to false by default. +
+
+ S3 Backed Secondary Storage + CLOUDSTACK-509: This enhancement backs NFS secondary storage with an S3-compatible object store. Periodically, a reaper thread synchronizes the templates, ISOs, and snapshots stored on a NFS secondary storage mount with a configured S3 object store. In addition to permitting the use of commodity or IaaS storage solutions for static assets, it provides a means of automatically synchronizing template and ISO assets across multiple zones. + See the &PRODUCT; wiki for more information on this feature, currently the documentation is incomplete. +
+
+ User and Domain Admin Can Create API Key and Secret + CLOUDSTACK-437: This feature adds the ability for domain admins and users to create their own API Key and Secret. Domain admins can create keys for themselves, subdomain admins, and for regular users, but not for other domain admins. +
+
+ Support Inline Mode for F5 and SRX + CLOUDSTACK-306: For &PRODUCT; deployments using the Juniper SRX (firewall) and F5 Big IP (load balancer), &PRODUCT; 4.1.0 supports putting the firewall in front of the load balancer, making the firewall device the gateway and putting the load balancer behind the public network. +
+
+ Egress Firewall Rules for Guest Networks + CLOUDSTACK-299: This feature allows users to create egress (exit) traffic rules from private networks to public networks (e.g. from your internal network to the public Internet). By default all traffic is blocked from internal networks to the public networks, this allows you to open ports as necessary. + Egress traffic rules are suppored only on virtual routers at this time, physical devices are not supported. +
+
+ Reset SSH Key to Access VM + CLOUDSTACK-297: &PRODUCT; 4.1.0 introduces a new API resetSSHKeyForVirtualMachine, that can allow them to set or reset the SSH keypair assigned to a virtual machine. +
+
+
+ Issues Fixed in 4.1.0 + Apache CloudStack uses Jira + to track its issues. All new features and bugs for 4.1.0 have been tracked in Jira, and have + a standard naming convention of "CLOUDSTACK-NNNN" where "NNNN" is the issue number. + This section includes a summary of known issues against 4.0.0 that were fixed in 4.1.0. Approximately 470 bugs were resolved or closed in the 4.1.0 cycle. + - - - - - Field - Value - - - - - Name - systemvm-vmware-3.0.0 - - - Description - systemvm-vmware-3.0.0 - - - URL - http://download.cloud.com/templates/burbank/burbank-systemvm-08012012.ova - - - Zone - Choose the zone where this hypervisor is used - - - Hypervisor - VMware - - - Format - OVA - - - OS Type - Debian GNU/Linux 5.0 (32-bit) - - - Extractable - no - - - Password Enabled - no - - - Public - no - - - Featured - no - - + + + + + + Defect + + + Description + + + + + + + CLOUDSTACK-46 + + + Remnants of mycloud remain. + + + + + CLOUDSTACK-70 + + + Improve Network Restart Behaviour for Basic Zone: Restarting Network Fail + + + + + CLOUDSTACK-94 + + + "API command, listIsos documentation clarity + + + + + CLOUDSTACK-95 + + + IP address allocation not working when a user tries to allocate IP addresses in a Project + + + + + CLOUDSTACK-97 + + + Vmware network labels are ignored when creating a Zone using basic networkin + + + + + CLOUDSTACK-108 + + + VM should not be allowed to be deployed on two Isolated Networks of an Account that were created from DefaultNetworkOfferingwithSourceNATService + + + + + CLOUDSTACK-118 + + + "Status of host resorce stuck in ""ErrorInMaintenance"" + + + + + CLOUDSTACK-119 + + + Move Agent-Simulator in to the hypervisor plugin mode + + + + + CLOUDSTACK-130 + + + Clarify docs on tags parameter in API referenc + + + + + CLOUDSTACK-152 + + + Routes on the User VM are programmed incorrectly on a VM present on both Isolated and Shared Guest Network + + + + + CLOUDSTACK-178 + + + Expose name parameter of VM in list Vm view + + + + + CLOUDSTACK-198 + + + vpn:failto add VPN Users deletes all the existing Vpn use + + + + + CLOUDSTACK-222 + + + Admin UI prompts to restart Management server with cancel edit operatio + + + + + CLOUDSTACK-225 + + + API Docs: Request params repeated with different description + + + + + CLOUDSTACK-226 + + + UpdatePhysicalNetworkcommand failed due to java.sql.BatchUpdateException ; Tried to extend the existing Guest VLAN Range of one physical network into the Guest VLAN range of the other physical networ + + + + + CLOUDSTACK-227 + + + ReconnectHostCmd: NullPointerException: Unable to get host Information for XenServer 6.0.2 host - on intentionally changing the traffic labels on the physical networ + + + + + CLOUDSTACK-228 + + + UI provides an option to reconnect a disconnected host - ServerApiException is thrown on an attemp + + + + + CLOUDSTACK-232 + + + Zone infrastructure chart -- disable resource total displa + + + + + CLOUDSTACK-235 + + + Network rate can be set in 2 places. Clarify docs on how this works + + + + + CLOUDSTACK-249 + + + Add host id to failed VM deploy alert + + + + + CLOUDSTACK-250 + + + Incorrect description of maintenance mode in admin guid + + + + + CLOUDSTACK-256 + + + "vpn:As an admin user, not able to delete VPN user which is present in a regular user's network. + + + + + CLOUDSTACK-271 + + + updatePhysicalNetwork dies with an NPE when the vlan range is empt + + + + + CLOUDSTACK-274 + + + Two error codes mapped to same value in AP + + + + + CLOUDSTACK-275 + + + hostid not always a UUI + + + + + CLOUDSTACK-277 + + + Message during CloudStack management server Installation: cannot access /usr/share/cloud/bridge/lib: No such file or director + + + + + CLOUDSTACK-279 + + + deleteProject fails when executed by the regular user (works fine for root/domain admin + + + + + CLOUDSTACK-284 + + + listVirtualMachines does not return deleted machines when zone is specifie + + + + + CLOUDSTACK-290 + + + 3.0.0 template also needed for 2.2.14 to 3.0.5 direct upgrade + + + + + CLOUDSTACK-293 + + + "We do awful, hacky things in our spec file for client + + + + + CLOUDSTACK-304 + + + Add synchronization for createSnapshot command per host basi + + + + + CLOUDSTACK-309 + + + iptables rules being deleted from wrong VM after a migratio + + + + + CLOUDSTACK-318 + + + Adding XenServer Host Fails - 6.0.2 fails with 4.0. + + + + + CLOUDSTACK-320 + + + "sessionKey query parameter should be case-insensitive, now only sessionkey is accepted + + + + + CLOUDSTACK-322 + + + During upgrade displays error - a foreign key constraint fails (`cloud/#sql-f34_6e`.. + + + + + CLOUDSTACK-332 + + + """count"" property in list* API response should be equal to how many entries in database, not how many objects in API response + + + + + CLOUDSTACK-333 + + + When Datacenter name in VCenter has spaces Primary Storage (VMFS) discovery will fai + + + + + CLOUDSTACK-335 + + + KVM VPC load balancer not workin + + + + + CLOUDSTACK-336 + + + listZones doesn't honour pagin + + + + + CLOUDSTACK-343 + + + "Document what tools and packages are required to build, package and install CloudStack 4.0 + + + + + CLOUDSTACK-346 + + + Cannot add Vmware cluster with class loader conflict exceptio + + + + + CLOUDSTACK-347 + + + listNetworks API: return vlan information only when the caller is ROOT admi + + + + + CLOUDSTACK-348 + + + deleteNetwork does not clean up network resource count correctl + + + + + CLOUDSTACK-354 + + + Display of storage statistics is wrong + + + + + CLOUDSTACK-355 + + + "Fix ""count"" in a bunch of API commands + + + + + CLOUDSTACK-357 + + + "ISOs can be deleted while still attached to a running VM, and they subsequently cannot be detached from a running VM + + + + + CLOUDSTACK-359 + + + PropagateResourceEventCommand failes in cluster configuratio + + + + + CLOUDSTACK-361 + + + Wrong creation of guest networks on a KVM host in Multiple Physical Networks with guest traffi + + + + + CLOUDSTACK-364 + + + Docs point to download.cloud.com for AWS API scrip + + + + + CLOUDSTACK-368 + + + OVM - cannot create guest V + + + + + CLOUDSTACK-369 + + + ASF 4.0 - unable to support XenServer 6.1 hos + + + + + CLOUDSTACK-373 + + + "static NAT and Firewall is not working on external firewall device SRX, it needs to be implemented + + + + + CLOUDSTACK-377 + + + provide deployment config access to marvin's testcas + + + + + CLOUDSTACK-378 + + + mavenize marvin on maste + + + + + CLOUDSTACK-390 + + + Install Guide: Section 4.5.7 (Prepare the System VM Template): Links go to cloud.co + + + + + CLOUDSTACK-397 + + + Install Guide: Section 11.1 (Guest Traffic): Diagram is the wrong diagra + + + + + CLOUDSTACK-398 + + + Install Guide: Section 11.17.3 (Using VPN with Mac OSX): Not complete + + + + + CLOUDSTACK-404 + + + Update docs on the usage of cloud-setup-database + + + + + CLOUDSTACK-412 + + + Data truncation: Out of range value for column 'ram' at row + + + + + CLOUDSTACK-415 + + + restartNetwork call causes VM to be unreachable when Nicira based SDN is used + + + + + CLOUDSTACK-416 + + + XCP 1.6beta2 (61002c) - can't add a hos + + + + + CLOUDSTACK-417 + + + Handle password server securely to run on port 8080 on V + + + + + CLOUDSTACK-424 + + + Updated userdata not propagating to the VR + + + + + CLOUDSTACK-427 + + + Change hardcoded step number references to dynamic link + + + + + CLOUDSTACK-428 + + + Storage capacity shown in UI is incorrec + + + + + CLOUDSTACK-435 + + + Vmware network labels are ignored when creating a Zone using basic networkin + + + + + CLOUDSTACK-441 + + + Running mgmt server using jetty fails to start api serve + + + + + CLOUDSTACK-446 + + + "Host going to alert state, if you are adding already added host + + + + + CLOUDSTACK-448 + + + SSVM bootstrap failure on XenServer hosts with E3 CP + + + + + CLOUDSTACK-456 + + + License tag in SPEC isn't what RPM is expectin + + + + + CLOUDSTACK-459 + + + [Optional Public IP assignment for EIP with Basic Zone] Associate IP Checkbox in Create Network Offering Dialog is Displayed When Elastic LB is Selecte + + + + + CLOUDSTACK-462 + + + A few corrections to make to the 4.0.0 installation guid + + + + + CLOUDSTACK-464 + + + "Regression in AWSAPI docs, entire sections removed + + + + + CLOUDSTACK-465 + + + French language file quotes are dropping javascript syntax error + + + + + CLOUDSTACK-467 + + + Developer's Guide points to cloud.com for API referenc + + + + + CLOUDSTACK-479 + + + UpdateVirtualMachine api fails to propagate userdata to dom + + + + + CLOUDSTACK-481 + + + Installation Guide Doc Erro + + + + + CLOUDSTACK-493 + + + 2.2.x-3.0 DB upgrade support for Advance SG enabled network + + + + + CLOUDSTACK-499 + + + cloudmonkey CLI can't accept complex parameter + + + + + CLOUDSTACK-500 + + + Passwd-server iptables rules are dropped on domr on fresh start or on reboot. + + + + + CLOUDSTACK-501 + + + Apidocs and marvin does not know how to handle Autoscaling docs. + + + + + CLOUDSTACK-504 + + + Duplicate guest password scripts in codebase. + + + + + CLOUDSTACK-507 + + + fix api docs for listSSHKeyPair + + + + + CLOUDSTACK-508 + + + CLVM copies template to primary storage unnecessarily. + + + + + CLOUDSTACK-510 + + + Add button not visible when adding public IPs to physical network. + + + + + CLOUDSTACK-514 + + + Marvin and Cloudmonkey don't work when an API target uses https or an alternate path. + + + + + CLOUDSTACK-518 + + + API refactoring -- change @Parameter annotation and remove the @IdentityMapper annotation. + + + + + CLOUDSTACK-520 + + + Dependency jar names mismatch with install-non-oss.s + + + + + CLOUDSTACK-521 + + + Build will hung up when doing test for TestAgentShel + + + + + CLOUDSTACK-522 + + + Log requests in cloudmonkey's log file. + + + + + CLOUDSTACK-527 + + + List API performance optimization by using DB views and removing UUID conversion + + + + + CLOUDSTACK-534 + + + Failed to add hos + + + + + CLOUDSTACK-536 + + + remove citrix cloudpatform from 4.0 build - CloudStack is ASF project. + + + + + CLOUDSTACK-539 + + + Cropped Text in UI under Quick View. + + + + + CLOUDSTACK-552 + + + ]Quick view details for a volume displays scroll bar in place of name of the volume when the name of the volume has more no of characters. + + + + + CLOUDSTACK-553 + + + "SRX - When adding SRX device make "Public Network" - default to "untrusted" and "Private Network" - default to "trusted" as un-editable fields. + + + + + CLOUDSTACK-556 + + + Erratic window behavior in Quick View tooltip. + + + + + CLOUDSTACK-559 + + + source code import problem + + + + + CLOUDSTACK-560 + + + Usage server doesn't work in 4.0.0 due to missing db changes + + + + + CLOUDSTACK-572 + + + SG Enabled Advanced Zone - Not able to deploy a VM in an account specific shared network + + + + + CLOUDSTACK-573 + + + "NPE at ""com.cloud.network.NetworkManagerImpl.networkOfferingIsConfiguredForExternalNetworking(NetworkManagerImpl.java:4345)"" when create network from the network offering having NULL provider for the service + + + + + CLOUDSTACK-578 + + + The already deleted same hostname is not deleted from /etc/hosts of vRouter + + + + + CLOUDSTACK-584 + + + "typos in ""Apache_CloudStack-4.0.0-incubating-CloudStack_Nicira_NVP_Guide-en-US"" + + + + + CLOUDSTACK-590 + + + Incorrect Network Gateways Assigned to System VM + + + + + CLOUDSTACK-592 + + + "API bloat, unknown apis cmd classes + + + + + CLOUDSTACK-593 + + + "2 guest network, auto create vlan error + + + + + CLOUDSTACK-596 + + + DeployVM command takes a lot of time to return job id. + + + + + CLOUDSTACK-599 + + + DhcpEntryCommand fails on Router VM on CS4.0 and vSphere5 with Advanced Network Zone. + + + + + CLOUDSTACK-600 + + + When rebooting KVM local storage VM host, libvirt definitions deleted + + + + + CLOUDSTACK-605 + + + Host physical CPU is incorrectly calculated for Vmware host + + + + + CLOUDSTACK-606 + + + Starting VM fails with 'ConcurrentOperationException' in a clustered MS scenari + + + + + CLOUDSTACK-614 + + + "ListTemplates API is not returning ""Enable SSH Key"" attribute for any given template + + + + + CLOUDSTACK-617 + + + Unable to edit a Sub domai + + + + + CLOUDSTACK-639 + + + API Refactoring: Adapters for AC + + + + + CLOUDSTACK-648 + + + The normal users could change their own login password. + + + + + CLOUDSTACK-660 + + + Network Traffic Labels are not functional in Marvin + + + + + CLOUDSTACK-683 + + + Image Is Missing in the Accessing VM Section + + + + + CLOUDSTACK-689 + + + RVR: Stop pending flag is not cleared when user start the disconnected router from another hos + + + + + CLOUDSTACK-691 + + + A warning dialog box shows after reloading the welcome page. + + + + + CLOUDSTACK-693 + + + Adding a VPC virtual router to a NiciraNVP enabled network fails. + + + + + CLOUDSTACK-694 + + + "Create a new VPC network offering with "connectivity" option needed for SDN networking) is not allowed / VPC support for SDN networks + + + + + CLOUDSTACK-717 + + + cloudmonkey fails to parse/print response. + + + + + CLOUDSTACK-720 + + + Fail to load a png image when accessing the web console. + + + + + CLOUDSTACK-721 + + + Bytes sent/received in user statistics is empty (CloudStack 4.0) + + + + + CLOUDSTACK-725 + + + UI: Error when the Egress rules tab is selected for a network. + + + + + CLOUDSTACK-734 + + + api_refactoring: CreateAccountCmd fails to send response due to NPE in service layer + + + + + CLOUDSTACK-735 + + + Integration smoke tests: Fix expunge vm test on api_refactoring + + + + + CLOUDSTACK-736 + + + Integration smoke tests: Fix check for vm name for the deployvm smoke test. + + + + + CLOUDSTACK-793 + + + "Create cloudmonkey-helper, a plugin that helps autodiscover and sync api info via an api over some endpoint + + + + + CLOUDSTACK-798 + + + Move usage related cmd classes from cloud-server to cloud-api + + + + + CLOUDSTACK-799 + + + [Load Test] Check router statistics falls behind in gathering stats by more than 2 times the set value + + + + + CLOUDSTACK-819 + + + Create Account/User API logging password in access log + + + + + CLOUDSTACK-863 + + + Non-printable characters (ASCII control character) such as %00 or %0025 are getting stored in raw/non encoded form in the database + + + + + CLOUDSTACK-870 + + + Client UI: Wrong character encoding for some language + + + + + CLOUDSTACK-928 + + + [Simulator] Latency for Agent Commands - change unit of wait from seconds to millisecond + + + + + CLOUDSTACK-938 + + + s2s VPN trouble + + + + + CLOUDSTACK-959 + + + Missing sub-sections in document section System Service Offering + + + + + CLOUDSTACK-968 + + + marvin: vlan should be an attribute of the physical_network and not the zon + + + + + CLOUDSTACK-977 + + + Document how to use openvswitch with KVM hypervisor + + + + + CLOUDSTACK-978 + + + TypeError: instance.displayname is undefined while adding VM's to the LB rule + + + + + CLOUDSTACK-985 + + + Different MAC address for RvR caused issue in short term network outrag + + + + + CLOUDSTACK-987 + + + Sections missing in Working With Snapshot + + + + + CLOUDSTACK-993 + + + "admin"" user is not getting created when management server is started. + + + + + CLOUDSTACK-995 + + + Not able to add the KVM host + + + + + CLOUDSTACK-1002 + + + Not able to start VM + + + + + CLOUDSTACK-1006 + + + need to disable service libvirt-guests in CentOS packaging RPMs, or in installation docs + + + + + CLOUDSTACK-1008 + + + "Egress"" tab should not be presented in the UI for Shared Networks + + + + + CLOUDSTACK-1010 + + + Host count and Secondary storage count always shows 1 in UI + + + + + CLOUDSTACK-1011 + + + KVM host getting disconnected in cluster environment + + + + + CLOUDSTACK-1013 + + + running cloudstack overwrites default public/private ssh key + + + + + CLOUDSTACK-1014 + + + Merge ManagementServer and ManagementServerEx + + + + + CLOUDSTACK-1016 + + + Not able to deploy VM + + + + + CLOUDSTACK-1021 + + + the vlan is not creat to right nic. when i creat multi guest network + + + + + CLOUDSTACK-1024 + + + Regression: Unable to add Xenserver host with latest build. + + + + + CLOUDSTACK-1027 + + + "Update SSL certificate" button should properly reflect its functionality + + + + + CLOUDSTACK-1029 + + + Enter the token to specified project is malfunctioned + + + + + CLOUDSTACK-1037 + + + "Make cloudmonkey awesome-er: Online help docs and api discovery, better colored output, parameter value autocompletion + + + + + CLOUDSTACK-1050 + + + No Documentation on Adding a Load Balancer Rule + + + + + CLOUDSTACK-1051 + + + API dispatcher unable to find objectVO corresponding to DeleteTemplatecm + + + + + CLOUDSTACK-1055 + + + "The overlay still exists when the ""Recurring Snapshots"" dialog is canceled by pressing esc key. + + + + + CLOUDSTACK-1056 + + + S3 secondary storage fails to upload systemvm template due to KVMHA director + + + + + CLOUDSTACK-1057 + + + regression of changeServiceForVirtualMachine API - fails to find service offering by serviceOfferingId parameter + + + + + CLOUDSTACK-1063 + + + "SG Enabled Advanced Zone - "Add Guest Networks" - When user tries to add a guest Network with scope as "Account" he should NOT be presented with ""Offering for shared security group enabled"" + + + + + CLOUDSTACK-1064 + + + A type error occurs when trying to add account/register template... + + + + + CLOUDSTACK-1068 + + + Names in VR list is useles + + + + + CLOUDSTACK-1070 + + + javelin: NPE on executing registerIso AP + + + + + CLOUDSTACK-1071 + + + Netscaler element is not getting loaded as part of LoadBalancing Service Providers + + + + + CLOUDSTACK-1078 + + + Not able to start System Vms on Rhel 6.3 KVM hos + + + + + CLOUDSTACK-1079 + + + Deploying AWSAPI with mvn -pl :cloud-awsapi jetty:run fail + + + + + CLOUDSTACK-1082 + + + UI doesn't throw any error message when trying to delete ip range from a network that is in use. + + + + + CLOUDSTACK-1083 + + + listUsageRecords api: removed project results in NP + + + + + CLOUDSTACK-1087 + + + Update the Developer Guide for ASFCS 4.1 Releas + + + + + CLOUDSTACK-1088 + + + EnableStaticNat error will clear the data in databas + + + + + CLOUDSTACK-1094 + + + Ipv6 - hostname/hostname --fqdn does not return the name of the VM. But i am able to reach the Vm using their names + + + + + CLOUDSTACK-1095 + + + Ipv6 - dhclient command needs to be run manually on the Vms to get the Ipv6 address + + + + + CLOUDSTACK-1100 + + + Expunge thread is not kicked off based on global configuration if the global setting is less than 60 second + + + + + CLOUDSTACK-1103 + + + "IpV6 - listNetwork() command does not retrun gateway,netmask,cidr + + + + + CLOUDSTACK-1104 + + + Ipv6 - listVlanIpRanges() returns error 530 + + + + + CLOUDSTACK-1105 + + + "IpV6 - listVirtualMachines() does not return netmask, gateway,ipaddress. + + + + + CLOUDSTACK-1107 + + + Ipv6 - Unable to extend Ip range for a Ipv6 network using craeteVlanIpRange() command - Error code 530 returned + + + + + CLOUDSTACK-1108 + + + Ipv6 - Not able to restart Networks + + + + + CLOUDSTACK-1109 + + + "Ipv6 - Unable to expunge User Vms that are ""Destroyed"". + + + + + CLOUDSTACK-1111 + + + Ipv6 - listRouters() does not return guestipaddress + + + + + CLOUDSTACK-1112 + + + "Errors in ""Prepare the System VM Template"" + + + + + CLOUDSTACK-1113 + + + "Ipv6 - Not able to deploy a new VM in this network because of ""Unable to allocate Unique Ipv6 address"" + + + + + CLOUDSTACK-1114 + + + unable to execute listegressfirewallrules API due invalid value i + + + + + CLOUDSTACK-1115 + + + In multiple shared network unable to login with default nic - KV + + + + + CLOUDSTACK-1123 + + + ListStoragePools API broken by refacto + + + + + CLOUDSTACK-1138 + + + "Providing invalid values for gateway, netmask etc in the zoneWizard blocks the VLAN container to load, throwing an error + + + + + CLOUDSTACK-1139 + + + "After the Vm is "Expunged" we see the entry still being present in the router in /etc/dhcphosts.txt + + + + + CLOUDSTACK-1141 + + + "Ipv6 - After network restart (and reboot router), we do not see the existing vms dnsentries not being programmed in the router. + + + + + CLOUDSTACK-1152 + + + Missing tag in host-add.xm + + + + + CLOUDSTACK-1153 + + + "Ipv6 - Vm deployment fails with "n must be positive" error. + + + + + CLOUDSTACK-1154 + + + Account/Users related API failed due to RegionService inject exception. + + + + + CLOUDSTACK-1157 + + + No API Documentation on Listing Custom User Templates Using CS4 API + + + + + CLOUDSTACK-1160 + + + References to version=3.0.3|4|5|6 in API classes needs to be removed. + + + + + CLOUDSTACK-1161 + + + Differences between 4.1 and master in ongoing-config-of-external-firewalls-lb.xml + + + + + CLOUDSTACK-1163 + + + Failed with NPE while creating firewall rule + + + + + CLOUDSTACK-1168 + + + Create firewall rule broke + + + + + CLOUDSTACK-1173 + + + ConsoleProxyResource instantiation exception. + + + + + CLOUDSTACK-1174 + + + Snapshots related SQL error. + + + + + CLOUDSTACK-1176 + + + Issue with snapshots(create/list + + + + + CLOUDSTACK-1181 + + + mvn deploy db failing with NP + + + + + CLOUDSTACK-1190 + + + Make APIChecker interface throw a single sensible exception. + + + + + CLOUDSTACK-1200 + + + "Unknown column 'vm_instance.disk_offering_id' in table vm_instance, db exception shown in MS log + + + + + CLOUDSTACK-1201 + + + "Failed to create ssh key for user "cloud" /var/lib/cloud/management/.ssh/id_rsa and failed to start management server + + + + + CLOUDSTACK-1202 + + + Fail to install KVM cloud-agent. + + + + + CLOUDSTACK-1203 + + + Fail to create advance zone with SG enabled when UI allows SG enabled option. + + + + + CLOUDSTACK-1204 + + + Fail to create advance zone due to fail to add host + + + + + CLOUDSTACK-1205 + + + Ipv6 - Ubuntu 12.10 guest Vms loses default route (after it expiration time ~ 30 mts) when ipv6.autoconfig parameters are disabled except for net.ipv6.conf.lo.autoconf which is enabled. + + + + + CLOUDSTACK-1206 + + + Failure in Copy of System template + + + + + CLOUDSTACK-1210 + + + Make all pluggable services return list of api cmd classes + + + + + CLOUDSTACK-1216 + + + UUID is null for admin and failed to register user key with 4.0 + + + + + CLOUDSTACK-1218 + + + "IPv6: Shared Network - After network restart with clean option, router is assigned a different address. Name resolution for the existing guest Vms in the network fails. + + + + + CLOUDSTACK-1219 + + + Ipv6 - Provide better error messages when deploying a Vm with Ip an address that is outside the network's ip range / if the ip address already is assigned to another Vm + + + + + CLOUDSTACK-1220 + + + Ipv6 - Better error message when deploy Vm fails to get a free Ip address + + + + + CLOUDSTACK-1222 + + + API rate limit configs: removed double quote in upgrade script + + + + + CLOUDSTACK-1223 + + + Exception while starting jetty server: org.springframework.beans.factory.BeanCreationException Error creating bean with name 'apiServer' + + + + + CLOUDSTACK-1224 + + + Volume snapshot creation failing + + + + + CLOUDSTACK-1226 + + + Error while running Cloudstack-setup-database + + + + + CLOUDSTACK-1228 + + + Unable to Create System Vm's in the VMware Hypervisor setup + + + + + CLOUDSTACK-1229 + + + Incorrect SQL syntax to insert api limit related configuration items in upgrade path script. + + + + + CLOUDSTACK-1231 + + + cloud-install-sys-tmplt failed due to missing path + + + + + CLOUDSTACK-1232 + + + "Ipv6 - Guest Vms are not able to get Ipaddress when executing dhclient command when using ""/96"" network. + + + + + CLOUDSTACK-1233 + + + Veewee configuration files are inappropriately identified as ASLv2 licensed file + + + + + CLOUDSTACK-1234 + + + Unable to start KVM agent with 4.1 build. + + + + + CLOUDSTACK-1237 + + + "Register Template fails with ""Cannot find template adapter for XenServer"" + + + + + CLOUDSTACK-1239 + + + Unable to registerISO :unhandled exception executing api command: registerIs + + + + + CLOUDSTACK-1240 + + + Unable to registerTemplate : Cannot find template adapter for XenServer. + + + + + CLOUDSTACK-1241 + + + Network apply rules logic is broken. + + + + + CLOUDSTACK-1242 + + + [F5-SRX-InlineMode] Failed to create LB rule with F5-SRX inlinemode deployemen + + + + + CLOUDSTACK-1243 + + + Failed to cleanup account :java.lang.NullPointerException + + + + + CLOUDSTACK-1244 + + + fail to push sysmvm.iso onto xen host + + + + + CLOUDSTACK-1246 + + + "[ ALU beta CS 4.1 build2] ""Guest network"" missing in Add Zone wizard ( step 3, Setup Network \ Physical Network) + + + + + CLOUDSTACK-1251 + + + Baremetal zone doesn't need primary/secondary storage in UI wizard. + + + + + CLOUDSTACK-1252 + + + Failed to download default template in VMware. + + + + + CLOUDSTACK-1260 + + + Failed to register template: Unable to find template adapter + + + + + CLOUDSTACK-1261 + + + Cannot find template adapter for XenServer. + + + + + CLOUDSTACK-1262 + + + "Failed to Prepare Secondary Storage in VMware, + + + + + CLOUDSTACK-1265 + + + logrotate dnsmasq configuration is wrong + + + + + CLOUDSTACK-1267 + + + KVM's cloudstack-agent service doesn't log (log4j) + + + + + CLOUDSTACK-1269 + + + Failed to start CPVM java.lang.NullPointerException Unable to start SSVM + + + + + CLOUDSTACK-1272 + + + Autoscale: createAutoScaleVmProfile fails due to unable to retrieve Service Offering ip + + + + + CLOUDSTACK-1274 + + + UpdateNetworkCmd throws NP + + + + + CLOUDSTACK-1276 + + + Remove autoscanning for 4.1 + + + + + CLOUDSTACK-1277 + + + ApiResponseHelper.createUserVmResponse failed to populate password field set from UserVm object + + + + + CLOUDSTACK-1278 + + + Improper permissions on injectkeys.s + + + + + CLOUDSTACK-1288 + + + [F5-SRX-InlineMode] classCastException during network restart with cleanup option true + + + + + CLOUDSTACK-1289 + + + [F5-SRX-InlineMode] Usage stats are not generated for Juniper SRX Firewall in inlinemod + + + + + CLOUDSTACK-1290 + + + listNetoworks API takes too long to respond + + + + + CLOUDSTACK-1292 + + + "[F5-SRX-InlineMode] Update network from SRX,F5 as service provideds to VR as service provider does not delete firewall rules from SRX + + + + + CLOUDSTACK-1295 + + + NPE in usage parsers due to missing @Component inject + + + + + CLOUDSTACK-1299 + + + Errors in 4.5.5 section of installation guide + + + + + CLOUDSTACK-1300 + + + section in wrong order in installation guide + + + + + CLOUDSTACK-1303 + + + Ipv6 - java.lang.NullPointerException when executing listnetworks() and deployVirtualMachine() after extending the Ipv4 range of a dual stack network + + + + + CLOUDSTACK-1307 + + + Noticed NPE when we put host in maintenance mode in clustered management setup + + + + + CLOUDSTACK-1310 + + + ASF-build-master-nonoss-rhel63 - create advance zone FAIL - CreatePhysicalNetworkCmd FAIL - MySQLIntegrityConstraintViolationException: Duplicate entry '200-Public' for key 'physical_network_id + + + + + CLOUDSTACK-1312 + + + "Fix rolling upgrades from 4.0 to 4.1 in 4.1 release, fix db schemas to be same as 4.0 + + + + + CLOUDSTACK-1313 + + + Working with Volumes Section Is Missing + + + + + CLOUDSTACK-1315 + + + [F5-SRX-InlineMode] Network implement failed with Run time Exception during network upgrade from VR to SRX-F + + + + + CLOUDSTACK-1319 + + + createCustomerVpnGateway response gives TypeError: json.createvpncustomergatewayresponse is undefined + + + + + CLOUDSTACK-1320 + + + Routers naming convention is changed to hostname. + + + + + CLOUDSTACK-1321 + + + [Site-to-Site VPN] No events are generated in case of status change in site to site vpn connection + + + + + CLOUDSTACK-1326 + + + KVM - Failed to start cloud agent from SSVM + + + + + CLOUDSTACK-1328 + + + console view unable to connect - CPVM SSVM guest VM + + + + + CLOUDSTACK-1329 + + + "API listRouters response returns hostname instead of Virtual Routers, UI displays host entry for each VR + + + + + CLOUDSTACK-1330 + + + ec2-run-instances - When -n option is used to deploy multiple Vms API returns error even though few of the Vms have been deployed successfully + + + + + CLOUDSTACK-1331 + + + Upgrade fails for a 2.2.14 Zone having multiple guest networks using network_tags and Public Vlan + + + + + CLOUDSTACK-1332 + + + IPV6 - Router and guest Vms should be able to use an IPV6 address for external DNS entry + + + + + CLOUDSTACK-1334 + + + vmware.root.disk.controller doesn't work + + + + + CLOUDSTACK-1337 + + + Zone to zone template/ISO copy fails and template/ISO download also fail + + + + + CLOUDSTACK-1338 + + + Deploy VM failed using IS + + + + + CLOUDSTACK-1339 + + + ASF 4.1: Management server becomes unresponsive + + + + + CLOUDSTACK-1341 + + + URL for the KEYs file is wrong in the installation guide + + + + + CLOUDSTACK-1342 + + + Document installation and usage of cloudmonkey for 4.1 docs + + + + + CLOUDSTACK-1343 + + + Porting Baremetal related UI changes to ACS + + + + + CLOUDSTACK-1344 + + + Typo in use.external.dns setting description + + + + + CLOUDSTACK-1345 + + + BigSwitch plugin introduces 'VNS' isolation in UI without backend implementation + + + + + CLOUDSTACK-1346 + + + "Check to see if external devices are used in the network, is hardcoded for specific devices + + + + + CLOUDSTACK-1347 + + + "Not able to delete network. Error - ""Unable to insert queue item into database, DB is full?"" + + + + + CLOUDSTACK-1348 + + + API/UI: zoneObj is undefined. + + + + + CLOUDSTACK-1349 + + + "VPC network Adding Network ACls, PF rules - Unable to insert queue item into database, DB is full? PF rules and NW Acls in Add state in DB + + + + + CLOUDSTACK-1350 + + + Management server Stop and start causes previously downloaded ISOs and templates to redownload & reinstall. + + + + + CLOUDSTACK-1353 + + + KVM 6.3 snapshot Scheduling snapshot failed due to java.lang.NullPointerExceptio + + + + + CLOUDSTACK-1357 + + + "Autoscale: Provisioned VMs from Netscaler not being added to lb vserver, provserver fails with provserver_err_asynctaskpoll + + + + + CLOUDSTACK-1360 + + + The clusterid field of the createStoragePool API command should be documented as required. + + + + + CLOUDSTACK-1367 + + + NPE noticed in logs while AgentMonitor is monitoring the host ping interval + + + + + CLOUDSTACK-1368 + + + Shared network - Not able to delete network because of java.lang.NullPointerException + + + + + CLOUDSTACK-1369 + + + "Ipv6 - In dual Stack network, guest VM does not have the Ipv6 address of the router programmed in /etc/resolv.conf for DNS resolution. + + + + + CLOUDSTACK-1370 + + + DeployVM Fail - VPC or non-VPC network + + + + + CLOUDSTACK-1375 + + + deploydb failing with acs master + + + + + CLOUDSTACK-1376 + + + Unable to migrate VM due to internal error process exited while connecting to monitor + + + + + CLOUDSTACK-1377 + + + HA fail - when host is shutdown, VMs and SSVMs are not failover to second host in cluster. + + + + + CLOUDSTACK-1382 + + + vm deploy fails with Error "cannot find DeployPlannerSelector for vm" + + + + + CLOUDSTACK-1383 + + + Deploying basic zone on 4.1 fails in NP + + + + + CLOUDSTACK-1386 + + + BASIC zone SSVM fail to start due to exception + + + + + CLOUDSTACK-1388 + + + UI - ListUsers doesnt display any User except the Default Root Admin User + + + + + CLOUDSTACK-1391 + + + EventBus is not getting injected after javelin merge + + + + + CLOUDSTACK-1394 + + + [F5-SRX-InlineMode] Failure in static nat configuration on SRX does not result in LB configuration error in CS during LB rule configuratio + + + + + CLOUDSTACK-1397 + + + Static Nat configuration is failing with NP + + + + + CLOUDSTACK-1399 + + + Unhandled exception executing api command: stopVirtualMachine + + + + + CLOUDSTACK-1402 + + + listRouters API response doesn't return linklocal IP and public IP detail + + + + + CLOUDSTACK-1403 + + + Storage and console-proxy related error + + + + + CLOUDSTACK-1411 + + + Issues with VMWare Hypervisor host_ids not updated when ESX(i) crashes in instance table + + + + + CLOUDSTACK-1414 + + + Redundant router: BACKUP switch cancelled due to lock timeout after a glitch in network. + + + + + CLOUDSTACK-1417 + + + When invalid values are passed to createNetwork(), error message does not indicate the parameter name that has invalid values. + + + + + CLOUDSTACK-1418 + + + As regular user, we are not allowed to deploy VM on a shared network. + + + + + CLOUDSTACK-1419 + + + Apache-ify and apply trademark logos in the UI + + + + + CLOUDSTACK-1420 + + + Ensure trademarks are properly attributed in publican brand + + + + + CLOUDSTACK-1423 + + + Unable to launch UI [HTTP Status 404]. + + + + + CLOUDSTACK-1425 + + + unhandled exception executing api command: migrateVirtualMachine & recoverVirtualMachine + + + + + CLOUDSTACK-1427 + + + Failed to delete Guestnetwork which has LB with Netscaler + + + + + CLOUDSTACK-1428 + + + [UI] Instance which are created without display name are not visible when added to LB + + + + + CLOUDSTACK-1429 + + + single account is unable to use same vnet across multiple physical network + + + + + CLOUDSTACK-1436 + + + 4.1 management server fails to start from RPM build artifact + + + + + CLOUDSTACK-1443 + + + As domain admin we are allowed to create shared network + + + + + CLOUDSTACK-1446 + + + [UI]VPC Router type should be of type vpc and not syste + + + + + CLOUDSTACK-1447 + + + [UI]Persistent Status is not displayed for VPC Tier + + + + + CLOUDSTACK-1449 + + + listAccounts and listProjectAccounts API lists all the users not account-specific users for each account returne + + + + + CLOUDSTACK-1451 + + + Getting EntityExistsException while creating more than one project in CS 4. + + + + + CLOUDSTACK-1452 + + + Public IP's are assigned to private interface with VPC Restart [PF/LB rules are not functional + + + + + CLOUDSTACK-1461 + + + "Ipv6 - From a Vm that that is part of 2 networks, non default network router's details should not get programmed in the DNS entries of the guest VM. + + + + + CLOUDSTACK-1463 + + + IPV6 - Ubuntu 12.10 - Multiple Nic - IPV6 address is assigned automatically for 1 nic only. Need to do a manual dhclient request to get the ipv6 for other nic + + + + + CLOUDSTACK-1464 + + + "IPV6 - Multi nic - Ubuntu 1210 -When Vm is stopped and started/ rebooted, i get multiple global IPV6 addresses being allocated for one of the nics. + + + + + CLOUDSTACK-1465 + + + List Zones returns null under create instance when logged is as use + + + + + CLOUDSTACK-1467 + + + Failed to create Volume for the System Vm's + + + + + CLOUDSTACK-1469 + + + kvm agent: agent service fails to start u + + + + + CLOUDSTACK-1470 + + + unhandled exception executing api command: deployVirtualMachin + + + + + CLOUDSTACK-1472 + + + AssignVirtualMachine API with wrong Virtual Instance ID failed with NP + + + + + CLOUDSTACK-1473 + + + deleteDomain is failing with NP + + + + + CLOUDSTACK-1481 + + + "IPV6 - When Vm is part of 1 dual network and 1 ipv6 network, name resolution using fqdn fails for the ipv6 network. + + + + + CLOUDSTACK-1482 + + + IPV6 - We are not allowed to create a shared IPV6 network with a VLAN which already is associated with a IPV4 network + + + + + CLOUDSTACK-1484 + + + "API Throttling : api.throttling.enabled, Global setting missing + + + + + CLOUDSTACK-1485 + + + Add Baremetal Provider back to 4.1 branc + + + + + CLOUDSTACK-1487 + + + cloudstack-setup-agent fails to set private.network.device on KVM host ad + + + + + CLOUDSTACK-1488 + + + "Ipv6 - When Vm is deployed as part of multiple networks, one of the IPV6 address assigned to guest VM is lost. + + + + + CLOUDSTACK-1490 + + + 4.1 deb management fails to start due to tomcat dep problem + + + + + CLOUDSTACK-1496 + + + List API Performance: listAccounts failing with OOME for high values of pagesize (>1000 + + + + + CLOUDSTACK-1499 + + + ListAPI Performance for few APIs not as good as it was before API optimizatio + + + + + CLOUDSTACK-1503 + + + listHypervisor API not getting fired when logged in as Use + + + + + CLOUDSTACK-1505 + + + Unknown column 'domain.region_id' in 'field list + + + + + CLOUDSTACK-1509 + + + Failed to implement network elements and resources while provisioning for persistent network(createVlanIpRange to an account + + + + + CLOUDSTACK-1511 + + + [UI] Instances NIC details does not have Network Nam + + + + + CLOUDSTACK-1512 + + + [UI] Wrong message[message.configure.all.traffic.types] when trying to create zone with mulitple physical networks without providing the traffic labe + + + + + CLOUDSTACK-1515 + + + None of the cloudstack packges are marked for upgrade when tried to upgrade from.4.0/4.0.1 to 4. + + + + + CLOUDSTACK-1516 + + + Create documentation in languages that have translations availabl + + + + + CLOUDSTACK-1517 + + + Check UI in languages availabl + + + + + CLOUDSTACK-1521 + + + Redundant router: Services are not stopped when switch to BACKUP stat + + + + + CLOUDSTACK-1526 + + + Template registration fails in the VMware Setup + + + + + CLOUDSTACK-1531 + + + vmware create volume from snapshot will missing dat + + + + + CLOUDSTACK-1537 + + + Restart network with clean up set to true causes Autoscaled LB rule to get mangled and unusabl + + + + + CLOUDSTACK-1541 + + + NPE while deleting snapshot :Unexpected exception while executing org.apache.cloudstack.api.command.user.snapshot.DeleteSnapshotCm + + + + + CLOUDSTACK-1542 + + + unhandled exception while creating projec + + + + + CLOUDSTACK-1544 + + + The description and the response format for the deleteUser command are incorrec + + + + + CLOUDSTACK-1550 + + + createaccountresponse returns more than the user you requested for creation + + + + + CLOUDSTACK-1553 + + + AWS Regions-Not able to list accounts from the 2nd region after user/account/domain details have been manually synced up from first region + + + + + CLOUDSTACK-1555 + + + "AWS Regions - userapikey and usersecretkey parameters are not returned in the response of addRegion, updateRegion listRegion api calls.. + + + + + CLOUDSTACK-1557 + + + EC2 REST API : cloudbridge database is missing on the CloudStack Installatio + + + + + CLOUDSTACK-1562 + + + Replace the short-cut solution of supportting @DB with the formal on + + + + + CLOUDSTACK-1565 + + + "Used Master Branch System VM Template: Default Route on the System VMs (SSVM,CPVM and VR) is missing + + + + + CLOUDSTACK-1566 + + + Baremetal API addBaremetalPxePingServer fail to add PXE PING server to deployment causing create instance with PING style image to fai + + + + + CLOUDSTACK-1569 + + + "AWS Regions - Not able to Edit domain/account/user from a region that is not the owner region.""The content of elements must consist of well-formed character data or markup."" - error message presented to the user. + + + + + CLOUDSTACK-1571 + + + "AWS Regions - When deleting domain/account/user from a region that is not the owner, the request is not being forwarded to the owner region. + + + + + CLOUDSTACK-1574 + + + updateResourceCount API is failed saying to specify valida resource type even after parsing the valid resource typ + + + + + CLOUDSTACK-1583 + + + AWS Regions - RabbitMQ Server did not recieve any event notification during account creation + + + + + CLOUDSTACK-1587 + + + "Basic zone - CPVM fail to go to running state, Exception while trying to start secondary storage vm + + + + + CLOUDSTACK-1588 + + + "AWS Regions - When registerUserKeys() is called for a user from a region that is not the owner, it is handled by this region. + + + + + CLOUDSTACK-1600 + + + Typo in dpkg-buildpackage comman + + + + + CLOUDSTACK-1604 + + + "deploy VM failed when global setting ""vm.allocation.algorithm"" is set to ""userdispersing"" + + + + + CLOUDSTACK-1615 + + + "VMware Cluster discovery fails with if ESXi version is 5.0 Update 1, build 721882 + + + + + CLOUDSTACK-1620 + + + Cannot provision CentOS 6 VMs on XenServer 6. + + + + + CLOUDSTACK-1621 + + + listProjectInvitations fails with NPE for valid request + + + + + CLOUDSTACK-1624 + + + API is not returning response in details:UI is also not returning any outpu + + + + + CLOUDSTACK-1625 + + + NPE with updateResourceCount when && is passed thru AP + + + + + CLOUDSTACK-1630 + + + 4.0.x cloud-aws-api not properly obsoleted + + + + + CLOUDSTACK-1631 + + + 4.1 RPM packaging broke + + + + + CLOUDSTACK-1636 + + + AWS Regions - Remove the concept of having an owner region for domain/account/user objects + + + + + CLOUDSTACK-1642 + + + Add support CentOS 6. + + + + + CLOUDSTACK-1648 + + + Unable to add KVM hos + + + + + CLOUDSTACK-1649 + + + vmware vm os type erro + + + + + CLOUDSTACK-1651 + + + agent scripts still pointing to /var/log/cloud + + + + + CLOUDSTACK-1656 + + + NicResponses in a UserVmResponse are not preseving the natural order + + + + + CLOUDSTACK-1663 + + + AWS Regions - Events - There are no events being generated when a new domain is added/edited + + + + + CLOUDSTACK-1664 + + + Action Events are not logged due to spring change + + + + + CLOUDSTACK-1665 + + + AWS Regions - Events - There are no events being generated when a new user is added/edited/enabled/deleted/password changes/api & secret keys are generated + + + + + CLOUDSTACK-1666 + + + KVM VPC NetworkUsage doesnot wor + + + + + CLOUDSTACK-1668 + + + IP conflict in VPC tie + + + + + CLOUDSTACK-1671 + + + AWS Regions - Events - Domain Delete event does not include the UUID of the domain that was deleted + + + + + CLOUDSTACK-1674 + + + AWS Regions - Events - Account Deletion event does not include the UUID of the account deleted + + + + + CLOUDSTACK-1681 + + + Upgrade instructions mention incorrect name and description of systemvm-vmware template in registering template section + + + + + CLOUDSTACK-1684 + + + "api.throttling.enabled configuration setting should be set to ""false"" in Config.java + + + + + CLOUDSTACK-1688 + + + AWS Regions - Domain admin user is not able to use getUser() command to fetch user details + + + + + CLOUDSTACK-1690 + + + NPE from API server when starting mgmt serve + + + + + CLOUDSTACK-1694 + + + Issues to start/access Management Server after upgrade from 4.0 to 4. + + + + + CLOUDSTACK-1697 + + + Six DB tables are not available with upgraded setup(4.0 to 4.1) when compare to 4.1 newly installatio + + + + + CLOUDSTACK-1706 + + + "Failed to deploy VM with error ""cannot find DeployPlannerSelector"" + + + + + CLOUDSTACK-1709 + + + "AWS Regions - As part of adding a new region, project related entries should not be synced from accounts table. + + + + + CLOUDSTACK-1710 + + + "AWS Regions - As part of adding a new region,default_zone_id column for the account entries should not be synced. + + + + + CLOUDSTACK-1711 + + + AWS Regions - Include all the details of the API call made in the Events payload when changes in Admin/Account/User objects are made. + + + + + CLOUDSTACK-1713 + + + EC2 REST API: AWS API Installation Problem + + + + + CLOUDSTACK-1714 + + + Doc section has wrong title: Setting Zone VLAN and Running VM Maximum + + + + + CLOUDSTACK-1715 + + + "Missing ""host"" config setting in docs on management server load balancing + + + + + CLOUDSTACK-1716 + + + "AWS Regions - listRegions(),removeRegions(),updateRegions() should accept UUID value instead of id. + + + + + CLOUDSTACK-1718 + + + AWS Regions - removeRegion() response returns updateregionresponse + + + + + CLOUDSTACK-1719 + + + EC2 REST API: AWS APIs are not getting translated on the CloudStack Management Serve + + + + + CLOUDSTACK-1720 + + + Have an upgrade path from 4.0.x to 4.1 and 4.0.x to 4.2. + + + + + CLOUDSTACK-1729 + + + Ensure adapter execution order in runtim + + + + + CLOUDSTACK-1733 + + + [ACS41][UI] Add guest network is missing ip range fields and missing network offering + + + + + CLOUDSTACK-1736 + + + Ubuntu 12.04 cloud-setup-management Failed to configure CloudStack Management Serve + + + + + CLOUDSTACK-1738 + + + StatsCollector is not runnin + + + + + CLOUDSTACK-1740 + + + Failed to view consol + + + + + CLOUDSTACK-1746 + + + Cloudstack Usage Server won't star + + + + + CLOUDSTACK-1747 + + + "mvn deploydb only creates 4.0 DB, not 4.1 + + + + + CLOUDSTACK-1750 + + + injectkeys script fails on OSX because cp does not have a -b option (backup of destination file + + + + + CLOUDSTACK-1761 + + + Available local storage disk capacity incorrectly reported in KVM to manager + + + + + CLOUDSTACK-1764 + + + ListTemplateCommand failed with java.lang.NumberFormatException and failed to create default template. + + + + + CLOUDSTACK-1772 + + + the change in vnc listening port will cause live migration doesn't work. + + + + + CLOUDSTACK-1773 + + + Disable baremetal functionality + + + + + CLOUDSTACK-1776 + + + NPE on listSecondaryStorageHostsInAllZones in Upgraded setup from 4.0 to 4.1.0 + + + + + CLOUDSTACK-1785 + + + Redundant Router test cases failing during automation run. + + + + + CLOUDSTACK-1789 + + + Unable to download templates to Primary Storage if a host is in maintenance. + + + + + CLOUDSTACK-1791 + + + Volumes with storage tags can't be attached. + + + + + CLOUDSTACK-1792 + + + "AWS Regions - RuntimeException while executing listAccounts(), when the encryption keys are set to different values between regions. + + + + + CLOUDSTACK-1793 + + + L10n docs don't build in chinese, portuguese and japanese + + + + + CLOUDSTACK-1795 + + + Customize AOP to fully support legacy CloudStack @DB and @ActionEvent semantics. + + + + + CLOUDSTACK-1796 + + + Japanese docs don't build. + + + + + CLOUDSTACK-1802 + + + Upgrade 4.0 -> 4.1 - Not able to start management server becasue of missing /etc/cloudstack/management/tomcat6.conf file + + + + + CLOUDSTACK-1804 + + + Upgrade 4.0 -> 4.1 - DB upgrade fails + + + + + CLOUDSTACK-1805 + + + com.mysql.jdbc.exceptions.jdbc4.CommunicationsException seen after long time of inactivity resulting in not being able to log in to the management server + + + + + CLOUDSTACK-1810 + + + listTemplate API with templatefilter=featured|community is not returning any lists + + + + + CLOUDSTACK-1811 + + + "Upgrade 4.0->4.1 - When upgrade scripts fail, component loading continues and management server starts. + + + + + CLOUDSTACK-1812 + + + create physical network fails while creating basic zon + + + + + CLOUDSTACK-1825 + + + EC2 REST API: AWS APIs fail to execute due to BeanCreationException: Error creating bean with name 'SAclDaoImpl + + + + + CLOUDSTACK-1826 + + + "Storage migration not working, seemingly due to uuid vs id + + + + + CLOUDSTACK-1827 + + + Redundant router - When VR Master was stopped failover to VR Backup did not occur. + + + + + CLOUDSTACK-1834 + + + "Events are not generated for registerUserKeys(), Enabling account and Editing account. + + + + + CLOUDSTACK-1836 + + + License header failures for ja-JP .po translation file + + + + + CLOUDSTACK-1839 + + + Upgrade 4.0 -> 4.1 - Upgraded DB has lot more keys and indexes for many tables compare to the fresh installed 4.1 DB + + + + + CLOUDSTACK-1841 + + + ASF 4.0 to 4.1 Upgrade: Missing Few Global Configuration parameters on the Upgraded Setup. + + + + + CLOUDSTACK-1842 + + + ASF 4.0 to 4.1 Upgrade: Missing Ubuntu 12.04 Guest OS Types on the Upgraded Setup. + + + + + CLOUDSTACK-1844 + + + Upgrade 4.0 -> 4.1 - KVM host agent.properties is not restored as part of upgrading the binaries from 4.0 to 4.1. + + + + + CLOUDSTACK-1845 + + + KVM - storage migration often fail. + + + + + CLOUDSTACK-1846 + + + "KVM - storage pools can silently fail to be unregistered, leading to failure to register later. + + + + + CLOUDSTACK-1848 + + + Cloudstack Packages are not got updated with scenario 4.0 to 4.1 upgrade where MS is on Ubuntu 12.04. + + + + + CLOUDSTACK-1856 + + + Upgrade 4.0 -> 4.1 - Fresh install of 4.1 has 3 parameters missing in db.properties compared to an upgraded 4.0 set up + + + + + CLOUDSTACK-1873 + + + "Installation : JasyptPBEStringDecryptionCLI missing, failed to decrypt db password + + + + + CLOUDSTACK-1874 + + + AWS Regions - Account table in cloud_usage DB has region_id + + + + + CLOUDSTACK-1876 + + + External Devices - network offering for external devices is not returned in API listNetworkOfferings when creating instances. + + + + + CLOUDSTACK-1877 + + + Failed to connect to DB while starting Ubuntu management server after upgrading the packages from 4.0 to 4.1.0 + + + + + CLOUDSTACK-1882 + + + “HTTP Status 404 。 The requested resource () is not available. + + + + + CLOUDSTACK-1890 + + + listProjects is not listing state in the respons + + + + + CLOUDSTACK-1900 + + + "Upgrade 4.0 -> 4.1, We do not have a copy of db.properties that comes from a 4.1 installation saved anywhere. + + + + + CLOUDSTACK-1929 + + + ASF 4.1 cloudstack agent fail to install in KVM host CENTOS 6.3 OS: qemu-kvm-0.12.1.2-3.295.el6.10.x86_64 requires libusbredirparser.so. + + + + + CLOUDSTACK-1934 + + + NPE with listSupportedNetworkServices after upgrade from 4.0 to 4.1 (Ubuntu MS + + + + + CLOUDSTACK-1935 + + + Cloud utilities are not renamed to Cloudstack after upgrade from 4.0 to 4.1 [Ubutnu MS + + + + + CLOUDSTACK-1936 + + + On CentOS, after a upgrade from 4.0.1 to 4.1 on a cloud node (cloud-agent), the new cloustack-agent isn't add as a service (chkconfig) + + + + + CLOUDSTACK-1951 + + + centos packaging: cloud-install-sys-tmplt can't find jasypt jar. + + + + + CLOUDSTACK-1971 + + + VM deployed to incorrect primary storage. + + + + + CLOUDSTACK-1972 + + + VM deployed to incorrect primary storage. + + + + + CLOUDSTACK-1978 + + + openvswitch - unable to start console session for SSVM CPVM user VM + + + + + CLOUDSTACK-1980 + + + "[4.1]cloudstack-setup-bridge, cloudstack-setup-encryption & cloudstack-sysvmadm utilities are not available in Ubuntu 12.04 Management Server. + + + + + CLOUDSTACK-1987 + + + Deleted service offerings owned by a domain show up to domain user. + + + + + CLOUDSTACK-1988 + + + AWS API using SOAP client - User Registeration fails + + + + + CLOUDSTACK-1989 + + + "Query service offering by ID returns no result, but querying all returns service offering + + + + + CLOUDSTACK-2003 + + + Deleting domain while deleted account is cleaning up leaves VMs expunging forever due to 'Failed to update resource count + + + + + CLOUDSTACK-2007 + + + Release Notes failing to build on jenkins.cs. + + + + CS-16135 + Creating volumes after upgrading from snapshot taken in 2.2.14 no longer deletes the snapshot physically from the secondary storage. + + - - - - Watch the screen to be sure that the template downloads successfully and enters - the READY state. Do not proceed until this is successful. - - - - - Stop all Usage Servers if running. Run this on all Usage Server hosts. - # service cloud-usage stop - - - Stop the Management Servers. Run this on all Management Server hosts. - # service cloud-management stop - - - On the MySQL master, take a backup of the MySQL databases. We recommend performing - this step even in test upgrades. If there is an issue, this will assist with - debugging. - In the following commands, it is assumed that you have set the root password on the - database, which is a CloudStack recommended best practice. Substitute your own MySQL - root password. - # mysqldump -u root -pmysql_password cloud > cloud-backup.dmp -# mysqldump -u root -pmysql_password cloud_usage > cloud-usage-backup.dmp - - - Either build RPM/DEB packages as detailed in the Installation Guide, or use one of - the community provided yum/apt repositories to gain access to the &PRODUCT; - binaries. - - - After you have configured an appropriate yum or apt repository, you may execute the - one of the following commands as appropriate for your environment in order to upgrade - &PRODUCT;: # yum update cloud-* - # apt-get update -# apt-get upgrade cloud-* - - You will, of course, have to agree to the changes suggested by Yum or APT. - - If the upgrade output includes a message similar to the following, then some - custom content was found in your old components.xml, and you need to merge the two - files: - warning: /etc/cloud/management/components.xml created as /etc/cloud/management/components.xml.rpmnew - Instructions follow in the next step. - - - - If you have made changes to your copy of - /etc/cloud/management/components.xml the changes will be - preserved in the upgrade. However, you need to do the following steps to place these - changes in a new version of the file which is compatible with version - 4.0.0-incubating. - - - Make a backup copy of /etc/cloud/management/components.xml. - For example: - # mv /etc/cloud/management/components.xml /etc/cloud/management/components.xml-backup - - - Copy /etc/cloud/management/components.xml.rpmnew to create - a new /etc/cloud/management/components.xml: - # cp -ap /etc/cloud/management/components.xml.rpmnew /etc/cloud/management/components.xml - - - Merge your changes from the backup file into the new - components.xml. - # vi /etc/cloud/management/components.xml - - - - If you have more than one management server node, repeat the upgrade steps on each - node. - - - - Start the first Management Server. Do not start any other Management Server nodes - yet. - # service cloud-management start - Wait until the databases are upgraded. Ensure that the database upgrade is complete. - After confirmation, start the other Management Servers one at a time by running the same - command on each node. - - Failing to restart the Management Server indicates a problem in the upgrade. - Having the Management Server restarted without any issues indicates that the upgrade - is successfully completed. - - - - Start all Usage Servers (if they were running on your previous version). Perform - this on each Usage Server host. - # service cloud-usage start - - - - Additional steps are required for each KVM host. These steps will not affect - running guests in the cloud. These steps are required only for clouds using KVM as - hosts and only on the KVM hosts. - - - - Configure a yum or apt respository containing the &PRODUCT; packages as outlined - in the Installation Guide. - - - Stop the running agent. - # service cloud-agent stop - - - Update the agent software with one of the following command sets as appropriate - for your environment. - # yum update cloud-* - # apt-get update - # apt-get upgrade cloud-* - - - Start the agent. - # service cloud-agent start - - - Edit /etc/cloud/agent/agent.properties to change the - resource parameter from - "com.cloud.agent.resource.computing.LibvirtComputingResource" to - "com.cloud.hypervisor.kvm.resource.LibvirtComputingResource". - - - Start the cloud agent and cloud management services. - - - When the Management Server is up and running, log in to the CloudStack UI and - restart the virtual router for proper functioning of all the features. - - - - - Log in to the CloudStack UI as administrator, and check the status of the hosts. All - hosts should come to Up state (except those that you know to be offline). You may need - to wait 20 or 30 minutes, depending on the number of hosts. - - Troubleshooting: If login fails, clear your browser cache and reload the - page. - - - Do not proceed to the next step until the hosts show in Up state. - - - If you are upgrading from 3.0.2, perform the following: - - - Ensure that the admin port is set to 8096 by using the "integration.api.port" - global parameter. - This port is used by the cloud-sysvmadm script at the end of the upgrade - procedure. For information about how to set this parameter, see "Setting Global - Configuration Parameters" in the Installation Guide. - - - Restart the Management Server. - - If you don't want the admin port to remain open, you can set it to null after - the upgrade is done and restart the management server. - - - - - - Run the cloud-sysvmadm script to stop, then start, all Secondary - Storage VMs, Console Proxy VMs, and virtual routers. Run the script once on each - management server. Substitute your own IP address of the MySQL instance, the MySQL user - to connect as, and the password to use for that user. In addition to those parameters, - provide the -c and -r arguments. For - example: - # nohup cloud-sysvmadm -d 192.168.1.5 -u cloud -p password -c -r > - sysvm.log 2>&1 & - # tail -f sysvm.log - This might take up to an hour or more to run, depending on the number of accounts in - the system. - - - If needed, upgrade all Citrix XenServer hypervisor hosts in your cloud to a version - supported by CloudStack 4.0.0-incubating. The supported versions are XenServer 5.6 SP2 - and 6.0.2. Instructions for upgrade can be found in the CloudStack 4.0.0-incubating - Installation Guide. - - - Now apply the XenServer hotfix XS602E003 (and any other needed hotfixes) to - XenServer v6.0.2 hypervisor hosts. - - - Disconnect the XenServer cluster from CloudStack. - In the left navigation bar of the CloudStack UI, select Infrastructure. Under - Clusters, click View All. Select the XenServer cluster and click Actions - - Unmanage. - This may fail if there are hosts not in one of the states Up, Down, - Disconnected, or Alert. You may need to fix that before unmanaging this - cluster. - Wait until the status of the cluster has reached Unmanaged. Use the CloudStack - UI to check on the status. When the cluster is in the unmanaged state, there is no - connection to the hosts in the cluster. - - - To clean up the VLAN, log in to one XenServer host and run: - /opt/xensource/bin/cloud-clean-vlan.sh - - - Now prepare the upgrade by running the following on one XenServer host: - /opt/xensource/bin/cloud-prepare-upgrade.sh - If you see a message like "can't eject CD", log in to the VM and unmount the CD, - then run this script again. - - - Upload the hotfix to the XenServer hosts. Always start with the Xen pool master, - then the slaves. Using your favorite file copy utility (e.g. WinSCP), copy the - hotfixes to the host. Place them in a temporary folder such as /tmp. - On the Xen pool master, upload the hotfix with this command: - xe patch-upload file-name=XS602E003.xsupdate - Make a note of the output from this command, which is a UUID for the hotfix - file. You'll need it in another step later. - - (Optional) If you are applying other hotfixes as well, you can repeat the - commands in this section with the appropriate hotfix number. For example, - XS602E004.xsupdate. - - - - Manually live migrate all VMs on this host to another host. First, get a list of - the VMs on this host: - # xe vm-list - Then use this command to migrate each VM. Replace the example host name and VM - name with your own: - # xe vm-migrate live=true host=host-name - vm=VM-name - - Troubleshooting - If you see a message like "You attempted an operation on a VM which requires - PV drivers to be installed but the drivers were not detected," run: - /opt/xensource/bin/make_migratable.sh - b6cf79c8-02ee-050b-922f-49583d9f1a14. - - - - Apply the hotfix. First, get the UUID of this host: - # xe host-list - Then use the following command to apply the hotfix. Replace the example host - UUID with the current host ID, and replace the hotfix UUID with the output from the - patch-upload command you ran on this machine earlier. You can also get the hotfix - UUID by running xe patch-list. - xe patch-apply host-uuid=host-uuid uuid=hotfix-uuid - - - Copy the following files from the CloudStack Management Server to the - host. - + +
+
+ Known Issues in 4.1.0 + - - - - - Copy from here... - ...to here - - - - - /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py - /opt/xensource/sm/NFSSR.py - - - /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/setupxenserver.sh - /opt/xensource/bin/setupxenserver.sh - - - /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/make_migratable.sh - /opt/xensource/bin/make_migratable.sh - - + + + + + + Issue ID + + + Description + + + + + + CLOUDSTACK-1747 + mvn deploydb only creates 4.0 DB, not 4.1 + Due to tooling changes between 4.1 and 4.2, CloudStack's database is created using the 4.0 schema and updated to the 4.1 schema when the management server starts for the first time. It's OK to see the same schema if the management server has not started yet. + + + + CLOUDSTACK-1824 + Service CloudStack-Management is being displayed as cloud-management service + Many scripts and text entries have references to cloud-management rather than cloudstack-management due to the changeover between 4.0 and 4.1 to rename services. This is a minor issue and should be corrected by 4.2. + + + + + CLOUDSTACK-1824 + Service CloudStack-Management is being displayed as cloud-management service + + + + + CLOUDSTACK-1510 + + + NPE when primary storage is added with wrong path + + + + + CLOUDSTACK-1428 + + + [UI] Instance which are created without display name are not visible when added to LB + + + + + CLOUDSTACK-1306 + + + Better Error message when trying to deploy Vm by passing static Ipv4 addresses that are assigned to another VM/IP4 address is outside the iprange. + + + + + CLOUDSTACK-1236 + + + Warning while adding Xen 6.1 host [Unable to create local link network] + + + + + CLOUDSTACK-969 + + + api: zone response lists vlan in it as "vlan range of zone" but the vlan belongs to physical network + + + + + CLOUDSTACK-963 + + + [cloud.utils.AnnotationHelper] class java.lang.Stringdoes not have a Table annotation + + + + + CLOUDSTACK-458 + + + xen:snapshots:Storage gc fail to clean the failed snapshot images from secondarystorage + + + + + CLOUDSTACK-315 + + + Infrastructure view does not show capacity values + + + + + CLOUDSTACK-300 + + + Creation of compute offering allow combination of local storage + HA + + + + + CLOUDSTACK-282 + + + Virtual Routers do not properly resolve DNS SRV Records + + + + + CLOUDSTACK-276 + + + SSVM ID is exposed in the Error Message thrown by AddTrafficType API + + + + + CLOUDSTACK-270 + + + Ui should not ask for a vlan range if the physical network isolation type is not VLAN + + + + + CLOUDSTACK-245 + + + VPC ACLs are not stored and programmed consistently + + + + + CLOUDSTACK-231 + + + Tag creation using special charecters + + + + + CLOUDSTACK-124 + + + NetworkGarbageCollector not cleaning up networks + + + + + CLOUDSTACK-62 + + + console proxy does not support any keymaps besides us, jp + + + - - - - (Only for hotfixes XS602E005 and XS602E007) You need to apply a new Cloud - Support Pack. - + +
+
+ + Upgrade Instructions + This section contains upgrade instructions from prior versions of CloudStack to Apache CloudStack 4.1.0. We include instructions on upgrading to Apache CloudStack from pre-Apache versions of Citrix CloudStack (last version prior to Apache is 3.0.2) and from the releases made while CloudStack was in the Apache Incubator. + If you run into any issues during upgrades, please feel free to ask questions on users@apache.cloudstack.org or dev@apache.cloudstack.org. +
+ Upgrade from 4.0.x to 4.1.0 + This section will guide you from Apache CloudStack 4.0.x versions to &PRODUCT; 4.1.0. + Any steps that are hypervisor-specific will be called out with a note. + Package Structure Changes + The package structure for &PRODUCT; has changed significantly since the 4.0.x releases. If you've compiled your own packages, you'll notice that the package names and the number of packages has changed. This is not a bug. + However, this does mean that the procedure is not as simple as an apt-get upgrade or yum update, so please follow this section carefully. + + We recommend reading through this section once or twice before beginning your upgrade procedure, and working through it on a test system before working on a production system. + - Download the CSP software onto the XenServer host from one of the following - links: - For hotfix XS602E005: http://coltrane.eng.hq.xensource.com/release/XenServer-6.x/XS-6.0.2/hotfixes/XS602E005/56710/xe-phase-2/xenserver-cloud-supp.tgz - For hotfix XS602E007: http://coltrane.eng.hq.xensource.com/release/XenServer-6.x/XS-6.0.2/hotfixes/XS602E007/57824/xe-phase-2/xenserver-cloud-supp.tgz + Most users of &PRODUCT; manage the installation and upgrades of &PRODUCT; with one of Linux's predominant package systems, RPM or APT. This guide assumes you'll be using RPM and Yum (for Red Hat Enterprise Linux or CentOS), or APT and Debian packages (for Ubuntu). + Create RPM or Debian packages (as appropriate) and a repository from the 4.1.0 source, or check the Apache CloudStack downloads page at http://cloudstack.apache.org/downloads.html for package repositories supplied by community members. You will need them for step or step . + Instructions for creating packages from the &PRODUCT; source are in the Installation Guide. - Extract the file: - # tar xf xenserver-cloud-supp.tgz + For VMware Only + This step is only required if you are using VMware. You can safely skip this step if you are using KVM and/or Xen only. + + In each zone that includes VMware hosts, you need to add a new system VM template. + + + While running the existing 3.0.2 system, log in to the UI as root administrator. + + + In the left navigation bar, click Templates. + + + In Select view, click Templates. + + + Click Register template. + The Register template dialog box is displayed. + + + In the Register template dialog box, specify the following values (do not change these): + + + + + + + Field + Value + + + + + Name + systemvm-vmware-4.1 + + + Description + systemvm-vmware-4.1 + + + URL + http://download.cloud.com/templates/burbank/burbank-systemvm-08012012.ova + + + Zone + Choose the zone where this hypervisor is used + + + Hypervisor + VMware + + + Format + OVA + + + OS Type + Debian GNU/Linux 5.0 (32-bit) + + + Extractable + no + + + Password Enabled + no + + + Public + no + + + Featured + no + + + + + + + Watch the screen to be sure that the template downloads successfully and enters + the READY state. Do not proceed until this is successful. + + - Run the following script: - # xe-install-supplemental-pack xenserver-cloud-supp.iso + Stop your management server or servers. Run this on all management server hosts: + # service cloud-management stop - If the XenServer host is part of a zone that uses basic networking, disable - Open vSwitch (OVS): - # xe-switch-network-backend bridge + If you are running a usage server or usage servers, stop those as well: + # service cloud-usage stop - - - - Reboot this XenServer host. - - - Run the following: - /opt/xensource/bin/setupxenserver.sh - - If the message "mv: cannot stat `/etc/cron.daily/logrotate': No such file or - directory" appears, you can safely ignore it. - - - - Run the following: - for pbd in `xe pbd-list currently-attached=false| grep ^uuid | awk '{print $NF}'`; do xe pbd-plug uuid=$pbd ; - - - On each slave host in the Xen pool, repeat these steps, starting from "manually - live migrate VMs." - - - - - - Troubleshooting Tip - If passwords which you know to be valid appear not to work after upgrade, or other UI - issues are seen, try clearing your browser cache and reloading the UI page. - -
-
- Upgrade from 2.2.14 to 4.0.0-incubating - - - Ensure that you query your IPaddress usage records and process them; for example, - issue invoices for any usage that you have not yet billed users for. - Starting in 3.0.2, the usage record format for IP addresses is the same as the rest - of the usage types. Instead of a single record with the assignment and release dates, - separate records are generated per aggregation period with start and end dates. After - upgrading to 4.0.0-incubating, any existing IP address usage records in the old format - will no longer be available. - - - If you are using version 2.2.0 - 2.2.13, first upgrade to 2.2.14 by using the - instructions in the 2.2.14 Release Notes. - - KVM Hosts - If KVM hypervisor is used in your cloud, be sure you completed the step to insert - a valid username and password into the host_details table on each KVM node as - described in the 2.2.14 Release Notes. This step is critical, as the database will be - encrypted after the upgrade to 4.0.0-incubating. - - - - While running the 2.2.14 system, log in to the UI as root administrator. - - - Using the UI, add a new System VM template for each hypervisor type that is used in - your cloud. In each zone, add a system VM template for each hypervisor used in that - zone - - - In the left navigation bar, click Templates. - - - In Select view, click Templates. - - - Click Register template. - The Register template dialog box is displayed. - - - In the Register template dialog box, specify the following values depending on - the hypervisor type (do not change these): - - - - - - - Hypervisor - Description - - - - - XenServer - Name: systemvm-xenserver-3.0.0 - Description: systemvm-xenserver-3.0.0 - URL: - http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2 - Zone: Choose the zone where this hypervisor is used - Hypervisor: XenServer - Format: VHD - OS Type: Debian GNU/Linux 5.0 (32-bit) - Extractable: no - Password Enabled: no - Public: no - Featured: no - - - - KVM - Name: systemvm-kvm-3.0.0 - Description: systemvm-kvm-3.0.0 - URL: - http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 - Zone: Choose the zone where this hypervisor is used - Hypervisor: KVM - Format: QCOW2 - OS Type: Debian GNU/Linux 5.0 (32-bit) - Extractable: no - Password Enabled: no - Public: no - Featured: no - - - - VMware - Name: systemvm-vmware-3.0.0 - Description: systemvm-vmware-3.0.0 - URL: - http://download.cloud.com/templates/burbank/burbank-systemvm-08012012.ova - Zone: Choose the zone where this hypervisor is used - Hypervisor: VMware - Format: OVA - OS Type: Debian GNU/Linux 5.0 (32-bit) - Extractable: no - Password Enabled: no - Public: no - Featured: no - - - - - - - - - - Watch the screen to be sure that the template downloads successfully and enters the - READY state. Do not proceed until this is successful - - - WARNING: If you use more than one type of - hypervisor in your cloud, be sure you have repeated these steps to download the system - VM template for each hypervisor type. Otherwise, the upgrade will fail. - - - Stop all Usage Servers if running. Run this on all Usage Server hosts. - # service cloud-usage stop - - - Stop the Management Servers. Run this on all Management Server hosts. - # service cloud-management stop - - - On the MySQL master, take a backup of the MySQL databases. We recommend performing - this step even in test upgrades. If there is an issue, this will assist with - debugging. - In the following commands, it is assumed that you have set the root password on the - database, which is a CloudStack recommended best practice. Substitute your own MySQL - root password. - # mysqldump -u root -pmysql_password cloud > cloud-backup.dmp -# mysqldump -u root -pmysql_password cloud_usage > cloud-usage-backup.dmp - - - - Either build RPM/DEB packages as detailed in the Installation Guide, or use one of - the community provided yum/apt repositories to gain access to the &PRODUCT; binaries. - - - - After you have configured an appropriate yum or apt repository, you may execute the - one of the following commands as appropriate for your environment in order to upgrade - &PRODUCT;: # yum update cloud-* - # apt-get update -# apt-get upgrade cloud-* - - You will, of course, have to agree to the changes suggested by Yum or APT. - - - If you have made changes to your existing copy of the file components.xml in your - previous-version CloudStack installation, the changes will be preserved in the upgrade. - However, you need to do the following steps to place these changes in a new version of - the file which is compatible with version 4.0.0-incubating. - - How will you know whether you need to do this? If the upgrade output in the - previous step included a message like the following, then some custom content was - found in your old components.xml, and you need to merge the two files: - - warning: /etc/cloud/management/components.xml created as /etc/cloud/management/components.xml.rpmnew - - - Make a backup copy of your - /etc/cloud/management/components.xml file. For - example: - # mv /etc/cloud/management/components.xml /etc/cloud/management/components.xml-backup - - - Copy /etc/cloud/management/components.xml.rpmnew to create - a new /etc/cloud/management/components.xml: - # cp -ap /etc/cloud/management/components.xml.rpmnew /etc/cloud/management/components.xml - - - Merge your changes from the backup file into the new components.xml file. - # vi /etc/cloud/management/components.xml - - - - - - If you have made changes to your existing copy of the - /etc/cloud/management/db.properties file in your previous-version - CloudStack installation, the changes will be preserved in the upgrade. However, you need - to do the following steps to place these changes in a new version of the file which is - compatible with version 4.0.0-incubating. - - - Make a backup copy of your file - /etc/cloud/management/db.properties. For example: - # mv /etc/cloud/management/db.properties /etc/cloud/management/db.properties-backup - - - Copy /etc/cloud/management/db.properties.rpmnew to create a - new /etc/cloud/management/db.properties: - # cp -ap /etc/cloud/management/db.properties.rpmnew etc/cloud/management/db.properties - - - Merge your changes from the backup file into the new db.properties file. - # vi /etc/cloud/management/db.properties - - - - - On the management server node, run the following command. It is recommended that you - use the command-line flags to provide your own encryption keys. See Password and Key - Encryption in the Installation Guide. - # cloud-setup-encryption -e encryption_type -m management_server_key -k database_key - When used without arguments, as in the following example, the default encryption - type and keys will be used: - - - (Optional) For encryption_type, use file or web to indicate the technique used - to pass in the database encryption password. Default: file. - - - (Optional) For management_server_key, substitute the default key that is used to - encrypt confidential parameters in the properties file. Default: password. It is - highly recommended that you replace this with a more secure value - - - (Optional) For database_key, substitute the default key that is used to encrypt - confidential parameters in the CloudStack database. Default: password. It is highly - recommended that you replace this with a more secure value. - - - - - Repeat steps 10 - 14 on every management server node. If you provided your own - encryption key in step 14, use the same key on all other management servers. - - - Start the first Management Server. Do not start any other Management Server nodes - yet. - # service cloud-management start - Wait until the databases are upgraded. Ensure that the database upgrade is complete. - You should see a message like "Complete! Done." After confirmation, start the other - Management Servers one at a time by running the same command on each node. - - - Start all Usage Servers (if they were running on your previous version). Perform - this on each Usage Server host. - # service cloud-usage start - - - (KVM only) Additional steps are required for each KVM host. These steps will not - affect running guests in the cloud. These steps are required only for clouds using KVM - as hosts and only on the KVM hosts. - - - Configure your CloudStack package repositories as outlined in the Installation - Guide - - - Stop the running agent. - # service cloud-agent stop - - - Update the agent software with one of the following command sets as - appropriate. - # yum update cloud-* - - # apt-get update -# apt-get upgrade cloud-* - - - - Start the agent. - # service cloud-agent start - - - Copy the contents of the agent.properties file to the new - agent.properties file by using the following command - sed -i 's/com.cloud.agent.resource.computing.LibvirtComputingResource/com.cloud.hypervisor.kvm.resource.LibvirtComputingResource/g' /etc/cloud/agent/agent.properties - - - Start the cloud agent and cloud management services. - - - When the Management Server is up and running, log in to the CloudStack UI and - restart the virtual router for proper functioning of all the features. - - - - - Log in to the CloudStack UI as admin, and check the status of the hosts. All hosts - should come to Up state (except those that you know to be offline). You may need to wait - 20 or 30 minutes, depending on the number of hosts. - Do not proceed to the next step until the hosts show in the Up state. If the hosts - do not come to the Up state, contact support. - - - Run the following script to stop, then start, all Secondary Storage VMs, Console - Proxy VMs, and virtual routers. - - - Run the command once on one management server. Substitute your own IP address of - the MySQL instance, the MySQL user to connect as, and the password to use for that - user. In addition to those parameters, provide the "-c" and "-r" arguments. For - example: - # nohup cloud-sysvmadm -d 192.168.1.5 -u cloud -p password -c -r > sysvm.log 2>&1 & -# tail -f sysvm.log - This might take up to an hour or more to run, depending on the number of - accounts in the system. - - - After the script terminates, check the log to verify correct execution: - # tail -f sysvm.log - The content should be like the following: - -Stopping and starting 1 secondary storage vm(s)... -Done stopping and starting secondary storage vm(s) -Stopping and starting 1 console proxy vm(s)... -Done stopping and starting console proxy vm(s). -Stopping and starting 4 running routing vm(s)... -Done restarting router(s). - - - - - - If you would like additional confirmation that the new system VM templates were - correctly applied when these system VMs were rebooted, SSH into the System VM and check - the version. - Use one of the following techniques, depending on the hypervisor. - - XenServer or KVM: - SSH in by using the link local IP address of the system VM. For example, in the - command below, substitute your own path to the private key used to log in to the - system VM and your own link local IP. - - Run the following commands on the XenServer or KVM host on which the system VM is - present: - # ssh -i private-key-path link-local-ip -p 3922 -# cat /etc/cloudstack-release - The output should be like the following: - Cloudstack Release 4.0.0-incubating Mon Oct 9 15:10:04 PST 2012 - - ESXi - SSH in using the private IP address of the system VM. For example, in the command - below, substitute your own path to the private key used to log in to the system VM and - your own private IP. - - Run the following commands on the Management Server: - # ssh -i private-key-path private-ip -p 3922 -# cat /etc/cloudstack-release - - The output should be like the following: - Cloudstack Release 4.0.0-incubating Mon Oct 9 15:10:04 PST 2012 - - - If needed, upgrade all Citrix XenServer hypervisor hosts in your cloud to a version - supported by CloudStack 4.0.0-incubating. The supported versions are XenServer 5.6 SP2 - and 6.0.2. Instructions for upgrade can be found in the CloudStack 4.0.0-incubating - Installation Guide. - - - Apply the XenServer hotfix XS602E003 (and any other needed hotfixes) to XenServer - v6.0.2 hypervisor hosts. - - - Disconnect the XenServer cluster from CloudStack. - In the left navigation bar of the CloudStack UI, select Infrastructure. Under - Clusters, click View All. Select the XenServer cluster and click Actions - - Unmanage. - This may fail if there are hosts not in one of the states Up, Down, - Disconnected, or Alert. You may need to fix that before unmanaging this - cluster. - Wait until the status of the cluster has reached Unmanaged. Use the CloudStack - UI to check on the status. When the cluster is in the unmanaged state, there is no - connection to the hosts in the cluster. - - - To clean up the VLAN, log in to one XenServer host and run: - /opt/xensource/bin/cloud-clean-vlan.sh - - - Prepare the upgrade by running the following on one XenServer host: - /opt/xensource/bin/cloud-prepare-upgrade.sh - If you see a message like "can't eject CD", log in to the VM and umount the CD, - then run this script again. - - - Upload the hotfix to the XenServer hosts. Always start with the Xen pool master, - then the slaves. Using your favorite file copy utility (e.g. WinSCP), copy the - hotfixes to the host. Place them in a temporary folder such as /root or /tmp. - On the Xen pool master, upload the hotfix with this command: - xe patch-upload file-name=XS602E003.xsupdate - Make a note of the output from this command, which is a UUID for the hotfix - file. You'll need it in another step later. - - (Optional) If you are applying other hotfixes as well, you can repeat the - commands in this section with the appropriate hotfix number. For example, - XS602E004.xsupdate. - - - - Manually live migrate all VMs on this host to another host. First, get a list of - the VMs on this host: - # xe vm-list - Then use this command to migrate each VM. Replace the example host name and VM - name with your own: - # xe vm-migrate live=true host=host-name vm=VM-name - - Troubleshooting - If you see a message like "You attempted an operation on a VM which requires - PV drivers to be installed but the drivers were not detected," run: - /opt/xensource/bin/make_migratable.sh - b6cf79c8-02ee-050b-922f-49583d9f1a14. - - - - Apply the hotfix. First, get the UUID of this host: - # xe host-list - Then use the following command to apply the hotfix. Replace the example host - UUID with the current host ID, and replace the hotfix UUID with the output from the - patch-upload command you ran on this machine earlier. You can also get the hotfix - UUID by running xe patch-list. - xe patch-apply host-uuid=host-uuid - uuid=hotfix-uuid - - - Copy the following files from the CloudStack Management Server to the - host. - - - - - - - Copy from here... - ...to here - - - - - /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py - /opt/xensource/sm/NFSSR.py - - - /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/setupxenserver.sh - /opt/xensource/bin/setupxenserver.sh - - - /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/make_migratable.sh - /opt/xensource/bin/make_migratable.sh - - - - - - - (Only for hotfixes XS602E005 and XS602E007) You need to apply a new Cloud - Support Pack. - - Download the CSP software onto the XenServer host from one of the following - links: - For hotfix XS602E005: http://coltrane.eng.hq.xensource.com/release/XenServer-6.x/XS-6.0.2/hotfixes/XS602E005/56710/xe-phase-2/xenserver-cloud-supp.tgz - For hotfix XS602E007: http://coltrane.eng.hq.xensource.com/release/XenServer-6.x/XS-6.0.2/hotfixes/XS602E007/57824/xe-phase-2/xenserver-cloud-supp.tgz + Make a backup of your MySQL database. If you run into any issues or need to roll back the upgrade, this will assist in debugging or restoring your existing environment. You'll be prompted for your password. + # mysqldump -u root -p cloud > cloudstack-backup.sql - Extract the file: - # tar xf xenserver-cloud-supp.tgz + Whether you're upgrading a Red Hat/CentOS based system or Ubuntu based system, you're going to need to stop the CloudStack management server before proceeding. + # service cloud-management stop - Run the following script: - # xe-install-supplemental-pack - xenserver-cloud-supp.iso + If you have made changes to /etc/cloud/management/components.xml, you'll need to carry these over manually to the new file, /etc/cloudstack/management/componentContext.xml. This is not done automatically. (If you're unsure, we recommend making a backup of the original components.xml to be on the safe side. + + + If you are using Ubuntu, follow this procedure to upgrade your packages. If not, skip to step . + Community Packages + This section assumes you're using the community supplied packages for &PRODUCT;. If you've created your own packages and APT repository, substitute your own URL for the ones used in these examples. + + + + The first order of business will be to change the sources list for each system with &PRODUCT; packages. This means all management servers, and any hosts that have the KVM agent. (No changes should be necessary for hosts that are running VMware or Xen.) + Start by opening /etc/apt/sources.list.d/cloudstack.list on any systems that have &PRODUCT; packages installed. + This file should have one line, which contains: + deb http://cloudstack.apt-get.eu/ubuntu precise 4.0 + We'll change it to point to the new package repository: + deb http://cloudstack.apt-get.eu/ubuntu precise 4.1 + If you're using your own package repository, change this line to read as appropriate for your 4.1.0 repository. + + + Now update your apt package list: + $ sudo apt-get update + + + Now that you have the repository configured, it's time to install the cloudstack-management package. This will pull in any other dependencies you need. + $ sudo apt-get install cloudstack-management + + + You will need to manually install the cloudstack-agent package: + $ sudo apt-get install cloudstack-agent + During the installation of cloudstack-agent, APT will copy your agent.properties, log4j-cloud.xml, and environment.properties from /etc/cloud/agent to /etc/cloudstack/agent. + When prompted whether you wish to keep your configuration, say Yes. + + + Verify that the file /etc/cloudstack/agent/environment.properties has a line that reads: + paths.script=/usr/share/cloudstack-common + If not, add the line. + + + Restart the agent: + + service cloud-agent stop + killall jsvc + service cloudstack-agent start + + + + During the upgrade, log4j-cloud.xml was simply copied over, so the logs will continue to be added to /var/log/cloud/agent/agent.log. There's nothing wrong with this, but if you prefer to be consistent, you can change this by copying over the sample configuration file: + + cd /etc/cloudstack/agent + mv log4j-cloud.xml.dpkg-dist log4j-cloud.xml + service cloudstack-agent restart + + + + Once the agent is running, you can uninstall the old cloud-* packages from your system: + sudo dpkg --purge cloud-agent + + + + + The package names have changed between 4.0 and 4.1, so upgrading the packages won't happen automatically with a yum update + + Once you've upgraded the packages on your management servers, you'll need to restart the system VMs. Make sure port 8096 is open to do this. + There is a script that will do this for you, all you need to do is run the script and supply the IP address for your MySQL instance and your MySQL credentials: + # nohup cloudstack-sysvmadm -d IP address -u cloud -p -a > sysvm.log 2>&1 & + You can monitor the log for progress. The process of restarting the system VMs can take an hour or more. + # tail -f sysvm.log + The output to sysvm.log will look something like this: + + Stopping and starting 1 secondary storage vm(s)... + Done stopping and starting secondary storage vm(s) + Stopping and starting 1 console proxy vm(s)... + Done stopping and starting console proxy vm(s). + Stopping and starting 4 running routing vm(s)... + Done restarting router(s). + + + + For Xen Hosts: Copy vhd-utils + This step is only for CloudStack installs that are using Xen hosts. + + Copy the file vhd-utils to /usr/share/cloudstack-common/scripts/vm/hypervisor/xenserver. + + +
+
+ Upgrade from 3.0.2 to 4.1.0 + This section will guide you from Citrix CloudStack 3.0.2 to Apache CloudStack 4.1.0. Sections that are hypervisor-specific will be called out with a note. + - If the XenServer host is part of a zone that uses basic networking, disable - Open vSwitch (OVS): - # xe-switch-network-backend bridge + Ensure that you query your IP address usage records and process them or make a + backup. During the upgrade you will lose the old IP address usage records. + Starting in 3.0.2, the usage record format for IP addresses is the same as the rest + of the usage types. Instead of a single record with the assignment and release dates, + separate records are generated per aggregation period with start and end dates. After + upgrading, any existing IP address usage records in the old format will no longer be + available. - - - - Reboot this XenServer host. - - - Run the following: - /opt/xensource/bin/setupxenserver.sh - - If the message "mv: cannot stat `/etc/cron.daily/logrotate': No such file or - directory" appears, you can safely ignore it. - - - - Run the following: - for pbd in `xe pbd-list currently-attached=false| grep ^uuid | awk - '{print $NF}'`; do xe pbd-plug uuid=$pbd ; - - - - On each slave host in the Xen pool, repeat these steps, starting from "manually - live migrate VMs." - - - - -
-
- - Version 4.0.0-incubating -
- What’s New in 4.0.0-incubating - Apache CloudStack 4.0.0-incubating includes the following new features: -
- Inter-VLAN Routing - Inter-VLAN Routing is the capability to route network traffic between VLANs. This - feature enables you to set up Virtual Private Clouds (VPC) that can hold multi-tier - applications. These tiers are deployed on different VLANs that can communicate with each - other. You can provision VLANs to the tiers your create, and VMs can be deployed on - different tiers, such as Web, Application, or Database. The VLANs are connected to a - virtual router, which facilitates communication between the VMs. In effect, you can - segment VMs by means of VLANs into different networks that can host multi-tier - applications. Such segmentation by means of VLANs logically separate application VMs for - higher security and lower broadcasts, while remaining physically connected to the same - device. - This feature is supported on XenServer and VMware hypervisors. -
-
- Site-to-Site VPN - A Site-to-Site VPN connection helps you establish a secure connection from an - enterprise datacenter to the cloud infrastructure. This allows users to access the guest - VMs by establishing a VPN connection to the virtual router of the account from a device in - the datacenter of the enterprise. Having this facility eliminates the need to establish - VPN connections to individual VMs. - The supported endpoints on the remote datacenters are: - - - Cisco ISR with IOS 12.4 or later - - - Juniper J-Series routers with JunOS 9.5 or later - - -
-
- Local Storage Support for Data Volumes - You can now create data volumes on local storage. The data volume is placed on the - same XenServer host as the VM instance that is attached to the data volume. These local - data volumes can be attached to virtual machines, detached, re-attached, and deleted just - as with the other types of data volume. In earlier releases of CloudStack, only the root - disk could be placed in local storage. - Local storage is ideal for scenarios where persistence of data volumes and HA is not - required. Some of the benefits include reduced disk I/O latency and cost reduction from - using inexpensive local disks. - In order for local volumes to be used, the feature must be enabled for the - zone. - You can create a data disk offering for local storage. When a user creates a new VM, - they can select this disk offering in order to cause the data disk volume to be placed in - local storage. - You can not migrate a VM that has a volume in local storage to a different host, nor - migrate the volume itself away to a different host. If you want to put a host into - maintenance mode, you must first stop any VMs with local data volumes on that host. - Local storage support for volumes is available for XenServer, KVM, and VMware - hypervisors. -
-
- Tags - A tag is a key-value pair that stores metadata about a resource in the cloud. Tags are - useful for categorizing resources. For example, you can tag a user VM with a value that - indicates the user's city of residence. In this case, the key would be "city" and the - value might be "Toronto" or "Tokyo." You can then request CloudStack to find all resources - that have a given tag; for example, VMs for users in a given city. - You can tag a user virtual machine, volume, snapshot, guest network, template, ISO, - firewall rule, port forwarding rule, public IP address, security group, load balancer - rule, project, VPC, network ACL, or static route. You can not tag a remote access - VPN. - You can work with tags through the UI or through the new API commands createTags, - deleteTags, and listTags. You can define multiple tags for each resource. There is no - limit on the number of tags you can define. Each tag can be up to 255 characters long. - Users can define tags on the resources they own, and administrators can define tags on any - resources in the cloud. - A new optional input parameter, "tags," has been added to many of the list* API - commands. The following example shows how to use this new parameter to find all the - volumes having tag region=canada OR tag city=Toronto: - command=listVolumes -&listAll=true -&tags[0].key=region -&tags[0].value=canada -&tags[1].key=city -&tags[1].value=Toronto - The following API commands have the new "tags" input parameter: - - - listVirtualMachines - - - listVolumes - - - listSnapshots - - - listNetworks - - - listTemplates - - - listIsos - - - listFirewallRules - - - listPortForwardingRules - - - listPublicIpAddresses - - - listSecurityGroups - - - listLoadBalancerRules - - - listProjects - - - listVPCs - - - listNetworkACLs - - - listStaticRoutes - - -
-
- AWS API Changes for Tags - Some changes have been made to the Amazon Web Services API compatibility support in - order to accommodate the new tagging feature. - New APIs: - - - - - - - - New API - - - Description - - - - - - - ec2-create-tags - - - Add tags to one or more resources. - - - - - ec2-delete-tags - - - Remove tags from one or more resources. - - - - ec2-describe-tags - - Show currently defined tags. - - - - - - Changed APIs: - - - - - - - - Changed API - - - Description - - - - - - ec2-describe-images - - Output now shows tags defined for each image. - - - - - ec2-describe-instances - - - Output now shows tags defined for each image. - The following filters can now be passed in to limit the output result set: - tag-key, tag-value and tag:key - - - - - ec2-describe-snapshots - - - Output now shows tags defined for each image. - The following filters can now be passed in to limit the output result set: - tag-key, tag-value and tag:key - - - - ec2-describe-volumes - - Output now shows tags defined for each image. - The following filters can now be passed in to limit the output result set: - tag-key, tag-value and tag:key - - - - - -
-
- Secure Console Access on XenServer - With the addition of Secure Console feature, users can now securely access the VM - consoles on the XenServer hypervisor. You can either SSH or use the View Console option in - the Management Server to securely connect to the VMs on the XenServer host. The Management - Server uses the xapi API to stream the VM consoles. However, there is no change in the way - you can access the console of a VM. This feature is supported on XenServer 5.6 and 6.0 - versions. -
-
- Stopped VM - This release supports creating VMs without starting them on the backend. You can - determine whether the VM needs to be started as part of the VM deployment. A VM can be - deployed in two ways: create and start a VM (the default method); create a VM and leave it - in the stopped state. - A new request parameter, startVM, is introduced in the deployVm API to support the - stopped VM feature. The possible values are: - - - true - The VM starts as a part of the VM deployment - - - false - The VM is left in stopped state at the end of the VM deployment - - -
-
- Uploading an Existing Volume to a Virtual Machine - Existing data can now be made accessible to a virtual machine. This is called - uploading a volume to the VM. For example, this is useful to upload data from a local file - system and attach it to a VM. Root administrators, domain administrators, and end users - can all upload existing volumes to VMs. The upload is performed by using HTTP. The - uploaded volume is placed in the zone's secondary storage. - This functionality is supported for the following hypervisors: - - - Hypervisor : Disk Image Format - - - XenServer : VHD - - - VMware : OVA - - - KVM : QCOW2 - - - -
-
- Dedicated High-Availability Hosts - One or more hosts can now be designated for use only by high-availability (HA) enabled - VMs that are restarted due to a host failure. Setting up a pool of such dedicated HA hosts - as the recovery destination for all HA-enabled VMs make it easier to determine which VMs - are restarted as part of the high-availability function. You can designate a host as a - dedicated-HA restart node only if the Dedicated HA Hosts feature is enabled by setting the - appropriate global configuration parameter. -
-
- Support for Amazon Web Services API - This release supports Amazon Web Services APIs, including Elastic Compute Cloud (EC2) - API. Fidelity with the EC2 API and the installation experience for this functionality are - both enhanced. In prior releases, users were required to install a separate component - called CloudBridge, in addition to installing the Management Server. For new installations - of CloudStack 4.0.0-incubating, this software is installed automatically along with - CloudStack and runs in a more closely integrated fashion. The feature is disabled by - default, but can be easily enabled by setting the appropriate global configuration - parameter and performing a few setup steps. -
-
- The Nicira NVP Plugin - The Nicira NVP plug-in allows CloudStack to use the Nicira solution for virtualized - network as a provider for CloudStack networks and services. In CloudStack 4.0.0-incubating - this plug-in supports the Connectivity service. This service is responsible for creating - Layer 2 networks supporting the networks created by guests. When a tenant creates a new - network, instead of a traditional VLAN, a logical network will be created by sending the - appropriate calls to the Nicira NVP Controller. The plug-in has been tested with Nicira - NVP versions 2.1.0, 2.2.0 and 2.2.1. -
-
- Support for CAStor Cluster - CloudStack 4.0.0-incubating supports using a CAStor cluster as the back-end storage - system for a CloudStack S3 front-end. The CAStor back-end storage for CloudStack extends - the existing storage classes and allows the storage configuration attribute to point to a - CAStor cluster. This feature makes use of the CloudStack server's local disk to spool - files before writing them to CAStor when handling the PUT operations. However, a file must - be successfully written into the CAStor cluster prior to the return of a success code to - the S3 client to ensure that the transaction outcome is correctly reported. - The S3 multipart file upload is not supported in this release. You are prompted with - proper error message if a multipart upload is attempted. -
-
- Clustered Logical Volume Manager Support for KVM - This release adds Clustered Logical Volume Manager (CLVM) storage support for KVM - hosts. With this support, you can use CLVM as primary storage. - The CLVM support for KVM allows root and data disks (primary storage) to reside on - Linux logical volumes. The administrators are required to configure CLVM on the KVM hosts - independent of CloudStack. When the volume groups are available, an administrator can - simply add primary storage of type CLVM, providing the volume group name. Then CloudStack - creates and manages logical volumes as needed. - CLVM also supports Snapshots. CloudStack creates an LVM snapshot, copy the applicable - logical volume to the secondary storage in the qcow2 format, and then delete the LVM - snapshot. -
-
- Rados Block Device Support for KVM - You can now use Rados Block Device (RBD) to run instances on Apache CloudStack - 4.0.0-incubating. This can be done by adding a RBD pool as primary storage. Before using - RBD, ensure that Qemu is compiled with RBD enabled, and the libvirt version is at least - 0.10 with RBD enabled on the KVM host - Create a disk offering for RBD so that you can ensure that StoragePoolAllocator - chooses the RBD pool to deploy instances. -
-
-
- Issues Fixed in 4.0.0-incubating - Many bugs include a defect number that reflects the bug number that was held in the bug - tracker run by Citrix (bugs.cloudstack.org). The Apache CloudStack project now uses Jira to manage its bugs, so - some of the bugs that are referenced here may not be available to view. However, we are - still including them for completeness. - - - - - - - - Defect - - - Description - - - - - - Many - vSphere 5.0 now has GA support. Formerly only Beta support was - provided. - - - CS-16135 - Creating volumes after upgrading from snapshot taken in 2.2.14 no longer - deletes the snapshot physically from the secondary storage. - - - CS-16122 - In a site-to-site VPN setup, alerts are generated when the VPC virtual - router is rebooted with multiple vpn connections. - - - CS-16022 - If host connection fails due to a database error, host now disconnects - and the Managerment Server id is removed. - - - CS-16011 - Name of network offering is no longer truncated due to too-narrow field - width in Add Guest Network dialog box. - - - - CS-15978 - When the virtual router and its host go down, the high availability - mechanism now works for the virtual router. - - - - CS-15921 - The 2.2.x security group script now accounts for the VMs created in the - version 2.1 timeframe. - - - - CS-15919 - A level parameter is added to the listVolumes command; therefore queries - return the response more quickly. - - - CS-15904 - Upgrade from version 2.2.14 to CloudStack-3.0.5-0.2944-rhel5 works as - expected. The upgrade script, - /usr/share/cloud/setup/db/schema-2214to30-cleanup.sql, works as - expected. - - - CS-15879 - The database upgrade from version 3.0.4 to 3.0.5 works as - expected. - - - - CS-15807 - Network label for OVM now available in UI. - - - - CS-15779 - When the thumbnail is requested, the console session will not be - terminated. - - - - CS-15778 - Fetching a VM thumbnail now gets a thumbnail of appropriate visual - dimensions. - - - - CS-15734 - KVM Snapshots no longer shows incorrect disk usage. - - - CS-15733 - The domainId parameter for the listNetworks command now lists the - resources belonging to the domain specified. - - - CS-15676 - Stopping the router no longer fails with the null pointer - exception. - - - - CS-15648 - If creating a volume from a snapshot fails, the error is reported on the - UI but the volume is stuck in the creating state. - - - - CS-15646 - createFirewallRule API no longer causes null pointer - exception. - - - CS-15628 - In a KVM host, the high availability mechanism no longer takes a long - time to migrate VMs to another KVM host if there are multiple storage - pools. - - - CS-15627 - Metadata instance-id and vm-id for existing VMs stays the same after - upgrade. - - - CS-15621 - Solved difficulty with allocating disk volumes when running multiple VM - deployment in parallel. - - - CS-15603 - CloudStack now stop the VMs when destroyVM command is - called. - - - CS-15586 - Public Vlan for an account no longer fails if multiple physical networks - are present. - - - CS-15582 - The dns-name filter is now supported for ec2-describe-instances in the - Amazon Web Services API compatibility commands. The filter maps to the name of a - user VM. - - - CS-15503 - An IP address which has static NAT rules can now be released. - Subsequently, restarting this network after it was shutdown can - succeed. - - - CS-15464 - Can now delete static route whose state is set to Revoke. - - - CS-15443 - Creating a firewall rule no longer fails with an internal server - error. - - - CS-15398 - Corrected technique for programming DNS on the user VMs. - - - CS-15356 - Internal DNS 2 entry now correctly shown in UI. - - - CS-15335 - The CloudBridge S3 Engine now connects to the database by using the - deciphered password in the db.properties file. - - - CS-15318 - UI now correctly prevents the user from stopping a VM that is in the - Starting state. - - - CS-15307 - Fixed Japanese localization of instance statuses in the Instances - menu. - - - CS-15278 - The deployment planner no longer takes long time to locate a suitable - host to deploy VMs when large number of clusters are present. - - - CS-15274 - Creating a VLAN range using Zone ID without network ID now - succeeds. - - - CS-15243 - Now check to be sure source NAT and VPN have same - provider. - - - CS-15232 - Ensure that networks using external load balancer/firewall in 2.2.14 or - earlier can properly upgrade. - - - CS-15200 - No exception when trying to attach the same volume while attaching the - first volume is in progress. - - - CS-15173 - Additional cluster can no longer be added with same VSM IP address as - another cluster. - - - CS-15167 - AWS API calls now honor the admin account's ability to view or act on the - resources owned by the regular users. - - - CS-15163 - The minimum limit is not honored when there is not enough capacity to - deploy all the VMs and the ec2-run-instances command with the -n >n1 -n2> - option is used to deploy multiple VMs. - - - CS-15157 - Can now add/enable service providers for multiple physical networks - through the UI. - - - CS-15145 - AWS API call ec2-register has better error handling for negative - cases. - - - CS-15122 - Filters now supported for AWS API call - ec2-describe-availability-zones. - - - CS-15120 - Actions column in UI of Volume page now shows action - links. - - - CS-15099 - Buttons no longer overlap text on Account Deletion confirmation page in - UI. - - - CS-15095 - Ensures you can not create a VM with a CPU frequency greater than the - host CPU frequency. - - - CS-15094 - CPU cap now set properly in VMware. - - - CS-15077 - NullPointerException is no longer observed while executing the command to - list the public IP in a basic zone created with the default shared NetScaler EIP - and ELB network offering. - - - CS-15044 - UI now provides option to view the list of instances which are part of - the guest network. - - - CS-15026 - UI in Deploy VM dialog now lists only templates or ISOs depending on - which is selected in previous dialog. - - - CS-14989 - In KVM, the Create Instance wizard now shows only templates from the - current (KVM) zone. - - - CS-14986, CS-14985 - Listing filters works as expected in the ec2-describe-volumes and - ec2-describe-snapshots commands. - - - CS-14964 - Automatically starting the Console Proxy no longer fails due to its - missing volume on the primary storage - - - CS-14907 - User is now correctly prevented from trying to download an uploaded - volume which has not yet been moved to primary storage. - - - CS-14879 - When a user VM is stopped or terminated, the static NAT associated with - this VM is now disabled. This public IP address is no longer owned by this account - and can be associated to any other user VM. - - - CS-14854 - Only the admin user can change the template permission to Public, so this - option is removed from the UI for domain Admins and regular Users. - - - CS-14817 - While checking if network has any external provider, CloudStack will - consider all providers in the network. - - - CS-14796 - When deploying a VM with ec2-run-instances, userdata is now - encoded. - - - CS-14770 - The API returns the keypair information when a VM is deployed with - sshkey. This affects the API commands related to virtual machines - (deployVirtualMachine, listVirtualMachines, ... *VirtualMachine), as well as the - corresponding AWS APIs. - - - CS-14724 - UI no longer displays the dropdown list of isolation method choices if - sdn.ovs.controller is false. - - - CS-14345 - Logout API returns XML header. - - - CS-14724 - Host IPs now associated with appropriate IPs according to traffic - type. - - - CS-14253 - Can now delete and re-create port forwarding rule on same - firewall. - - - CS-14724 - UI no longer displays the dropdown list of isolation method choices if - sdn.ovs.controller is false. - - - CS-14452 - Data disk volumes are now automatically copied from one cluster to - another. - - - CS-13539 - Windows VM can get IP after reboot. - - - CS-13537 - When user tries to delete a domain that contains sub-domains, an error - message is now sent to convey the reason for the delete failure. - - - CS-13153 - System VMs support HTTP proxy. - - - CS-12642 - Added Close button to Select Project list view popup in - UI. - - - CS-12510 - Deleting and reinserting host_details no longer causes - deadlocks. - - - CS-12407 - F5 and Netscaler - when dedicated is selected, capacity field is - disabled. - - - CS-12111 - Email validation for edit user form. - - - CS-10928 - Network read/write values now always positive numbers. - - - CS-15376, CS-15373 - The AWS APIs (EC2 and S3) now listen on the 7080 port and send request to - CloudStack on the 8080 port just as any other clients of - CloudStack. - - - CS-13944 - The CloudStack 2.2.x to 3.0.x database upgrade for multiple physical - networks is now supported. - - - CS-15300 - The admin accounts of a domain now honour the limits imposed on that - domain just like the regular accounts do. A domain admin now is not allowed to - create an unlimited number of instances, volumes, snapshots, and so - on. - - - CS-15396 - The CloudStack database now contain the UUD information after the 2.2.14 - to 3.0.4 upgrade. - - - CS-15450 - Upgrade from 2.2.14 to 3.0.4 no longer fails on a VMware - host. - - - CS-15449 - Running cloudstack-aws-api-register no longer fails with the "User - registration failed with error: [Errno 113] No route to host" - error. - - - CS-15455 - The iptable rules are configured to open the awsapi port (7080) as part - of the installation. - - - CS-15429 - While creating an instance with data volume, disk offering also is - considered while checking the account limit on volume resources. - - - CS-15414 - After the 2.2.14 to 3.0.4 upgrade, the value of the global parameter - xen.guest.network.device is now decrypted before setting the traffic - label. - - - CS-15382 - During 2.2.14 to 3.0.4 upgrade, the hosts no longer go to the Alert state - if destroyed networks existed with non-existent tags prior to - upgrade. - - - CS-15323 - CloudStack supports the following Citrix XenServer hotfixes: XS602E003, - XS602E004, and XS602E005. - - - CS-15430 - Create snapshot now fails if creating a snapshot exceeds the snapshot - resource limit for a domain admin or a user account. - - - CS-14256 - Virtual Router no longer remains in starting state for subdomain or user - on a KVM 3.0.1 prerlease host on RHEL 6.2. - - - CS-7495 - Implemented a variety of Xen management host improvements. - - - CS-8105 - NFS v4 for primary storage now works as expected on KVM - hosts. - - - CS-9989 - The error messages returned during VM deployment failure will have much - more details than before. - - - CS-12584 - You can no longer add security groups not supported by the hypervisor in - use. - - - CS-12705 - When creating a Network offering by using SRX as the service provider for - SourceNAT servcies, an option is given in the CloudStack UI now to set the - source_nat type to "per Zone"/"per account". - - - CS-12782 - Assigning a VM from Basic to Advanced zone no longer ignores the network - ID. A warning message is displayed for VM movements across zones. - - - CS-12591 - Broadcast Address on the Second Public IP NIC is now - corrected. - - - CS-13272 - When a user is deleted, all the associated properties, such as IPs and - virtual routers, are now deleted. - - - CS-13377 - Creating template from a root disk of a stopped instance now provides an - option to make it a "Featured template". - - - CS-13500 - Reaching the first guest VM by using its public IP from the second guest - VM no longer fails. - - - CS-13853 - The default gateway can no longer be 0.0.0.0 in the Secondary Storage VM - (SSVM). - - - CS-13863 - The queryAsyncJobResult command in XML format now returns the correct - UUIDs. - - - CS-13867 - Corrected CSP xenserver-cloud-supp.tgz for XenServer 5.6 and - 6.0. - - - CS-13904 - Labels and values for the service offerings CPU and memory are now - consistent. - - - CS-13998 - The SSVM kernel panic issue is fixed on XenServer. - - - CS-14090 - The issue is fixed where running the VMware snapshots randomly fails with - the ArrayIndexOutOfBoundsException error. - - - CS-14021 - The java.lang.OutOfMemoryError is fixed on the Management - Server. - - - CS-14025 - The Python Eggs are provided to easily package the test client for each - branch of CloudStack. - - - CS-14068 - Resetting the VM password through the CloudStack UI no longer causes any - error. - - - CS-14156 - The pod which has the administrator's virtual router is no longer - selected while creating the virtual routers for guests. - - - CS-14182 - The users can now delete their ISOs as normal users. - - - CS-14185 - The listOSTypes API now filters out the types of operating system by - using the keywords. - - - CS-14204 - The cloud-setup-bonding.sh command no longer generates the "command not - found" error. - - - CS-14214 - The Specify VLAN option cannot be enabled now for an isolated Network - offering with SourceNAT enabled. - - - CS-14234 - Sending project invite email to an account now requires SMTP configured - in CloudStack. - - - CS-14237 - The garbage collector of the primary storage no longer fails when the - first host in the cluster is not up. - - - CS-14241 - Custom Volume Disk Offering is now matching the Global configuration - value. - - - CS-14270 - The listNetworks API no longer assumes that the broadcast type is always - VLAN. - - - CS-14319 - The internal name of the VM is no longer present in the error message - that is displayed to a domain administrator. - - - CS-14321 - The listVolumes API call now returns a valid value for the isExtractable - parameter for the ISO-derived disk and data disk volumes. - - - CS-14323 - Invalid API calls will now give valid response in json/xml - format. - - - CS-14339 - Custom Disk Size will now allow values larger than 100GB. - - - CS-14357 - The ConsoleProxyLoadReportCommand is no longer fired - continuously. - - - CS-14421 - Fixed the issue of virtual router deployments. The DHCP entries can now - be assigned to the router. - - - CS-14555 - Unzipped downloaded template MD5SUM will no longer override the zipped - template MD5SUM in the database. - - - CS-14598 - The complete screen of the running VM is now displayed in the console - proxy. - - - CS-14600 - Windows or Linux based consoles are no longer lost upon rebooting - VMs. - - - CS-14784 - Multiple subnets with the same VLAN now work as expected. - - - CS-13303, 14874, 13897, 13944, 14088, 14190 - A variety of upgrade issues have been fixed in release - 3.0.3. - - - CS-15080 - Setting a private network on a VLAN for VMWare environment is now - supported. - - - CS-15168 - The console proxy now works as expected and no exception is shown in the - log after upgrading from version 2.2.14 to 3.0.2. - - - CS-15172 - Version 3.0.2 now accepts the valid public key. - - - - -
-
- Known Issues in 4.0.0-incubating - - - - - - - - Issue ID - - - Description - - - - - - CLOUDSTACK-301 - Nexus 1000v DVS integration is not functional - This source code release includes some partial functionality to support the - Cisco Nexus 1000v Distributed Virtual Switch within a VMware hypervisor - environment. The functionality is not complete at this time. - - - - CLOUDSTACK-368 - OVM - cannot create guest VM - This source code release has regressed from the CloudStack 2.2.x code - and is unable to support Oracle VM (OVM). - - - - CLOUDSTACK-279 - Deleting a project fails when executed by the regular user. This works as - expected for root/domain admin. To workaround, perform either of the - following: - - Use the account cleanup thread which will eventually complete the project - deletion. - - - Execute the call as the root/domain admin on behalf of the regular - user. - - - - - - CS-16067 - The command=listTags&key=city command does not work as expected. The - command does not return tags for the resources of the account with the tag, city - - - - - CS-16063 - The current values of volumes and snapshots are incorrect when using KVM - as a host. To fix this, the database upgrade codes, volumes.size and - snapshots.size, should be changed to show the virtual sizes. - - - - CS-16058 - Null pointer Exception while deleting the host after moving the host to - maintenance state. - - - - CS-16045 - Only the root administrator can handle the API keys. The domain - administrators are not allowed to create, delete, or retrieve API keys for the - users in their domain. - - - - CS-16019 - CIDR list in the Add VPN Customer Gateway dialog does not prompt the user - that they can provide a comma separated CIDRs if multiple CIDRs have to be - supplied. - - - - CS-16015 - Deleting a network is not supported when its network providers are - disabled. - - - - CS-16012 - Unable to delete a zone in the UI because the necessary cleanup cannot be - completed. When the hosts are removed, the expunge process fails to delete the - volumes as no hosts are present to send the commands to. Therefore, the storage - pool removal fails, and zone can't be cleaned and deleted. - - - - CS-16011 - Name of network offering might be truncated due to too-narrow field width - in Add Guest Network dialog box. - - - - CS-15789 - Invalid global setting prevents management server to restart. For - example, if you configure the "project.invite.timeout" parameter to "300" and - attempt to restart management server, it fails without throwing a warning or - setting the value to the default. - - - - CS-15749 - Restarting VPC is resulting in intermittent connection loss to the port - forwarding and StaticNAT rules. - - - - CS-15690 - The IpAssoc command failed as a part of starting the virtual router, but - the final start result is reported as succes. - - - - CS-15672, CS-15635 - The FQDN of the VM is not configured if it is deployed as a part of - default shared network and isolated guest network - (DefaultIsolatedNetworkOfferingWithSourceNatService). - - - - CS-15634 - The FQDN of a VM that is deployed as a part of both a shared network and - default isolated guest network has the suffix of the shared network instead of the - default isolated guest network. - - - - CS-15576 - Stopping a VM on XenServer creates a backlog of API commands. For - example, the Attach volume calls become delayed while waiting for the - stopVirtualMachine command to be executed. - - - - CS-15569 - Misleading error message in the exception when creating a StaticNAT rule - fails in a VPC. - - - - CS-15566 - External device such as Netscaler is not supported in VPC. - - - CS-15557 - Intermittent traffic loss in the VPN connection if Juniper is the remote - router and the life time is 300 seconds. - - - - CS-15361 - Egress rules are not working in NetScaler loadbalancer. - - - - CS-15163 - The minimum limit is not honored when there is not enough capacity to - deploy all the VMs and the ec2-run-instances command with the -n >n1 -n2> - option is used to deploy multiple VMs. - - - CS-15105 - The cloud-sysvmadm script does not work if the integration.api.port - parameter is set to any port other than 8096. - - - CS-15092 - Connecting to the guest VMs through SSH is extremely slow, and it results - in connection timeout. - - - CS-15037 - Hairpin NAT is not supported when NetScaler is used for - EIP. - - - CS-15009 - The port_profile table will not be populated with port profile - information. In this release, CloudStack directly connects to the VSM for all the - port profile operations; therefore, no port profile information is - cached. - - - CS-14939 - Adding a VMware cluster is not supported when the Management Network is - migrated to the Distributed Virtual Switch environment. - - - CS-14780 - You are allowed to ping the elastic IP address of the VM even though no - ingress rule is set that allows the ICMP protocol. - - - CS-14756 - Installing KVM on RHEL 6.2 will result in unreliable network performance. - Workaround: blacklist vhost-net. Edit /etc/modprobe.d/blacklist-kvm.conf and - include vhost-net. - - - CS-14346 - The UpdateVirtualMachine API call does not check whether the VM is - stopped. Therefore, stop the VM manually before issuing this call. - - - CS-14303 (was 14537) - The IP addresses for a shared network are still being consumed even if no - services are defined for that network. - - - CS-14296 (was 14530) - OVM: Network traffic labels are not supported. - - - CS-14291 (was 14523) - The EIP/ELB network offering for basic zones does not support multiple - NetScalers. - - - CS-14275 (was 14506) - F5: Unable to properly remove a F5 device. - - - CS-14201 (was 14430) - VMWare: Template sizes are being reported different depending on whether - the primary storage is using ISCSI or NFS. - - - CS-13758 (was 13963) - vSphere: template download from templates created off of the root volume - does not work properly. - - - CS-13733 (was 13935) - vSphere: detaching an ISO from a restored VM instance - fails. - - - CS-13682 (was 13883) - Multiple NetScalers are not supported in Basic Networking. - - - CS-13599 (was 13359) - Programming F5/NetScaler rules can be better optimized. - - - CS-13337 (was 13518) - Security Groups are not supported in Advanced Networking - - - CS-13173 (was 13336) - vSphere: cross cluster volume migration does not work - properly. - - - CS-12714 (was 12840) - Capacity view is not available for pods or clusters. - - - CS-12624 (was 12741) - vSphere: maintenance mode will not live migrate system VM to another - host. - - - - CS-15476 - - - The 2.2.14 to 4.0.0-incubating upgrade fails if multiple untagged physical - networks exist before the upgrade. - - - - - CS-15407 - - - After the 2.2.14 to 4.0.0-incubating upgrade, VLAN allocation on multiple - physical networks does not happen as expected. - To workaround this issue, follow the instructions given below: - - - Revert to your 2.2.14 setup. - - - Stop all the VMs with the isolated virtual networks in your cloud - setup. - - - Run following query to find if any networks still have the NICs - allocated: + + + The following upgrade instructions apply only if you're using VMware hosts. If + you're not using VMware hosts, skip this step and move on to . + + In each zone that includes VMware hosts, you need to add a new system VM template. - - Check if any virtual guest networks have the NICs allocated: - #SELECT DISTINCT op.id from `cloud`.`op_networks` op JOIN `cloud`.`networks` n on op.id=n.id WHERE nics_count != 0 AND guest_type = 'Virtual'; - - - If this returns any network IDs, then ensure the following: - - - All the VMs are stopped. - - - No new VM is started. - - - Shutdown the Management Server. - - - - - Remove the NICs count for the virtual network IDs returned in step - (a), and set the NIC count to 0: - UPDATE `cloud`.`op_networks` SET nics_count = 0 WHERE id = enter id of virtual network - - - Restart the Management Server, and wait for all the networks to shut - down. - - Networks shutdown is determined by the network.gc.interval and - network.gc.wait parameters. - - + + While running the existing 3.0.2 system, log in to the UI as root administrator. + + + In the left navigation bar, click Templates. + + + In Select view, click Templates. + + + Click Register template. + The Register template dialog box is displayed. + + + In the Register template dialog box, specify the following values (do not change these): + + + + + + + Field + Value + + + + + Name + systemvm-vmware-4.1 + + + Description + systemvm-vmware-4.1 + + + URL + http://download.cloud.com/templates/burbank/burbank-systemvm-08012012.ova + + + Zone + Choose the zone where this hypervisor is used + + + Hypervisor + VMware + + + Format + OVA + + + OS Type + Debian GNU/Linux 5.0 (32-bit) + + + Extractable + no + + + Password Enabled + no + + + Public + no + + + Featured + no + + + + + + + Watch the screen to be sure that the template downloads successfully and enters + the READY state. Do not proceed until this is successful. + - - - Ensure that all the networks are shut down and all the guest VNETs are - free. - - - Run the upgrade script. - This allocates all your guest VNET ranges to the first physical - network. - - - By using the updatePhysicalNetwork API, reconfigure the VNET ranges for - each physical network as desired. - - - Start all the VMs. - - - - - - - CS-14680 - - - CloudStack and LDAP user validation cannot happen simultaneously because the - user password is hashed and stored in the database, and LDAP requires the - passwords in plain text. - To work with the LDAP user, the MD5 hash should be disabled in the login - process by commenting the following variable in sharedFunctions.js file available - at /usr/share/cloud/management/webapps/client/scripts, and restart the - cloud-management service. - var md5HashedLogin = false; - However, if md5HashedLogin is set to false, the end user can login with the - LDAP credentials but not with the CloudStack user credentials. - - - - CS-14346 - The UpdateVirtualMachine API call does not check whether the VM is - stopped. Therefore, stop the VM manually before issuing this call. - - - CS-15130 - Data disk volumes are not automatically copied from one cluster to - another. - - - CS-14780 - You are allowed to ping the elastic IP address of the VM even though no - ingress rule is set that allows the ICMP protocol. - - - CS-14939 - Adding a VMware cluster is not supported when the Management Network is - migrated to the Distributed Virtual Switch environment. - - - CS-15009 - The port_profile table will not be populated with port profile - information. In this release, CloudStack directly connects to the VSM for all the - port profile operations; therefore, no port profile information is - cached. - - - CS-15037 - Hairpin NAT is not supported when NetScaler is used for - EIP. - - - CS-15092 - Connecting to the guest VMs through SSH is extremely slow, and it results - in connection timeout. - - - CS-15105 - The cloud-sysvmadm script does not work if the integration.api.port - parameter is set to any port other than 8096. - - - CS-15163 - The minimum limit is not honored when there is not enough capacity to - deploy all the VMs and the ec2-run-instances command with the -n >n1 -n2> - option is used to deploy multiple VMs. - - - - -
-
- - API Changes from 3.0.2 to 4.0.0-incubating -
- New API Commands in 4.0.0-incubating - - - createCounter (Adds metric counter) - - - deleteCounter (Deletes a counter) - - - listCounters (List the counters) - - - createCondition (Creates a condition) - - - deleteCondition (Removes a condition) - - - listConditions (List Conditions for the specific user) - - - createTags. Add tags to one or more resources. Example: - command=createTags -&resourceIds=1,10,12 -&resourceType=userVm -&tags[0].key=region -&tags[0].value=canada -&tags[1].key=city -&tags[1].value=Toronto - - - deleteTags. Remove tags from one or more resources. Example: - command=deleteTags -&resourceIds=1,12 -&resourceType=Snapshot -&tags[0].key=city - - - listTags (Show currently defined resource tags) - - - createVPC (Creates a VPC) - - - listVPCs (Lists VPCs) - - - deleteVPC (Deletes a VPC) - - - updateVPC (Updates a VPC) - - - restartVPC (Restarts a VPC) - - - createVPCOffering (Creates VPC offering) - - - updateVPCOffering (Updates VPC offering) - - - deleteVPCOffering (Deletes VPC offering) - - - listVPCOfferings (Lists VPC offerings) - - - createPrivateGateway (Creates a private gateway) - - - listPrivateGateways (List private gateways) - - - deletePrivateGateway (Deletes a Private gateway) - - - createNetworkACL (Creates a ACL rule the given network (the network has to belong to - VPC)) - - - deleteNetworkACL (Deletes a Network ACL) - - - listNetworkACLs (Lists all network ACLs) - - - createStaticRoute (Creates a static route) - - - deleteStaticRoute (Deletes a static route) - - - listStaticRoutes (Lists all static routes) - - - createVpnCustomerGateway (Creates site to site vpn customer gateway) - - - createVpnGateway (Creates site to site vpn local gateway) - - - createVpnConnection (Create site to site vpn connection) - - - deleteVpnCustomerGateway (Delete site to site vpn customer gateway) - - - deleteVpnGateway (Delete site to site vpn gateway) - - - deleteVpnConnection (Delete site to site vpn connection) - - - updateVpnCustomerGateway (Update site to site vpn customer gateway) - - - resetVpnConnection (Reset site to site vpn connection) - - - listVpnCustomerGateways (Lists site to site vpn customer gateways) - - - listVpnGateways (Lists site 2 site vpn gateways) - - - listVpnConnections (Lists site to site vpn connection gateways) - - - markDefaultZoneForAccount (Marks a default zone for the current account) - - - uploadVolume (Uploads a data disk) - - -
-
- Changed API Commands in 4.0.0-incubating - - - - - - - API Commands - Description - - - - - - copyTemplate - prepareTemplate - registerTemplate - updateTemplate - createProject - activateProject - suspendProject - updateProject - listProjectAccounts - createVolume - migrateVolume - attachVolume - detachVolume - uploadVolume - createSecurityGroup - registerIso - copyIso - updateIso - createIpForwardingRule - listIpForwardingRules - createLoadBalancerRule - updateLoadBalancerRule - createSnapshot - - - The commands in this list have a single new response parameter, and no other - changes. - New response parameter: tags(*) - - Many other commands also have the new tags(*) parameter in addition to other - changes; those commands are listed separately. - - - - - rebootVirtualMachine - attachIso - detachIso - listLoadBalancerRuleInstances - resetPasswordForVirtualMachine - changeServiceForVirtualMachine - recoverVirtualMachine - startVirtualMachine - migrateVirtualMachine - deployVirtualMachine - assignVirtualMachine - updateVirtualMachine - restoreVirtualMachine - stopVirtualMachine - destroyVirtualMachine - - - The commands in this list have two new response parameters, and no other - changes. - New response parameters: keypair, tags(*) - - - - - listSecurityGroups - listFirewallRules - listPortForwardingRules - listSnapshots - listIsos - listProjects - listTemplates - listLoadBalancerRules - - The commands in this list have the following new parameters, and no other - changes. - New request parameter: tags (optional) - New response parameter: tags(*) - - - - - listF5LoadBalancerNetworks - listNetscalerLoadBalancerNetworks - listSrxFirewallNetworks - updateNetwork - - - The commands in this list have three new response parameters, and no other - changes. - New response parameters: canusefordeploy, vpcid, tags(*) - - - - - createZone - updateZone - - The commands in this list have the following new parameters, and no other - changes. - New request parameter: localstorageenabled (optional) - New response parameter: localstorageenabled - - - - listZones - New response parameter: localstorageenabled - - - - rebootRouter - changeServiceForRouter - startRouter - destroyRouter - stopRouter - - The commands in this list have two new response parameters, and no other - changes. - New response parameters: vpcid, nic(*) - - - - updateAccount - disableAccount - listAccounts - markDefaultZoneForAccount - enableAccount - - The commands in this list have three new response parameters, and no - other changes. - New response parameters: vpcavailable, vpclimit, vpctotal - - - listRouters - - New request parameters: forvpc (optional), vpcid (optional) - New response parameters: vpcid, nic(*) - - - - listNetworkOfferings - - New request parameters: forvpc (optional) - New response parameters: forvpc - - - - listVolumes - - New request parameters: details (optional), tags (optional) - New response parameters: tags(*) - - - - addTrafficMonitor - - New request parameters: excludezones (optional), includezones - (optional) - - - - createNetwork - - New request parameters: vpcid (optional) - New response parameters: canusefordeploy, vpcid, tags(*) - - - - listPublicIpAddresses - - New request parameters: tags (optional), vpcid (optional) - New response parameters: vpcid, tags(*) - - - - listNetworks - - New request parameters: canusefordeploy (optional), forvpc (optional), tags - (optional), vpcid (optional) - New response parameters: canusefordeploy, vpcid, tags(*) - - - - restartNetwork - - New response parameters: vpcid, tags(*) - - - - enableStaticNat - - New request parameter: networkid (optional) - - - - createDiskOffering - - New request parameter: storagetype (optional) - New response parameter: storagetype - - - - listDiskOfferings - - New response parameter: storagetype - - - - updateDiskOffering - - New response parameter: storagetype - - - - createFirewallRule - - Changed request parameters: ipaddressid (old version - optional, new version - - required) - New response parameter: tags(*) - - - - listVirtualMachines - - New request parameters: isoid (optional), tags (optional), templateid - (optional) - New response parameters: keypair, tags(*) - - - - updateStorageNetworkIpRange - - New response parameters: id, endip, gateway, netmask, networkid, podid, - startip, vlan, zoneid - - - - reconnectHost - A new response parameter is added: hahost. - - - addCluster - The following request parameters are added: - - - vsmipaddress (optional) - - - vsmpassword (optional) - - - vsmusername (optional) - - - The following parameter is made mandatory: podid - - - - listVolumes - A new response parameter is added: status - - - migrateVolume - A new response parameter is added: status - - - prepareHostForMaintenance - A new response parameter is added: hahost. - - - addSecondaryStorage - A new response parameter is added: hahost. - - - enableAccount - A new response parameter is added: defaultzoneid - - - attachVolume - A new response parameter is added: status - - - cancelHostMaintenance - A new response parameter is added: hahost - - - addSwift - A new response parameter is added: hahost - - - listSwifts - A new response parameter is added: hahost - - - listExternalLoadBalancers - A new response parameter is added: hahost - - - createVolume - A new response parameter is added: status - - - listCapabilities - A new response parameter is added: - customdiskofferingmaxsize - - - disableAccount - A new response parameter is added: defaultzoneid - - - deployVirtualMachine - A new request parameter is added: startvm (optional) - - - deleteStoragePool - A new request parameter is added: forced (optional) - - - updateAccount - A new response parameter is added: defaultzoneid - - - addHost - A new response parameter is added: hahost - - - updateHost - A new response parameter is added: hahost - - - detachVolume - A new response parameter is added: status - - - listAccounts - A new response parameter is added: defaultzoneid - - - listHosts - A new response parameter is added: hahostA new request - parameter is added: hahost (optional) - - - - -
-
+
+ + Stop all Usage Servers if running. Run this on all Usage Server hosts. + # service cloud-usage stop + + + Stop the Management Servers. Run this on all Management Server hosts. + # service cloud-management stop + + + On the MySQL master, take a backup of the MySQL databases. We recommend performing + this step even in test upgrades. If there is an issue, this will assist with + debugging. + In the following commands, it is assumed that you have set the root password on the + database, which is a CloudStack recommended best practice. Substitute your own MySQL + root password. + # mysqldump -u root -pmysql_password cloud > cloud-backup.dmp + # mysqldump -u root -pmysql_password cloud_usage > cloud-usage-backup.dmp + + + Either build RPM/DEB packages as detailed in the Installation Guide, or use one of + the community provided yum/apt repositories to gain access to the &PRODUCT; + binaries. + + + After you have configured an appropriate yum or apt repository, you may execute the + one of the following commands as appropriate for your environment in order to upgrade + &PRODUCT;: # yum update cloud-* + # apt-get update + # apt-get upgrade cloud-* + + You will, of course, have to agree to the changes suggested by Yum or APT. + + If the upgrade output includes a message similar to the following, then some + custom content was found in your old components.xml, and you need to merge the two + files: + warning: /etc/cloud/management/components.xml created as /etc/cloud/management/components.xml.rpmnew + Instructions follow in the next step. + + + + If you have made changes to your copy of + /etc/cloud/management/components.xml the changes will be + preserved in the upgrade. However, you need to do the following steps to place these + changes in a new version of the file which is compatible with version + 4.1.0. + + + Make a backup copy of /etc/cloud/management/components.xml. + For example: + # mv /etc/cloud/management/components.xml /etc/cloud/management/components.xml-backup + + + Copy /etc/cloud/management/components.xml.rpmnew to create + a new /etc/cloud/management/components.xml: + # cp -ap /etc/cloud/management/components.xml.rpmnew /etc/cloud/management/components.xml + + + Merge your changes from the backup file into the new + components.xml. + # vi /etc/cloud/management/components.xml + + + + If you have more than one management server node, repeat the upgrade steps on each + node. + + + + Start the first Management Server. Do not start any other Management Server nodes + yet. + # service cloud-management start + Wait until the databases are upgraded. Ensure that the database upgrade is complete. + After confirmation, start the other Management Servers one at a time by running the same + command on each node. + + Failing to restart the Management Server indicates a problem in the upgrade. + Having the Management Server restarted without any issues indicates that the upgrade + is successfully completed. + + + + Start all Usage Servers (if they were running on your previous version). Perform + this on each Usage Server host. + # service cloud-usage start + + + + Additional steps are required for each KVM host. These steps will not affect + running guests in the cloud. These steps are required only for clouds using KVM as + hosts and only on the KVM hosts. + + + + Configure a yum or apt respository containing the &PRODUCT; packages as outlined + in the Installation Guide. + + + Stop the running agent. + # service cloud-agent stop + + + Update the agent software with one of the following command sets as appropriate + for your environment. + # yum update cloud-* + # apt-get update + # apt-get upgrade cloud-* + + + Start the agent. + # service cloud-agent start + + + Edit /etc/cloud/agent/agent.properties to change the + resource parameter from + "com.cloud.agent.resource.computing.LibvirtComputingResource" to + "com.cloud.hypervisor.kvm.resource.LibvirtComputingResource". + + + Start the cloud agent and cloud management services. + + + When the Management Server is up and running, log in to the CloudStack UI and + restart the virtual router for proper functioning of all the features. + + + + + Log in to the CloudStack UI as administrator, and check the status of the hosts. All + hosts should come to Up state (except those that you know to be offline). You may need + to wait 20 or 30 minutes, depending on the number of hosts. + + Troubleshooting: If login fails, clear your browser cache and reload the + page. + + + Do not proceed to the next step until the hosts show in Up state. + + + If you are upgrading from 3.0.2, perform the following: + + + Ensure that the admin port is set to 8096 by using the "integration.api.port" + global parameter. + This port is used by the cloud-sysvmadm script at the end of the upgrade + procedure. For information about how to set this parameter, see "Setting Global + Configuration Parameters" in the Installation Guide. + + + Restart the Management Server. + + If you don't want the admin port to remain open, you can set it to null after + the upgrade is done and restart the management server. + + + + + + Run the cloud-sysvmadm script to stop, then start, all Secondary + Storage VMs, Console Proxy VMs, and virtual routers. Run the script once on each + management server. Substitute your own IP address of the MySQL instance, the MySQL user + to connect as, and the password to use for that user. In addition to those parameters, + provide the -c and -r arguments. For + example: + # nohup cloud-sysvmadm -d 192.168.1.5 -u cloud -p password -c -r > + sysvm.log 2>&1 & + # tail -f sysvm.log + This might take up to an hour or more to run, depending on the number of accounts in + the system. + + + If needed, upgrade all Citrix XenServer hypervisor hosts in your cloud to a version + supported by CloudStack 4.1.0. The supported versions are XenServer 5.6 SP2 + and 6.0.2. Instructions for upgrade can be found in the CloudStack 4.1.0 + Installation Guide under "Upgrading XenServer Versions." + + + Now apply the XenServer hotfix XS602E003 (and any other needed hotfixes) to + XenServer v6.0.2 hypervisor hosts. + + + Disconnect the XenServer cluster from CloudStack. + In the left navigation bar of the CloudStack UI, select Infrastructure. Under + Clusters, click View All. Select the XenServer cluster and click Actions - + Unmanage. + This may fail if there are hosts not in one of the states Up, Down, + Disconnected, or Alert. You may need to fix that before unmanaging this + cluster. + Wait until the status of the cluster has reached Unmanaged. Use the CloudStack + UI to check on the status. When the cluster is in the unmanaged state, there is no + connection to the hosts in the cluster. + + + To clean up the VLAN, log in to one XenServer host and run: + /opt/xensource/bin/cloud-clean-vlan.sh + + + Now prepare the upgrade by running the following on one XenServer host: + /opt/xensource/bin/cloud-prepare-upgrade.sh + If you see a message like "can't eject CD", log in to the VM and unmount the CD, + then run this script again. + + + Upload the hotfix to the XenServer hosts. Always start with the Xen pool master, + then the slaves. Using your favorite file copy utility (e.g. WinSCP), copy the + hotfixes to the host. Place them in a temporary folder such as /tmp. + On the Xen pool master, upload the hotfix with this command: + xe patch-upload file-name=XS602E003.xsupdate + Make a note of the output from this command, which is a UUID for the hotfix + file. You'll need it in another step later. + + (Optional) If you are applying other hotfixes as well, you can repeat the + commands in this section with the appropriate hotfix number. For example, + XS602E004.xsupdate. + + + + Manually live migrate all VMs on this host to another host. First, get a list of + the VMs on this host: + # xe vm-list + Then use this command to migrate each VM. Replace the example host name and VM + name with your own: + # xe vm-migrate live=true host=host-name + vm=VM-name + + Troubleshooting + If you see a message like "You attempted an operation on a VM which requires + PV drivers to be installed but the drivers were not detected," run: + /opt/xensource/bin/make_migratable.sh + b6cf79c8-02ee-050b-922f-49583d9f1a14. + + + + Apply the hotfix. First, get the UUID of this host: + # xe host-list + Then use the following command to apply the hotfix. Replace the example host + UUID with the current host ID, and replace the hotfix UUID with the output from the + patch-upload command you ran on this machine earlier. You can also get the hotfix + UUID by running xe patch-list. + xe patch-apply host-uuid=host-uuid uuid=hotfix-uuid + + + Copy the following files from the CloudStack Management Server to the + host. + + + + + + + Copy from here... + ...to here + + + + + /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py + /opt/xensource/sm/NFSSR.py + + + /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/setupxenserver.sh + /opt/xensource/bin/setupxenserver.sh + + + /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/make_migratable.sh + /opt/xensource/bin/make_migratable.sh + + + + + + + (Only for hotfixes XS602E005 and XS602E007) You need to apply a new Cloud + Support Pack. + + + Download the CSP software onto the XenServer host from one of the following + links: + For hotfix XS602E005: http://coltrane.eng.hq.xensource.com/release/XenServer-6.x/XS-6.0.2/hotfixes/XS602E005/56710/xe-phase-2/xenserver-cloud-supp.tgz + For hotfix XS602E007: http://coltrane.eng.hq.xensource.com/release/XenServer-6.x/XS-6.0.2/hotfixes/XS602E007/57824/xe-phase-2/xenserver-cloud-supp.tgz + + + Extract the file: + # tar xf xenserver-cloud-supp.tgz + + + Run the following script: + # xe-install-supplemental-pack xenserver-cloud-supp.iso + + + If the XenServer host is part of a zone that uses basic networking, disable + Open vSwitch (OVS): + # xe-switch-network-backend bridge + + + + + Reboot this XenServer host. + + + Run the following: + /opt/xensource/bin/setupxenserver.sh + + If the message "mv: cannot stat `/etc/cron.daily/logrotate': No such file or + directory" appears, you can safely ignore it. + + + + Run the following: + for pbd in `xe pbd-list currently-attached=false| grep ^uuid | awk '{print $NF}'`; do xe pbd-plug uuid=$pbd ; + + + On each slave host in the Xen pool, repeat these steps, starting from "manually + live migrate VMs." + + + +
+ + Troubleshooting Tip + If passwords which you know to be valid appear not to work after upgrade, or other UI + issues are seen, try clearing your browser cache and reloading the UI page. + +
+
+ Upgrade from 2.2.14 to 4.1.0 + + + Ensure that you query your IPaddress usage records and process them; for example, + issue invoices for any usage that you have not yet billed users for. + Starting in 3.0.2, the usage record format for IP addresses is the same as the rest + of the usage types. Instead of a single record with the assignment and release dates, + separate records are generated per aggregation period with start and end dates. After + upgrading to 4.1.0, any existing IP address usage records in the old format + will no longer be available. + + + If you are using version 2.2.0 - 2.2.13, first upgrade to 2.2.14 by using the + instructions in the 2.2.14 Release Notes. + + KVM Hosts + If KVM hypervisor is used in your cloud, be sure you completed the step to insert + a valid username and password into the host_details table on each KVM node as + described in the 2.2.14 Release Notes. This step is critical, as the database will be + encrypted after the upgrade to 4.1.0. + + + + While running the 2.2.14 system, log in to the UI as root administrator. + + + Using the UI, add a new System VM template for each hypervisor type that is used in + your cloud. In each zone, add a system VM template for each hypervisor used in that + zone + + + In the left navigation bar, click Templates. + + + In Select view, click Templates. + + + Click Register template. + The Register template dialog box is displayed. + + + In the Register template dialog box, specify the following values depending on + the hypervisor type (do not change these): + + + + + + + Hypervisor + Description + + + + + XenServer + Name: systemvm-xenserver-4.1.0 + Description: systemvm-xenserver-4.1.0 + URL: + http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2 + Zone: Choose the zone where this hypervisor is used + Hypervisor: XenServer + Format: VHD + OS Type: Debian GNU/Linux 5.0 (32-bit) + Extractable: no + Password Enabled: no + Public: no + Featured: no + + + + KVM + Name: systemvm-kvm-4.1.0 + Description: systemvm-kvm-4.1.0 + URL: + http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 + Zone: Choose the zone where this hypervisor is used + Hypervisor: KVM + Format: QCOW2 + OS Type: Debian GNU/Linux 5.0 (32-bit) + Extractable: no + Password Enabled: no + Public: no + Featured: no + + + + VMware + Name: systemvm-vmware-4.1.0 + Description: systemvm-vmware-4.1.0 + URL: + http://download.cloud.com/templates/burbank/burbank-systemvm-08012012.ova + Zone: Choose the zone where this hypervisor is used + Hypervisor: VMware + Format: OVA + OS Type: Debian GNU/Linux 5.0 (32-bit) + Extractable: no + Password Enabled: no + Public: no + Featured: no + + + + + + + + + + Watch the screen to be sure that the template downloads successfully and enters the + READY state. Do not proceed until this is successful + + + WARNING: If you use more than one type of + hypervisor in your cloud, be sure you have repeated these steps to download the system + VM template for each hypervisor type. Otherwise, the upgrade will fail. + + + Stop all Usage Servers if running. Run this on all Usage Server hosts. + # service cloud-usage stop + + + Stop the Management Servers. Run this on all Management Server hosts. + # service cloud-management stop + + + On the MySQL master, take a backup of the MySQL databases. We recommend performing + this step even in test upgrades. If there is an issue, this will assist with + debugging. + In the following commands, it is assumed that you have set the root password on the + database, which is a CloudStack recommended best practice. Substitute your own MySQL + root password. + # mysqldump -u root -pmysql_password cloud > cloud-backup.dmp + # mysqldump -u root -pmysql_password cloud_usage > cloud-usage-backup.dmp + + + + Either build RPM/DEB packages as detailed in the Installation Guide, or use one of + the community provided yum/apt repositories to gain access to the &PRODUCT; binaries. + + + + After you have configured an appropriate yum or apt repository, you may execute the + one of the following commands as appropriate for your environment in order to upgrade + &PRODUCT;: # yum update cloud-* + # apt-get update + # apt-get upgrade cloud-* + + You will, of course, have to agree to the changes suggested by Yum or APT. + + + If you have made changes to your existing copy of the file components.xml in your + previous-version CloudStack installation, the changes will be preserved in the upgrade. + However, you need to do the following steps to place these changes in a new version of + the file which is compatible with version 4.0.0-incubating. + + How will you know whether you need to do this? If the upgrade output in the + previous step included a message like the following, then some custom content was + found in your old components.xml, and you need to merge the two files: + + warning: /etc/cloud/management/components.xml created as /etc/cloud/management/components.xml.rpmnew + + + Make a backup copy of your + /etc/cloud/management/components.xml file. For + example: + # mv /etc/cloud/management/components.xml /etc/cloud/management/components.xml-backup + + + Copy /etc/cloud/management/components.xml.rpmnew to create + a new /etc/cloud/management/components.xml: + # cp -ap /etc/cloud/management/components.xml.rpmnew /etc/cloud/management/components.xml + + + Merge your changes from the backup file into the new components.xml file. + # vi /etc/cloud/management/components.xml + + + + + + If you have made changes to your existing copy of the + /etc/cloud/management/db.properties file in your previous-version + CloudStack installation, the changes will be preserved in the upgrade. However, you need + to do the following steps to place these changes in a new version of the file which is + compatible with version 4.0.0-incubating. + + + Make a backup copy of your file + /etc/cloud/management/db.properties. For example: + # mv /etc/cloud/management/db.properties /etc/cloud/management/db.properties-backup + + + Copy /etc/cloud/management/db.properties.rpmnew to create a + new /etc/cloud/management/db.properties: + # cp -ap /etc/cloud/management/db.properties.rpmnew etc/cloud/management/db.properties + + + Merge your changes from the backup file into the new db.properties file. + # vi /etc/cloud/management/db.properties + + + + + On the management server node, run the following command. It is recommended that you + use the command-line flags to provide your own encryption keys. See Password and Key + Encryption in the Installation Guide. + # cloud-setup-encryption -e encryption_type -m management_server_key -k database_key + When used without arguments, as in the following example, the default encryption + type and keys will be used: + + + (Optional) For encryption_type, use file or web to indicate the technique used + to pass in the database encryption password. Default: file. + + + (Optional) For management_server_key, substitute the default key that is used to + encrypt confidential parameters in the properties file. Default: password. It is + highly recommended that you replace this with a more secure value + + + (Optional) For database_key, substitute the default key that is used to encrypt + confidential parameters in the CloudStack database. Default: password. It is highly + recommended that you replace this with a more secure value. + + + + + Repeat steps 10 - 14 on every management server node. If you provided your own + encryption key in step 14, use the same key on all other management servers. + + + Start the first Management Server. Do not start any other Management Server nodes + yet. + # service cloud-management start + Wait until the databases are upgraded. Ensure that the database upgrade is complete. + You should see a message like "Complete! Done." After confirmation, start the other + Management Servers one at a time by running the same command on each node. + + + Start all Usage Servers (if they were running on your previous version). Perform + this on each Usage Server host. + # service cloud-usage start + + + (KVM only) Additional steps are required for each KVM host. These steps will not + affect running guests in the cloud. These steps are required only for clouds using KVM + as hosts and only on the KVM hosts. + + + Configure your CloudStack package repositories as outlined in the Installation + Guide + + + Stop the running agent. + # service cloud-agent stop + + + Update the agent software with one of the following command sets as + appropriate. + # yum update cloud-* + + # apt-get update + # apt-get upgrade cloud-* + + + + Start the agent. + # service cloud-agent start + + + Copy the contents of the agent.properties file to the new + agent.properties file by using the following command + sed -i 's/com.cloud.agent.resource.computing.LibvirtComputingResource/com.cloud.hypervisor.kvm.resource.LibvirtComputingResource/g' /etc/cloud/agent/agent.properties + + + Start the cloud agent and cloud management services. + + + When the Management Server is up and running, log in to the CloudStack UI and + restart the virtual router for proper functioning of all the features. + + + + + Log in to the CloudStack UI as admin, and check the status of the hosts. All hosts + should come to Up state (except those that you know to be offline). You may need to wait + 20 or 30 minutes, depending on the number of hosts. + Do not proceed to the next step until the hosts show in the Up state. If the hosts + do not come to the Up state, contact support. + + + Run the following script to stop, then start, all Secondary Storage VMs, Console + Proxy VMs, and virtual routers. + + + Run the command once on one management server. Substitute your own IP address of + the MySQL instance, the MySQL user to connect as, and the password to use for that + user. In addition to those parameters, provide the "-c" and "-r" arguments. For + example: + # nohup cloud-sysvmadm -d 192.168.1.5 -u cloud -p password -c -r > sysvm.log 2>&1 & + # tail -f sysvm.log + This might take up to an hour or more to run, depending on the number of + accounts in the system. + + + After the script terminates, check the log to verify correct execution: + # tail -f sysvm.log + The content should be like the following: + + Stopping and starting 1 secondary storage vm(s)... + Done stopping and starting secondary storage vm(s) + Stopping and starting 1 console proxy vm(s)... + Done stopping and starting console proxy vm(s). + Stopping and starting 4 running routing vm(s)... + Done restarting router(s). + + + + + + If you would like additional confirmation that the new system VM templates were + correctly applied when these system VMs were rebooted, SSH into the System VM and check + the version. + Use one of the following techniques, depending on the hypervisor. + + XenServer or KVM: + SSH in by using the link local IP address of the system VM. For example, in the + command below, substitute your own path to the private key used to log in to the + system VM and your own link local IP. + + Run the following commands on the XenServer or KVM host on which the system VM is + present: + # ssh -i private-key-path link-local-ip -p 3922 + # cat /etc/cloudstack-release + The output should be like the following: + Cloudstack Release 4.0.0-incubating Mon Oct 9 15:10:04 PST 2012 + + ESXi + SSH in using the private IP address of the system VM. For example, in the command + below, substitute your own path to the private key used to log in to the system VM and + your own private IP. + + Run the following commands on the Management Server: + # ssh -i private-key-path private-ip -p 3922 + # cat /etc/cloudstack-release + + The output should be like the following: + Cloudstack Release 4.0.0-incubating Mon Oct 9 15:10:04 PST 2012 + + + If needed, upgrade all Citrix XenServer hypervisor hosts in your cloud to a version + supported by CloudStack 4.0.0-incubating. The supported versions are XenServer 5.6 SP2 + and 6.0.2. Instructions for upgrade can be found in the CloudStack 4.0.0-incubating + Installation Guide. + + + Apply the XenServer hotfix XS602E003 (and any other needed hotfixes) to XenServer + v6.0.2 hypervisor hosts. + + + Disconnect the XenServer cluster from CloudStack. + In the left navigation bar of the CloudStack UI, select Infrastructure. Under + Clusters, click View All. Select the XenServer cluster and click Actions - + Unmanage. + This may fail if there are hosts not in one of the states Up, Down, + Disconnected, or Alert. You may need to fix that before unmanaging this + cluster. + Wait until the status of the cluster has reached Unmanaged. Use the CloudStack + UI to check on the status. When the cluster is in the unmanaged state, there is no + connection to the hosts in the cluster. + + + To clean up the VLAN, log in to one XenServer host and run: + /opt/xensource/bin/cloud-clean-vlan.sh + + + Prepare the upgrade by running the following on one XenServer host: + /opt/xensource/bin/cloud-prepare-upgrade.sh + If you see a message like "can't eject CD", log in to the VM and umount the CD, + then run this script again. + + + Upload the hotfix to the XenServer hosts. Always start with the Xen pool master, + then the slaves. Using your favorite file copy utility (e.g. WinSCP), copy the + hotfixes to the host. Place them in a temporary folder such as /root or /tmp. + On the Xen pool master, upload the hotfix with this command: + xe patch-upload file-name=XS602E003.xsupdate + Make a note of the output from this command, which is a UUID for the hotfix + file. You'll need it in another step later. + + (Optional) If you are applying other hotfixes as well, you can repeat the + commands in this section with the appropriate hotfix number. For example, + XS602E004.xsupdate. + + + + Manually live migrate all VMs on this host to another host. First, get a list of + the VMs on this host: + # xe vm-list + Then use this command to migrate each VM. Replace the example host name and VM + name with your own: + # xe vm-migrate live=true host=host-name vm=VM-name + + Troubleshooting + If you see a message like "You attempted an operation on a VM which requires + PV drivers to be installed but the drivers were not detected," run: + /opt/xensource/bin/make_migratable.sh + b6cf79c8-02ee-050b-922f-49583d9f1a14. + + + + Apply the hotfix. First, get the UUID of this host: + # xe host-list + Then use the following command to apply the hotfix. Replace the example host + UUID with the current host ID, and replace the hotfix UUID with the output from the + patch-upload command you ran on this machine earlier. You can also get the hotfix + UUID by running xe patch-list. + xe patch-apply host-uuid=host-uuid + uuid=hotfix-uuid + + + Copy the following files from the CloudStack Management Server to the + host. + + + + + + + Copy from here... + ...to here + + + + + /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py + /opt/xensource/sm/NFSSR.py + + + /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/setupxenserver.sh + /opt/xensource/bin/setupxenserver.sh + + + /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/make_migratable.sh + /opt/xensource/bin/make_migratable.sh + + + + + + + (Only for hotfixes XS602E005 and XS602E007) You need to apply a new Cloud + Support Pack. + + + Download the CSP software onto the XenServer host from one of the following + links: + For hotfix XS602E005: http://coltrane.eng.hq.xensource.com/release/XenServer-6.x/XS-6.0.2/hotfixes/XS602E005/56710/xe-phase-2/xenserver-cloud-supp.tgz + For hotfix XS602E007: http://coltrane.eng.hq.xensource.com/release/XenServer-6.x/XS-6.0.2/hotfixes/XS602E007/57824/xe-phase-2/xenserver-cloud-supp.tgz + + + Extract the file: + # tar xf xenserver-cloud-supp.tgz + + + Run the following script: + # xe-install-supplemental-pack + xenserver-cloud-supp.iso + + + If the XenServer host is part of a zone that uses basic networking, disable + Open vSwitch (OVS): + # xe-switch-network-backend bridge + + + + + Reboot this XenServer host. + + + Run the following: + /opt/xensource/bin/setupxenserver.sh + + If the message "mv: cannot stat `/etc/cron.daily/logrotate': No such file or + directory" appears, you can safely ignore it. + + + + Run the following: + for pbd in `xe pbd-list currently-attached=false| grep ^uuid | awk + '{print $NF}'`; do xe pbd-plug uuid=$pbd ; + + + + On each slave host in the Xen pool, repeat these steps, starting from "manually + live migrate VMs." + + + + +
+
+
diff --git a/docs/en-US/about-clusters.xml b/docs/en-US/about-clusters.xml index 745ad89d1..aa8604ccd 100644 --- a/docs/en-US/about-clusters.xml +++ b/docs/en-US/about-clusters.xml @@ -1,5 +1,5 @@ - %BOOK_ENTITIES; ]> diff --git a/docs/en-US/about-hosts.xml b/docs/en-US/about-hosts.xml index 49694b256..87b6bab1e 100644 --- a/docs/en-US/about-hosts.xml +++ b/docs/en-US/about-hosts.xml @@ -1,25 +1,25 @@ - %BOOK_ENTITIES; ]>
diff --git a/docs/en-US/about-password-encryption.xml b/docs/en-US/about-password-encryption.xml index 3cd84d195..6c11c579e 100644 --- a/docs/en-US/about-password-encryption.xml +++ b/docs/en-US/about-password-encryption.xml @@ -52,7 +52,7 @@ Of course, the database secret key itself can not be stored in the open – it must be encrypted. How then does &PRODUCT; read it? A second secret key must be provided from an external source during Management Server startup. This key can be provided in one of two ways: - loaded from a file or provided by the &PRODUCT; administrator. The &PRODUCT; database has a new + loaded from a file or provided by the &PRODUCT; administrator. The &PRODUCT; database has a configuration setting that lets it know which of these methods will be used. If the encryption type is set to "file," the key must be in a file in a known location. If the encryption type is set to "web," the administrator runs the utility diff --git a/docs/en-US/about-physical-networks.xml b/docs/en-US/about-physical-networks.xml index 8edb9e060..b22e48b77 100644 --- a/docs/en-US/about-physical-networks.xml +++ b/docs/en-US/about-physical-networks.xml @@ -1,29 +1,28 @@ - %BOOK_ENTITIES; ]> -
- About Physical Networks + About Physical Networks Part of adding a zone is setting up the physical network. One or (in an advanced zone) more physical networks can be associated with each zone. The network corresponds to a NIC on the hypervisor host. Each physical network can carry one or more types of network traffic. The choices of traffic type for each network vary depending on whether you are creating a zone with basic networking or advanced networking. A physical network is the actual network hardware and wiring in a zone. A zone can have multiple physical networks. An administrator can: @@ -33,8 +32,7 @@ Configure the service providers (firewalls, load balancers, etc.) available on a physical network Configure the IP addresses trunked to a physical network Specify what type of traffic is carried on the physical network, as well as other properties like network speed - - + diff --git a/docs/en-US/about-pods.xml b/docs/en-US/about-pods.xml index ed3520c64..57ae1a319 100644 --- a/docs/en-US/about-pods.xml +++ b/docs/en-US/about-pods.xml @@ -1,33 +1,34 @@ - %BOOK_ENTITIES; ]>
About Pods - A pod often represents a single rack. Hosts in the same pod are in the same subnet. - A pod is the second-largest organizational unit within a &PRODUCT; deployment. Pods are contained within zones. Each zone can contain one or more pods. - Pods are not visible to the end user. - A pod consists of one or more clusters of hosts and one or more primary storage servers. + A pod often represents a single rack. Hosts in the same pod are in the same subnet. + A pod is the second-largest organizational unit within a &PRODUCT; deployment. Pods are contained within zones. Each zone can contain one or more pods. + A pod consists of one or more clusters of hosts and one or more primary storage servers. + Pods are not visible to the end user. + diff --git a/docs/en-US/about-primary-storage.xml b/docs/en-US/about-primary-storage.xml index 68d7a25ba..a9cf05486 100644 --- a/docs/en-US/about-primary-storage.xml +++ b/docs/en-US/about-primary-storage.xml @@ -1,5 +1,5 @@ - %BOOK_ENTITIES; ]> diff --git a/docs/en-US/about-regions.xml b/docs/en-US/about-regions.xml new file mode 100644 index 000000000..432faeb6c --- /dev/null +++ b/docs/en-US/about-regions.xml @@ -0,0 +1,49 @@ + + +%BOOK_ENTITIES; +]> + + +
+ About Regions + To increase reliability of the cloud, you can optionally group resources into multiple geographic regions. + A region is the largest available organizational unit within a &PRODUCT; deployment. + A region is made up of several availability zones, where each zone is roughly equivalent to a datacenter. + Each region is controlled by its own cluster of Management Servers, running in one of the zones. + The zones in a region are typically located in close geographical proximity. + Regions are a useful technique for providing fault tolerance and disaster recovery. + By grouping zones into regions, the cloud can achieve higher availability and scalability. + User accounts can span regions, so that users can deploy VMs in multiple, widely-dispersed regions. + Even if one of the regions becomes unavailable, the services are still available to the end-user through VMs deployed in another region. + And by grouping communities of zones under their own nearby Management Servers, the latency of communications within the cloud is reduced + compared to managing widely-dispersed zones from a single central Management Server. + + + Usage records can also be consolidated and tracked at the region level, creating reports or invoices for each geographic region. + + + + + + region-overview.png: Nested structure of a region. + + Regions are visible to the end user. When a user starts a guest VM, the user must select a region for their guest. + Users might also be required to copy their private templates to additional regions to enable creation of guest VMs using their templates in those regions. +
\ No newline at end of file diff --git a/docs/en-US/about-secondary-storage.xml b/docs/en-US/about-secondary-storage.xml index c4df0b8c6..c5b4f5d5a 100644 --- a/docs/en-US/about-secondary-storage.xml +++ b/docs/en-US/about-secondary-storage.xml @@ -1,5 +1,5 @@ - %BOOK_ENTITIES; ]> diff --git a/docs/en-US/about-virtual-networks.xml b/docs/en-US/about-virtual-networks.xml index 2797423d2..4dbd2018b 100644 --- a/docs/en-US/about-virtual-networks.xml +++ b/docs/en-US/about-virtual-networks.xml @@ -5,23 +5,22 @@ ]> -
About Virtual Networks A virtual network is a logical construct that enables multi-tenancy on a single physical network. In &PRODUCT; a virtual network can be shared or isolated. diff --git a/docs/en-US/about-working-with-vms.xml b/docs/en-US/about-working-with-vms.xml index 47153e2f3..259c61bc8 100644 --- a/docs/en-US/about-working-with-vms.xml +++ b/docs/en-US/about-working-with-vms.xml @@ -5,35 +5,35 @@ ]>
- About Working with Virtual Machines - &PRODUCT; provides administrators with complete control over the lifecycle of all guest VMs executing in the cloud. &PRODUCT; provides several guest management operations for end users and administrators. VMs may be stopped, started, rebooted, and destroyed. - Guest VMs have a name and group. VM names and groups are opaque to &PRODUCT; and are available for end users to organize their VMs. Each VM can have three names for use in different contexts. Only two of these names can be controlled by the user: - - Instance name – a unique, immutable ID that is generated by &PRODUCT; and can not be modified by the user. This name conforms to the requirements in IETF RFC 1123. - Display name – the name displayed in the &PRODUCT; web UI. Can be set by the user. Defaults to instance name. - Name – host name that the DHCP server assigns to the VM. Can be set by the user. Defaults to instance name - - Guest VMs can be configured to be Highly Available (HA). An HA-enabled VM is monitored by the system. If the system detects that the VM is down, it will attempt to restart the VM, possibly on a different host. For more information, see HA-Enabled Virtual Machines on - Each new VM is allocated one public IP address. When the VM is started, &PRODUCT; automatically creates a static NAT between this public IP address and the private IP address of the VM. - If elastic IP is in use (with the NetScaler load balancer), the IP address initially allocated to the new VM is not marked as elastic. The user must replace the automatically configured IP with a specifically acquired elastic IP, and set up the static NAT mapping between this new IP and the guest VM’s private IP. The VM’s original IP address is then released and returned to the pool of available public IPs. - &PRODUCT; cannot distinguish a guest VM that was shut down by the user (such as with the “shutdown†command in Linux) from a VM that shut down unexpectedly. If an HA-enabled VM is shut down from inside the VM, &PRODUCT; will restart it. To shut down an HA-enabled VM, you must go through the &PRODUCT; UI or API. + About Working with Virtual Machines + &PRODUCT; provides administrators with complete control over the lifecycle of all guest VMs executing in the cloud. &PRODUCT; provides several guest management operations for end users and administrators. VMs may be stopped, started, rebooted, and destroyed. + Guest VMs have a name and group. VM names and groups are opaque to &PRODUCT; and are available for end users to organize their VMs. Each VM can have three names for use in different contexts. Only two of these names can be controlled by the user: + + Instance name – a unique, immutable ID that is generated by &PRODUCT;, and can not be modified by the user. This name conforms to the requirements in IETF RFC 1123. + Display name – the name displayed in the &PRODUCT; web UI. Can be set by the user. Defaults to instance name. + Name – host name that the DHCP server assigns to the VM. Can be set by the user. Defaults to instance name + + Guest VMs can be configured to be Highly Available (HA). An HA-enabled VM is monitored by the system. If the system detects that the VM is down, it will attempt to restart the VM, possibly on a different host. For more information, see HA-Enabled Virtual Machines on + Each new VM is allocated one public IP address. When the VM is started, &PRODUCT; automatically creates a static NAT between this public IP address and the private IP address of the VM. + If elastic IP is in use (with the NetScaler load balancer), the IP address initially allocated to the new VM is not marked as elastic. The user must replace the automatically configured IP with a specifically acquired elastic IP, and set up the static NAT mapping between this new IP and the guest VM’s private IP. The VM’s original IP address is then released and returned to the pool of available public IPs. + &PRODUCT; cannot distinguish a guest VM that was shut down by the user (such as with the “shutdown†command in Linux) from a VM that shut down unexpectedly. If an HA-enabled VM is shut down from inside the VM, &PRODUCT; will restart it. To shut down an HA-enabled VM, you must go through the &PRODUCT; UI or API.
diff --git a/docs/en-US/about-zones.xml b/docs/en-US/about-zones.xml index a05a9a6e5..8f6cd06e6 100644 --- a/docs/en-US/about-zones.xml +++ b/docs/en-US/about-zones.xml @@ -1,30 +1,34 @@ - %BOOK_ENTITIES; ]> -
- About Zones - A zone is the largest organizational unit within a &PRODUCT; deployment. A zone typically corresponds to a single datacenter, although it is permissible to have multiple zones in a datacenter. The benefit of organizing infrastructure into zones is to provide physical isolation and redundancy. For example, each zone can have its own power supply and network uplink, and the zones can be widely separated geographically (though this is not required). + About Zones + A zone is the second largest organizational unit within a &PRODUCT; deployment. A zone + typically corresponds to a single datacenter, although it is permissible to have multiple + zones in a datacenter. The benefit of organizing infrastructure into zones is to provide + physical isolation and redundancy. For example, each zone can have its own power supply and + network uplink, and the zones can be widely separated geographically (though this is not + required). A zone consists of: One or more pods. Each pod contains one or more clusters of hosts and one or more primary storage servers. @@ -34,7 +38,7 @@ - zone-overview.png: Nested structure of a simple zone + zone-overview.png: Nested structure of a simple zone. Zones are visible to the end user. When a user starts a guest VM, the user must select a zone for their guest. Users might also be required to copy their private templates to additional zones to enable creation of guest VMs using their templates in those zones. Zones can be public or private. Public zones are visible to all users. This means that any user may create a guest in that zone. Private zones are reserved for a specific domain. Only users in that domain or its subdomains may create guests in that zone. @@ -47,5 +51,6 @@ How many primary storage servers to place in each cluster and total capacity for the storage servers. How much secondary storage to deploy in a zone. - When you add a new zone, you will be prompted to configure the zone’s physical network and add the first pod, cluster, host, primary storage, and secondary storage. + When you add a new zone using the &PRODUCT; UI, you will be prompted to configure the zone’s physical network + and add the first pod, cluster, host, primary storage, and secondary storage.
diff --git a/docs/en-US/accessing-vms.xml b/docs/en-US/accessing-vms.xml index c77ad4eee..67d9d7741 100644 --- a/docs/en-US/accessing-vms.xml +++ b/docs/en-US/accessing-vms.xml @@ -5,23 +5,22 @@ ]> -
Accessing VMs Any user can access their own virtual machines. The administrator can access all VMs running in the cloud. @@ -33,9 +32,9 @@ To access a VM directly over the network: - The VM must have some port open to incoming traffic. For example, in a basic zone, a new VM might be assigned to a security group which allows incoming traffic. This depends on what security group you picked when creating the VM. In other cases, you can open a port by setting up a port forwarding policy. See IP Forwarding and Firewalling. + The VM must have some port open to incoming traffic. For example, in a basic zone, a new VM might be assigned to a security group which allows incoming traffic. This depends on what security group you picked when creating the VM. In other cases, you can open a port by setting up a port forwarding policy. See . If a port is open but you can not access the VM using ssh, it’s possible that ssh is not already enabled on the VM. This will depend on whether ssh is enabled in the template you picked when creating the VM. Access the VM through the &PRODUCT; UI and enable ssh on the machine using the commands for the VM’s operating system. - If the network has an external firewall device, you will need to create a firewall rule to allow access. See IP Forwarding and Firewalling. + If the network has an external firewall device, you will need to create a firewall rule to allow access. See .
diff --git a/docs/en-US/accounts-users-domains.xml b/docs/en-US/accounts-users-domains.xml index 854912952..a3f5837db 100644 --- a/docs/en-US/accounts-users-domains.xml +++ b/docs/en-US/accounts-users-domains.xml @@ -5,23 +5,22 @@ ]> -
Accounts, Users, and Domains diff --git a/docs/en-US/accounts.xml b/docs/en-US/accounts.xml index e50568668..aa62f6804 100644 --- a/docs/en-US/accounts.xml +++ b/docs/en-US/accounts.xml @@ -5,21 +5,21 @@ ]> diff --git a/docs/en-US/add-clusters-ovm.xml b/docs/en-US/add-clusters-ovm.xml index aa07dfa65..d0b0688e6 100644 --- a/docs/en-US/add-clusters-ovm.xml +++ b/docs/en-US/add-clusters-ovm.xml @@ -28,12 +28,12 @@ Add a companion non-OVM cluster to the Pod. This cluster provides an environment where the &PRODUCT; System VMs can run. You should have already installed a non-OVM hypervisor on at least one Host to prepare for this step. Depending on which hypervisor you used: - For VMWare, follow the steps in Add Cluster: vSphere. When finished, return here and continue with the next step. + For VMWare, follow the steps in . When finished, return here and continue with the next step. For KVM or XenServer, follow the steps in . When finished, return here and continue with the next step - In the left navigation, choose Infrastructure. In Zones, click View More, then click the zone in which you want to add the cluster. - Click the Compute tab. In the Pods node, click View All. Select the same pod you used in step 1. + In the left navigation, choose Infrastructure. In Zones, click View All, then click the zone in which you want to add the cluster. + Click the Compute and Storage tab. In the Pods node, click View All. Click View Clusters, then click Add Cluster. The Add Cluster dialog is displayed. In Hypervisor, choose OVM. diff --git a/docs/en-US/add-clusters-vsphere.xml b/docs/en-US/add-clusters-vsphere.xml index 6b2dff2a5..c3a0902be 100644 --- a/docs/en-US/add-clusters-vsphere.xml +++ b/docs/en-US/add-clusters-vsphere.xml @@ -71,38 +71,106 @@ In Hypervisor, choose VMware. - Provide the following information in the dialog. The fields below make reference to + Provide the following information in the dialog. The fields below make reference to the values from vCenter. + + + + + + addcluster.png: add a cluster + + - Cluster Name. Enter the name of the cluster you created in vCenter. For example, - "cloud.cluster.2.2.1" + Cluster Name: Enter the name of the cluster you + created in vCenter. For example, "cloud.cluster.2.2.1" + + + vCenter Username: Enter the username that &PRODUCT; + should use to connect to vCenter. This user must have all the administrative + privileges. + + + CPU overcommit ratio: Enter the CPU overcommit + ratio for the cluster. The value you enter determines the CPU consumption of each VM in + the selected cluster. By increasing the over-provisioning ratio, more resource capacity + will be used. If no value is specified, the value is defaulted to 1, which implies no + over-provisioning is done. + + + RAM overcommit ratio: Enter the RAM overcommit + ratio for the cluster. The value you enter determines the memory consumption of each VM + in the selected cluster. By increasing the over-provisioning ratio, more resource + capacity will be used. If no value is specified, the value is defaulted to 1, which + implies no over-provisioning is done. + + + vCenter Host: Enter the hostname or IP address of + the vCenter server. + + + vCenter Password: Enter the password for the user + named above. + + + vCenter Datacenter: Enter the vCenter datacenter + that the cluster is in. For example, "cloud.dc.VM". - vCenter Host. Enter the hostname or IP address of the vCenter server. + Override Public Traffic: Enable this option to + override the zone-wide public traffic for the cluster you are creating. - vCenter Username. Enter the username that &PRODUCT; should use to connect to - vCenter. This user must have all administrative privileges. + Public Traffic vSwitch Type: This option is + displayed only if you enable the Override Public Traffic option. Select a desirable + switch. If the vmware.use.dvswitch global parameter is true, the default option will be + VMware vNetwork Distributed Virtual Switch. + If you have enabled Nexus dvSwitch in the environment, the following parameters for + dvSwitch configuration are displayed: + + + Nexus dvSwitch IP Address: The IP address of the Nexus VSM appliance. + + + Nexus dvSwitch Username: The username required to access the Nexus VSM + appliance. + + + Nexus dvSwitch Password: The password associated with the username specified + above. + + - vCenter Password. Enter the password for the user named above + Override Guest Traffic: Enable this option to + override the zone-wide guest traffic for the cluster you are creating. - vCenter Datacenter. Enter the vCenter datacenter that the cluster is in. For - example, "cloud.dc.VM". + Guest Traffic vSwitch Type: This option is + displayed only if you enable the Override Guest Traffic option. Select a desirable + switch. + If the vmware.use.dvswitch global parameter is true, the default option will be + VMware vNetwork Distributed Virtual Switch. + If you have enabled Nexus dvSwitch in the environment, the following parameters for + dvSwitch configuration are displayed: + + + Nexus dvSwitch IP Address: The IP address of the Nexus VSM appliance. + + + Nexus dvSwitch Username: The username required to access the Nexus VSM + appliance. + + + Nexus dvSwitch Password: The password associated with the username specified + above. + + - - - - - - addcluster.png: add cluster - - There might be a slight delay while the cluster is provisioned. It will - automatically display in the UI + automatically display in the UI. diff --git a/docs/en-US/add-load-balancer-rule.xml b/docs/en-US/add-load-balancer-rule.xml index 8cd0da4b7..2d911feaf 100644 --- a/docs/en-US/add-load-balancer-rule.xml +++ b/docs/en-US/add-load-balancer-rule.xml @@ -4,19 +4,19 @@ %BOOK_ENTITIES; ]>
Adding a Load Balancer Rule @@ -70,6 +70,10 @@ the algorithm for the stickiness policy. See Sticky Session Policies for Load Balancer Rules. + + AutoScale: Click Configure and complete the + AutoScale configuration as explained in . + diff --git a/docs/en-US/add-remove-nic.xml b/docs/en-US/add-remove-nic.xml new file mode 100644 index 000000000..15dc66c2b --- /dev/null +++ b/docs/en-US/add-remove-nic.xml @@ -0,0 +1,127 @@ + + +%BOOK_ENTITIES; +]> + +
+ Reconfiguring Physical Networks in VMs + &PRODUCT; provides you the ability to move VMs between networks and reconfigure a VM's + network. You can remove a VM from a physical network and add to a new physical network. You can + also change the default physical network of a virtual machine. With this functionality, hybrid + or traditional server loads can be accommodated with ease. + This feature is supported on XenServer and KVM hypervisors. + The following APIs have been added to support this feature. These API calls can function + only while the VM is in running or stopped state. +
+ addNicToVirtualMachine + The addNicToVirtualMachine API adds a new NIC to the specified VM on a selected + network. + + + + + parameter + description + Value + + + + + virtualmachineid + The unique ID of the VM to which the NIC is to be added. + true + + + networkid + The unique ID of the network the NIC that you add should apply + to. + true + + + ipaddress + The IP address of the VM on the network. + false + + + + + The network and VM must reside in the same zone. Two VMs with the same name cannot reside + in the same network. Therefore, adding a second VM that duplicates a name on a network will + fail. +
+
+ removeNicFromVirtualMachine + The removeNicFromVirtualMachine API removes a NIC from the specified VM on a selected + network. + + + + + parameter + description + Value + + + + + virtualmachineid + The unique ID of the VM from which the NIC is to be removed. + + true + + + nicid + The unique ID of the NIC that you want to remove. + true + + + + + Removing the default NIC is not allowed. +
+
+ updateDefaultNicForVirtualMachine + The updateDefaultNicForVirtualMachine API updates the specified NIC to be the default one + for a selected VM. + + + + + parameter + description + Value + + + + + virtualmachineid + The unique ID of the VM for which you want to specify the default NIC. + + true + + + nicid + The unique ID of the NIC that you want to set as the default + one. + true + + + + +
+
diff --git a/docs/en-US/added-API-commands-4-1.xml b/docs/en-US/added-API-commands-4-1.xml new file mode 100644 index 000000000..0beb104cf --- /dev/null +++ b/docs/en-US/added-API-commands-4-1.xml @@ -0,0 +1,74 @@ + + +%BOOK_ENTITIES; +]> + +
+ Added API Commands in 4.1 + + + createEgressFirewallRules (creates an egress firewall rule on the guest network.) + + + deleteEgressFirewallRules (deletes a egress firewall rule on the guest network.) + + + listEgressFirewallRules (lists the egress firewall rules configured for a guest + network.) + + + resetSSHKeyForVirtualMachine (Resets the SSHkey for virtual machine.) + + + addBaremetalHost (Adds a new host.) + + + addNicToVirtualMachine (Adds a new NIC to the specified VM on a selected + network.) + + + removeNicFromVirtualMachine (Removes the specified NIC from a selected VM.) + + + updateDefaultNicForVirtualMachine (Updates the specified NIC to be the default one for a + selected VM.) + + + addRegion (Registers a Region into another Region.) + + + updateRegion (Updates Region details: ID, Name, Endpoint, User API Key, and User Secret + Key.) + + + removeRegion (Removes a Region from current Region.) + + + listRegions (Get all the Regions. They can be filtered by using the ID or Name.) + + + getUser (This API can only be used by the Admin. Get user details by using the API Key.) + + + addRegion (Add a region) + removeRegion (Delete a region) + updateRegion (Modify attributes of a region) + listRegions (List regions) + + +
diff --git a/docs/en-US/added-API-commands-4.2.xml b/docs/en-US/added-API-commands-4.2.xml new file mode 100644 index 000000000..4bec148ba --- /dev/null +++ b/docs/en-US/added-API-commands-4.2.xml @@ -0,0 +1,43 @@ + + +%BOOK_ENTITIES; +]> + +
+ Added API Commands in 4.2 + + + addIpToNic + Adds an IP address to the NIC from the guest subnet. The request parameters are: nicid, + ipaddress. + The response parameters are: nicid, ipaddress, networkid + + + removeIpFromNic + Removes the reserved IP for the NIC. The request parameters is: id. + The response parameters are: true, false + + + listNics + Lists the NIC details of the user VM; the API response also contains the Secondary IP + addresses of the NIC. The request parameters are: nicid, virtualmachineid. + The response parameters are: id, ipaddress, secondaryips, gateway, netmask, macaddr, + broadcasturi, isolationuri, isdefault, + + +
diff --git a/docs/en-US/added-API-commands.xml b/docs/en-US/added-API-commands.xml index 208aac29d..99635de46 100644 --- a/docs/en-US/added-API-commands.xml +++ b/docs/en-US/added-API-commands.xml @@ -87,7 +87,7 @@ suspendProject (Suspends a project) listProjects (Lists projects and provides detailed information for listed projects) - addAccountToProject (Adds acoount to a project) + addAccountToProject (Adds account to a project) deleteAccountFromProject (Deletes account from the project) diff --git a/docs/en-US/added-error-codes.xml b/docs/en-US/added-error-codes.xml index dbfea2635..ae7389122 100644 --- a/docs/en-US/added-error-codes.xml +++ b/docs/en-US/added-error-codes.xml @@ -24,7 +24,7 @@
Added &PRODUCT; Error Codes - You can now find the &PRODUCT;-specific error code in the exception response for each type of exception. The following list of error codes is added to the new class named CSExceptionErrorCode. These codes are applicable in &PRODUCT; 3.0.3 and later versions. + You can now find the &PRODUCT;-specific error code in the exception response for each type of exception. The following list of error codes is added to the new class named CSExceptionErrorCode. diff --git a/docs/en-US/advanced-zone-guest-ip-addresses.xml b/docs/en-US/advanced-zone-guest-ip-addresses.xml index b5d10a02d..66bc08266 100644 --- a/docs/en-US/advanced-zone-guest-ip-addresses.xml +++ b/docs/en-US/advanced-zone-guest-ip-addresses.xml @@ -1,28 +1,31 @@ - %BOOK_ENTITIES; ]> -
- Advanced Zone Guest IP Addresses - When advanced networking is used, the administrator can create additional networks for use by the guests. These networks can span the zone and be available to all accounts, or they can be scoped to a single account, in which case only the named account may create guests that attach to these networks. The networks are defined by a VLAN ID, IP range, and gateway. The administrator may provision thousands of these networks if desired. + Advanced Zone Guest IP Addresses + When advanced networking is used, the administrator can create additional networks for use + by the guests. These networks can span the zone and be available to all accounts, or they can be + scoped to a single account, in which case only the named account may create guests that attach + to these networks. The networks are defined by a VLAN ID, IP range, and gateway. The + administrator may provision thousands of these networks if desired. Additionally, the + administrator can reserve a part of the IP address space for non-&PRODUCT; VMs and + servers.
diff --git a/docs/en-US/advanced-zone-network-traffic-types.xml b/docs/en-US/advanced-zone-network-traffic-types.xml index 9f475cf3f..d80359293 100644 --- a/docs/en-US/advanced-zone-network-traffic-types.xml +++ b/docs/en-US/advanced-zone-network-traffic-types.xml @@ -1,29 +1,28 @@ - %BOOK_ENTITIES; ]> -
- Advanced Zone Network Traffic Types + Advanced Zone Network Traffic Types When advanced networking is used, there can be multiple physical networks in the zone. Each physical network can carry one or more traffic types, and you need to let &PRODUCT; know which type of network traffic you want each network to carry. The traffic types in an advanced zone are: Guest. When end users run VMs, they generate guest traffic. The guest VMs communicate with each other over a network that can be referred to as the guest network. This network can be isolated or shared. In an isolated guest network, the administrator needs to reserve VLAN ranges to provide isolation for each &PRODUCT; account’s network (potentially a large number of VLANs). In a shared guest network, all guest VMs share a single network. diff --git a/docs/en-US/advanced-zone-physical-network-configuration.xml b/docs/en-US/advanced-zone-physical-network-configuration.xml index 2c3d9b354..e47c0fd6d 100644 --- a/docs/en-US/advanced-zone-physical-network-configuration.xml +++ b/docs/en-US/advanced-zone-physical-network-configuration.xml @@ -26,4 +26,4 @@ xmlns:xi="http://www.w3.org/2001/XInclude"/> -
\ No newline at end of file +
diff --git a/docs/en-US/advanced-zone-public-ip-addresses.xml b/docs/en-US/advanced-zone-public-ip-addresses.xml index eeb94045e..82b71d1f2 100644 --- a/docs/en-US/advanced-zone-public-ip-addresses.xml +++ b/docs/en-US/advanced-zone-public-ip-addresses.xml @@ -1,27 +1,26 @@ - %BOOK_ENTITIES; ]> -
Advanced Zone Public IP Addresses When advanced networking is used, the administrator can create additional networks for use by the guests. These networks can span the zone and be available to all accounts, or they can be scoped to a single account, in which case only the named account may create guests that attach to these networks. The networks are defined by a VLAN ID, IP range, and gateway. The administrator may provision thousands of these networks if desired. diff --git a/docs/en-US/alerts.xml b/docs/en-US/alerts.xml index b7f34d02a..ebea4b808 100644 --- a/docs/en-US/alerts.xml +++ b/docs/en-US/alerts.xml @@ -4,50 +4,50 @@ %BOOK_ENTITIES; ]> - Alerts - The following is the list of alert type numbers. The current alerts can be found by calling listAlerts. - MEMORY = 0 - CPU = 1 - STORAGE =2 - STORAGE_ALLOCATED = 3 - PUBLIC_IP = 4 - PRIVATE_IP = 5 - HOST = 6 - USERVM = 7 - DOMAIN_ROUTER = 8 - CONSOLE_PROXY = 9 - ROUTING = 10// lost connection to default route (to the gateway) - STORAGE_MISC = 11 // lost connection to default route (to the gateway) - USAGE_SERVER = 12 // lost connection to default route (to the gateway) - MANAGMENT_NODE = 13 // lost connection to default route (to the gateway) - DOMAIN_ROUTER_MIGRATE = 14 - CONSOLE_PROXY_MIGRATE = 15 - USERVM_MIGRATE = 16 - VLAN = 17 - SSVM = 18 - USAGE_SERVER_RESULT = 19 - STORAGE_DELETE = 20; - UPDATE_RESOURCE_COUNT = 21; //Generated when we fail to update the resource count - USAGE_SANITY_RESULT = 22; - DIRECT_ATTACHED_PUBLIC_IP = 23; - LOCAL_STORAGE = 24; - RESOURCE_LIMIT_EXCEEDED = 25; //Generated when the resource limit exceeds the limit. Currently used for recurring snapshots only - \ No newline at end of file + Alerts + The following is the list of alert type numbers. The current alerts can be found by calling listAlerts. + MEMORY = 0 + CPU = 1 + STORAGE =2 + STORAGE_ALLOCATED = 3 + PUBLIC_IP = 4 + PRIVATE_IP = 5 + HOST = 6 + USERVM = 7 + DOMAIN_ROUTER = 8 + CONSOLE_PROXY = 9 + ROUTING = 10// lost connection to default route (to the gateway) + STORAGE_MISC = 11 // lost connection to default route (to the gateway) + USAGE_SERVER = 12 // lost connection to default route (to the gateway) + MANAGMENT_NODE = 13 // lost connection to default route (to the gateway) + DOMAIN_ROUTER_MIGRATE = 14 + CONSOLE_PROXY_MIGRATE = 15 + USERVM_MIGRATE = 16 + VLAN = 17 + SSVM = 18 + USAGE_SERVER_RESULT = 19 + STORAGE_DELETE = 20; + UPDATE_RESOURCE_COUNT = 21; //Generated when we fail to update the resource count + USAGE_SANITY_RESULT = 22; + DIRECT_ATTACHED_PUBLIC_IP = 23; + LOCAL_STORAGE = 24; + RESOURCE_LIMIT_EXCEEDED = 25; //Generated when the resource limit exceeds the limit. Currently used for recurring snapshots only + diff --git a/docs/en-US/api-calls.xml b/docs/en-US/api-calls.xml index 1fe6f0267..af4073ac6 100644 --- a/docs/en-US/api-calls.xml +++ b/docs/en-US/api-calls.xml @@ -5,28 +5,29 @@ ]> Calling the &PRODUCT; API - + + diff --git a/docs/en-US/api-reference.xml b/docs/en-US/api-reference.xml index 983e76f2a..9a1acc145 100644 --- a/docs/en-US/api-reference.xml +++ b/docs/en-US/api-reference.xml @@ -19,6 +19,6 @@
API Reference Documentation You can find all the API reference documentation at the below site: - http://incubator.apache.org/cloudstack/docs/api/ + http://cloudstack.apache.org/docs/api/
diff --git a/docs/en-US/api-throttling.xml b/docs/en-US/api-throttling.xml new file mode 100644 index 000000000..908e22389 --- /dev/null +++ b/docs/en-US/api-throttling.xml @@ -0,0 +1,67 @@ + + +%BOOK_ENTITIES; +]> + + + +
+ Limiting the Rate of API Requests + You can limit the rate at which API requests can be placed for each + account. This is useful to avoid malicious attacks on the Management Server, prevent + performance degradation, and provide fairness to all accounts. + If the number of API calls exceeds the threshold, an error message is returned for any additional API calls. + The caller will have to retry these API calls at another time. +
+ Configuring the API Request Rate + To control the API request rate, use the following global configuration + settings: + + api.throttling.enabled - Enable/Disable API throttling. By default, this setting is false, so + API throttling is not enabled. + api.throttling.interval (in seconds) - Time interval during which the number of API requests is to be counted. + When the interval has passed, the API count is reset to 0. + api.throttling.max - Maximum number of APIs that can be placed within the api.throttling.interval period. + api.throttling.cachesize - Cache size for storing API counters. + Use a value higher than the total number of accounts managed by the cloud. + One cache entry is needed for each account, to store the running API total for that account. + + +
+
+ Limitations on API Throttling + The following limitations exist in the current implementation of this feature. + Even with these limitations, &PRODUCT; is still able to effectively use API throttling to + avoid malicious attacks causing denial of service. + + + In a deployment with multiple Management Servers, + the cache is not synchronized across them. + In this case, &PRODUCT; might not be able to + ensure that only the exact desired number of API requests are allowed. + In the worst case, the number of API calls that might be allowed is + (number of Management Servers) * (api.throttling.max). + + The API commands resetApiLimit and getApiLimit are limited to the + Management Server where the API is invoked. + + +
+
\ No newline at end of file diff --git a/docs/en-US/attach-iso-to-vm.xml b/docs/en-US/attach-iso-to-vm.xml index 30e5d5194..8e0d4247f 100644 --- a/docs/en-US/attach-iso-to-vm.xml +++ b/docs/en-US/attach-iso-to-vm.xml @@ -5,35 +5,36 @@ ]> -
- Attaching an ISO to a VM - - In the left navigation, click Instances. - Choose the virtual machine you want to work with. - Click the Attach ISO button - - - - iso.png: Depicts adding an iso image - - In the Attach ISO dialog box, select the desired ISO. - Click OK - + Attaching an ISO to a VM + + In the left navigation, click Instances. + Choose the virtual machine you want to work with. + Click the Attach ISO button. + + + + + iso.png: depicts adding an iso image + + + In the Attach ISO dialog box, select the desired ISO. + Click OK. +
diff --git a/docs/en-US/autoscale.xml b/docs/en-US/autoscale.xml index d63281f9e..26e795b7b 100644 --- a/docs/en-US/autoscale.xml +++ b/docs/en-US/autoscale.xml @@ -34,8 +34,10 @@ AutoScaling to launch an additional VM whenever CPU usage exceeds 80 percent for 15 minutes, or to remove a VM whenever CPU usage is less than 20 percent for 30 minutes. &PRODUCT; uses the NetScaler load balancer to monitor all aspects of a system's health and - work in unison with &PRODUCT; to initiate scale-up or scale-down actions. The supported - NetScaler version is 10.0. + work in unison with &PRODUCT; to initiate scale-up or scale-down actions. + + AutoScale is supported on NetScaler Release 10 Build 73.e and beyond. + Prerequisites Before you configure an AutoScale rule, consider the following: diff --git a/docs/en-US/aws-ec2-configuration.xml b/docs/en-US/aws-ec2-configuration.xml index 7d26027ba..dd7732ebc 100644 --- a/docs/en-US/aws-ec2-configuration.xml +++ b/docs/en-US/aws-ec2-configuration.xml @@ -28,14 +28,13 @@ The software that provides AWS API compatibility is installed along with &PRODUCT;. You must enable the services and perform some setup steps prior to using it. - Set the global configuration parameters for each service to true. + Set the global configuration parameters for each service to true. See . Create a set of &PRODUCT; service offerings with names that match the Amazon service offerings. You can do this through the &PRODUCT; UI as described in the Administration Guide. Be sure you have included the Amazon default service offering, m1.small. As well as any EC2 instance types that you will use. - If you did not already do so when you set the configuration parameter in step 1, - restart the Management Server. + If you did not already do so when you set the configuration parameter in step , restart the Management Server. # service cloud-management restart diff --git a/docs/en-US/aws-ec2-introduction.xml b/docs/en-US/aws-ec2-introduction.xml index 538c09d5a..4cf071bcb 100644 --- a/docs/en-US/aws-ec2-introduction.xml +++ b/docs/en-US/aws-ec2-introduction.xml @@ -45,7 +45,7 @@ Available in fresh installations of &PRODUCT;. Not available through upgrade of previous versions. - Features such as Elastic IP (EIP) and Elastic Load Balacing (ELB) are only available in an infrastructure + Features such as Elastic IP (EIP) and Elastic Load Balancing (ELB) are only available in an infrastructure with a Citrix NetScaler device. Users accessing a Zone with a NetScaler device will need to use a NetScaler-enabled network offering (DefaultSharedNetscalerEIP and ELBNetworkOffering). diff --git a/docs/en-US/aws-ec2-user-setup.xml b/docs/en-US/aws-ec2-user-setup.xml index edc371ef3..a2d89187f 100644 --- a/docs/en-US/aws-ec2-user-setup.xml +++ b/docs/en-US/aws-ec2-user-setup.xml @@ -45,7 +45,7 @@ AWS API User Registration Each user must perform a one-time registration. The user follows these steps: - + Obtain the following by looking in the &PRODUCT; UI, using the API, or asking the cloud administrator: @@ -66,10 +66,10 @@ cloudstack-aws-api-register. If you do not have the source then download the script using the following command. - wget -O cloudstack-aws-api-register "https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;a=blob_plain;f=awsapi-setup/setup/cloudstack-aws-api-register;hb=HEAD" + wget -O cloudstack-aws-api-register "https://git-wip-us.apache.org/repos/asf?p=cloudstack.git;a=blob_plain;f=awsapi-setup/setup/cloudstack-aws-api-register;hb=4.1" - Then execute it, using the parameter values that were obtained in step 1. An example is shown below. + Then execute it, using the access and secret keys that were obtained in step . An example is shown below. $ cloudstack-aws-api-register --apikey=User’s &PRODUCT; API key --secretkey=User’s &PRODUCT; Secret key --cert=/path/to/cert.pem --url=http://&PRODUCT;.server:7080/awsapi diff --git a/docs/en-US/basic-zone-configuration.xml b/docs/en-US/basic-zone-configuration.xml index e0c67d81a..eb8b5068f 100644 --- a/docs/en-US/basic-zone-configuration.xml +++ b/docs/en-US/basic-zone-configuration.xml @@ -1,29 +1,28 @@ - %BOOK_ENTITIES; ]> -
- Basic Zone Configuration + Basic Zone Configuration After you select Basic in the Add Zone wizard and click Next, you will be asked to enter the following details. Then click Next. @@ -66,7 +65,7 @@ Choose which traffic types will be carried by the physical network. The traffic types are management, public, guest, and storage traffic. For more information about the types, roll over the icons to display their tool tips, or see Basic Zone Network Traffic Types. This screen starts out with some traffic types already assigned. To add more, drag and drop traffic types onto the network. You can also change the network name if desired. - (Introduced in version 3.0.1) Assign a network traffic label to each traffic type on the physical network. These labels must match the labels you have already defined on the hypervisor host. To assign each label, click the Edit button under the traffic type icon. A popup dialog appears where you can type the label, then click OK. + 3. (Introduced in version 3.0.1) Assign a network traffic label to each traffic type on the physical network. These labels must match the labels you have already defined on the hypervisor host. To assign each label, click the Edit button under the traffic type icon. A popup dialog appears where you can type the label, then click OK. These traffic labels will be defined only for the hypervisor selected for the first cluster. For all other hypervisors, the labels can be configured after the zone is created. Click Next. diff --git a/docs/en-US/basic-zone-guest-ip-addresses.xml b/docs/en-US/basic-zone-guest-ip-addresses.xml index 57ef9e7c2..5143f71f1 100644 --- a/docs/en-US/basic-zone-guest-ip-addresses.xml +++ b/docs/en-US/basic-zone-guest-ip-addresses.xml @@ -1,27 +1,26 @@ - %BOOK_ENTITIES; ]> -
Basic Zone Guest IP Addresses When basic networking is used, &PRODUCT; will assign IP addresses in the CIDR of the pod to the guests in that pod. The administrator must add a Direct IP range on the pod for this purpose. These IPs are in the same VLAN as the hosts. diff --git a/docs/en-US/basic-zone-network-traffic-types.xml b/docs/en-US/basic-zone-network-traffic-types.xml index fa3be0f44..70789d0fa 100644 --- a/docs/en-US/basic-zone-network-traffic-types.xml +++ b/docs/en-US/basic-zone-network-traffic-types.xml @@ -1,29 +1,28 @@ - %BOOK_ENTITIES; ]> -
- Basic Zone Network Traffic Types + Basic Zone Network Traffic Types When basic networking is used, there can be only one physical network in the zone. That physical network carries the following traffic types: Guest. When end users run VMs, they generate guest traffic. The guest VMs communicate with each other over a network that can be referred to as the guest network. Each pod in a basic zone is a broadcast domain, and therefore each pod has a different IP range for the guest network. The administrator must configure the IP range for each pod. diff --git a/docs/en-US/basic-zone-physical-network-configuration.xml b/docs/en-US/basic-zone-physical-network-configuration.xml index 32aeb847d..4b1d24f26 100644 --- a/docs/en-US/basic-zone-physical-network-configuration.xml +++ b/docs/en-US/basic-zone-physical-network-configuration.xml @@ -5,25 +5,24 @@ ]> -
- Basic Zone Physical Network Configuration - In a basic network, configuring the physical network is fairly straightforward. You only need to configure one guest network to carry traffic that is generated by guest VMs. When you first add a zone to &PRODUCT;, you set up the guest network through the Add Zone screens. + Basic Zone Physical Network Configuration + In a basic network, configuring the physical network is fairly straightforward. You only need to configure one guest network to carry traffic that is generated by guest VMs. When you first add a zone to &PRODUCT;, you set up the guest network through the Add Zone screens.
diff --git a/docs/en-US/best-practices-for-vms.xml b/docs/en-US/best-practices-for-vms.xml index 04c3c0aa2..bba20c6fc 100644 --- a/docs/en-US/best-practices-for-vms.xml +++ b/docs/en-US/best-practices-for-vms.xml @@ -4,36 +4,36 @@ %BOOK_ENTITIES; ]>
- Best Practices for Virtual Machines - The &PRODUCT; administrator should monitor the total number of VM instances in each - cluster, and disable allocation to the cluster if the total is approaching the maximum that - the hypervisor can handle. Be sure to leave a safety margin to allow for the possibility of - one or more hosts failing, which would increase the VM load on the other hosts as the VMs - are automatically redeployed. Consult the documentation for your chosen hypervisor to find - the maximum permitted number of VMs per host, then use &PRODUCT; global configuration - settings to set this as the default limit. Monitor the VM activity in each cluster at all - times. Keep the total number of VMs below a safe level that allows for the occasional host - failure. For example, if there are N hosts in the cluster, and you want to allow for one - host in the cluster to be down at any given time, the total number of VM instances you can - permit in the cluster is at most (N-1) * (per-host-limit). Once a cluster reaches this - number of VMs, use the &PRODUCT; UI to disable allocation of more VMs to the - cluster. -
\ No newline at end of file + Best Practices for Virtual Machines + The &PRODUCT; administrator should monitor the total number of VM instances in each + cluster, and disable allocation to the cluster if the total is approaching the maximum that + the hypervisor can handle. Be sure to leave a safety margin to allow for the possibility of + one or more hosts failing, which would increase the VM load on the other hosts as the VMs + are automatically redeployed. Consult the documentation for your chosen hypervisor to find + the maximum permitted number of VMs per host, then use &PRODUCT; global configuration + settings to set this as the default limit. Monitor the VM activity in each cluster at all + times. Keep the total number of VMs below a safe level that allows for the occasional host + failure. For example, if there are N hosts in the cluster, and you want to allow for one + host in the cluster to be down at any given time, the total number of VM instances you can + permit in the cluster is at most (N-1) * (per-host-limit). Once a cluster reaches this + number of VMs, use the &PRODUCT; UI to disable allocation of more VMs to the + cluster. +
diff --git a/docs/en-US/best-practices.xml b/docs/en-US/best-practices.xml new file mode 100644 index 000000000..41d7cde90 --- /dev/null +++ b/docs/en-US/best-practices.xml @@ -0,0 +1,82 @@ + + +%BOOK_ENTITIES; +]> + + + + + Best Practices + Deploying a cloud is challenging. There are many different technology choices to make, and &PRODUCT; is flexible enough in its configuration that there are many possible ways to combine and configure the chosen technology. This section contains suggestions and requirements about cloud deployments. + These should be treated as suggestions and not absolutes. However, we do encourage anyone planning to build a cloud outside of these guidelines to seek guidance and advice on the project mailing lists. +
+ Process Best Practices + + + A staging system that models the production environment is strongly advised. It is critical if customizations have been applied to &PRODUCT;. + + + Allow adequate time for installation, a beta, and learning the system. Installs with basic networking can be done in hours. Installs with advanced networking usually take several days for the first attempt, with complicated installations taking longer. For a full production system, allow at least 4-8 weeks for a beta to work through all of the integration issues. You can get help from fellow users on the cloudstack-users mailing list. + + +
+
+ Setup Best Practices + + + Each host should be configured to accept connections only from well-known entities such as the &PRODUCT; Management Server or your network monitoring software. + + + Use multiple clusters per pod if you need to achieve a certain switch density. + + + Primary storage mountpoints or LUNs should not exceed 6 TB in size. It is better to have multiple smaller primary storage elements per cluster than one large one. + + + When exporting shares on primary storage, avoid data loss by restricting the range of IP addresses that can access the storage. See "Linux NFS on Local Disks and DAS" or "Linux NFS on iSCSI". + + + NIC bonding is straightforward to implement and provides increased reliability. + + + 10G networks are generally recommended for storage access when larger servers that can support relatively more VMs are used. + + + Host capacity should generally be modeled in terms of RAM for the guests. Storage and CPU may be overprovisioned. RAM may not. RAM is usually the limiting factor in capacity designs. + + + (XenServer) Configure the XenServer dom0 settings to allocate more memory to dom0. This can enable XenServer to handle larger numbers of virtual machines. We recommend 2940 MB of RAM for XenServer dom0. For instructions on how to do this, see http://support.citrix.com/article/CTX126531. The article refers to XenServer 5.6, but the same information applies to XenServer 6.0. + + +
+
+ Maintenance Best Practices + + + Monitor host disk space. Many host failures occur because the host's root disk fills up from logs that were not rotated adequately. + + + Monitor the total number of VM instances in each cluster, and disable allocation to the cluster if the total is approaching the maximum that the hypervisor can handle. Be sure to leave a safety margin to allow for the possibility of one or more hosts failing, which would increase the VM load on the other hosts as the VMs are redeployed. Consult the documentation for your chosen hypervisor to find the maximum permitted number of VMs per host, then use &PRODUCT; global configuration settings to set this as the default limit. Monitor the VM activity in each cluster and keep the total number of VMs below a safe level that allows for the occasional host failure. For example, if there are N hosts in the cluster, and you want to allow for one host in the cluster to be down at any given time, the total number of VM instances you can permit in the cluster is at most (N-1) * (per-host-limit). Once a cluster reaches this number of VMs, use the &PRODUCT; UI to disable allocation to the cluster. + + + The lack of up-do-date hotfixes can lead to data corruption and lost VMs. + Be sure all the hotfixes provided by the hypervisor vendor are applied. Track the release of hypervisor patches through your hypervisor vendor’s support channel, and apply patches as soon as possible after they are released. &PRODUCT; will not track or notify you of required hypervisor patches. It is essential that your hosts are completely up to date with the provided hypervisor patches. The hypervisor vendor is likely to refuse to support any system that is not up to date with patches. +
+
diff --git a/docs/en-US/build-deb.xml b/docs/en-US/build-deb.xml index 37e5a7d74..dca31d23a 100644 --- a/docs/en-US/build-deb.xml +++ b/docs/en-US/build-deb.xml @@ -51,7 +51,7 @@ and packaging them into DEBs by issuing the following command. -$ dpkg-buildpackge -uc -us +$ dpkg-buildpackage -uc -us diff --git a/docs/en-US/build-rpm.xml b/docs/en-US/build-rpm.xml index e983aba8f..ba32ef568 100644 --- a/docs/en-US/build-rpm.xml +++ b/docs/en-US/build-rpm.xml @@ -5,78 +5,82 @@ ]>
- Building RPMs - - While we have defined, and you have presumably already installed the - bootstrap prerequisites, there are a number of build time prerequisites - that need to be resolved. &PRODUCT; uses maven for dependency resolution. - You can resolve the buildtime depdencies for CloudStack by running the - following command: - $ mvn -P deps - - - Now that we have resolved the dependencies we can move on to building &PRODUCT; - and packaging them into RPMs by issuing the following command. - $ ./waf rpm - - - Once this completes, you should find assembled RPMs in - artifacts/rpmbuild/RPMS/x86_64 - -
- Creating a yum repo - - While RPMs is an ideal packaging format - it's most easily consumed from - yum repositories over a network. We'll move into the directory with the - newly created RPMs by issuing the following command: - $ cd artifacts/rpmbuild/RPMS/x86_64 - - - Next we'll issue a command to create the repository metadata by - issuing the following command: - $ createrepo ./ - - - The files and directories within our current working directory can now - be uploaded to a web server and serve as a yum repository - + Building RPMs from Source + As mentioned previously in , you will need to install several prerequisites before you can build packages for &PRODUCT;. Here we'll assume you're working with a 64-bit build of CentOS or Red Hat Enterprise Linux. + # yum groupinstall "Development Tools" + # yum install java-1.6.0-openjdk-devel.x86_64 genisoimage mysql mysql-server ws-common-utils MySQL-python tomcat6 createrepo + Next, you'll need to install build-time dependencies for CloudStack with + Maven. We're using Maven 3, so you'll want to + grab a Maven 3 tarball + and uncompress it in your home directory (or whatever location you prefer): + $ tar zxvf apache-maven-3.0.4-bin.tar.gz + $ export PATH=/usr/local/apache-maven-3.0.4//bin:$PATH + Maven also needs to know where Java is, and expects the JAVA_HOME environment + variable to be set: + $ export JAVA_HOME=/usr/lib/jvm/jre-1.6.0-openjdk.x86_64/ + Verify that Maven is installed correctly: + $ mvn --version + You probably want to ensure that your environment variables will survive a logout/reboot. + Be sure to update ~/.bashrc with the PATH and JAVA_HOME variables. + + Building RPMs for $PRODUCT; is fairly simple. Assuming you already have the source downloaded and have uncompressed the tarball into a local directory, you're going to be able to generate packages in just a few minutes. + Packaging has Changed + If you've created packages for $PRODUCT; previously, you should be aware that the process has changed considerably since the project has moved to using Apache Maven. Please be sure to follow the steps in this section closely. + +
+ Generating RPMS + Now that we have the prerequisites and source, you will cd to the packaging/centos63/ directory. + Generating RPMs is done using the package.sh script: + $./package.sh + + That will run for a bit and then place the finished packages in dist/rpmbuild/RPMS/x86_64/. + You should see seven RPMs in that directory: cloudstack-agent-4.1.0-SNAPSHOT.el6.x86_64.rpm, cloudstack-awsapi-4.1.0-SNAPSHOT.el6.x86_64.rpm, cloudstack-cli-4.1.0-SNAPSHOT.el6.x86_64.rpm, cloudstack-common-4.1.0-SNAPSHOT.el6.x86_64.rpm, cloudstack-docs-4.1.0-SNAPSHOT.el6.x86_64.rpm, cloudstack-management-4.1.0-SNAPSHOT.el6.x86_64.rpm, and cloudstack-usage-4.1.0-SNAPSHOT.el6.x86_64.rpm. +
+ Creating a yum repo + + While RPMs is a useful packaging format - it's most easily consumed from Yum repositories over a network. The next step is to create a Yum Repo with the finished packages: + $ mkdir -p ~/tmp/repo + $ cp dist/rpmbuild/RPMS/x86_64/*rpm ~/tmp/repo/ + $ createrepo ~/tmp/repo + + + The files and directories within ~/tmp/repo can now be uploaded to a web server and serve as a yum repository. + +
+
+ Configuring your systems to use your new yum repository + + Now that your yum repository is populated with RPMs and metadata + we need to configure the machines that need to install $PRODUCT;. + Create a file named /etc/yum.repos.d/cloudstack.repo with this information: + + [apache-cloudstack] + name=Apache CloudStack + baseurl=http://webserver.tld/path/to/repo + enabled=1 + gpgcheck=0 + + + Completing this step will allow you to easily install $PRODUCT; on a number of machines across the network. + +
+
-
- Configuring your systems to use your new yum repository - - Now that your yum repository is populated with RPMs and metadata - we need to configure our machines that need to install CloudStack. - We will create a file at /etc/yum.repos.d/cloudstack.repo - with the following content: - -[apache-cloudstack] -name=Apache CloudStack -baseurl=http://webserver.tld/path/to/repo -enabled=1 -gpgcheck=0 - - - - Completing this step will allow you to easily install CloudStack on a number of - machines across the network. - -
-
diff --git a/docs/en-US/building-documentation.xml b/docs/en-US/building-documentation.xml new file mode 100644 index 000000000..8ee63b06e --- /dev/null +++ b/docs/en-US/building-documentation.xml @@ -0,0 +1,40 @@ + + +%BOOK_ENTITIES; +]> + + + +
+ Building &PRODUCT; Documentation + To build a specific guide, go to the source tree of the documentation in /docs and identify the guide you want to build. + Currently there are four guides plus the release notes, all defined in publican configuration files: + + publican-adminguide.cfg + publican-devguide.cfg + publican-installation.cfg + publican-plugin-niciranvp.cfg + publican-release-notes.cfg + + To build the Developer guide for example, do the following: + publican build --config=publican-devguide.cfg --formats=pdf --langs=en-US + A pdf file will be created in tmp/en-US/pdf, you may choose to build the guide in a different format like html. In that case just replace the format value. + +
diff --git a/docs/en-US/building-marvin.xml b/docs/en-US/building-marvin.xml index 3dac9d65d..e33c4cb22 100644 --- a/docs/en-US/building-marvin.xml +++ b/docs/en-US/building-marvin.xml @@ -25,9 +25,9 @@
Building and Installing Marvin Marvin is built with Maven and is dependent on APIdoc. To build it do the following in the root tree of &PRODUCT;: - mvn -P developer -l :cloud-apidoc - mvn -P developer -l :cloud-marvin - If successfull the build will have created the cloudstackAPI Python package under tools/marvin/marvin/cloudstackAPI as well as a gziped Marvin package under tools/marvin dist. To install the Python Marvin module do the following in tools/marvin: + mvn -P developer -pl :cloud-apidoc + mvn -P developer -pl :cloud-marvin + If successful the build will have created the cloudstackAPI Python package under tools/marvin/marvin/cloudstackAPI as well as a gziped Marvin package under tools/marvin dist. To install the Python Marvin module do the following in tools/marvin: sudo python ./setup.py install The dependencies will be downloaded the Python module installed and you should be able to use Marvin in Python. Check that you can import the module before starting to use it. $ python diff --git a/docs/en-US/building-translation.xml b/docs/en-US/building-translation.xml new file mode 100644 index 000000000..dd66365cd --- /dev/null +++ b/docs/en-US/building-translation.xml @@ -0,0 +1,75 @@ + + +%BOOK_ENTITIES; +]> + + + +
+ Translating &PRODUCT; Documentation + Now that you know how to build the documentation with Publican, let's move on to building it in different languages. Publican helps us + build the documentation in various languages by using Portable Object Template (POT) files and Portable Objects (PO) files for each language. + + The POT files are generated by parsing all the DocBook files in the language of origin, en-US for us, and creating a long list of strings + for each file that needs to be translated. The translation can be done by hand directly in the PO files of each target language or via the + transifex service. + + + Transifex is a free service to help translate documents and organize distributed teams + of translators. Anyone interested in helping with the translation should get an account on Transifex + + + Three &PRODUCT; projects exist on Transifex. It is recommended to tour those projects to become familiar with Transifex: + + https://www.transifex.com/projects/p/ACS_DOCS/ + https://www.transifex.com/projects/p/ACS_Runbook/ + https://www.transifex.com/projects/p/CloudStackUI/ + + + + + The pot directory should already exist in the source tree. If you want to build an up to date translation, you might have to update it to include any pot file that was not previously generated. + To register new resources on transifex, you will need to be an admin of the transifex &PRODUCT; site. Send an email to the developer list if you want access. + + First we need to generate the .pot files for all the DocBook xml files needed for a particular guide. This is well explained at the publican website in a section on + how to prepare a document for translation. + The basic command to execute to build the pot files for the developer guide is: + publican update_pot --config=publican-devguide.cfg + This will create a pot directory with pot files in it, one for each corresponding xml files needed to build the guide. Once generated, all pots files need to be configured for translation using transifex this is best done by using the transifex client that you can install with the following command (For RHEL and its derivatives): + yum install transifex-client + The transifex client is also available via PyPi and you can install it like this: + easy_install transifex-client + Once you have installed the transifex client you can run the settx.sh script in the docs directory. This will create the .tx/config file used by transifex to push and pull all translation strings. + All the resource files need to be uploaded to transifex, this is done with the transifex client like so: + tx push -s + Once the translators have completed translation of the documentation, the translated strings can be pulled from transifex like so: + tx pull -a + If you wish to push specific resource files or pull specific languages translation strings, you can do so with the transifex client. A complete documentation of + the client is available on the client website + When you pull new translation strings a directory will be created corresponding to the language of the translation. This directory will contain PO files that will be used by Publican to create the documentation in that specific language. For example assuming that you pull the French translation whose language code is fr-FR, you will build the documentation with publican: + publican build --config=publican-devguide.cfg --formats=html --langs=fr-FR + + + Some languages like Chinese or Japanese will not render well in pdf format and html should be used. + + + + +
diff --git a/docs/en-US/building-with-maven-steps.xml b/docs/en-US/building-with-maven-steps.xml index 319654fb2..1c15bfa96 100644 --- a/docs/en-US/building-with-maven-steps.xml +++ b/docs/en-US/building-with-maven-steps.xml @@ -25,7 +25,7 @@
Building Steps &PRODUCT; uses git for source version control, first make sure you have the source code by pulling it: - git clone https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git + git clone https://git-wip-us.apache.org/repos/asf/cloudstack.git Several Project Object Models (POM) are defined to deal with the various build targets of &PRODUCT;. Certain features require some packages that are not compatible with the Apache license and therefore need to be downloaded on your own. Check the wiki for additional information https://cwiki.apache.org/CLOUDSTACK/building-with-maven.html. In order to build all the open source targets of &PRODUCT; do: mvn clean install The resulting jar files will be in the target directory of the subdirectory of the compiled module. diff --git a/docs/en-US/castor-with-cs.xml b/docs/en-US/castor-with-cs.xml index 5049d33d6..7bf676b9c 100644 --- a/docs/en-US/castor-with-cs.xml +++ b/docs/en-US/castor-with-cs.xml @@ -34,8 +34,7 @@ To configure CAStor: - Install &PRODUCT; 4.0.0-incubating by following the instructions given in the INSTALL.txt - file. + Install &PRODUCT; by following the instructions given in the INSTALL.txt file. You can use the S3 storage system in &PRODUCT; without setting up and installing the compute components. diff --git a/docs/en-US/change-console-proxy-ssl-certificate-domain.xml b/docs/en-US/change-console-proxy-ssl-certificate-domain.xml index 46ceaae1a..3fd05018e 100644 --- a/docs/en-US/change-console-proxy-ssl-certificate-domain.xml +++ b/docs/en-US/change-console-proxy-ssl-certificate-domain.xml @@ -32,14 +32,14 @@ Generate a new 2048-bit private keyopenssl genrsa -des3 -out yourprivate.key 2048 Generate a new certificate CSRopenssl req -new -key yourprivate.key -out yourcertificate.csr Head to the website of your favorite trusted Certificate Authority, purchase an SSL certificate, and submit the CSR. You should receive a valid certificate in return - Convert your private key format into PKCS#8 encrypted format.openssl pkcs8 -topk8 -in yourprivate.key -out yourprivate.pkcs8.encryped.key + Convert your private key format into PKCS#8 encrypted format.openssl pkcs8 -topk8 -in yourprivate.key -out yourprivate.pkcs8.encrypted.key Convert your PKCS#8 encrypted private key into the PKCS#8 format that is compliant with &PRODUCT;openssl pkcs8 -in yourprivate.pkcs8.encrypted.key -out yourprivate.pkcs8.key In the Update SSL Certificate screen of the &PRODUCT; UI, paste the following - Certificate from step 1(c). - Private key from step 1(e). + The Certificate you generated in the previous steps. + The Private key you generated in the previous steps. The desired new domain name; for example, company.com diff --git a/docs/en-US/change-network-offering-on-guest-network.xml b/docs/en-US/change-network-offering-on-guest-network.xml index 98f1b63f4..2c7db3e91 100644 --- a/docs/en-US/change-network-offering-on-guest-network.xml +++ b/docs/en-US/change-network-offering-on-guest-network.xml @@ -5,40 +5,49 @@ ]> - + 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. +-->
- Changing the Network Offering on a Guest Network - A user or administrator can change the network offering that is associated with an existing guest network. - - Log in to the &PRODUCT; UI as an administrator or end user. - If you are changing from a network offering that uses the &PRODUCT; virtual router to one that uses external devices as network service providers, you must first stop all the VMs on the network. See Stopping and Starting VMs. Then return here and continue to the next step - In the left navigation, choose Network - Click the name of the network you want to modify - - - - AttachDiskButton.png: button to attach a volume - . - In Network Offering, choose the new network offering, then click Apply. - A prompt appears asking whether you want to keep the existing CIDR. This is to let you know that if you change the network offering, the CIDR will be affected. Choose No to proceed with the change. - Wait for the update to complete. Don’t try to restart VMs until after the network change is complete. - If you stopped any VMs in step 2, restart them. - + Changing the Network Offering on a Guest Network + A user or administrator can change the network offering that is associated with an existing guest network. + + Log in to the &PRODUCT; UI as an administrator or end user. + If you are changing from a network offering that uses the &PRODUCT; virtual router to one + that uses external devices as network service providers, you must first stop all the + VMs on the network. + See "Stopping and Starting Virtual Machines" in the Administrator's Guide. + See . + In the left navigation, choose Network. + Click the name of the network you want to modify. + In the Details tab, click Edit. + + + + + EditButton.png: button to edit a network + + + In Network Offering, choose the new network offering, then click Apply. + A prompt is displayed asking whether you want to keep the existing CIDR. This is to let you + know that if you change the network offering, the CIDR will be affected. Choose No + to proceed with the change. + Wait for the update to complete. Don’t try to restart VMs until the network change is + complete. + If you stopped any VMs, restart them. + +
-
diff --git a/docs/en-US/changed-apicommands-4.1.xml b/docs/en-US/changed-apicommands-4.1.xml new file mode 100644 index 000000000..1667aafaa --- /dev/null +++ b/docs/en-US/changed-apicommands-4.1.xml @@ -0,0 +1,253 @@ + + +%BOOK_ENTITIES; +]> + +
+ Changed API Commands in 4.1 + + + + + + + API Commands + Description + + + + + + createNetworkOffering + + + The following request parameters have been added: + + + isPersistent + + + startipv6 + + + endipv6 + + + ip6gateway + + + ip6cidr + + + + + + + listNetworkOfferings + listNetworks + + + The following request parameters have been added: + + + isPersistent + This parameter determines if the network or network offering listed are + persistent or not. + + + ip6gateway + + + ip6cidr + + + + + + + createVlanIpRange + + + The following request parameters have been added: + + + startipv6 + + + endipv6 + + + ip6gateway + + + ip6cidr + + + + + + + deployVirtualMachine + + + The following parameter has been added: ip6Address. + The following parameter is updated to accept the IPv6 address: + iptonetworklist. + + + + + CreateZoneCmd + + + The following parameter have been added: ip6dns1, ip6dns2. + + + + + listRouters + listVirtualMachines + + + For nic responses, the following fields have been added. + + + ip6address + + + ip6gateway + + + ip6cidr + + + + + + + listVlanIpRanges + + + For nic responses, the following fields have been added. + + + startipv6 + + + endipv6 + + + ip6gateway + + + ip6cidr + + + + + + + listRouters + listZones + + + For DomainRouter and DataCenter response, the following fields have been + added. + + + ip6dns1 + + + ip6dns2 + + + + + + + addF5LoadBalancer + configureNetscalerLoadBalancer + addNetscalerLoadBalancer + listF5LoadBalancers + configureF5LoadBalancer + listNetscalerLoadBalancers + + + The following response parameter is removed: inline. + + + + listFirewallRules + createFirewallRule + + The following request parameter is added: traffictype (optional). + + + + listUsageRecords + The following response parameter is added: virtualsize. + + + + + deleteIso + + + The following request parameter is added: forced (optional). + + + + + createStoragePool + + + The following request parameters are made mandatory: + + + podid + + + clusterid + + + + + + + listZones + + + The following request parameter is added: securitygroupenabled + + + + createAccount + The following new request parameters are added: accountid, userid + + + createUser + The following new request parameter is added: userid + + + createDomain + The following new request parameter is added: domainid + + + + +
diff --git a/docs/en-US/changing-root-password.xml b/docs/en-US/changing-root-password.xml index 0d2333a2a..880f50fcf 100644 --- a/docs/en-US/changing-root-password.xml +++ b/docs/en-US/changing-root-password.xml @@ -1,29 +1,28 @@ - %BOOK_ENTITIES; ]> - + 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. +-->
- Changing the Root Password + Changing the Root Password During installation and ongoing cloud administration, you will need to log in to the UI as the root administrator. The root administrator account manages the &PRODUCT; deployment, including physical infrastructure. The root administrator can modify configuration settings to change basic functionality, create or delete user accounts, and take many actions that should be performed only by an authorized person. diff --git a/docs/en-US/changing-secondary-storage-ip.xml b/docs/en-US/changing-secondary-storage-ip.xml index 7e146de81..34f93e32c 100644 --- a/docs/en-US/changing-secondary-storage-ip.xml +++ b/docs/en-US/changing-secondary-storage-ip.xml @@ -2,43 +2,43 @@ %BOOK_ENTITIES; -]> +]> - + 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. +-->
- Making API Requests - You can change the secondary storage IP address after it has been provisioned. After changing the IP address on the host, log in to your management server and execute the following commands. Replace HOSTID below with your own value, and change the URL to use the appropriate IP address and path for your server: - - # mysql -p - mysql> use cloud; - mysql> select id from host where type = 'SecondaryStorage'; - mysql> update host_details set value = 'nfs://192.168.160.20/export/mike-ss1' - where host_id = HOSTID and name = 'orig.url'; - mysql> update host set name = 'nfs://192.168.160.20/export/mike-ss1' where type - = 'SecondaryStorage' and id = #; - mysql> update host set url = 'nfs://192.168.160.20/export/mike-ss1' where type - = 'SecondaryStorage' and id = #; - mysql> update host set guid = 'nfs://192.168.160.20/export/mike-ss1' where type - = 'SecondaryStorage' and id = #; - - When copying and pasting a command, be sure the command has pasted as a single line before executing. Some document viewers may introduce unwanted line breaks in copied text. - Then log in to the cloud console UI and stop and start (not reboot) the Secondary Storage VM for that Zone. - -
+ Changing the Secondary Storage IP Address + You can change the secondary storage IP address after it has been provisioned. After changing the IP address on the host, log in to your management server and execute the following commands. Replace HOSTID below with your own value, and change the URL to use the appropriate IP address and path for your server: + + # mysql -p + mysql> use cloud; + mysql> select id from host where type = 'SecondaryStorage'; + mysql> update host_details set value = 'nfs://192.168.160.20/export/mike-ss1' + where host_id = HOSTID and name = 'orig.url'; + mysql> update host set name = 'nfs://192.168.160.20/export/mike-ss1' where type + = 'SecondaryStorage' and id = #; + mysql> update host set url = 'nfs://192.168.160.20/export/mike-ss1' where type + = 'SecondaryStorage' and id = #; + mysql> update host set guid = 'nfs://192.168.160.20/export/mike-ss1' where type + = 'SecondaryStorage' and id = #; + + When copying and pasting a command, be sure the command has pasted as a single line before executing. Some document viewers may introduce unwanted line breaks in copied text. + Then log in to the cloud console UI and stop and start (not reboot) the Secondary Storage VM for that Zone. + +
+ diff --git a/docs/en-US/changing-service-offering-for-vm.xml b/docs/en-US/changing-service-offering-for-vm.xml index 5a42912e1..4fc9ef427 100644 --- a/docs/en-US/changing-service-offering-for-vm.xml +++ b/docs/en-US/changing-service-offering-for-vm.xml @@ -5,45 +5,50 @@ ]> -
- Changing the Service Offering for a VM - To upgrade or downgrade the level of compute resources available to a virtual machine, you can change the VM's compute offering. - - Log in to the &PRODUCT; UI as a user or admin. - In the left navigation, click Instances. - Choose the VM that you want to work with. - Click the Stop button to stop the VM - - - - StopButton.png: button to stop a VM - - - Click the Change Service button - - - - ChangeServiceButton.png: button to change the service of a VM - . The Change service dialog box is displayed. - Select the offering you want. - Click OK. - -
+ Changing the Service Offering for a VM + To upgrade or downgrade the level of compute resources available to a virtual machine, you can change the VM's compute offering. + + Log in to the &PRODUCT; UI as a user or admin. + In the left navigation, click Instances. + Choose the VM that you want to work with. + Click the Stop button to stop the VM. + + + + + StopButton.png: button to stop a VM + + + + Click the Change Service button. + + + + + ChangeServiceButton.png: button to change the service of a + VM + + + The Change service dialog box is displayed. + Select the offering you want to apply to the selected VM. + Click OK. + +
diff --git a/docs/en-US/changing-vm-name-os-group.xml b/docs/en-US/changing-vm-name-os-group.xml index f16ffdab0..daf78bca1 100644 --- a/docs/en-US/changing-vm-name-os-group.xml +++ b/docs/en-US/changing-vm-name-os-group.xml @@ -5,50 +5,55 @@ ]> -
- Changing the VM Name, OS, or Group - After a VM is created, you can modify the display name, operating system, and the group it belongs to. - To access a VM through the &PRODUCT; UI: - - Log in to the &PRODUCT; UI as a user or admin. - In the left navigation, click Instances. - Select the VM that you want to modify. - Click the Stop button to stop the VM - - - - StopButton.png: button to stop a VM - - - Click Edit - - - - StopButton.png: button to edit the properties of a VM - . - Make the desired changes to the following: - - Display name: Enter a new display name if you want to change the name of the VM. - OS Type: Select the desired operating system. - Group: Enter the group name for the VM. - - Click Apply. - -
+ Changing the VM Name, OS, or Group + After a VM is created, you can modify the display name, operating system, and the group it belongs to. + To access a VM through the &PRODUCT; UI: + + Log in to the &PRODUCT; UI as a user or admin. + In the left navigation, click Instances. + Select the VM that you want to modify. + Click the Stop button to stop the VM. + + + + + StopButton.png: button to stop a VM + + + + Click Edit. + + + + + EditButton.png: button to edit the properties of a VM + + + Make the desired changes to the following: + + Display name: Enter a new display name if you want to change + the name of the VM. + OS Type: Select the desired operating system. + Group: Enter the group name for the VM. + + Click Apply. + +
+ diff --git a/docs/en-US/choosing-a-hypervisor.xml b/docs/en-US/choosing-a-hypervisor.xml new file mode 100644 index 000000000..bf83fe3d1 --- /dev/null +++ b/docs/en-US/choosing-a-hypervisor.xml @@ -0,0 +1,136 @@ + +%BOOK_ENTITIES; +]> + + + + Choosing a Hypervisor: Supported Features + &PRODUCT; supports many popular hypervisors. Your cloud can consist entirely of hosts running a single hypervisor, or you can use multiple hypervisors. Each cluster of hosts must run the same hypervisor. + You might already have an installed base of nodes running a particular hypervisor, in which case, your choice of hypervisor has already been made. If you are starting from scratch, you need to decide what hypervisor software best suits your needs. A discussion of the relative advantages of each hypervisor is outside the scope of our documentation. However, it will help you to know which features of each hypervisor are supported by &PRODUCT;. The following table provides this information. + + + + + + + + + + + + Feature + XenServer 6.0.2 + vSphere 4.1/5.0 + KVM - RHEL 6.2 + OVM 2.3 + Bare Metal + + + + + Network Throttling + Yes + Yes + No + No + N/A + + + Security groups in zones that use basic networking + Yes + No + Yes + No + No + + + iSCSI + Yes + Yes + Yes + Yes + N/A + + + FibreChannel + Yes + Yes + Yes + No + N/A + + + Local Disk + Yes + Yes + Yes + No + Yes + + + HA + Yes + Yes (Native) + Yes + Yes + N/A + + + Snapshots of local disk + Yes + Yes + Yes + No + N/A + + + Local disk as data disk + No + No + No + No + N/A + + + Work load balancing + No + DRS + No + No + N/A + + + Manual live migration of VMs from host to host + Yes + Yes + Yes + Yes + N/A + + + Conserve management traffic IP address by using link local network to communicate with virtual router + Yes + No + Yes + Yes + N/A + + + + + diff --git a/docs/en-US/citrix-xenserver-installation.xml b/docs/en-US/citrix-xenserver-installation.xml index 867d36e1b..2cd39a413 100644 --- a/docs/en-US/citrix-xenserver-installation.xml +++ b/docs/en-US/citrix-xenserver-installation.xml @@ -62,7 +62,7 @@ support any system that is not up to date with patches.
- All hosts within a cluster must be homogenous. The CPUs must be of the same type, + All hosts within a cluster must be homogeneous. The CPUs must be of the same type, count, and feature flags. @@ -261,15 +261,15 @@ server 3.xenserver.pool.ntp.org Connect FiberChannel cable to all hosts in the cluster and to the FiberChannel storage host. - + Rescan the SCSI bus. Either use the following command or use XenCenter to perform an HBA rescan. # scsi-rescan - Repeat step 2 on every host. + Repeat step on every host. - + Check to be sure you see the new SCSI disk. # ls /dev/disk/by-id/scsi-360a98000503365344e6f6177615a516b -l The output should look like this, although the specific file name will be different @@ -279,7 +279,7 @@ server 3.xenserver.pool.ntp.org - Repeat step 4 on every host. + Repeat step on every host. On the storage server, run this command to get a unique ID for the new SR. diff --git a/docs/en-US/cloud-infrastructure-concepts.xml b/docs/en-US/cloud-infrastructure-concepts.xml index 1e1865e04..2ba228aa4 100644 --- a/docs/en-US/cloud-infrastructure-concepts.xml +++ b/docs/en-US/cloud-infrastructure-concepts.xml @@ -1,29 +1,30 @@ - %BOOK_ENTITIES; ]> - Cloud Infrastructure Concepts + Cloud Infrastructure Concepts + diff --git a/docs/en-US/cloudmonkey.xml b/docs/en-US/cloudmonkey.xml new file mode 100644 index 000000000..be4d17c3a --- /dev/null +++ b/docs/en-US/cloudmonkey.xml @@ -0,0 +1,264 @@ + + +%BOOK_ENTITIES; +]> + + + +
+ CloudMonkey + CloudMonkey is the &PRODUCT; Command Line Interface (CLI). It is written in Python. CloudMonkey can be used both as an interactive shell and as a command line tool which simplifies &PRODUCT; configuration and management. It can be used with &PRODUCT; releases since the 4.0.x branch. + + CloudMonkey is still under development and should be considered a Work In Progress (WIP), the wiki is the most up to date documentation: + https://cwiki.apache.org/CLOUDSTACK/cloudstack-cloudmonkey-cli.html + + +
+ Installing CloudMonkey + CloudMonkey is dependent on readline, pygments, prettytable, when installing from source you will need to resolve those dependencies. Using the cheese shop, the dependencies will be automatically installed. + There are three ways to get CloudMonkey. Via the official &PRODUCT; source releases or via a community maintained distribution at the cheese shop. Developers can also get it directly from the git repository in tools/cli/. + + + + Via the official Apache &PRODUCT; releases as well as the git repository. + + + + + + Via a community maintained package on Cheese Shop + pip install cloudmonkey + + + +
+ +
+ Configuration + To configure CloudMonkey you can edit the ~/.cloudmonkey/config file in the user's home directory as shown below. The values can also be set interactively at the cloudmonkey prompt. Logs are kept in ~/.cloudmonkey/log, and history is stored in ~/.cloudmonkey/history. Discovered apis are listed in ~/.cloudmonkey/cache. Only the log and history files can be custom paths and can be configured by setting appropriate file paths in ~/.cloudmonkey/config + +$ cat ~/.cloudmonkey/config +[core] +log_file = /Users/sebastiengoasguen/.cloudmonkey/log +asyncblock = true +paramcompletion = false +history_file = /Users/sebastiengoasguen/.cloudmonkey/history + +[ui] +color = true +prompt = > +tabularize = false + +[user] +secretkey =VDaACYb0LV9eNjTetIOElcVQkvJck_J_QljX_FcHRj87ZKiy0z0ty0ZsYBkoXkY9b7eq1EhwJaw7FF3akA3KBQ +apikey = plgWJfZK4gyS3mOMTVmjUVg-X-jlWlnfaUJ9GAbBbf9EdMkAYMmAiLqzzq1ElZLYq_u38zCm0bewzGUdP66mg + +[server] +path = /client/api +host = localhost +protocol = http +port = 8080 +timeout = 3600 + + The values can also be set at the CloudMonkey prompt. The API and secret keys are obtained via the &PRODUCT; UI or via a raw api call. + + set prompt myprompt> +myprompt> set host localhost +myprompt> set port 8080 +myprompt> set apikey +myprompt> set secretkey +]]> + + You can use CloudMonkey to interact with a local cloud, and even with a remote public cloud. You just need to set the host value properly and obtain the keys from the cloud administrator. +
+ +
+ API Discovery + + In &PRODUCT; 4.0.* releases, the list of api calls available will be pre-cached, while starting with &PRODUCT; 4.1 releases and above an API discovery service is enabled. CloudMonkey will discover automatically the api calls available on the management server. The sync command in CloudMonkey pulls a list of apis which are accessible to your user role, along with help docs etc. and stores them in ~/.cloudmonkey/cache. This allows cloudmonkey to be adaptable to changes in mgmt server, so in case the sysadmin enables a plugin such as Nicira NVP for that user role, the users can get those changes. New verbs and grammar (DSL) rules are created on the fly. + + To discover the APIs available do: + + > sync +324 APIs discovered and cached + +
+ +
+ Tabular Output + The number of key/value pairs returned by the api calls can be large resulting in a very long output. To enable easier viewing of the output, a tabular formatting can be setup. You may enable tabular listing and even choose set of column fields, this allows you to create your own field using the filter param which takes in comma separated argument. If argument has a space, put them under double quotes. The create table will have the same sequence of field filters provided + To enable it, use the set function and create filters like so: + +> set tabularize true +> list users filter=id,domain,account +count = 1 +user: ++--------------------------------------+--------+---------+ +| id | domain | account | ++--------------------------------------+--------+---------+ +| 7ed6d5da-93b2-4545-a502-23d20b48ef2a | ROOT | admin | ++--------------------------------------+--------+---------+ + +
+ +
+ Interactive Shell Usage + To start learning CloudMonkey, the best is to use the interactive shell. Simply type CloudMonkey at the prompt and you should get the interactive shell. + At the CloudMonkey prompt press the tab key twice, you will see all potential verbs available. Pick on, enter a space and then press tab twice. You will see all actions available for that verb + + +EOF assign cancel create detach extract ldap prepare reconnect restart shell update +activate associate change delete disable generate list query register restore start upload +add attach configure deploy enable get mark quit remove revoke stop +api authorize copy destroy exit help migrate reboot reset set suspend +cloudmonkey>create +account diskoffering loadbalancerrule portforwardingrule snapshot tags vpc +autoscalepolicy domain network privategateway snapshotpolicy template vpcoffering +autoscalevmgroup firewallrule networkacl project sshkeypair user vpnconnection +autoscalevmprofile instancegroup networkoffering remoteaccessvpn staticroute virtualrouterelement vpncustomergateway +condition ipforwardingrule physicalnetwork securitygroup storagenetworkiprange vlaniprange vpngateway +counter lbstickinesspolicy pod serviceoffering storagepool volume zone +]]> + + Picking one action and entering a space plus the tab key, you will obtain the list of parameters for that specific api call. + +create network +account= domainid= isAsync= networkdomain= projectid= vlan= +acltype= endip= name= networkofferingid= startip= vpcid= +displaytext= gateway= netmask= physicalnetworkid= subdomainaccess= zoneid= +]]> + + To get additional help on that specific api call you can use the following: + +create network -h +Creates a network +Required args: displaytext name networkofferingid zoneid +Args: account acltype displaytext domainid endip gateway isAsync name netmask networkdomain networkofferingid physicalnetworkid projectid startip subdomainaccess vlan vpcid zoneid + +cloudmonkey>create network -help +Creates a network +Required args: displaytext name networkofferingid zoneid +Args: account acltype displaytext domainid endip gateway isAsync name netmask networkdomain networkofferingid physicalnetworkid projectid startip subdomainaccess vlan vpcid zoneid + +cloudmonkey>create network --help +Creates a network +Required args: displaytext name networkofferingid zoneid +Args: account acltype displaytext domainid endip gateway isAsync name netmask networkdomain networkofferingid physicalnetworkid projectid startip subdomainaccess vlan vpcid zoneid +cloudmonkey> +]]> + + Note the required arguments necessary for the calls. + To find out the required parameters value, using a debugger console on the &PRODUCT; UI might be very useful. For instance using Firebug on Firefox, you can navigate the UI and check the parameters values for each call you are making as you navigate the UI. +
+ +
+ Starting a Virtual Machine instance with CloudMonkey + To start a virtual machine instance we will use the deploy virtualmachine call. + +deploy virtualmachine -h +Creates and automatically starts a virtual machine based on a service offering, disk offering, and template. +Required args: serviceofferingid templateid zoneid +Args: account diskofferingid displayname domainid group hostid hypervisor ipaddress iptonetworklist isAsync keyboard keypair name networkids projectid securitygroupids securitygroupnames serviceofferingid size startvm templateid userdata zoneid +]]> + + The required arguments are serviceofferingid, templateid and zoneid + In order to specify the template that we want to use, we can list all available templates with the following call: + +list templates templatefilter=all +count = 2 +template: +======== +domain = ROOT +domainid = 8a111e58-e155-4482-93ce-84efff3c7c77 +zoneid = e1bfdfaf-3d9b-43d4-9aea-2c9f173a1ae7 +displaytext = SystemVM Template (XenServer) +ostypeid = 849d7d0a-9fbe-452a-85aa-70e0a0cbc688 +passwordenabled = False +id = 6d360f79-4de9-468c-82f8-a348135d298e +size = 2101252608 +isready = True +templatetype = SYSTEM +zonename = devcloud +... +]]> + + In this snippet, I used DevCloud and only showed the beginning output of the first template, the SystemVM template + Similarly to get the serviceofferingid you would do: + +list serviceofferings | grep id +id = ef2537ad-c70f-11e1-821b-0800277e749c +id = c66c2557-12a7-4b32-94f4-48837da3fa84 +id = 3d8b82e5-d8e7-48d5-a554-cf853111bc50 +]]> + + Note that we can use the linux pipe as well as standard linux commands within the interactive shell. Finally we would start an instance with the following call: + +deploy virtualmachine templateid=13ccff62-132b-4caf-b456-e8ef20cbff0e zoneid=e1bfdfaf-3d9b-43d4-9aea-2c9f173a1ae7 serviceofferingid=ef2537ad-c70f-11e1-821b-0800277e749c +jobprocstatus = 0 +created = 2013-03-05T13:04:51-0800 +cmd = com.cloud.api.commands.DeployVMCmd +userid = 7ed6d5da-93b2-4545-a502-23d20b48ef2a +jobstatus = 1 +jobid = c441d894-e116-402d-aa36-fdb45adb16b7 +jobresultcode = 0 +jobresulttype = object +jobresult: +========= +virtualmachine: +============== +domain = ROOT +domainid = 8a111e58-e155-4482-93ce-84efff3c7c77 +haenable = False +templatename = tiny Linux +... +]]> + + The instance would be stopped with: + +cloudmonkey>stop virtualmachine id=7efe0377-4102-4193-bff8-c706909cc2d2 + + The ids that you will use will differ from this example. Make sure you use the ones that corresponds to your &PRODUCT; cloud. +
+ +
+ Scripting with CloudMonkey + All previous examples use CloudMonkey via the interactive shell, however it can be used as a straightfoward CLI, passing the commands to the cloudmonkey command like shown below. + $cloudmonkey list users + As such it can be used in shell scripts, it can received commands via stdin and its output can be parsed like any other unix commands as mentioned before. +
+ +
diff --git a/docs/en-US/concepts.xml b/docs/en-US/concepts.xml index 1912c23a8..e20f442a9 100644 --- a/docs/en-US/concepts.xml +++ b/docs/en-US/concepts.xml @@ -1,30 +1,29 @@ - %BOOK_ENTITIES; ]> - - Concepts - - - + Concepts + + + diff --git a/docs/en-US/configure-package-repository.xml b/docs/en-US/configure-package-repository.xml index 9ef2307b1..c8ba48f27 100644 --- a/docs/en-US/configure-package-repository.xml +++ b/docs/en-US/configure-package-repository.xml @@ -33,8 +33,8 @@ If you didn't follow the steps to build your own packages from source in the sections for or you may find pre-built - DEB and RPM packages for your convience linked from the - downloads + DEB and RPM packages for your convenience linked from the + downloads page. diff --git a/docs/en-US/configure-usage-server.xml b/docs/en-US/configure-usage-server.xml index af7bd4522..173f4a530 100644 --- a/docs/en-US/configure-usage-server.xml +++ b/docs/en-US/configure-usage-server.xml @@ -5,23 +5,22 @@ ]> -
Configuring the Usage Server To configure the usage server: @@ -54,7 +53,7 @@ usage.aggregation.timezone Time zone of usage records. Set this if the usage records and daily job execution are in different time zones. For example, with the following settings, the usage job will run at PST 00:15 and generate usage records for the 24 hours from 00:00:00 GMT to 23:59:59 GMT: - usage.stats.job.exec.time = 00:15 + usage.stats.job.exec.time = 00:15 usage.execution.timezone = PST usage.aggregation.timezone = GMT @@ -75,13 +74,13 @@ usage.aggregation.timezone = GMT usage.stats.job.aggregation.range The time period in minutes between Usage Server processing jobs. For example, if you set it to 1440, the Usage Server will run once per day. If you set it to 600, it will run every ten hours. In general, when a Usage Server job runs, it processes all events generated since usage was last run. - There is special handling for the case of 1440 (once per day). In this case the Usage Server does not necessarily process all records since Usage was last run. &PRODUCT; assumes that you require processing once per day for the previous, complete day’s records. For example, if the current day is October 7, then it is assumed you would like to process records for October 6, from midnight to midnight. &PRODUCT; assumes this "midnight to midnight" is relative to the usage.execution.timezone. + There is special handling for the case of 1440 (once per day). In this case the Usage Server does not necessarily process all records since Usage was last run. &PRODUCT; assumes that you require processing once per day for the previous, complete day’s records. For example, if the current day is October 7, then it is assumed you would like to process records for October 6, from midnight to midnight. &PRODUCT; assumes this “midnight to midnight†is relative to the usage.execution.timezone. Default: 1440 usage.stats.job.exec.time - The time when the Usage Server processing will start. It is specified in 24-hour format (HH:MM) in the time zone of the server, which should be GMT. For example, to start the Usage job at 10:30 GMT, enter "10:30". + The time when the Usage Server processing will start. It is specified in 24-hour format (HH:MM) in the time zone of the server, which should be GMT. For example, to start the Usage job at 10:30 GMT, enter “10:30â€. If usage.stats.job.aggregation.range is also set, and its value is not 1440, then its value will be added to usage.stats.job.exec.time to get the time to run the Usage Server job again. This is repeated until 24 hours have elapsed, and the next day's processing begins again at usage.stats.job.exec.time. Default: 00:15. @@ -97,5 +96,9 @@ usage.aggregation.timezone = GMT usage.stats.job.aggregation.range = 1440 With this configuration, the Usage job will run every night at 2 AM EST and will process records for the previous day’s midnight-midnight as defined by the EST (America/New_York) time zone. - Because the special value 1440 has been used for usage.stats.job.aggregation.range, the Usage Server will ignore the data between midnight and 2 AM. That data will be included in the next day's run + Because the special value 1440 has been used for usage.stats.job.aggregation.range, the Usage + Server will ignore the data between midnight and 2 AM. That data will be included in the + next day's run. + +
diff --git a/docs/en-US/configure-vpn.xml b/docs/en-US/configure-vpn.xml index 9e059f7aa..5d25620b3 100644 --- a/docs/en-US/configure-vpn.xml +++ b/docs/en-US/configure-vpn.xml @@ -5,48 +5,49 @@ ]> - + 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. +-->
- Configuring VPN - To set up VPN for the cloud: - - Log in to the &PRODUCT; UI as an administrator or end user. - In the left navigation, click Global Settings. - Set the following global configuration parameters. - - remote.access.vpn.client.ip.range – The range of IP addressess to be allocated to remote access VPN clients. The first IP in the range is used by the VPN server. - remote.access.vpn.psk.length – Length of the IPSec key. - remote.access.vpn.user.limit – Maximum number of VPN users per account. - - To enable VPN for a particular network: - - Log in as a user or administrator to the &PRODUCT; UI. - In the left navigation, click Network. - Click the name of the network you want to work with. - Click View IP Addresses. - Click one of the displayed IP address names. - Click the Enable VPN button - - - - AttachDiskButton.png: button to attach a volume - . - The IPsec key is displayed in a popup window. - + Configuring VPN + To set up VPN for the cloud: + + Log in to the &PRODUCT; UI as an administrator or end user. + In the left navigation, click Global Settings. + Set the following global configuration parameters. + + remote.access.vpn.client.ip.range – The range of IP addresses to be allocated to remote access VPN clients. The first IP in the range is used by the VPN server. + remote.access.vpn.psk.length – Length of the IPSec key. + remote.access.vpn.user.limit – Maximum number of VPN users per account. + + To enable VPN for a particular network: + + Log in as a user or administrator to the &PRODUCT; UI. + In the left navigation, click Network. + Click the name of the network you want to work with. + Click View IP Addresses. + Click one of the displayed IP address names. + Click the Enable VPN button. + + + + + AttachDiskButton.png: button to attach a volume + + + The IPsec key is displayed in a popup window. +
diff --git a/docs/en-US/console-proxy.xml b/docs/en-US/console-proxy.xml index df29c428a..5f9a82027 100644 --- a/docs/en-US/console-proxy.xml +++ b/docs/en-US/console-proxy.xml @@ -3,7 +3,6 @@ %BOOK_ENTITIES; ]> - -
- Console Proxy - The Console Proxy is a type of System Virtual Machine that has a role in presenting a console view via the web UI. It connects the user’s browser to the VNC port made available via the hypervisor for the console of the guest. Both the administrator and end user web UIs offer a console connection. - Clicking on a console icon brings up a new window. The AJAX code downloaded into that window refers to the public IP address of a console proxy VM. There is exactly one public IP address allocated per console proxy VM. The AJAX application connects to this IP. The console proxy then proxies the connection to the VNC port for the requested VM on the Host hosting the guest. . - The hypervisors will have many ports assigned to VNC usage so that multiple VNC sessions can occur simultaneously. - There is never any traffic to the guest virtual IP, and there is no need to enable VNC within the guest. - The console proxy VM will periodically report its active session count to the Management Server. The default reporting interval is five seconds. This can be changed through standard Management Server configuration with the parameter consoleproxy.loadscan.interval. - Assignment of guest VM to console proxy is determined by first determining if the guest VM has a previous session associated with a console proxy. If it does, the Management Server will assign the guest VM to the target Console Proxy VM regardless of the load on the proxy VM. Failing that, the first available running Console Proxy VM that has the capacity to handle new sessions is used. - Console proxies can be restarted by administrators but this will interrupt existing console sessions for users. - The console viewing functionality uses a dynamic DNS service under the domain name realhostip.com to assist in providing SSL security to console sessions. The console proxy is assigned a public IP address. In order to avoid browser warnings for mismatched SSL certificates, the URL for the new console window is set to the form of https://aaa-bbb-ccc-ddd.realhostip.com. Customers will see this URL during console session creation. &PRODUCT; includes the realhostip.com SSL certificate in the console proxy VM. Of course, &PRODUCT; cannot know about DNS A records for our customers' public IPs prior to shipping the software. &PRODUCT; therefore runs a dynamic DNS server that is authoritative for the realhostip.com domain. It maps the aaa-bbb-ccc-ddd part of the DNS name to the IP address aaa.bbb.ccc.ddd on lookups. This allows the browser to correctly connect to the console proxy's public IP, where it then expects and receives a SSL certificate for realhostip.com, and SSL is set up without browser warnings. -
+ Console Proxy + The Console Proxy is a type of System Virtual Machine that has a role in presenting a + console view via the web UI. It connects the user’s browser to the VNC port made available via + the hypervisor for the console of the guest. Both the administrator and end user web UIs offer a + console connection. + Clicking a console icon brings up a new window. The AJAX code downloaded into that window + refers to the public IP address of a console proxy VM. There is exactly one public IP address + allocated per console proxy VM. The AJAX application connects to this IP. The console proxy then + proxies the connection to the VNC port for the requested VM on the Host hosting the + guest. + + The hypervisors will have many ports assigned to VNC usage so that multiple VNC sessions + can occur simultaneously. + + There is never any traffic to the guest virtual IP, and there is no need to enable VNC + within the guest. + The console proxy VM will periodically report its active session count to the Management + Server. The default reporting interval is five seconds. This can be changed through standard + Management Server configuration with the parameter consoleproxy.loadscan.interval. + Assignment of guest VM to console proxy is determined by first determining if the guest VM + has a previous session associated with a console proxy. If it does, the Management Server will + assign the guest VM to the target Console Proxy VM regardless of the load on the proxy VM. + Failing that, the first available running Console Proxy VM that has the capacity to handle new + sessions is used. + Console proxies can be restarted by administrators but this will interrupt existing console + sessions for users. +
+ Using a SSL Certificate for the Console Proxy + The console viewing functionality uses a dynamic DNS service under the domain name + realhostip.com to assist in providing SSL security to console sessions. The console proxy is + assigned a public IP address. In order to avoid browser warnings for mismatched SSL + certificates, the URL for the new console window is set to the form of + https://aaa-bbb-ccc-ddd.realhostip.com. You will see this URL during console session creation. + &PRODUCT; includes the realhostip.com SSL certificate in the console proxy VM. Of course, + &PRODUCT; cannot know about the DNS A records for our customers' public IPs prior to shipping + the software. &PRODUCT; therefore runs a dynamic DNS server that is authoritative for the + realhostip.com domain. It maps the aaa-bbb-ccc-ddd part of the DNS name to the IP address + aaa.bbb.ccc.ddd on lookups. This allows the browser to correctly connect to the console + proxy's public IP, where it then expects and receives a SSL certificate for realhostip.com, + and SSL is set up without browser warnings. +
+
+ Changing the Console Proxy SSL Certificate and Domain + If the administrator prefers, it is possible for the URL of the customer's console session + to show a domain other than realhostip.com. The administrator can customize the displayed + domain by selecting a different domain and uploading a new SSL certificate and private key. + The domain must run a DNS service that is capable of resolving queries for addresses of the + form aaa-bbb-ccc-ddd.your.domain to an IPv4 IP address in the form aaa.bbb.ccc.ddd, for + example, 202.8.44.1. To change the console proxy domain, SSL certificate, and private + key: + + + Set up dynamic name resolution or populate all possible DNS names in your public IP + range into your existing DNS server with the format aaa-bbb-ccc-ddd.company.com -> + aaa.bbb.ccc.ddd. + + + Generate the private key and certificate signing request (CSR). When you are using + openssl to generate private/public key pairs and CSRs, for the private key that you are + going to paste into the &PRODUCT; UI, be sure to convert it into PKCS#8 format. + + + Generate a new 2048-bit private key + openssl genrsa -des3 -out yourprivate.key 2048 + + + Generate a new certificate CSR + openssl req -new -key yourprivate.key -out yourcertificate.csr + + + Head to the website of your favorite trusted Certificate Authority, purchase an + SSL certificate, and submit the CSR. You should receive a valid certificate in + return + + + Convert your private key format into PKCS#8 encrypted format. + openssl pkcs8 -topk8 -in yourprivate.key -out yourprivate.pkcs8.encrypted.key + + + Convert your PKCS#8 encrypted private key into the PKCS#8 format that is compliant + with &PRODUCT; + openssl pkcs8 -in yourprivate.pkcs8.encrypted.key -out yourprivate.pkcs8.key + + + + + In the Update SSL Certificate screen of the &PRODUCT; UI, paste the following: + + + The certificate you've just generated. + + + The private key you've just generated. + + + The desired new domain name; for example, company.com + + + + + + + + updatessl.png: Updating Console Proxy SSL Certificate + + + + + The desired new domain name; for example, company.com + This stops all currently running console proxy VMs, then restarts them with the new + certificate and key. Users might notice a brief interruption in console + availability. + + + The Management Server generates URLs of the form "aaa-bbb-ccc-ddd.company.com" after this + change is made. The new console requests will be served with the new DNS domain name, + certificate, and key. +
+
diff --git a/docs/en-US/convert-hyperv-vm-to-template.xml b/docs/en-US/convert-hyperv-vm-to-template.xml index c6294d444..df388234d 100644 --- a/docs/en-US/convert-hyperv-vm-to-template.xml +++ b/docs/en-US/convert-hyperv-vm-to-template.xml @@ -5,64 +5,65 @@ ]> -
- Converting a Hyper-V VM to a Template - To convert a Hyper-V VM to a XenServer-compatible &PRODUCT; template, you will need a standalone XenServer host with an attached NFS VHD SR. Use whatever XenServer version you are using with &PRODUCT;, but use XenCenter 5.6 FP1 or SP2 (it is backwards compatible to 5.6). Additionally, it may help to have an attached NFS ISO SR. - For Linux VMs, you may need to do some preparation in Hyper-V before trying to get the VM to work in XenServer. Clone the VM and work on the clone if you still want to use the VM in Hyper-V. Uninstall Hyper-V Integration Components and check for any references to device names in /etc/fstab: - - From the linux_ic/drivers/dist directory, run make uninstall (where "linux_ic" is the path to the copied Hyper-V Integration Components files). - Restore the original initrd from backup in /boot/ (the backup is named *.backup0). - Remove the "hdX=noprobe" entries from /boot/grub/menu.lst. - Check /etc/fstab for any partitions mounted by device name. Change those entries (if any) to mount by LABEL or UUID (get that information with the "blkid" command).. - - The next step is make sure the VM is not running in Hyper-V, then get the VHD into XenServer. There are two options for doing this. - Option one: - - Import the VHD using XenCenter. In XenCenter, go to Tools>Virtual Appliance Tools>Disk Image Import. - Choose the VHD, then click Next. - Name the VM, choose the NFS VHD SR under Storage, enable "Run Operating System Fixups" and choose the NFS ISO SR. - Click Next, then Finish. A VM should be created. - - Option two - - Run XenConvert, under From choose VHD, under To choose XenServer. Click Next. - Choose the VHD, then click Next. - Input the XenServer host info, then click Next. - Name the VM, then click Next, then Convert. A VM should be created - - Once you have a VM created from the Hyper-V VHD, prepare it using the following steps: - - Boot the VM, uninstall Hyper-V Integration Services, and reboot. - Install XenServer Tools, then reboot. - Prepare the VM as desired. For example, run sysprep on Windows VMs. See - - Either option above will create a VM in HVM mode. This is fine for Windows VMs, but Linux VMs may not perform optimally. Converting a Linux VM to PV mode will require additional steps and will vary by distribution. - - Shut down the VM and copy the VHD from the NFS storage to a web server; for example, mount the NFS share on the web server and copy it, or from the XenServer host use sftp or scp to upload it to the web server. - In &PRODUCT;, create a new template using the following values: - - URL. Give the URL for the VHD - OS Type. Use the appropriate OS. For PV mode on CentOS, choose Other PV (32-bit) or Other PV (64-bit). This choice is available only for XenServer. - Hypervisor. XenServer - Format. VHD - - - The template will be created, and you can create instances from it. + Converting a Hyper-V VM to a Template + To convert a Hyper-V VM to a XenServer-compatible &PRODUCT; template, you will need a standalone XenServer host with an attached NFS VHD SR. Use whatever XenServer version you are using with &PRODUCT;, but use XenCenter 5.6 FP1 or SP2 (it is backwards compatible to 5.6). Additionally, it may help to have an attached NFS ISO SR. + For Linux VMs, you may need to do some preparation in Hyper-V before trying to get the VM to work in XenServer. Clone the VM and work on the clone if you still want to use the VM in Hyper-V. Uninstall Hyper-V Integration Components and check for any references to device names in /etc/fstab: + + From the linux_ic/drivers/dist directory, run make uninstall (where "linux_ic" is the path to the copied Hyper-V Integration Components files). + Restore the original initrd from backup in /boot/ (the backup is named *.backup0). + Remove the "hdX=noprobe" entries from /boot/grub/menu.lst. + Check /etc/fstab for any partitions mounted by device name. Change those entries (if any) to + mount by LABEL or UUID. You can get that information with the blkid command. + + The next step is make sure the VM is not running in Hyper-V, then get the VHD into XenServer. There are two options for doing this. + Option one: + + Import the VHD using XenCenter. In XenCenter, go to Tools>Virtual Appliance Tools>Disk Image Import. + Choose the VHD, then click Next. + Name the VM, choose the NFS VHD SR under Storage, enable "Run Operating System Fixups" and choose the NFS ISO SR. + Click Next, then Finish. A VM should be created. + + Option two: + + Run XenConvert, under From choose VHD, under To choose XenServer. Click Next. + Choose the VHD, then click Next. + Input the XenServer host info, then click Next. + Name the VM, then click Next, then Convert. A VM should be created. + + Once you have a VM created from the Hyper-V VHD, prepare it using the following steps: + + Boot the VM, uninstall Hyper-V Integration Services, and reboot. + Install XenServer Tools, then reboot. + Prepare the VM as desired. For example, run sysprep on Windows VMs. See . + + Either option above will create a VM in HVM mode. This is fine for Windows VMs, but Linux VMs may not perform optimally. Converting a Linux VM to PV mode will require additional steps and will vary by distribution. + + Shut down the VM and copy the VHD from the NFS storage to a web server; for example, mount the NFS share on the web server and copy it, or from the XenServer host use sftp or scp to upload it to the web server. + In &PRODUCT;, create a new template using the following values: + + URL. Give the URL for the VHD + OS Type. Use the appropriate OS. For PV mode on CentOS, choose Other PV (32-bit) or Other PV (64-bit). This choice is available only for XenServer. + Hypervisor. XenServer + Format. VHD + + + + The template will be created, and you can create instances from it.
diff --git a/docs/en-US/create-bare-metal-template.xml b/docs/en-US/create-bare-metal-template.xml index 19db2ed5f..0ee4c11fe 100644 --- a/docs/en-US/create-bare-metal-template.xml +++ b/docs/en-US/create-bare-metal-template.xml @@ -24,7 +24,6 @@
Creating a Bare Metal Template - Beta feature. Untested in &PRODUCT; 3.0.3. Provided without guarantee of performance. Before you can create a bare metal template, you must have performed several other installation and setup steps to create a bare metal cluster and environment. See Bare Metal Installation in the Installation Guide. It is assumed you already have a directory named "win7_64bit" on your CIFS server, containing the image for the bare metal instance. This directory and image are set up as part of the Bare Metal Installation procedure. Log in to the &PRODUCT; UI as an administrator or end user. diff --git a/docs/en-US/create-template-from-existing-vm.xml b/docs/en-US/create-template-from-existing-vm.xml index c22b7ec7f..35788fdfc 100644 --- a/docs/en-US/create-template-from-existing-vm.xml +++ b/docs/en-US/create-template-from-existing-vm.xml @@ -5,45 +5,52 @@ ]> - + 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 Template from an Existing Virtual Machine - Once you have at least one VM set up in the way you want, you can use it as the prototype for other VMs. - - Create and start a virtual machine using any of the techniques given in . - Make any desired configuration changes on the running VM, then click Stop. - Wait for the VM to stop. When the status shows Stopped, go to the next step. - Click Create Template and provide the following: - - Name and Display Text. These will be shown in the UI, so choose something descriptive. - OS Type. This helps &PRODUCT; and the hypervisor perform certain operations and make assumptions that improve the performance of the guest. Select one of the following. - - If the operating system of the stopped VM is listed, choose it. - If the OS type of the stopped VM is not listed, choose Other. - If you want to boot from this template in PV mode, choose Other PV (32-bit) or Other PV (64-bit). This choice is available only for XenServere: - Note: Generally you should not choose an older version of the OS than the version in the image. For example, choosing CentOS 5.4 to support a CentOS 6.2 image will in general not work. In those cases you should choose Other. - - - Public. Choose Yes to make this template accessible to all users of this &PRODUCT; installation. The template will appear in the Community Templates list. See . - Password Enabled. Choose Yes if your template has the &PRODUCT; password change script installed. See Adding Password Management to Your Templates. - - Click Add. - - The new template will be visible in the Templates section when the template creation process has been completed. The template is then available when creating a new VM + Creating a Template from an Existing Virtual Machine + Once you have at least one VM set up in the way you want, you can use it as the prototype for other VMs. + + Create and start a virtual machine using any of the techniques given in . + Make any desired configuration changes on the running VM, then click Stop. + Wait for the VM to stop. When the status shows Stopped, go to the next step. + Click Create Template and provide the following: + + Name and Display Text. These will be shown in the UI, so + choose something descriptive. + OS Type. This helps &PRODUCT; and the hypervisor perform + certain operations and make assumptions that improve the performance of the + guest. Select one of the following. + + If the operating system of the stopped VM is listed, choose it. + If the OS type of the stopped VM is not listed, choose Other. + If you want to boot from this template in PV mode, choose Other PV (32-bit) or Other PV (64-bit). This choice is available only for XenServere: + Note: Generally you should not choose an older version of the OS than the version in the image. For example, choosing CentOS 5.4 to support a CentOS 6.2 image will in general not work. In those cases you should choose Other. + + + Public. Choose Yes to make this template accessible to all + users of this &PRODUCT; installation. The template will appear in the + Community Templates list. See . + Password Enabled. Choose Yes if your template has the + &PRODUCT; password change script installed. See . + + Click Add. + + The new template will be visible in the Templates section when the template creation process + has been completed. The template is then available when creating a new VM.
diff --git a/docs/en-US/create-template-from-snapshot.xml b/docs/en-US/create-template-from-snapshot.xml index 80e660fe7..d96842266 100644 --- a/docs/en-US/create-template-from-snapshot.xml +++ b/docs/en-US/create-template-from-snapshot.xml @@ -5,23 +5,22 @@ ]> -
Creating a Template from a Snapshot diff --git a/docs/en-US/create-templates-overview.xml b/docs/en-US/create-templates-overview.xml index 818b42d10..900165f48 100644 --- a/docs/en-US/create-templates-overview.xml +++ b/docs/en-US/create-templates-overview.xml @@ -5,31 +5,33 @@ ]> -
- Creating Templates: Overview - &PRODUCT; ships with a default template for the CentOS operating system. There are a variety of ways to add more templates. Administrators and end users can add templates. The typical sequence of events is: - - Launch a VM instance that has the operating system you want. Make any other desired configuration changes to the VM. - Stop the VM. - Convert the volume into a template. - - There are other ways to add templates to &PRODUCT;. For example, you can take a snapshot of the VM's volume and create a template from the snapshot, or import a VHD from another system into &PRODUCT; - The various techniques for creating templates are described in the next few sections. + Creating Templates: Overview + &PRODUCT; ships with a default template for the CentOS operating system. There are a variety of ways to add more templates. Administrators and end users can add templates. The typical sequence of events is: + + Launch a VM instance that has the operating system you want. Make any other desired configuration changes to the VM. + Stop the VM. + Convert the volume into a template. + + There are other ways to add templates to &PRODUCT;. For example, you can take a snapshot + of the VM's volume and create a template from the snapshot, or import a VHD from another + system into &PRODUCT;. + The various techniques for creating templates are described in the next few sections. +
diff --git a/docs/en-US/create-windows-template.xml b/docs/en-US/create-windows-template.xml index f8dbc79bc..d02f06784 100644 --- a/docs/en-US/create-windows-template.xml +++ b/docs/en-US/create-windows-template.xml @@ -5,34 +5,36 @@ ]>
- Creating a Windows Template - Windows templates must be prepared with Sysprep before they can be provisioned on multiple machines. Sysprep allows you to create a generic Windows template and avoid any possible SID conflicts. - (XenServer) Windows VMs running on XenServer require PV drivers, which may be provided in the template or added after the VM is created. The PV drivers are necessary for essential management functions such as mounting additional volumes and ISO images, live migration, and graceful shutdown. - An overview of the procedure is as follows: - - Upload your Windows ISO. For more information, see - Create a VM Instance with this ISO. For more information, see - Follow the steps in Sysprep for Windows Server 2008 R2 (below) or Sysprep for Windows Server 2003 R2, depending on your version of Windows Server - The preparation steps are complete. Now you can actually create the template as described in Creating the Windows Template. - - - -
+ Creating a Windows Template + Windows templates must be prepared with Sysprep before they can be provisioned on multiple machines. Sysprep allows you to create a generic Windows template and avoid any possible SID conflicts. + (XenServer) Windows VMs running on XenServer require PV drivers, which may be provided in the template or added after the VM is created. The PV drivers are necessary for essential management functions such as mounting additional volumes and ISO images, live migration, and graceful shutdown. + + + An overview of the procedure is as follows: + + Upload your Windows ISO. For more information, see . + Create a VM Instance with this ISO. For more information, see . + Follow the steps in Sysprep for Windows Server 2008 R2 (below) or Sysprep for Windows Server 2003 R2, depending on your version of Windows Server + The preparation steps are complete. Now you can actually create the template as described in Creating the Windows Template. + + + +
diff --git a/docs/en-US/creating-network-offerings.xml b/docs/en-US/creating-network-offerings.xml index ab5692006..1f79fb166 100644 --- a/docs/en-US/creating-network-offerings.xml +++ b/docs/en-US/creating-network-offerings.xml @@ -5,113 +5,225 @@ ]> -
- Creating a New Network Offering - To create a network offering: - - Log in with admin privileges to the &PRODUCT; UI. - In the left navigation bar, click Service Offerings. - In Select Offering, choose Network Offering. - Click Add Network Offering. - In the dialog, make the following choices: - - Name. Any desired name for the network offering - Description. A short description of the offering that can be displayed to users - Network Rate. Allowed data transfer rate in MB per second - Traffic Type. The type of network traffic that will be carried on the network - Guest Type. Choose whether the guest network is isolated or shared. For a description of these terms, see - Specify VLAN. (Isolated guest networks only) Indicate whether a VLAN should be specified when this offering is used - Supported Services. Select one or more of the possible network services. For some services, you must also choose the service provider; for example, if you select Load Balancer, you can choose the &PRODUCT; virtual router or any other load balancers that have been configured in the cloud. Depending on which services you choose, additional fields may appear in the rest of the dialog box.Based on the guest network type selected, you can see the following supported services: - - - - Supported Services - Description - Isolated - Shared - - - - - DHCP - - Supported - Supported - - - DNS - - Supported - Supported - - - Load Balancer - If you select Load Balancer, you can choose the &PRODUCT; virtual router or any other load balancers that have been configured in the cloud. - Supported - Supported - - - Source NAT - If you select Source NAT, you can choose the &PRODUCT; virtual router or any other Source NAT providers that have been configured in the cloud. - Supported - Supported - - - Static NAT - If you select Static NAT, you can choose the &PRODUCT; virtual router or any other Static NAT providers that have been configured in the cloud. - Supported - Supported - - - Port Forwarding - If you select Port Forwarding, you can choose the &PRODUCT; virtual router or any other Port Forwarding providers that have been configured in the cloud. - Supported - Not Supported - - - VPN - - Supported - Not Supported - - - User Data - - Not Supported - Supported - - - Security Groups - See . - Not Supported - Supported - - - - - - System Offering. If the service provider for any of the services selected in Supported Services is a virtual router, the System Offering field appears. Choose the system service offering that you want virtual routers to use in this network. For example, if you selected Load Balancer in Supported Services and selected a virtual router to provide load balancing, the System Offering field appears so you can choose between the &PRODUCT; default system service offering and any custom system service offerings that have been defined by the &PRODUCT; root administrator. For more information, see System Service Offerings. - Redundant router capability. (v3.0.3 and greater) Available only when Virtual Router is selected as the Source NAT provider. Select this option if you want to use two virtual routers in the network for uninterrupted connection: one operating as the master virtual router and the other as the backup. The master virtual router receives requests from and sends responses to the user’s VM. The backup virtual router is activated only when the master is down. After the failover, the backup becomes the master virtual router. &PRODUCT; deploys the routers on different hosts to ensure reliability if one host is down. - Conserve mode. Indicate whether to use conserve mode. In this mode, network resources are allocated only when the first virtual machine starts in the network - Tags. Network tag to specify which physical network to use - - Click Add. - + Creating a New Network Offering + To create a network offering: + + + Log in with admin privileges to the &PRODUCT; UI. + + + In the left navigation bar, click Service Offerings. + + + In Select Offering, choose Network Offering. + + + Click Add Network Offering. + + + In the dialog, make the following choices: + + + Name. Any desired name for the network + offering. + + + Description. A short description of the offering + that can be displayed to users. + + + Network Rate. Allowed data transfer rate in MB per + second. + + + Guest Type. Choose whether the guest network is + isolated or shared. + For a description of this term, see . + For a description of this term, see the Administration Guide. + + + + Persistent. Indicate whether the guest network is + persistent or not. The network that you can provision without having to deploy a VM on + it is termed persistent network. For more information, see . + + + Specify VLAN. (Isolated guest networks only) + Indicate whether a VLAN should be specified when this offering is used. + + + VPC. This option indicate whether the guest network + is Virtual Private Cloud-enabled. A Virtual Private Cloud (VPC) is a private, isolated + part of &PRODUCT;. A VPC can have its own virtual network topology that resembles a + traditional physical network. For more information on VPCs, see . + + + Supported Services. Select one or more of the + possible network services. For some services, you must also choose the service provider; + for example, if you select Load Balancer, you can choose the &PRODUCT; virtual router or + any other load balancers that have been configured in the cloud. Depending on which + services you choose, additional fields may appear in the rest of the dialog box. + Based on the guest network type selected, you can see the following supported + services: + + + + + Supported Services + Description + Isolated + Shared + + + + + DHCP + For more information, see . + Supported + Supported + + + DNS + For more information, see . + Supported + Supported + + + Load Balancer + If you select Load Balancer, you can choose the &PRODUCT; virtual + router or any other load balancers that have been configured in the + cloud. + Supported + Supported + + + Firewall + For more information, see . + For more information, see the Administration + Guide. + Supported + Supported + + + Source NAT + If you select Source NAT, you can choose the &PRODUCT; virtual router + or any other Source NAT providers that have been configured in the + cloud. + Supported + Supported + + + Static NAT + If you select Static NAT, you can choose the &PRODUCT; virtual router + or any other Static NAT providers that have been configured in the + cloud. + Supported + Supported + + + Port Forwarding + If you select Port Forwarding, you can choose the &PRODUCT; virtual + router or any other Port Forwarding providers that have been configured in the + cloud. + Supported + Not Supported + + + VPN + For more information, see . + Supported + Not Supported + + + User Data + For more information, see . + For more information, see the Administration + Guide. + Not Supported + Supported + + + Network ACL + For more information, see . + Supported + Not Supported + + + Security Groups + For more information, see . + Not Supported + Supported + + + + + + + System Offering. If the service provider for any of + the services selected in Supported Services is a virtual router, the System Offering + field appears. Choose the system service offering that you want virtual routers to use + in this network. For example, if you selected Load Balancer in Supported Services and + selected a virtual router to provide load balancing, the System Offering field appears + so you can choose between the &PRODUCT; default system service offering and any custom + system service offerings that have been defined by the &PRODUCT; root + administrator. + For more information, see . + For more information, see the Administration Guide. + + + Redundant router capability. Available only when + Virtual Router is selected as the Source NAT provider. Select this option if you want to + use two virtual routers in the network for uninterrupted connection: one operating as + the master virtual router and the other as the backup. The master virtual router + receives requests from and sends responses to the user’s VM. The backup virtual router + is activated only when the master is down. After the failover, the backup becomes the + master virtual router. &PRODUCT; deploys the routers on different hosts to ensure + reliability if one host is down. + + + Conserve mode. Indicate whether to use conserve + mode. In this mode, network resources are allocated only when the first virtual machine + starts in the network. When conservative mode is off, the public IP can only be used for + a single service. For example, a public IP used for a port forwarding rule cannot be + used for defining other services, such as SaticNAT or load balancing. When the conserve + mode is on, you can define more than one service on the same public IP. + + If StaticNAT is enabled, irrespective of the status of the conserve mode, no port + forwarding or load balancing rule can be created for the IP. However, you can add the + firewall rules by using the createFirewallRule command. + + + + Tags. Network tag to specify which physical network + to use. + + + + + Click Add. + +
diff --git a/docs/en-US/creating-new-volumes.xml b/docs/en-US/creating-new-volumes.xml index 62181b9ea..5a12d7f57 100644 --- a/docs/en-US/creating-new-volumes.xml +++ b/docs/en-US/creating-new-volumes.xml @@ -5,37 +5,59 @@ ]> - + 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 Volume - You can add more data disk volumes to a guest VM at any time, up to the limits of your storage capacity. Both &PRODUCT; administrators and users can add volumes to VM instances. When you create a new volume, it is stored as an entity in &PRODUCT;, but the actual storage resources are not allocated on the physical storage device until you attach the volume. This optimization allows the &PRODUCT; to provision the volume nearest to the guest that will use it when the first attachment is made. - - Log in to the &PRODUCT; UI as a user or admin. - In the left navigation bar, click Storage. - In Select View, choose Volumes. - To create a new volume, click Add Volume, provide the following details, and click OK. - - Name. Give the volume a unique name so you can find it later. - Availability Zone. Where do you want the storage to reside? This should be close to the VM that will use the volume. - Disk Offering. Choose the characteristics of the storage. - - The new volume appears in the list of volumes with the state “Allocated.†The volume data is stored in &PRODUCT;, but the volume is not yet ready for use - To start using the volume, continue to Attaching a Volume - -
+ Creating a New Volume + You can add more data disk volumes to a guest VM at any time, up to the limits of your storage capacity. Both &PRODUCT; administrators and users can add volumes to VM instances. When you create a new volume, it is stored as an entity in &PRODUCT;, but the actual storage resources are not allocated on the physical storage device until you attach the volume. This optimization allows the &PRODUCT; to provision the volume nearest to the guest that will use it when the first attachment is made. +
+ Using Local Storage for Data Volumes + You can create data volumes on local storage (supported with XenServer, KVM, and VMware). + The data volume is placed on the same + host as the VM instance that is attached to the data volume. These + local data volumes can be attached to virtual machines, detached, re-attached, + and deleted just as with the other types of data volume. + Local storage is ideal for scenarios where persistence of data volumes and HA + is not required. Some of the benefits include reduced disk I/O latency and cost + reduction from using inexpensive local disks. + In order for local volumes to be used, the feature must be enabled for the + zone. + You can create a data disk offering for local storage. When a user creates a + new VM, they can select this disk offering in order to cause the data disk + volume to be placed in local storage. + You can not migrate a VM that has a volume in local storage to a different + host, nor migrate the volume itself away to a different host. If you want to put + a host into maintenance mode, you must first stop any VMs with local data + volumes on that host. +
+
+ To Create a New Volume + + Log in to the &PRODUCT; UI as a user or admin. + In the left navigation bar, click Storage. + In Select View, choose Volumes. + To create a new volume, click Add Volume, provide the following details, and click OK. + + Name. Give the volume a unique name so you can find it later. + Availability Zone. Where do you want the storage to reside? This should be close to the VM that will use the volume. + Disk Offering. Choose the characteristics of the storage. + + The new volume appears in the list of volumes with the state “Allocated.†The volume data is stored in &PRODUCT;, but the volume is not yet ready for use + To start using the volume, continue to Attaching a Volume + +
+
diff --git a/docs/en-US/creating-vms.xml b/docs/en-US/creating-vms.xml index 9da4aea94..18995979a 100644 --- a/docs/en-US/creating-vms.xml +++ b/docs/en-US/creating-vms.xml @@ -3,47 +3,53 @@ %BOOK_ENTITIES; ]> - -
- Creating VMs - Virtual machines are usually created from a template. Users can also create blank virtual machines. A blank virtual machine is a virtual machine without an OS template. Users can attach an ISO file and install the OS from the CD/DVD-ROM. - To create a VM from a template: - - Log in to the &PRODUCT; UI as an administrator or user. - In the left navigation bar, click Instances. - Click Add Instance. - Select a template, then follow the steps in the wizard. (For more information about how the templates came to be in this list, see Working with Templates. - Be sure that the hardware you have allows starting the selected service offering. - Click Submit and your VM will be created and started. - For security reason, the internal name of the VM is visible only to the root admin. - - Starting with v3.0.3, you can create a VM without starting it. You can determine whether the VM needs to be started as part of the VM deployment. A new request parameter, startVM, is introduced in the deployVm API to support this feature. For more information, see the Developer's Guide - To create a VM from an ISO: - (XenServer) Windows VMs running on XenServer require PV drivers, which may be provided in the template or added after the VM is created. The PV drivers are necessary for essential management functions such as mounting additional volumes and ISO images, live migration, and graceful shutdown. - - Log in to the &PRODUCT; UI as an administrator or user. - In the left navigation bar, click Instances. - Click Add Instance. - Select ISO Boot, and follow the steps in the wizard. - Click Submit and your VM will be created and started. + Creating VMs + Virtual machines are usually created from a template. Users can also create blank virtual machines. A blank virtual machine is a virtual machine without an OS template. Users can attach an ISO file and install the OS from the CD/DVD-ROM. + You can create a VM without starting it. You can determine whether the VM needs to be started as part of the VM deployment. A request parameter, startVM, in the deployVm API provides this feature. For more information, see the Developer's Guide + To create a VM from a template: + + Log in to the &PRODUCT; UI as an administrator or user. + In the left navigation bar, click Instances. + + Click Add Instance. + + + Select a zone. + + Select a template, then follow the steps in the wizard. For more information about how the templates came to be in this list, see . + Be sure that the hardware you have allows starting the selected service offering. + Click Submit and your VM will be created and started. + For security reason, the internal name of the VM is visible only to the root admin. + + + To create a VM from an ISO: + (XenServer) Windows VMs running on XenServer require PV drivers, which may be provided in the template or added after the VM is created. The PV drivers are necessary for essential management functions such as mounting additional volumes and ISO images, live migration, and graceful shutdown. + + Log in to the &PRODUCT; UI as an administrator or user. + In the left navigation bar, click Instances. + Click Add Instance. + Select a zone. + Select ISO Boot, and follow the steps in the wizard. + Click Submit and your VM will be created and started. - +
+ diff --git a/docs/en-US/dedicated-ha-hosts.xml b/docs/en-US/dedicated-ha-hosts.xml index ab5070019..89c721f08 100644 --- a/docs/en-US/dedicated-ha-hosts.xml +++ b/docs/en-US/dedicated-ha-hosts.xml @@ -24,7 +24,7 @@
Dedicated HA Hosts - (v3.0.3 and greater) One or more hosts can be designated for use only by HA-enabled VMs that are restarting due to a host failure. Setting up a pool of such dedicated HA hosts as the recovery destination for all HA-enabled VMs is useful to: + One or more hosts can be designated for use only by HA-enabled VMs that are restarting due to a host failure. Setting up a pool of such dedicated HA hosts as the recovery destination for all HA-enabled VMs is useful to: Make it easier to determine which VMs have been restarted as part of the &PRODUCT; high-availability function. If a VM is running on a dedicated HA host, then it must be an HA-enabled VM whose original host failed. (With one exception: It is possible for an administrator to manually migrate any VM to a dedicated HA host.). Keep HA-enabled VMs from restarting on hosts which may be reserved for other purposes. diff --git a/docs/en-US/default-account-resource-limit.xml b/docs/en-US/default-account-resource-limit.xml index abc313f46..5134e508c 100644 --- a/docs/en-US/default-account-resource-limit.xml +++ b/docs/en-US/default-account-resource-limit.xml @@ -5,36 +5,41 @@ ]> -
Default Account Resource Limits - You can limit resource use by accounts. The default limits are set using global configuration parameters, and they affect all accounts within a cloud. The relevant parameters are those beginning with max.account (max.account.snapshots, etc.).. + You can limit resource use by accounts. The default limits are set by using global + configuration parameters, and they affect all accounts within a cloud. The relevant + parameters are those beginning with max.account, for example: max.account.snapshots. To override a default limit for a particular account, set a per-account resource limit. Log in to the &PRODUCT; UI. In the left navigation tree, click Accounts. - Select the account you want to modify. The current limits are displayed. A value of -1 shows that there is no limit in place - Click the Edit button - - - - editbutton.png: edits the settings. - + Select the account you want to modify. The current limits are displayed. A value of -1 shows + that there is no limit in place. + Click the Edit button. + + + + + editbutton.png: edits the settings + + +
diff --git a/docs/en-US/deleting-vms.xml b/docs/en-US/deleting-vms.xml index 1f1ee959f..97245c81e 100644 --- a/docs/en-US/deleting-vms.xml +++ b/docs/en-US/deleting-vms.xml @@ -5,37 +5,39 @@ ]> -
- Deleting VMs - Users can delete their own virtual machines. A running virtual machine will be abruptly stopped before it is deleted. Administrators can delete any virtual machines. - To delete a virtual machine: - - Log in to the &PRODUCT; UI as a user or admin. - In the left navigation, click Instances. - Choose the VM that you want to delete. - Click the Destroy Instance button - - - - Destroyinstance.png: button to destroy an instance - - - -
+ Deleting VMs + Users can delete their own virtual machines. A running virtual machine will be abruptly stopped before it is deleted. Administrators can delete any virtual machines. + To delete a virtual machine: + + Log in to the &PRODUCT; UI as a user or admin. + In the left navigation, click Instances. + Choose the VM that you want to delete. + Click the Destroy Instance button. + + + + + Destroyinstance.png: button to destroy an instance + + + + +
+ diff --git a/docs/en-US/deployment-architecture-overview.xml b/docs/en-US/deployment-architecture-overview.xml index 2c5f30ec0..e3103c52c 100644 --- a/docs/en-US/deployment-architecture-overview.xml +++ b/docs/en-US/deployment-architecture-overview.xml @@ -1,57 +1,57 @@ - %BOOK_ENTITIES; ]> -
- Deployment Architecture Overview - + Deployment Architecture Overview + A &PRODUCT; installation consists of two parts: the Management Server and the cloud infrastructure that it manages. When you set up and manage a &PRODUCT; cloud, you provision resources such as hosts, storage devices, and IP addresses into the Management Server, and the Management Server manages those resources. - - + + The minimum production installation consists of one machine running the &PRODUCT; Management Server and another machine to act as the cloud infrastructure (in this case, a very simple infrastructure consisting of one host running hypervisor software). In its smallest deployment, a single machine can act as both the Management Server and the hypervisor host (using the KVM hypervisor). - - - - - - basic-deployment.png: Basic two-machine deployment - + + + + + + basic-deployment.png: Basic two-machine deployment + A more full-featured installation consists of a highly-available multi-node Management Server installation and up to tens of thousands of hosts using any of several advanced networking setups. For - information about deployment options, see Choosing a Deployment Architecture. - - - - + information about deployment options, see the "Choosing a Deployment Architecture" + section of the $PRODUCT; Installation Guide. + + + +
diff --git a/docs/en-US/detach-move-volumes.xml b/docs/en-US/detach-move-volumes.xml index 25323c928..fda6e66ce 100644 --- a/docs/en-US/detach-move-volumes.xml +++ b/docs/en-US/detach-move-volumes.xml @@ -5,39 +5,42 @@ ]> -
- Attaching a Volume - This procedure is different from moving disk volumes from one storage pool to another. See VM Storage Migration - A volume can be detached from a guest VM and attached to another guest. Both &PRODUCT; administrators and users can detach volumes from VMs and move them to other VMs. - If the two VMs are in different clusters, and the volume is large, it may take several minutes for the volume to be moved to the new VM. + Detaching and Moving Volumes + This procedure is different from moving disk volumes from one storage pool to another. See VM Storage Migration + A volume can be detached from a guest VM and attached to another guest. Both &PRODUCT; administrators and users can detach volumes from VMs and move them to other VMs. + If the two VMs are in different clusters, and the volume is large, it may take several minutes for the volume to be moved to the new VM. - - Log in to the &PRODUCT; UI as a user or admin. - In the left navigation bar, click Storage, and choose Volumes in Select View. Alternatively, if you know which VM the volume is attached to, you can click Instances, click the VM name, and click View Volumes. - Click the name of the volume you want to detach, then click the Detach Disk button - - - - DetachDiskButton.png: button to detach a volume - - - To move the volume to another VM, follow the steps in Attaching a Volume . - -
+ + Log in to the &PRODUCT; UI as a user or admin. + In the left navigation bar, click Storage, and choose Volumes in Select View. Alternatively, if you know which VM the volume is attached to, you can click Instances, click the VM name, and click View Volumes. + Click the name of the volume you want to detach, then click the Detach Disk button. + + + + + DetachDiskButton.png: button to detach a volume + + + + To move the volume to another VM, follow the steps in . + +
+ diff --git a/docs/en-US/devcloud-usage-mode.xml b/docs/en-US/devcloud-usage-mode.xml index bb65f904c..bc211ce14 100644 --- a/docs/en-US/devcloud-usage-mode.xml +++ b/docs/en-US/devcloud-usage-mode.xml @@ -32,7 +32,7 @@ The following diagram shows the architecture of the SandBox mode. - + DevCloud.png: Schematic of the DevCloud SandBox architecture @@ -49,7 +49,7 @@ The following schematic shows the architecture of the Host-Only mode. - + DevCloud-hostonly.png: Schematic of the DevCloud host-only architecture diff --git a/docs/en-US/egress-firewall-rule.xml b/docs/en-US/egress-firewall-rule.xml new file mode 100644 index 000000000..ef0e25efd --- /dev/null +++ b/docs/en-US/egress-firewall-rule.xml @@ -0,0 +1,98 @@ + + +%BOOK_ENTITIES; +]> + +
+ Creating Egress Firewall Rules in an Advanced Zone + + The egress firewall rules are supported only on virtual routers. + + + The egress traffic originates from a private network to a public network, such as the + Internet. By default, the egress traffic is blocked, so no outgoing traffic is allowed from a + guest network to the Internet. However, you can control the egress traffic in an Advanced zone + by creating egress firewall rules. When an egress firewall rule is applied, the traffic specific + to the rule is allowed and the remaining traffic is blocked. When all the firewall rules are + removed the default policy, Block, is applied. + Consider the following scenarios to apply egress firewall rules: + + + Allow the egress traffic from specified source CIDR. The Source CIDR is part of guest + network CIDR. + + + Allow the egress traffic with destination protocol TCP,UDP,ICMP, or ALL. + + + Allow the egress traffic with destination protocol and port range. The port range is + specified for TCP, UDP or for ICMP type and code. + + + To configure an egress firewall rule: + + + Log in to the &PRODUCT; UI as an administrator or end user. + + + In the left navigation, choose Network. + + + In Select view, choose Guest networks, then click the Guest network you want. + + + To add an egress rule, click the Egress rules tab and fill out the following fields to + specify what type of traffic is allowed to be sent out of VM instances in this guest + network: + + + + + + egress-firewall-rule.png: adding an egress firewall rule + + + + + CIDR: (Add by CIDR only) To send traffic only to + the IP addresses within a particular address block, enter a CIDR or a comma-separated + list of CIDRs. The CIDR is the base IP address of the destination. For example, + 192.168.0.0/22. To allow all CIDRs, set to 0.0.0.0/0. + + + Protocol: The networking protocol that VMs uses to + send outgoing traffic. The TCP and UDP protocols are typically used for data exchange + and end-user communications. The ICMP protocol is typically used to send error messages + or network monitoring data. + + + Start Port, End Port: (TCP, UDP only) A range of + listening ports that are the destination for the outgoing traffic. If you are opening a + single port, use the same number in both fields. + + + ICMP Type, ICMP Code: (ICMP only) The type of + message and error code that are sent. + + + + + Click Add. + + +
diff --git a/docs/en-US/enable-disable-static-nat.xml b/docs/en-US/enable-disable-static-nat.xml index f25327a54..0154dca27 100644 --- a/docs/en-US/enable-disable-static-nat.xml +++ b/docs/en-US/enable-disable-static-nat.xml @@ -5,40 +5,42 @@ ]> -
- Enabling or Disabling Static NAT - If port forwarding rules are already in effect for an IP address, you cannot enable static NAT to that IP. - If a guest VM is part of more than one network, static NAT rules will function only if they are defined on the default network. - - Log in to the &PRODUCT; UI as an administrator or end user. - In the left navigation, choose Network. - Click the name of the network where you want to work with. - Click View IP Addresses. - Click the IP address you want to work with. - - Click the Static NAT button. - - - - ReleaseIPButton.png: button to release an IP - The button toggles between Enable and Disable, depending on whether static NAT is currently enabled for the IP address. - If you are enabling static NAT, a dialog appears where you can choose the destination VM and click Apply - + Enabling or Disabling Static NAT + If port forwarding rules are already in effect for an IP address, you cannot enable static NAT to that IP. + If a guest VM is part of more than one network, static NAT rules will function only if they are defined on the default network. + + Log in to the &PRODUCT; UI as an administrator or end user. + In the left navigation, choose Network. + Click the name of the network where you want to work with. + Click View IP Addresses. + Click the IP address you want to work with. + + Click the Static NAT + + + + + ReleaseIPButton.png: button to release an IP + + button.The button toggles between Enable and Disable, depending on whether static NAT is currently enabled for the IP address. + If you are enabling static NAT, a dialog appears where you can choose the destination VM and + click Apply. +
diff --git a/docs/en-US/enable-security-groups.xml b/docs/en-US/enable-security-groups.xml index 27f69d2ce..c957310f9 100644 --- a/docs/en-US/enable-security-groups.xml +++ b/docs/en-US/enable-security-groups.xml @@ -5,25 +5,28 @@ ]> -
- Enabling Security Groups - In order for security groups to function in a zone, the security groups feature must first be enabled for the zone. The administrator can do this when creating a new zone, by selecting a network offering that includes security groups. The procedure is described in Basic Zone Configuration in the Advanced Installation Guide. + Enabling Security Groups + In order for security groups to function in a zone, the security groups feature must first be + enabled for the zone. The administrator can do this when creating a new zone, by selecting a + network offering that includes security groups. The procedure is described in Basic Zone + Configuration in the Advanced Installation Guide. The administrator can not enable security + groups for an existing zone, only when creating a new zone.
diff --git a/docs/en-US/end-user-ui-overview.xml b/docs/en-US/end-user-ui-overview.xml index dc95ce064..6ec1a25fc 100644 --- a/docs/en-US/end-user-ui-overview.xml +++ b/docs/en-US/end-user-ui-overview.xml @@ -1,28 +1,27 @@ - %BOOK_ENTITIES; ]> -
- End User's UI Overview - The &PRODUCT; UI helps users of cloud infrastructure to view and use their cloud resources, including virtual machines, templates and ISOs, data volumes and snapshots, guest networks, and IP addresses. If the user is a member or administrator of one or more &PRODUCT; projects, the UI can provide a project-oriented view. + End User's UI Overview + The &PRODUCT; UI helps users of cloud infrastructure to view and use their cloud resources, including virtual machines, templates and ISOs, data volumes and snapshots, guest networks, and IP addresses. If the user is a member or administrator of one or more &PRODUCT; projects, the UI can provide a project-oriented view.
diff --git a/docs/en-US/event-framework.xml b/docs/en-US/event-framework.xml new file mode 100644 index 000000000..88c45c903 --- /dev/null +++ b/docs/en-US/event-framework.xml @@ -0,0 +1,110 @@ + + +%BOOK_ENTITIES; +]> + + +
+ Event Notification + Event notification framework provides a means for the Management Server components to + publish and subscribe to &PRODUCT; events. Event notification is achieved by implementing the + concept of event bus abstraction in the Management Server. An event bus is introduced in the + Management Server that allows the &PRODUCT;components and extension plug-ins to subscribe to the + events by using the Advanced Message Queuing Protocol (AMQP) client. In &PRODUCT;, a default + implementation of event bus is provided as a plug-in that uses the RabbitMQ AMQP client. The + AMQP client pushes the published events to a compatible AMQP server. Therefore all the &PRODUCT; + events are published to an exchange in the AMQP server. + A new event for state change, resource state change, is introduced as part of Event + notification framework. Every resource, such as user VM, volume, NIC, network, public IP, + snapshot, and template, is associated with a state machine and generates events as part of the + state change. That implies that a change in the state of a resource results in a state change + event, and the event is published in the corresponding state machine on the event bus. All the + &PRODUCT; events (alerts, action events, usage events) and the additional category of resource + state change events, are published on to the events bus. + + Use Cases + The following are some of the use cases: + + + + Usage or Billing Engines: A third-party cloud usage solution can implement a plug-in + that can connects to &PRODUCT; to subscribe to &PRODUCT; events and generate usage data. The + usage data is consumed by their usage software. + + + AMQP plug-in can place all the events on the a message queue, then a AMQP message broker + can provide topic-based notification to the subscribers. + + + Publish and Subscribe notification service can be implemented as a pluggable service in + &PRODUCT; that can provide rich set of APIs for event notification, such as topics-based + subscription and notification. Additionally, the pluggable service can deal with + multi-tenancy, authentication, and authorization issues. + + + + Configuration + As a &PRODUCT; administrator, perform the following one-time configuration to enable event + notification framework. At run time no changes can control the behaviour. + + + + Open 'componentContext.xml. + + + Define a bean named eventNotificationBus as follows: + + + name : Specify a name for the bean. + + + server : The name or the IP address of the RabbitMQ AMQP server. + + + port : The port on which RabbitMQ server is running. + + + username : The username associated with the account to access the RabbitMQ + server. + + + password : The password associated with the username of the account to access the + RabbitMQ server. + + + exchange : The exchange name on the RabbitMQ server where &PRODUCT; events are + published. + A sample bean is given below: + <bean id="eventNotificationBus" class="org.apache.cloudstack.mom.rabbitmq.RabbitMQEventBus"> + <property name="name" value="eventNotificationBus"/> + <property name="server" value="127.0.0.1"/> + <property name="port" value="5672"/> + <property name="username" value="guest"/> + <property name="password" value="guest"/> + <property name="exchange" value="cloudstack-events"/> + </bean> + The eventNotificationBus bean represents the + org.apache.cloudstack.mom.rabbitmq.RabbitMQEventBus class. + + + + + Restart the Management Server. + + +
diff --git a/docs/en-US/event-log-queries.xml b/docs/en-US/event-log-queries.xml index 32a1612ce..a0dcaa607 100644 --- a/docs/en-US/event-log-queries.xml +++ b/docs/en-US/event-log-queries.xml @@ -5,23 +5,22 @@ ]> -
Event Log Queries Database logs can be queried from the user interface. The list of events captured by the system includes: @@ -34,4 +33,4 @@ Storage volume creation and deletion User login and logout -
+
diff --git a/docs/en-US/event-types.xml b/docs/en-US/event-types.xml index 2ccd55335..5ce585763 100644 --- a/docs/en-US/event-types.xml +++ b/docs/en-US/event-types.xml @@ -5,216 +5,216 @@ ]> + 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. +--> - Event Types - - - - - - - VM.CREATE - TEMPLATE.EXTRACT - SG.REVOKE.INGRESS - - - VM.DESTROY - TEMPLATE.UPLOAD - HOST.RECONNECT - - - VM.START - TEMPLATE.CLEANUP - MAINT.CANCEL - - - VM.STOP - VOLUME.CREATE - MAINT.CANCEL.PS - - - VM.REBOOT - VOLUME.DELETE - MAINT.PREPARE - - - VM.UPGRADE - VOLUME.ATTACH - MAINT.PREPARE.PS - - - VM.RESETPASSWORD - VOLUME.DETACH - VPN.REMOTE.ACCESS.CREATE - - - ROUTER.CREATE - VOLUME.UPLOAD - VPN.USER.ADD - - - ROUTER.DESTROY - SERVICEOFFERING.CREATE - VPN.USER.REMOVE - - - ROUTER.START - SERVICEOFFERING.UPDATE - NETWORK.RESTART - - - ROUTER.STOP - SERVICEOFFERING.DELETE - UPLOAD.CUSTOM.CERTIFICATE - - - ROUTER.REBOOT - DOMAIN.CREATE - UPLOAD.CUSTOM.CERTIFICATE - - - ROUTER.HA - DOMAIN.DELETE - STATICNAT.DISABLE - - - PROXY.CREATE - DOMAIN.UPDATE - SSVM.CREATE - - - PROXY.DESTROY - SNAPSHOT.CREATE - SSVM.DESTROY - - - PROXY.START - SNAPSHOT.DELETE - SSVM.START - - - PROXY.STOP - SNAPSHOTPOLICY.CREATE - SSVM.STOP - - - PROXY.REBOOT - SNAPSHOTPOLICY.UPDATE - SSVM.REBOOT - - - PROXY.HA - SNAPSHOTPOLICY.DELETE - SSVM.H - - - VNC.CONNECT - VNC.DISCONNECT - NET.IPASSIGN - - - NET.IPRELEASE - NET.RULEADD - NET.RULEDELETE - - - NET.RULEMODIFY - NETWORK.CREATE - NETWORK.DELETE - - - LB.ASSIGN.TO.RULE - LB.REMOVE.FROM.RULE - LB.CREATE - - - LB.DELETE - LB.UPDATE - USER.LOGIN - - - USER.LOGOUT - USER.CREATE - USER.DELETE - - - USER.UPDATE - USER.DISABLE - TEMPLATE.CREATE - - - TEMPLATE.DELETE - TEMPLATE.UPDATE - TEMPLATE.COPY - - - TEMPLATE.DOWNLOAD.START - TEMPLATE.DOWNLOAD.SUCCESS - TEMPLATE.DOWNLOAD.FAILED - - - ISO.CREATE - ISO.DELETE - ISO.COPY - - - ISO.ATTACH - ISO.DETACH - ISO.EXTRACT - - - ISO.UPLOAD - SERVICE.OFFERING.CREATE - SERVICE.OFFERING.EDIT - - - SERVICE.OFFERING.DELETE - DISK.OFFERING.CREATE - DISK.OFFERING.EDIT - - - DISK.OFFERING.DELETE - NETWORK.OFFERING.CREATE - NETWORK.OFFERING.EDIT - - - NETWORK.OFFERING.DELETE - POD.CREATE - POD.EDIT - - - POD.DELETE - ZONE.CREATE - ZONE.EDIT - - - ZONE.DELETE - VLAN.IP.RANGE.CREATE - VLAN.IP.RANGE.DELETE - - - CONFIGURATION.VALUE.EDIT - SG.AUTH.INGRESS - - - - - + Event Types + + + + + + + VM.CREATE + TEMPLATE.EXTRACT + SG.REVOKE.INGRESS + + + VM.DESTROY + TEMPLATE.UPLOAD + HOST.RECONNECT + + + VM.START + TEMPLATE.CLEANUP + MAINT.CANCEL + + + VM.STOP + VOLUME.CREATE + MAINT.CANCEL.PS + + + VM.REBOOT + VOLUME.DELETE + MAINT.PREPARE + + + VM.UPGRADE + VOLUME.ATTACH + MAINT.PREPARE.PS + + + VM.RESETPASSWORD + VOLUME.DETACH + VPN.REMOTE.ACCESS.CREATE + + + ROUTER.CREATE + VOLUME.UPLOAD + VPN.USER.ADD + + + ROUTER.DESTROY + SERVICEOFFERING.CREATE + VPN.USER.REMOVE + + + ROUTER.START + SERVICEOFFERING.UPDATE + NETWORK.RESTART + + + ROUTER.STOP + SERVICEOFFERING.DELETE + UPLOAD.CUSTOM.CERTIFICATE + + + ROUTER.REBOOT + DOMAIN.CREATE + UPLOAD.CUSTOM.CERTIFICATE + + + ROUTER.HA + DOMAIN.DELETE + STATICNAT.DISABLE + + + PROXY.CREATE + DOMAIN.UPDATE + SSVM.CREATE + + + PROXY.DESTROY + SNAPSHOT.CREATE + SSVM.DESTROY + + + PROXY.START + SNAPSHOT.DELETE + SSVM.START + + + PROXY.STOP + SNAPSHOTPOLICY.CREATE + SSVM.STOP + + + PROXY.REBOOT + SNAPSHOTPOLICY.UPDATE + SSVM.REBOOT + + + PROXY.HA + SNAPSHOTPOLICY.DELETE + SSVM.H + + + VNC.CONNECT + VNC.DISCONNECT + NET.IPASSIGN + + + NET.IPRELEASE + NET.RULEADD + NET.RULEDELETE + + + NET.RULEMODIFY + NETWORK.CREATE + NETWORK.DELETE + + + LB.ASSIGN.TO.RULE + LB.REMOVE.FROM.RULE + LB.CREATE + + + LB.DELETE + LB.UPDATE + USER.LOGIN + + + USER.LOGOUT + USER.CREATE + USER.DELETE + + + USER.UPDATE + USER.DISABLE + TEMPLATE.CREATE + + + TEMPLATE.DELETE + TEMPLATE.UPDATE + TEMPLATE.COPY + + + TEMPLATE.DOWNLOAD.START + TEMPLATE.DOWNLOAD.SUCCESS + TEMPLATE.DOWNLOAD.FAILED + + + ISO.CREATE + ISO.DELETE + ISO.COPY + + + ISO.ATTACH + ISO.DETACH + ISO.EXTRACT + + + ISO.UPLOAD + SERVICE.OFFERING.CREATE + SERVICE.OFFERING.EDIT + + + SERVICE.OFFERING.DELETE + DISK.OFFERING.CREATE + DISK.OFFERING.EDIT + + + DISK.OFFERING.DELETE + NETWORK.OFFERING.CREATE + NETWORK.OFFERING.EDIT + + + NETWORK.OFFERING.DELETE + POD.CREATE + POD.EDIT + + + POD.DELETE + ZONE.CREATE + ZONE.EDIT + + + ZONE.DELETE + VLAN.IP.RANGE.CREATE + VLAN.IP.RANGE.DELETE + + + CONFIGURATION.VALUE.EDIT + SG.AUTH.INGRESS + + + + + diff --git a/docs/en-US/events-log.xml b/docs/en-US/events-log.xml index 9de679ea1..fa97db459 100644 --- a/docs/en-US/events-log.xml +++ b/docs/en-US/events-log.xml @@ -5,24 +5,31 @@ ]> -
Event Logs - There are two types of events logged in the &PRODUCT; Event Log. Standard events log the success or failure of an event and can be used to identify jobs or processes that have failed. There are also long running job events. Events for asynchronous jobs log when a job is scheduled, when it starts, and when it completes. Other long running synchronous jobs log when a job starts, and when it completes. Long running synchronous and asynchronous event logs can be used to gain more information on the status of a pending job or can be used to identify a job that is hanging or has not started. The following sections provide more information on these events.. -
+ There are two types of events logged in the &PRODUCT; Event Log. Standard events log + the success or failure of an event and can be used to identify jobs or processes that have + failed. There are also long running job events. Events for asynchronous jobs log when a job + is scheduled, when it starts, and when it completes. Other long running synchronous jobs log + when a job starts, and when it completes. Long running synchronous and asynchronous event + logs can be used to gain more information on the status of a pending job or can be used to + identify a job that is hanging or has not started. The following sections provide more + information on these events.. +
+ diff --git a/docs/en-US/events.xml b/docs/en-US/events.xml index 9b6d75cfb..49ef86e62 100644 --- a/docs/en-US/events.xml +++ b/docs/en-US/events.xml @@ -5,27 +5,33 @@ ]> -
- Events - - - - + Events + An event is essentially a significant or meaningful change in the state of both virtual and + physical resources associated with a cloud environment. Events are used by monitoring systems, + usage and billing systems, or any other event-driven workflow systems to discern a pattern and + make the right business decision. In &PRODUCT; an event could be a state change of virtual or + psychical resources, an action performed by an user (action events), or policy based events + (alerts). + + + + +
diff --git a/docs/en-US/external-firewalls-and-load-balancers.xml b/docs/en-US/external-firewalls-and-load-balancers.xml index 6ca49f0ef..b947daf73 100644 --- a/docs/en-US/external-firewalls-and-load-balancers.xml +++ b/docs/en-US/external-firewalls-and-load-balancers.xml @@ -27,7 +27,7 @@ -
diff --git a/docs/en-US/extracting-source.xml b/docs/en-US/extracting-source.xml index 97a40b662..d16904012 100644 --- a/docs/en-US/extracting-source.xml +++ b/docs/en-US/extracting-source.xml @@ -27,10 +27,10 @@ Extracting the &PRODUCT; release is relatively simple and can be done with a single command as follows: - $ tar -jxvf apache-cloudstack-4.0.0-incubating-src.tar.bz2 + $ tar -jxvf apache-cloudstack-4.1.0.src.tar.bz2 You can now move into the directory: - $ cd ./apache-cloudstack-4.0.0-incubating-src + $ cd ./apache-cloudstack-4.1.0-src
diff --git a/docs/en-US/feature-overview.xml b/docs/en-US/feature-overview.xml index 501bca88c..57b6d8497 100644 --- a/docs/en-US/feature-overview.xml +++ b/docs/en-US/feature-overview.xml @@ -1,76 +1,75 @@ - %BOOK_ENTITIES; ]> -
- What Can &PRODUCT; Do? - - Multiple Hypervisor Support - - + What Can &PRODUCT; Do? + + Multiple Hypervisor Support + + &PRODUCT; works with a variety of hypervisors, and a single cloud deployment can contain multiple hypervisor implementations. The current release of &PRODUCT; supports pre-packaged enterprise solutions like Citrix XenServer and VMware vSphere, as well as KVM or Xen running on Ubuntu or CentOS. - - Massively Scalable Infrastructure Management - - - &PRODUCT; can manage tens of thousands of servers installed in multiple geographically distributed datacenters. The centralized management server scales linearly, eliminating the need for intermediate cluster-level management servers. No single component failure can cause cloud-wide outage. Periodic maintenance of the management server can be performed without affecting the functioning of virtual machines running in the cloud. - - - Automatic Configuration Management - - &PRODUCT; automatically configures each guest virtual machine’s networking and storage settings. - - &PRODUCT; internally manages a pool of virtual appliances to support the cloud itself. These appliances offer services such as firewalling, routing, DHCP, VPN access, console proxy, storage access, and storage replication. The extensive use of virtual appliances simplifies the installation, configuration, and ongoing management of a cloud deployment. - - - Graphical User Interface - - &PRODUCT; offers an administrator's Web interface, used for provisioning and managing the cloud, as well as an end-user's Web interface, used for running VMs and managing VM templates. The UI can be customized to reflect the desired service provider or enterprise look and feel. - - - API and Extensibility - - + + Massively Scalable Infrastructure Management + + + &PRODUCT; can manage tens of thousands of servers installed in multiple geographically distributed datacenters. The centralized management server scales linearly, eliminating the need for intermediate cluster-level management servers. No single component failure can cause cloud-wide outage. Periodic maintenance of the management server can be performed without affecting the functioning of virtual machines running in the cloud. + + + Automatic Configuration Management + + &PRODUCT; automatically configures each guest virtual machine’s networking and storage settings. + + &PRODUCT; internally manages a pool of virtual appliances to support the cloud itself. These appliances offer services such as firewalling, routing, DHCP, VPN access, console proxy, storage access, and storage replication. The extensive use of virtual appliances simplifies the installation, configuration, and ongoing management of a cloud deployment. + + + Graphical User Interface + + &PRODUCT; offers an administrator's Web interface, used for provisioning and managing the cloud, as well as an end-user's Web interface, used for running VMs and managing VM templates. The UI can be customized to reflect the desired service provider or enterprise look and feel. + + + API and Extensibility + + &PRODUCT; provides an API that gives programmatic access to all the management features available in the UI. The API is maintained and documented. This API enables the creation of command line tools and new user interfaces to suit particular needs. See the Developer’s Guide and API Reference, both available at - Apache CloudStack Guides + Apache CloudStack Guides and - Apache CloudStack API Reference + Apache CloudStack API Reference respectively. - - + + The &PRODUCT; pluggable allocation architecture allows the creation of new types of allocators for the selection of storage and Hosts. See the Allocator Implementation Guide (http://docs.cloudstack.org/CloudStack_Documentation/Allocator_Implementation_Guide). - - - High Availability - + + + High Availability + &PRODUCT; has a number of features to increase the availability of the system. The Management Server itself may be deployed in a multi-node @@ -78,5 +77,5 @@ to use replication to provide for a manual failover in the event of database loss. For the hosts, &PRODUCT; supports NIC bonding and the use of separate networks for storage as well as iSCSI Multipath. - +
diff --git a/docs/en-US/firewall-rules.xml b/docs/en-US/firewall-rules.xml index 388bf7e28..837a4c6f9 100644 --- a/docs/en-US/firewall-rules.xml +++ b/docs/en-US/firewall-rules.xml @@ -3,54 +3,80 @@ %BOOK_ENTITIES; ]> - -
- Firewall Rules - By default, all incoming traffic to the public IP address is rejected by the firewall. To allow external traffic, you can open firewall ports by specifying firewall rules. You can optionally specify one or more CIDRs to filter the source IPs. This is useful when you want to allow only incoming requests from certain IP addresses. - You cannot use firewall rules to open ports for an elastic IP address. When elastic IP is used, outside access is instead controlled through the use of security groups. See . - Firewall rules can be created using the Firewall tab in the Management Server UI. This tab is not displayed by default when &PRODUCT; is installed. To display the Firewall tab, the &PRODUCT; administrator must set the global configuration parameter firewall.rule.ui.enabled to "true." - To create a firewall rule: - - Log in to the &PRODUCT; UI as an administrator or end user. - In the left navigation, choose Network. - Click the name of the network where you want to work with. - Click View IP Addresses. - Click the IP address you want to work with. + Firewall Rules + By default, all incoming traffic to the public IP address is rejected by the firewall. To + allow external traffic, you can open firewall ports by specifying firewall rules. You can + optionally specify one or more CIDRs to filter the source IPs. This is useful when you want to + allow only incoming requests from certain IP addresses. + You cannot use firewall rules to open ports for an elastic IP address. When elastic IP is + used, outside access is instead controlled through the use of security groups. See . + In an advanced zone, you can also create egress firewall rules by using the virtual router. + For more information, see . + Firewall rules can be created using the Firewall tab in the Management Server UI. This tab + is not displayed by default when &PRODUCT; is installed. To display the Firewall tab, the + &PRODUCT; administrator must set the global configuration parameter firewall.rule.ui.enabled to + "true." + To create a firewall rule: + + + Log in to the &PRODUCT; UI as an administrator or end user. + + + In the left navigation, choose Network. + + + Click the name of the network where you want to work with. + + + Click View IP Addresses. + + + Click the IP address you want to work with. + + + Click the Configuration tab and fill in the following values. + + + Source CIDR. (Optional) To accept only traffic from + IP addresses within a particular address block, enter a CIDR or a comma-separated list + of CIDRs. Example: 192.168.0.0/22. Leave empty to allow all CIDRs. - Click the Configuration tab and fill in the following values. - - Source CIDR. (Optional) To accept only traffic from IP - addresses within a particular address block, enter a CIDR or a - comma-separated list of CIDRs. Example: 192.168.0.0/22. Leave empty to allow - all CIDRs. - Protocol. The communication protocol in use on the opened - port(s). - Start Port and End Port. The port(s) you want to open on the - firewall. If you are opening a single port, use the same number in both - fields - ICMP Type and ICMP Code. Used only if Protocol is set to - ICMP. Provide the type and code required by the ICMP protocol to fill out - the ICMP header. Refer to ICMP documentation for more details if you are not - sure what to enter - - Click Add - + + Protocol. The communication protocol in use on the + opened port(s). + + + Start Port and End Port. The port(s) you want to + open on the firewall. If you are opening a single port, use the same number in both + fields + + + ICMP Type and ICMP Code. Used only if Protocol is + set to ICMP. Provide the type and code required by the ICMP protocol to fill out the + ICMP header. Refer to ICMP documentation for more details if you are not sure what to + enter + + + + + Click Add. + +
diff --git a/docs/en-US/getting-release.xml b/docs/en-US/getting-release.xml index 09f0a7b08..ee08a941b 100644 --- a/docs/en-US/getting-release.xml +++ b/docs/en-US/getting-release.xml @@ -29,35 +29,12 @@ Apache CloudStack project download page. - - You'll notice several links under the 'Latest release' section. - - - - - - apache-cloudstack-4.0.0-incubating-src.tar.bz2 - - This is the link to the release itself. - - - - - PGP - - This is a detached cryptographic signature that can be used to help - verify the authenticity of the release. - - - - - MD5 - - An MD5 hash of the release to aid in verify the validity of the release download. - - - - - SHA512 - - A SHA512 hash of the release to aid in verify the validity of the release download. - - - + Prior releases are available via archive.apache.org as well. See the downloads page for more information on archived releases. + You'll notice several links under the 'Latest release' section. A link to a file ending in tar.bz2, as well as a PGP/GPG signature, MD5, and SHA512 file. + + The tar.bz2 file contains the Bzip2-compressed tarball with the source code. + The .asc file is a detached cryptographic signature that can be used to help verify the authenticity of the release. + The .md5 file is an MD5 hash of the release to aid in verify the validity of the release download. + The .sha file is a SHA512 hash of the release to aid in verify the validity of the release download. +
diff --git a/docs/en-US/global-config.xml b/docs/en-US/global-config.xml index 2f6ad105c..11952c382 100644 --- a/docs/en-US/global-config.xml +++ b/docs/en-US/global-config.xml @@ -19,6 +19,8 @@ under the License. --> + Global Configuration Parameters +
Setting Global Configuration Parameters &PRODUCT; provides parameters that you can set to control many aspects of the cloud. When &PRODUCT; is first installed, and periodically thereafter, you might need to modify these @@ -51,4 +53,81 @@ must click the name of the hypervisor first to display the editing screen. +
+
+ About Global Configuration Parameters + &PRODUCT; provides a variety of settings you can use to set limits, configure features, + and enable or disable features in the cloud. Once your Management Server is running, you might + need to set some of these global configuration parameters, depending on what optional features + you are setting up. + To modify global configuration parameters, use the steps in "Setting Global Configuration + Parameters." + The documentation for each &PRODUCT; feature should direct you to the names of the applicable + parameters. Many of them are discussed in the &PRODUCT; Administration Guide. The following table + shows a few of the more useful parameters. + + + + + + + Field + Value + + + + + management.network.cidr + A CIDR that describes the network that the management CIDRs reside on. This + variable must be set for deployments that use vSphere. It is recommended to be set for + other deployments as well. Example: 192.168.3.0/24. + + + xen.setup.multipath + For XenServer nodes, this is a true/false variable that instructs CloudStack to + enable iSCSI multipath on the XenServer Hosts when they are added. This defaults to false. + Set it to true if you would like CloudStack to enable multipath. + If this is true for a NFS-based deployment multipath will still be enabled on the + XenServer host. However, this does not impact NFS operation and is harmless. + + + secstorage.allowed.internal.sites + This is used to protect your internal network from rogue attempts to download + arbitrary files using the template download feature. This is a comma-separated list of CIDRs. + If a requested URL matches any of these CIDRs the Secondary Storage VM will use the private + network interface to fetch the URL. Other URLs will go through the public interface. + We suggest you set this to 1 or 2 hardened internal machines where you keep your templates. + For example, set it to 192.168.1.66/32. + + + use.local.storage + Determines whether CloudStack will use storage that is local to the Host for data + disks, templates, and snapshots. By default CloudStack will not use this storage. You should + change this to true if you want to use local storage and you understand the reliability and + feature drawbacks to choosing local storage. + + + host + This is the IP address of the Management Server. If you are using multiple + Management Servers you should enter a load balanced IP address that is reachable via + the private network. + + + default.page.size + Maximum number of items per page that can be returned by a CloudStack API command. + The limit applies at the cloud level and can vary from cloud to cloud. You can override this + with a lower value on a particular API call by using the page and pagesize API command parameters. + For more information, see the Developer's Guide. Default: 500. + + + ha.tag + The label you want to use throughout the cloud to designate certain hosts as dedicated + HA hosts. These hosts will be used only for HA-enabled VMs that are restarting due to the failure + of another host. For example, you could set this to ha_host. Specify the ha.tag value as a host tag + when you add a new host to the cloud. + + + + +
diff --git a/docs/en-US/globally-configured-limits.xml b/docs/en-US/globally-configured-limits.xml index 48a91f1b0..ac71112b3 100644 --- a/docs/en-US/globally-configured-limits.xml +++ b/docs/en-US/globally-configured-limits.xml @@ -22,7 +22,7 @@ under the License. --> -
+
Globally Configured Limits In a zone, the guest virtual network has a 24 bit CIDR by default. This limits the guest virtual network to 254 running instances. It can be adjusted as needed, but this must be done before any instances are created in the zone. For example, 10.1.1.0/22 would provide for ~1000 addresses. The following table lists limits set in the Global Configuration: diff --git a/docs/en-US/guest-nw-usage-with-traffic-sentinel.xml b/docs/en-US/guest-nw-usage-with-traffic-sentinel.xml index eb42d641c..d6fc10bca 100644 --- a/docs/en-US/guest-nw-usage-with-traffic-sentinel.xml +++ b/docs/en-US/guest-nw-usage-with-traffic-sentinel.xml @@ -54,12 +54,11 @@ addTrafficMonitor. Pass in the URL of the Traffic Sentinel as protocol + host + port (optional); for example, http://10.147.28.100:8080. For the addTrafficMonitor command syntax, see the API Reference at API + url="http://cloudstack.apache.org/docs/api/index.html">API Documentation. For information about how to call the &PRODUCT; API, see the Developer’s Guide at - CloudStack API Developer's Guide. + + &PRODUCT; API Developer's Guide. Log in to the &PRODUCT; UI as administrator. diff --git a/docs/en-US/guest-traffic.xml b/docs/en-US/guest-traffic.xml index 8404968b9..bca635582 100644 --- a/docs/en-US/guest-traffic.xml +++ b/docs/en-US/guest-traffic.xml @@ -5,27 +5,33 @@ ]> -
- Guest Traffic + Guest Traffic A network can carry guest traffic only between VMs within one zone. Virtual machines in different zones cannot communicate with each other using their IP addresses; they must communicate with each other by routing through a public IP address. - The Management Server automatically creates a virtual router for each network. A virtual router is a special virtual machine that runs on the hosts. Each virtual router has three network interfaces. Its eth0 interface serves as the gateway for the guest traffic and has the IP address of 10.1.1.1. Its eth1 interface is used by the system to configure the virtual router. Its eth2 interface is assigned a public IP address for public traffic. - The virtual router provides DHCP and will automatically assign an IP address for each guest VM within the IP range assigned for the network. The user can manually reconfigure guest VMs to assume different IP addresses. - Source NAT is automatically configured in the virtual router to forward outbound traffic for all guest VMs + This figure illustrates a typical guest traffic setup: + + + + + Depicts a guest traffic setup. + + The Management Server automatically creates a virtual router for each network. A virtual router is a special virtual machine that runs on the hosts. Each virtual router has three network interfaces. Its eth0 interface serves as the gateway for the guest traffic and has the IP address of 10.1.1.1. Its eth1 interface is used by the system to configure the virtual router. Its eth2 interface is assigned a public IP address for public traffic. + The virtual router provides DHCP and will automatically assign an IP address for each guest VM within the IP range assigned for the network. The user can manually reconfigure guest VMs to assume different IP addresses. + Source NAT is automatically configured in the virtual router to forward outbound traffic for all guest VMs
diff --git a/docs/en-US/ha-for-hosts.xml b/docs/en-US/ha-for-hosts.xml index e395d22e5..15b5fa73f 100644 --- a/docs/en-US/ha-for-hosts.xml +++ b/docs/en-US/ha-for-hosts.xml @@ -1,29 +1,30 @@ - %BOOK_ENTITIES; ]>
HA for Hosts The user can specify a virtual machine as HA-enabled. By default, all virtual router VMs and Elastic Load Balancing VMs are automatically configured as HA-enabled. When an HA-enabled VM crashes, &PRODUCT; detects the crash and restarts the VM automatically within the same Availability Zone. HA is never performed across different Availability Zones. &PRODUCT; has a conservative policy towards restarting VMs and ensures that there will never be two instances of the same VM running at the same time. The Management Server attempts to start the VM on another Host in the same cluster. HA features work with iSCSI or NFS primary storage. HA with local storage is not supported. -
+ +
diff --git a/docs/en-US/host-allocation.xml b/docs/en-US/host-allocation.xml index 8a362e6e9..f5bc53c7f 100644 --- a/docs/en-US/host-allocation.xml +++ b/docs/en-US/host-allocation.xml @@ -1,25 +1,25 @@ - %BOOK_ENTITIES; ]>
@@ -28,4 +28,5 @@ &PRODUCT; administrators can specify that certain hosts should have a preference for particular types of guest instances. For example, an administrator could state that a host should have a preference to run Windows guests. The default host allocator will attempt to place guests of that OS type on such hosts first. If no such host is available, the allocator will place the instance wherever there is sufficient physical capacity. Both vertical and horizontal allocation is allowed. Vertical allocation consumes all the resources of a given host before allocating any guests on a second host. This reduces power consumption in the cloud. Horizontal allocation places a guest on each host in a round-robin fashion. This may yield better performance to the guests in some cases. &PRODUCT; also allows an element of CPU over-provisioning as configured by the administrator. Over-provisioning allows the administrator to commit more CPU cycles to the allocated guests than are actually available from the hardware. &PRODUCT; also provides a pluggable interface for adding new allocators. These custom allocators can provide any policy the administrator desires. +
diff --git a/docs/en-US/hypervisor-host-install-firewall.xml b/docs/en-US/hypervisor-host-install-firewall.xml index ae82fc47a..c66587318 100644 --- a/docs/en-US/hypervisor-host-install-firewall.xml +++ b/docs/en-US/hypervisor-host-install-firewall.xml @@ -34,7 +34,7 @@ 49152 - 49216 (libvirt live migration) It depends on the firewall you are using how to open these ports. Below you'll find examples how to open these ports in RHEL/CentOS and Ubuntu. -
+
Open ports in RHEL/CentOS RHEL and CentOS use iptables for firewalling the system, you can open extra ports by executing the following iptable commands: $ iptables -I INPUT -p tcp -m tcp --dport 22 -j ACCEPT @@ -45,7 +45,7 @@ These iptable settings are not persistent accross reboots, we have to save them first. $ iptables-save > /etc/sysconfig/iptables
-
+
Open ports in Ubuntu The default firewall under Ubuntu is UFW (Uncomplicated FireWall), which is a Python wrapper around iptables. To open the required ports, execute the following commands: diff --git a/docs/en-US/hypervisor-host-install-libvirt.xml b/docs/en-US/hypervisor-host-install-libvirt.xml index 8ba2fe99a..f3ff09046 100644 --- a/docs/en-US/hypervisor-host-install-libvirt.xml +++ b/docs/en-US/hypervisor-host-install-libvirt.xml @@ -28,10 +28,10 @@ In order to have live migration working libvirt has to listen for unsecured TCP connections. We also need to turn off libvirts attempt to use Multicast DNS advertising. Both of these settings are in /etc/libvirt/libvirtd.conf - Set the following paramaters: + Set the following parameters: listen_tls = 0 listen_tcp = 1 - tcp_port = "16059" + tcp_port = "16509" auth_tcp = "none" mdns_adv = 0 @@ -40,11 +40,11 @@ On RHEL or CentOS modify /etc/sysconfig/libvirtd: Uncomment the following line: #LIBVIRTD_ARGS="--listen" - On Ubuntu: modify /etc/init/libvirt-bin.conf - Change the following line (at the end of the file): - exec /usr/sbin/libvirtd -d - to (just add -l) - exec /usr/sbin/libvirtd -d -l + On Ubuntu: modify /etc/default/libvirt-bin + Add "-l" to the following line:: + libvirtd_opts="-d" + so it looks like: + libvirtd_opts="-d -l" Restart libvirt diff --git a/docs/en-US/hypervisor-host-install-network-openvswitch.xml b/docs/en-US/hypervisor-host-install-network-openvswitch.xml index e9bf47a0d..a16dc8e0e 100644 --- a/docs/en-US/hypervisor-host-install-network-openvswitch.xml +++ b/docs/en-US/hypervisor-host-install-network-openvswitch.xml @@ -69,7 +69,7 @@ we can proceed to configuring the network. First we configure eth0 vi /etc/sysconfig/network-scripts/ifcfg-eth0 - Make sure it looks similair to: + Make sure it looks similar to: In order to forward traffic to your instances you will need at least two bridges: public and private. By default these bridges are called cloudbr0 and cloudbr1, but you do have to make sure they are available on each hypervisor. The most important factor is that you keep the configuration consistent on all your hypervisors. -
+
Network example There are many ways to configure your network. In the Basic networking mode you should have two (V)LAN's, one for your private network and one for the public network. We assume that the hypervisor has one NIC (eth0) with three tagged VLAN's: @@ -41,16 +41,16 @@ On VLAN 100 we give the Hypervisor the IP-Address 192.168.42.11/24 with the gateway 192.168.42.1 The Hypervisor and Management server don't have to be in the same subnet!
-
+
Configuring the network bridges It depends on the distribution you are using how to configure these, below you'll find examples for RHEL/CentOS and Ubuntu. The goal is to have two bridges called 'cloudbr0' and 'cloudbr1' after this section. This should be used as a guideline only. The exact configuration will depend on your network layout. -
+
Configure in RHEL or CentOS The required packages were installed when libvirt was installed, we can proceed to configuring the network. First we configure eth0 vi /etc/sysconfig/network-scripts/ifcfg-eth0 - Make sure it looks similair to: + Make sure it looks similar to: Now we have the VLAN interfaces configured we can add the bridges on top of them. vi /etc/sysconfig/network-scripts/ifcfg-cloudbr0 - Now we just configure it is a plain bridge without an IP-Adress + Now we just configure it is a plain bridge without an IP-Address With this configuration you should be able to restart the network, although a reboot is recommended to see if everything works properly. Make sure you have an alternative way like IPMI or ILO to reach the machine in case you made a configuration error and the network stops functioning!
-
+
Configure in Ubuntu All the required packages were installed when you installed libvirt, so we only have to configure the network. vi /etc/network/interfaces diff --git a/docs/en-US/hypervisor-installation.xml b/docs/en-US/hypervisor-installation.xml index b0fc9f46d..5ee7dea69 100644 --- a/docs/en-US/hypervisor-installation.xml +++ b/docs/en-US/hypervisor-installation.xml @@ -28,4 +28,5 @@ + diff --git a/docs/en-US/hypervisor-kvm-install-flow.xml b/docs/en-US/hypervisor-kvm-install-flow.xml index 6cc73e4fd..7dfd47d2e 100644 --- a/docs/en-US/hypervisor-kvm-install-flow.xml +++ b/docs/en-US/hypervisor-kvm-install-flow.xml @@ -34,4 +34,5 @@ +
diff --git a/docs/en-US/hypervisor-support-for-primarystorage.xml b/docs/en-US/hypervisor-support-for-primarystorage.xml index 055c18261..7c2596eac 100644 --- a/docs/en-US/hypervisor-support-for-primarystorage.xml +++ b/docs/en-US/hypervisor-support-for-primarystorage.xml @@ -5,91 +5,88 @@ ]> -
- Hypervisor Support for Primary Storage - The following table shows storage options and parameters for different hypervisors. - - - - - - - - - - - - - VMware vSphere - Citrix XenServer - KVM - - - - - Format for Disks, Templates, and - Snapshots - VMDK - VHD - QCOW2 - - - iSCSI support - VMFS - Clustered LVM - Yes, via Shared Mountpoint - - - Fiber Channel support - VMFS - Yes, via Existing SR - Yes, via Shared Mountpoint - - - NFS support - Y - Y - Y - - - - Local storage support - Y - Y - Y - - - - Storage over-provisioning - NFS and iSCSI - NFS - NFS - - - - - - XenServer uses a clustered LVM system to store VM images on iSCSI and Fiber Channel volumes and does not support over-provisioning in the hypervisor. The storage server itself, however, can support thin-provisioning. As a result the &PRODUCT; can still support storage over-provisioning by running on thin-provisioned storage volumes. - KVM supports "Shared Mountpoint" storage. A shared mountpoint is a file system path local to each server in a given cluster. The path must be the same across all Hosts in the cluster, for example /mnt/primary1. This shared mountpoint is assumed to be a clustered filesystem such as OCFS2. In this case the &PRODUCT; does not attempt to mount or unmount the storage as is done with NFS. The &PRODUCT; requires that the administrator insure that the storage is available + Hypervisor Support for Primary Storage + The following table shows storage options and parameters for different hypervisors. + + + + + + + + + + + VMware vSphere + Citrix XenServer + KVM + + + + + Format for Disks, Templates, and + Snapshots + VMDK + VHD + QCOW2 + + + iSCSI support + VMFS + Clustered LVM + Yes, via Shared Mountpoint + + + Fiber Channel support + VMFS + Yes, via Existing SR + Yes, via Shared Mountpoint + + + NFS support + Y + Y + Y + + + + Local storage support + Y + Y + Y + + + + Storage over-provisioning + NFS and iSCSI + NFS + NFS + + + + + + XenServer uses a clustered LVM system to store VM images on iSCSI and Fiber Channel volumes and does not support over-provisioning in the hypervisor. The storage server itself, however, can support thin-provisioning. As a result the &PRODUCT; can still support storage over-provisioning by running on thin-provisioned storage volumes. + KVM supports "Shared Mountpoint" storage. A shared mountpoint is a file system path local to each server in a given cluster. The path must be the same across all Hosts in the cluster, for example /mnt/primary1. This shared mountpoint is assumed to be a clustered filesystem such as OCFS2. In this case the &PRODUCT; does not attempt to mount or unmount the storage as is done with NFS. The &PRODUCT; requires that the administrator insure that the storage is available - With NFS storage, &PRODUCT; manages the overprovisioning. In this case the global configuration parameter storage.overprovisioning.factor controls the degree of overprovisioning. This is independent of hypervisor type. + With NFS storage, &PRODUCT; manages the overprovisioning. In this case the global configuration parameter storage.overprovisioning.factor controls the degree of overprovisioning. This is independent of hypervisor type. Local storage is an option for primary storage for vSphere, XenServer, and KVM. When the local disk option is enabled, a local disk storage pool is automatically created on each host. To use local storage for the System Virtual Machines (such as the Virtual Router), set system.vm.use.local.storage to true in global configuration. - &PRODUCT; supports multiple primary storage pools in a Cluster. For example, you could provision 2 NFS servers in primary storage. Or you could provision 1 iSCSI LUN initially and then add a second iSCSI LUN when the first approaches capacity. -
+ &PRODUCT; supports multiple primary storage pools in a Cluster. For example, you could provision 2 NFS servers in primary storage. Or you could provision 1 iSCSI LUN initially and then add a second iSCSI LUN when the first approaches capacity. +
diff --git a/docs/en-US/images/VMSnapshotButton.png b/docs/en-US/images/VMSnapshotButton.png new file mode 100644 index 000000000..521774021 Binary files /dev/null and b/docs/en-US/images/VMSnapshotButton.png differ diff --git a/docs/en-US/images/add-cluster.png b/docs/en-US/images/add-cluster.png index 383f375eb..4b24ec721 100644 Binary files a/docs/en-US/images/add-cluster.png and b/docs/en-US/images/add-cluster.png differ diff --git a/docs/en-US/images/cluster-overview.png b/docs/en-US/images/cluster-overview.png index 33f1a0477..18a86c39a 100644 Binary files a/docs/en-US/images/cluster-overview.png and b/docs/en-US/images/cluster-overview.png differ diff --git a/docs/en-US/images/dvswitch-config.png b/docs/en-US/images/dvswitch-config.png new file mode 100644 index 000000000..edce6e8b9 Binary files /dev/null and b/docs/en-US/images/dvswitch-config.png differ diff --git a/docs/en-US/images/dvswitchconfig.png b/docs/en-US/images/dvswitchconfig.png new file mode 100644 index 000000000..55b1ef7da Binary files /dev/null and b/docs/en-US/images/dvswitchconfig.png differ diff --git a/docs/en-US/images/egress-firewall-rule.png b/docs/en-US/images/egress-firewall-rule.png new file mode 100644 index 000000000..fa1d8ecd0 Binary files /dev/null and b/docs/en-US/images/egress-firewall-rule.png differ diff --git a/docs/en-US/images/region-overview.png b/docs/en-US/images/region-overview.png new file mode 100644 index 000000000..528445c9d Binary files /dev/null and b/docs/en-US/images/region-overview.png differ diff --git a/docs/en-US/images/resize-volume-icon.png b/docs/en-US/images/resize-volume-icon.png new file mode 100644 index 000000000..48499021f Binary files /dev/null and b/docs/en-US/images/resize-volume-icon.png differ diff --git a/docs/en-US/images/resize-volume.png b/docs/en-US/images/resize-volume.png new file mode 100644 index 000000000..6195623ab Binary files /dev/null and b/docs/en-US/images/resize-volume.png differ diff --git a/docs/en-US/images/revert-vm.png b/docs/en-US/images/revert-vm.png new file mode 100644 index 000000000..04655dc37 Binary files /dev/null and b/docs/en-US/images/revert-vm.png differ diff --git a/docs/en-US/import-ami.xml b/docs/en-US/import-ami.xml index 2f093b178..16fe78a15 100644 --- a/docs/en-US/import-ami.xml +++ b/docs/en-US/import-ami.xml @@ -5,49 +5,51 @@ ]> -
- Importing Amazon Machine Images - The following procedures describe how to import an Amazon Machine Image (AMI) into &PRODUCT; when using the XenServer hypervisor. - Assume you have an AMI file and this file is called CentOS_6.2_x64. Assume further that you are working on a CentOS host. If the AMI is a Fedora image, you need to be working on a Fedora host initially. - You need to have a XenServer host with a file-based storage repository (either a local ext3 SR or an NFS SR) to convert to a VHD once the image file has been customized on the Centos/Fedora host. - When copying and pasting a command, be sure the command has pasted as a single line before executing. Some document viewers may introduce unwanted line breaks in copied text. - - Set up loopback on image file:# mkdir -p /mnt/loop/centos62 + Importing Amazon Machine Images + The following procedures describe how to import an Amazon Machine Image (AMI) into &PRODUCT; when using the XenServer hypervisor. + Assume you have an AMI file and this file is called CentOS_6.2_x64. Assume further that you are working on a CentOS host. If the AMI is a Fedora image, you need to be working on a Fedora host initially. + You need to have a XenServer host with a file-based storage repository (either a local ext3 SR or an NFS SR) to convert to a VHD once the image file has been customized on the Centos/Fedora host. + When copying and pasting a command, be sure the command has pasted as a single line before executing. Some document viewers may introduce unwanted line breaks in copied text. + + + To import an AMI: + + Set up loopback on image file:# mkdir -p /mnt/loop/centos62 # mount -o loop CentOS_6.2_x64 /mnt/loop/centos54 - Install the kernel-xen package into the image. This downloads the PV kernel and ramdisk to the image.# yum -c /mnt/loop/centos54/etc/yum.conf --installroot=/mnt/loop/centos62/ -y install kernel-xen - Create a grub entry in /boot/grub/grub.conf.# mkdir -p /mnt/loop/centos62/boot/grub + Install the kernel-xen package into the image. This downloads the PV kernel and ramdisk to the image.# yum -c /mnt/loop/centos54/etc/yum.conf --installroot=/mnt/loop/centos62/ -y install kernel-xen + Create a grub entry in /boot/grub/grub.conf.# mkdir -p /mnt/loop/centos62/boot/grub # touch /mnt/loop/centos62/boot/grub/grub.conf -# echo "" > /mnt/loop/centos62/boot/grub/grub.conf +# echo "" > /mnt/loop/centos62/boot/grub/grub.conf - Determine the name of the PV kernel that has been installed into the image. - # cd /mnt/loop/centos62 + Determine the name of the PV kernel that has been installed into the image. + # cd /mnt/loop/centos62 # ls lib/modules/ 2.6.16.33-xenU 2.6.16-xenU 2.6.18-164.15.1.el5xen 2.6.18-164.6.1.el5.centos.plus 2.6.18-xenU-ec2-v1.0 2.6.21.7-2.fc8xen 2.6.31-302-ec2 # ls boot/initrd* boot/initrd-2.6.18-164.6.1.el5.centos.plus.img boot/initrd-2.6.18-164.15.1.el5xen.img # ls boot/vmlinuz* boot/vmlinuz-2.6.18-164.15.1.el5xen boot/vmlinuz-2.6.18-164.6.1.el5.centos.plus boot/vmlinuz-2.6.18-xenU-ec2-v1.0 boot/vmlinuz-2.6.21-2952.fc8xen - - Xen kernels/ramdisk always end with "xen". For the kernel version you choose, there has to be an entry for that version under lib/modules, there has to be an initrd and vmlinuz corresponding to that. Above, the only kernel that satisfies this condition is 2.6.18-164.15.1.el5xen. - Based on your findings, create an entry in the grub.conf file. Below is an example entry.default=0 + + Xen kernels/ramdisk always end with "xen". For the kernel version you choose, there has to be an entry for that version under lib/modules, there has to be an initrd and vmlinuz corresponding to that. Above, the only kernel that satisfies this condition is 2.6.18-164.15.1.el5xen. + Based on your findings, create an entry in the grub.conf file. Below is an example entry.default=0 timeout=5 hiddenmenu title CentOS (2.6.18-164.15.1.el5xen) @@ -55,58 +57,58 @@ title CentOS (2.6.18-164.15.1.el5xen) kernel /boot/vmlinuz-2.6.18-164.15.1.el5xen ro root=/dev/xvda initrd /boot/initrd-2.6.18-164.15.1.el5xen.img - Edit etc/fstab, changing “sda1†to “xvda†and changing “sdb†to “xvdbâ€. - # cat etc/fstab + Edit etc/fstab, changing “sda1†to “xvda†and changing “sdb†to “xvdbâ€. + # cat etc/fstab /dev/xvda / ext3 defaults 1 1 /dev/xvdb /mnt ext3 defaults 0 0 none /dev/pts devpts gid=5,mode=620 0 0 none /proc proc defaults 0 0 none /sys sysfs defaults 0 0 - Enable login via the console. The default console device in a XenServer system is xvc0. Ensure that etc/inittab and etc/securetty have the following lines respectively: - # grep xvc0 etc/inittab + Enable login via the console. The default console device in a XenServer system is xvc0. Ensure that etc/inittab and etc/securetty have the following lines respectively: + # grep xvc0 etc/inittab co:2345:respawn:/sbin/agetty xvc0 9600 vt100-nav # grep xvc0 etc/securetty xvc0 - Ensure the ramdisk supports PV disk and PV network. Customize this for the kernel version you have determined above. - # chroot /mnt/loop/centos54 + Ensure the ramdisk supports PV disk and PV network. Customize this for the kernel version you have determined above. + # chroot /mnt/loop/centos54 # cd /boot/ # mv initrd-2.6.18-164.15.1.el5xen.img initrd-2.6.18-164.15.1.el5xen.img.bak # mkinitrd -f /boot/initrd-2.6.18-164.15.1.el5xen.img --with=xennet --preload=xenblk --omit-scsi-modules 2.6.18-164.15.1.el5xen - Change the password. - # passwd + Change the password. + # passwd Changing password for user root. New UNIX password: Retype new UNIX password: passwd: all authentication tokens updated successfully. - Exit out of chroot.# exit - Check etc/ssh/sshd_config for lines allowing ssh login using a password. - # egrep "PermitRootLogin|PasswordAuthentication" /mnt/loop/centos54/etc/ssh/sshd_config + Exit out of chroot.# exit + Check etc/ssh/sshd_config for lines allowing ssh login using a password. + # egrep "PermitRootLogin|PasswordAuthentication" /mnt/loop/centos54/etc/ssh/sshd_config PermitRootLogin yes PasswordAuthentication yes - If you need the template to be enabled to reset passwords from the &PRODUCT; UI or API, + If you need the template to be enabled to reset passwords from the &PRODUCT; UI or API, install the password change script into the image at this point. See - . - Unmount and delete loopback mount.# umount /mnt/loop/centos54 + . + Unmount and delete loopback mount.# umount /mnt/loop/centos54 # losetup -d /dev/loop0 - Copy the image file to your XenServer host's file-based storage repository. In the example below, the Xenserver is "xenhost". This XenServer has an NFS repository whose uuid is a9c5b8c8-536b-a193-a6dc-51af3e5ff799. - # scp CentOS_6.2_x64 xenhost:/var/run/sr-mount/a9c5b8c8-536b-a193-a6dc-51af3e5ff799/ - Log in to the Xenserver and create a VDI the same size as the image. - [root@xenhost ~]# cd /var/run/sr-mount/a9c5b8c8-536b-a193-a6dc-51af3e5ff799 + Copy the image file to your XenServer host's file-based storage repository. In the example below, the Xenserver is "xenhost". This XenServer has an NFS repository whose uuid is a9c5b8c8-536b-a193-a6dc-51af3e5ff799. + # scp CentOS_6.2_x64 xenhost:/var/run/sr-mount/a9c5b8c8-536b-a193-a6dc-51af3e5ff799/ + Log in to the Xenserver and create a VDI the same size as the image. + [root@xenhost ~]# cd /var/run/sr-mount/a9c5b8c8-536b-a193-a6dc-51af3e5ff799 [root@xenhost a9c5b8c8-536b-a193-a6dc-51af3e5ff799]# ls -lh CentOS_6.2_x64 -rw-r--r-- 1 root root 10G Mar 16 16:49 CentOS_6.2_x64 [root@xenhost a9c5b8c8-536b-a193-a6dc-51af3e5ff799]# xe vdi-create virtual-size=10GiB sr-uuid=a9c5b8c8-536b-a193-a6dc-51af3e5ff799 type=user name-label="Centos 6.2 x86_64" cad7317c-258b-4ef7-b207-cdf0283a7923 - Import the image file into the VDI. This may take 10–20 minutes.[root@xenhost a9c5b8c8-536b-a193-a6dc-51af3e5ff799]# xe vdi-import filename=CentOS_6.2_x64 uuid=cad7317c-258b-4ef7-b207-cdf0283a7923 - Locate a the VHD file. This is the file with the VDI’s UUID as its name. Compress it and upload it to your web server. - [root@xenhost a9c5b8c8-536b-a193-a6dc-51af3e5ff799]# bzip2 -c cad7317c-258b-4ef7-b207-cdf0283a7923.vhd > CentOS_6.2_x64.vhd.bz2 + Import the image file into the VDI. This may take 10–20 minutes.[root@xenhost a9c5b8c8-536b-a193-a6dc-51af3e5ff799]# xe vdi-import filename=CentOS_6.2_x64 uuid=cad7317c-258b-4ef7-b207-cdf0283a7923 + Locate a the VHD file. This is the file with the VDI’s UUID as its name. Compress it and upload it to your web server. + [root@xenhost a9c5b8c8-536b-a193-a6dc-51af3e5ff799]# bzip2 -c cad7317c-258b-4ef7-b207-cdf0283a7923.vhd > CentOS_6.2_x64.vhd.bz2 [root@xenhost a9c5b8c8-536b-a193-a6dc-51af3e5ff799]# scp CentOS_6.2_x64.vhd.bz2 webserver:/var/www/html/templates/ - +
diff --git a/docs/en-US/initialize-and-test.xml b/docs/en-US/initialize-and-test.xml index cf0c04ece..2dd6e2591 100644 --- a/docs/en-US/initialize-and-test.xml +++ b/docs/en-US/initialize-and-test.xml @@ -1,53 +1,77 @@ - %BOOK_ENTITIES; ]> -
- Initialize and Test + Initialize and Test After everything is configured, &PRODUCT; will perform its initialization. This can take 30 minutes or more, depending on the speed of your network. When the initialization has completed successfully, the administrator's Dashboard should be displayed in the &PRODUCT; UI. + - Verify that the system is ready. In the left navigation bar, select Templates. Click on the CentOS 5.5 (64bit) no Gui (KVM) template. Check to be sure that the status is "Download Complete." Do not proceed to the next step until this status is displayed. - Go to the Instances tab, and filter by My Instances. - Click Add Instance and follow the steps in the wizard. - - Choose the zone you just added. - In the template selection, choose the template to use in the VM. If this is a fresh installation, likely only the provided CentOS template is available. - Select a service offering. Be sure that the hardware you have allows starting the selected service offering. - In data disk offering, if desired, add another data disk. This is a second volume that will be available to but not mounted in the guest. For example, in Linux on XenServer you will see /dev/xvdb in the guest after rebooting the VM. A reboot is not required if you have a PV-enabled OS kernel in use. - In default network, choose the primary network for the guest. In a trial installation, you would have only one option here. - Optionally give your VM a name and a group. Use any descriptive text you would like. - Click Launch VM. Your VM will be created and started. It might take some time to download the template and complete the VM startup. You can watch the VM’s progress in the Instances screen. - - - - To use the VM, click the View Console button. - - - ConsoleButton.png: button to launch a console - - - + + Verify that the system is ready. In the left navigation bar, select Templates. Click on the CentOS 5.5 (64bit) no Gui (KVM) template. Check to be sure that the status is "Download Complete." Do not proceed to the next step until this status is displayed. + + Go to the Instances tab, and filter by My Instances. + + Click Add Instance and follow the steps in the wizard. + + + + Choose the zone you just added. + + In the template selection, choose the template to use in the VM. If this is a fresh installation, likely only the provided CentOS template is available. + + Select a service offering. Be sure that the hardware you have allows starting the selected service offering. + + In data disk offering, if desired, add another data disk. This is a second volume that will be available to but not mounted in the guest. For example, in Linux on XenServer you will see /dev/xvdb in the guest after rebooting the VM. A reboot is not required if you have a PV-enabled OS kernel in use. + + In default network, choose the primary network for the guest. In a trial installation, you would have only one option here. + Optionally give your VM a name and a group. Use any descriptive text you would like. + + Click Launch VM. Your VM will be created and started. It might take some time to download the template and complete the VM startup. You can watch the VM’s progress in the Instances screen. + + + + + + + + To use the VM, click the View Console button. + + + + + + ConsoleButton.png: button to launch a console + + + + + + For more information about using VMs, including instructions for how to allow incoming network traffic to the VM, start, stop, and delete VMs, and move a VM from one host to another, see Working With Virtual Machines in the Administrator’s Guide. + + + Congratulations! You have successfully completed a &PRODUCT; Installation. + If you decide to grow your deployment, you can add more hosts, primary storage, zones, pods, and clusters.
diff --git a/docs/en-US/installing-publican.xml b/docs/en-US/installing-publican.xml new file mode 100644 index 000000000..9f180aad3 --- /dev/null +++ b/docs/en-US/installing-publican.xml @@ -0,0 +1,46 @@ + + +%BOOK_ENTITIES; +]> + + + +
+ Installing Publican + &PRODUCT; documentation is built using publican. This section describes how to install publican on your own machine so that you can build the documentation guides. + + The &PRODUCT; documentation source code is located under /docs + Publican documentation itself is also very useful. + + On RHEL and RHEL derivatives, install publican with the following command: + yum install publican publican-doc + On Ubuntu, install publican with the following command: + apt-get install publican publican-doc + For other distribution refer to the publican documentation listed above. For latest versions of OSX you may have to install from source and tweak it to your own setup. + Once publican is installed, you need to setup the so-called &PRODUCT; brand defined in the docs/publican-&PRODUCT; directory. + To do so, enter the following commands: + + sudo cp -R publican-cloudstack /usr/share/publican/Common_Content/cloudstack + + If this fails or you later face errors related to the brand files, see the publican documentation. + With publican installed and the &PRODUCT; brand files in place, you should be able to build any documentation guide. + + +
diff --git a/docs/en-US/ip-forwarding-firewalling.xml b/docs/en-US/ip-forwarding-firewalling.xml index 61aa6ad7e..d7a245714 100644 --- a/docs/en-US/ip-forwarding-firewalling.xml +++ b/docs/en-US/ip-forwarding-firewalling.xml @@ -3,28 +3,32 @@ %BOOK_ENTITIES; ]> - -
- IP Forwarding and Firewalling - By default, all incoming traffic to the public IP address is rejected. All outgoing traffic from the guests is translated via NAT to the public IP address and is allowed. - To allow incoming traffic, users may set up firewall rules and/or port forwarding rules. For example, you can use a firewall rule to open a range of ports on the public IP address, such as 33 through 44. Then use port forwarding rules to direct traffic from individual ports within that range to specific ports on user VMs. For example, one port forwarding rule could route incoming traffic on the public IP's port 33 to port 100 on one user VM's private IP. - For the steps to implement these rules, see Firewall Rules and Port Forwarding. + IP Forwarding and Firewalling + By default, all incoming traffic to the public IP address is rejected. + All outgoing traffic from the guests is also blocked by default. + To allow outgoing traffic, follow the procedure in . + To allow incoming traffic, users may set up firewall rules and/or port forwarding rules. For + example, you can use a firewall rule to open a range of ports on the public IP address, such as + 33 through 44. Then use port forwarding rules to direct traffic from individual ports within + that range to specific ports on user VMs. For example, one port forwarding rule could route + incoming traffic on the public IP's port 33 to port 100 on one user VM's private IP. + + +
diff --git a/docs/en-US/ipv6-support.xml b/docs/en-US/ipv6-support.xml new file mode 100644 index 000000000..c7f774439 --- /dev/null +++ b/docs/en-US/ipv6-support.xml @@ -0,0 +1,191 @@ + + +%BOOK_ENTITIES; +]> + + +
+ IPv6 Support in &PRODUCT; + &PRODUCT;supports Internet Protocol version 6 (IPv6), the recent version of the Internet + Protocol (IP) that defines routing the network traffic. IPv6 uses a 128-bit address that + exponentially expands the current address space that is available to the users. IPv6 addresses + consist of eight groups of four hexadecimal digits separated by colons, for example, + 5001:0dt8:83a3:1012:1000:8s2e:0870:7454. &PRODUCT; supports IPv6 for public IPs in shared + networks. With IPv6 support, VMs in shared networks can obtain both IPv4 and IPv6 addresses from + the DHCP server. You can deploy VMs either in a IPv6 or IPv4 network, or in a dual network + environment. If IPv6 network is used, the VM generates a link-local IPv6 address by itself, and + receives a stateful IPv6 address from the DHCPv6 server. + IPv6 is supported only on KVM and XenServer hypervisors. The IPv6 support is only an + experimental feature. + Here's the sequence of events when IPv6 is used: + + + The administrator creates an IPv6 shared network in an advanced zone. + + + The user deploys a VM in an IPv6 shared network. + + + The user VM generates an IPv6 link local address by itself, and gets an IPv6 global or + site local address through DHCPv6. + For information on API changes, see . + + +
+ Prerequisites and Guidelines + Consider the following: + + + CIDR size must be 64 for IPv6 networks. + + + The DHCP client of the guest VMs should support generating DUID based on Link-layer + Address (DUID- LL). DUID-LL derives from the MAC address of guest VMs, and therefore the + user VM can be identified by using DUID. See Dynamic Host Configuration Protocol for IPv6 + for more information. + + + The gateway of the guest network generates Router Advisement and Response messages to + Router Solicitation. The M (Managed Address Configuration) flag of Router Advisement + should enable stateful IP address configuration. Set the M flag to where the end nodes + receive their IPv6 addresses from the DHCPv6 server as opposed to the router or + switch. + + The M flag is the 1-bit Managed Address Configuration flag for Router Advisement. + When set, Dynamic Host Configuration Protocol (DHCPv6) is available for address + configuration in addition to any IPs set by using stateless address + auto-configuration. + + + + Use the System VM template exclusively designed to support IPv6. Download the System + VM template from http://cloudstack.apt-get.eu/systemvm/. + + + The concept of Default Network applies to IPv6 networks. However, unlike IPv4 + &PRODUCT; does not control the routing information of IPv6 in shared network; the choice + of Default Network will not affect the routing in the user VM. + + + In a multiple shared network, the default route is set by the rack router, rather than + the DHCP server, which is out of &PRODUCT; control. Therefore, in order for the user VM to + get only the default route from the default NIC, modify the configuration of the user VM, + and set non-default NIC's accept_ra to 0 explicitly. The + accept_ra parameter accepts Router Advertisements and auto-configure + /proc/sys/net/ipv6/conf/interface with received data. + + +
+
+ Limitations of IPv6 in &PRODUCT; + The following are not yet supported: + + + Security groups + + + Userdata and metadata + + + Passwords + + +
+
+ Guest VM Configuration for DHCPv6 + For the guest VMs to get IPv6 address, run dhclient command manually on each of the VMs. + Use DUID-LL to set up dhclient. + The IPv6 address is lost when a VM is stopped and started. Therefore, use the same procedure + to get an IPv6 address when a VM is stopped and started. + + + Set up dhclient by using DUID-LL. + Perform the following for DHCP Client 4.2 and above: + + + Run the following command on the selected VM to get the dhcpv6 offer from + VR: + dhclient -6 -D LL <dev> + + + Perform the following for DHCP Client 4.1: + + + Open the following to the dhclient configuration file: + vi /etc/dhcp/dhclient.conf + + + Add the following to the dhclient configuration file: + send dhcp6.client-id = concat(00:03:00, hardware); + + + + + Get IPv6 address from DHCP server as part of the system or network restart. + Based on the operating systems, perform the following: + On CentOS 6.2: + + + Open the Ethernet interface configuration file: + vi /etc/sysconfig/network-scripts/ifcfg-eth0 + The ifcfg-eth0 file controls the first NIC in a system. + + + Make the necessary configuration changes, as given below: + DEVICE=eth0 +HWADDR=06:A0:F0:00:00:38 +NM_CONTROLLED=no +ONBOOT=yes +BOOTPROTO=dhcp6 +TYPE=Ethernet +USERCTL=no +PEERDNS=yes +IPV6INIT=yes +DHCPV6C=yes + + + Open the following: + vi /etc/sysconfig/network + + + Make the necessary configuration changes, as given below: + NETWORKING=yes +HOSTNAME=centos62mgmt.lab.vmops.com +NETWORKING_IPV6=yes +IPV6_AUTOCONF=no + + + On Ubuntu 12.10 + + + Open the following: + etc/network/interfaces: + + + Make the necessary configuration changes, as given below: + iface eth0 inet6 dhcp +autoconf 0 +accept_ra 1 + + + + +
+
diff --git a/docs/en-US/isolated-networks.xml b/docs/en-US/isolated-networks.xml index 13f8aa1d4..671591d16 100644 --- a/docs/en-US/isolated-networks.xml +++ b/docs/en-US/isolated-networks.xml @@ -5,23 +5,22 @@ ]> -
Isolated Networks An isolated network can be accessed only by virtual machines of a single account. Isolated networks have the following properties. @@ -30,4 +29,6 @@ There is one network offering for the entire network The network offering can be upgraded or downgraded but it is for the entire network + +
diff --git a/docs/en-US/linux-installation.xml b/docs/en-US/linux-installation.xml index 60d389c0e..b560ee0d5 100644 --- a/docs/en-US/linux-installation.xml +++ b/docs/en-US/linux-installation.xml @@ -5,43 +5,49 @@ ]> -
- Linux OS Installation - Use the following steps to begin the Linux OS installation: - - Download the script file cloud-set-guest-password: - - Linux: - Windows: - - - Copy this file to /etc/init.d. - On some Linux distributions, copy the file to /etc/rc.d/init.d. - - Run the following command to make the script executable:chmod +x /etc/init.d/cloud-set-guest-password - - Depending on the Linux distribution, continue with the appropriate step.On Fedora, CentOS/RHEL, and Debian, run:chkconfig --add cloud-set-guest-password - On Ubuntu with VMware tools, link the script file to the /etc/network/if-up and /etc/network/if-down folders, and run the script: - #ln -s /etc/init.d/cloud-set-guest-password /etc/network/if-up/cloud-set-guest-password - #ln -s /etc/init.d/cloud-set-guest-password /etc/network/if-down/cloud-set-guest-password - If you are using Ubuntu 11.04, start by creating a directory called /var/lib/dhcp3 on your Ubuntu machine (works around a known issue with this version of Ubuntu). On all Ubuntu versions: Run “sudo update-rc.d cloud-set-guest-password defaults 98â€. To test, run "mkpasswd" and check that it is generating a new password. If the “mkpasswd†command does not exist, run "sudo apt-get install whois" (or sudo apt-get install mkpasswd, depending on your Ubuntu version) and repeat. - - -
+ Linux OS Installation + Use the following steps to begin the Linux OS installation: + + Download the script file cloud-set-guest-password: + + Linux: + + Windows: + + + + Copy this file to /etc/init.d.On some Linux distributions, copy the file to /etc/rc.d/init.d. + + Run the following command to make the script executable:chmod +x /etc/init.d/cloud-set-guest-password + + Depending on the Linux distribution, continue with the appropriate step.On Fedora, CentOS/RHEL, and Debian, run:chkconfig --add cloud-set-guest-password + On Ubuntu with VMware tools, link the script file to the /etc/network/if-up and + /etc/network/if-down folders, and run the script: + #ln -s /etc/init.d/cloud-set-guest-password /etc/network/if-up/cloud-set-guest-password +#ln -s /etc/init.d/cloud-set-guest-password /etc/network/if-down/cloud-set-guest-password + If you are using Ubuntu 11.04, start by creating a directory called /var/lib/dhcp3 on your Ubuntu machine (works around a known issue with this version of Ubuntu). On all Ubuntu versions: Run “sudo update-rc.d cloud-set-guest-password defaults 98â€. To test, run "mkpasswd" and check that it is generating a new password. If the “mkpasswd†command does not exist, run "sudo apt-get install whois" (or sudo apt-get install mkpasswd, depending on your Ubuntu version) and repeat. + + + +
diff --git a/docs/en-US/load-balancer-rules.xml b/docs/en-US/load-balancer-rules.xml index 8dd7d3b47..777390019 100644 --- a/docs/en-US/load-balancer-rules.xml +++ b/docs/en-US/load-balancer-rules.xml @@ -5,25 +5,36 @@ ]> -
- Load Balancer Rules - A &PRODUCT; user or administrator may create load balancing rules that balance traffic received at a public IP to one or more VMs. A user creates a rule, specifies an algorithm, and assigns the rule to a set of VMs. - If you create load balancing rules while using a network service offering that includes an external load balancer device such as NetScaler, and later change the network service offering to one that uses the &PRODUCT; virtual router, you must create a firewall rule on the virtual router for each of your existing load balancing rules so that they continue to function. + Load Balancer Rules + A &PRODUCT; user or administrator may create load balancing rules that balance traffic + received at a public IP to one or more VMs. A user creates a rule, specifies an algorithm, and + assigns the rule to a set of VMs. + + If you create load balancing rules while using a network service offering that includes an + external load balancer device such as NetScaler, and later change the network service offering + to one that uses the &PRODUCT; virtual router, you must create a firewall rule on the virtual + router for each of your existing load balancing rules so that they continue to + function. + + + +
diff --git a/docs/en-US/log-in-root-admin.xml b/docs/en-US/log-in-root-admin.xml index b8535970e..0243bd645 100644 --- a/docs/en-US/log-in-root-admin.xml +++ b/docs/en-US/log-in-root-admin.xml @@ -5,23 +5,22 @@ ]> -
Logging In as the Root Administrator After the Management Server software is installed and running, you can run the &PRODUCT; user interface. This UI is there to help you provision, view, and manage your cloud infrastructure. @@ -43,4 +42,5 @@ You should set a new root administrator password. If you chose basic setup, you’ll be prompted to create a new password right away. If you chose experienced user, use the steps in . You are logging in as the root administrator. This account manages the &PRODUCT; deployment, including physical infrastructure. The root administrator can modify configuration settings to change basic functionality, create or delete user accounts, and take many actions that should be performed only by an authorized person. Please change the default password to a new, unique password. +
diff --git a/docs/en-US/lxc-install.xml b/docs/en-US/lxc-install.xml new file mode 100644 index 000000000..a80c18afd --- /dev/null +++ b/docs/en-US/lxc-install.xml @@ -0,0 +1,110 @@ + + + %BOOK_ENTITIES; + ]> + + + +
+ LXC Installation and Configuration +
+ System Requirements for LXC Hosts + LXC requires the Linux kernel cgroups functionality which is available starting 2.6.24. Although you are not required to run these distributions, the following are recommended: + + CentOS / RHEL: 6.3 + Ubuntu: 12.04(.1) + + The main requirement for LXC hypervisors is the libvirt and Qemu version. No matter what + Linux distribution you are using, make sure the following requirements are met: + + libvirt: 1.0.0 or higher + Qemu/KVM: 1.0 or higher + + The default bridge in &PRODUCT; is the Linux native bridge implementation (bridge module). &PRODUCT; includes an option to work with OpenVswitch, the requirements are listed below + + libvirt: 1.0.0 or higher + openvswitch: 1.7.1 or higher + + In addition, the following hardware requirements apply: + + Within a single cluster, the hosts must be of the same distribution version. + All hosts within a cluster must be homogenous. The CPUs must be of the same type, count, and feature flags. + Must support HVM (Intel-VT or AMD-V enabled) + 64-bit x86 CPU (more cores results in better performance) + 4 GB of memory + At least 1 NIC + When you deploy &PRODUCT;, the hypervisor host must not have any VMs already running + +
+
+ LXC Installation Overview + LXC does not have any native system VMs, instead KVM will be used to run system VMs. This means that your host will need to support both LXC and KVM, thus most of the installation and configuration will be identical to the KVM installation. The material in this section doesn't duplicate KVM installation docs. It provides the &PRODUCT;-specific steps that are needed to prepare a KVM host to work with &PRODUCT;. + Before continuing, make sure that you have applied the latest updates to your host. + It is NOT recommended to run services on this host not controlled by &PRODUCT;. + The procedure for installing an LXC Host is: + + Prepare the Operating System + Install and configure libvirt + Configure Security Policies (AppArmor and SELinux) + Install and configure the Agent + +
+
+ +
+
+ Install and configure the Agent + To manage LXC instances on the host &PRODUCT; uses a Agent. This Agent communicates with the Management server and controls all the instances on the host. + First we start by installing the agent: + In RHEL or CentOS: + $ yum install cloud-agent + In Ubuntu: + $ apt-get install cloud-agent + Next step is to update the Agent configuration setttings. The settings are in /etc/cloudstack/agent/agent.properties + + + Set the Agent to run in LXC mode: + hypervisor.type=lxc + + + Optional: If you would like to use direct networking (instead of the default bridge networking), configure these lines: + libvirt.vif.driver=com.cloud.hypervisor.kvm.resource.DirectVifDriver + network.direct.source.mode=private + network.direct.device=eth0 + + + The host is now ready to be added to a cluster. This is covered in a later section, see . It is recommended that you continue to read the documentation before adding the host! +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
diff --git a/docs/en-US/lxc-topology-req.xml b/docs/en-US/lxc-topology-req.xml new file mode 100644 index 000000000..315863dd3 --- /dev/null +++ b/docs/en-US/lxc-topology-req.xml @@ -0,0 +1,24 @@ + + +%BOOK_ENTITIES; +]> + +
+ LXC Topology Requirements + The Management Servers communicate with LXC hosts on port 22 (ssh). +
diff --git a/docs/en-US/maintain-hypervisors-on-hosts.xml b/docs/en-US/maintain-hypervisors-on-hosts.xml index 213f078ea..43f3f7907 100644 --- a/docs/en-US/maintain-hypervisors-on-hosts.xml +++ b/docs/en-US/maintain-hypervisors-on-hosts.xml @@ -5,26 +5,25 @@ ]> -
Maintaining Hypervisors on Hosts When running hypervisor software on hosts, be sure all the hotfixes provided by the hypervisor vendor are applied. Track the release of hypervisor patches through your hypervisor vendor’s support channel, and apply patches as soon as possible after they are released. &PRODUCT; will not track or notify you of required hypervisor patches. It is essential that your hosts are completely up to date with the provided hypervisor patches. The hypervisor vendor is likely to refuse to support any system that is not up to date with patches. The lack of up-do-date hotfixes can lead to data corruption and lost VMs. - (XenServer) For more information, see Highly Recommended Hotfixes for XenServer in the &PRODUCT; Knowledge Base + (XenServer) For more information, see Highly Recommended Hotfixes for XenServer in the &PRODUCT; Knowledge Base.
diff --git a/docs/en-US/manage-cloud.xml b/docs/en-US/manage-cloud.xml index f5df2c623..d35667382 100644 --- a/docs/en-US/manage-cloud.xml +++ b/docs/en-US/manage-cloud.xml @@ -5,21 +5,21 @@ ]> @@ -27,7 +27,7 @@ - - - + + + diff --git a/docs/en-US/management-server-install-client.xml b/docs/en-US/management-server-install-client.xml index 7e81ec735..b5329e344 100644 --- a/docs/en-US/management-server-install-client.xml +++ b/docs/en-US/management-server-install-client.xml @@ -1,5 +1,5 @@ - %BOOK_ENTITIES; ]> @@ -11,9 +11,7 @@ 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 @@ -31,16 +29,6 @@ The &PRODUCT; Management server can be installed using either RPM or DEB packages. These packages will depend on everything you need to run the Management server. -
- Downloading vhd-util - This procedure is required only for installations where XenServer is installed on the hypervisor hosts. - Before setting up the Management Server, download vhd-util from vhd-util. - If the Management Server is RHEL or CentOS, copy vhd-util to - /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver. - If the Management Server is Ubuntu, copy vhd-util to - /usr/lib/cloud/common/scripts/vm/hypervisor/xenserver/vhd-util. -
Install on CentOS/RHEL We start by installing the required packages: @@ -50,4 +38,16 @@ Install on Ubuntu apt-get install cloud-client
-
\ No newline at end of file + +
+ Downloading vhd-util + This procedure is required only for installations where XenServer is installed on the + hypervisor hosts. + Before setting up the Management Server, download vhd-util from vhd-util. + If the Management Server is RHEL or CentOS, copy vhd-util to + /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver. + If the Management Server is Ubuntu, copy vhd-util to + /usr/lib/cloud/common/scripts/vm/hypervisor/xenserver. +
+
diff --git a/docs/en-US/management-server-install-db-external.xml b/docs/en-US/management-server-install-db-external.xml index 3bba45f3e..a28dee569 100644 --- a/docs/en-US/management-server-install-db-external.xml +++ b/docs/en-US/management-server-install-db-external.xml @@ -127,12 +127,17 @@ bind-address = 0.0.0.0 recommended that you replace this with a more secure value. See . + + (Optional) For management_server_ip, you may explicitly specify cluster management + server node IP. If not specified, the local IP address will be used. + cloud-setup-databases cloud:<dbpassword>@<ip address mysql server> \ --deploy-as=root:<password> \ -e <encryption_type> \ -m <management_server_key> \ --k <database_key> +-k <database_key> \ +-i <management_server_ip> When this script is finished, you should see a message like “Successfully initialized the database.†diff --git a/docs/en-US/management-server-install-db-local.xml b/docs/en-US/management-server-install-db-local.xml index 3e09c554d..918cdc0a2 100644 --- a/docs/en-US/management-server-install-db-local.xml +++ b/docs/en-US/management-server-install-db-local.xml @@ -11,9 +11,7 @@ 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 @@ -29,19 +27,23 @@ MySQL. See . - Install MySQL from the package repository from your distribution: + Install MySQL from the package repository of your distribution: On RHEL or CentOS: yum install mysql-server On Ubuntu: apt-get install mysql-server - Edit the MySQL configuration (/etc/my.cnf or /etc/mysql/my.cnf, depending on your OS) - and insert the following lines in the [mysqld] section. You can put these lines below the - datadir line. The max_connections parameter should be set to 350 multiplied by the number of - Management Servers you are deploying. This example assumes one Management Server. + Open the MySQL configuration file. The configuration file is /etc/my.cnf or + /etc/mysql/my.cnf, depending on your OS. + + + Insert the following lines in the [mysqld] section. + You can put these lines below the datadir line. The max_connections parameter should be + set to 350 multiplied by the number of Management Servers you are deploying. This example + assumes one Management Server. - On Ubuntu, you can also create a file /etc/mysql/conf.d/cloudstack.cnf and add these + On Ubuntu, you can also create a file /etc/mysql/conf.d/cloudstack.cnf and add these directives there. Don't forget to add [mysqld] on the first line of the file. innodb_rollback_on_timeout=1 @@ -68,6 +70,36 @@ binlog-format = 'ROW' questions. mysql_secure_installation + + &PRODUCT; can be blocked by security mechanisms, such as SELinux. Disable SELinux to + ensure + that the Agent has all the required permissions. + Configure SELinux (RHEL and CentOS): + + + Check whether SELinux is installed on your machine. If not, you can skip this + section. + In RHEL or CentOS, SELinux is installed and enabled by default. You can verify this + with: + $ rpm -qa | grep selinux + + + Set the SELINUX variable in /etc/selinux/config to + "permissive". This ensures that the permissive setting will be maintained after a system + reboot. + In RHEL or CentOS: + vi /etc/selinux/config + Change the following line + SELINUX=enforcing + to this: + SELINUX=permissive + + + Set SELinux to permissive starting immediately, without requiring a system + reboot. + $ setenforce permissive + + + Set up the database. The following command creates the "cloud" user on the database. @@ -98,12 +130,17 @@ binlog-format = 'ROW' recommended that you replace this with a more secure value. See . + + (Optional) For management_server_ip, you may explicitly specify cluster management + server node IP. If not specified, the local IP address will be used. + cloud-setup-databases cloud:<dbpassword>@localhost \ --deploy-as=root:<password> \ -e <encryption_type> \ -m <management_server_key> \ --k <database_key> +-k <database_key> \ +-i <management_server_ip> When this script is finished, you should see a message like “Successfully initialized the database.†@@ -111,14 +148,11 @@ binlog-format = 'ROW' If you are running the KVM hypervisor on the same machine with the Management Server, edit /etc/sudoers and add the following line: Defaults:cloud !requiretty - - This type of single-machine setup is recommended only for a trial installation. - Now that the database is set up, you can finish configuring the OS for the Management Server. This command will set up iptables, sudoers, and start the Management Server. - # cloud-setup-management + # cloud-setup-management You should see the message “&PRODUCT; Management Server setup is done.†diff --git a/docs/en-US/management-server-install-multi-node.xml b/docs/en-US/management-server-install-multi-node.xml index e61f6230f..21cf28fc7 100644 --- a/docs/en-US/management-server-install-multi-node.xml +++ b/docs/en-US/management-server-install-multi-node.xml @@ -53,7 +53,7 @@ linkend="sect-source-buildrpm"/> or as Configure the database client. Note the absence of the --deploy-as argument in this case. (For more details about the arguments to this command, see .) - # cloud-setup-databases cloud:dbpassword@dbhost -e encryption_type -m management_server_key -k database_key + # cloud-setup-databases cloud:dbpassword@dbhost -e encryption_type -m management_server_key -k database_key -i management_server_ip @@ -65,8 +65,7 @@ linkend="sect-source-buildrpm"/> or as Repeat these steps on each additional Management Server. - Be sure to configure a load balancer for the Management Servers. See Management Server - Load Balancing. + Be sure to configure a load balancer for the Management Servers. See . -
\ No newline at end of file +
diff --git a/docs/en-US/management-server-install-nfs-shares.xml b/docs/en-US/management-server-install-nfs-shares.xml index e917a8e0b..a12e09c3e 100644 --- a/docs/en-US/management-server-install-nfs-shares.xml +++ b/docs/en-US/management-server-install-nfs-shares.xml @@ -26,7 +26,7 @@ Prepare NFS Shares &PRODUCT; needs a place to keep primary and secondary storage (see Cloud Infrastructure Overview). Both of these can be NFS shares. This section tells how to set up the NFS shares before adding the storage to &PRODUCT;. Alternative Storage - NFS is not the only option for primary or secondary storage. For example, you may use a Ceph RDB cluster, GlusterFS, iSCSI, and otthers. + NFS is not the only option for primary or secondary storage. For example, you may use Ceph RBD, GlusterFS, iSCSI, and others. The choice of storage system will depend on the choice of hypervisor and whether you are dealing with primary or secondary storage. The requirements for primary and secondary storage are described in: diff --git a/docs/en-US/management-server-install-prepare-os.xml b/docs/en-US/management-server-install-prepare-os.xml index ef78731e8..02453a0b2 100644 --- a/docs/en-US/management-server-install-prepare-os.xml +++ b/docs/en-US/management-server-install-prepare-os.xml @@ -30,7 +30,7 @@ Check for a fully qualified hostname. hostname --fqdn - This should return a fully qualified hostname such as "managament1.lab.example.org". If it does not, edit /etc/hosts so that it does. + This should return a fully qualified hostname such as "management1.lab.example.org". If it does not, edit /etc/hosts so that it does. Make sure that the machine can reach the Internet. diff --git a/docs/en-US/management-server-install-systemvm.xml b/docs/en-US/management-server-install-systemvm.xml index df2c3738a..928b95618 100644 --- a/docs/en-US/management-server-install-systemvm.xml +++ b/docs/en-US/management-server-install-systemvm.xml @@ -53,7 +53,13 @@ For KVM: # /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 -h kvm -s <optional-management-server-secret-key> -F + + For LXC: + # /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 -h lxc -s <optional-management-server-secret-key> -F + + On Ubuntu, use the following path instead: + # /usr/lib/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt If you are using a separate NFS server, perform this step. If you are using the diff --git a/docs/en-US/management-server-lb.xml b/docs/en-US/management-server-lb.xml index 85a86221c..13f87560e 100644 --- a/docs/en-US/management-server-lb.xml +++ b/docs/en-US/management-server-lb.xml @@ -19,7 +19,7 @@ under the License. -->
- Setting Zone VLAN and Running VM Maximums + Management Server Load Balancing &PRODUCT; can use a load balancer to provide a virtual IP for multiple Management Servers. The administrator is responsible for creating the load balancer rules for the Management Servers. The application requires persistence or stickiness across multiple sessions. @@ -58,4 +58,9 @@ + In addition to above settings, the administrator is responsible for setting the 'host' global + config value from the management server IP to load balancer virtual IP address. + If the 'host' value is not set to the VIP for Port 8250 and one of your management servers crashes, + the UI is still available but the system VMs will not be able to contact the management server. +
diff --git a/docs/en-US/manual-live-migration.xml b/docs/en-US/manual-live-migration.xml index 52de4c403..225f0ba33 100644 --- a/docs/en-US/manual-live-migration.xml +++ b/docs/en-US/manual-live-migration.xml @@ -5,48 +5,47 @@ ]> -
- Moving VMs Between Hosts (Manual Live Migration) - The &PRODUCT; administrator can move a running VM from one host to another without interrupting service to users or going into maintenance mode. This is called manual live migration, and can be done under the following conditions: - - The root administrator is logged in. Domain admins and users can not perform manual live migration of VMs. - The VM is running. Stopped VMs can not be live migrated. - The destination host must be in the same cluster as the original host. - The VM must not be using local disk storage. - The destination host must have enough available capacity. If not, the VM will remain in the "migrating" state until memory becomes available. + Moving VMs Between Hosts (Manual Live Migration) + The &PRODUCT; administrator can move a running VM from one host to another without interrupting service to users or going into maintenance mode. This is called manual live migration, and can be done under the following conditions: + + The root administrator is logged in. Domain admins and users can not perform manual live migration of VMs. + The VM is running. Stopped VMs can not be live migrated. + The destination host must be in the same cluster as the original host. + The VM must not be using local disk storage. + The destination host must have enough available capacity. If not, the VM will remain in the "migrating" state until memory becomes available. - - To manually live migrate a virtual machine - - Log in to the &PRODUCT; UI as a user or admin. - In the left navigation, click Instances. - Choose the VM that you want to migrate. - Click the Migrate Instance button - - - - Migrateinstance.png: button to migrate an instance - - - From the list of hosts, choose the one to which you want to move the VM. - Click OK. - -
+ + To manually live migrate a virtual machine + + Log in to the &PRODUCT; UI as a user or admin. + In the left navigation, click Instances. + Choose the VM that you want to migrate. + Click the Migrate Instance button. + + + + Migrateinstance.png: button to migrate an instance + + + From the list of hosts, choose the one to which you want to move the VM. + Click OK. + +
diff --git a/docs/en-US/migrate-vm-rootvolume-volume-new-storage-pool.xml b/docs/en-US/migrate-vm-rootvolume-volume-new-storage-pool.xml index 67fe2f589..d615cfe7a 100644 --- a/docs/en-US/migrate-vm-rootvolume-volume-new-storage-pool.xml +++ b/docs/en-US/migrate-vm-rootvolume-volume-new-storage-pool.xml @@ -5,33 +5,33 @@ ]> -
- Migrating a VM Root Volume to a New Storage Pool - When migrating the root disk volume, the VM must first be stopped, and users can not access the VM. After migration is complete, the VM can be restarted. - - Log in to the &PRODUCT; UI as a user or admin. - Detach the data disk from the VM. See Detaching and Moving Volumes (but skip the “reattach†step at the end. You will do that after migrating to new storage). - Stop the VM. - Call the &PRODUCT; API command migrateVirtualMachine with the ID of the VM to migrate and the IDs of a destination host and destination storage pool in the same zone. - Watch for the VM status to change to Migrating, then back to Stopped. - Restart the VM. - -
+ Migrating a VM Root Volume to a New Storage Pool + When migrating the root disk volume, the VM must first be stopped, and users can not access the VM. After migration is complete, the VM can be restarted. + + Log in to the &PRODUCT; UI as a user or admin. + Detach the data disk from the VM. See Detaching and Moving Volumes (but skip the “reattach†step at the end. You will do that after migrating to new storage). + Stop the VM. + Use the &PRODUCT; API command, migrateVirtualMachine, with the ID of the VM to migrate and + the IDs of a destination host and destination storage pool in the same zone. + Watch for the VM status to change to Migrating, then back to Stopped. + Restart the VM. + +
diff --git a/docs/en-US/minimum-system-requirements.xml b/docs/en-US/minimum-system-requirements.xml index dcab0398d..870ef68ea 100644 --- a/docs/en-US/minimum-system-requirements.xml +++ b/docs/en-US/minimum-system-requirements.xml @@ -1,62 +1,65 @@ - %BOOK_ENTITIES; ]> -
- Minimum System Requirements -
- Management Server, Database, and Storage System Requirements - The machines that will run the Management Server and MySQL database must meet the following requirements. The same machines can also be used to provide primary and secondary storage, such as via localdisk or NFS. The Management Server may be placed on a virtual machine. - - Operating system: - + Minimum System Requirements +
+ Management Server, Database, and Storage System Requirements + + The machines that will run the Management Server and MySQL database must meet the following requirements. + The same machines can also be used to provide primary and secondary storage, such as via localdisk or NFS. + The Management Server may be placed on a virtual machine. + + + Operating system: + Preferred: CentOS/RHEL 6.3+ or Ubuntu 12.04(.1) - - - 64-bit x86 CPU (more cores results in better performance) - 4 GB of memory - 50 GB of local disk (When running secondary storage on the management server 500GB is recommended) - At least 1 NIC - Statically allocated IP address - Fully qualified domain name as returned by the hostname command - -
-
- Host/Hypervisor System Requirements - The host is where the cloud services run in the form of guest virtual machines. Each host is one machine that meets the following requirements: - + + + 64-bit x86 CPU (more cores results in better performance) + 4 GB of memory + 250 GB of local disk (more results in better capability; 500 GB recommended) + At least 1 NIC + Statically allocated IP address + Fully qualified domain name as returned by the hostname command + +
+
+ Host/Hypervisor System Requirements + The host is where the cloud services run in the form of guest virtual machines. Each host is one machine that meets the following requirements: + Must support HVM (Intel-VT or AMD-V enabled). - 64-bit x86 CPU (more cores results in better performance) - Hardware virtualization support required - 4 GB of memory - 36 GB of local disk - At least 1 NIC + 64-bit x86 CPU (more cores results in better performance) + Hardware virtualization support required + 4 GB of memory + 36 GB of local disk + At least 1 NIC If DHCP is used for hosts, ensure that no conflict occurs between DHCP server used for these hosts and the DHCP router created by &PRODUCT;. - Latest hotfixes applied to hypervisor software - When you deploy &PRODUCT;, the hypervisor host must not have any VMs already running - All hosts within a cluster must be homogenous. The CPUs must be of the same type, count, and feature flags. - - Hosts have additional requirements depending on the hypervisor. See the requirements listed at the top of the Installation section for your chosen hypervisor: + Latest hotfixes applied to hypervisor software + When you deploy &PRODUCT;, the hypervisor host must not have any VMs already running + All hosts within a cluster must be homogeneous. The CPUs must be of the same type, count, and feature flags. + + Hosts have additional requirements depending on the hypervisor. See the requirements listed at the top of the Installation section for your chosen hypervisor: Be sure you fulfill the additional hypervisor requirements and installation steps provided in this Guide. Hypervisor hosts must be properly prepared to work with CloudStack. For example, the requirements for XenServer are listed under Citrix XenServer Installation. @@ -65,6 +68,7 @@ +
diff --git a/docs/en-US/multiple-ip-nic.xml b/docs/en-US/multiple-ip-nic.xml new file mode 100644 index 000000000..561ba0757 --- /dev/null +++ b/docs/en-US/multiple-ip-nic.xml @@ -0,0 +1,91 @@ + + +%BOOK_ENTITIES; +]> + + +
+ Configuring Multiple IP Addresses on a Single NIC + &PRODUCT; now provides you the ability to associate multiple private IP addresses per guest + VM NIC. This feature is supported on all the network configurations—Basic, Advanced, and + VPC. Security Groups, Static NAT and Port forwarding services are supported on these additional + IPs. In addition to the primary IP, you can assign additional IPs to the guest VM NIC. Up to 256 + IP addresses are allowed per NIC. + As always, you can specify an IP from the guest subnet; if not specified, an IP is + automatically picked up from the guest VM subnet. You can view the IPs associated with for each + guest VM NICs on the UI. You can apply NAT on these additional guest IPs by using firewall + configuration in the &PRODUCT; UI. You must specify the NIC to which the IP should be + associated. + This feature is supported on XenServer, KVM, and VMware hypervisors. + + You need to configure the secondary IP address on the guest VM. &PRODUCT; will + not configure the acquired IP address on the VM. Ensure that you assign IPs to NIC each + time the VM reboots. + + Some of the use cases are described below: + + + Building network appliances: Network appliances, such as firewalls and load balancers, + generally work best when they have access to multiple IP addresses on the network + interface. + + + Moving private IP addresses between interfaces or instances. Applications that are bound + to specific IP addresses can be moved between instances. + + + Hosting multiple SSL Websites on a single instance. You can install multiple SSL + certificates on a single instance, each associated with a distinct IP address. + + +
+ Assigning Additional IPs to a VM + + + Log in to the &PRODUCT; UI. + + + In the left navigation bar, click Instances. + + + Click the name of the instance you want to work with. + + + In the Details tab, click NICs. + + + Click View All. + + + Click Acquire New IP, and click Yes in the confirmation dialog. + You are prompted for confirmation because, typically, IP addresses are a limited + resource. Within a few moments, the new IP address should appear with the state Allocated. + You can now use the IP address in Port Forwarding or StaticNAT rules. + + +
+
+ Port Forwarding and StaticNAT Services Changes + Because multiple IPs can be associated per NIC, you are allowed to select a desired IP for + the Port Forwarding and StaticNAT services. The default is the primary IP. To enable this + functionality, an extra optional parameter 'vmguestip' is added to the Port forwarding and + StaticNAT APIs (enableStaticNat, createIpForwardingRule) to indicate on what IP address NAT + need to be configured. If vmguestip is passed, NAT is configured on the specified private IP + of the VM. if not passed, NAT is configured on the primary IP of the VM. +
+
diff --git a/docs/en-US/network-offerings.xml b/docs/en-US/network-offerings.xml index c1fd79da8..0a7b8e78e 100644 --- a/docs/en-US/network-offerings.xml +++ b/docs/en-US/network-offerings.xml @@ -5,23 +5,22 @@ ]> -
Network Offerings For the most up-to-date list of supported network services, see the &PRODUCT; UI or call listNetworkServices. @@ -43,5 +42,5 @@ If you create load balancing rules while using a network service offering that includes an external load balancer device such as NetScaler, and later change the network service offering to one that uses the &PRODUCT; virtual router, you must create a firewall rule on the virtual router for each of your existing load balancing rules so that they continue to function. When creating a new virtual network, the &PRODUCT; administrator chooses which network offering to enable for that network. Each virtual network is associated with one network offering. A virtual network can be upgraded or downgraded by changing its associated network offering. If you do this, be sure to reprogram the physical network to match. &PRODUCT; also has internal network offerings for use by &PRODUCT; system VMs. These network offerings are not visible to users but can be modified by administrators. - +
diff --git a/docs/en-US/network-service-providers.xml b/docs/en-US/network-service-providers.xml index 82eaff18c..cf86b2466 100644 --- a/docs/en-US/network-service-providers.xml +++ b/docs/en-US/network-service-providers.xml @@ -5,21 +5,21 @@ ]>
@@ -32,4 +32,101 @@ Supported Network Service Providers &PRODUCT; ships with an internal list of the supported service providers, and you can choose from this list when creating a network offering. + + + + + + + + + + + + Virtual Router + Citrix NetScaler + Juniper SRX + F5 BigIP + Host based (KVM/Xen) + + + + + + Remote Access VPN + Yes + No + No + No + No + + + + DNS/DHCP/User Data + Yes + No + No + No + No + + + + Firewall + Yes + No + Yes + No + No + + + Load Balancing + Yes + Yes + No + Yes + No + + + Elastic IP + No + Yes + No + No + No + + + Elastic LB + No + Yes + No + No + No + + + Source NAT + Yes + No + Yes + No + No + + + Static NAT + Yes + Yes + Yes + No + No + + + Port Forwarding + Yes + No + Yes + No + No + + + +
diff --git a/docs/en-US/networking-in-a-pod.xml b/docs/en-US/networking-in-a-pod.xml index 81f082718..5a569bf4d 100644 --- a/docs/en-US/networking-in-a-pod.xml +++ b/docs/en-US/networking-in-a-pod.xml @@ -5,37 +5,42 @@ ]> -
- Networking in a Pod - Figure 2 illustrates network setup within a single pod. The hosts are connected to a pod-level switch. At a minimum, the hosts should have one physical uplink to each switch. Bonded NICs are supported as well. The pod-level switch is a pair of redundant gigabit switches with 10 G uplinks. - - - - - networking-in-a-pod.png: Network setup in a pod - - Servers are connected as follows: - - Storage devices are connected to only the network that carries management traffic. - Hosts are connected to networks for both management traffic and public traffic. - Hosts are also connected to one or more networks carrying guest traffic. - - We recommend the use of multiple physical Ethernet cards to implement each network interface as well as redundant switch fabric in order to maximize throughput and improve reliability. -
+ Networking in a Pod + The figure below illustrates network setup within a single pod. The hosts are connected to a + pod-level switch. At a minimum, the hosts should have one physical uplink to each switch. + Bonded NICs are supported as well. The pod-level switch is a pair of redundant gigabit + switches with 10 G uplinks. + + + + + + networksinglepod.png: diagram showing logical view of network in a pod + + + Servers are connected as follows: + + Storage devices are connected to only the network that carries management traffic. + Hosts are connected to networks for both management traffic and public traffic. + Hosts are also connected to one or more networks carrying guest traffic. + + We recommend the use of multiple physical Ethernet cards to implement each network interface as well as redundant switch fabric in order to maximize throughput and improve reliability. + +
diff --git a/docs/en-US/networking-in-a-zone.xml b/docs/en-US/networking-in-a-zone.xml index c380c33dd..e50efbac9 100644 --- a/docs/en-US/networking-in-a-zone.xml +++ b/docs/en-US/networking-in-a-zone.xml @@ -5,32 +5,34 @@ ]> -
- Networking in a Zone - Figure 3 illustrates the network setup within a single zone. - - - - - networking-in-a-zone.png: Network setup in a single zone - - A firewall for management traffic operates in the NAT mode. The network typically is assigned IP addresses in the 192.168.0.0/16 Class B private address space. Each pod is assigned IP addresses in the 192.168.*.0/24 Class C private address space. - Each zone has its own set of public IP addresses. Public IP addresses from different zones do not overlap. -
+ Networking in a Zone + The following figure illustrates the network setup within a single zone. + + + + + + networksetupzone.png: Depicts network setup in a single zone + + + A firewall for management traffic operates in the NAT mode. The network typically is assigned IP addresses in the 192.168.0.0/16 Class B private address space. Each pod is assigned IP addresses in the 192.168.*.0/24 Class C private address space. + Each zone has its own set of public IP addresses. Public IP addresses from different zones do not overlap. + +
diff --git a/docs/en-US/networking-overview.xml b/docs/en-US/networking-overview.xml index 798fd7a8b..a71fe95a8 100644 --- a/docs/en-US/networking-overview.xml +++ b/docs/en-US/networking-overview.xml @@ -5,31 +5,30 @@ ]> -
- Networking Overview - - &PRODUCT; offers two types of networking scenario: - - - Basic. For AWS-style networking. Provides a single network where guest isolation can be provided through layer-3 means such as security groups (IP address source filtering). - Advanced. For more sophisticated network topologies. This network model provides the most flexibility in defining guest networks. - - For more details, see Network Setup. -
+ Networking Overview + &PRODUCT; offers two types of networking scenario: + + + Basic. For AWS-style networking. Provides a single network where guest isolation can be provided through layer-3 means such as security groups (IP address source filtering). + Advanced. For more sophisticated network topologies. This network model provides the most flexibility in defining guest networks. + + For more details, see Network Setup. +
+ diff --git a/docs/en-US/networks.xml b/docs/en-US/networks.xml index a7b9ea124..cb7493cc9 100644 --- a/docs/en-US/networks.xml +++ b/docs/en-US/networks.xml @@ -31,6 +31,8 @@ + + @@ -45,4 +47,5 @@ - \ No newline at end of file + + diff --git a/docs/en-US/nfs-shares-on-management-server.xml b/docs/en-US/nfs-shares-on-management-server.xml index c000ce481..881ca8d76 100644 --- a/docs/en-US/nfs-shares-on-management-server.xml +++ b/docs/en-US/nfs-shares-on-management-server.xml @@ -27,9 +27,9 @@ This section tells how to set up NFS shares for primary and secondary storage on the same node with the Management Server. This is more typical of a trial installation, but is technically possible in a larger deployment. It is assumed that you will have less than 16TB of storage on the host. The exact commands for the following steps may vary depending on your operating system version. - On Ubuntu/Debian systems, you'll need to install the nfs-kernel-server package: + On RHEL/CentOS systems, you'll need to install the nfs-utils package: -$ sudo apt-get install nfs-kernel-server +$ sudo yum install nfs-utils On the Management Server host, create two directories that you will use for primary and secondary storage. For example: diff --git a/docs/en-US/ongoing-config-of-ext-firewalls-lb.xml b/docs/en-US/ongoing-config-of-ext-firewalls-lb.xml deleted file mode 100644 index 6a02d27fb..000000000 --- a/docs/en-US/ongoing-config-of-ext-firewalls-lb.xml +++ /dev/null @@ -1,34 +0,0 @@ - - -%BOOK_ENTITIES; -]> - - - -
- Ongoing Configuration of External Firewalls and Load Balancers - Additional user actions (e.g. setting a port forward) will cause further programming of the firewall and load balancer. A user may request additional public IP addresses and forward traffic received at these IPs to specific VMs. This is accomplished by enabling static NAT for a public IP address, assigning the IP to a VM, and specifying a set of protocols and port ranges to open. When a static NAT rule is created, &PRODUCT; programs the zone's external firewall with the following objects: - - A static NAT rule that maps the public IP address to the private IP address of a VM. - A security policy that allows traffic within the set of protocols and port ranges that are specified. - A firewall filter counter that measures the number of bytes of incoming traffic to the public IP. - - The number of incoming and outgoing bytes through source NAT, static NAT, and load balancing rules is measured and saved on each external element. This data is collected on a regular basis and stored in the &PRODUCT; database. -
diff --git a/docs/en-US/ongoing-config-of-external-firewalls-lb.xml b/docs/en-US/ongoing-config-of-external-firewalls-lb.xml new file mode 100644 index 000000000..f5864da2b --- /dev/null +++ b/docs/en-US/ongoing-config-of-external-firewalls-lb.xml @@ -0,0 +1,46 @@ + + +%BOOK_ENTITIES; +]> + +
+ Ongoing Configuration of External Firewalls and Load Balancers + Additional user actions (e.g. setting a port forward) will cause further programming of the + firewall and load balancer. A user may request additional public IP addresses and forward + traffic received at these IPs to specific VMs. This is accomplished by enabling static NAT for a + public IP address, assigning the IP to a VM, and specifying a set of protocols and port ranges + to open. When a static NAT rule is created, &PRODUCT; programs the zone's external firewall with + the following objects: + + + A static NAT rule that maps the public IP address to the private IP address of a + VM. + + + A security policy that allows traffic within the set of protocols and port ranges that + are specified. + + + A firewall filter counter that measures the number of bytes of incoming traffic to the + public IP. + + + The number of incoming and outgoing bytes through source NAT, static NAT, and load balancing + rules is measured and saved on each external element. This data is collected on a regular basis + and stored in the &PRODUCT; database. +
diff --git a/docs/en-US/ongoing-configuration-of-external-firewalls-loadbalancer.xml b/docs/en-US/ongoing-configuration-of-external-firewalls-loadbalancer.xml deleted file mode 100644 index c90c7ada6..000000000 --- a/docs/en-US/ongoing-configuration-of-external-firewalls-loadbalancer.xml +++ /dev/null @@ -1,46 +0,0 @@ - - -%BOOK_ENTITIES; -]> - -
- Ongoing Configuration of External Firewalls and Load Balancers - Additional user actions (e.g. setting a port forward) will cause further programming of the - firewall and load balancer. A user may request additional public IP addresses and forward - traffic received at these IPs to specific VMs. This is accomplished by enabling static NAT for a - public IP address, assigning the IP to a VM, and specifying a set of protocols and port ranges - to open. When a static NAT rule is created, &PRODUCT; programs the zone's external firewall with - the following objects: - - - A static NAT rule that maps the public IP address to the private IP address of a - VM. - - - A security policy that allows traffic within the set of protocols and port ranges that - are specified. - - - A firewall filter counter that measures the number of bytes of incoming traffic to the - public IP. - - - The number of incoming and outgoing bytes through source NAT, static NAT, and load balancing - rules is measured and saved on each external element. This data is collected on a regular basis - and stored in the &PRODUCT; database. -
diff --git a/docs/en-US/persistent-network.xml b/docs/en-US/persistent-network.xml new file mode 100644 index 000000000..1ccc99c59 --- /dev/null +++ b/docs/en-US/persistent-network.xml @@ -0,0 +1,100 @@ + + +%BOOK_ENTITIES; +]> + + +
+ Persistent Networks + The network that you can provision without having to deploy any VMs on it is called a + persistent network. A persistent network can be part of a VPC or a non-VPC environment. + When you create other types of network, a network is only a database entry until the first + VM is created on that network. When the first VM is created, a VLAN ID is assigned and the + network is provisioned. Also, when the last VM is destroyed, the VLAN ID is released and the + network is no longer available. With the addition of persistent network, you will have the + ability to create a network in &PRODUCT; in which physical devices can be deployed without + having to run any VMs. Additionally, you can deploy physical devices on that network. + One of the advantages of having a persistent network is that you can create a VPC with a tier + consisting of only physical devices. For example, you might create a VPC for a three-tier + application, deploy VMs for Web and Application tier, and use physical machines for the + Database tier. Another use case is that if you are providing services by using physical + hardware, you can define the network as persistent and therefore even if all its VMs are + destroyed the services will not be discontinued. +
+ Persistent Network Considerations + + + Persistent network is designed for isolated networks. + + + All default network offerings are non-persistent. + + + A network offering cannot be editable because changing it affects the behavior of the + existing networks that were created using this network offering. + + + When you create a guest network, the network offering that you select defines the + network persistence. This in turn depends on whether persistent network is enabled in the + selected network offering. + + + An existing network can be made persistent by changing its network offering to an + offering that has the Persistent option enabled. While setting this property, even if the + network has no running VMs, the network is provisioned. + + + An existing network can be made non-persistent by changing its network offering to an + offering that has the Persistent option disabled. If the network has no running VMs, + during the next network garbage collection run the network is shut down. + + + When the last VM on a network is destroyed, the network garbage collector checks if + the network offering associated with the network is persistent, and shuts down the network + only if it is non-persistent. + + +
+
+ Creating a Persistent Guest Network + To create a persistent network, perform the following: + + + Create a network offering with the Persistent option enabled. + See . + See the Administration Guide. + + + Select Network from the left navigation pane. + + + Select the guest network that you want to offer this network service to. + + + Click the Edit button. + + + From the Network Offering drop-down, select the persistent network offering you have + just created. + + + Click OK. + + +
+
diff --git a/docs/en-US/plugin-niciranvp-devicemanagement.xml b/docs/en-US/plugin-niciranvp-devicemanagement.xml index 2423ce392..57b8eee9d 100644 --- a/docs/en-US/plugin-niciranvp-devicemanagement.xml +++ b/docs/en-US/plugin-niciranvp-devicemanagement.xml @@ -22,7 +22,7 @@ -->
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. + In &PRODUCT; 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 Nicira NVP Controller. The plugin introduces a set of new API calls to manage the devices, see below or refer to the API reference. addNiciraNvpDevice @@ -44,4 +44,4 @@ 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 index b71e67f41..c346bfb64 100644 --- a/docs/en-US/plugin-niciranvp-features.xml +++ b/docs/en-US/plugin-niciranvp-features.xml @@ -22,12 +22,12 @@ -->
Features of the Nicira NVP Plugin - In CloudStack release 4.0.0-incubating 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. + In &PRODUCT; release 4.0.0-incubating 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 tenant 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.0-incubating only the XenServer hypervisor is supported for use in + In &PRODUCT; 4.0.0-incubating only the XenServer hypervisor is supported for use in combination with Nicira NVP. - In CloudStack 4.1.0-incubating both KVM and XenServer hypervisors are + In &PRODUCT; 4.1.0-incubating both KVM and XenServer hypervisors are supported. - In CloudStack 4.0.0-incubating the UI components for this plugin are not complete, + In &PRODUCT; 4.0.0-incubating the UI components for this plugin are not complete, configuration is done by sending commands to the API.
diff --git a/docs/en-US/plugin-niciranvp-preparations.xml b/docs/en-US/plugin-niciranvp-preparations.xml index 86b795ccd..762c941fd 100644 --- a/docs/en-US/plugin-niciranvp-preparations.xml +++ b/docs/en-US/plugin-niciranvp-preparations.xml @@ -23,7 +23,7 @@
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. + &PRODUCT; 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 the hypervisor. See the Nicira NVP User Guide for more details on how to set this up in XenServer or KVM. @@ -33,6 +33,6 @@ 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 + The UUID of the Physical Network that will be used for the Guest networks -
\ No newline at end of file + diff --git a/docs/en-US/plugin-niciranvp-uuidreferences.xml b/docs/en-US/plugin-niciranvp-uuidreferences.xml index c91297173..cb5f1cae8 100644 --- a/docs/en-US/plugin-niciranvp-uuidreferences.xml +++ b/docs/en-US/plugin-niciranvp-uuidreferences.xml @@ -22,9 +22,9 @@ -->
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 plugin maintains several references in the &PRODUCT; database to items created on the NVP Controller. + Every guest network that 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/port-forwarding.xml b/docs/en-US/port-forwarding.xml index b2843eb9c..1bbba45e3 100644 --- a/docs/en-US/port-forwarding.xml +++ b/docs/en-US/port-forwarding.xml @@ -5,45 +5,47 @@ ]> -
- Port Forwarding - A port forward service is a set of port forwarding rules that define a policy. A port forward service is then applied to one or more guest VMs. The guest VM then has its inbound network access managed according to the policy defined by the port forwarding service. You can optionally specify one or more CIDRs to filter the source IPs. This is useful when you want to allow only incoming requests from certain IP addresses to be forwarded. - A guest VM can be in any number of port forward services. Port forward services can be defined but have no members. If a guest VM is part of more than one network, port forwarding rules will function only if they are defined on the default network - You cannot use port forwarding to open ports for an elastic IP address. When elastic IP is used, outside access is instead controlled through the use of security groups. See Security Groups. - To set up port forwarding: - - Log in to the &PRODUCT; UI as an administrator or end user. - If you have not already done so, add a public IP address range to a zone in &PRODUCT;. See Adding a Zone and Pod in the Installation Guide. - Add one or more VM instances to &PRODUCT;. - In the left navigation bar, click Network. - Click the name of the guest network where the VMs are running. - - Choose an existing IP address or acquire a new IP address. (See Acquiring a New IP Address on page 73.) Click the name of the IP address in the list. - Click the Configuration tab. - In the Port Forwarding node of the diagram, click View All. - Fill in the following: - - Public Port. The port to which public traffic will be addressed on the IP address you acquired in the previous step. - Private Port. The port on which the instance is listening for forwarded public traffic. - Protocol. The communication protocol in use between the two ports. - - Click Add. - + Port Forwarding + A port forward service is a set of port forwarding rules that define a policy. A port forward service is then applied to one or more guest VMs. The guest VM then has its inbound network access managed according to the policy defined by the port forwarding service. You can optionally specify one or more CIDRs to filter the source IPs. This is useful when you want to allow only incoming requests from certain IP addresses to be forwarded. + A guest VM can be in any number of port forward services. Port forward services can be defined but have no members. If a guest VM is part of more than one network, port forwarding rules will function only if they are defined on the default network + You cannot use port forwarding to open ports for an elastic IP address. When elastic IP is used, outside access is instead controlled through the use of security groups. See Security Groups. + To set up port forwarding: + + Log in to the &PRODUCT; UI as an administrator or end user. + If you have not already done so, add a public IP address range to a zone in &PRODUCT;. See Adding a Zone and Pod in the Installation Guide. + Add one or more VM instances to &PRODUCT;. + In the left navigation bar, click Network. + Click the name of the guest network where the VMs are running. + + Choose an existing IP address or acquire a new IP address. See . Click the name of the IP address in the list. + Click the Configuration tab. + In the Port Forwarding node of the diagram, click View All. + Fill in the following: + + Public Port. The port to which public traffic will be + addressed on the IP address you acquired in the previous step. + Private Port. The port on which the instance is listening for + forwarded public traffic. + Protocol. The communication protocol in use between the two + ports + + Click Add. +
diff --git a/docs/en-US/prepare-system-vm-template.xml b/docs/en-US/prepare-system-vm-template.xml index 22674d479..35cc7e979 100644 --- a/docs/en-US/prepare-system-vm-template.xml +++ b/docs/en-US/prepare-system-vm-template.xml @@ -26,22 +26,28 @@ Secondary storage must be seeded with a template that is used for &PRODUCT; system VMs. Citrix provides you with the necessary binary package of the system VM. - When copying and pasting a command, be sure the command has pasted as a single line before - executing. Some document viewers may introduce unwanted line breaks in copied text. + When copying and pasting a command, ensure that the command has pasted as a single line + before executing. Some document viewers may introduce unwanted line breaks in copied + text. - + + + If you are using a separate NFS server, mount the secondary storage on your Management + Server. Replace the example NFS server name and NFS share paths below with your own. + # mount -t nfs nfsservername:/nfs/share/secondary /mnt/secondary + If your secondary storage mount point is not named /mnt/secondary, substitute your own + mount point name. + On the Management Server, run one or more of the following cloud-install-sys-tmplt commands to retrieve and decompress the system VM template. Run the command for each hypervisor type that you expect end users to run in this Zone. - If your secondary storage mount point is not named /mnt/secondary, substitute your own - mount point name. - If you set the &PRODUCT; database encryption type to "web" when you set up the database, + If you set the &PRODUCT; database encryption type to "web" when you set up the database, you must now add the parameter -s <management-server-secret-key>. See . This process will require approximately 5 GB of free space on the local file system and - up to 30 minutes each time it runs. - + up to 30 minutes each time it runs. + For XenServer: # /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2 -h xenserver -s <optional-management-server-secret-key> -F @@ -54,15 +60,14 @@ For KVM: # /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 -h kvm -s <optional-management-server-secret-key> -F + + For LXC: + # /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 -h lxc -s <optional-management-server-secret-key> -F + - If you are using a separate NFS server, perform this step. - - Do not perform this step if you are using the Management Server as the NFS - server. - - When the script has finished, unmount secondary storage and remove the created + When the script has finished, unmount secondary storage and remove the created directory. # umount /mnt/secondary # rmdir /mnt/secondary diff --git a/docs/en-US/primary-storage-add.xml b/docs/en-US/primary-storage-add.xml index 5581e9e79..067cf7114 100644 --- a/docs/en-US/primary-storage-add.xml +++ b/docs/en-US/primary-storage-add.xml @@ -5,21 +5,21 @@ ]>
diff --git a/docs/en-US/primary-storage.xml b/docs/en-US/primary-storage.xml index e1736a9d3..4ab37ef6f 100644 --- a/docs/en-US/primary-storage.xml +++ b/docs/en-US/primary-storage.xml @@ -5,25 +5,25 @@ ]>
- Primary Storage + Primary Storage This section gives concepts and technical details about &PRODUCT; primary storage. For information about how to install and configure primary storage through the &PRODUCT; UI, see the Installation Guide. diff --git a/docs/en-US/provisioning-steps-overview.xml b/docs/en-US/provisioning-steps-overview.xml index 1da4485ff..5fb61963b 100644 --- a/docs/en-US/provisioning-steps-overview.xml +++ b/docs/en-US/provisioning-steps-overview.xml @@ -5,42 +5,41 @@ ]> -
- Overview of Provisioning Steps - After the Management Server is installed and running, you can add the compute resources for it to manage. For an overview of how a &PRODUCT; cloud infrastructure is organized, see . - To provision the cloud infrastructure, or to scale it up at any time, follow these procedures: - - Change the root password. See . - Add a zone. See . - Add more pods (optional). See . - Add more clusters (optional). See . - Add more hosts (optional). See . - Add primary storage. See . - Add secondary storage. See . - Initialize and test the new cloud. See . - - When you have finished these steps, you will have a deployment with the following basic structure: - - - - - provisioning-overview.png: Conceptual overview of a basic deployment - + Overview of Provisioning Steps + After the Management Server is installed and running, you can add the compute resources for it to manage. For an overview of how a &PRODUCT; cloud infrastructure is organized, see . + To provision the cloud infrastructure, or to scale it up at any time, follow these procedures: + + Define regions (optional). See . + Add a zone to the region. See . + Add more pods to the zone (optional). See . + Add more clusters to the pod (optional). See . + Add more hosts to the cluster (optional). See . + Add primary storage to the cluster. See . + Add secondary storage to the zone. See . + Initialize and test the new cloud. See . + + When you have finished these steps, you will have a deployment with the following basic structure: + + + + + provisioning-overview.png: Conceptual overview of a basic deployment +
diff --git a/docs/en-US/provisioning-steps.xml b/docs/en-US/provisioning-steps.xml index 98717435c..04ece1393 100644 --- a/docs/en-US/provisioning-steps.xml +++ b/docs/en-US/provisioning-steps.xml @@ -5,27 +5,27 @@ ]> - 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 . + This section tells how to add regions, 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/region-add.xml b/docs/en-US/region-add.xml new file mode 100644 index 000000000..960777c0a --- /dev/null +++ b/docs/en-US/region-add.xml @@ -0,0 +1,128 @@ + + +%BOOK_ENTITIES; +]> + + + +
+ Adding Regions (optional) + Grouping your cloud resources into geographic regions is an optional step when provisioning the cloud. + For an overview of regions, see . +
+ The First Region: The Default Region + If you do not take action to define regions, then all the zones in your cloud will be + automatically grouped into a single default region. This region is assigned the region + ID of 1. + You can change the name or URL of the default region by using the API command updateRegion. For example: + http://<IP_of_Management_Server>:8080/client/api?command=updateRegion&id=1&name=Northern&endpoint=http://<region_1_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D +
+
+ Adding a Region + Use these steps to add a second region in addition to the default region. + + Each region has its own &PRODUCT; instance. Therefore, the first step of creating a new region + is to install the Management Server software, on one or more nodes, in the + geographic area where you want to set up the new region. Use the steps in the + Installation guide. When you come to the step where you set up the database, use + the additional command-line flag -r <region_id> to set a + region ID for the new region. The default region is automatically assigned a + region ID of 1, so your first additional region might be region 2. + cloud-setup-databases cloud:<dbpassword>@localhost --deploy-as=root:<password> -e <encryption_type> -m <management_server_key> -k <database_key> -r <region_id> + + By the end of the installation procedure, the Management Server should have been started. Be sure that the Management Server installation was successful and complete. + Add region 2 to region 1. Use the API command addRegion. (For information about how to make an API call, see the Developer's Guide.) + http://<IP_of_region_1_Management_Server>:8080/client/api?command=addRegion&id=2&name=Western&endpoint=http://<region_2_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D + + Now perform the same command in reverse, adding region 1 to region 2. + http://<IP_of_region_2_Management_Server>:8080/client/api?command=addRegion&id=1&name=Northern&endpoint=http://<region_1_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D + + Copy the account, user, and domain tables from the region 1 database to the region 2 database. + In the following commands, it is assumed that you have set the root password on the + database, which is a &PRODUCT; recommended best practice. Substitute your own MySQL + root password. + + First, run this command to copy the contents of the database: + # mysqldump -u root -p<mysql_password> -h <region1_db_host> cloud account user domain > region1.sql + + Then run this command to put the data onto the region 2 database: + # mysql -u root -p<mysql_password> -h <region2_db_host> cloud < region1.sql + + + + Remove project accounts. Run these commands on the region 2 database: + mysql> delete from account where type = 5; + + Set the default zone as null: + mysql> update account set default_zone_id = null; + + Restart the Management Servers in region 2. + +
+
+ Adding Third and Subsequent Regions + To add the third region, and subsequent additional regions, the steps are similar to those for adding the second region. + However, you must repeat certain steps additional times for each additional region: + + Install &PRODUCT; in each additional region. Set the region ID for each region during the database setup step. + cloud-setup-databases cloud:<dbpassword>@localhost --deploy-as=root:<password> -e <encryption_type> -m <management_server_key> -k <database_key> -r <region_id> + Once the Management Server is running, add your new region to all existing regions by + repeatedly calling the API command addRegion. For example, if you were adding + region 3: + http://<IP_of_region_1_Management_Server>:8080/client/api?command=addRegion&id=3&name=Eastern&endpoint=http://<region_3_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D + +http://<IP_of_region_2_Management_Server>:8080/client/api?command=addRegion&id=3&name=Eastern&endpoint=http://<region_3_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D + Repeat the procedure in reverse to add all existing regions to the new region. For example, + for the third region, add the other two existing regions: + http://<IP_of_region_3_Management_Server>:8080/client/api?command=addRegion&id=1&name=Northern&endpoint=http://<region_1_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D + +http://<IP_of_region_3_Management_Server>:8080/client/api?command=addRegion&id=2&name=Western&endpoint=http://<region_2_IP_address_here>:8080/client&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D + Copy the account, user, and domain tables from any existing region's database to the new + region's database. + In the following commands, it is assumed that you have set the root password on the + database, which is a &PRODUCT; recommended best practice. Substitute your own MySQL + root password. + + First, run this command to copy the contents of the database: + # mysqldump -u root -p<mysql_password> -h <region1_db_host> cloud account user domain > region1.sql + + Then run this command to put the data onto the new region's database. For example, for region + 3: + # mysql -u root -p<mysql_password> -h <region3_db_host> cloud < region1.sql + + + + Remove project accounts. Run these commands on the region 2 database: + mysql> delete from account where type = 5; + + Set the default zone as null: + mysql> update account set default_zone_id = null; + + Restart the Management Servers in the new region. + +
+
+ Deleting a Region + To delete a region, use the API command removeRegion. Repeat the call to remove the region from all other regions. For example, to remove the 3rd region in a three-region cloud: + http://<IP_of_region_1_Management_Server>:8080/client/api?command=removeRegion&id=3&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D + +http://<IP_of_region_2_Management_Server>:8080/client/api?command=removeRegion&id=3&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D +
+
\ No newline at end of file diff --git a/docs/en-US/release-ip-address.xml b/docs/en-US/release-ip-address.xml index c60b73ac6..9fdccd740 100644 --- a/docs/en-US/release-ip-address.xml +++ b/docs/en-US/release-ip-address.xml @@ -5,37 +5,39 @@ ]> -
- Releasing an IP Address - - Log in to the &PRODUCT; UI as an administrator or end user. - In the left navigation, choose Network. - Click the name of the network where you want to work with. - Click View IP Addresses. - Click the IP address you want to release. - - Click the Release IP button - - - - ReleaseIPButton.png: button to release an IP - . - + Releasing an IP Address + When the last rule for an IP address is removed, you can release that IP address. The IP address still belongs to the VPC; however, it can be picked up for any guest network again. + + Log in to the &PRODUCT; UI as an administrator or end user. + In the left navigation, choose Network. + Click the name of the network where you want to work with. + Click View IP Addresses. + Click the IP address you want to release. + + Click the Release IP button. + + + + + ReleaseIPButton.png: button to release an IP + + +
diff --git a/docs/en-US/removing-vsphere-hosts.xml b/docs/en-US/removing-vsphere-hosts.xml index 16830b7c1..3f819f066 100644 --- a/docs/en-US/removing-vsphere-hosts.xml +++ b/docs/en-US/removing-vsphere-hosts.xml @@ -1,25 +1,25 @@ - %BOOK_ENTITIES; ]>
diff --git a/docs/en-US/reserved-ip-addresses-non-csvms.xml b/docs/en-US/reserved-ip-addresses-non-csvms.xml new file mode 100644 index 000000000..18ba3ca0e --- /dev/null +++ b/docs/en-US/reserved-ip-addresses-non-csvms.xml @@ -0,0 +1,163 @@ + + +%BOOK_ENTITIES; +]> + + +
+ IP Reservation in Isolated Guest Networks + In isolated guest networks, a part of the guest IP address space can be reserved for + non-&PRODUCT; VMs or physical servers. To do so, you configure a range of Reserved IP addresses + by specifying the CIDR when a guest network is in Implemented state. If your customers wish to + have non-&PRODUCT; controlled VMs or physical servers on the same network, they can share a part + of the IP address space that is primarily provided to the guest network. + In an Advanced zone, an IP address range or a CIDR is assigned to a network when the network + is defined. The &PRODUCT; virtual router acts as the DHCP server and uses CIDR for assigning IP + addresses to the guest VMs. If you decide to reserve IP ranges for non-&PRODUCT; purposes, you + can specify a part of the IP address range or the CIDR that should only be allocated by the DHCP + service of the virtual router to the guest VMs created in &PRODUCT;. The remaining IPs in that + network are called Reserved IP Range. When IP reservation is configured, the administrator can + add additional VMs or physical servers that are not part of &PRODUCT; to the same network and + assign them the Reserved IP addresses. &PRODUCT; guest VMs cannot acquire IPs from the Reserved + IP Range. +
+ IP Reservation Considerations + Consider the following before you reserve an IP range for non-&PRODUCT; machines: + + + IP Reservation can be applied only when the network is in Implemented state. + + + No IP Reservation is done by default. + + + Guest VM CIDR you specify must be a subset of the network CIDR. + + + Specify a valid Guest VM CIDR. IP Reservation is applied only if no active IPs exist + outside the Guest VM CIDR. + You cannot apply IP Reservation if any VM is alloted with an IP address that is + outside the Guest VM CIDR. + + + To reset an existing IP Reservation, apply IP reservation by specifying the value of + network CIDR in the CIDR field. + For example, the following table describes three scenarios of guest network + creation: + + + + + + + + + + Case + CIDR + Network CIDR + Reserved IP Range for Non-&PRODUCT; VMs + Description + + + + + 1 + 10.1.1.0/24 + None + None + No IP Reservation. + + + 2 + 10.1.1.0/26 + 10.1.1.0/24 + 10.1.1.64 to 10.1.1.254 + IP Reservation configured by the UpdateNetwork API with + guestvmcidr=10.1.1.0/26 or enter 10.1.1.0/26 in the CIDR field in the + UI. + + + 3 + 10.1.1.0/24 + None + None + Removing IP Reservation by the UpdateNetwork API with + guestvmcidr=10.1.1.0/24 or enter 10.1.1.0/24 in the CIDR field in the UI. + + + + + + + +
+
+ Limitations + + + The IP Reservation is not supported if active IPs that are found outside the Guest VM + CIDR. + + + Upgrading network offering which causes a change in CIDR (such as upgrading an + offering with no external devices to one with external devices) IP Reservation becomes + void if any. Reconfigure IP Reservation in the new re-implemeted network. + + +
+
+ Best Practices + Apply IP Reservation to the guest network as soon as the network state changes to + Implemented. If you apply reservation soon after the first guest VM is deployed, lesser + conflicts occurs while applying reservation. +
+
+ Reserving an IP Range + + + Log in to the &PRODUCT; UI as an administrator or end user. + + + In the left navigation, choose Network. + + + Click the name of the network you want to modify. + + + In the Details tab, click Edit. + + + + + edit-icon.png: button to edit a network + + + The CIDR field changes to editable one. + + + In CIDR, specify the Guest VM CIDR. + + + Click Apply. + Wait for the update to complete. The Network CIDR and the Reserved IP Range are + displayed on the Details page. + + +
+
diff --git a/docs/en-US/reset-ssh-key-dev.xml b/docs/en-US/reset-ssh-key-dev.xml new file mode 100644 index 000000000..1a904e566 --- /dev/null +++ b/docs/en-US/reset-ssh-key-dev.xml @@ -0,0 +1,27 @@ + + +%BOOK_ENTITIES; +]> + +
+ Resetting SSH Keys to Access VMs + Use the resetSSHKeyForVirtualMachine API to set or reset the SSH keypair assigned to a + virtual machine. With the addition of this feature, a lost or compromised SSH keypair can be + changed, and the user can access the VM by using the new keypair. Just create or register a new + keypair, then call resetSSHKeyForVirtualMachine. +
diff --git a/docs/en-US/resizing-volumes.xml b/docs/en-US/resizing-volumes.xml index 471411df5..42b584bf6 100644 --- a/docs/en-US/resizing-volumes.xml +++ b/docs/en-US/resizing-volumes.xml @@ -11,9 +11,7 @@ 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 - + 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 @@ -21,18 +19,80 @@ specific language governing permissions and limitations under the License. --> -
- Resizing Volumes - &PRODUCT; does not provide the ability to resize root disks or data disks; the disk size is fixed based on the template used to create the VM. However, the tool VHD Resizer), while not officially supported by Cloud.com or Citrix, might provide a workaround. To increase disk size with VHD Resizer: - - Get the VHD from the secondary storage. - Import it into VHD Resizer. - Resize the VHD. - Upload the new VHD. - Create a new VM. - Take a snapshot, then create a new template from that snapshot. - For more information, see How to Resize a Provisioning Server 5 Virtual Disk at the Citrix Knowledge Center - + Resizing Volumes + &PRODUCT; provides the ability to resize data disks; &PRODUCT; controls volume size by using + disk offerings. This provides &PRODUCT; administrators with the flexibility to choose how much + space they want to make available to the end users. Volumes within the disk offerings with the + same storage tag can be resized. For example, if you only want to offer 10, 50, and 100 GB + offerings, the allowed resize should stay within those limits. That implies if you define a 10 + GB, a 50 GB and a 100 GB disk offerings, a user can upgrade from 10 GB to 50 GB, or 50 GB to 100 + GB. If you create a custom-sized disk offering, then you have the option to resize the volume by + specifying a new, larger size. + Additionally, using the resizeVolume API, a data volume can be moved from a static disk + offering to a custom disk offering with the size specified. This functionality allows those who + might be billing by certain volume sizes or disk offerings to stick to that model, while + providing the flexibility to migrate to whatever custom size necessary. + This feature is supported on KVM, XenServer, and VMware hosts. However, shrinking volumes is + not supported on VMware hosts. + Before you try to resize a volume, consider the following: + + + The VMs associated with the volume are stopped. + + + The data disks associated with the volume are removed. + + + When a volume is shrunk, the disk associated with it is simply truncated, and doing so + would put its content at risk of data loss. Therefore, resize any partitions or file systems + before you shrink a data disk so that all the data is moved off from that disk. + + + To resize a volume: + + + Log in to the &PRODUCT; UI as a user or admin. + + + In the left navigation bar, click Storage. + + + In Select View, choose Volumes. + + + Select the volume name in the Volumes list, then click the Resize Volume button + + + + + resize-volume-icon.png: button to display the resize volume option. + + + + + In the Resize Volume pop-up, choose desired characteristics for the storage. + + + + + + resize-volume.png: option to resize a volume. + + + + + If you select Custom Disk, specify a custom size. + + + Click Shrink OK to confirm that you are reducing the size of a volume. + This parameter protects against inadvertent shrinking of a disk, which might lead to + the risk of data loss. You must sign off that you know what you are doing. + + + + + Click OK. + +
- diff --git a/docs/en-US/response-formats.xml b/docs/en-US/response-formats.xml index 7b3f93ac6..b21f4ab66 100644 --- a/docs/en-US/response-formats.xml +++ b/docs/en-US/response-formats.xml @@ -25,6 +25,8 @@
Response Formats: XML and JSON CloudStack supports two formats as the response to an API call. The default response is XML. If you would like the response to be in JSON, add &response=json to the Command String. + The two response formats differ in how they handle blank fields. In JSON, if there is no value for a response field, it will not appear in the response. If all the fields were empty, there might be no response at all. + In XML, even if there is no value to be returned, an empty field will be returned as a placeholder XML element. Sample XML Response: <listipaddressesresponse> diff --git a/docs/en-US/runtime-allocation-virtual-network-resources.xml b/docs/en-US/runtime-allocation-virtual-network-resources.xml index 696ea9b9d..479f06968 100644 --- a/docs/en-US/runtime-allocation-virtual-network-resources.xml +++ b/docs/en-US/runtime-allocation-virtual-network-resources.xml @@ -5,24 +5,27 @@ ]> -
Runtime Allocation of Virtual Network Resources - When you define a new virtual network, all your settings for that network are stored in &PRODUCT;. The actual network resources are activated only when the first virtual machine starts in the network. When all virtual machines have left the virtual network, the network resources are garbage collected so they can be allocated again. This helps to conserve network resources.. + When you define a new virtual network, all your settings for that network are stored in + &PRODUCT;. The actual network resources are activated only when the first virtual + machine starts in the network. When all virtual machines have left the virtual network, the + network resources are garbage collected so they can be allocated again. This helps to + conserve network resources.
diff --git a/docs/en-US/scheduled-maintenance-maintenance-mode-hosts.xml b/docs/en-US/scheduled-maintenance-maintenance-mode-hosts.xml index 6364e8b0c..6b736e4eb 100644 --- a/docs/en-US/scheduled-maintenance-maintenance-mode-hosts.xml +++ b/docs/en-US/scheduled-maintenance-maintenance-mode-hosts.xml @@ -1,28 +1,30 @@ - %BOOK_ENTITIES; ]>
Scheduled Maintenance and Maintenance Mode for Hosts You can place a host into maintenance mode. When maintenance mode is activated, the host becomes unavailable to receive new guest VMs, and the guest VMs already running on the host are seamlessly migrated to another host not in maintenance mode. This migration uses live migration technology and does not interrupt the execution of the guest. + +
diff --git a/docs/en-US/secondary-storage-vm.xml b/docs/en-US/secondary-storage-vm.xml index 792644432..34015c32a 100644 --- a/docs/en-US/secondary-storage-vm.xml +++ b/docs/en-US/secondary-storage-vm.xml @@ -5,28 +5,29 @@ ]>
- Secondary Storage VM + Secondary Storage VM In addition to the hosts, &PRODUCT;’s Secondary Storage VM mounts and writes to secondary storage. - Submissions to secondary storage go through the Secondary Storage VM. The Secondary Storage VM can retrieve templates and ISO images from URLs using a variety of protocols. - The secondary storage VM provides a background task that takes care of a variety of secondary storage activities: downloading a new template to a Zone, copying templates between Zones, and snapshot backups. - The administrator can log in to the secondary storage VM if needed. -
+ Submissions to secondary storage go through the Secondary Storage VM. The Secondary Storage VM can retrieve templates and ISO images from URLs using a variety of protocols. + The secondary storage VM provides a background task that takes care of a variety of secondary storage activities: downloading a new template to a Zone, copying templates between Zones, and snapshot backups. + The administrator can log in to the secondary storage VM if needed. + +
diff --git a/docs/en-US/secondary-storage.xml b/docs/en-US/secondary-storage.xml index a254b1e2f..4a01c27f7 100644 --- a/docs/en-US/secondary-storage.xml +++ b/docs/en-US/secondary-storage.xml @@ -1,25 +1,25 @@ - %BOOK_ENTITIES; ]>
diff --git a/docs/en-US/security-groups.xml b/docs/en-US/security-groups.xml index 00dbf5ed2..6b3665000 100644 --- a/docs/en-US/security-groups.xml +++ b/docs/en-US/security-groups.xml @@ -1,32 +1,32 @@ - %BOOK_ENTITIES; ]>
Security Groups + -
diff --git a/docs/en-US/set-up-invitations.xml b/docs/en-US/set-up-invitations.xml index e6a22dba1..c1303cf5e 100644 --- a/docs/en-US/set-up-invitations.xml +++ b/docs/en-US/set-up-invitations.xml @@ -5,69 +5,76 @@ ]> -
Setting Up Invitations &PRODUCT; can be set up either so that project administrators can add people directly to a project, or so that it is necessary to send an invitation which the recipient must accept. The invitation can be sent by email or through the user’s &PRODUCT; account. If you want administrators to use invitations to add members to projects, turn on and set up the invitations feature in &PRODUCT;. - + Log in as administrator to the &PRODUCT; UI. In the left navigation, click Global Settings. - In the search box, type project and click the search button. In the search box, type project and click the search button. searchbutton.png: Searches projects - In the search results, you will see a few other parameters you need to set to control how invitations behave. The table below shows global configuration parameters related to project invitations. Click the edit button to set each parameter + In the search results, you can see a few other parameters you need to set to control how + invitations behave. The table below shows global configuration parameters related to + project invitations. Click the edit button to set each parameter. Configuration Parameters - Description + Description project.invite.required Set to true to turn on the invitations feature. + + project.email.sender The email address to show in the From field of invitation emails. + project.invite.timeout Amount of time to allow for a new member to respond to the invitation. + project.smtp.host Name of the host that acts as an email server to handle invitations. + project.smtp.password (Optional) Password required by the SMTP server. You must also set project.smtp.username and set project.smtp.useAuth to true. + project.smtp.port SMTP server’s listening port. + project.smtp.useAuth @@ -81,7 +88,9 @@ - Restart the Management Server + Restart the Management Server: service cloud-management restart - + +
+ diff --git a/docs/en-US/set-up-network-for-users.xml b/docs/en-US/set-up-network-for-users.xml index 2b4092320..c91565a54 100644 --- a/docs/en-US/set-up-network-for-users.xml +++ b/docs/en-US/set-up-network-for-users.xml @@ -5,21 +5,21 @@ ]> diff --git a/docs/en-US/set-usage-limit.xml b/docs/en-US/set-usage-limit.xml index 3ef528a69..5e2d770c7 100644 --- a/docs/en-US/set-usage-limit.xml +++ b/docs/en-US/set-usage-limit.xml @@ -5,29 +5,25 @@ ]> -
Setting Usage Limits &PRODUCT; provides several administrator control points for capping resource usage by users. Some of these limits are global configuration parameters. Others are applied at the ROOT domain and may be overridden on a per-account basis. Aggregate limits may be set on a per-domain basis. For example, you may limit a domain and all subdomains to the creation of 100 VMs. This section covers the following topics: - Globally Configured Limits - Default Account Resource Limits - Per Domain Limits -
+
diff --git a/docs/en-US/shared-networks.xml b/docs/en-US/shared-networks.xml index d505fed97..4c3232081 100644 --- a/docs/en-US/shared-networks.xml +++ b/docs/en-US/shared-networks.xml @@ -5,26 +5,27 @@ ]> -
Shared Networks - A shared network can be accessed by virtual machines that belong to many different accounts. Network Isolation on shared networks is accomplished using techniques such as security groups (supported only in basic zones in &PRODUCT; 3.0.3). + A shared network can be accessed by virtual machines that belong to many different + accounts. Network Isolation on shared networks is accomplished using techniques such as + security groups (supported only in basic zones). Shared Networks are created by the administrator Shared Networks can be designated to a certain domain @@ -32,4 +33,6 @@ Shared Networks are isolated by security groups Public Network is a shared network that is not shown to the end users + +
diff --git a/docs/en-US/site-to-site-vpn.xml b/docs/en-US/site-to-site-vpn.xml index a102ebe1b..a5899eac4 100644 --- a/docs/en-US/site-to-site-vpn.xml +++ b/docs/en-US/site-to-site-vpn.xml @@ -55,8 +55,11 @@ Create VPN connection from the VPC VPN gateway to the customer VPN gateway. + Appropriate events are generated on the &PRODUCT; UI when status of a Site-to-Site VPN + connection changes from connected to disconnected, or vice versa. Currently no events are generated + when establishing a VPN connection fails or pending. -
\ No newline at end of file +
diff --git a/docs/en-US/source-prereqs.xml b/docs/en-US/source-prereqs.xml index 6c2bc2a3c..2e40a58c5 100644 --- a/docs/en-US/source-prereqs.xml +++ b/docs/en-US/source-prereqs.xml @@ -30,12 +30,15 @@ for package management. - The minimum bootstrapped prerequisites for building &PRODUCT; includes - the following: + You will need, at a minimum, the following to compile &PRODUCT;: - ant - maven (version 3) - Java (Java 6/OpenJDK 1.6) + Maven (version 3) + Java (OpenJDK 1.6 or Java 7/OpenJDK 1.7) + Apache Web Services Common Utilities (ws-commons-util) + MySQL + MySQLdb (provides Python database API) + Tomcat 6 (not 6.0.35) + genisoimage rpmbuild or dpkg-dev diff --git a/docs/en-US/source.xml b/docs/en-US/source.xml index 3cb4af232..5d911c230 100644 --- a/docs/en-US/source.xml +++ b/docs/en-US/source.xml @@ -24,20 +24,10 @@ Building from Source - The official &PRODUCT; release is always in source code form. While there may - exist convenience binaries in various forms from a number of places, the - source is the canonical release will be source. In this document we'll cover - acquiring the source release, building that into binary, deployable packages. - - - While building and deploying directly from source is certainly possible, the reality - of Infrastructure-as-a-Service cloud computing implies a need to deploy packages on - a potentially large number of systems, which RPMs and DEBs fill nicely. - - - Building and deploying directly from source is thus outside the scope of this - document, but is documented in the INSTALL.md file in the release. - + The official &PRODUCT; release is always in source code form. You will likely be able to find "convenience binaries," the source is the canonical release. In this section, we'll cover acquiring the source release and building that so that you can deploy it using Maven or create Debian packages or RPMs. + Note that building and deploying directly from source is typically not the most efficient way to deploy an IaaS. However, we will cover that method as well as building RPMs or Debian packages for deploying &PRODUCT;. + The instructions here are likely version-specific. That is, the method for building from source for the 4.0.x series is different from the 4.1.x series. + If you are working with a unreleased version of &PRODUCT;, see the INSTALL.md file in the top-level directory of the release. diff --git a/docs/en-US/standard-events.xml b/docs/en-US/standard-events.xml index b4a4c68a6..9c10f8730 100644 --- a/docs/en-US/standard-events.xml +++ b/docs/en-US/standard-events.xml @@ -5,23 +5,22 @@ ]> -
Standard Events The events log records three types of standard events. @@ -36,4 +35,6 @@ ERROR. This event is generated when an operation has not been successfully performed -
+ +
+ diff --git a/docs/en-US/static-nat.xml b/docs/en-US/static-nat.xml index ef9e2fc91..4225d6eec 100644 --- a/docs/en-US/static-nat.xml +++ b/docs/en-US/static-nat.xml @@ -5,24 +5,24 @@ ]> -
Static NAT - A static NAT rule maps a public IP address to the private IP address of a VM in order to allow Internet traffic into the VM. The public IP address always remains the same, which is why it is called "static" NAT. This section tells how to enable or disable static NAT for a particular IP address. + A static NAT rule maps a public IP address to the private IP address of a VM in order to allow Internet traffic into the VM. The public IP address always remains the same, which is why it is called “static†NAT. This section tells how to enable or disable static NAT for a particular IP address. +
diff --git a/docs/en-US/sticky-session-policies-for-lb-rules.xml b/docs/en-US/sticky-session-policies-for-lb-rules.xml index a8acfa087..09780855f 100644 --- a/docs/en-US/sticky-session-policies-for-lb-rules.xml +++ b/docs/en-US/sticky-session-policies-for-lb-rules.xml @@ -21,10 +21,21 @@ specific language governing permissions and limitations under the License. --> -
- Sticky Session Policies for Load Balancer Rules - Sticky sessions are used in Web-based applications to ensure continued availability of information across the multiple requests in a user's session. For example, if a shopper is filling a cart, you need to remember what has been purchased so far. The concept of "stickiness" is also referred to as persistence or maintaining state. - Any load balancer rule defined in &PRODUCT; can have a stickiness policy. The policy consists of a name, stickiness method, and parameters. The parameters are name-value pairs or flags, which are defined by the load balancer vendor. The stickiness method could be load balancer-generated cookie, application-generated cookie, or source-based. In the source-based method, the source IP address is used to identify the user and locate the user’s stored data. In the other methods, cookies are used. The cookie generated by the load balancer or application is included in request and response URLs to create persistence. The cookie name can be specified by the administrator or automatically generated. A variety of options are provided to control the exact behavior of cookies, such as how they are generated and whether they are cached. - For the most up to date list of available stickiness methods, see the &PRODUCT; UI or call listNetworks and check the SupportedStickinessMethods capability. + Sticky Session Policies for Load Balancer Rules + Sticky sessions are used in Web-based applications to ensure continued availability of + information across the multiple requests in a user's session. For example, if a shopper is + filling a cart, you need to remember what has been purchased so far. The concept of "stickiness" + is also referred to as persistence or maintaining state. + Any load balancer rule defined in &PRODUCT; can have a stickiness policy. The policy + consists of a name, stickiness method, and parameters. The parameters are name-value pairs or + flags, which are defined by the load balancer vendor. The stickiness method could be load + balancer-generated cookie, application-generated cookie, or source-based. In the source-based + method, the source IP address is used to identify the user and locate the user’s stored data. In + the other methods, cookies are used. The cookie generated by the load balancer or application is + included in request and response URLs to create persistence. The cookie name can be specified by + the administrator or automatically generated. A variety of options are provided to control the + exact behavior of cookies, such as how they are generated and whether they are cached. + For the most up to date list of available stickiness methods, see the &PRODUCT; UI or call + listNetworks and check the SupportedStickinessMethods capability.
diff --git a/docs/en-US/stop-restart-management-server.xml b/docs/en-US/stop-restart-management-server.xml index 2edc23332..5c1bcecbc 100644 --- a/docs/en-US/stop-restart-management-server.xml +++ b/docs/en-US/stop-restart-management-server.xml @@ -5,27 +5,26 @@ ]> -
Stopping and Restarting the Management Server The root administrator will need to stop and restart the Management Server from time to time. - For example, after changing a global configuration parameter, a restart is required. If you have multiple Management Server nodes, restart all of them to put the new parameter value into effect consistently throughout the cloud. + For example, after changing a global configuration parameter, a restart is required. If you have multiple Management Server nodes, restart all of them to put the new parameter value into effect consistently throughout the cloud.. To stop the Management Server, issue the following command at the operating system prompt on the Management Server node: # service cloud-management stop To start the Management Server: diff --git a/docs/en-US/stopping-and-starting-vms.xml b/docs/en-US/stopping-and-starting-vms.xml index 8b294af0b..1c8bd8083 100644 --- a/docs/en-US/stopping-and-starting-vms.xml +++ b/docs/en-US/stopping-and-starting-vms.xml @@ -1,5 +1,5 @@ - %BOOK_ENTITIES; ]> @@ -23,6 +23,7 @@ -->
- Stopping and Starting VMs - Any user can access their own virtual machines. The administrator can access all VMs running in the cloud. + Stopping and Starting VMs + Once a VM instance is created, you can stop, restart, or delete it as needed. In the &PRODUCT; UI, click Instances, select the VM, and use the Stop, Start, Reboot, and Destroy links.
+ diff --git a/docs/en-US/storage.xml b/docs/en-US/storage.xml index 86d3f53e7..580fe59e1 100644 --- a/docs/en-US/storage.xml +++ b/docs/en-US/storage.xml @@ -5,28 +5,28 @@ ]> - Working With Storage - - - - - + Working With Storage + + + + + diff --git a/docs/en-US/sys-reliability-and-ha.xml b/docs/en-US/sys-reliability-and-ha.xml index 5c544af0e..e3c1cd902 100644 --- a/docs/en-US/sys-reliability-and-ha.xml +++ b/docs/en-US/sys-reliability-and-ha.xml @@ -1,32 +1,34 @@ - %BOOK_ENTITIES; ]> - System Reliability and High Availability - - - - - - \ No newline at end of file + System Reliability and High Availability + + + + + + + + diff --git a/docs/en-US/sysprep-for-windows-server-2003R2.xml b/docs/en-US/sysprep-for-windows-server-2003R2.xml index 86e1667a1..5f8a38907 100644 --- a/docs/en-US/sysprep-for-windows-server-2003R2.xml +++ b/docs/en-US/sysprep-for-windows-server-2003R2.xml @@ -5,53 +5,53 @@ ]> -
- Sysprep for Windows Server 2003 R2 - Earlier versions of Windows have a different sysprep tool. Follow these steps for Windows Server 2003 R2. - - Extract the content of \support\tools\deploy.cab on the Windows installation CD into a directory called c:\sysprep on the Windows 2003 R2 VM. - Run c:\sysprep\setupmgr.exe to create the sysprep.inf file. - - Select Create New to create a new Answer File. - Enter “Sysprep setup†for the Type of Setup. - Select the appropriate OS version and edition. - On the License Agreement screen, select “Yes fully automate the installationâ€. - Provide your name and organization. - Leave display settings at default. - Set the appropriate time zone. - Provide your product key. - Select an appropriate license mode for your deployment - Select “Automatically generate computer nameâ€. - Type a default administrator password. If you enable the password reset feature, the users will not actually use this password. This password will be reset by the instance manager after the guest boots up. - Leave Network Components at “Typical Settingsâ€. - Select the “WORKGROUP†option. - Leave Telephony options at default. - Select appropriate Regional Settings. - Select appropriate language settings. - Do not install printers. - Do not specify “Run Once commandsâ€. - You need not specify an identification string. - Save the Answer File as c:\sysprep\sysprep.inf. - - - Run the following command to sysprep the image:c:\sysprep\sysprep.exe -reseal -mini -activated - After this step the machine will automatically shut down - -
+ System Preparation for Windows Server 2003 R2 + Earlier versions of Windows have a different sysprep tool. Follow these steps for Windows Server 2003 R2. + + Extract the content of \support\tools\deploy.cab on the Windows installation CD into a directory called c:\sysprep on the Windows 2003 R2 VM. + Run c:\sysprep\setupmgr.exe to create the sysprep.inf file. + + Select Create New to create a new Answer File. + Enter “Sysprep setup†for the Type of Setup. + Select the appropriate OS version and edition. + On the License Agreement screen, select “Yes fully automate the installationâ€. + Provide your name and organization. + Leave display settings at default. + Set the appropriate time zone. + Provide your product key. + Select an appropriate license mode for your deployment + Select “Automatically generate computer nameâ€. + Type a default administrator password. If you enable the password reset feature, the users will not actually use this password. This password will be reset by the instance manager after the guest boots up. + Leave Network Components at “Typical Settingsâ€. + Select the “WORKGROUP†option. + Leave Telephony options at default. + Select appropriate Regional Settings. + Select appropriate language settings. + Do not install printers. + Do not specify “Run Once commandsâ€. + You need not specify an identification string. + Save the Answer File as c:\sysprep\sysprep.inf. + + + + Run the following command to sysprep the image:c:\sysprep\sysprep.exe -reseal -mini -activated + After this step the machine will automatically shut down + +
diff --git a/docs/en-US/sysprep-windows-server-2008R2.xml b/docs/en-US/sysprep-windows-server-2008R2.xml index af36d15a2..49e7477c6 100644 --- a/docs/en-US/sysprep-windows-server-2008R2.xml +++ b/docs/en-US/sysprep-windows-server-2008R2.xml @@ -5,34 +5,35 @@ ]> -
- System Preparation for Windows Server 2008 R2 - For Windows 2008 R2, you run Windows System Image Manager to create a custom sysprep response XML file. Windows System Image Manager is installed as part of the Windows Automated Installation Kit (AIK). Windows AIK can be downloaded from the Microsoft Download Center at the following location: - Microsoft Download Center. - Use the following steps to run sysprep for Windows 2008 R2:The steps outlined here are derived from the excellent guide by Charity Shelbourne, originally published at Windows Server 2008 Sysprep Mini-Setup + System Preparation for Windows Server 2008 R2 + For Windows 2008 R2, you run Windows System Image Manager to create a custom sysprep response XML file. Windows System Image Manager is installed as part of the Windows Automated Installation Kit (AIK). Windows AIK can be downloaded from Microsoft Download Center. + Use the following steps to run sysprep for Windows 2008 R2:The steps outlined here are derived from the excellent guide by Charity Shelbourne, originally published at Windows Server 2008 Sysprep Mini-Setup. + + Download and install the Windows AIKWindows AIK should not be installed on the Windows 2008 R2 VM you just created. Windows AIK should not be part of the template you create. It is only used to create the sysprep answer file. Copy the install.wim file in the \sources directory of the Windows 2008 R2 installation DVD to the hard disk. This is a very large file and may take a long time to copy. Windows AIK requires the WIM file to be writable. Start the Windows System Image Manager, which is part of the Windows AIK. - In the Windows Image pane, right click “Select a Windows image or catalog file†to load the install.wim file you just copied. - Select the Windows 2008 R2 EditionYou may be prompted with a warning that the catalog file cannot be opened. Click Yes to create a new catalog file. + In the Windows Image pane, right click the Select a Windows image or catalog file option to + load the install.wim file you just copied. + Select the Windows 2008 R2 Edition.You may be prompted with a warning that the catalog file cannot be opened. Click Yes to create a new catalog file. In the Answer File pane, right click to create a new answer file. Generate the answer file from the Windows System Image Manager using the following steps: @@ -63,5 +64,8 @@ cd c:\Windows\System32\sysprep sysprep.exe /oobe /generalize /shutdown The Windows 2008 R2 VM will automatically shut down after sysprep is complete. + + +
diff --git a/docs/en-US/system-reserved-ip-addresses.xml b/docs/en-US/system-reserved-ip-addresses.xml index 1270378d3..7ae9fa8df 100644 --- a/docs/en-US/system-reserved-ip-addresses.xml +++ b/docs/en-US/system-reserved-ip-addresses.xml @@ -5,23 +5,22 @@ ]> -
System Reserved IP Addresses In each zone, you need to configure a range of reserved IP addresses for the management network. This network carries communication between the &PRODUCT; Management Server and various system VMs, such as Secondary Storage VMs, Console Proxy VMs, and DHCP. diff --git a/docs/en-US/time-zones.xml b/docs/en-US/time-zones.xml index aa8eefb7c..6b3b64ed8 100644 --- a/docs/en-US/time-zones.xml +++ b/docs/en-US/time-zones.xml @@ -1,137 +1,137 @@ - %BOOK_ENTITIES; ]> - Time Zones + Time Zones The following time zone identifiers are accepted by &PRODUCT;. There are several places that have a time zone as a required or optional parameter. These include scheduling recurring snapshots, creating a user, and specifying the usage time zone in the Configuration table. - - - - - - - - Etc/GMT+12 - Etc/GMT+11 - Pacific/Samoa - - - Pacific/Honolulu - US/Alaska - America/Los_Angeles - - - Mexico/BajaNorte - US/Arizona - US/Mountain - - - America/Chihuahua - America/Chicago - America/Costa_Rica - - - America/Mexico_City - Canada/Saskatchewan - America/Bogota - - - America/New_York - America/Caracas - America/Asuncion - - - America/Cuiaba - America/Halifax - America/La_Paz - - - America/Santiago - America/St_Johns - America/Araguaina - - - America/Argentina/Buenos_Aires - America/Cayenne - America/Godthab - - - America/Montevideo - Etc/GMT+2 - Atlantic/Azores - - - Atlantic/Cape_Verde - Africa/Casablanca - Etc/UTC - - - Atlantic/Reykjavik - Europe/London - CET - - - Europe/Bucharest - Africa/Johannesburg - Asia/Beirut - - - Africa/Cairo - Asia/Jerusalem - Europe/Minsk - - - Europe/Moscow - Africa/Nairobi - Asia/Karachi - - - Asia/Kolkata - Asia/Bangkok - Asia/Shanghai - - - Asia/Kuala_Lumpur - Australia/Perth - Asia/Taipei - - - Asia/Tokyo - Asia/Seoul - Australia/Adelaide - - - Australia/Darwin - Australia/Brisbane - Australia/Canberra - - - Pacific/Guam - Pacific/Auckland - - - - - + + + + + + + + Etc/GMT+12 + Etc/GMT+11 + Pacific/Samoa + + + Pacific/Honolulu + US/Alaska + America/Los_Angeles + + + Mexico/BajaNorte + US/Arizona + US/Mountain + + + America/Chihuahua + America/Chicago + America/Costa_Rica + + + America/Mexico_City + Canada/Saskatchewan + America/Bogota + + + America/New_York + America/Caracas + America/Asuncion + + + America/Cuiaba + America/Halifax + America/La_Paz + + + America/Santiago + America/St_Johns + America/Araguaina + + + America/Argentina/Buenos_Aires + America/Cayenne + America/Godthab + + + America/Montevideo + Etc/GMT+2 + Atlantic/Azores + + + Atlantic/Cape_Verde + Africa/Casablanca + Etc/UTC + + + Atlantic/Reykjavik + Europe/London + CET + + + Europe/Bucharest + Africa/Johannesburg + Asia/Beirut + + + Africa/Cairo + Asia/Jerusalem + Europe/Minsk + + + Europe/Moscow + Africa/Nairobi + Asia/Karachi + + + Asia/Kolkata + Asia/Bangkok + Asia/Shanghai + + + Asia/Kuala_Lumpur + Australia/Perth + Asia/Taipei + + + Asia/Tokyo + Asia/Seoul + Australia/Adelaide + + + Australia/Darwin + Australia/Brisbane + Australia/Canberra + + + Pacific/Guam + Pacific/Auckland + + + + + diff --git a/docs/en-US/tools.xml b/docs/en-US/tools.xml index 66fe894e1..db6a510d5 100644 --- a/docs/en-US/tools.xml +++ b/docs/en-US/tools.xml @@ -26,4 +26,5 @@ Tools + diff --git a/docs/en-US/topology-req.xml b/docs/en-US/topology-req.xml index 65c9c2ea5..75fe69b41 100644 --- a/docs/en-US/topology-req.xml +++ b/docs/en-US/topology-req.xml @@ -28,4 +28,5 @@ -
+ + diff --git a/docs/en-US/translating-documentation.xml b/docs/en-US/translating-documentation.xml new file mode 100644 index 000000000..4d5e3d21b --- /dev/null +++ b/docs/en-US/translating-documentation.xml @@ -0,0 +1,38 @@ + + +%BOOK_ENTITIES; +]> + + + +
+ Translating &PRODUCT; Documentation + + There are two ways to translate the documentation: + + + Directly using the Transifex website and using their user interface. + Using the Transifex client and pushing your translated strings to the website. + + + Once a translation is complete, a site admin will pull the translated strings within the &PRODUCT; repository, build the documentation and publish it. + For instructions on how to use the Transifex website see http://sebgoa.blogspot.ch/2012/11/translating-apache-cloudstack-docs-with.html + For instructions on how to use the Transifex client to translate from the command line see http://sebgoa.blogspot.ch/2012/12/using-transifex-client-to-translate.html +
diff --git a/docs/en-US/troubleshooting.xml b/docs/en-US/troubleshooting.xml index 24ecab548..570d02e43 100644 --- a/docs/en-US/troubleshooting.xml +++ b/docs/en-US/troubleshooting.xml @@ -5,31 +5,31 @@ ]> - Troubleshooting - - + Troubleshooting + + - - - + + + diff --git a/docs/en-US/tuning.xml b/docs/en-US/tuning.xml index 18d83ee40..4f9dd0154 100644 --- a/docs/en-US/tuning.xml +++ b/docs/en-US/tuning.xml @@ -1,25 +1,25 @@ - %BOOK_ENTITIES; ]> @@ -30,4 +30,4 @@ - \ No newline at end of file + diff --git a/docs/en-US/upgrade-virtual-router-with-service-offering.xml b/docs/en-US/upgrade-virtual-router-with-service-offering.xml index 8291c3af4..dad1d906c 100644 --- a/docs/en-US/upgrade-virtual-router-with-service-offering.xml +++ b/docs/en-US/upgrade-virtual-router-with-service-offering.xml @@ -27,7 +27,10 @@ When &PRODUCT; creates a virtual router, it uses default settings which are defined in a default system service offering. See . All the virtual routers in a single guest network use the same system service offering. You can upgrade the capabilities of the virtual router by creating and applying a custom system service offering. Define your custom system service offering. See . In System VM Type, choose Domain Router. - Associate the system service offering with a network offering. See + Associate the system service offering with a network offering. + See "Creating Network Offerings" in the Administrator's Guide. + See . + Apply the network offering to the network where you want the virtual routers to use the new system service offering. If this is a new network, follow the steps in Adding an Additional Guest Network on page 66. To change the service offering for existing virtual routers, follow the steps in . diff --git a/docs/en-US/upload-existing-volume-to-vm.xml b/docs/en-US/upload-existing-volume-to-vm.xml index 86dc8e547..d2b657164 100644 --- a/docs/en-US/upload-existing-volume-to-vm.xml +++ b/docs/en-US/upload-existing-volume-to-vm.xml @@ -29,7 +29,7 @@ You cannot upload a volume if the preconfigured volume limit has already been reached. The default limit for the cloud is set in the global configuration parameter max.account.volumes, but administrators can also set per-domain limits that are different from the global default. See Setting Usage Limits To upload a volume: - (Optional) Create an MD5 hash (checksum) of the disk image file that you are going to upload. After uploading the data disk, &PRODUCT; will use this value to verify that no data corruption has occurred. + (Optional) Create an MD5 hash (checksum) of the disk image file that you are going to upload. After uploading the data disk, &PRODUCT; will use this value to verify that no data corruption has occurred. Log in to the &PRODUCT; UI as an administrator or user In the left navigation bar, click Storage. Click Upload Volume. @@ -68,9 +68,9 @@
URL. The secure HTTP or HTTPS URL that &PRODUCT; can use to access your disk. The type of file at the URL must match the value chosen in Format. For example, if Format is VHD, the URL might look like the following: http://yourFileServerIP/userdata/myDataDisk.vhd - MD5 checksum. (Optional) Use the hash that you created in step 1. + MD5 checksum. (Optional) Use the hash that you created in step .
- Wait until the status of the volume shows that the upload is complete. Click Instances - Volumes, find the name you specified in step 5, and make sure the status is Uploaded. + Wait until the status of the volume shows that the upload is complete. Click Instances - Volumes, find the name you specified in step , and make sure the status is Uploaded.
diff --git a/docs/en-US/upload-template.xml b/docs/en-US/upload-template.xml index 40b64bbe8..f270c899a 100644 --- a/docs/en-US/upload-template.xml +++ b/docs/en-US/upload-template.xml @@ -5,49 +5,63 @@ ]> -
- Uploading Templates + Uploading Templates vSphere Templates and ISOsIf you are uploading a template that was created using vSphere Client, be sure the OVA file does not contain an ISO. If it does, the deployment of VMs from the template will fail. - Templates are uploaded based on a URL. HTTP is the supported access protocol. Templates are frequently large files. You can optionally gzip them to decrease upload times. - To upload a template: - - In the left navigation bar, click Templates. - Click Create Template. - Provide the following: - - Name and Display Text. These will be shown in the UI, so choose something descriptive. - URL. The Management Server will download the file from the specified URL, such as http://my.web.server/filename.vhd.gz. - Zone. Choose the zone where you want the template to be available, or All Zones to make it available throughout &PRODUCT;. - OS Type: This helps &PRODUCT; and the hypervisor perform certain operations and make assumptions that improve the performance of the guest. Select one of the following: - - If the operating system of the stopped VM is listed, choose it. - If the OS type of the stopped VM is not listed, choose Other. + Templates are uploaded based on a URL. HTTP is the supported access protocol. Templates are frequently large files. You can optionally gzip them to decrease upload times. + To upload a template: + + In the left navigation bar, click Templates. + Click Register Template. + Provide the following: + + Name and Description. These will be shown in the UI, so + choose something descriptive. + URL. The Management Server will download the file from the + specified URL, such as http://my.web.server/filename.vhd.gz. + Zone. Choose the zone where you want the template to be + available, or All Zones to make it available throughout + &PRODUCT;. + OS Type: This helps &PRODUCT; and the hypervisor perform + certain operations and make assumptions that improve the performance of the + guest. Select one of the following: + + If the operating system of the stopped VM is listed, choose it. + If the OS type of the stopped VM is not listed, choose Other. You should not choose an older version of the OS than the version in the image. For example, choosing CentOS 5.4 to support a CentOS 6.2 image will in general not work. In those cases you should choose Other. - - - Hypervisor - Format. The format of the template upload file, such as VHD or OVA. - Password Enabled. Choose Yes if your template has the &PRODUCT; password change script installed. See Adding Password Management to Your Templates - Extractable. Choose Yes if the template is available for extraction. If this option is selected, end users can download a full image of a template. - Public. Choose Yes to make this template accessible to all users of this &PRODUCT; installation. The template will appear in the Community Templates list. See - Featured. Choose Yes if you would like this template to be more prominent for users to select. The template will appear in the Featured Templates list. Only an administrator can make a template Featured. - - + + + Hypervisor: The supported hypervisors are listed. Select the desired one. + Format. The format of the template upload file, such as VHD + or OVA. + Password Enabled. Choose Yes if your template has the + &PRODUCT; password change script installed. See Adding Password + Management to Your Templates + Extractable. Choose Yes if the template is available for extraction. If this option is selected, end users can + download a full image of a template. + Public. Choose Yes to make this template accessible to all + users of this &PRODUCT; installation. The template will appear in the + Community Templates list. See . + Featured. Choose Yes if you would like this template to be + more prominent for users to select. The template will appear in the Featured + Templates list. Only an administrator can make a template Featured. + + +
diff --git a/docs/en-US/using-multiple-guest-networks.xml b/docs/en-US/using-multiple-guest-networks.xml index 9076a8166..4e7da1e18 100644 --- a/docs/en-US/using-multiple-guest-networks.xml +++ b/docs/en-US/using-multiple-guest-networks.xml @@ -5,28 +5,27 @@ ]> -
- Using Multiple Guest Networks - In zones that use advanced networking, additional networks for guest traffic may be added at any time after the initial installation. You can also customize the domain name associated with the network by specifying a DNS suffix for each network. - A VM's networks are defined at VM creation time. A VM cannot add or remove networks after it has been created, although the user can go into the guest and remove the IP address from the NIC on a particular network. - Each VM has just one default network. The virtual router's DHCP reply will set the guest's default gateway as that for the default network. Multiple non-default networks may be added to a guest in addition to the single, required default network. The administrator can control which networks are available as the default network. + Using Multiple Guest Networks + In zones that use advanced networking, additional networks for guest traffic may be added at any time after the initial installation. You can also customize the domain name associated with the network by specifying a DNS suffix for each network. + A VM's networks are defined at VM creation time. A VM cannot add or remove networks after it has been created, although the user can go into the guest and remove the IP address from the NIC on a particular network. + Each VM has just one default network. The virtual router's DHCP reply will set the guest's default gateway as that for the default network. Multiple non-default networks may be added to a guest in addition to the single, required default network. The administrator can control which networks are available as the default network. Additional networks can either be available to all accounts or be assigned to a specific account. Networks that are available to all accounts are zone-wide. Any user with access to the zone can create a VM with access to that network. These zone-wide networks provide little or no isolation between guests.Networks that are assigned to a specific account provide strong isolation. diff --git a/docs/en-US/using-sshkeys.xml b/docs/en-US/using-sshkeys.xml index cd10d6847..f34dfa0c1 100644 --- a/docs/en-US/using-sshkeys.xml +++ b/docs/en-US/using-sshkeys.xml @@ -92,7 +92,7 @@ KfEEuzcCUIxtJYTahJ1pvlFkQ8anpuxjSEDp8x/18bq3 After you save the SSH keypair file, you must create an instance by using the template that you created at . Ensure that you use the same SSH key name that you created at . You cannot create the instance by using the GUI at this time and associate the instance with the newly created SSH keypair. A sample curl command to create a new instance is: - curl --globoff http://localhost:<port numbet>/?command=deployVirtualMachine\&zoneId=1\&serviceOfferingId=18727021-7556-4110-9322-d625b52e0813\&templateId=e899c18a-ce13-4bbf-98a9-625c5026e0b5\&securitygroupids=ff03f02f-9e3b-48f8-834d-91b822da40c5\&account=admin\&domainid=1\&keypair=keypair-doc + curl --globoff http://localhost:<port number>/?command=deployVirtualMachine\&zoneId=1\&serviceOfferingId=18727021-7556-4110-9322-d625b52e0813\&templateId=e899c18a-ce13-4bbf-98a9-625c5026e0b5\&securitygroupids=ff03f02f-9e3b-48f8-834d-91b822da40c5\&account=admin\&domainid=1\&keypair=keypair-doc Substitute the template, service offering and security group IDs (if you are using the security group feature) that are in your cloud environment.
diff --git a/docs/en-US/using-vpn-with-mac.xml b/docs/en-US/using-vpn-with-mac.xml index 718ebc777..a41dcab5e 100644 --- a/docs/en-US/using-vpn-with-mac.xml +++ b/docs/en-US/using-vpn-with-mac.xml @@ -24,5 +24,18 @@
Using VPN with Mac OS X - In Mac OS X, in Network Preferences - Advanced, make sure Send all traffic over VPN connection is not checked. + First, be sure you've configured the VPN settings in your &PRODUCT; install. This section is only concerned with connecting via Mac OS X to your VPN. + Note, these instructions were written on Mac OS X 10.7.5. They may differ slightly in older or newer releases of Mac OS X. + + On your Mac, open System Preferences and click Network. + Make sure Send all traffic over VPN connection is not checked. + If your preferences are locked, you'll need to click the lock in the bottom left-hand corner to make any changes and provide your administrator credentials. + You will need to create a new network entry. Click the plus icon on the bottom left-hand side and you'll see a dialog that says "Select the interface and enter a name for the new service." Select VPN from the Interface drop-down menu, and "L2TP over IPSec" for the VPN Type. Enter whatever you like within the "Service Name" field. + You'll now have a new network interface with the name of whatever you put in the "Service Name" field. For the purposes of this example, we'll assume you've named it "CloudStack." Click on that interface and provide the IP address of the interface for your VPN under the Server Address field, and the user name for your VPN under Account Name. + Click Authentication Settings, and add the user's password under User Authentication and enter the pre-shared IPSec key in the Shared Secret field under Machine Authentication. Click OK. + You may also want to click the "Show VPN status in menu bar" but that's entirely optional. + Now click "Connect" and you will be connected to the CloudStack VPN. + + +
diff --git a/docs/en-US/using-vpn-with-windows.xml b/docs/en-US/using-vpn-with-windows.xml index e0e15692d..c5d95ddd3 100644 --- a/docs/en-US/using-vpn-with-windows.xml +++ b/docs/en-US/using-vpn-with-windows.xml @@ -26,17 +26,17 @@ Using VPN with Windows The procedure to use VPN varies by Windows version. Generally, the user must edit the VPN properties and make sure that the default route is not the VPN. The following steps are for Windows L2TP clients on Windows Vista. The commands should be similar for other Windows versions. - Log in to the &PRODUCT; UI and click on the source NAT IP for the account. The VPN tab should display the IPsec preshared key. Make a note of this and the source NAT IP. The UI also lists one or more users and their passwords. Choose one of these users, or, if none exists, add a user and password. + Log in to the &PRODUCT; UI and click on the source NAT IP for the account. The VPN tab should display the IPsec preshared key. Make a note of this and the source NAT IP. The UI also lists one or more users and their passwords. Choose one of these users, or, if none exists, add a user and password. On the Windows box, go to Control Panel, then select Network and Sharing center. Click Setup a connection or network. In the next dialog, select No, create a new connection. In the next dialog, select Use my Internet Connection (VPN). - In the next dialog, enter the source NAT IP from step 1 and give the connection a name. Check Don't connect now. - In the next dialog, enter the user name and password selected in step 1. + In the next dialog, enter the source NAT IP from step and give the connection a name. Check Don't connect now. + In the next dialog, enter the user name and password selected in step . Click Create. Go back to the Control Panel and click Network Connections to see the new connection. The connection is not active yet. Right-click the new connection and select Properties. In the Properties dialog, select the Networking tab. - In Type of VPN, choose L2TP IPsec VPN, then click IPsec settings. Select Use preshared key. Enter the preshared key from Step 1. + In Type of VPN, choose L2TP IPsec VPN, then click IPsec settings. Select Use preshared key. Enter the preshared key from step . The connection is ready for activation. Go back to Control Panel -> Network Connections and double-click the created connection. - Enter the user name and password from Step 1. + Enter the user name and password from step .
diff --git a/docs/en-US/vcenter-maintenance-mode.xml b/docs/en-US/vcenter-maintenance-mode.xml index fb896b2b1..d36dd7cdb 100644 --- a/docs/en-US/vcenter-maintenance-mode.xml +++ b/docs/en-US/vcenter-maintenance-mode.xml @@ -5,23 +5,22 @@ ]> -
vCenter and Maintenance Mode To enter maintenance mode on a vCenter host, both vCenter and &PRODUCT; must be used in concert. &PRODUCT; and vCenter have separate maintenance modes that work closely together. @@ -36,6 +35,7 @@ This makes the host ready for &PRODUCT; to reactivate it. Then use &PRODUCT;'s administrator UI to cancel the &PRODUCT; maintenance mode When the host comes back online, the VMs that were migrated off of it may be migrated back to it manually and new VMs can be added. - + +
diff --git a/docs/en-US/verifying-source.xml b/docs/en-US/verifying-source.xml index f8bd10237..b20b9bbac 100644 --- a/docs/en-US/verifying-source.xml +++ b/docs/en-US/verifying-source.xml @@ -32,11 +32,11 @@ Getting the KEYS To enable you to verify the GPG signature, you will need to download the - KEYS + KEYS file. - You next need to import those keys, which you can do by running the following command: + You next need to import those keys, which you can do by running: # gpg --import KEYS diff --git a/docs/en-US/virtual-machines.xml b/docs/en-US/virtual-machines.xml index 7c74932b6..20018da8d 100644 --- a/docs/en-US/virtual-machines.xml +++ b/docs/en-US/virtual-machines.xml @@ -26,6 +26,7 @@ + diff --git a/docs/en-US/virtual-router.xml b/docs/en-US/virtual-router.xml index 775d4740a..c9b403b1e 100644 --- a/docs/en-US/virtual-router.xml +++ b/docs/en-US/virtual-router.xml @@ -5,25 +5,28 @@ ]>
Virtual Router The virtual router is a type of System Virtual Machine. The virtual router is one of the most frequently used service providers in &PRODUCT;. The end user has no direct access to the virtual router. Users can ping the virtual router and take actions that affect it (such as setting up port forwarding), but users do not have SSH access into the virtual router. - There is no mechanism for the administrator to log in to the virtual router. Virtual routers can be restarted by administrators, but this will interrupt public network access and other services for end users. A basic test in debugging networking issues is to attempt to ping the virtual router from a guest VM. Some of the characteristics of the virtual router are determined by its associated system service offering. + There is no mechanism for the administrator to log in to the virtual router. Virtual routers can be restarted by administrators, but this will interrupt public network access and other services for end users. A basic test in debugging networking issues is to attempt to ping the virtual router from a guest VM. Some of the characteristics of the virtual router are determined by its associated system service offering.. + + +
diff --git a/docs/en-US/vlan-provisioning.xml b/docs/en-US/vlan-provisioning.xml index 8abd5da0a..9345647d4 100644 --- a/docs/en-US/vlan-provisioning.xml +++ b/docs/en-US/vlan-provisioning.xml @@ -21,10 +21,23 @@ specific language governing permissions and limitations under the License. --> -
- VLAN Provisioning - &PRODUCT; automatically creates and destroys interfaces bridged to VLANs on the hosts. In general the administrator does not need to manage this process. - &PRODUCT; manages VLANs differently based on hypervisor type. For XenServer or KVM, the VLANs are created on only the hosts where they will be used and then they are destroyed when all guests that require them have been terminated or moved to another host. - For vSphere the VLANs are provisioned on all hosts in the cluster even if there is no guest running on a particular Host that requires the VLAN. This allows the administrator to perform live migration and other functions in vCenter without having to create the VLAN on the destination Host. Additionally, the VLANs are not removed from the Hosts when they are no longer needed. + VLAN Provisioning + &PRODUCT; automatically creates and destroys interfaces bridged to VLANs on the hosts. In + general the administrator does not need to manage this process. + &PRODUCT; manages VLANs differently based on hypervisor type. For XenServer or KVM, the + VLANs are created on only the hosts where they will be used and then they are destroyed when all + guests that require them have been terminated or moved to another host. + For vSphere the VLANs are provisioned on all hosts in the cluster even if there is no guest + running on a particular Host that requires the VLAN. This allows the administrator to perform + live migration and other functions in vCenter without having to create the VLAN on the + destination Host. Additionally, the VLANs are not removed from the Hosts when they are no longer + needed. + You can use the same VLANs on different physical networks provided that each physical + network has its own underlying layer-2 infrastructure, such as switches. For example, you can + specify VLAN range 500 to 1000 while deploying physical networks A and B in an Advanced zone + setup. This capability allows you to set up an additional layer-2 physical infrastructure on a + different physical NIC and use the same set of VLANs if you run out of VLANs. Another advantage + is that you can use the same set of IPs for different customers, each one with their own routers + and the guest networks on different physical NICs.
diff --git a/docs/en-US/vm-lifecycle.xml b/docs/en-US/vm-lifecycle.xml index ce09b0d04..15d9f7df5 100644 --- a/docs/en-US/vm-lifecycle.xml +++ b/docs/en-US/vm-lifecycle.xml @@ -5,38 +5,39 @@ ]>
- VM Lifecycle - Virtual machines can be in the following states: - - - - + VM Lifecycle + Virtual machines can be in the following states: + + + + basic-deployment.png: Basic two-machine &PRODUCT; deployment - - Once a virtual machine is destroyed, it cannot be recovered. All the resources used by the virtual machine will be reclaimed by the system. This includes the virtual machine’s IP address. - A stop will attempt to gracefully shut down the operating system, which typically involves terminating all the running applications. If the operation system cannot be stopped, it will be forcefully terminated. This has the same effect as pulling the power cord to a physical machine. - A reboot is a stop followed by a start. - &PRODUCT; preserves the state of the virtual machine hard disk until the machine is destroyed. - A running virtual machine may fail because of hardware or network issues. A failed virtual machine is in the down state. - The system places the virtual machine into the down state if it does not receive the heartbeat from the hypervisor for three minutes. - The user can manually restart the virtual machine from the down state. - The system will start the virtual machine from the down state automatically if the virtual machine is marked as HA-enabled. + + Once a virtual machine is destroyed, it cannot be recovered. All the resources used by the virtual machine will be reclaimed by the system. This includes the virtual machine’s IP address. + A stop will attempt to gracefully shut down the operating system, which typically involves terminating all the running applications. If the operation system cannot be stopped, it will be forcefully terminated. This has the same effect as pulling the power cord to a physical machine. + A reboot is a stop followed by a start. + &PRODUCT; preserves the state of the virtual machine hard disk until the machine is destroyed. + A running virtual machine may fail because of hardware or network issues. A failed virtual machine is in the down state. + The system places the virtual machine into the down state if it does not receive the heartbeat from the hypervisor for three minutes. + The user can manually restart the virtual machine from the down state. + The system will start the virtual machine from the down state automatically if the virtual machine is marked as HA-enabled.
+ diff --git a/docs/en-US/vm-snapshots.xml b/docs/en-US/vm-snapshots.xml new file mode 100644 index 000000000..8d4bcf9bc --- /dev/null +++ b/docs/en-US/vm-snapshots.xml @@ -0,0 +1,146 @@ + + +%BOOK_ENTITIES; +]> + + +
+ Virtual Machine Snapshots for VMware + (VMware hosts only) + In addition to the existing &PRODUCT; ability to snapshot VM volumes, + you can now take a VM snapshot to preserve all of the VM's state and data. + This is useful for quick restore of a VM. + For example, you can snapshot a VM, then make changes such as software upgrades. + If anything goes wrong, simply restore the VM to its previous state using the previously saved VM snapshot. + + The snapshot is created using the VMware native snapshot facility. The VM snapshot + includes not only the data volumes, but optionally also whether the VM is running or + turned off (CPU state) and the memory contents. The snapshot is stored in &PRODUCT;'s + primary storage. + VM snapshots can have a parent/child relationship. + Each successive snapshot of the same VM is the child of the snapshot that came before it. + Each time you take an additional snapshot of the same VM, it saves only the differences + between the current state of the VM and the state stored in the most recent previous snapshot. + The previous snapshot becomes a parent, and the new snapshot is its child. + It is possible to create a long chain of these parent/child snapshots, + which amount to a "redo" record leading from the current state of the VM back to the + original. + If you need more information about VM snapshots, check out the VMware documentation + and the VMware Knowledge Base, especially + Understanding virtual machine snapshots. +
+ Limitations on VM Snapshots + + If a VM has some stored snapshots, you can't attach new volume to the VM + or delete any existing volumes. + If you change the volumes on the VM, it would become impossible to restore the VM snapshot + which was created with the previous volume structure. + VM snapshots which include both data volumes and memory can't be kept if you change the VM's + service offering. Any existing VM snapshots of this type will be discarded. + + You can't make a VM snapshot at the same time as you are taking a volume + snapshot. + + + The "quiesce" option is not supported. This option is provided by the underlying + VMware snapshot facility so that you can choose whether to quiesce the file system + on a running virtual machine before taking the snapshot. In &PRODUCT;, the quiesce option is always + set to false; the file system is not quiesced before taking a snapshot of a running VM. + + + You should use only &PRODUCT; to create VM snapshots on VMware hosts managed by &PRODUCT;. + Any snapshots that you make directly on vSphere will not be tracked in &PRODUCT;. + +
+
+ Configuring VM Snapshots + The cloud administrator can use global configuration variables to control the behavior of VM snapshots. + To set these variables, go through the Global Settings are of the UI. + + + + + Configuration Setting Name + Description + + + + + vmsnapshots.max + The maximum number of VM snapshots that can be saved for any given virtual machine in the cloud. + The total possible number of VM snapshots in the cloud is (number of VMs) * vmsnapshots.max. + If the number of snapshots for any VM ever hits the maximum, the older ones are removed + by the snapshot expunge job. + + + + vmsnapshot.create.wait + Number of seconds to wait for a snapshot job to succeed before declaring failure and issuing an error. + + + + +
+
+ Using VM Snapshots + To create a VM snapshot using the &PRODUCT; UI: + + Log in to the &PRODUCT; UI as a user or administrator. + Click Instances. + Click the name of the VM you want to snapshot. + Click the Take VM Snapshot button. + + + + + + If a snapshot is already in progress, then clicking this button will have no effect. + + Provide a name and description. These will be displayed in the VM Snapshots list. + (For running VMs only) If you want to include the VM's memory in the snapshot, click the + Memory checkbox. This saves the CPU and memory state of the virtual machine. If you + don't check this box, then only the current state of the VM disk is saved. Checking + this box makes the snapshot take longer. + Click OK. + + To delete a snapshot or restore a VM to the state saved in a particular snapshot: + + Navigate to the VM as described in the earlier steps. + Click View VM Snapshots. + In the list of snapshots, click the name of the snapshot you want to work with. + Depending on what you want to do: + To delete the snapshot, click the Delete button. + + + + + + To revert to the snapshot, click the Revert button. + + + + + + + + VM snapshots are deleted automatically when a VM is destroyed. + You don't have to manually delete the snapshots in this case. +
+
diff --git a/docs/en-US/vm-storage-migration.xml b/docs/en-US/vm-storage-migration.xml index 4b09ffdb2..7c3824b48 100644 --- a/docs/en-US/vm-storage-migration.xml +++ b/docs/en-US/vm-storage-migration.xml @@ -5,29 +5,31 @@ ]> -
VM Storage Migration - Supported in XenServer, KVM, and VMware. - This procedure is different from moving disk volumes from one VM to another. See Detaching and Moving Volumes . - You can migrate a virtual machine’s root disk volume or any additional data disk volume from one storage pool to another in the same zone. - You can use the storage migration feature to achieve some commonly desired administration goals, such as balancing the load on storage pools and increasing the reliability of virtual machines by moving them away from any storage pool that is experiencing issues. + Supported in XenServer, KVM, and VMware. + This procedure is different from moving disk volumes from one VM to another. See Detaching and Moving Volumes . + + + You can migrate a virtual machine’s root disk volume or any additional data disk volume from one storage pool to another in the same zone. + You can use the storage migration feature to achieve some commonly desired administration goals, such as balancing the load on storage pools and increasing the reliability of virtual machines by moving them away from any storage pool that is experiencing issues. -
+ + diff --git a/docs/en-US/vmware-cluster-config-dvswitch.xml b/docs/en-US/vmware-cluster-config-dvswitch.xml new file mode 100644 index 000000000..3468c1bea --- /dev/null +++ b/docs/en-US/vmware-cluster-config-dvswitch.xml @@ -0,0 +1,193 @@ + + +%BOOK_ENTITIES; +]> + + +
+ Configuring a vSphere Cluster with VMware Distributed Virtual Switch + &PRODUCT;supports VMware vNetwork Distributed Switch (VDS) for virtual network configuration + in a VMware vSphere environment. This section helps you configure VMware VDS in a &PRODUCT; + deployment. Each vCenter server instance can support up to 128 VDS instances and each VDS + instance can manage up to 500 VMware hosts. +
+ About VMware Distributed Virtual Switch + VMware VDS is an aggregation of host-level virtual switches on a VMware vCenter server. + VDS abstracts the configuration of individual virtual switches that span across a large number + of hosts, and enables centralized provisioning, administration, and monitoring for your entire + datacenter from a centralized interface. In effect, a VDS acts as a single virtual switch at + the datacenter level and manages networking for a number of hosts in a datacenter from a + centralized VMware vCenter server. Each VDS maintains network runtime state for VMs as they + move across multiple hosts, enabling inline monitoring and centralized firewall services. A + VDS can be deployed with or without Virtual Standard Switch and a Nexus 1000V virtual + switch. +
+
+ Prerequisites and Guidelines + + + Do not attempt to configure VDS by altering VMware traffic label when configuring + physical networks. This will only work for Standard Virtual Switch and should not be + distributed. + + + VMware VDS does not support multiple VDS per traffic type. If a user has many VDS + switches, only one can be used for Guest traffic and another one for Public + traffic. + + + Management and Storage network does not support VDS. Therefore, use Standard Switch + for these networks. + + +
+
+ Enabling Virtual Distributed Switch in &PRODUCT; + To make a &PRODUCT; deployment VDS enabled, set the vmware.use.dvswitch parameter to true + by using the Global Settings page in the &PRODUCT; UI and restart the Management Server. + Unless you enable the vmware.use.dvswitch parameter, you cannot see any UI options specific to + VDS, and &PRODUCT; ignores the VDS-specific parameters given in the AddClusterCmd API call. + Additionally, &PRODUCT; uses VDS for virtual network infrastructure if the value of + vmware.use.dvswitch parameter is true and the value of vmware.use.nexus.dvswitch parameter is + false. + &PRODUCT; supports orchestration of virtual networks in a deployment with a mix of Virtual + Distributed Switch, Standard Virtual Switch and Nexus 1000v Virtual Switch. +
+
+ Configuring Distributed Virtual Switch in &PRODUCT; + You can configure VDS by adding the necessary resources while a zone is created. + + + + + + dvSwitchConfig.png: Configuring dvSwitch + + + Alternatively, you can create an additional cluster with VDS enabled in the existing zone. + Use the Add Cluster option. For information as given in . + In both these cases, you must specify the following parameters to configure VDS: + + + + + + + Parameters + Description + + + + + Cluster Name + Enter the name of the cluster you created in vCenter. For example, + "cloud.cluster". + + + vCenter Host + Enter the name or the IP address of the vCenter host where you have deployed the VMware + VDS. + + + vCenter User name + Enter the username that &PRODUCT; should use to connect to vCenter. This + user must have all administrative privileges. + + + vCenter Password + Enter the password for the user named above. + + + vCenter Datacenter + Enter the vCenter datacenter that the cluster is in. For example, + "cloud.dc.VM". + + + Override Public Traffic + Enable this option to override the zone-wide public traffic for the cluster + you are creating. + + + Public Traffic vSwitch Type + This option is displayed only if you enable the Override Public Traffic + option. Select VMware vNetwork Distributed Virtual Switch. + If the vmware.use.dvswitch global parameter is true, the default option will be + VMware vNetwork Distributed Virtual Switch. + + + Public Traffic vSwitch Name + Name of virtual switch to be used for the public traffic. + + + Override Guest Traffic + Enable the option to override the zone-wide guest traffic for the cluster + you are creating. + + + Guest Traffic vSwitch Type + This option is displayed only if you enable the Override Guest Traffic + option. Select VMware vNetwork Distributed Virtual Switch. + If the vmware.use.dvswitch global parameter is true, the default option will be + VMware vNetwork Distributed Virtual Switch. + + + Guest Traffic vSwitch Name + Name of virtual switch to be used for guest traffic. + + + + +
+
+ Removing VMware Virtual Switch + + + In the vCenter datacenter that is served by the VDS, ensure that you delete all the + hosts in the corresponding cluster. + + + Log in with Admin permissions to the &PRODUCT; administrator UI. + + + In the left navigation bar, select Infrastructure. + + + In the Infrastructure page, click View all under Clusters. + + + Select the cluster where you want to remove the virtual switch. + + + In the VMware dvSwitch tab, click the name of the virtual switch. + + + In the Details page, click Delete VMware dvSwitch icon. + + + + + DeleteButton.png: button to delete dvSwitch + + + + Click Yes in the confirmation dialog box. + + +
+
diff --git a/docs/en-US/vmware-install.xml b/docs/en-US/vmware-install.xml index 467e13586..fd88fc7c0 100644 --- a/docs/en-US/vmware-install.xml +++ b/docs/en-US/vmware-install.xml @@ -327,282 +327,439 @@ esxcfg-firewall -o 59000-60000,tcp,out,vncextras guide. - + + + +
Storage Preparation for vSphere (iSCSI only) Use of iSCSI requires preparatory work in vCenter. You must add an iSCSI target and create diff --git a/docs/en-US/vmware-requirements.xml b/docs/en-US/vmware-requirements.xml index 207a4566d..d7a6d70e6 100644 --- a/docs/en-US/vmware-requirements.xml +++ b/docs/en-US/vmware-requirements.xml @@ -68,7 +68,7 @@ vCenter must be configured to use the standard port 443 so that it can communicate with the &PRODUCT; Management Server. You must re-install VMware ESXi if you are going to re-use a host from a previous install. &PRODUCT; requires VMware vSphere 4.1 or 5.0. VMware vSphere 4.0 is not supported. - All hosts must be 64-bit and must support HVM (Intel-VT or AMD-V enabled). All hosts within a cluster must be homogenous. That means the CPUs must be of the same type, count, and feature flags. + All hosts must be 64-bit and must support HVM (Intel-VT or AMD-V enabled). All hosts within a cluster must be homogeneous. That means the CPUs must be of the same type, count, and feature flags. The &PRODUCT; management network must not be configured as a separate virtual network. The &PRODUCT; management network is the same as the vCenter management network, and will inherit its configuration. See . &PRODUCT; requires ESXi. ESX is not supported. All resources used for &PRODUCT; must be used for &PRODUCT; only. &PRODUCT; cannot share instance of ESXi or storage with other management consoles. Do not share the same storage volumes that will be used by &PRODUCT; with a different set of ESXi servers that are not managed by &PRODUCT;. diff --git a/docs/en-US/vmx-settings-dev.xml b/docs/en-US/vmx-settings-dev.xml new file mode 100644 index 000000000..a0fdf7f78 --- /dev/null +++ b/docs/en-US/vmx-settings-dev.xml @@ -0,0 +1,40 @@ + + +%BOOK_ENTITIES; +]> + +
+ Additional VMX Settings + A VMX (.vmx) file is the primary configuration file for a virtual machine. When a new VM is + created, information on the operating system, disk sizes, and networking is stored in this file. + The VM actively writes to its .vmx file for all the configuration changes. The VMX file is + typically located in the directory where the VM is created. In Windows Vista / Windows 7 / + Windows Server 2008, the default location is C:\Users\<your_user_name>\My + Documents\Virtual Machines\<virtual_machine_name>.vmx. In Linux, vmware-cmd -l lists the + full path to all the registered VMX files. Any manual additions to the .vmx file from ESX/ESXi + are overwritten by the entries stored in the vCenter Server database. Therefore, before you edit + a .vmx file, first remove the VM from the vCenter server's inventory and register the VM again + after editing. + The CloudStack API that supports passing some of the VMX settings is registerTemplate. The + supported parameters are rootDiskController, nicAdapter, and keyboard. In addition to these + existing VMX parameters, you can now use the keyboard.typematicMinDelay parameter in the + registerTemplate API call. This parameter controls the amount of delay for the repeated key + strokes on remote consoles. For more information on keyboard.typematicMinDelay, see keyboard.typematicMinDelay. +
diff --git a/docs/en-US/vpc.xml b/docs/en-US/vpc.xml index cfa5fe1dd..0665d372b 100644 --- a/docs/en-US/vpc.xml +++ b/docs/en-US/vpc.xml @@ -180,4 +180,4 @@ Remote access VPN is not supported in VPC networks. -
\ No newline at end of file + diff --git a/docs/en-US/vpn.xml b/docs/en-US/vpn.xml index 724e4800f..ccb3e8613 100644 --- a/docs/en-US/vpn.xml +++ b/docs/en-US/vpn.xml @@ -5,33 +5,41 @@ ]> -
- VPN - &PRODUCT; account owners can create virtual private networks (VPN) to access their virtual machines. If the guest network is instantiated from a network offering that offers the Remote Access VPN service, the virtual router (based on the System VM) is used to provide the service. &PRODUCT; provides a L2TP-over-IPsec-based remote access VPN service to guest virtual networks. Since each network gets its own virtual router, VPNs are not shared across the networks. VPN clients native to Windows, Mac OS X and iOS can be used to connect to the guest networks. The account owner can create and manage users for their VPN. &PRODUCT; does not use its account database for this purpose but uses a separate table. The VPN user database is shared across all the VPNs created by the account owner. All VPN users get access to all VPNs created by the account owner. - Make sure that not all traffic goes through the VPN. That is, the route installed by the VPN should be only for the guest network and not for all traffic. - - Road Warrior / Remote Access. Users want to be able to connect securely from a home or office to a private network in the cloud. Typically, the IP address of the connecting client is dynamic and cannot be preconfigured on the VPN server. - Site to Site. In this scenario, two private subnets are connected over the public Internet with a secure VPN tunnel. The cloud user’s subnet (for example, an office network) is connected through a gateway to the network in the cloud. The address of the user’s gateway must be preconfigured on the VPN server in the cloud. Note that although L2TP-over-IPsec can be used to set up Site-to-Site VPNs, this is not the primary intent of this feature. - - - - - + VPN + &PRODUCT; account owners can create virtual private networks (VPN) to access their virtual machines. If the guest network is instantiated from a network offering that offers the Remote Access VPN service, the virtual router (based on the System VM) is used to provide the service. &PRODUCT; provides a L2TP-over-IPsec-based remote access VPN service to guest virtual networks. Since each network gets its own virtual router, VPNs are not shared across the networks. VPN clients native to Windows, Mac OS X and iOS can be used to connect to the guest networks. The account owner can create and manage users for their VPN. &PRODUCT; does not use its account database for this purpose but uses a separate table. The VPN user database is shared across all the VPNs created by the account owner. All VPN users get access to all VPNs created by the account owner. + Make sure that not all traffic goes through the VPN. That is, the route installed by the VPN should be only for the guest network and not for all traffic. + + + Road Warrior / Remote Access. Users want to be able to + connect securely from a home or office to a private network in the cloud. Typically, + the IP address of the connecting client is dynamic and cannot be preconfigured on + the VPN server. + Site to Site. In this scenario, two private subnets are + connected over the public Internet with a secure VPN tunnel. The cloud user’s subnet + (for example, an office network) is connected through a gateway to the network in + the cloud. The address of the user’s gateway must be preconfigured on the VPN server + in the cloud. Note that although L2TP-over-IPsec can be used to set up Site-to-Site + VPNs, this is not the primary intent of this feature. For more information, see + + + + +
diff --git a/docs/en-US/whats-new.xml b/docs/en-US/whats-new.xml index 77b3ec3df..295b53220 100644 --- a/docs/en-US/whats-new.xml +++ b/docs/en-US/whats-new.xml @@ -1,42 +1,53 @@ - %BOOK_ENTITIES; ]> - - - What's New in the API? - The following describes any new major features of each &PRODUCT; version as it applies to API usage. -
- What's New in the API for 4.0 - - -
-
- What's New in the API for 3.0 - - - - - - -
+ What's New in the API? + The following describes any new major features of each &PRODUCT; version as it applies to + API usage. +
+ What's New in the API for 4.2 + +
+
+ What's New in the API for 4.1 + + + + + + +
+
+ What's New in the API for 4.0 + + +
+
+ What's New in the API for 3.0 + + + + + + +
diff --git a/docs/en-US/windows-installation.xml b/docs/en-US/windows-installation.xml index 541f8ddd4..bcecc8071 100644 --- a/docs/en-US/windows-installation.xml +++ b/docs/en-US/windows-installation.xml @@ -5,25 +5,24 @@ ]> -
- Windows OS Installation + Windows OS Installation Download the installer, CloudInstanceManager.msi, from Download page and run the installer in the newly created Windows VM. diff --git a/docs/en-US/work-with-usage.xml b/docs/en-US/work-with-usage.xml index 939ba6378..00a7fb5df 100644 --- a/docs/en-US/work-with-usage.xml +++ b/docs/en-US/work-with-usage.xml @@ -5,32 +5,32 @@ ]> - Working with Usage - The Usage Server is an optional, separately-installed part of &PRODUCT; that provides aggregated usage records which you can use to create billing integration for &PRODUCT;. The Usage Server works by taking data from the events log and creating summary usage records that you can access using the listUsageRecords API call. - The usage records show the amount of resources, such as VM run time or template storage - space, consumed by guest instances. - The Usage Server runs at least once per day. It can be configured to run multiple times per day. - - - - - - \ No newline at end of file + Working with Usage + The Usage Server is an optional, separately-installed part of &PRODUCT; that provides aggregated usage records which you can use to create billing integration for &PRODUCT;. The Usage Server works by taking data from the events log and creating summary usage records that you can access using the listUsageRecords API call. + The usage records show the amount of resources, such as VM run time or template storage + space, consumed by guest instances. + The Usage Server runs at least once per day. It can be configured to run multiple times per day. + + + + + + diff --git a/docs/en-US/working-with-documentation.xml b/docs/en-US/working-with-documentation.xml new file mode 100644 index 000000000..677484272 --- /dev/null +++ b/docs/en-US/working-with-documentation.xml @@ -0,0 +1,32 @@ + + +%BOOK_ENTITIES; +]> + + + + + Preparing and Building &PRODUCT; Documentation + This chapter describes how to install publican, how to write new documentation and build a guide as well as how to build a translated version of the documentation using transifex + + + + + diff --git a/docs/en-US/working-with-hosts.xml b/docs/en-US/working-with-hosts.xml index 4dcb8521a..83cd8b2bd 100644 --- a/docs/en-US/working-with-hosts.xml +++ b/docs/en-US/working-with-hosts.xml @@ -1,39 +1,39 @@ - %BOOK_ENTITIES; ]> - Working With Hosts -
- Adding Hosts + Working With Hosts +
+ Adding Hosts Additional hosts can be added at any time to provide more capacity for guest VMs. For requirements and instructions, see . -
- - - - - - - - - \ No newline at end of file +
+ + + + + + + + +
diff --git a/docs/en-US/working-with-iso.xml b/docs/en-US/working-with-iso.xml index efe5fb50e..03e18ee35 100644 --- a/docs/en-US/working-with-iso.xml +++ b/docs/en-US/working-with-iso.xml @@ -5,29 +5,28 @@ ]> -
- Working with ISOs - &PRODUCT; supports ISOs and their attachment to guest VMs. An ISO is a read-only file that has an ISO/CD-ROM style file system. Users can upload their own ISOs and mount them on their guest VMs. - ISOs are uploaded based on a URL. HTTP is the supported protocol. Once the ISO is available via HTTP specify an upload URL such as http://my.web.server/filename.iso. - ISOs may be public or private, like templates.ISOs are not hypervisor-specific. That is, a guest on vSphere can mount the exact same image that a guest on KVM can mount. - ISO images may be stored in the system and made available with a privacy level similar to templates. ISO images are classified as either bootable or not bootable. A bootable ISO image is one that contains an OS image. &PRODUCT; allows a user to boot a guest VM off of an ISO image. Users can also attach ISO images to guest VMs. For example, this enables installing PV drivers into Windows. ISO images are not hypervisor-specific. + Working with ISOs + &PRODUCT; supports ISOs and their attachment to guest VMs. An ISO is a read-only file that has an ISO/CD-ROM style file system. Users can upload their own ISOs and mount them on their guest VMs. + ISOs are uploaded based on a URL. HTTP is the supported protocol. Once the ISO is available via HTTP specify an upload URL such as http://my.web.server/filename.iso. + ISOs may be public or private, like templates.ISOs are not hypervisor-specific. That is, a guest on vSphere can mount the exact same image that a guest on KVM can mount. + ISO images may be stored in the system and made available with a privacy level similar to templates. ISO images are classified as either bootable or not bootable. A bootable ISO image is one that contains an OS image. &PRODUCT; allows a user to boot a guest VM off of an ISO image. Users can also attach ISO images to guest VMs. For example, this enables installing PV drivers into Windows. ISO images are not hypervisor-specific. - +
diff --git a/docs/en-US/working-with-snapshots.xml b/docs/en-US/working-with-snapshots.xml index e7e45177d..b98443920 100644 --- a/docs/en-US/working-with-snapshots.xml +++ b/docs/en-US/working-with-snapshots.xml @@ -5,29 +5,32 @@ ]> -
- Working with Snapshots + Working with Snapshots (Supported for the following hypervisors: XenServer, VMware vSphere, and KVM) &PRODUCT; supports snapshots of disk volumes. Snapshots are a point-in-time capture of virtual machine disks. Memory and CPU states are not captured. Snapshots may be taken for volumes, including both root and data disks. The administrator places a limit on the number of stored snapshots per user. Users can create new volumes from the snapshot for recovery of particular files and they can create templates from snapshots to boot from a restored disk. - Users can create snapshots manually or by setting up automatic recurring snapshot policies. Users can also create disk volumes from snapshots, which may be attached to a VM like any other disk volume. Snapshots of both root disks and data disks are supported. However, &PRODUCT; does not currently support booting a VM from a recovered root disk. A disk recovered from snapshot of a root disk is treated as a regular data disk; the data on recovered disk can be accessed by attaching the disk to a VM. - A completed snapshot is copied from primary storage to secondary storage, where it is stored until deleted or purged by newer snapshot. + Users can create snapshots manually or by setting up automatic recurring snapshot policies. Users can also create disk volumes from snapshots, which may be attached to a VM like any other disk volume. Snapshots of both root disks and data disks are supported. However, &PRODUCT; does not currently support booting a VM from a recovered root disk. A disk recovered from snapshot of a root disk is treated as a regular data disk; the data on recovered disk can be accessed by attaching the disk to a VM. + A completed snapshot is copied from primary storage to secondary storage, where it is stored until deleted or purged by newer snapshot. + + + +
diff --git a/docs/en-US/working-with-system-vm.xml b/docs/en-US/working-with-system-vm.xml index ed2bdcded..70f7dd1aa 100644 --- a/docs/en-US/working-with-system-vm.xml +++ b/docs/en-US/working-with-system-vm.xml @@ -1,33 +1,39 @@ - %BOOK_ENTITIES; ]> - - Working with System Virtual Machines - &PRODUCT; uses several types of system virtual machines to perform tasks in the cloud. In general &PRODUCT; manages these system VMs and creates, starts, and stops them as needed based on scale and immediate needs. However, the administrator should be aware of them and their roles to assist in debugging issues. - - - - - - \ No newline at end of file + &PRODUCT; uses several types of system virtual machines to perform tasks in the cloud. In + general &PRODUCT; manages these system VMs and creates, starts, and stops them as needed based + on scale and immediate needs. However, the administrator should be aware of them and their roles + to assist in debugging issues. + + You can configure the system.vm.random.password parameter to create a random system VM + password to ensure higher security. If you reset the value for system.vm.random.password to + true and restart the Management Server, a random password is generated and stored encrypted in + the database. You can view the decrypted password under the system.vm.password global + parameter on the &PRODUCT; UI or by calling the listConfigurations API. + + + + + + + diff --git a/docs/en-US/working-with-templates.xml b/docs/en-US/working-with-templates.xml index a01c1814a..9f4e7509d 100644 --- a/docs/en-US/working-with-templates.xml +++ b/docs/en-US/working-with-templates.xml @@ -5,28 +5,28 @@ ]> - Working with Templates - A template is a reusable configuration for virtual machines. When users launch VMs, they can choose from a list of templates in &PRODUCT;. - Specifically, a template is a virtual disk image that includes one of a variety of operating systems, optional additional software such as office applications, and settings such as access control to determine who can use the template. Each template is associated with a particular type of hypervisor, which is specified when the template is added to &PRODUCT;. - &PRODUCT; ships with a default template. In order to present more choices to users, &PRODUCT; administrators and users can create templates and add them to &PRODUCT;. + Working with Templates + A template is a reusable configuration for virtual machines. When users launch VMs, they can choose from a list of templates in &PRODUCT;. + Specifically, a template is a virtual disk image that includes one of a variety of operating systems, optional additional software such as office applications, and settings such as access control to determine who can use the template. Each template is associated with a particular type of hypervisor, which is specified when the template is added to &PRODUCT;. + &PRODUCT; ships with a default template. In order to present more choices to users, &PRODUCT; administrators and users can create templates and add them to &PRODUCT;. diff --git a/docs/en-US/working-with-usage-data.xml b/docs/en-US/working-with-usage-data.xml index 56a929fd6..5324617ab 100644 --- a/docs/en-US/working-with-usage-data.xml +++ b/docs/en-US/working-with-usage-data.xml @@ -31,4 +31,5 @@ + diff --git a/docs/en-US/working-with-volumes.xml b/docs/en-US/working-with-volumes.xml index 117912015..ab567d2d0 100644 --- a/docs/en-US/working-with-volumes.xml +++ b/docs/en-US/working-with-volumes.xml @@ -5,21 +5,21 @@ ]>
@@ -46,3 +46,4 @@ type may not be used on a guest of another hypervisor type.
+ diff --git a/docs/en-US/writing-new-documentation.xml b/docs/en-US/writing-new-documentation.xml new file mode 100644 index 000000000..7557359fd --- /dev/null +++ b/docs/en-US/writing-new-documentation.xml @@ -0,0 +1,100 @@ + + +%BOOK_ENTITIES; +]> + + + +
+ Writing &PRODUCT; Documentation + &PRODUCT; documentation is written in DocBook xml format. Each guide defined with a publican configuration file refers to a DocBook book. + These books are defined in xml files in docs/en-US, for instance if we look at the Developers guide, its configuration file contains: + + xml_lang: en-US + type: Book + docname: Developers_Guide + brand: cloudstack + chunk_first: 1 + chunk_section_depth: 1 + + The docname key gives you the basename of the DocBook file located in the en-US directory that contains the description of the book. + Looking closely at Developers_Guide.xml we see that it contains book tags and several references to other xml files. These are the chapters of the book, currently they are: + + + + + + + + + + + + + + ]]> + + All these xml files are written in DocBook format. + + DocBook format is well documented, refer to the documentation for any questions about DocBook tags + + When writing documentation, you therefore need to located the book,chapter and section of the content you want to write/correct. + Or create a new book,chapter,section. + You will then learn much more about DocBook tagging. In order to write this chapter about documentation, I added the working-with-documentation.xmlfile describing a chapter in the Developer book and I created several sections within that chapter like so: + + + Preparing and Building &PRODUCT; Documentation + This chapter describes how to install publican, how to write new documentation and build a guide as well as how to build a translated version of the documentation using transifex + + + + + + ]]> + + + Note the id witin the chapter tag, it represents the basename of the xml file describing the chapter. + For translation purposes it is important that this basename be less than 50 characters long. + + This chapter also refers to xml files which contains each section. While you could embed the sections directly in the chapter file and as a matter of fact also write the chapters within a single book file. Breaking things up in smaller files at the granularity of the section, allows us to re-use any section to build different books. + For completeness here is an example of a section: + + + Building &PRODUCT; Documentation + To build a specific guide, go to the source tree of the documentation in /docs and identify the guide you want to build. + Currently there are four guides plus the release notes, all defined in publican configuration files: + + publican-adminguide.cfg + publican-devguide.cfg + publican-installation.cfg + publican-plugin-niciranvp.cfg + publican-release-notes.cfg + + To build the Developer guide for example, do the following: + publican build --config=publican-devguide.cfg --formats=pdf --langs=en-US + A pdf file will be created in tmp/en-US/pdf, you may choose to build the guide in a different format like html. In that case just replace the format value. +
+ ]]> + + Happy Publicating and DocBooking. +
diff --git a/docs/en-US/xenserver-maintenance-mode.xml b/docs/en-US/xenserver-maintenance-mode.xml index 4dfa43ebe..b947278a9 100644 --- a/docs/en-US/xenserver-maintenance-mode.xml +++ b/docs/en-US/xenserver-maintenance-mode.xml @@ -5,23 +5,22 @@ ]> -
XenServer and Maintenance Mode For XenServer, you can take a server offline temporarily by using the Maintenance Mode feature in XenCenter. When you place a server into Maintenance Mode, all running VMs are automatically migrated from it to another host in the same pool. If the server is the pool master, a new master will also be selected for the pool. While a server is Maintenance Mode, you cannot create or start any VMs on it. @@ -31,10 +30,10 @@ Right-click, then click Enter Maintenance Mode on the shortcut menu. - On the Server menu, click Enter Maintenance Mode + On the Server menu, click Enter Maintenance Mode. - Click Enter Maintenance Mode + Click Enter Maintenance Mode. The server's status in the Resources pane shows when all running VMs have been successfully migrated off the server. To take a server out of Maintenance Mode: @@ -43,9 +42,10 @@ Right-click, then click Exit Maintenance Mode on the shortcut menu. - On the Server menu, click Exit Maintenance Mode + On the Server menu, click Exit Maintenance Mode. - Click Exit Maintenance Mode + Click Exit Maintenance Mode. +
diff --git a/docs/en-US/zone-add.xml b/docs/en-US/zone-add.xml index 2a85bb0b4..4f6606fce 100644 --- a/docs/en-US/zone-add.xml +++ b/docs/en-US/zone-add.xml @@ -63,7 +63,7 @@ Basic. For AWS-style networking. Provides a single network where each VM instance is assigned an IP directly from the network. Guest isolation can be provided through layer-3 means such as security groups (IP address source filtering). Advanced. For more sophisticated network topologies. This network model provides the most flexibility in defining guest networks and providing custom network offerings such as firewall, VPN, or load balancer support. - For more information about the network types, see Network Setup. + For more information about the network types, see . The rest of the steps differ depending on whether you chose Basic or Advanced. Continue with the steps that apply to you: diff --git a/docs/pot/Admin_Guide.pot b/docs/pot/Admin_Guide.pot new file mode 100644 index 000000000..d3acd9b8e --- /dev/null +++ b/docs/pot/Admin_Guide.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:55\n" +"PO-Revision-Date: 2013-02-02T20:11:55\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "&PRODUCT; Administrator's Guide" +msgstr "" + +#. Tag: productname +#, no-c-format +msgid "Apache CloudStack" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Administration Guide for &PRODUCT;." +msgstr "" + diff --git a/docs/pot/Author_Group.pot b/docs/pot/Author_Group.pot new file mode 100644 index 000000000..7e9c48f48 --- /dev/null +++ b/docs/pot/Author_Group.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:55\n" +"PO-Revision-Date: 2013-02-02T20:11:55\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: firstname +#, no-c-format +msgid "Apache" +msgstr "" + +#. Tag: surname +#, no-c-format +msgid "CloudStack" +msgstr "" + diff --git a/docs/pot/Book_Info.pot b/docs/pot/Book_Info.pot new file mode 100644 index 000000000..a2f07956e --- /dev/null +++ b/docs/pot/Book_Info.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:55\n" +"PO-Revision-Date: 2013-02-02T20:11:55\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "&PRODUCT; Guide" +msgstr "" + +#. Tag: subtitle +#, no-c-format +msgid "Revised August 9, 2012 10:48 pm Pacific" +msgstr "" + +#. Tag: productname +#, no-c-format +msgid "Apache CloudStack" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Complete technical documentation of &PRODUCT;." +msgstr "" + diff --git a/docs/pot/Book_Info_Release_Notes_4-0.pot b/docs/pot/Book_Info_Release_Notes_4-0.pot new file mode 100644 index 000000000..ea3ff8bf1 --- /dev/null +++ b/docs/pot/Book_Info_Release_Notes_4-0.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:55\n" +"PO-Revision-Date: 2013-02-02T20:11:55\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Version 4.0.0-incubating Release Notes" +msgstr "" + +#. Tag: subtitle +#, no-c-format +msgid "Revised October 17, 2012 19:49 UTC" +msgstr "" + +#. Tag: productname +#, no-c-format +msgid "Apache CloudStack" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Release notes for the Apache CloudStack 4.0.0-incubating release." +msgstr "" + diff --git a/docs/pot/CloudStack_Nicira_NVP_Guide.pot b/docs/pot/CloudStack_Nicira_NVP_Guide.pot new file mode 100644 index 000000000..5320c4b66 --- /dev/null +++ b/docs/pot/CloudStack_Nicira_NVP_Guide.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:55\n" +"PO-Revision-Date: 2013-02-02T20:11:55\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "&PRODUCT; Plugin Guide for the Nicira NVP Plugin" +msgstr "" + +#. Tag: productname +#, no-c-format +msgid "Apache CloudStack" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Plugin Guide for the Nicira NVP Plugin." +msgstr "" + diff --git a/docs/pot/Common_Content/Legal_Notice.pot b/docs/pot/Common_Content/Legal_Notice.pot new file mode 100644 index 000000000..f059a2bc5 --- /dev/null +++ b/docs/pot/Common_Content/Legal_Notice.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:55\n" +"PO-Revision-Date: 2013-02-02T20:11:55\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: para +#, no-c-format +msgid "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" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "http://www.apache.org/licenses/LICENSE-2.0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Apache CloudStack is an effort undergoing incubation at The Apache Software Foundation (ASF)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Incubation is required of all newly accepted projects until a further review indicates that the infrastructure, communications, and decision making process have stabilized in a manner consistent with other successful ASF projects. While incubation status is not necessarily a reflection of the completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF." +msgstr "" + diff --git a/docs/pot/Developers_Guide.pot b/docs/pot/Developers_Guide.pot new file mode 100644 index 000000000..c5706c2e7 --- /dev/null +++ b/docs/pot/Developers_Guide.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:55\n" +"PO-Revision-Date: 2013-02-02T20:11:55\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "&PRODUCT; Developer's Guide" +msgstr "" + +#. Tag: productname +#, no-c-format +msgid "Apache CloudStack" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This guide shows how to develop &PRODUCT;, use the API for operation and integration, access the usage data and use &PRODUCT; specific tools to ease development, testing and integration." +msgstr "" + diff --git a/docs/pot/Installation_Guide.pot b/docs/pot/Installation_Guide.pot new file mode 100644 index 000000000..ee6bb9da0 --- /dev/null +++ b/docs/pot/Installation_Guide.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:55\n" +"PO-Revision-Date: 2013-02-02T20:11:55\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "&PRODUCT; Installation Guide" +msgstr "" + +#. Tag: productname +#, no-c-format +msgid "Apache CloudStack" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Installation Guide for &PRODUCT;." +msgstr "" + diff --git a/docs/pot/LDAPserver-for-user-authentication.pot b/docs/pot/LDAPserver-for-user-authentication.pot new file mode 100644 index 000000000..fbac55690 --- /dev/null +++ b/docs/pot/LDAPserver-for-user-authentication.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:55\n" +"PO-Revision-Date: 2013-02-02T20:11:55\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using an LDAP Server for User Authentication" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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.." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To set up LDAP authentication in &PRODUCT;, call the &PRODUCT; API command ldapConfig and provide the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hostname or IP address and listening port of the LDAP server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Base directory and query filter" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Search user DN credentials, which give &PRODUCT; permission to search on the LDAP server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SSL keystore and password, if SSL is used" +msgstr "" + diff --git a/docs/pot/Preface.pot b/docs/pot/Preface.pot new file mode 100644 index 000000000..0684f6ca3 --- /dev/null +++ b/docs/pot/Preface.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:55\n" +"PO-Revision-Date: 2013-02-02T20:11:55\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Preface" +msgstr "" + diff --git a/docs/pot/Release_Notes.pot b/docs/pot/Release_Notes.pot new file mode 100644 index 000000000..e95dc9e59 --- /dev/null +++ b/docs/pot/Release_Notes.pot @@ -0,0 +1,4478 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Submitting Feedback and Getting Help" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Apache CloudStack project has mailing lists for users and developers. These are the official channels of communication for the project and are the best way to get answers about using and contributing to CloudStack. It's a good idea to subscribe to the cloudstack-users mailing list if you've deployed or are deploying CloudStack into production, and even for test deployments." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The CloudStack developer's mailing list (cloudstack-dev) is for discussions about CloudStack development, and is the best list for discussing possible bugs in CloudStack. Anyone contributing to CloudStack should be on this mailing list." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can also report bugs in CloudStack using the Apache Defect Tracking System." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To posts to the lists, you'll need to be subscribed. See the CloudStack Web site for instructions." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Upgrade Instructions" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Upgrade from 3.0.2 to 4.0.0-incubating" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Perform the following to upgrade from version 3.0.2 to version 4.0.0-incubating. Note that some of the steps here are only required if you're using a specific hypervisor. The steps that are hypervisor-specific are called out with a note." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that you query your IP address usage records and process them or make a backup. During the upgrade you will lose the old IP address usage records." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Starting in 3.0.2, the usage record format for IP addresses is the same as the rest of the usage types. Instead of a single record with the assignment and release dates, separate records are generated per aggregation period with start and end dates. After upgrading, any existing IP address usage records in the old format will no longer be available." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following upgrade instructions apply only if you're using VMware hosts. If you're not using VMware hosts, skip this step and move on to step 3: stopping all usage servers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In each zone that includes VMware hosts, you need to add a new system VM template." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "While running the existing 3.0.2 system, log in to the UI as root administrator." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Templates." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select view, click Templates." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Register template." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Register template dialog box is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Register template dialog box, specify the following values (do not change these):" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Field" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Value" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "systemvm-vmware-3.0.0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "URL" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "http://download.cloud.com/templates/burbank/burbank-systemvm-08012012.ova" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Zone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose the zone where this hypervisor is used" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VMware" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Format" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "OVA" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "OS Type" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Debian GNU/Linux 5.0 (32-bit)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Extractable" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "no" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Password Enabled" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Featured" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Watch the screen to be sure that the template downloads successfully and enters the READY state. Do not proceed until this is successful." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Stop all Usage Servers if running. Run this on all Usage Server hosts." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service cloud-usage stop" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Stop the Management Servers. Run this on all Management Server hosts." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service cloud-management stop" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On the MySQL master, take a backup of the MySQL databases. We recommend performing this step even in test upgrades. If there is an issue, this will assist with debugging." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the following commands, it is assumed that you have set the root password on the database, which is a CloudStack recommended best practice. Substitute your own MySQL root password." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# mysqldump -u root -pmysql_password cloud > cloud-backup.dmp\n" +"# mysqldump -u root -pmysql_password cloud_usage > cloud-usage-backup.dmp" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Either build RPM/DEB packages as detailed in the Installation Guide, or use one of the community provided yum/apt repositories to gain access to the &PRODUCT; binaries." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After you have configured an appropriate yum or apt repository, you may execute the one of the following commands as appropriate for your environment in order to upgrade &PRODUCT;:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# yum update cloud-*" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# apt-get update\n" +"# apt-get upgrade cloud-*" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You will, of course, have to agree to the changes suggested by Yum or APT." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the upgrade output includes a message similar to the following, then some custom content was found in your old components.xml, and you need to merge the two files:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "warning: /etc/cloud/management/components.xml created as /etc/cloud/management/components.xml.rpmnew " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Instructions follow in the next step." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you have made changes to your copy of /etc/cloud/management/components.xml the changes will be preserved in the upgrade. However, you need to do the following steps to place these changes in a new version of the file which is compatible with version 4.0.0-incubating." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make a backup copy of /etc/cloud/management/components.xml. For example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# mv /etc/cloud/management/components.xml /etc/cloud/management/components.xml-backup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Copy /etc/cloud/management/components.xml.rpmnew to create a new /etc/cloud/management/components.xml:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# cp -ap /etc/cloud/management/components.xml.rpmnew /etc/cloud/management/components.xml" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Merge your changes from the backup file into the new components.xml." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# vi /etc/cloud/management/components.xml" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you have more than one management server node, repeat the upgrade steps on each node." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start the first Management Server. Do not start any other Management Server nodes yet." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service cloud-management start" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Wait until the databases are upgraded. Ensure that the database upgrade is complete. After confirmation, start the other Management Servers one at a time by running the same command on each node." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Failing to restart the Management Server indicates a problem in the upgrade. Having the Management Server restarted without any issues indicates that the upgrade is successfully completed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start all Usage Servers (if they were running on your previous version). Perform this on each Usage Server host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "# service cloud-usage start" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Additional steps are required for each KVM host. These steps will not affect running guests in the cloud. These steps are required only for clouds using KVM as hosts and only on the KVM hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure a yum or apt respository containing the &PRODUCT; packages as outlined in the Installation Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Stop the running agent." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "# service cloud-agent stop" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Update the agent software with one of the following command sets as appropriate for your environment." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "# yum update cloud-*" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "# apt-get update" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "# apt-get upgrade cloud-*" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start the agent." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service cloud-agent start" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Edit /etc/cloud/agent/agent.properties to change the resource parameter from \"com.cloud.agent.resource.computing.LibvirtComputingResource\" to \"com.cloud.hypervisor.kvm.resource.LibvirtComputingResource\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start the cloud agent and cloud management services." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When the Management Server is up and running, log in to the CloudStack UI and restart the virtual router for proper functioning of all the features." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the CloudStack UI as administrator, and check the status of the hosts. All hosts should come to Up state (except those that you know to be offline). You may need to wait 20 or 30 minutes, depending on the number of hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Troubleshooting: If login fails, clear your browser cache and reload the page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Do not proceed to the next step until the hosts show in Up state." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are upgrading from 3.0.2, perform the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that the admin port is set to 8096 by using the \"integration.api.port\" global parameter." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This port is used by the cloud-sysvmadm script at the end of the upgrade procedure. For information about how to set this parameter, see \"Setting Global Configuration Parameters\" in the Installation Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the Management Server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you don't want the admin port to remain open, you can set it to null after the upgrade is done and restart the management server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the cloud-sysvmadm script to stop, then start, all Secondary Storage VMs, Console Proxy VMs, and virtual routers. Run the script once on each management server. Substitute your own IP address of the MySQL instance, the MySQL user to connect as, and the password to use for that user. In addition to those parameters, provide the -c and -r arguments. For example:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "# nohup cloud-sysvmadm -d 192.168.1.5 -u cloud -p password -c -r > sysvm.log 2>&1 &" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "# tail -f sysvm.log" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This might take up to an hour or more to run, depending on the number of accounts in the system." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If needed, upgrade all Citrix XenServer hypervisor hosts in your cloud to a version supported by CloudStack 4.0.0-incubating. The supported versions are XenServer 5.6 SP2 and 6.0.2. Instructions for upgrade can be found in the CloudStack 4.0.0-incubating Installation Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now apply the XenServer hotfix XS602E003 (and any other needed hotfixes) to XenServer v6.0.2 hypervisor hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Disconnect the XenServer cluster from CloudStack." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar of the CloudStack UI, select Infrastructure. Under Clusters, click View All. Select the XenServer cluster and click Actions - Unmanage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This may fail if there are hosts not in one of the states Up, Down, Disconnected, or Alert. You may need to fix that before unmanaging this cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Wait until the status of the cluster has reached Unmanaged. Use the CloudStack UI to check on the status. When the cluster is in the unmanaged state, there is no connection to the hosts in the cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To clean up the VLAN, log in to one XenServer host and run:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/opt/xensource/bin/cloud-clean-vlan.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now prepare the upgrade by running the following on one XenServer host:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/opt/xensource/bin/cloud-prepare-upgrade.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you see a message like \"can't eject CD\", log in to the VM and unmount the CD, then run this script again." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Upload the hotfix to the XenServer hosts. Always start with the Xen pool master, then the slaves. Using your favorite file copy utility (e.g. WinSCP), copy the hotfixes to the host. Place them in a temporary folder such as /tmp." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On the Xen pool master, upload the hotfix with this command:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "xe patch-upload file-name=XS602E003.xsupdate" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make a note of the output from this command, which is a UUID for the hotfix file. You'll need it in another step later." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) If you are applying other hotfixes as well, you can repeat the commands in this section with the appropriate hotfix number. For example, XS602E004.xsupdate." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Manually live migrate all VMs on this host to another host. First, get a list of the VMs on this host:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "# xe vm-list" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Then use this command to migrate each VM. Replace the example host name and VM name with your own:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "# xe vm-migrate live=true host=host-name vm=VM-name" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Troubleshooting" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you see a message like \"You attempted an operation on a VM which requires PV drivers to be installed but the drivers were not detected,\" run:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/opt/xensource/bin/make_migratable.sh b6cf79c8-02ee-050b-922f-49583d9f1a14." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Apply the hotfix. First, get the UUID of this host:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# xe host-list" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Then use the following command to apply the hotfix. Replace the example host UUID with the current host ID, and replace the hotfix UUID with the output from the patch-upload command you ran on this machine earlier. You can also get the hotfix UUID by running xe patch-list." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "xe patch-apply host-uuid=host-uuid uuid=hotfix-uuid" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Copy the following files from the CloudStack Management Server to the host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Copy from here..." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "...to here" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/opt/xensource/sm/NFSSR.py" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/setupxenserver.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/opt/xensource/bin/setupxenserver.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/make_migratable.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/opt/xensource/bin/make_migratable.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Only for hotfixes XS602E005 and XS602E007) You need to apply a new Cloud Support Pack." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Download the CSP software onto the XenServer host from one of the following links:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For hotfix XS602E005: http://coltrane.eng.hq.xensource.com/release/XenServer-6.x/XS-6.0.2/hotfixes/XS602E005/56710/xe-phase-2/xenserver-cloud-supp.tgz" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For hotfix XS602E007: http://coltrane.eng.hq.xensource.com/release/XenServer-6.x/XS-6.0.2/hotfixes/XS602E007/57824/xe-phase-2/xenserver-cloud-supp.tgz" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Extract the file:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# tar xf xenserver-cloud-supp.tgz" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following script:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# xe-install-supplemental-pack xenserver-cloud-supp.iso" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the XenServer host is part of a zone that uses basic networking, disable Open vSwitch (OVS):" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# xe-switch-network-backend bridge" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Reboot this XenServer host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the message \"mv: cannot stat `/etc/cron.daily/logrotate': No such file or directory\" appears, you can safely ignore it." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "for pbd in `xe pbd-list currently-attached=false| grep ^uuid | awk '{print $NF}'`; do xe pbd-plug uuid=$pbd ; " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On each slave host in the Xen pool, repeat these steps, starting from \"manually live migrate VMs.\"" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Troubleshooting Tip" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If passwords which you know to be valid appear not to work after upgrade, or other UI issues are seen, try clearing your browser cache and reloading the UI page." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Upgrade from 2.2.14 to 4.0.0-incubating" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that you query your IPaddress usage records and process them; for example, issue invoices for any usage that you have not yet billed users for." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Starting in 3.0.2, the usage record format for IP addresses is the same as the rest of the usage types. Instead of a single record with the assignment and release dates, separate records are generated per aggregation period with start and end dates. After upgrading to 4.0.0-incubating, any existing IP address usage records in the old format will no longer be available." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are using version 2.2.0 - 2.2.13, first upgrade to 2.2.14 by using the instructions in the 2.2.14 Release Notes." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "KVM Hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If KVM hypervisor is used in your cloud, be sure you completed the step to insert a valid username and password into the host_details table on each KVM node as described in the 2.2.14 Release Notes. This step is critical, as the database will be encrypted after the upgrade to 4.0.0-incubating." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "While running the 2.2.14 system, log in to the UI as root administrator." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Using the UI, add a new System VM template for each hypervisor type that is used in your cloud. In each zone, add a system VM template for each hypervisor used in that zone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Register template dialog box, specify the following values depending on the hypervisor type (do not change these):" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name: systemvm-xenserver-3.0.0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description: systemvm-xenserver-3.0.0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "URL: http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Zone: Choose the zone where this hypervisor is used" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor: XenServer" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Format: VHD" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "OS Type: Debian GNU/Linux 5.0 (32-bit)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Extractable: no" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Password Enabled: no" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public: no" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Featured: no" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "KVM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name: systemvm-kvm-3.0.0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description: systemvm-kvm-3.0.0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "URL: http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor: KVM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Format: QCOW2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name: systemvm-vmware-3.0.0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description: systemvm-vmware-3.0.0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "URL: http://download.cloud.com/templates/burbank/burbank-systemvm-08012012.ova" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor: VMware" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Format: OVA" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Watch the screen to be sure that the template downloads successfully and enters the READY state. Do not proceed until this is successful" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "WARNING: If you use more than one type of hypervisor in your cloud, be sure you have repeated these steps to download the system VM template for each hypervisor type. Otherwise, the upgrade will fail." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# mysqldump -u root -pmysql_password cloud > cloud-backup.dmp\n" +"# mysqldump -u root -pmysql_password cloud_usage > cloud-usage-backup.dmp\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you have made changes to your existing copy of the file components.xml in your previous-version CloudStack installation, the changes will be preserved in the upgrade. However, you need to do the following steps to place these changes in a new version of the file which is compatible with version 4.0.0-incubating." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "How will you know whether you need to do this? If the upgrade output in the previous step included a message like the following, then some custom content was found in your old components.xml, and you need to merge the two files:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make a backup copy of your /etc/cloud/management/components.xml file. For example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# mv /etc/cloud/management/components.xml /etc/cloud/management/components.xml-backup" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# cp -ap /etc/cloud/management/components.xml.rpmnew /etc/cloud/management/components.xml" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Merge your changes from the backup file into the new components.xml file." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# vi /etc/cloud/management/components.xml\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you have made changes to your existing copy of the /etc/cloud/management/db.properties file in your previous-version CloudStack installation, the changes will be preserved in the upgrade. However, you need to do the following steps to place these changes in a new version of the file which is compatible with version 4.0.0-incubating." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make a backup copy of your file /etc/cloud/management/db.properties. For example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# mv /etc/cloud/management/db.properties /etc/cloud/management/db.properties-backup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Copy /etc/cloud/management/db.properties.rpmnew to create a new /etc/cloud/management/db.properties:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# cp -ap /etc/cloud/management/db.properties.rpmnew etc/cloud/management/db.properties" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Merge your changes from the backup file into the new db.properties file." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# vi /etc/cloud/management/db.properties" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On the management server node, run the following command. It is recommended that you use the command-line flags to provide your own encryption keys. See Password and Key Encryption in the Installation Guide." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# cloud-setup-encryption -e encryption_type -m management_server_key -k database_key" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When used without arguments, as in the following example, the default encryption type and keys will be used:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) For encryption_type, use file or web to indicate the technique used to pass in the database encryption password. Default: file." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) For management_server_key, substitute the default key that is used to encrypt confidential parameters in the properties file. Default: password. It is highly recommended that you replace this with a more secure value" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) For database_key, substitute the default key that is used to encrypt confidential parameters in the CloudStack database. Default: password. It is highly recommended that you replace this with a more secure value." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Repeat steps 10 - 14 on every management server node. If you provided your own encryption key in step 14, use the same key on all other management servers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Wait until the databases are upgraded. Ensure that the database upgrade is complete. You should see a message like \"Complete! Done.\" After confirmation, start the other Management Servers one at a time by running the same command on each node." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service cloud-usage start" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(KVM only) Additional steps are required for each KVM host. These steps will not affect running guests in the cloud. These steps are required only for clouds using KVM as hosts and only on the KVM hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure your CloudStack package repositories as outlined in the Installation Guide" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service cloud-agent stop" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Update the agent software with one of the following command sets as appropriate." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +" # apt-get update\n" +"# apt-get upgrade cloud-*\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Copy the contents of the agent.properties file to the new agent.properties file by using the following command" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "sed -i 's/com.cloud.agent.resource.computing.LibvirtComputingResource/com.cloud.hypervisor.kvm.resource.LibvirtComputingResource/g' /etc/cloud/agent/agent.properties" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the CloudStack UI as admin, and check the status of the hosts. All hosts should come to Up state (except those that you know to be offline). You may need to wait 20 or 30 minutes, depending on the number of hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Do not proceed to the next step until the hosts show in the Up state. If the hosts do not come to the Up state, contact support." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following script to stop, then start, all Secondary Storage VMs, Console Proxy VMs, and virtual routers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the command once on one management server. Substitute your own IP address of the MySQL instance, the MySQL user to connect as, and the password to use for that user. In addition to those parameters, provide the \"-c\" and \"-r\" arguments. For example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# nohup cloud-sysvmadm -d 192.168.1.5 -u cloud -p password -c -r > sysvm.log 2>&1 &\n" +"# tail -f sysvm.log" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After the script terminates, check the log to verify correct execution:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# tail -f sysvm.log" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The content should be like the following:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"Stopping and starting 1 secondary storage vm(s)...\n" +"Done stopping and starting secondary storage vm(s)\n" +"Stopping and starting 1 console proxy vm(s)...\n" +"Done stopping and starting console proxy vm(s).\n" +"Stopping and starting 4 running routing vm(s)...\n" +"Done restarting router(s).\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you would like additional confirmation that the new system VM templates were correctly applied when these system VMs were rebooted, SSH into the System VM and check the version." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use one of the following techniques, depending on the hypervisor." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "XenServer or KVM:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SSH in by using the link local IP address of the system VM. For example, in the command below, substitute your own path to the private key used to log in to the system VM and your own link local IP." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following commands on the XenServer or KVM host on which the system VM is present:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# ssh -i private-key-path link-local-ip -p 3922\n" +"# cat /etc/cloudstack-release" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The output should be like the following:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "Cloudstack Release 4.0.0-incubating Mon Oct 9 15:10:04 PST 2012" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "ESXi" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SSH in using the private IP address of the system VM. For example, in the command below, substitute your own path to the private key used to log in to the system VM and your own private IP." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following commands on the Management Server:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# ssh -i private-key-path private-ip -p 3922\n" +"# cat /etc/cloudstack-release\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Apply the XenServer hotfix XS602E003 (and any other needed hotfixes) to XenServer v6.0.2 hypervisor hosts." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "/opt/xensource/bin/cloud-clean-vlan.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Prepare the upgrade by running the following on one XenServer host:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "/opt/xensource/bin/cloud-prepare-upgrade.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you see a message like \"can't eject CD\", log in to the VM and umount the CD, then run this script again." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Upload the hotfix to the XenServer hosts. Always start with the Xen pool master, then the slaves. Using your favorite file copy utility (e.g. WinSCP), copy the hotfixes to the host. Place them in a temporary folder such as /root or /tmp." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "xe patch-upload file-name=XS602E003.xsupdate" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# xe vm-list" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# xe vm-migrate live=true host=host-name vm=VM-name" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "# xe host-list" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "xe patch-apply host-uuid=host-uuid uuid=hotfix-uuid" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/opt/xensource/sm/NFSSR.py" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/setupxenserver.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/opt/xensource/bin/setupxenserver.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/make_migratable.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/opt/xensource/bin/make_migratable.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "# tar xf xenserver-cloud-supp.tgz" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "# xe-install-supplemental-pack xenserver-cloud-supp.iso" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "# xe-switch-network-backend bridge" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/opt/xensource/bin/setupxenserver.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "for pbd in `xe pbd-list currently-attached=false| grep ^uuid | awk '{print $NF}'`; do xe pbd-plug uuid=$pbd ; " +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Version 4.0.0-incubating" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "What’s New in 4.0.0-incubating" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Apache CloudStack 4.0.0-incubating includes the following new features:" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Inter-VLAN Routing" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Inter-VLAN Routing is the capability to route network traffic between VLANs. This feature enables you to set up Virtual Private Clouds (VPC) that can hold multi-tier applications. These tiers are deployed on different VLANs that can communicate with each other. You can provision VLANs to the tiers your create, and VMs can be deployed on different tiers, such as Web, Application, or Database. The VLANs are connected to a virtual router, which facilitates communication between the VMs. In effect, you can segment VMs by means of VLANs into different networks that can host multi-tier applications. Such segmentation by means of VLANs logically separate application VMs for higher security and lower broadcasts, while remaining physically connected to the same device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This feature is supported on XenServer and VMware hypervisors." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Site-to-Site VPN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A Site-to-Site VPN connection helps you establish a secure connection from an enterprise datacenter to the cloud infrastructure. This allows users to access the guest VMs by establishing a VPN connection to the virtual router of the account from a device in the datacenter of the enterprise. Having this facility eliminates the need to establish VPN connections to individual VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The supported endpoints on the remote datacenters are:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Cisco ISR with IOS 12.4 or later" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Juniper J-Series routers with JunOS 9.5 or later" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Local Storage Support for Data Volumes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can now create data volumes on local storage. The data volume is placed on the same XenServer host as the VM instance that is attached to the data volume. These local data volumes can be attached to virtual machines, detached, re-attached, and deleted just as with the other types of data volume. In earlier releases of CloudStack, only the root disk could be placed in local storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Local storage is ideal for scenarios where persistence of data volumes and HA is not required. Some of the benefits include reduced disk I/O latency and cost reduction from using inexpensive local disks." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In order for local volumes to be used, the feature must be enabled for the zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can create a data disk offering for local storage. When a user creates a new VM, they can select this disk offering in order to cause the data disk volume to be placed in local storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can not migrate a VM that has a volume in local storage to a different host, nor migrate the volume itself away to a different host. If you want to put a host into maintenance mode, you must first stop any VMs with local data volumes on that host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Local storage support for volumes is available for XenServer, KVM, and VMware hypervisors." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Tags" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A tag is a key-value pair that stores metadata about a resource in the cloud. Tags are useful for categorizing resources. For example, you can tag a user VM with a value that indicates the user's city of residence. In this case, the key would be \"city\" and the value might be \"Toronto\" or \"Tokyo.\" You can then request CloudStack to find all resources that have a given tag; for example, VMs for users in a given city." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can tag a user virtual machine, volume, snapshot, guest network, template, ISO, firewall rule, port forwarding rule, public IP address, security group, load balancer rule, project, VPC, network ACL, or static route. You can not tag a remote access VPN." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can work with tags through the UI or through the new API commands createTags, deleteTags, and listTags. You can define multiple tags for each resource. There is no limit on the number of tags you can define. Each tag can be up to 255 characters long. Users can define tags on the resources they own, and administrators can define tags on any resources in the cloud." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A new optional input parameter, \"tags,\" has been added to many of the list* API commands. The following example shows how to use this new parameter to find all the volumes having tag region=canada OR tag city=Toronto:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "command=listVolumes\n" +"&listAll=true\n" +"&tags[0].key=region\n" +"&tags[0].value=canada\n" +"&tags[1].key=city\n" +"&tags[1].value=Toronto" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following API commands have the new \"tags\" input parameter:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVirtualMachines" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVolumes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listSnapshots" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listNetworks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listTemplates" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listIsos" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listFirewallRules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listPortForwardingRules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listPublicIpAddresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listSecurityGroups" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listLoadBalancerRules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listProjects" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVPCs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listNetworkACLs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listStaticRoutes" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "AWS API Changes for Tags" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Some changes have been made to the Amazon Web Services API compatibility support in order to accommodate the new tagging feature." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New APIs:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New API" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ec2-create-tags" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add tags to one or more resources." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ec2-delete-tags" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Remove tags from one or more resources." +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-describe-tags" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Show currently defined tags." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Changed APIs:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Changed API" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-describe-images" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Output now shows tags defined for each image." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ec2-describe-instances" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following filters can now be passed in to limit the output result set: tag-key, tag-value and tag:key" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ec2-describe-snapshots" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-describe-volumes" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Secure Console Access on XenServer" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "With the addition of Secure Console feature, users can now securely access the VM consoles on the XenServer hypervisor. You can either SSH or use the View Console option in the Management Server to securely connect to the VMs on the XenServer host. The Management Server uses the xapi API to stream the VM consoles. However, there is no change in the way you can access the console of a VM. This feature is supported on XenServer 5.6 and 6.0 versions." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Stopped VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This release supports creating VMs without starting them on the backend. You can determine whether the VM needs to be started as part of the VM deployment. A VM can be deployed in two ways: create and start a VM (the default method); create a VM and leave it in the stopped state." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A new request parameter, startVM, is introduced in the deployVm API to support the stopped VM feature. The possible values are:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "true - The VM starts as a part of the VM deployment" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "false - The VM is left in stopped state at the end of the VM deployment" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Uploading an Existing Volume to a Virtual Machine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Existing data can now be made accessible to a virtual machine. This is called uploading a volume to the VM. For example, this is useful to upload data from a local file system and attach it to a VM. Root administrators, domain administrators, and end users can all upload existing volumes to VMs. The upload is performed by using HTTP. The uploaded volume is placed in the zone's secondary storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This functionality is supported for the following hypervisors:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor : Disk Image Format" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer : VHD" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VMware : OVA" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "KVM : QCOW2" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Dedicated High-Availability Hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "One or more hosts can now be designated for use only by high-availability (HA) enabled VMs that are restarted due to a host failure. Setting up a pool of such dedicated HA hosts as the recovery destination for all HA-enabled VMs make it easier to determine which VMs are restarted as part of the high-availability function. You can designate a host as a dedicated-HA restart node only if the Dedicated HA Hosts feature is enabled by setting the appropriate global configuration parameter." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Support for Amazon Web Services API" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This release supports Amazon Web Services APIs, including Elastic Compute Cloud (EC2) API. Fidelity with the EC2 API and the installation experience for this functionality are both enhanced. In prior releases, users were required to install a separate component called CloudBridge, in addition to installing the Management Server. For new installations of CloudStack 4.0.0-incubating, this software is installed automatically along with CloudStack and runs in a more closely integrated fashion. The feature is disabled by default, but can be easily enabled by setting the appropriate global configuration parameter and performing a few setup steps." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "The Nicira NVP Plugin" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Nicira NVP plug-in allows CloudStack to use the Nicira solution for virtualized network as a provider for CloudStack networks and services. In CloudStack 4.0.0-incubating this plug-in supports the Connectivity service. This service is responsible for creating Layer 2 networks supporting the networks created by guests. When a tenant creates a new network, instead of a traditional VLAN, a logical network will be created by sending the appropriate calls to the Nicira NVP Controller. The plug-in has been tested with Nicira NVP versions 2.1.0, 2.2.0 and 2.2.1." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Support for CAStor Cluster" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CloudStack 4.0.0-incubating supports using a CAStor cluster as the back-end storage system for a CloudStack S3 front-end. The CAStor back-end storage for CloudStack extends the existing storage classes and allows the storage configuration attribute to point to a CAStor cluster. This feature makes use of the CloudStack server's local disk to spool files before writing them to CAStor when handling the PUT operations. However, a file must be successfully written into the CAStor cluster prior to the return of a success code to the S3 client to ensure that the transaction outcome is correctly reported." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The S3 multipart file upload is not supported in this release. You are prompted with proper error message if a multipart upload is attempted." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Clustered Logical Volume Manager Support for KVM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This release adds Clustered Logical Volume Manager (CLVM) storage support for KVM hosts. With this support, you can use CLVM as primary storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The CLVM support for KVM allows root and data disks (primary storage) to reside on Linux logical volumes. The administrators are required to configure CLVM on the KVM hosts independent of CloudStack. When the volume groups are available, an administrator can simply add primary storage of type CLVM, providing the volume group name. Then CloudStack creates and manages logical volumes as needed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CLVM also supports Snapshots. CloudStack creates an LVM snapshot, copy the applicable logical volume to the secondary storage in the qcow2 format, and then delete the LVM snapshot." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Rados Block Device Support for KVM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can now use Rados Block Device (RBD) to run instances on Apache CloudStack 4.0.0-incubating. This can be done by adding a RBD pool as primary storage. Before using RBD, ensure that Qemu is compiled with RBD enabled, and the libvirt version is at least 0.10 with RBD enabled on the KVM host" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a disk offering for RBD so that you can ensure that StoragePoolAllocator chooses the RBD pool to deploy instances." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Issues Fixed in 4.0.0-incubating" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Many bugs include a defect number that reflects the bug number that was held in the bug tracker run by Citrix (bugs.cloudstack.org). The Apache CloudStack project now uses Jira to manage its bugs, so some of the bugs that are referenced here may not be available to view. However, we are still including them for completeness." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Defect" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Many" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vSphere 5.0 now has GA support. Formerly only Beta support was provided." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-16135" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Creating volumes after upgrading from snapshot taken in 2.2.14 no longer deletes the snapshot physically from the secondary storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-16122" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a site-to-site VPN setup, alerts are generated when the VPC virtual router is rebooted with multiple vpn connections." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-16022" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If host connection fails due to a database error, host now disconnects and the Managerment Server id is removed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-16011" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name of network offering is no longer truncated due to too-narrow field width in Add Guest Network dialog box." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15978" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When the virtual router and its host go down, the high availability mechanism now works for the virtual router." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15921" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The 2.2.x security group script now accounts for the VMs created in the version 2.1 timeframe." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15919" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A level parameter is added to the listVolumes command; therefore queries return the response more quickly." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15904" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Upgrade from version 2.2.14 to CloudStack-3.0.5-0.2944-rhel5 works as expected. The upgrade script, /usr/share/cloud/setup/db/schema-2214to30-cleanup.sql, works as expected." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15879" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The database upgrade from version 3.0.4 to 3.0.5 works as expected." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15807" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network label for OVM now available in UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15779" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When the thumbnail is requested, the console session will not be terminated." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15778" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Fetching a VM thumbnail now gets a thumbnail of appropriate visual dimensions." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15734" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "KVM Snapshots no longer shows incorrect disk usage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15733" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The domainId parameter for the listNetworks command now lists the resources belonging to the domain specified." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15676" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Stopping the router no longer fails with the null pointer exception." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15648" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If creating a volume from a snapshot fails, the error is reported on the UI but the volume is stuck in the creating state." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15646" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createFirewallRule API no longer causes null pointer exception." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15628" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a KVM host, the high availability mechanism no longer takes a long time to migrate VMs to another KVM host if there are multiple storage pools." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15627" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Metadata instance-id and vm-id for existing VMs stays the same after upgrade." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15621" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Solved difficulty with allocating disk volumes when running multiple VM deployment in parallel." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15603" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CloudStack now stop the VMs when destroyVM command is called." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15586" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public Vlan for an account no longer fails if multiple physical networks are present." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15582" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The dns-name filter is now supported for ec2-describe-instances in the Amazon Web Services API compatibility commands. The filter maps to the name of a user VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15503" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "An IP address which has static NAT rules can now be released. Subsequently, restarting this network after it was shutdown can succeed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15464" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Can now delete static route whose state is set to Revoke." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15443" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Creating a firewall rule no longer fails with an internal server error." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15398" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Corrected technique for programming DNS on the user VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15356" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Internal DNS 2 entry now correctly shown in UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15335" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The CloudBridge S3 Engine now connects to the database by using the deciphered password in the db.properties file." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15318" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "UI now correctly prevents the user from stopping a VM that is in the Starting state." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15307" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Fixed Japanese localization of instance statuses in the Instances menu." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15278" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The deployment planner no longer takes long time to locate a suitable host to deploy VMs when large number of clusters are present." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15274" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Creating a VLAN range using Zone ID without network ID now succeeds." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15243" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now check to be sure source NAT and VPN have same provider." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15232" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that networks using external load balancer/firewall in 2.2.14 or earlier can properly upgrade." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15200" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "No exception when trying to attach the same volume while attaching the first volume is in progress." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15173" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Additional cluster can no longer be added with same VSM IP address as another cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15167" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "AWS API calls now honor the admin account's ability to view or act on the resources owned by the regular users." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15163" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The minimum limit is not honored when there is not enough capacity to deploy all the VMs and the ec2-run-instances command with the -n >n1 -n2> option is used to deploy multiple VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15157" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Can now add/enable service providers for multiple physical networks through the UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15145" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "AWS API call ec2-register has better error handling for negative cases." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15122" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Filters now supported for AWS API call ec2-describe-availability-zones." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15120" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Actions column in UI of Volume page now shows action links." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15099" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Buttons no longer overlap text on Account Deletion confirmation page in UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15095" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensures you can not create a VM with a CPU frequency greater than the host CPU frequency." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15094" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CPU cap now set properly in VMware." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15077" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NullPointerException is no longer observed while executing the command to list the public IP in a basic zone created with the default shared NetScaler EIP and ELB network offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15044" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "UI now provides option to view the list of instances which are part of the guest network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15026" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "UI in Deploy VM dialog now lists only templates or ISOs depending on which is selected in previous dialog." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14989" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In KVM, the Create Instance wizard now shows only templates from the current (KVM) zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14986, CS-14985" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Listing filters works as expected in the ec2-describe-volumes and ec2-describe-snapshots commands." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14964" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Automatically starting the Console Proxy no longer fails due to its missing volume on the primary storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14907" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "User is now correctly prevented from trying to download an uploaded volume which has not yet been moved to primary storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14879" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a user VM is stopped or terminated, the static NAT associated with this VM is now disabled. This public IP address is no longer owned by this account and can be associated to any other user VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14854" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Only the admin user can change the template permission to Public, so this option is removed from the UI for domain Admins and regular Users." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14817" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "While checking if network has any external provider, CloudStack will consider all providers in the network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14796" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When deploying a VM with ec2-run-instances, userdata is now encoded." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14770" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The API returns the keypair information when a VM is deployed with sshkey. This affects the API commands related to virtual machines (deployVirtualMachine, listVirtualMachines, ... *VirtualMachine), as well as the corresponding AWS APIs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14724" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "UI no longer displays the dropdown list of isolation method choices if sdn.ovs.controller is false." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14345" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Logout API returns XML header." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Host IPs now associated with appropriate IPs according to traffic type." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14253" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Can now delete and re-create port forwarding rule on same firewall." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14452" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Data disk volumes are now automatically copied from one cluster to another." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13539" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Windows VM can get IP after reboot." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13537" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When user tries to delete a domain that contains sub-domains, an error message is now sent to convey the reason for the delete failure." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13153" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "System VMs support HTTP proxy." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-12642" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Added Close button to Select Project list view popup in UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-12510" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Deleting and reinserting host_details no longer causes deadlocks." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-12407" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "F5 and Netscaler - when dedicated is selected, capacity field is disabled." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-12111" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Email validation for edit user form." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-10928" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network read/write values now always positive numbers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15376, CS-15373" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The AWS APIs (EC2 and S3) now listen on the 7080 port and send request to CloudStack on the 8080 port just as any other clients of CloudStack." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13944" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The CloudStack 2.2.x to 3.0.x database upgrade for multiple physical networks is now supported." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15300" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The admin accounts of a domain now honour the limits imposed on that domain just like the regular accounts do. A domain admin now is not allowed to create an unlimited number of instances, volumes, snapshots, and so on." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15396" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The CloudStack database now contain the UUD information after the 2.2.14 to 3.0.4 upgrade." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15450" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Upgrade from 2.2.14 to 3.0.4 no longer fails on a VMware host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15449" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Running cloudstack-aws-api-register no longer fails with the \"User registration failed with error: [Errno 113] No route to host\" error." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15455" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The iptable rules are configured to open the awsapi port (7080) as part of the installation." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15429" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "While creating an instance with data volume, disk offering also is considered while checking the account limit on volume resources." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15414" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After the 2.2.14 to 3.0.4 upgrade, the value of the global parameter xen.guest.network.device is now decrypted before setting the traffic label." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15382" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "During 2.2.14 to 3.0.4 upgrade, the hosts no longer go to the Alert state if destroyed networks existed with non-existent tags prior to upgrade." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15323" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CloudStack supports the following Citrix XenServer hotfixes: XS602E003, XS602E004, and XS602E005." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15430" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create snapshot now fails if creating a snapshot exceeds the snapshot resource limit for a domain admin or a user account." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14256" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Virtual Router no longer remains in starting state for subdomain or user on a KVM 3.0.1 prerlease host on RHEL 6.2." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-7495" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Implemented a variety of Xen management host improvements." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-8105" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NFS v4 for primary storage now works as expected on KVM hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-9989" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The error messages returned during VM deployment failure will have much more details than before." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-12584" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can no longer add security groups not supported by the hypervisor in use." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-12705" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When creating a Network offering by using SRX as the service provider for SourceNAT servcies, an option is given in the CloudStack UI now to set the source_nat type to \"per Zone\"/\"per account\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-12782" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Assigning a VM from Basic to Advanced zone no longer ignores the network ID. A warning message is displayed for VM movements across zones." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-12591" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Broadcast Address on the Second Public IP NIC is now corrected." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13272" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a user is deleted, all the associated properties, such as IPs and virtual routers, are now deleted." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13377" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Creating template from a root disk of a stopped instance now provides an option to make it a \"Featured template\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13500" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Reaching the first guest VM by using its public IP from the second guest VM no longer fails." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13853" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The default gateway can no longer be 0.0.0.0 in the Secondary Storage VM (SSVM)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13863" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The queryAsyncJobResult command in XML format now returns the correct UUIDs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13867" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Corrected CSP xenserver-cloud-supp.tgz for XenServer 5.6 and 6.0." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13904" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Labels and values for the service offerings CPU and memory are now consistent." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13998" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The SSVM kernel panic issue is fixed on XenServer." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14090" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The issue is fixed where running the VMware snapshots randomly fails with the ArrayIndexOutOfBoundsException error." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14021" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The java.lang.OutOfMemoryError is fixed on the Management Server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14025" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Python Eggs are provided to easily package the test client for each branch of CloudStack." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14068" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Resetting the VM password through the CloudStack UI no longer causes any error." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14156" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The pod which has the administrator's virtual router is no longer selected while creating the virtual routers for guests." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14182" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The users can now delete their ISOs as normal users." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14185" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The listOSTypes API now filters out the types of operating system by using the keywords." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14204" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The cloud-setup-bonding.sh command no longer generates the \"command not found\" error." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14214" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Specify VLAN option cannot be enabled now for an isolated Network offering with SourceNAT enabled." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14234" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Sending project invite email to an account now requires SMTP configured in CloudStack." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14237" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The garbage collector of the primary storage no longer fails when the first host in the cluster is not up." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14241" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Custom Volume Disk Offering is now matching the Global configuration value." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14270" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The listNetworks API no longer assumes that the broadcast type is always VLAN." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14319" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The internal name of the VM is no longer present in the error message that is displayed to a domain administrator." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14321" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The listVolumes API call now returns a valid value for the isExtractable parameter for the ISO-derived disk and data disk volumes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14323" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Invalid API calls will now give valid response in json/xml format." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14339" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Custom Disk Size will now allow values larger than 100GB." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14357" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The ConsoleProxyLoadReportCommand is no longer fired continuously." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14421" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Fixed the issue of virtual router deployments. The DHCP entries can now be assigned to the router." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14555" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Unzipped downloaded template MD5SUM will no longer override the zipped template MD5SUM in the database." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14598" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The complete screen of the running VM is now displayed in the console proxy." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14600" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Windows or Linux based consoles are no longer lost upon rebooting VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14784" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Multiple subnets with the same VLAN now work as expected." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13303, 14874, 13897, 13944, 14088, 14190" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A variety of upgrade issues have been fixed in release 3.0.3." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15080" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Setting a private network on a VLAN for VMWare environment is now supported." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15168" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The console proxy now works as expected and no exception is shown in the log after upgrading from version 2.2.14 to 3.0.2." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15172" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Version 3.0.2 now accepts the valid public key." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Known Issues in 4.0.0-incubating" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Issue ID" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CLOUDSTACK-301" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Nexus 1000v DVS integration is not functional" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This source code release includes some partial functionality to support the Cisco Nexus 1000v Distributed Virtual Switch within a VMware hypervisor environment. The functionality is not complete at this time." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CLOUDSTACK-368" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "OVM - cannot create guest VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This source code release has regressed from the CloudStack 2.2.x code and is unable to support Oracle VM (OVM)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CLOUDSTACK-279" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Deleting a project fails when executed by the regular user. This works as expected for root/domain admin. To workaround, perform either of the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use the account cleanup thread which will eventually complete the project deletion." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Execute the call as the root/domain admin on behalf of the regular user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-16067" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The command=listTags&key=city command does not work as expected. The command does not return tags for the resources of the account with the tag, city" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-16063" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The current values of volumes and snapshots are incorrect when using KVM as a host. To fix this, the database upgrade codes, volumes.size and snapshots.size, should be changed to show the virtual sizes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-16058" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Null pointer Exception while deleting the host after moving the host to maintenance state." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-16045" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Only the root administrator can handle the API keys. The domain administrators are not allowed to create, delete, or retrieve API keys for the users in their domain." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-16019" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CIDR list in the Add VPN Customer Gateway dialog does not prompt the user that they can provide a comma separated CIDRs if multiple CIDRs have to be supplied." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-16015" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Deleting a network is not supported when its network providers are disabled." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-16012" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Unable to delete a zone in the UI because the necessary cleanup cannot be completed. When the hosts are removed, the expunge process fails to delete the volumes as no hosts are present to send the commands to. Therefore, the storage pool removal fails, and zone can't be cleaned and deleted." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name of network offering might be truncated due to too-narrow field width in Add Guest Network dialog box." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15789" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Invalid global setting prevents management server to restart. For example, if you configure the \"project.invite.timeout\" parameter to \"300\" and attempt to restart management server, it fails without throwing a warning or setting the value to the default." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15749" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restarting VPC is resulting in intermittent connection loss to the port forwarding and StaticNAT rules." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15690" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The IpAssoc command failed as a part of starting the virtual router, but the final start result is reported as succes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15672, CS-15635" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The FQDN of the VM is not configured if it is deployed as a part of default shared network and isolated guest network (DefaultIsolatedNetworkOfferingWithSourceNatService)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15634" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The FQDN of a VM that is deployed as a part of both a shared network and default isolated guest network has the suffix of the shared network instead of the default isolated guest network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15576" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Stopping a VM on XenServer creates a backlog of API commands. For example, the Attach volume calls become delayed while waiting for the stopVirtualMachine command to be executed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15569" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Misleading error message in the exception when creating a StaticNAT rule fails in a VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15566" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "External device such as Netscaler is not supported in VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15557" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Intermittent traffic loss in the VPN connection if Juniper is the remote router and the life time is 300 seconds." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15361" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Egress rules are not working in NetScaler loadbalancer." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15105" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The cloud-sysvmadm script does not work if the integration.api.port parameter is set to any port other than 8096." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15092" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Connecting to the guest VMs through SSH is extremely slow, and it results in connection timeout." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15037" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hairpin NAT is not supported when NetScaler is used for EIP." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15009" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The port_profile table will not be populated with port profile information. In this release, CloudStack directly connects to the VSM for all the port profile operations; therefore, no port profile information is cached." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14939" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Adding a VMware cluster is not supported when the Management Network is migrated to the Distributed Virtual Switch environment." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14780" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You are allowed to ping the elastic IP address of the VM even though no ingress rule is set that allows the ICMP protocol." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14756" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Installing KVM on RHEL 6.2 will result in unreliable network performance. Workaround: blacklist vhost-net. Edit /etc/modprobe.d/blacklist-kvm.conf and include vhost-net." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14346" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The UpdateVirtualMachine API call does not check whether the VM is stopped. Therefore, stop the VM manually before issuing this call." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14303 (was 14537)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The IP addresses for a shared network are still being consumed even if no services are defined for that network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14296 (was 14530)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "OVM: Network traffic labels are not supported." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14291 (was 14523)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The EIP/ELB network offering for basic zones does not support multiple NetScalers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14275 (was 14506)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "F5: Unable to properly remove a F5 device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14201 (was 14430)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VMWare: Template sizes are being reported different depending on whether the primary storage is using ISCSI or NFS." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13758 (was 13963)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vSphere: template download from templates created off of the root volume does not work properly." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13733 (was 13935)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vSphere: detaching an ISO from a restored VM instance fails." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13682 (was 13883)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Multiple NetScalers are not supported in Basic Networking." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13599 (was 13359)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Programming F5/NetScaler rules can be better optimized." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13337 (was 13518)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Security Groups are not supported in Advanced Networking" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-13173 (was 13336)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vSphere: cross cluster volume migration does not work properly." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-12714 (was 12840)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Capacity view is not available for pods or clusters." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-12624 (was 12741)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vSphere: maintenance mode will not live migrate system VM to another host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15476" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The 2.2.14 to 4.0.0-incubating upgrade fails if multiple untagged physical networks exist before the upgrade." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15407" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After the 2.2.14 to 4.0.0-incubating upgrade, VLAN allocation on multiple physical networks does not happen as expected." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To workaround this issue, follow the instructions given below:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Revert to your 2.2.14 setup." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Stop all the VMs with the isolated virtual networks in your cloud setup." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run following query to find if any networks still have the NICs allocated:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Check if any virtual guest networks have the NICs allocated:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "#SELECT DISTINCT op.id from `cloud`.`op_networks` op JOIN `cloud`.`networks` n on op.id=n.id WHERE nics_count != 0 AND guest_type = 'Virtual'; " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If this returns any network IDs, then ensure the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VMs are stopped." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "No new VM is started." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Shutdown the Management Server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Remove the NICs count for the virtual network IDs returned in step (a), and set the NIC count to 0:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "UPDATE `cloud`.`op_networks` SET nics_count = 0 WHERE id = enter id of virtual network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the Management Server, and wait for all the networks to shut down." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Networks shutdown is determined by the network.gc.interval and network.gc.wait parameters." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that all the networks are shut down and all the guest VNETs are free." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the upgrade script." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This allocates all your guest VNET ranges to the first physical network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "By using the updatePhysicalNetwork API, reconfigure the VNET ranges for each physical network as desired." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start all the VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-14680" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CloudStack and LDAP user validation cannot happen simultaneously because the user password is hashed and stored in the database, and LDAP requires the passwords in plain text." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To work with the LDAP user, the MD5 hash should be disabled in the login process by commenting the following variable in sharedFunctions.js file available at /usr/share/cloud/management/webapps/client/scripts, and restart the cloud-management service." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "var md5HashedLogin = false;" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "However, if md5HashedLogin is set to false, the end user can login with the LDAP credentials but not with the CloudStack user credentials." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CS-15130" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Data disk volumes are not automatically copied from one cluster to another." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "API Changes from 3.0.2 to 4.0.0-incubating" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "New API Commands in 4.0.0-incubating" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createCounter (Adds metric counter)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteCounter (Deletes a counter)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listCounters (List the counters)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createCondition (Creates a condition)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteCondition (Removes a condition)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listConditions (List Conditions for the specific user)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createTags. Add tags to one or more resources. Example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "command=createTags\n" +"&resourceIds=1,10,12\n" +"&resourceType=userVm\n" +"&tags[0].key=region\n" +"&tags[0].value=canada\n" +"&tags[1].key=city\n" +"&tags[1].value=Toronto" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteTags. Remove tags from one or more resources. Example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "command=deleteTags\n" +"&resourceIds=1,12\n" +"&resourceType=Snapshot\n" +"&tags[0].key=city" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listTags (Show currently defined resource tags)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createVPC (Creates a VPC)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVPCs (Lists VPCs)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteVPC (Deletes a VPC)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateVPC (Updates a VPC)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "restartVPC (Restarts a VPC)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createVPCOffering (Creates VPC offering)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateVPCOffering (Updates VPC offering)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteVPCOffering (Deletes VPC offering)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVPCOfferings (Lists VPC offerings)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createPrivateGateway (Creates a private gateway)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listPrivateGateways (List private gateways)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deletePrivateGateway (Deletes a Private gateway)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createNetworkACL (Creates a ACL rule the given network (the network has to belong to VPC))" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteNetworkACL (Deletes a Network ACL)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listNetworkACLs (Lists all network ACLs)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createStaticRoute (Creates a static route)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteStaticRoute (Deletes a static route)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listStaticRoutes (Lists all static routes)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createVpnCustomerGateway (Creates site to site vpn customer gateway)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createVpnGateway (Creates site to site vpn local gateway)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createVpnConnection (Create site to site vpn connection)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteVpnCustomerGateway (Delete site to site vpn customer gateway)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteVpnGateway (Delete site to site vpn gateway)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteVpnConnection (Delete site to site vpn connection)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateVpnCustomerGateway (Update site to site vpn customer gateway)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "resetVpnConnection (Reset site to site vpn connection)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVpnCustomerGateways (Lists site to site vpn customer gateways)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVpnGateways (Lists site 2 site vpn gateways)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVpnConnections (Lists site to site vpn connection gateways)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "markDefaultZoneForAccount (Marks a default zone for the current account)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "uploadVolume (Uploads a data disk)" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Changed API Commands in 4.0.0-incubating" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "API Commands" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "copyTemplate" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "prepareTemplate" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "registerTemplate" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateTemplate" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createProject" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "activateProject" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "suspendProject" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateProject" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listProjectAccounts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createVolume" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "migrateVolume" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "attachVolume" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "detachVolume" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "uploadVolume" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createSecurityGroup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "registerIso" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "copyIso" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateIso" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createIpForwardingRule" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listIpForwardingRules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createLoadBalancerRule" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateLoadBalancerRule" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createSnapshot" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The commands in this list have a single new response parameter, and no other changes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameter: tags(*)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Many other commands also have the new tags(*) parameter in addition to other changes; those commands are listed separately." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "rebootVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "attachIso" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "detachIso" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listLoadBalancerRuleInstances" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "resetPasswordForVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "changeServiceForVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "recoverVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "startVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "migrateVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deployVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "assignVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "restoreVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "stopVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "destroyVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The commands in this list have two new response parameters, and no other changes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: keypair, tags(*)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The commands in this list have the following new parameters, and no other changes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameter: tags (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listF5LoadBalancerNetworks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listNetscalerLoadBalancerNetworks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listSrxFirewallNetworks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateNetwork" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The commands in this list have three new response parameters, and no other changes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: canusefordeploy, vpcid, tags(*)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createZone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateZone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameter: localstorageenabled (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameter: localstorageenabled" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listZones" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "rebootRouter" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "changeServiceForRouter" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "startRouter" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "destroyRouter" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "stopRouter" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: vpcid, nic(*)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateAccount" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "disableAccount" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listAccounts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "markDefaultZoneForAccount" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "enableAccount" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: vpcavailable, vpclimit, vpctotal" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listRouters" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: forvpc (optional), vpcid (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listNetworkOfferings" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: forvpc (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: forvpc" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: details (optional), tags (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: tags(*)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "addTrafficMonitor" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: excludezones (optional), includezones (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createNetwork" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: vpcid (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: tags (optional), vpcid (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: vpcid, tags(*)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: canusefordeploy (optional), forvpc (optional), tags (optional), vpcid (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "restartNetwork" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "enableStaticNat" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameter: networkid (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createDiskOffering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameter: storagetype (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameter: storagetype" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listDiskOfferings" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateDiskOffering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createFirewallRule" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Changed request parameters: ipaddressid (old version - optional, new version - required)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: isoid (optional), tags (optional), templateid (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateStorageNetworkIpRange" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: id, endip, gateway, netmask, networkid, podid, startip, vlan, zoneid" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "reconnectHost" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A new response parameter is added: hahost." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "addCluster" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following request parameters are added:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vsmipaddress (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vsmpassword (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vsmusername (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following parameter is made mandatory: podid" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A new response parameter is added: status" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "prepareHostForMaintenance" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "addSecondaryStorage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A new response parameter is added: defaultzoneid" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "cancelHostMaintenance" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A new response parameter is added: hahost" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "addSwift" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listSwifts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listExternalLoadBalancers" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listCapabilities" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A new response parameter is added: customdiskofferingmaxsize" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A new request parameter is added: startvm (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteStoragePool" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A new request parameter is added: forced (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "addHost" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateHost" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listHosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A new request parameter is added: hahost (optional)" +msgstr "" + diff --git a/docs/pot/Revision_History.pot b/docs/pot/Revision_History.pot new file mode 100644 index 000000000..3f213ced8 --- /dev/null +++ b/docs/pot/Revision_History.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Revision History" +msgstr "" + +#. Tag: firstname +#, no-c-format +msgid "Jessica" +msgstr "" + +#. Tag: surname +#, no-c-format +msgid "Tomechak" +msgstr "" + +#. Tag: member +#, no-c-format +msgid "Initial creation of book by publican" +msgstr "" + diff --git a/docs/pot/Revision_History_Install_Guide.pot b/docs/pot/Revision_History_Install_Guide.pot new file mode 100644 index 000000000..632f931b1 --- /dev/null +++ b/docs/pot/Revision_History_Install_Guide.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Revision History" +msgstr "" + +#. Tag: firstname +#, no-c-format +msgid "Jessica" +msgstr "" + +#. Tag: surname +#, no-c-format +msgid "Tomechak" +msgstr "" + +#. Tag: firstname +#, no-c-format +msgid "Radhika" +msgstr "" + +#. Tag: surname +#, no-c-format +msgid "PC" +msgstr "" + +#. Tag: firstname +#, no-c-format +msgid "Wido" +msgstr "" + +#. Tag: surname +#, no-c-format +msgid "den Hollander" +msgstr "" + +#. Tag: member +#, no-c-format +msgid "Initial publication" +msgstr "" + diff --git a/docs/pot/SSL-keystore-path-and-password.pot b/docs/pot/SSL-keystore-path-and-password.pot new file mode 100644 index 000000000..54955c822 --- /dev/null +++ b/docs/pot/SSL-keystore-path-and-password.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "SSL Keystore Path and Password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the LDAP server requires SSL, you need to enable it in the ldapConfig command by setting the parameters ssl, truststore, and truststorepass. Before enabling SSL for ldapConfig, you need to get the certificate which the LDAP server is using and add it to a trusted keystore. You will need to know the path to the keystore and the password." +msgstr "" + diff --git a/docs/pot/VPN-user-usage-record-format.pot b/docs/pot/VPN-user-usage-record-format.pot new file mode 100644 index 000000000..fd5669107 --- /dev/null +++ b/docs/pot/VPN-user-usage-record-format.pot @@ -0,0 +1,80 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "VPN User Usage Record Format" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "account – name of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "accountid – ID of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "domainid – ID of the domain in which this account resides" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "zoneid – Zone where the usage occurred" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "description – A string describing what the usage record is tracking" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usage – String representation of the usage, including the units of usage (e.g. 'Hrs' for hours)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usagetype – A number representing the usage type (see Usage Types)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "rawusage – A number representing the actual usage in hours" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usageid – VPN user ID" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "startdate, enddate – The range of time for which the usage is aggregated; see Dates in the Usage Record" +msgstr "" + diff --git a/docs/pot/about-clusters.pot b/docs/pot/about-clusters.pot new file mode 100644 index 000000000..8247f2d16 --- /dev/null +++ b/docs/pot/about-clusters.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "About Clusters" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A cluster provides a way to group hosts. To be precise, a cluster is a XenServer server pool, a set of KVM servers, , or a VMware cluster preconfigured in vCenter. The hosts in a cluster all have identical hardware, run the same hypervisor, are on the same subnet, and access the same shared primary storage. Virtual machine instances (VMs) can be live-migrated from one host to another within the same cluster, without interrupting service to the user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A cluster is the third-largest organizational unit within a &PRODUCT; deployment. Clusters are contained within pods, and pods are contained within zones. Size of the cluster is limited by the underlying hypervisor, although the &PRODUCT; recommends less in most cases; see Best Practices." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A cluster consists of one or more hosts and one or more primary storage servers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; allows multiple clusters in a cloud deployment." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Even when local storage is used exclusively, clusters are still required organizationally, even if there is just one host per cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When VMware is used, every VMware cluster is managed by a vCenter server. Administrator must register the vCenter server with &PRODUCT;. There may be multiple vCenter servers per zone. Each vCenter server may manage multiple VMware clusters." +msgstr "" + diff --git a/docs/pot/about-hosts.pot b/docs/pot/about-hosts.pot new file mode 100644 index 000000000..9a5e67c03 --- /dev/null +++ b/docs/pot/about-hosts.pot @@ -0,0 +1,100 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "About Hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A host is a single computer. Hosts provide the computing resources that run the guest virtual machines. Each host has hypervisor software installed on it to manage the guest VMs. For example, a Linux KVM-enabled server, a Citrix XenServer server, and an ESXi server are hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The host is the smallest organizational unit within a &PRODUCT; deployment. Hosts are contained within clusters, clusters are contained within pods, and pods are contained within zones." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hosts in a &PRODUCT; deployment:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide the CPU, memory, storage, and networking resources needed to host the virtual machines" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Interconnect using a high bandwidth TCP/IP network and connect to the Internet" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "May reside in multiple data centers across different geographic locations" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "May have different capacities (different CPU speeds, different amounts of RAM, etc.), although the hosts within a cluster must all be homogeneous" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Additional hosts can be added at any time to provide more capacity for guest VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; automatically detects the amount of CPU and memory resources provided by the Hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hosts are not visible to the end user. An end user cannot determine which host their guest has been assigned to." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For a host to function in &PRODUCT;, you must do the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install hypervisor software on the host" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Assign an IP address to the host" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure the host is connected to the &PRODUCT; Management Server" +msgstr "" + diff --git a/docs/pot/about-password-encryption.pot b/docs/pot/about-password-encryption.pot new file mode 100644 index 000000000..2219780d9 --- /dev/null +++ b/docs/pot/about-password-encryption.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "About Password and Key Encryption" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; stores several sensitive passwords and secret keys that are used to provide security. These values are always automatically encrypted:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Database secret key" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Database password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SSH keys" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Compute node root password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPN password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "User API secret key" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VNC password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; uses the Java Simplified Encryption (JASYPT) library. The data values are encrypted and decrypted using a database secret key, which is stored in one of &PRODUCT;’s internal properties files along with the database password. The other encrypted values listed above, such as SSH keys, are in the &PRODUCT; internal database." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Of course, the database secret key itself can not be stored in the open – it must be encrypted. How then does &PRODUCT; read it? A second secret key must be provided from an external source during Management Server startup. This key can be provided in one of two ways: loaded from a file or provided by the &PRODUCT; administrator. The &PRODUCT; database has a new configuration setting that lets it know which of these methods will be used. If the encryption type is set to \"file,\" the key must be in a file in a known location. If the encryption type is set to \"web,\" the administrator runs the utility com.cloud.utils.crypt.EncryptionSecretKeySender, which relays the key to the Management Server over a known port." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The encryption type, database secret key, and Management Server secret key are set during &PRODUCT; installation. They are all parameters to the &PRODUCT; database setup script (cloud-setup-databases). The default values are file, password, and password. It is, of course, highly recommended that you change these to more secure keys." +msgstr "" + diff --git a/docs/pot/about-physical-networks.pot b/docs/pot/about-physical-networks.pot new file mode 100644 index 000000000..734803c23 --- /dev/null +++ b/docs/pot/about-physical-networks.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "About Physical Networks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Part of adding a zone is setting up the physical network. One or (in an advanced zone) more physical networks can be associated with each zone. The network corresponds to a NIC on the hypervisor host. Each physical network can carry one or more types of network traffic. The choices of traffic type for each network vary depending on whether you are creating a zone with basic networking or advanced networking." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A physical network is the actual network hardware and wiring in a zone. A zone can have multiple physical networks. An administrator can:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add/Remove/Update physical networks in a zone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure VLANs on the physical network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure a name so the network can be recognized by hypervisors" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure the service providers (firewalls, load balancers, etc.) available on a physical network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure the IP addresses trunked to a physical network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Specify what type of traffic is carried on the physical network, as well as other properties like network speed" +msgstr "" + diff --git a/docs/pot/about-pods.pot b/docs/pot/about-pods.pot new file mode 100644 index 000000000..f80760c06 --- /dev/null +++ b/docs/pot/about-pods.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "About Pods" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A pod often represents a single rack. Hosts in the same pod are in the same subnet." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A pod is the second-largest organizational unit within a &PRODUCT; deployment. Pods are contained within zones. Each zone can contain one or more pods." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Pods are not visible to the end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A pod consists of one or more clusters of hosts and one or more primary storage servers." +msgstr "" + diff --git a/docs/pot/about-primary-storage.pot b/docs/pot/about-primary-storage.pot new file mode 100644 index 000000000..c2ba52678 --- /dev/null +++ b/docs/pot/about-primary-storage.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "About Primary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Primary storage is associated with a cluster, and it stores the disk volumes for all the VMs running on hosts in that cluster. You can add multiple primary storage servers to a cluster. At least one is required. It is typically located close to the hosts for increased performance." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; is designed to work with all standards-compliant iSCSI and NFS servers that are supported by the underlying hypervisor, including, for example:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Dell EqualLogicâ„¢ for iSCSI" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network Appliances filers for NFS and iSCSI" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Scale Computing for NFS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you intend to use only local disk for your installation, you can skip to Add Secondary Storage." +msgstr "" + diff --git a/docs/pot/about-secondary-storage.pot b/docs/pot/about-secondary-storage.pot new file mode 100644 index 000000000..4543890df --- /dev/null +++ b/docs/pot/about-secondary-storage.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "About Secondary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Secondary storage is associated with a zone, and it stores the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Templates — OS images that can be used to boot VMs and can include additional configuration information, such as installed applications" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ISO images — disc images containing data or bootable media for operating systems" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Disk volume snapshots — saved copies of VM data which can be used for data recovery or to create new templates" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The items in zone-based NFS secondary storage are available to all hosts in the zone. &PRODUCT; manages the allocation of guest virtual disks to particular primary storage devices." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To make items in secondary storage available to all hosts throughout the cloud, you can add OpenStack Object Storage (Swift, swift.openstack.org) in addition to the zone-based NFS secondary storage. When using Swift, you configure Swift storage for the entire &PRODUCT;, then set up NFS secondary storage for each zone as usual. The NFS storage in each zone acts as a staging area through which all templates and other secondary storage data pass before being forwarded to Swift. The Swift storage acts as a cloud-wide resource, making templates and other data available to any zone in the cloud. There is no hierarchy in the Swift storage, just one Swift container per storage object. Any secondary storage in the whole cloud can pull a container from Swift at need. It is not necessary to copy templates and snapshots from one zone to another, as would be required when using zone NFS alone. Everything is available everywhere." +msgstr "" + diff --git a/docs/pot/about-security-groups.pot b/docs/pot/about-security-groups.pot new file mode 100644 index 000000000..2acdbb4b4 --- /dev/null +++ b/docs/pot/about-security-groups.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "About Security Groups" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Security groups provide a way to isolate traffic to VMs. A security group is a group of VMs that filter their incoming and outgoing traffic according to a set of rules, called ingress and egress rules. These rules filter network traffic according to the IP address that is attempting to communicate with the VM. Security groups are particularly useful in zones that use basic networking, because there is a single guest network for all guest VMs. In &PRODUCT; 3.0.3 - 3.0.5, security groups are supported only in zones that use basic networking." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a zone that uses advanced networking, you can instead define multiple guest networks to isolate traffic to VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Each &PRODUCT; account comes with a default security group that denies all inbound traffic and allows all outbound traffic. The default security group can be modified so that all new VMs inherit some other desired set of rules." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Any &PRODUCT; user can set up any number of additional security groups. When a new VM is launched, it is assigned to the default security group unless another user-defined security group is specified. A VM can be a member of any number of security groups. Once a VM is assigned to a security group, it remains in that group for its entire lifetime; you can not move a running VM from one security group to another." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can modify a security group by deleting or adding any number of ingress and egress rules. When you do, the new rules apply to all VMs in the group, whether running or stopped." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If no ingress rules are specified, then no traffic will be allowed in, except for responses to any traffic that has been allowed out through an egress rule." +msgstr "" + diff --git a/docs/pot/about-virtual-networks.pot b/docs/pot/about-virtual-networks.pot new file mode 100644 index 000000000..7d396bf51 --- /dev/null +++ b/docs/pot/about-virtual-networks.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "About Virtual Networks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A virtual network is a logical construct that enables multi-tenancy on a single physical network. In &PRODUCT; a virtual network can be shared or isolated." +msgstr "" + diff --git a/docs/pot/about-working-with-vms.pot b/docs/pot/about-working-with-vms.pot new file mode 100644 index 000000000..1b566121b --- /dev/null +++ b/docs/pot/about-working-with-vms.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "About Working with Virtual Machines" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; provides administrators with complete control over the lifecycle of all guest VMs executing in the cloud. &PRODUCT; provides several guest management operations for end users and administrators. VMs may be stopped, started, rebooted, and destroyed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest VMs have a name and group. VM names and groups are opaque to &PRODUCT; and are available for end users to organize their VMs. Each VM can have three names for use in different contexts. Only two of these names can be controlled by the user:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Instance name – a unique, immutable ID that is generated by &PRODUCT; and can not be modified by the user. This name conforms to the requirements in IETF RFC 1123." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Display name – the name displayed in the &PRODUCT; web UI. Can be set by the user. Defaults to instance name." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name – host name that the DHCP server assigns to the VM. Can be set by the user. Defaults to instance name" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest VMs can be configured to be Highly Available (HA). An HA-enabled VM is monitored by the system. If the system detects that the VM is down, it will attempt to restart the VM, possibly on a different host. For more information, see HA-Enabled Virtual Machines on" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Each new VM is allocated one public IP address. When the VM is started, &PRODUCT; automatically creates a static NAT between this public IP address and the private IP address of the VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If elastic IP is in use (with the NetScaler load balancer), the IP address initially allocated to the new VM is not marked as elastic. The user must replace the automatically configured IP with a specifically acquired elastic IP, and set up the static NAT mapping between this new IP and the guest VM’s private IP. The VM’s original IP address is then released and returned to the pool of available public IPs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; cannot distinguish a guest VM that was shut down by the user (such as with the “shutdown†command in Linux) from a VM that shut down unexpectedly. If an HA-enabled VM is shut down from inside the VM, &PRODUCT; will restart it. To shut down an HA-enabled VM, you must go through the &PRODUCT; UI or API." +msgstr "" + diff --git a/docs/pot/about-zones.pot b/docs/pot/about-zones.pot new file mode 100644 index 000000000..c9111a7e4 --- /dev/null +++ b/docs/pot/about-zones.pot @@ -0,0 +1,100 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "About Zones" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A zone is the largest organizational unit within a &PRODUCT; deployment. A zone typically corresponds to a single datacenter, although it is permissible to have multiple zones in a datacenter. The benefit of organizing infrastructure into zones is to provide physical isolation and redundancy. For example, each zone can have its own power supply and network uplink, and the zones can be widely separated geographically (though this is not required)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A zone consists of:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "One or more pods. Each pod contains one or more clusters of hosts and one or more primary storage servers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Secondary storage, which is shared by all the pods in the zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Zones are visible to the end user. When a user starts a guest VM, the user must select a zone for their guest. Users might also be required to copy their private templates to additional zones to enable creation of guest VMs using their templates in those zones." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Zones can be public or private. Public zones are visible to all users. This means that any user may create a guest in that zone. Private zones are reserved for a specific domain. Only users in that domain or its subdomains may create guests in that zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hosts in the same zone are directly accessible to each other without having to go through a firewall. Hosts in different zones can access each other through statically configured VPN tunnels." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For each zone, the administrator must decide the following." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "How many pods to place in a zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "How many clusters to place in each pod." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "How many hosts to place in each cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "How many primary storage servers to place in each cluster and total capacity for the storage servers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "How much secondary storage to deploy in a zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you add a new zone, you will be prompted to configure the zone’s physical network and add the first pod, cluster, host, primary storage, and secondary storage." +msgstr "" + diff --git a/docs/pot/accept-membership-invite.pot b/docs/pot/accept-membership-invite.pot new file mode 100644 index 000000000..977962aa1 --- /dev/null +++ b/docs/pot/accept-membership-invite.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Accepting a Membership Invitation" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you have received an invitation to join a &PRODUCT; project, and you want to accept the invitation, follow these steps:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select View, choose Invitations." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you see the invitation listed onscreen, click the Accept button." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Invitations listed on screen were sent to you using your &PRODUCT; account name." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you received an email invitation, click the Enter Token button, and provide the project ID and unique ID code (token) from the email." +msgstr "" + diff --git a/docs/pot/accessing-vms.pot b/docs/pot/accessing-vms.pot new file mode 100644 index 000000000..2ca92867a --- /dev/null +++ b/docs/pot/accessing-vms.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Accessing VMs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Any user can access their own virtual machines. The administrator can access all VMs running in the cloud." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To access a VM through the &PRODUCT; UI:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as a user or admin." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Instances, then click the name of a running VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the View Console button ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To access a VM directly over the network:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The VM must have some port open to incoming traffic. For example, in a basic zone, a new VM might be assigned to a security group which allows incoming traffic. This depends on what security group you picked when creating the VM. In other cases, you can open a port by setting up a port forwarding policy. See IP Forwarding and Firewalling." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If a port is open but you can not access the VM using ssh, it’s possible that ssh is not already enabled on the VM. This will depend on whether ssh is enabled in the template you picked when creating the VM. Access the VM through the &PRODUCT; UI and enable ssh on the machine using the commands for the VM’s operating system." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the network has an external firewall device, you will need to create a firewall rule to allow access. See IP Forwarding and Firewalling." +msgstr "" + diff --git a/docs/pot/accounts-users-domains.pot b/docs/pot/accounts-users-domains.pot new file mode 100644 index 000000000..542934b8c --- /dev/null +++ b/docs/pot/accounts-users-domains.pot @@ -0,0 +1,100 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Accounts, Users, and Domains" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Accounts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "An account typically represents a customer of the service provider or a department in a large organization. Multiple users can exist in an account." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Domains" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Accounts are grouped by domains. Domains usually contain multiple 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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For each account created, the Cloud installation creates three different types of user accounts: root administrator, domain administrator, and user." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Users" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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. The same user cannot belong to multiple accounts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Username is unique in a domain across accounts in that domain. The same username can exist in other domains, including sub-domains. Domain name can repeat only if the full pathname from root is unique. For example, you can create root/d1, as well as root/foo/d1, and root/sales/d1." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Domain Administrators" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Root Administrator" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Root administrators have complete access to the system, including managing templates, service offerings, customer care administrators, and domains" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The resources belong to the account, not individual users in that account. For example, billing, resource limits, and so on are maintained by the account, not the users. A user can operate on any resource in the account provided the user has privileges for that operation. The privileges are determined by the role." +msgstr "" + diff --git a/docs/pot/accounts.pot b/docs/pot/accounts.pot new file mode 100644 index 000000000..1c37079b7 --- /dev/null +++ b/docs/pot/accounts.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Accounts" +msgstr "" + diff --git a/docs/pot/acquire-new-ip-address.pot b/docs/pot/acquire-new-ip-address.pot new file mode 100644 index 000000000..16b584783 --- /dev/null +++ b/docs/pot/acquire-new-ip-address.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Acquiring a New IP Address" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the name of the network where you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click View IP Addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Acquire New IP, and click Yes in the confirmation dialog." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You are prompted for confirmation because, typically, IP addresses are a limited resource. Within a few moments, the new IP address should appear with the state Allocated. You can now use the IP address in port forwarding or static NAT rules." +msgstr "" + diff --git a/docs/pot/acquire-new-ip-for-vpc.pot b/docs/pot/acquire-new-ip-for-vpc.pot new file mode 100644 index 000000000..b11b61eb0 --- /dev/null +++ b/docs/pot/acquire-new-ip-for-vpc.pot @@ -0,0 +1,115 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Acquiring a New IP Address for a VPC" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you acquire an IP address, all IP addresses are allocated to VPC, not to the guest networks within the VPC. The IPs are associated to the guest network only when the first port-forwarding, load balancing, or Static NAT rule is created for the IP or the network. IP can't be associated to more than one network at a time." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VPCs that you have created for the account is listed in the page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Configure button of the VPC to which you want to deploy the VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The VPC page is displayed where all the tiers you created are listed in a diagram." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Settings icon." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following options are displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Addresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateways" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Site-to-Site VPN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network ACLs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select IP Addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The IP Addresses page is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Acquire New IP, and click Yes in the confirmation dialog." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You are prompted for confirmation because, typically, IP addresses are a limited resource. Within a few moments, the new IP address should appear with the state Allocated. You can now use the IP address in port forwarding, load balancing, and static NAT rules." +msgstr "" + diff --git a/docs/pot/add-additional-guest-network.pot b/docs/pot/add-additional-guest-network.pot new file mode 100644 index 000000000..a673cbc9e --- /dev/null +++ b/docs/pot/add-additional-guest-network.pot @@ -0,0 +1,80 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding an Additional Guest Network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add guest network. Provide the following information:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name: The name of the network. This will be user-visible." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Display Text: The description of the network. This will be user-visible." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Zone. The name of the zone this network applies to. Each zone is a broadcast domain, and therefore each zone has a different IP range for the guest network. The administrator must configure the IP range for each zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network offering: If the administrator has configured multiple network offerings, select the one you want to use for this network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest Gateway: The gateway that the guests should use." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest Netmask: The netmask in use on the subnet the guests will use." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Create." +msgstr "" + diff --git a/docs/pot/add-clusters-kvm-xenserver.pot b/docs/pot/add-clusters-kvm-xenserver.pot new file mode 100644 index 000000000..97fb78c96 --- /dev/null +++ b/docs/pot/add-clusters-kvm-xenserver.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Add Cluster: KVM or XenServer" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "These steps assume you have already installed the hypervisor on the hosts and logged in to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Infrastructure. In Zones, click View More, then click the zone in which you want to add the cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Compute tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Clusters node of the diagram, click View All." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add Cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose the hypervisor type for this cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose the pod in which you want to create the cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Enter a name for the cluster. This can be text of your choosing and is not used by &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK." +msgstr "" + diff --git a/docs/pot/add-clusters-ovm.pot b/docs/pot/add-clusters-ovm.pot new file mode 100644 index 000000000..25ad8ce2c --- /dev/null +++ b/docs/pot/add-clusters-ovm.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Add Cluster: OVM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To add a Cluster of hosts that run Oracle VM (OVM):" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add a companion non-OVM cluster to the Pod. This cluster provides an environment where the &PRODUCT; System VMs can run. You should have already installed a non-OVM hypervisor on at least one Host to prepare for this step. Depending on which hypervisor you used:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For VMWare, follow the steps in Add Cluster: vSphere. When finished, return here and continue with the next step." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For KVM or XenServer, follow the steps in . When finished, return here and continue with the next step" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Infrastructure. In Zones, click View More, then click the zone in which you want to add the cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Compute tab. In the Pods node, click View All. Select the same pod you used in step 1." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click View Clusters, then click Add Cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Add Cluster dialog is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Hypervisor, choose OVM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Cluster, enter a name for the cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add." +msgstr "" + diff --git a/docs/pot/add-clusters-vsphere.pot b/docs/pot/add-clusters-vsphere.pot new file mode 100644 index 000000000..2c4ebe4e3 --- /dev/null +++ b/docs/pot/add-clusters-vsphere.pot @@ -0,0 +1,125 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Add Cluster: vSphere" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Host management for vSphere is done through a combination of vCenter and the &PRODUCT; admin UI. &PRODUCT; requires that all hosts be in a &PRODUCT; cluster, but the cluster may consist of a single host. As an administrator you must decide if you would like to use clusters of one host or of multiple hosts. Clusters of multiple hosts allow for features like live migration. Clusters also require shared storage such as NFS or iSCSI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For vSphere servers, we recommend creating the cluster of hosts in vCenter and then adding the entire cluster to &PRODUCT;. Follow these requirements:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Do not put more than 8 hosts in a vSphere cluster" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure the hypervisor hosts do not have any VMs already running before you add them to &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To add a vSphere cluster to &PRODUCT;:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create the cluster of hosts in vCenter. Follow the vCenter instructions to do this. You will create a cluster that looks something like this in vCenter." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Infrastructure. In Zones, click View More, then click the zone in which you want to add the cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Compute tab, and click View All on Pods. Choose the pod to which you want to add the cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click View Clusters." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add Cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Hypervisor, choose VMware." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide the following information in the dialog. The fields below make reference to values from vCenter." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Cluster Name. Enter the name of the cluster you created in vCenter. For example, \"cloud.cluster.2.2.1\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vCenter Host. Enter the hostname or IP address of the vCenter server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vCenter Username. Enter the username that &PRODUCT; should use to connect to vCenter. This user must have all administrative privileges." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vCenter Password. Enter the password for the user named above" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vCenter Datacenter. Enter the vCenter datacenter that the cluster is in. For example, \"cloud.dc.VM\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There might be a slight delay while the cluster is provisioned. It will automatically display in the UI" +msgstr "" + diff --git a/docs/pot/add-gateway-vpc.pot b/docs/pot/add-gateway-vpc.pot new file mode 100644 index 000000000..a73b92ad5 --- /dev/null +++ b/docs/pot/add-gateway-vpc.pot @@ -0,0 +1,145 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding a Private Gateway to a VPC" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A private gateway can be added by the root admin only. The VPC private network has 1:1 relationship with the NIC of the physical network. No gateways with duplicated VLAN and IP are allowed in the same data center." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VPCs that you have created for the account is listed in the page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Configure button of the VPC to which you want to configure load balancing rules." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The VPC page is displayed where all the tiers you created are listed in a diagram." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Settings icon." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following options are displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Addresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Private Gateways" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Site-to-Site VPN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network ACLs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select Private Gateways." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Gateways page is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add new gateway:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Specify the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Physical Network: The physical network you have created in the zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Address: The IP address associated with the VPC gateway." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateway: The gateway through which the traffic is routed to and from the VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Netmask: The netmask associated with the VPC gateway." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN: The VLAN associated with the VPC gateway." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The new gateway appears in the list. You can repeat these steps to add more gateway for this VPC." +msgstr "" + diff --git a/docs/pot/add-ingress-egress-rules.pot b/docs/pot/add-ingress-egress-rules.pot new file mode 100644 index 000000000..c0d3e4eef --- /dev/null +++ b/docs/pot/add-ingress-egress-rules.pot @@ -0,0 +1,125 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding Ingress and Egress Rules to a Security Group" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select view, choose Security Groups, then click the security group you want ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To add an ingress rule, click the Ingress Rules tab and fill out the following fields to specify what network traffic is allowed into VM instances in this security group. If no ingress rules are specified, then no traffic will be allowed in, except for responses to any traffic that has been allowed out through an egress rule." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add by CIDR/Account. Indicate whether the source of the traffic will be defined by IP address (CIDR) or an existing security group in a &PRODUCT; account (Account). Choose Account if you want to allow incoming traffic from all VMs in another security group" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Protocol. The networking protocol that sources will use to send traffic to the security group. TCP and UDP are typically used for data exchange and end-user communications. ICMP is typically used to send error messages or network monitoring data." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start Port, End Port. (TCP, UDP only) A range of listening ports that are the destination for the incoming traffic. If you are opening a single port, use the same number in both fields." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ICMP Type, ICMP Code. (ICMP only) The type of message and error code that will be accepted." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CIDR. (Add by CIDR only) To accept only traffic from IP addresses within a particular address block, enter a CIDR or a comma-separated list of CIDRs. The CIDR is the base IP address of the incoming traffic. For example, 192.168.0.0/22. To allow all CIDRs, set to 0.0.0.0/0." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Account, Security Group. (Add by Account only) To accept only traffic from another security group, enter the &PRODUCT; account and name of a security group that has already been defined in that account. To allow traffic between VMs within the security group you are editing now, enter the same name you used in step 7." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following example allows inbound HTTP access from anywhere:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To add an egress rule, click the Egress Rules tab and fill out the following fields to specify what type of traffic is allowed to be sent out of VM instances in this security group. If no egress rules are specified, then all traffic will be allowed out. Once egress rules are specified, the following types of traffic are allowed out: traffic specified in egress rules; queries to DNS and DHCP servers; and responses to any traffic that has been allowed in through an ingress rule" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add by CIDR/Account. Indicate whether the destination of the traffic will be defined by IP address (CIDR) or an existing security group in a &PRODUCT; account (Account). Choose Account if you want to allow outgoing traffic to all VMs in another security group." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Protocol. The networking protocol that VMs will use to send outgoing traffic. TCP and UDP are typically used for data exchange and end-user communications. ICMP is typically used to send error messages or network monitoring data." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start Port, End Port. (TCP, UDP only) A range of listening ports that are the destination for the outgoing traffic. If you are opening a single port, use the same number in both fields." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ICMP Type, ICMP Code. (ICMP only) The type of message and error code that will be sent" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CIDR. (Add by CIDR only) To send traffic only to IP addresses within a particular address block, enter a CIDR or a comma-separated list of CIDRs. The CIDR is the base IP address of the destination. For example, 192.168.0.0/22. To allow all CIDRs, set to 0.0.0.0/0." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Account, Security Group. (Add by Account only) To allow traffic to be sent to another security group, enter the &PRODUCT; account and name of a security group that has already been defined in that account. To allow traffic between VMs within the security group you are editing now, enter its name." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add." +msgstr "" + diff --git a/docs/pot/add-iso.pot b/docs/pot/add-iso.pot new file mode 100644 index 000000000..eb1e630c7 --- /dev/null +++ b/docs/pot/add-iso.pot @@ -0,0 +1,215 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding an ISO" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To make additional operating system or other software available for use with guest VMs, you can add an ISO. The ISO is typically thought of as an operating system image, but you can also add ISOs for other types of software, such as desktop applications that you want to be installed as part of a template." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Templates." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select View, choose ISOs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add ISO." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Add ISO screen, provide the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name: Short name for the ISO image. For example, CentOS 6.2 64-bit." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description: Display test for the ISO image. For example, CentOS 6.2 64-bit." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "URL: The URL that hosts the ISO image. The Management Server must be able to access this location via HTTP. If needed you can place the ISO image directly on the Management Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Zone: Choose the zone where you want the ISO to be available, or All Zones to make it available throughout &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Bootable: Whether or not a guest could boot off this ISO image. For example, a CentOS ISO is bootable, a Microsoft Office ISO is not bootable." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "OS Type: This helps &PRODUCT; and the hypervisor perform certain operations and make assumptions that improve the performance of the guest. Select one of the following." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the operating system of your desired ISO image is listed, choose it." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the OS Type of the ISO is not listed or if the ISO is not bootable, choose Other." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(XenServer only) If you want to boot from this ISO in PV mode, choose Other PV (32-bit) or Other PV (64-bit)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(KVM only) If you choose an OS that is PV-enabled, the VMs created from this ISO will have a SCSI (virtio) root disk. If the OS is not PV-enabled, the VMs will have an IDE root disk. The PV-enabled types are:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Fedora 13" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Fedora 12" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Fedora 11" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Fedora 10" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Fedora 9" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Other PV" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Debian GNU/Linux" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CentOS 5.3" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CentOS 5.4" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CentOS 5.5" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Red Hat Enterprise Linux 5.3" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Red Hat Enterprise Linux 5.4" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Red Hat Enterprise Linux 5.5" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Red Hat Enterprise Linux 6" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "It is not recommended to choose an older version of the OS than the version in the image. For example, choosing CentOS 5.4 to support a CentOS 6.2 image will usually not work. In these cases, choose Other." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Extractable: Choose Yes if the ISO should be available for extraction." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public: Choose Yes if this ISO should be available to other users." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Featured: Choose Yes if you would like this ISO to be more prominent for users to select. The ISO will appear in the Featured ISOs list. Only an administrator can make an ISO Featured." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Server will download the ISO. Depending on the size of the ISO, this may take a long time. The ISO status column will display Ready once it has been successfully downloaded into secondary storage. Clicking Refresh updates the download percentage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Important: Wait for the ISO to finish downloading. If you move on to the next task and try to use the ISO right away, it will appear to fail. The entire ISO must be available before &PRODUCT; can work with it." +msgstr "" + diff --git a/docs/pot/add-load-balancer-rule.pot b/docs/pot/add-load-balancer-rule.pot new file mode 100644 index 000000000..b2f82e0dd --- /dev/null +++ b/docs/pot/add-load-balancer-rule.pot @@ -0,0 +1,110 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding a Load Balancer Rule" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the name of the network where you want to load balance the traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click View IP Addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the IP address for which you want to create the rule, then click the Configuration tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Load Balancing node of the diagram, click View All." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a Basic zone, you can also create a load balancing rule without acquiring or selecting an IP address. &PRODUCT; internally assign an IP when you create the load balancing rule, which is listed in the IP Addresses page when the rule is created." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To do that, select the name of the network, then click Add Load Balancer tab. Continue with ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Fill in the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name: A name for the load balancer rule." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public Port: The port receiving incoming traffic to be balanced." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Private Port: The port that the VMs will use to receive the traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Algorithm: Choose the load balancing algorithm you want &PRODUCT; to use. &PRODUCT; supports a variety of well-known algorithms. If you are not familiar with these choices, you will find plenty of information about them on the Internet." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Stickiness: (Optional) Click Configure and choose the algorithm for the stickiness policy. See Sticky Session Policies for Load Balancer Rules." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add VMs, then select two or more VMs that will divide the load of incoming traffic, and click Apply." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The new load balancer rule appears in the list. You can repeat these steps to add more load balancer rules for this IP address." +msgstr "" + diff --git a/docs/pot/add-loadbalancer-rule-vpc.pot b/docs/pot/add-loadbalancer-rule-vpc.pot new file mode 100644 index 000000000..15b5d76a5 --- /dev/null +++ b/docs/pot/add-loadbalancer-rule-vpc.pot @@ -0,0 +1,180 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding Load Balancing Rules on a VPC" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A &PRODUCT; user or administrator may create load balancing rules that balance traffic received at a public IP to one or more VMs that belong to a network tier that provides load balancing service in a VPC. A user creates a rule, specifies an algorithm, and assigns the rule to a set of VMs within a VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VPCs that you have created for the account is listed in the page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Configure button of the VPC to which you want to configure load balancing rules." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The VPC page is displayed where all the tiers you created are listed in a diagram." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Settings icon." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following options are displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Addresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateways" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Site-to-Site VPN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network ACLs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select IP Addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The IP Addresses page is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the IP address for which you want to create the rule, then click the Configuration tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Load Balancing node of the diagram, click View All." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select the tier to which you want to apply the rule." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a VPC, the load balancing service is supported only on a single tier." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Specify the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name: A name for the load balancer rule." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public Port: The port that receives the incoming traffic to be balanced." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Private Port: The port that the VMs will use to receive the traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Algorithm. Choose the load balancing algorithm you want &PRODUCT; to use. &PRODUCT; supports the following well-known algorithms:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Round-robin" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Least connections" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Source" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Stickiness. (Optional) Click Configure and choose the algorithm for the stickiness policy. See Sticky Session Policies for Load Balancer Rules." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add VMs: Click Add VMs, then select two or more VMs that will divide the load of incoming traffic, and click Apply." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The new load balancing rule appears in the list. You can repeat these steps to add more load balancing rules for this IP address." +msgstr "" + diff --git a/docs/pot/add-members-to-projects.pot b/docs/pot/add-members-to-projects.pot new file mode 100644 index 000000000..f3a581792 --- /dev/null +++ b/docs/pot/add-members-to-projects.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding Members to a Project" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New members can be added to a project by the project’s administrator, the domain administrator of the domain where the project resides or any parent domain, or the &PRODUCT; root administrator. There are two ways to add members in &PRODUCT;, but only one way is enabled at a time:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If invitations have been enabled, you can send invitations to new members." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If invitations are not enabled, you can add members directly through the UI." +msgstr "" + diff --git a/docs/pot/add-more-clusters.pot b/docs/pot/add-more-clusters.pot new file mode 100644 index 000000000..d2d1d8dda --- /dev/null +++ b/docs/pot/add-more-clusters.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Add More Clusters (Optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You need to tell &PRODUCT; about the hosts that it will manage. Hosts exist inside clusters, so before you begin adding hosts to the cloud, you must add at least one cluster." +msgstr "" + diff --git a/docs/pot/add-password-management-to-templates.pot b/docs/pot/add-password-management-to-templates.pot new file mode 100644 index 000000000..0a0df6f65 --- /dev/null +++ b/docs/pot/add-password-management-to-templates.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding Password Management to Your Templates" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; provides an optional password reset feature that allows users to set a temporary admin or root password as well as reset the existing admin or root password from the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To enable the Reset Password feature, you will need to download an additional script to patch your template. When you later upload the template into &PRODUCT;, you can specify whether reset admin/root password feature should be enabled for this template." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The password management feature works always resets the account password on instance boot. The script does an HTTP call to the virtual router to retrieve the account password that should be set. As long as the virtual router is accessible the guest will have access to the account password that should be used. When the user requests a password reset the management server generates and sends a new password to the virtual router for the account. Thus an instance reboot is necessary to effect any password changes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the script is unable to contact the virtual router during instance boot it will not set the password but boot will continue normally." +msgstr "" + diff --git a/docs/pot/add-portforward-rule-vpc.pot b/docs/pot/add-portforward-rule-vpc.pot new file mode 100644 index 000000000..1700043e3 --- /dev/null +++ b/docs/pot/add-portforward-rule-vpc.pot @@ -0,0 +1,155 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding a Port Forwarding Rule on a VPC" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VPCs that you have created for the account is listed in the page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Configure button of the VPC to which you want to deploy the VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The VPC page is displayed where all the tiers you created are listed in a diagram." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Settings icon." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following options are displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Addresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateways" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Site-to-Site VPN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network ACLs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose an existing IP address or acquire a new IP address. Click the name of the IP address in the list." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The IP Addresses page is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the IP address for which you want to create the rule, then click the Configuration tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Port Forwarding node of the diagram, click View All." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select the tier to which you want to apply the rule." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Specify the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public Port: The port to which public traffic will be addressed on the IP address you acquired in the previous step." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Private Port: The port on which the instance is listening for forwarded public traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Protocol: The communication protocol in use between the two ports." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "TCP" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "UDP" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add VM: Click Add VM. Select the name of the instance to which this rule applies, and click Apply." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can test the rule by opening an ssh session to the instance." +msgstr "" + diff --git a/docs/pot/add-primary-storage.pot b/docs/pot/add-primary-storage.pot new file mode 100644 index 000000000..bac6723ef --- /dev/null +++ b/docs/pot/add-primary-storage.pot @@ -0,0 +1,145 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding Primary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that nothing stored on the server. Adding the server to CloudStack will destroy any existing data." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you create a new zone, the first primary storage is added as part of that procedure. You can add primary storage servers at any time, such as when adding a new cluster or adding more servers to an existing cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Infrastructure. In Zones, click View More, then click the zone in which you want to add the primary storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Compute tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Primary Storage node of the diagram, click View All." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add Primary Storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide the following information in the dialog. The information required varies depending on your choice in Protocol." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Pod. The pod for the storage device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Cluster. The cluster for the storage device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name. The name of the storage device" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Protocol. For XenServer, choose either NFS, iSCSI, or PreSetup. For KVM, choose NFS or SharedMountPoint. For vSphere choose either VMFS (iSCSI or FiberChannel) or NFS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Server (for NFS, iSCSI, or PreSetup). The IP address or DNS name of the storage device" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Server (for VMFS). The IP address or DNS name of the vCenter server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Path (for NFS). In NFS this is the exported path from the server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Path (for VMFS). In vSphere this is a combination of the datacenter name and the datastore name. The format is \"/\" datacenter name \"/\" datastore name. For example, \"/cloud.dc.VM/cluster1datastore\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Path (for SharedMountPoint). With KVM this is the path on each host that is where this primary storage is mounted. For example, \"/mnt/primary\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SR Name-Label (for PreSetup). Enter the name-label of the SR that has been set up outside &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Target IQN (for iSCSI). In iSCSI this is the IQN of the target. For example, iqn.1986-03.com.sun:02:01ec9bb549-1271378984" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Lun # (for iSCSI). In iSCSI this is the LUN number. For example, 3." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tags (optional). The comma-separated list of tags for this storage device. It should be an equivalent set or superset of the tags on your disk offerings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The tag sets on primary storage across clusters in a Zone must be identical. For example, if cluster A provides primary storage that has tags T1 and T2, all other clusters in the Zone must also provide primary storage that has tags T1 and T2." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK." +msgstr "" + diff --git a/docs/pot/add-projects-members-from-ui.pot b/docs/pot/add-projects-members-from-ui.pot new file mode 100644 index 000000000..26515261a --- /dev/null +++ b/docs/pot/add-projects-members-from-ui.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding Project Members From the UI" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The steps below tell how to add a new member to a project if the invitations feature is not enabled in the cloud. If the invitations feature is enabled cloud,as described in , use the procedure in ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select View, choose Projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the name of the project you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Accounts tab. The current members of the project are listed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Type the account name of the new member you want to add, and click Add Account. You can add only people who have an account in this cloud and within the same domain as the project." +msgstr "" + diff --git a/docs/pot/add-secondary-storage.pot b/docs/pot/add-secondary-storage.pot new file mode 100644 index 000000000..d75c1dc56 --- /dev/null +++ b/docs/pot/add-secondary-storage.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding Secondary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Be sure there is nothing stored on the server. Adding the server to CloudStack will destroy any existing data." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you create a new zone, the first secondary storage is added as part of that procedure. You can add secondary storage servers at any time to add more servers to an existing zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are going to use Swift for cloud-wide secondary storage, you must add the Swift storage to &PRODUCT; before you add the local zone secondary storage servers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To prepare for local zone secondary storage, you should have created and mounted an NFS share during Management Server installation." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure you prepared the system VM template during Management Server installation." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4. Now that the secondary storage server for per-zone storage is prepared, add it to &PRODUCT;. Secondary storage is added as part of the procedure for adding a new zone." +msgstr "" + diff --git a/docs/pot/add-security-group.pot b/docs/pot/add-security-group.pot new file mode 100644 index 000000000..38a117412 --- /dev/null +++ b/docs/pot/add-security-group.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding a Security Group" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A user or administrator can define a new security group." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select view, choose Security Groups." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add Security Group." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide a name and description." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The new security group appears in the Security Groups Details tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To make the security group useful, continue to Adding Ingress and Egress Rules to a Security Group." +msgstr "" + diff --git a/docs/pot/add-tier.pot b/docs/pot/add-tier.pot new file mode 100644 index 000000000..f51b6eae7 --- /dev/null +++ b/docs/pot/add-tier.pot @@ -0,0 +1,125 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding Tiers" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tiers are distinct locations within a VPC that act as isolated networks, which do not have access to other tiers by default. Tiers are set up on different VLANs that can communicate with each other by using a virtual router. Tiers provide inexpensive, low latency network connectivity to other tiers within the VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VPC that you have created for the account is listed in the page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The end users can see their own VPCs, while root and domain admin can see any VPC they are authorized to see." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Configure button of the VPC for which you want to set up tiers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Add new tier dialog is displayed, as follows:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you have already created tiers, the VPC diagram is displayed. Click Create Tier to add a new tier." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Specify the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the fields are mandatory." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name: A unique name for the tier you create." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network Offering: The following default network offerings are listed: DefaultIsolatedNetworkOfferingForVpcNetworksNoLB, DefaultIsolatedNetworkOfferingForVpcNetworks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a VPC, only one tier can be created by using LB-enabled network offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateway: The gateway for the tier you create. Ensure that the gateway is within the Super CIDR range that you specified while creating the VPC, and is not overlapped with the CIDR of any existing tier within the VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Netmask: The netmask for the tier you create." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For example, if the VPC CIDR is 10.0.0.0/16 and the network tier CIDR is 10.0.1.0/24, the gateway of the tier is 10.0.1.1, and the netmask of the tier is 255.255.255.0." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Continue with configuring access control list for the tier." +msgstr "" + diff --git a/docs/pot/add-vm-to-tier.pot b/docs/pot/add-vm-to-tier.pot new file mode 100644 index 000000000..0b997934b --- /dev/null +++ b/docs/pot/add-vm-to-tier.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Deploying VMs to the Tier" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VPCs that you have created for the account is listed in the page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Configure button of the VPC to which you want to deploy the VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The VPC page is displayed where all the tiers you created are listed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Add VM button of the tier for which you want to add a VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Add Instance page is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Follow the on-screen instruction to add an instance. For information on adding an instance, see Adding Instances section in the Installation Guide." +msgstr "" + diff --git a/docs/pot/add-vpc.pot b/docs/pot/add-vpc.pot new file mode 100644 index 000000000..626b41369 --- /dev/null +++ b/docs/pot/add-vpc.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding a Virtual Private Cloud" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When creating the VPC, you simply provide the zone and a set of IP addresses for the VPC network address space. You specify this set of addresses in the form of a Classless Inter-Domain Routing (CIDR) block." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add VPC. The Add VPC page is displayed as follows:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide the following information:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name: A short name for the VPC that you are creating." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description: A brief description of the VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Zone: Choose the zone where you want the VPC to be available." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Super CIDR for Guest Networks: Defines the CIDR range for all the tiers (guest networks) within a VPC. When you create a tier, ensure that its CIDR is within the Super CIDR value you enter. The CIDR must be RFC1918 compliant." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DNS domain for Guest Networks: If you want to assign a special domain name, specify the DNS suffix. This parameter is applied to all the tiers within the VPC. That implies, all the tiers you create in the VPC belong to the same DNS domain. If the parameter is not specified, a DNS domain name is generated automatically." +msgstr "" + diff --git a/docs/pot/added-API-commands-4-0.pot b/docs/pot/added-API-commands-4-0.pot new file mode 100644 index 000000000..1a477c316 --- /dev/null +++ b/docs/pot/added-API-commands-4-0.pot @@ -0,0 +1,259 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Added API Commands in 4.0.0-incubating" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createCounter (Adds metric counter)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteCounter (Deletes a counter)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listCounters (List the counters)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createCondition (Creates a condition)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteCondition (Removes a condition)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listConditions (List Conditions for the specific user)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createTags. Add tags to one or more resources. Example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "command=createTags\n" +"&resourceIds=1,10,12\n" +"&resourceType=userVm\n" +"&tags[0].key=region\n" +"&tags[0].value=canada\n" +"&tags[1].key=city\n" +"&tags[1].value=Toronto " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteTags. Remove tags from one or more resources. Example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "command=deleteTags\n" +"&resourceIds=1,12\n" +"&resourceType=Snapshot\n" +"&tags[0].key=city " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listTags (Show currently defined resource tags)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createVPC (Creates a VPC)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVPCs (Lists VPCs)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteVPC (Deletes a VPC)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateVPC (Updates a VPC)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "restartVPC (Restarts a VPC)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createVPCOffering (Creates VPC offering)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateVPCOffering (Updates VPC offering)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteVPCOffering (Deletes VPC offering)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVPCOfferings (Lists VPC offerings)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createPrivateGateway (Creates a private gateway)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listPrivateGateways (List private gateways)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deletePrivateGateway (Deletes a Private gateway)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createNetworkACL (Creates a ACL rule the given network (the network has to belong to VPC))" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteNetworkACL (Deletes a Network ACL)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listNetworkACLs (Lists all network ACLs)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createStaticRoute (Creates a static route)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteStaticRoute (Deletes a static route)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listStaticRoutes (Lists all static routes)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createVpnCustomerGateway (Creates site to site vpn customer gateway)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createVpnGateway (Creates site to site vpn local gateway)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createVpnConnection (Create site to site vpn connection)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteVpnCustomerGateway (Delete site to site vpn customer gateway)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteVpnGateway (Delete site to site vpn gateway)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteVpnConnection (Delete site to site vpn connection)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateVpnCustomerGateway (Update site to site vpn customer gateway)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "resetVpnConnection (Reset site to site vpn connection)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVpnCustomerGateways (Lists site to site vpn customer gateways)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVpnGateways (Lists site 2 site vpn gateways)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVpnConnections (Lists site to site vpn connection gateways)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "enableCiscoNexusVSM (Enables Nexus 1000v dvSwitch in &PRODUCT;.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "disableCiscoNexusVSM (Disables Nexus 1000v dvSwitch in &PRODUCT;.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteCiscoNexusVSM (Deletes Nexus 1000v dvSwitch in &PRODUCT;.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listCiscoNexusVSMs (Lists the control VLAN ID, packet VLAN ID, and data VLAN ID, as well as the IP address of the Nexus 1000v dvSwitch.)" +msgstr "" + diff --git a/docs/pot/added-API-commands.pot b/docs/pot/added-API-commands.pot new file mode 100644 index 000000000..fd6cb1e4a --- /dev/null +++ b/docs/pot/added-API-commands.pot @@ -0,0 +1,375 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:56\n" +"PO-Revision-Date: 2013-02-02T20:11:56\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Added API commands in 3.0" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Added in 3.0.2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "changeServiceForSystemVm" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Changes the service offering for a system VM (console proxy or secondary storage). The system VM must be in a \"Stopped\" state for this command to take effect." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Added in 3.0.1" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Added in 3.0.0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "assignVirtualMachine (Move a user VM to another user under same domain.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "restoreVirtualMachine (Restore a VM to original template or specific snapshot)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createLBStickinessPolicy (Creates a Load Balancer stickiness policy )" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteLBStickinessPolicy (Deletes a LB stickiness policy.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listLBStickinessPolicies (Lists LBStickiness policies.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ldapConfig (Configure the LDAP context for this site.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "addSwift (Adds Swift.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listSwifts (List Swift.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "migrateVolume (Migrate volume)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateStoragePool (Updates a storage pool.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "authorizeSecurityGroupEgress (Authorizes a particular egress rule for this security group)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "revokeSecurityGroupEgress (Deletes a particular egress rule from this security group)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createNetworkOffering (Creates a network offering.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteNetworkOffering (Deletes a network offering.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createProject (Creates a project)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteProject (Deletes a project)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateProject (Updates a project)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "activateProject (Activates a project)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "suspendProject (Suspends a project)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listProjects (Lists projects and provides detailed information for listed projects)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "addAccountToProject (Adds acoount to a project)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteAccountFromProject (Deletes account from the project)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listProjectAccounts (Lists project's accounts)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listProjectInvitations (Lists an account's invitations to join projects)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateProjectInvitation (Accepts or declines project invitation)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteProjectInvitation (Deletes a project invitation)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateHypervisorCapabilities (Updates a hypervisor capabilities.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listHypervisorCapabilities (Lists all hypervisor capabilities.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createPhysicalNetwork (Creates a physical network)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deletePhysicalNetwork (Deletes a Physical Network.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listPhysicalNetworks (Lists physical networks)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updatePhysicalNetwork (Updates a physical network)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listSupportedNetworkServices (Lists all network services provided by &PRODUCT; or for the given Provider.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "addNetworkServiceProvider (Adds a network serviceProvider to a physical network)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteNetworkServiceProvider (Deletes a Network Service Provider.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listNetworkServiceProviders (Lists network serviceproviders for a given physical network.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateNetworkServiceProvider (Updates a network serviceProvider of a physical network)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "addTrafficType (Adds traffic type to a physical network)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteTrafficType (Deletes traffic type of a physical network)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listTrafficTypes (Lists traffic types of a given physical network.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateTrafficType (Updates traffic type of a physical network)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listTrafficTypeImplementors (Lists implementors of implementor of a network traffic type or implementors of all network traffic types)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createStorageNetworkIpRange (Creates a Storage network IP range.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteStorageNetworkIpRange (Deletes a storage network IP Range.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listStorageNetworkIpRange (List a storage network IP range.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateStorageNetworkIpRange (Update a Storage network IP range, only allowed when no IPs in this range have been allocated.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listUsageTypes (List Usage Types)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "addF5LoadBalancer (Adds a F5 BigIP load balancer device)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "configureF5LoadBalancer (configures a F5 load balancer device)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteF5LoadBalancer ( delete a F5 load balancer device)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listF5LoadBalancers (lists F5 load balancer devices)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listF5LoadBalancerNetworks (lists network that are using a F5 load balancer device)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "addSrxFirewall (Adds a SRX firewall device)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteSrxFirewall ( delete a SRX firewall device)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listSrxFirewalls (lists SRX firewall devices in a physical network)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listSrxFirewallNetworks (lists network that are using SRX firewall device)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "addNetscalerLoadBalancer (Adds a netscaler load balancer device)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteNetscalerLoadBalancer ( delete a netscaler load balancer device)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "configureNetscalerLoadBalancer (configures a netscaler load balancer device)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listNetscalerLoadBalancers (lists netscaler load balancer devices)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listNetscalerLoadBalancerNetworks (lists network that are using a netscaler load balancer device)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createVirtualRouterElement (Create a virtual router element.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "configureVirtualRouterElement (Configures a virtual router element.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVirtualRouterElements (Lists all available virtual router elements.)" +msgstr "" + diff --git a/docs/pot/added-error-codes.pot b/docs/pot/added-error-codes.pot new file mode 100644 index 000000000..5062c9ebb --- /dev/null +++ b/docs/pot/added-error-codes.pot @@ -0,0 +1,330 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Added &PRODUCT; Error Codes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can now find the &PRODUCT;-specific error code in the exception response for each type of exception. The following list of error codes is added to the new class named CSExceptionErrorCode. These codes are applicable in &PRODUCT; 3.0.3 and later versions." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4250 : \"com.cloud.utils.exception.CloudRuntimeException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4255 : \"com.cloud.utils.exception.ExceptionUtil\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4260 : \"com.cloud.utils.exception.ExecutionException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4265 : \"com.cloud.utils.exception.HypervisorVersionChangedException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4270 : \"com.cloud.utils.exception.RuntimeCloudException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4275 : \"com.cloud.exception.CloudException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4280 : \"com.cloud.exception.AccountLimitException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4285 : \"com.cloud.exception.AgentUnavailableException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4290 : \"com.cloud.exception.CloudAuthenticationException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4295 : \"com.cloud.exception.CloudExecutionException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4300 : \"com.cloud.exception.ConcurrentOperationException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4305 : \"com.cloud.exception.ConflictingNetworkSettingsException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4310 : \"com.cloud.exception.DiscoveredWithErrorException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4315 : \"com.cloud.exception.HAStateException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4320 : \"com.cloud.exception.InsufficientAddressCapacityException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4325 : \"com.cloud.exception.InsufficientCapacityException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4330 : \"com.cloud.exception.InsufficientNetworkCapacityException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4335 : \"com.cloud.exception.InsufficientServerCapacityException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4340 : \"com.cloud.exception.InsufficientStorageCapacityException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4345 : \"com.cloud.exception.InternalErrorException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4350 : \"com.cloud.exception.InvalidParameterValueException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4355 : \"com.cloud.exception.ManagementServerException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4360 : \"com.cloud.exception.NetworkRuleConflictException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4365 : \"com.cloud.exception.PermissionDeniedException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4370 : \"com.cloud.exception.ResourceAllocationException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4375 : \"com.cloud.exception.ResourceInUseException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4380 : \"com.cloud.exception.ResourceUnavailableException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4385 : \"com.cloud.exception.StorageUnavailableException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4390 : \"com.cloud.exception.UnsupportedServiceException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4395 : \"com.cloud.exception.VirtualMachineMigrationException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4400 : \"com.cloud.exception.AccountLimitException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4405 : \"com.cloud.exception.AgentUnavailableException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4410 : \"com.cloud.exception.CloudAuthenticationException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4415 : \"com.cloud.exception.CloudException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4420 : \"com.cloud.exception.CloudExecutionException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4425 : \"com.cloud.exception.ConcurrentOperationException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4430 : \"com.cloud.exception.ConflictingNetworkSettingsException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4435 : \"com.cloud.exception.ConnectionException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4440 : \"com.cloud.exception.DiscoveredWithErrorException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4445 : \"com.cloud.exception.DiscoveryException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4450 : \"com.cloud.exception.HAStateException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4455 : \"com.cloud.exception.InsufficientAddressCapacityException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4460 : \"com.cloud.exception.InsufficientCapacityException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4465 : \"com.cloud.exception.InsufficientNetworkCapacityException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4470 : \"com.cloud.exception.InsufficientServerCapacityException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4475 : \"com.cloud.exception.InsufficientStorageCapacityException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4480 : \"com.cloud.exception.InsufficientVirtualNetworkCapcityException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4485 : \"com.cloud.exception.InternalErrorException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4490 : \"com.cloud.exception.InvalidParameterValueException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4495 : \"com.cloud.exception.ManagementServerException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4500 : \"com.cloud.exception.NetworkRuleConflictException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4505 : \"com.cloud.exception.PermissionDeniedException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4510 : \"com.cloud.exception.ResourceAllocationException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4515 : \"com.cloud.exception.ResourceInUseException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4520 : \"com.cloud.exception.ResourceUnavailableException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4525 : \"com.cloud.exception.StorageUnavailableException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4530 : \"com.cloud.exception.UnsupportedServiceException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4535 : \"com.cloud.exception.VirtualMachineMigrationException\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "9999 : \"org.apache.cloudstack.api.ServerApiException\"" +msgstr "" + diff --git a/docs/pot/adding-IP-addresses-for-the-public-network.pot b/docs/pot/adding-IP-addresses-for-the-public-network.pot new file mode 100644 index 000000000..ef9a609f5 --- /dev/null +++ b/docs/pot/adding-IP-addresses-for-the-public-network.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding IP Addresses for the Public Network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "These instructions assume you have already logged in to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Infrastructure. In Zones, click View More, then click the desired zone ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Network tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Public node of the diagram, click Configure." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the IP Ranges tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide the following information:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateway. The gateway in use for these IP addresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Netmask. The netmask associated with this IP range" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN. The VLAN that will be used for public traffic" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start IP/End IP. A range of IP addresses that are assumed to be accessible from the Internet and will be allocated for access to guest networks." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add." +msgstr "" + diff --git a/docs/pot/additional-installation-options.pot b/docs/pot/additional-installation-options.pot new file mode 100644 index 000000000..1e00eaed1 --- /dev/null +++ b/docs/pot/additional-installation-options.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Additional Installation Options" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The next few sections describe &PRODUCT; features above and beyond the basic deployment options." +msgstr "" + diff --git a/docs/pot/admin-alerts.pot b/docs/pot/admin-alerts.pot new file mode 100644 index 000000000..7935a2b36 --- /dev/null +++ b/docs/pot/admin-alerts.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Administrator Alerts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The system provides alerts and events to help with the management of the cloud. Alerts are notices to an administrator, generally delivered by e-mail, notifying the administrator that an error has occurred in the cloud. Alert behavior is configurable." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Events track all of the user and administrator actions in the cloud. For example, every guest VM start creates an associated event. Events are stored in the Management Server’s database." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Emails will be sent to administrators under the following circumstances:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Server cluster runs low on CPU, memory, or storage resources" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Server loses heartbeat from a Host for more than 3 minutes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Host cluster runs low on CPU, memory, or storage resources" +msgstr "" + diff --git a/docs/pot/admin-guide.pot b/docs/pot/admin-guide.pot new file mode 100644 index 000000000..b571c79a7 --- /dev/null +++ b/docs/pot/admin-guide.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Administrator Guide" +msgstr "" + diff --git a/docs/pot/adv-zone-topology-req.pot b/docs/pot/adv-zone-topology-req.pot new file mode 100644 index 000000000..2b0fd2d94 --- /dev/null +++ b/docs/pot/adv-zone-topology-req.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Advanced Zone Topology Requirements" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "With Advanced Networking, separate subnets must be used for private and public networks." +msgstr "" + diff --git a/docs/pot/advanced-zone-configuration.pot b/docs/pot/advanced-zone-configuration.pot new file mode 100644 index 000000000..2c0543140 --- /dev/null +++ b/docs/pot/advanced-zone-configuration.pot @@ -0,0 +1,345 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Advanced Zone Configuration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After you select Advanced in the Add Zone wizard and click Next, you will be asked to enter the following details. Then click Next." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name. A name for the zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DNS 1 and 2. These are DNS servers for use by guest VMs in the zone. These DNS servers will be accessed via the public network you will add later. The public IP addresses for the zone must have a route to the DNS server named here." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Internal DNS 1 and Internal DNS 2. These are DNS servers for use by system VMs in the zone(these are VMs used by &PRODUCT; itself, such as virtual routers, console proxies,and Secondary Storage VMs.) These DNS servers will be accessed via the management traffic network interface of the System VMs. The private IP address you provide for the pods must have a route to the internal DNS server named here." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network Domain. (Optional) If you want to assign a special domain name to the guest VM network, specify the DNS suffix." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest CIDR. This is the CIDR that describes the IP addresses in use in the guest virtual networks in this zone. For example, 10.1.1.0/24. As a matter of good practice you should set different CIDRs for different zones. This will make it easier to set up VPNs between networks in different zones." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor. (Introduced in version 3.0.1) Choose the hypervisor for the first cluster in the zone. You can add clusters with different hypervisors later, after you finish adding the zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public. A public zone is available to all users. A zone that is not public will be assigned to a particular domain. Only users in that domain will be allowed to create guest VMs in this zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose which traffic types will be carried by the physical network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The traffic types are management, public, guest, and storage traffic. For more information about the types, roll over the icons to display their tool tips, or see . This screen starts out with one network already configured. If you have multiple physical networks, you need to add more. Drag and drop traffic types onto a greyed-out network and it will become active. You can move the traffic icons from one network to another; for example, if the default traffic types shown for Network 1 do not match your actual setup, you can move them down. You can also change the network names if desired." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Introduced in version 3.0.1) Assign a network traffic label to each traffic type on each physical network. These labels must match the labels you have already defined on the hypervisor host. To assign each label, click the Edit button under the traffic type icon within each physical network. A popup dialog appears where you can type the label, then click OK." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "These traffic labels will be defined only for the hypervisor selected for the first cluster. For all other hypervisors, the labels can be configured after the zone is created." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Next." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure the IP range for public Internet traffic. Enter the following details, then click Add. If desired, you can repeat this step to add more public Internet IP ranges. When done, click Next." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateway. The gateway in use for these IP addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Netmask. The netmask associated with this IP range." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN. The VLAN that will be used for public traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start IP/End IP. A range of IP addresses that are assumed to be accessible from the Internet and will be allocated for access to guest networks." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a new zone, &PRODUCT; adds the first pod for you. You can always add more pods later. For an overview of what a pod is, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To configure the first pod, enter the following, then click Next:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Pod Name. A name for the pod." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Reserved system gateway. The gateway for the hosts in that pod." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Reserved system netmask. The network prefix that defines the pod's subnet. Use CIDR notation." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start/End Reserved System IP. The IP range in the management network that &PRODUCT; uses to manage various system VMs, such as Secondary Storage VMs, Console Proxy VMs, and DHCP. For more information, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Specify a range of VLAN IDs to carry guest traffic for each physical network (see VLAN Allocation Example ), then click Next." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a new pod, &PRODUCT; adds the first cluster for you. You can always add more clusters later. For an overview of what a cluster is, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To configure the first cluster, enter the following, then click Next:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor. (Version 3.0.0 only; in 3.0.1, this field is read only) Choose the type of hypervisor software that all hosts in this cluster will run. If you choose VMware, additional fields appear so you can give information about a vSphere cluster. For vSphere servers, we recommend creating the cluster of hosts in vCenter and then adding the entire cluster to &PRODUCT;. See Add Cluster: vSphere ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Cluster name. Enter a name for the cluster. This can be text of your choosing and is not used by &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a new cluster, &PRODUCT; adds the first host for you. You can always add more hosts later. For an overview of what a host is, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you deploy &PRODUCT;, the hypervisor host must not have any VMs already running." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Before you can configure the host, you need to install the hypervisor software on the host. You will need to know which version of the hypervisor software version is supported by &PRODUCT; and what additional configuration is required to ensure the host will work with &PRODUCT;. To find these installation details, see:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Citrix XenServer Installation for &PRODUCT;" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VMware vSphere Installation and Configuration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "KVM Installation and Configuration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To configure the first host, enter the following, then click Next:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Host Name. The DNS name or IP address of the host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Username. Usually root." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Password. This is the password for the user named above (from your XenServer or KVM install)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Host Tags. (Optional) Any labels that you use to categorize hosts for ease of maintenance. For example, you can set to the cloud's HA tag (set in the ha.tag global configuration parameter) if you want this host to be used only for VMs with the \"high availability\" feature enabled. For more information, see HA-Enabled Virtual Machines as well as HA for Hosts, both in the Administration Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a new cluster, &PRODUCT; adds the first primary storage server for you. You can always add more servers later. For an overview of what primary storage is, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To configure the first primary storage server, enter the following, then click Next:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name. The name of the storage device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Protocol. For XenServer, choose either NFS, iSCSI, or PreSetup. For KVM, choose NFS, SharedMountPoint, CLVM, and RBD. For vSphere choose either VMFS (iSCSI or FiberChannel) or NFS. The remaining fields in the screen vary depending on what you choose here." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NFS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Server. The IP address or DNS name of the storage device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Path. The exported path from the server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tags (optional). The comma-separated list of tags for this storage device. It should be an equivalent set or superset of the tags on your disk offerings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The tag sets on primary storage across clusters in a Zone must be identical. For example, if cluster A provides primary storage that has tags T1 and T2, all other clusters in the Zone must also provide primary storage that has tags T1 and T2." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "iSCSI" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Target IQN. The IQN of the target. For example, iqn.1986-03.com.sun:02:01ec9bb549-1271378984." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Lun. The LUN number. For example, 3." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "preSetup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SR Name-Label. Enter the name-label of the SR that has been set up outside &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SharedMountPoint" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Path. The path on each host that is where this primary storage is mounted. For example, \"/mnt/primary\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VMFS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Server. The IP address or DNS name of the vCenter server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Path. A combination of the datacenter name and the datastore name. The format is \"/\" datacenter name \"/\" datastore name. For example, \"/cloud.dc.VM/cluster1datastore\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a new zone, &PRODUCT; adds the first secondary storage server for you. For an overview of what secondary storage is, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Before you can fill out this screen, you need to prepare the secondary storage by setting up NFS shares and installing the latest &PRODUCT; System VM template. See Adding Secondary Storage :" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NFS Server. The IP address of the server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Launch." +msgstr "" + diff --git a/docs/pot/advanced-zone-guest-ip-addresses.pot b/docs/pot/advanced-zone-guest-ip-addresses.pot new file mode 100644 index 000000000..c0ed78607 --- /dev/null +++ b/docs/pot/advanced-zone-guest-ip-addresses.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Advanced Zone Guest IP Addresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When advanced networking is used, the administrator can create additional networks for use by the guests. These networks can span the zone and be available to all accounts, or they can be scoped to a single account, in which case only the named account may create guests that attach to these networks. The networks are defined by a VLAN ID, IP range, and gateway. The administrator may provision thousands of these networks if desired." +msgstr "" + diff --git a/docs/pot/advanced-zone-network-traffic-types.pot b/docs/pot/advanced-zone-network-traffic-types.pot new file mode 100644 index 000000000..3b24de128 --- /dev/null +++ b/docs/pot/advanced-zone-network-traffic-types.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Advanced Zone Network Traffic Types" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When advanced networking is used, there can be multiple physical networks in the zone. Each physical network can carry one or more traffic types, and you need to let &PRODUCT; know which type of network traffic you want each network to carry. The traffic types in an advanced zone are:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest. When end users run VMs, they generate guest traffic. The guest VMs communicate with each other over a network that can be referred to as the guest network. This network can be isolated or shared. In an isolated guest network, the administrator needs to reserve VLAN ranges to provide isolation for each &PRODUCT; account’s network (potentially a large number of VLANs). In a shared guest network, all guest VMs share a single network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Management. When &PRODUCT;’s internal resources communicate with each other, they generate management traffic. This includes communication between hosts, system VMs (VMs used by &PRODUCT; to perform various tasks in the cloud), and any other component that communicates directly with the &PRODUCT; Management Server. You must configure the IP range for the system VMs to use." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public. Public traffic is generated when VMs in the cloud access the Internet. Publicly accessible IPs must be allocated for this purpose. End users can use the &PRODUCT; UI to acquire these IPs to implement NAT between their guest network and the public network, as described in “Acquiring a New IP Address†in the Administration Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Storage. Traffic such as VM templates and snapshots, which is sent between the secondary storage VM and secondary storage servers. &PRODUCT; uses a separate Network Interface Controller (NIC) named storage NIC for storage network traffic. Use of a storage NIC that always operates on a high bandwidth network allows fast template and snapshot copying. You must configure the IP range to use for the storage network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "These traffic types can each be on a separate physical network, or they can be combined with certain restrictions. When you use the Add Zone wizard in the UI to create a new zone, you are guided into making only valid choices." +msgstr "" + diff --git a/docs/pot/advanced-zone-physical-network-configuration.pot b/docs/pot/advanced-zone-physical-network-configuration.pot new file mode 100644 index 000000000..ba06ced75 --- /dev/null +++ b/docs/pot/advanced-zone-physical-network-configuration.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Advanced Zone Physical Network Configuration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Within a zone that uses advanced networking, you need to tell the Management Server how the physical network is set up to carry different kinds of traffic in isolation." +msgstr "" + diff --git a/docs/pot/advanced-zone-public-ip-addresses.pot b/docs/pot/advanced-zone-public-ip-addresses.pot new file mode 100644 index 000000000..54d3ef293 --- /dev/null +++ b/docs/pot/advanced-zone-public-ip-addresses.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Advanced Zone Public IP Addresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When advanced networking is used, the administrator can create additional networks for use by the guests. These networks can span the zone and be available to all accounts, or they can be scoped to a single account, in which case only the named account may create guests that attach to these networks. The networks are defined by a VLAN ID, IP range, and gateway. The administrator may provision thousands of these networks if desired." +msgstr "" + diff --git a/docs/pot/alerts.pot b/docs/pot/alerts.pot new file mode 100644 index 000000000..ea65bdc3e --- /dev/null +++ b/docs/pot/alerts.pot @@ -0,0 +1,165 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Alerts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following is the list of alert type numbers. The current alerts can be found by calling listAlerts." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "MEMORY = 0" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "CPU = 1" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "STORAGE =2" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "STORAGE_ALLOCATED = 3" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "PUBLIC_IP = 4" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "PRIVATE_IP = 5" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "HOST = 6" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "USERVM = 7" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "DOMAIN_ROUTER = 8" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "CONSOLE_PROXY = 9" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "ROUTING = 10// lost connection to default route (to the gateway)" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "STORAGE_MISC = 11 // lost connection to default route (to the gateway)" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "USAGE_SERVER = 12 // lost connection to default route (to the gateway)" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "MANAGMENT_NODE = 13 // lost connection to default route (to the gateway)" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "DOMAIN_ROUTER_MIGRATE = 14" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "CONSOLE_PROXY_MIGRATE = 15" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "USERVM_MIGRATE = 16" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "VLAN = 17" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "SSVM = 18" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "USAGE_SERVER_RESULT = 19" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "STORAGE_DELETE = 20;" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "UPDATE_RESOURCE_COUNT = 21; //Generated when we fail to update the resource count" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "USAGE_SANITY_RESULT = 22;" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "DIRECT_ATTACHED_PUBLIC_IP = 23;" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "LOCAL_STORAGE = 24;" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "RESOURCE_LIMIT_EXCEEDED = 25; //Generated when the resource limit exceeds the limit. Currently used for recurring snapshots only" +msgstr "" + diff --git a/docs/pot/allocators.pot b/docs/pot/allocators.pot new file mode 100644 index 000000000..9394ee680 --- /dev/null +++ b/docs/pot/allocators.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Allocators" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; enables administrators to write custom allocators that will choose the Host to place a new guest and the storage host from which to allocate guest virtual disk images." +msgstr "" + diff --git a/docs/pot/api-calls.pot b/docs/pot/api-calls.pot new file mode 100644 index 000000000..b8e2c8fb6 --- /dev/null +++ b/docs/pot/api-calls.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Calling the &PRODUCT; API" +msgstr "" + diff --git a/docs/pot/api-overview.pot b/docs/pot/api-overview.pot new file mode 100644 index 000000000..51a559d7f --- /dev/null +++ b/docs/pot/api-overview.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "&PRODUCT; API" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The API has a REST-like query basis and returns results in XML or JSON." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "See the Developer’s Guide and the API Reference." +msgstr "" + diff --git a/docs/pot/api-reference.pot b/docs/pot/api-reference.pot new file mode 100644 index 000000000..0a6a99ec4 --- /dev/null +++ b/docs/pot/api-reference.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "API Reference Documentation" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can find all the API reference documentation at the below site:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "http://incubator.apache.org/cloudstack/docs/api/" +msgstr "" + diff --git a/docs/pot/asynchronous-commands-example.pot b/docs/pot/asynchronous-commands-example.pot new file mode 100644 index 000000000..92f8d322c --- /dev/null +++ b/docs/pot/asynchronous-commands-example.pot @@ -0,0 +1,166 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Example" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following shows an example of using an asynchronous command. Assume the API command:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "command=deployVirtualMachine&zoneId=1&serviceOfferingId=1&diskOfferingId=1&templateId=1\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CloudStack will immediately return a job ID and any other additional data." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +" <deployvirtualmachineresponse> \n" +" <jobid>1</jobid>\n" +" <id>100</id>\n" +" </deployvirtualmachineresponse>\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Using the job ID, you can periodically poll for the results by using the queryAsyncJobResult command." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "command=queryAsyncJobResult&jobId=1" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Three possible results could come from this query." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Job is still pending:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +" <queryasyncjobresult> \n" +" <jobid>1</jobid>\n" +" <jobstatus>0</jobstatus>\n" +" <jobprocstatus>1</jobprocstatus>\n" +" </queryasyncjobresult>\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Job has succeeded:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +" <queryasyncjobresultresponse cloud-stack-version=\"3.0.1.6\">\n" +" <jobid>1</jobid>\n" +" <jobstatus>1</jobstatus>\n" +" <jobprocstatus>0</jobprocstatus>\n" +" <jobresultcode>0</jobresultcode>\n" +" <jobresulttype>object</jobresulttype>\n" +" <jobresult>\n" +" <virtualmachine>\n" +" <id>450</id>\n" +" <name>i-2-450-VM</name>\n" +" <displayname>i-2-450-VM</displayname>\n" +" <account>admin</account>\n" +" <domainid>1</domainid>\n" +" <domain>ROOT</domain>\n" +" <created>2011-03-10T18:20:25-0800</created>\n" +" <state>Running</state>\n" +" <haenable>false</haenable>\n" +" <zoneid>1</zoneid>\n" +" <zonename>San Jose 1</zonename>\n" +" <hostid>2</hostid>\n" +" <hostname>905-13.sjc.lab.vmops.com</hostname>\n" +" <templateid>1</templateid>\n" +" <templatename>CentOS 5.3 64bit LAMP</templatename>\n" +" <templatedisplaytext>CentOS 5.3 64bit LAMP</templatedisplaytext>\n" +" <passwordenabled>false</passwordenabled>\n" +" <serviceofferingid>1</serviceofferingid>\n" +" <serviceofferingname>Small Instance</serviceofferingname>\n" +" <cpunumber>1</cpunumber>\n" +" <cpuspeed>500</cpuspeed>\n" +" <memory>512</memory>\n" +" <guestosid>12</guestosid>\n" +" <rootdeviceid>0</rootdeviceid>\n" +" <rootdevicetype>NetworkFilesystem</rootdevicetype>\n" +" <nic>\n" +" <id>561</id>\n" +" <networkid>205</networkid>\n" +" <netmask>255.255.255.0</netmask>\n" +" <gateway>10.1.1.1</gateway>\n" +" <ipaddress>10.1.1.225</ipaddress>\n" +" <isolationuri>vlan://295</isolationuri>\n" +" <broadcasturi>vlan://295</broadcasturi>\n" +" <traffictype>Guest</traffictype>\n" +" <type>Virtual</type>\n" +" <isdefault>true</isdefault>\n" +" </nic>\n" +" <hypervisor>XenServer</hypervisor>\n" +" </virtualmachine>\n" +" </jobresult>\n" +" </queryasyncjobresultresponse>\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Job has failed:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +" <queryasyncjobresult>\n" +" <jobid>1</jobid> \n" +" <jobstatus>2</jobstatus> \n" +" <jobprocstatus>0</jobprocstatus>\n" +" <jobresultcode>551</jobresultcode>\n" +" <jobresulttype>text</jobresulttype>\n" +" <jobresult>Unable to deploy virtual machine id = 100 due to not enough capacity</jobresult> \n" +" </queryasyncjobresult>\n" +" " +msgstr "" + diff --git a/docs/pot/asynchronous-commands.pot b/docs/pot/asynchronous-commands.pot new file mode 100644 index 000000000..44e2aacc8 --- /dev/null +++ b/docs/pot/asynchronous-commands.pot @@ -0,0 +1,55 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Asynchronous Commands" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Asynchronous commands were introduced in &PRODUCT; 2.x. Commands are designated as asynchronous when they can potentially take a long period of time to complete such as creating a snapshot or disk volume. They differ from synchronous commands by the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "They are identified in the API Reference by an (A)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "They will immediately return a job ID to refer to the job that will be responsible in processing the command." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If executed as a \"create\" resource command, it will return the resource ID as well as the job ID." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can periodically check the status of the job by making a simple API call to the command, queryAsyncJobResult and passing in the job ID." +msgstr "" + diff --git a/docs/pot/attach-iso-to-vm.pot b/docs/pot/attach-iso-to-vm.pot new file mode 100644 index 000000000..791bd1672 --- /dev/null +++ b/docs/pot/attach-iso-to-vm.pot @@ -0,0 +1,55 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Attaching an ISO to a VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Instances." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose the virtual machine you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Attach ISO button iso.png: Depicts adding an iso image " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Attach ISO dialog box, select the desired ISO." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK" +msgstr "" + diff --git a/docs/pot/attaching-volume.pot b/docs/pot/attaching-volume.pot new file mode 100644 index 000000000..37336587d --- /dev/null +++ b/docs/pot/attaching-volume.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Attaching a Volume" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can attach a volume to a guest VM to provide extra disk storage. Attach a volume when you first create a new volume, when you are moving an existing volume from one VM to another, or after you have migrated a volume from one storage pool to another." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as a user or admin." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select View, choose Volumes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4. Click the volume name in the Volumes list, then click the Attach Disk button AttachDiskButton.png: button to attach a volume " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Instance popup, choose the VM to which you want to attach the volume. You will only see instances to which you are allowed to attach volumes; for example, a user will see only instances created by that user, but the administrator will have more choices." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When the volume has been attached, you should be able to see it by clicking Instances, the instance name, and View Volumes." +msgstr "" + diff --git a/docs/pot/automatic-snapshot-creation-retention.pot b/docs/pot/automatic-snapshot-creation-retention.pot new file mode 100644 index 000000000..a0443c4ad --- /dev/null +++ b/docs/pot/automatic-snapshot-creation-retention.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Automatic Snapshot Creation and Retention" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Supported for the following hypervisors: XenServer, VMware vSphere, and KVM)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Users can set up a recurring snapshot policy to automatically create multiple snapshots of a disk at regular intervals. Snapshots can be created on an hourly, daily, weekly, or monthly interval. One snapshot policy can be set up per disk volume. For example, a user can set up a daily snapshot at 02:30." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "With each snapshot schedule, users can also specify the number of scheduled snapshots to be retained. Older snapshots that exceed the retention limit are automatically deleted. This user-defined limit must be equal to or lower than the global limit set by the &PRODUCT; administrator. See . The limit applies only to those snapshots that are taken as part of an automatic recurring snapshot policy. Additional manual snapshots can be created and retained." +msgstr "" + diff --git a/docs/pot/autoscale.pot b/docs/pot/autoscale.pot new file mode 100644 index 000000000..34c60c454 --- /dev/null +++ b/docs/pot/autoscale.pot @@ -0,0 +1,270 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configuring AutoScale" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "AutoScaling allows you to scale your back-end services or application VMs up or down seamlessly and automatically according to the conditions you define. With AutoScaling enabled, you can ensure that the number of VMs you are using seamlessly scale up when demand increases, and automatically decreases when demand subsides. Thus it helps you save compute costs by terminating underused VMs automatically and launching new VMs when you need them, without the need for manual intervention." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NetScaler AutoScaling is designed to seamlessly launch or terminate VMs based on user-defined conditions. Conditions for triggering a scaleup or scaledown action can vary from a simple use case like monitoring the CPU usage of a server to a complex use case of monitoring a combination of server's responsiveness and its CPU usage. For example, you can configure AutoScaling to launch an additional VM whenever CPU usage exceeds 80 percent for 15 minutes, or to remove a VM whenever CPU usage is less than 20 percent for 30 minutes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; uses the NetScaler load balancer to monitor all aspects of a system's health and work in unison with &PRODUCT; to initiate scale-up or scale-down actions. The supported NetScaler version is 10.0." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Prerequisites" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Before you configure an AutoScale rule, consider the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that the necessary template is prepared before configuring AutoScale. When a VM is deployed by using a template and when it comes up, the application should be up and running." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the application is not running, the NetScaler device considers the VM as ineffective and continues provisioning the VMs unconditionally until the resource limit is exhausted." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Deploy the templates you prepared. Ensure that the applications come up on the first boot and is ready to take the traffic. Observe the time requires to deploy the template. Consider this time when you specify the quiet time while configuring AutoScale." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The AutoScale feature supports the SNMP counters that can be used to define conditions for taking scale up or scale down actions. To monitor the SNMP-based counter, ensure that the SNMP agent is installed in the template used for creating the AutoScale VMs, and the SNMP operations work with the configured SNMP community and port by using standard SNMP managers. For example, see to configure SNMP on a RHEL machine." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that the endpointe.url parameter present in the Global Settings is set to the Management Server API URL. For example, http://10.102.102.22:8080/client/api. In a multi-node Management Server deployment, use the virtual IP address configured in the load balancer for the management server’s cluster. Additionally, ensure that the NetScaler device has access to this IP address to provide AutoScale support." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you update the endpointe.url, disable the AutoScale functionality of the load balancer rules in the system, then enable them back to reflect the changes. For more information see " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the API Key and Secret Key are regenerated for an AutoScale user, ensure that the AutoScale functionality of the load balancers that the user participates in are disabled and then enabled to reflect the configuration changes in the NetScaler." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In an advanced Zone, ensure that at least one VM should be present before configuring a load balancer rule with AutoScale. Having one VM in the network ensures that the network is in implemented state for configuring AutoScale." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Configuration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Specify the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Template: A template consists of a base OS image and application. A template is used to provision the new instance of an application on a scaleup action. When a VM is deployed from a template, the VM can start taking the traffic from the load balancer without any admin intervention. For example, if the VM is deployed for a Web service, it should have the Web server running, the database connected, and so on." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Compute offering: A predefined set of virtual hardware attributes, including CPU speed, number of CPUs, and RAM size, that the user can select when creating a new virtual machine instance. Choose one of the compute offerings to be used while provisioning a VM instance as part of scaleup action." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Min Instance: The minimum number of active VM instances that is assigned to a load balancing rule. The active VM instances are the application instances that are up and serving the traffic, and are being load balanced. This parameter ensures that a load balancing rule has at least the configured number of active VM instances are available to serve the traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If an application, such as SAP, running on a VM instance is down for some reason, the VM is then not counted as part of Min Instance parameter, and the AutoScale feature initiates a scaleup action if the number of active VM instances is below the configured value. Similarly, when an application instance comes up from its earlier down state, this application instance is counted as part of the active instance count and the AutoScale process initiates a scaledown action when the active instance count breaches the Max instance value." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Max Instance: Maximum number of active VM instances that should be assigned to a load balancing rule. This parameter defines the upper limit of active VM instances that can be assigned to a load balancing rule." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Specifying a large value for the maximum instance parameter might result in provisioning large number of VM instances, which in turn leads to a single load balancing rule exhausting the VM instances limit specified at the account or domain level." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If an application, such as SAP, running on a VM instance is down for some reason, the VM is not counted as part of Max Instance parameter. So there may be scenarios where the number of VMs provisioned for a scaleup action might be more than the configured Max Instance value. Once the application instances in the VMs are up from an earlier down state, the AutoScale feature starts aligning to the configured Max Instance value." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Specify the following scale-up and scale-down policies:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Duration: The duration, in seconds, for which the conditions you specify must be true to trigger a scaleup action. The conditions defined should hold true for the entire duration you specify for an AutoScale action to be invoked." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Counter: The performance counters expose the state of the monitored instances. By default, &PRODUCT; offers four performance counters: Three SNMP counters and one NetScaler counter. The SNMP counters are Linux User CPU, Linux System CPU, and Linux CPU Idle. The NetScaler counter is ResponseTime. The root administrator can add additional counters into &PRODUCT; by using the &PRODUCT; API." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Operator: The following five relational operators are supported in AutoScale feature: Greater than, Less than, Less than or equal to, Greater than or equal to, and Equal to." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Threshold: Threshold value to be used for the counter. Once the counter defined above breaches the threshold value, the AutoScale feature initiates a scaleup or scaledown action." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add: Click Add to add the condition." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Additionally, if you want to configure the advanced settings, click Show advanced settings, and specify the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Polling interval: Frequency in which the conditions, combination of counter, operator and threshold, are to be evaluated before taking a scale up or down action. The default polling interval is 30 seconds." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Quiet Time: This is the cool down period after an AutoScale action is initiated. The time includes the time taken to complete provisioning a VM instance from its template and the time taken by an application to be ready to serve traffic. This quiet time allows the fleet to come up to a stable state before any action can take place. The default is 300 seconds." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Destroy VM Grace Period: The duration in seconds, after a scaledown action is initiated, to wait before the VM is destroyed as part of scaledown action. This is to ensure graceful close of any pending sessions or transactions being served by the VM marked for destroy. The default is 120 seconds." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Security Groups: Security groups provide a way to isolate traffic to the VM instances. A security group is a group of VMs that filter their incoming and outgoing traffic according to a set of rules, called ingress and egress rules. These rules filter network traffic according to the IP address that is attempting to communicate with the VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Disk Offerings: A predefined set of disk size for primary data storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SNMP Community: The SNMP community string to be used by the NetScaler device to query the configured counter value from the provisioned VM instances. Default is public." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SNMP Port: The port number on which the SNMP agent that run on the provisioned VMs is listening. Default port is 161." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "User: This is the user that the NetScaler device use to invoke scaleup and scaledown API calls to the cloud. If no option is specified, the user who configures AutoScaling is applied. Specify another user name to override." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Apply: Click Apply to create the AutoScale configuration." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Disabling and Enabling an AutoScale Configuration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you want to perform any maintenance operation on the AutoScale VM instances, disable the AutoScale configuration. When the AutoScale configuration is disabled, no scaleup or scaledown action is performed. You can use this downtime for the maintenance activities. To disable the AutoScale configuration, click the Disable AutoScale EnableDisable.png: button to enable or disable AutoScale. button." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The button toggles between enable and disable, depending on whether AutoScale is currently enabled or not. After the maintenance operations are done, you can enable the AutoScale configuration back. To enable, open the AutoScale configuration page again, then click the Enable AutoScale EnableDisable.png: button to enable or disable AutoScale. button." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Updating an AutoScale Configuration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can update the various parameters and add or delete the conditions in a scaleup or scaledown rule. Before you update an AutoScale configuration, ensure that you disable the AutoScale load balancer rule by clicking the Disable AutoScale button." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After you modify the required AutoScale parameters, click Apply. To apply the new AutoScale policies, open the AutoScale configuration page again, then click the Enable AutoScale button." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Runtime Considerations" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "An administrator should not assign a VM to a load balancing rule which is configured for AutoScale." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Before a VM provisioning is completed if NetScaler is shutdown or restarted, the provisioned VM cannot be a part of the load balancing rule though the intent was to assign it to a load balancing rule. To workaround, rename the AutoScale provisioned VMs based on the rule name or ID so at any point of time the VMs can be reconciled to its load balancing rule." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Making API calls outside the context of AutoScale, such as destroyVM, on an autoscaled VM leaves the load balancing configuration in an inconsistent state. Though VM is destroyed from the load balancer rule, NetScaler continues to show the VM as a service assigned to a rule." +msgstr "" + diff --git a/docs/pot/aws-api-examples.pot b/docs/pot/aws-api-examples.pot new file mode 100644 index 000000000..be0b0369d --- /dev/null +++ b/docs/pot/aws-api-examples.pot @@ -0,0 +1,166 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Examples" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There are many tools available to interface with a AWS compatible API. In this section we provide a few examples that users of &PRODUCT; can build upon." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Boto Examples" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Boto is one of them. It is a Python package available at https://github.com/boto/boto. In this section we provide two examples of Python scripts that use Boto and have been tested with the &PRODUCT; AWS API Interface." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "First is an EC2 example. Replace the Access and Secret Keys with your own and update the endpoint." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "An EC2 Boto example" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "#!/usr/bin/env python\n" +"\n" +"import sys\n" +"import os\n" +"import boto\n" +"import boto.ec2\n" +"\n" +"region = boto.ec2.regioninfo.RegionInfo(name=\"ROOT\",endpoint=\"localhost\")\n" +"apikey='GwNnpUPrO6KgIdZu01z_ZhhZnKjtSdRwuYd4DvpzvFpyxGMvrzno2q05MB0ViBoFYtdqKd'\n" +"secretkey='t4eXLEYWw7chBhDlaKf38adCMSHx_wlds6JfSx3z9fSpSOm0AbP9Moj0oGIzy2LSC8iw'\n" +"\n" +"def main():\n" +" '''Establish connection to EC2 cloud'''\n" +" conn =boto.connect_ec2(aws_access_key_id=apikey,\n" +" aws_secret_access_key=secretkey,\n" +" is_secure=False,\n" +" region=region,\n" +" port=7080,\n" +" path=\"/awsapi\",\n" +" api_version=\"2010-11-15\")\n" +"\n" +" '''Get list of images that I own'''\n" +" images = conn.get_all_images()\n" +" print images\n" +" myimage = images[0]\n" +" '''Pick an instance type'''\n" +" vm_type='m1.small'\n" +" reservation = myimage.run(instance_type=vm_type,security_groups=['default'])\n" +"\n" +"if __name__ == '__main__':\n" +" main()\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Second is an S3 example. Replace the Access and Secret keys with your own, as well as the endpoint of the service. Be sure to also update the file paths to something that exists on your machine." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "An S3 Boto Example" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "#!/usr/bin/env python\n" +"\n" +"import sys\n" +"import os\n" +"from boto.s3.key import Key\n" +"from boto.s3.connection import S3Connection\n" +"from boto.s3.connection import OrdinaryCallingFormat\n" +"\n" +"apikey='ChOw-pwdcCFy6fpeyv6kUaR0NnhzmG3tE7HLN2z3OB_s-ogF5HjZtN4rnzKnq2UjtnHeg_yLA5gOw'\n" +"secretkey='IMY8R7CJQiSGFk4cHwfXXN3DUFXz07cCiU80eM3MCmfLs7kusgyOfm0g9qzXRXhoAPCH-IRxXc3w'\n" +"\n" +"cf=OrdinaryCallingFormat()\n" +"\n" +"def main(): \n" +" '''Establish connection to S3 service'''\n" +" conn =S3Connection(aws_access_key_id=apikey,aws_secret_access_key=secretkey, \\\n" +" is_secure=False, \\\n" +" host='localhost', \\\n" +" port=7080, \\\n" +" calling_format=cf, \\\n" +" path=\"/awsapi/rest/AmazonS3\")\n" +"\n" +" try:\n" +" bucket=conn.create_bucket('cloudstack')\n" +" k = Key(bucket)\n" +" k.key = 'test'\n" +" try:\n" +" k.set_contents_from_filename('/Users/runseb/Desktop/s3cs.py')\n" +" except:\n" +" print 'could not write file'\n" +" pass\n" +" except:\n" +" bucket = conn.get_bucket('cloudstack')\n" +" k = Key(bucket)\n" +" k.key = 'test'\n" +" try:\n" +" k.get_contents_to_filename('/Users/runseb/Desktop/foobar')\n" +" except:\n" +" print 'Could not get file'\n" +" pass\n" +"\n" +" try:\n" +" bucket1=conn.create_bucket('teststring')\n" +" k=Key(bucket1)\n" +" k.key('foobar')\n" +" k.set_contents_from_string('This is my silly test')\n" +" except:\n" +" bucket1=conn.get_bucket('teststring')\n" +" k = Key(bucket1)\n" +" k.key='foobar'\n" +" k.get_contents_as_string()\n" +" \n" +"if __name__ == '__main__':\n" +" main()\n" +"\n" +" " +msgstr "" + +#. Tag: title +#, no-c-format +msgid "JClouds Examples" +msgstr "" + diff --git a/docs/pot/aws-ec2-configuration.pot b/docs/pot/aws-ec2-configuration.pot new file mode 100644 index 000000000..e49f076ed --- /dev/null +++ b/docs/pot/aws-ec2-configuration.pot @@ -0,0 +1,153 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Enabling the EC2 and S3 Compatible Interface" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The software that provides AWS API compatibility is installed along with &PRODUCT;. You must enable the services and perform some setup steps prior to using it." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set the global configuration parameters for each service to true. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a set of &PRODUCT; service offerings with names that match the Amazon service offerings. You can do this through the &PRODUCT; UI as described in the Administration Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Be sure you have included the Amazon default service offering, m1.small. As well as any EC2 instance types that you will use." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you did not already do so when you set the configuration parameter in step 1, restart the Management Server." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service cloud-management restart" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following sections provides details to perform these steps" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Enabling the Services" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To enable the EC2 and S3 compatible services you need to set the configuration variables enable.ec2.api and enable.s3.api to true. You do not have to enable both at the same time. Enable the ones you need. This can be done via the &PRODUCT; GUI by going in Global Settings or via the API." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The snapshot below shows you how to use the GUI to enable these services" +msgstr "" + +#. Tag: para +#, no-c-format +msgid " Use the GUI to set the configuration variable to true " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Using the &PRODUCT; API, the easiest is to use the so-called integration port on which you can make unauthenticated calls. In Global Settings set the port to 8096 and subsequently call the updateConfiguration method. The following urls shows you how:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +" http://localhost:8096/client/api?command=updateConfiguration&name=enable.ec2.api&value=true\n" +" http://localhost:8096/client/api?command=updateConfiguration&name=enable.ec2.api&value=true\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Once you have enabled the services, restart the server." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Creating EC2 Compatible Service Offerings" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You will also need to define compute service offerings with names compatible with the Amazon EC2 instance types API names (e.g m1.small,m1.large). This can be done via the &PRODUCT; GUI. Go under Service Offerings select Compute offering and either create a new compute offering or modify an existing one, ensuring that the name matches an EC2 instance type API name. The snapshot below shows you how:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid " Use the GUI to set the name of a compute service offering to an EC2 instance type API name. " +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Modifying the AWS API Port" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) The AWS API listens for requests on port 7080. If you prefer AWS API to listen on another port, you can change it as follows:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Edit the files /etc/cloud/management/server.xml, /etc/cloud/management/server-nonssl.xml, and /etc/cloud/management/server-ssl.xml." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In each file, find the tag <Service name=\"Catalina7080\">. Under this tag, locate <Connector executor=\"tomcatThreadPool-internal\" port= ....<." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Change the port to whatever port you want to use, then save the files." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the Management Server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you re-install &PRODUCT;, you will have to re-enable the services and if need be update the port." +msgstr "" + diff --git a/docs/pot/aws-ec2-introduction.pot b/docs/pot/aws-ec2-introduction.pot new file mode 100644 index 000000000..f6c87340d --- /dev/null +++ b/docs/pot/aws-ec2-introduction.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Amazon Web Services Compatible Interface" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; can translate Amazon Web Services (AWS) API calls to native &PRODUCT; API calls so that users can continue using existing AWS-compatible tools. This translation service runs as a separate web application in the same tomcat server as the management server of &PRODUCT;, listening on a different port. The Amazon Web Services (AWS) compatible interface provides the EC2 SOAP and Query APIs as well as the S3 REST API." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This service was previously enabled by separate software called CloudBridge. It is now fully integrated with the &PRODUCT; management server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The compatible interface for the EC2 Query API and the S3 API are Work In Progress. The S3 compatible API offers a way to store data on the management server file system, it is not an implementation of the S3 backend." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Limitations" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Supported only in zones that use basic networking." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Available in fresh installations of &PRODUCT;. Not available through upgrade of previous versions." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Features such as Elastic IP (EIP) and Elastic Load Balacing (ELB) are only available in an infrastructure with a Citrix NetScaler device. Users accessing a Zone with a NetScaler device will need to use a NetScaler-enabled network offering (DefaultSharedNetscalerEIP and ELBNetworkOffering)." +msgstr "" + diff --git a/docs/pot/aws-ec2-requirements.pot b/docs/pot/aws-ec2-requirements.pot new file mode 100644 index 000000000..27644e77b --- /dev/null +++ b/docs/pot/aws-ec2-requirements.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Supported API Version" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The EC2 interface complies with Amazon's WDSL version dated November 15, 2010, available at http://ec2.amazonaws.com/doc/2010-11-15/." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The interface is compatible with the EC2 command-line tools EC2 tools v. 1.3.6230, which can be downloaded at http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-62308.zip." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Work is underway to support a more recent version of the EC2 API" +msgstr "" + diff --git a/docs/pot/aws-ec2-supported-commands.pot b/docs/pot/aws-ec2-supported-commands.pot new file mode 100644 index 000000000..9ffd9f4b6 --- /dev/null +++ b/docs/pot/aws-ec2-supported-commands.pot @@ -0,0 +1,665 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Supported AWS API Calls" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following Amazon EC2 commands are supported by &PRODUCT; when the AWS API compatible interface is enabled. For a few commands, there are differences between the &PRODUCT; and Amazon EC2 versions, and these differences are noted. The underlying SOAP call for each command is also given, for those who have built tools using those calls." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Elastic IP API mapping" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "EC2 command" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "SOAP call" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "&PRODUCT; API call" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-allocate-address" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "AllocateAddress" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "associateIpAddress" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-associate-address" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "AssociateAddress" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "enableStaticNat" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-describe-addresses" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DescribeAddresses" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "listPublicIpAddresses" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-diassociate-address" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DisassociateAddress" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "disableStaticNat" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-release-address" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ReleaseAddress" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "disassociateIpAddress" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Availability Zone API mapping" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-describe-availability-zones" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DescribeAvailabilityZones" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "listZones" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Images API mapping" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-create-image" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "CreateImage" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "createTemplate" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-deregister" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DeregisterImage" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DeleteTemplate" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-describe-images" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DescribeImages" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "listTemplates" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-register" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "RegisterImage" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "registerTemplate" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Image Attributes API mapping" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-describe-image-attribute" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DescribeImageAttribute" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "listTemplatePermissions" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-modify-image-attribute" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ModifyImageAttribute" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "updateTemplatePermissions" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-reset-image-attribute" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ResetImageAttribute" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Instances API mapping" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-describe-instances" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DescribeInstances" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "listVirtualMachines" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-run-instances" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "RunInstances" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "deployVirtualMachine" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-reboot-instances" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "RebootInstances" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "rebootVirtualMachine" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-start-instances" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "StartInstances" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "startVirtualMachine" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-stop-instances" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "StopInstances" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "stopVirtualMachine" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-terminate-instances" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "TerminateInstances" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "destroyVirtualMachine" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Instance Attributes Mapping" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-describe-instance-attribute" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DescribeInstanceAttribute" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Keys Pairs Mapping" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-add-keypair" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "CreateKeyPair" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "createSSHKeyPair" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-delete-keypair" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DeleteKeyPair" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "deleteSSHKeyPair" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-describe-keypairs" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DescribeKeyPairs" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "listSSHKeyPairs" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-import-keypair" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ImportKeyPair" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "registerSSHKeyPair" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Passwords API Mapping" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-get-password" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "GetPasswordData" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "getVMPassword" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Security Groups API Mapping" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-authorize" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "AuthorizeSecurityGroupIngress" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "authorizeSecurityGroupIngress" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-add-group" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "CreateSecurityGroup" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "createSecurityGroup" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-delete-group" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DeleteSecurityGroup" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "deleteSecurityGroup" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-describe-group" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DescribeSecurityGroups" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "listSecurityGroups" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-revoke" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "RevokeSecurityGroupIngress" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "revokeSecurityGroupIngress" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Snapshots API Mapping" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-create-snapshot" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "CreateSnapshot" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "createSnapshot" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-delete-snapshot" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DeleteSnapshot" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "deleteSnapshot" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-describe-snapshots" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DescribeSnapshots" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "listSnapshots" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Volumes API Mapping" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-attach-volume" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "AttachVolume" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "attachVolume" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-create-volume" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "CreateVolume" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "createVolume" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-delete-volume" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DeleteVolume" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "deleteVolume" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-describe-volume" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DescribeVolume" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "listVolumes" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "ec2-detach-volume" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "DetachVolume" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "detachVolume" +msgstr "" + diff --git a/docs/pot/aws-ec2-timeouts.pot b/docs/pot/aws-ec2-timeouts.pot new file mode 100644 index 000000000..190ad8d82 --- /dev/null +++ b/docs/pot/aws-ec2-timeouts.pot @@ -0,0 +1,80 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using Timeouts to Ensure AWS API Command Completion" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Amazon EC2 command-line tools have a default connection timeout. When used with &PRODUCT;, a longer timeout might be needed for some commands. If you find that commands are not completing due to timeouts, you can specify a custom timeouts. You can add the following optional command-line parameters to any &PRODUCT;-supported EC2 command:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "--connection-timeout TIMEOUT" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "Specifies a connection timeout (in seconds). Example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "--connection-timeout 30" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "--request-timeout TIMEOUT" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "Specifies a request timeout (in seconds). Example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "--request-timeout 45" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "ec2-run-instances 2 –z us-test1 –n 1-3 --connection-timeout 120 --request-timeout 120" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The timeouts optional arguments are not specific to &PRODUCT;." +msgstr "" + diff --git a/docs/pot/aws-ec2-user-setup.pot b/docs/pot/aws-ec2-user-setup.pot new file mode 100644 index 000000000..c14129208 --- /dev/null +++ b/docs/pot/aws-ec2-user-setup.pot @@ -0,0 +1,141 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "AWS API User Setup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In general, users need not be aware that they are using a translation service provided by &PRODUCT;. They only need to send AWS API calls to &PRODUCT;'s endpoint, and it will translate the calls to the native &PRODUCT; API. Users of the Amazon EC2 compatible interface will be able to keep their existing EC2 tools and scripts and use them with their &PRODUCT; deployment, by specifying the endpoint of the management server and using the proper user credentials. In order to do this, each user must perform the following configuration steps:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Generate user credentials." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Register with the service." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For convenience, set up environment variables for the EC2 SOAP command-line tools." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "AWS API User Registration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Each user must perform a one-time registration. The user follows these steps:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Obtain the following by looking in the &PRODUCT; UI, using the API, or asking the cloud administrator:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; server's publicly available DNS name or IP address" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The user account's Access key and Secret key" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Generate a private key and a self-signed X.509 certificate. The user substitutes their own desired storage location for /path/to/… below." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /path/to/private_key.pem -out /path/to/cert.pem" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Register the user X.509 certificate and Access/Secret keys with the AWS compatible service. If you have the source code of &PRODUCT; go to the awsapi-setup/setup directory and use the Python script cloudstack-aws-api-register. If you do not have the source then download the script using the following command." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "wget -O cloudstack-aws-api-register \"https://git-wip-us.apache.org/repos/asf?p=incubator-cloudstack.git;a=blob_plain;f=awsapi-setup/setup/cloudstack-aws-api-register;hb=HEAD\"\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Then execute it, using the parameter values that were obtained in step 1. An example is shown below." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ cloudstack-aws-api-register --apikey=User’s &PRODUCT; API key --secretkey=User’s &PRODUCT; Secret key --cert=/path/to/cert.pem --url=http://&PRODUCT;.server:7080/awsapi" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A user with an existing AWS certificate could choose to use the same certificate with &PRODUCT;, but note that the certificate would be uploaded to the &PRODUCT; management server database." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "AWS API Command-Line Tools Setup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To use the EC2 command-line tools, the user must perform these steps:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Be sure you have the right version of EC2 Tools. The supported version is available at http://s3.amazonaws.com/ec2-downloads/ec2-api-tools-1.3-62308.zip." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set up the EC2 environment variables. This can be done every time you use the service or you can set them up in the proper shell profile. Replace the endpoint (i.e EC2_URL) with the proper address of your &PRODUCT; management server and port. In a bash shell do the following." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +" $ export EC2_CERT=/path/to/cert.pem\n" +" $ export EC2_PRIVATE_KEY=/path/to/private_key.pem\n" +" $ export EC2_URL=http://localhost:7080/awsapi\n" +" $ export EC2_HOME=/path/to/EC2_tools_directory\n" +" " +msgstr "" + diff --git a/docs/pot/aws-interface-compatibility.pot b/docs/pot/aws-interface-compatibility.pot new file mode 100644 index 000000000..8ed02a827 --- /dev/null +++ b/docs/pot/aws-interface-compatibility.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Amazon Web Services Compatible Interface" +msgstr "" + diff --git a/docs/pot/basic-adv-networking.pot b/docs/pot/basic-adv-networking.pot new file mode 100644 index 000000000..2e67f2c2d --- /dev/null +++ b/docs/pot/basic-adv-networking.pot @@ -0,0 +1,195 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Basic and Advanced Networking" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; provides two styles of networking:." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Basic" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For AWS-style networking. Provides a single network where guest isolation can be provided through layer-3 means such as security groups (IP address source filtering)." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Advanced" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more sophisticated network topologies. This network model provides the most flexibility in defining guest networks, but requires more configuration steps than basic networking." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Each zone has either basic or advanced networking. Once the choice of networking model for a zone has been made and configured in &PRODUCT;, it can not be changed. A zone is either basic or advanced for its entire lifetime." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following table compares the networking features in the two networking models." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Networking Feature" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Basic Network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Advanced Network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Number of networks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Single network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Multiple networks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Firewall type" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Physical" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Physical and Virtual" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Load balancer" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Isolation type" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Layer 3" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Layer 2 and Layer 3" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPN support" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "No" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Yes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Port forwarding" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "1:1 NAT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Source NAT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Userdata" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network usage monitoring" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "sFlow / netFlow at physical router" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor and Virtual Router" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DNS and DHCP" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The two types of networking may be in use in the same cloud. However, a given zone must use either Basic Networking or Advanced Networking." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Different types of network traffic can be segmented on the same physical network. Guest traffic can also be segmented by account. To isolate traffic, you can use separate VLANs. If you are using separate VLANs on a single physical network, make sure the VLAN tags are in separate numerical ranges." +msgstr "" + diff --git a/docs/pot/basic-zone-configuration.pot b/docs/pot/basic-zone-configuration.pot new file mode 100644 index 000000000..ee76cf456 --- /dev/null +++ b/docs/pot/basic-zone-configuration.pot @@ -0,0 +1,360 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Basic Zone Configuration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After you select Basic in the Add Zone wizard and click Next, you will be asked to enter the following details. Then click Next." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name. A name for the zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DNS 1 and 2. These are DNS servers for use by guest VMs in the zone. These DNS servers will be accessed via the public network you will add later. The public IP addresses for the zone must have a route to the DNS server named here." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Internal DNS 1 and Internal DNS 2. These are DNS servers for use by system VMs in the zone (these are VMs used by &PRODUCT; itself, such as virtual routers, console proxies, and Secondary Storage VMs.) These DNS servers will be accessed via the management traffic network interface of the System VMs. The private IP address you provide for the pods must have a route to the internal DNS server named here." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor. (Introduced in version 3.0.1) Choose the hypervisor for the first cluster in the zone. You can add clusters with different hypervisors later, after you finish adding the zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network Offering. Your choice here determines what network services will be available on the network for guest VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network Offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DefaultSharedNetworkOfferingWithSGService" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you want to enable security groups for guest traffic isolation, choose this. (See Using Security Groups to Control Traffic to VMs.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DefaultSharedNetworkOffering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you do not need security groups, choose this." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DefaultSharedNetscalerEIPandELBNetworkOffering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you have installed a Citrix NetScaler appliance as part of your zone network, and you will be using its Elastic IP and Elastic Load Balancing features, choose this. With the EIP and ELB features, a basic zone with security groups enabled can offer 1:1 static NAT and load balancing." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network Domain. (Optional) If you want to assign a special domain name to the guest VM network, specify the DNS suffix." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public. A public zone is available to all users. A zone that is not public will be assigned to a particular domain. Only users in that domain will be allowed to create guest VMs in this zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose which traffic types will be carried by the physical network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The traffic types are management, public, guest, and storage traffic. For more information about the types, roll over the icons to display their tool tips, or see Basic Zone Network Traffic Types. This screen starts out with some traffic types already assigned. To add more, drag and drop traffic types onto the network. You can also change the network name if desired." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Introduced in version 3.0.1) Assign a network traffic label to each traffic type on the physical network. These labels must match the labels you have already defined on the hypervisor host. To assign each label, click the Edit button under the traffic type icon. A popup dialog appears where you can type the label, then click OK." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "These traffic labels will be defined only for the hypervisor selected for the first cluster. For all other hypervisors, the labels can be configured after the zone is created." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Next." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(NetScaler only) If you chose the network offering for NetScaler, you have an additional screen to fill out. Provide the requested details to set up the NetScaler, then click Next." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP address. The NSIP (NetScaler IP) address of the NetScaler device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Username/Password. The authentication credentials to access the device. &PRODUCT; uses these credentials to access the device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Type. NetScaler device type that is being added. It could be NetScaler VPX, NetScaler MPX, or NetScaler SDX. For a comparison of the types, see About Using a NetScaler Load Balancer." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public interface. Interface of NetScaler that is configured to be part of the public network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Private interface. Interface of NetScaler that is configured to be part of the private network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Number of retries. Number of times to attempt a command on the device before considering the operation failed. Default is 2." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Capacity. Number of guest networks/accounts that will share this NetScaler device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Dedicated. When marked as dedicated, this device will be dedicated to a single account. When Dedicated is checked, the value in the Capacity field has no significance – implicitly, its value is 1." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(NetScaler only) Configure the IP range for public traffic. The IPs in this range will be used for the static NAT capability which you enabled by selecting the network offering for NetScaler with EIP and ELB. Enter the following details, then click Add. If desired, you can repeat this step to add more IP ranges. When done, click Next." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateway. The gateway in use for these IP addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Netmask. The netmask associated with this IP range." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN. The VLAN that will be used for public traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start IP/End IP. A range of IP addresses that are assumed to be accessible from the Internet and will be allocated for access to guest VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a new zone, &PRODUCT; adds the first pod for you. You can always add more pods later. For an overview of what a pod is, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To configure the first pod, enter the following, then click Next:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Pod Name. A name for the pod." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Reserved system gateway. The gateway for the hosts in that pod." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Reserved system netmask. The network prefix that defines the pod's subnet. Use CIDR notation." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start/End Reserved System IP. The IP range in the management network that &PRODUCT; uses to manage various system VMs, such as Secondary Storage VMs, Console Proxy VMs, and DHCP. For more information, see System Reserved IP Addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure the network for guest traffic. Provide the following, then click Next:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest gateway. The gateway that the guests should use." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest netmask. The netmask in use on the subnet the guests will use." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest start IP/End IP. Enter the first and last IP addresses that define a range that &PRODUCT; can assign to guests." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "We strongly recommend the use of multiple NICs. If multiple NICs are used, they may be in a different subnet." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If one NIC is used, these IPs should be in the same CIDR as the pod CIDR." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a new pod, &PRODUCT; adds the first cluster for you. You can always add more clusters later. For an overview of what a cluster is, see About Clusters." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To configure the first cluster, enter the following, then click Next:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor. (Version 3.0.0 only; in 3.0.1, this field is read only) Choose the type of hypervisor software that all hosts in this cluster will run. If you choose VMware, additional fields appear so you can give information about a vSphere cluster. For vSphere servers, we recommend creating the cluster of hosts in vCenter and then adding the entire cluster to &PRODUCT;. See Add Cluster: vSphere." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Cluster name. Enter a name for the cluster. This can be text of your choosing and is not used by &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a new cluster, &PRODUCT; adds the first host for you. You can always add more hosts later. For an overview of what a host is, see About Hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you add a hypervisor host to &PRODUCT;, the host must not have any VMs already running." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Before you can configure the host, you need to install the hypervisor software on the host. You will need to know which version of the hypervisor software version is supported by &PRODUCT; and what additional configuration is required to ensure the host will work with &PRODUCT;. To find these installation details, see:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Citrix XenServer Installation and Configuration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VMware vSphere Installation and Configuration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "KVM vSphere Installation and Configuration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To configure the first host, enter the following, then click Next:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Host Name. The DNS name or IP address of the host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Username. The username is root." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Password. This is the password for the user named above (from your XenServer or KVM install)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Host Tags. (Optional) Any labels that you use to categorize hosts for ease of maintenance. For example, you can set this to the cloud's HA tag (set in the ha.tag global configuration parameter) if you want this host to be used only for VMs with the \"high availability\" feature enabled. For more information, see HA-Enabled Virtual Machines as well as HA for Hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a new cluster, &PRODUCT; adds the first primary storage server for you. You can always add more servers later. For an overview of what primary storage is, see About Primary Storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To configure the first primary storage server, enter the following, then click Next:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name. The name of the storage device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Protocol. For XenServer, choose either NFS, iSCSI, or PreSetup. For KVM, choose NFS, SharedMountPoint,CLVM, or RBD. For vSphere choose either VMFS (iSCSI or FiberChannel) or NFS. The remaining fields in the screen vary depending on what you choose here." +msgstr "" + diff --git a/docs/pot/basic-zone-guest-ip-addresses.pot b/docs/pot/basic-zone-guest-ip-addresses.pot new file mode 100644 index 000000000..c656eb525 --- /dev/null +++ b/docs/pot/basic-zone-guest-ip-addresses.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Basic Zone Guest IP Addresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When basic networking is used, &PRODUCT; will assign IP addresses in the CIDR of the pod to the guests in that pod. The administrator must add a Direct IP range on the pod for this purpose. These IPs are in the same VLAN as the hosts." +msgstr "" + diff --git a/docs/pot/basic-zone-network-traffic-types.pot b/docs/pot/basic-zone-network-traffic-types.pot new file mode 100644 index 000000000..dab50e915 --- /dev/null +++ b/docs/pot/basic-zone-network-traffic-types.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Basic Zone Network Traffic Types" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When basic networking is used, there can be only one physical network in the zone. That physical network carries the following traffic types:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest. When end users run VMs, they generate guest traffic. The guest VMs communicate with each other over a network that can be referred to as the guest network. Each pod in a basic zone is a broadcast domain, and therefore each pod has a different IP range for the guest network. The administrator must configure the IP range for each pod." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Management. When &PRODUCT;’s internal resources communicate with each other, they generate management traffic. This includes communication between hosts, system VMs (VMs used by &PRODUCT; to perform various tasks in the cloud), and any other component that communicates directly with the &PRODUCT; Management Server. You must configure the IP range for the system VMs to use." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "We strongly recommend the use of separate NICs for management traffic and guest traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public. Public traffic is generated when VMs in the cloud access the Internet. Publicly accessible IPs must be allocated for this purpose. End users can use the &PRODUCT; UI to acquire these IPs to implement NAT between their guest network and the public network, as described in Acquiring a New IP Address." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Storage. Traffic such as VM templates and snapshots, which is sent between the secondary storage VM and secondary storage servers. &PRODUCT; uses a separate Network Interface Controller (NIC) named storage NIC for storage network traffic. Use of a storage NIC that always operates on a high bandwidth network allows fast template and snapshot copying. You must configure the IP range to use for the storage network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a basic network, configuring the physical network is fairly straightforward. In most cases, you only need to configure one guest network to carry traffic that is generated by guest VMs. If you use a NetScaler load balancer and enable its elastic IP and elastic load balancing (EIP and ELB) features, you must also configure a network to carry public traffic. &PRODUCT; takes care of presenting the necessary network configuration steps to you in the UI when you add a new zone." +msgstr "" + diff --git a/docs/pot/basic-zone-physical-network-configuration.pot b/docs/pot/basic-zone-physical-network-configuration.pot new file mode 100644 index 000000000..a9d81520f --- /dev/null +++ b/docs/pot/basic-zone-physical-network-configuration.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Basic Zone Physical Network Configuration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a basic network, configuring the physical network is fairly straightforward. You only need to configure one guest network to carry traffic that is generated by guest VMs. When you first add a zone to &PRODUCT;, you set up the guest network through the Add Zone screens." +msgstr "" + diff --git a/docs/pot/best-practices-for-vms.pot b/docs/pot/best-practices-for-vms.pot new file mode 100644 index 000000000..9e8ca1187 --- /dev/null +++ b/docs/pot/best-practices-for-vms.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Best Practices for Virtual Machines" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; administrator should monitor the total number of VM instances in each cluster, and disable allocation to the cluster if the total is approaching the maximum that the hypervisor can handle. Be sure to leave a safety margin to allow for the possibility of one or more hosts failing, which would increase the VM load on the other hosts as the VMs are automatically redeployed. Consult the documentation for your chosen hypervisor to find the maximum permitted number of VMs per host, then use &PRODUCT; global configuration settings to set this as the default limit. Monitor the VM activity in each cluster at all times. Keep the total number of VMs below a safe level that allows for the occasional host failure. For example, if there are N hosts in the cluster, and you want to allow for one host in the cluster to be down at any given time, the total number of VM instances you can permit in the cluster is at most (N-1) * (per-host-limit). Once a cluster reaches this number of VMs, use the &PRODUCT; UI to disable allocation of more VMs to the cluster." +msgstr "" + diff --git a/docs/pot/best-practices-primary-storage.pot b/docs/pot/best-practices-primary-storage.pot new file mode 100644 index 000000000..6dd7ab2af --- /dev/null +++ b/docs/pot/best-practices-primary-storage.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Best Practices for Primary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The speed of primary storage will impact guest performance. If possible, choose smaller, higher RPM drives for primary storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that nothing is stored on the server. Adding the server to &PRODUCT; will destroy any existing data" +msgstr "" + diff --git a/docs/pot/best-practices-secondary-storage.pot b/docs/pot/best-practices-secondary-storage.pot new file mode 100644 index 000000000..43326cf02 --- /dev/null +++ b/docs/pot/best-practices-secondary-storage.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Best Practices for Secondary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Each Zone can have one or more secondary storage servers. Multiple secondary storage servers provide increased scalability to the system." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Secondary storage has a high read:write ratio and is expected to consist of larger drives with lower IOPS than primary storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that nothing is stored on the server. Adding the server to &PRODUCT; will destroy any existing data." +msgstr "" + diff --git a/docs/pot/best-practices-templates.pot b/docs/pot/best-practices-templates.pot new file mode 100644 index 000000000..4b822784d --- /dev/null +++ b/docs/pot/best-practices-templates.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Best Practices for Templates" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you plan to use large templates (100 GB or larger), be sure you have a 10-gigabit network to support the large templates. A slower network can lead to timeouts and other errors when large templates are used." +msgstr "" + diff --git a/docs/pot/best-practices-virtual-router.pot b/docs/pot/best-practices-virtual-router.pot new file mode 100644 index 000000000..d1cd63a59 --- /dev/null +++ b/docs/pot/best-practices-virtual-router.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Best Practices for Virtual Routers" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "WARNING: Restarting a virtual router from a hypervisor console deletes all the iptables rules. To work around this issue, stop the virtual router and start it from the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "WARNING: Do not use the destroyRouter API when only one router is available in the network, because restartNetwork API with the cleanup=false parameter can't recreate it later. If you want to destroy and recreate the single router available in the network, use the restartNetwork API with the cleanup=true parameter." +msgstr "" + diff --git a/docs/pot/build-deb.pot b/docs/pot/build-deb.pot new file mode 100644 index 000000000..995b086af --- /dev/null +++ b/docs/pot/build-deb.pot @@ -0,0 +1,175 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Building DEB packages" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In addition to the bootstrap dependencies, you'll also need to install several other dependencies. Note that we recommend using Maven 3, which is not currently available in 12.04.1 LTS. So, you'll also need to add a PPA repository that includes Maven 3. After running the command add-apt-repository, you will be prompted to continue and a GPG key will be added." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"$ sudo apt-get update\n" +"$ sudo apt-get install python-software-properties\n" +"$ sudo add-apt-repository ppa:natecarlson/maven3\n" +"$ sudo apt-get update\n" +"$ sudo apt-get install ant debhelper openjdk-6-jdk tomcat6 libws-commons-util-java genisoimage python-mysqldb libcommons-codec-java libcommons-httpclient-java liblog4j1.2-java maven3\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "While we have defined, and you have presumably already installed the bootstrap prerequisites, there are a number of build time prerequisites that need to be resolved. &PRODUCT; uses maven for dependency resolution. You can resolve the buildtime depdencies for CloudStack by running:" +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "$ mvn3 -P deps" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now that we have resolved the dependencies we can move on to building &PRODUCT; and packaging them into DEBs by issuing the following command." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"$ dpkg-buildpackage -uc -us\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This command will build 16 Debian packages. You should have all of the following:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"cloud-agent_4.0.0-incubating_amd64.deb\n" +"cloud-agent-deps_4.0.0-incubating_amd64.deb\n" +"cloud-agent-libs_4.0.0-incubating_amd64.deb\n" +"cloud-awsapi_4.0.0-incubating_amd64.deb\n" +"cloud-cli_4.0.0-incubating_amd64.deb\n" +"cloud-client_4.0.0-incubating_amd64.deb\n" +"cloud-client-ui_4.0.0-incubating_amd64.deb\n" +"cloud-core_4.0.0-incubating_amd64.deb\n" +"cloud-deps_4.0.0-incubating_amd64.deb\n" +"cloud-python_4.0.0-incubating_amd64.deb\n" +"cloud-scripts_4.0.0-incubating_amd64.deb\n" +"cloud-server_4.0.0-incubating_amd64.deb\n" +"cloud-setup_4.0.0-incubating_amd64.deb\n" +"cloud-system-iso_4.0.0-incubating_amd64.deb\n" +"cloud-usage_4.0.0-incubating_amd64.deb\n" +"cloud-utils_4.0.0-incubating_amd64.deb\n" +"" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Setting up an APT repo" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After you've created the packages, you'll want to copy them to a system where you can serve the packages over HTTP. You'll create a directory for the packages and then use dpkg-scanpackages to create Packages.gz, which holds information about the archive structure. Finally, you'll add the repository to your system(s) so you can install the packages using APT." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The first step is to make sure that you have the dpkg-dev package installed. This should have been installed when you pulled in the debhelper application previously, but if you're generating Packages.gz on a different system, be sure that it's installed there as well." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "$ sudo apt-get install dpkg-dev" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The next step is to copy the DEBs to the directory where they can be served over HTTP. We'll use /var/www/cloudstack/repo in the examples, but change the directory to whatever works for you." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"sudo mkdir -p /var/www/cloudstack/repo/binary\n" +"sudo cp *.deb /var/www/cloudstack/repo/binary\n" +"sudo cd /var/www/cloudstack/repo/binary\n" +"sudo dpkg-scanpackages . /dev/null | tee Packages | gzip -9 > Packages.gz\n" +"" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Note: Override Files" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can safely ignore the warning about a missing override file." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now you should have all of the DEB packages and Packages.gz in the binary directory and available over HTTP. (You may want to use wget or curl to test this before moving on to the next step.)" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Configuring your machines to use the APT repository" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now that we have created the repository, you need to configure your machine to make use of the APT repository. You can do this by adding a repository file under /etc/apt/sources.list.d. Use your preferred editor to create /etc/apt/sources.list.d/cloudstack.list with this line:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "deb http://server.url/cloudstack/repo binary ./" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now that you have the repository info in place, you'll want to run another update so that APT knows where to find the &PRODUCT; packages." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "$ sudo apt-get update" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can now move on to the instructions under Install on Ubuntu." +msgstr "" + diff --git a/docs/pot/build-rpm.pot b/docs/pot/build-rpm.pot new file mode 100644 index 000000000..a514062a6 --- /dev/null +++ b/docs/pot/build-rpm.pot @@ -0,0 +1,111 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Building RPMs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "While we have defined, and you have presumably already installed the bootstrap prerequisites, there are a number of build time prerequisites that need to be resolved. &PRODUCT; uses maven for dependency resolution. You can resolve the buildtime depdencies for CloudStack by running the following command:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ mvn -P deps" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now that we have resolved the dependencies we can move on to building &PRODUCT; and packaging them into RPMs by issuing the following command." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ ./waf rpm" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Once this completes, you should find assembled RPMs in artifacts/rpmbuild/RPMS/x86_64" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Creating a yum repo" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "While RPMs is an ideal packaging format - it's most easily consumed from yum repositories over a network. We'll move into the directory with the newly created RPMs by issuing the following command:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ cd artifacts/rpmbuild/RPMS/x86_64" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Next we'll issue a command to create the repository metadata by issuing the following command:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ createrepo ./" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The files and directories within our current working directory can now be uploaded to a web server and serve as a yum repository" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Configuring your systems to use your new yum repository" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now that your yum repository is populated with RPMs and metadata we need to configure our machines that need to install CloudStack. We will create a file at /etc/yum.repos.d/cloudstack.repo with the following content:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"[apache-cloudstack]\n" +"name=Apache CloudStack\n" +"baseurl=http://webserver.tld/path/to/repo\n" +"enabled=1\n" +"gpgcheck=0\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Completing this step will allow you to easily install CloudStack on a number of machines across the network." +msgstr "" + diff --git a/docs/pot/building-devcloud.pot b/docs/pot/building-devcloud.pot new file mode 100644 index 000000000..ef4d81475 --- /dev/null +++ b/docs/pot/building-devcloud.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Building DevCloud" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The DevCloud appliance can be downloaded from the wiki at . It can also be built from scratch. Code is being developed to provide this alternative build. It is based on veewee, Vagrant and Puppet." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The goal is to automate the DevCloud build and make this automation capability available to all within the source release of &PRODUCT;" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This is under heavy development. The code is located in the source tree under tools/devcloud" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A preliminary wiki page describes the build at https://cwiki.pache.org/CLOUDSTACK/building-devcloud.html" +msgstr "" + diff --git a/docs/pot/building-marvin.pot b/docs/pot/building-marvin.pot new file mode 100644 index 000000000..500d79270 --- /dev/null +++ b/docs/pot/building-marvin.pot @@ -0,0 +1,91 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Building and Installing Marvin" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Marvin is built with Maven and is dependent on APIdoc. To build it do the following in the root tree of &PRODUCT;:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "mvn -P developer -l :cloud-apidoc" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "mvn -P developer -l :cloud-marvin" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If successfull the build will have created the cloudstackAPI Python package under tools/marvin/marvin/cloudstackAPI as well as a gziped Marvin package under tools/marvin dist. To install the Python Marvin module do the following in tools/marvin:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "sudo python ./setup.py install" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The dependencies will be downloaded the Python module installed and you should be able to use Marvin in Python. Check that you can import the module before starting to use it." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ python\n" +"Python 2.7.3 (default, Nov 17 2012, 19:54:34) \n" +"[GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.66))] on darwin\n" +"Type \"help\", \"copyright\", \"credits\" or \"license\" for more information.\n" +">>> import marvin\n" +">>> from marvin.cloudstackAPI import *\n" +">>> " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You could also install it using pip or easy_install using the local distribution package in tools/marvin/dist :" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "pip install tools/marvin/dist/Marvin-0.1.0.tar.gz" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Or:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "easy_install tools/marvin/dist/Marvin-0.1.0.tar.gz" +msgstr "" + diff --git a/docs/pot/building-prerequisites.pot b/docs/pot/building-prerequisites.pot new file mode 100644 index 000000000..8758528a9 --- /dev/null +++ b/docs/pot/building-prerequisites.pot @@ -0,0 +1,116 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Build Procedure Prerequisites" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In this section we will assume that you are using the Ubuntu Linux distribution with the Advanced Packaging Tool (APT). If you are using a different distribution or OS and a different packaging tool, adapt the following instructions to your environment. To build &PRODUCT; you will need:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "git, http://git-scm.com" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "sudo apt-get install git-core" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "maven, http://maven.apache.org" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "sudo apt-get install maven" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure that you installed maven 3" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ mvn --version\n" +"Apache Maven 3.0.4\n" +"Maven home: /usr/share/maven\n" +"Java version: 1.6.0_24, vendor: Sun Microsystems Inc.\n" +"Java home: /usr/lib/jvm/java-6-openjdk-amd64/jre\n" +"Default locale: en_US, platform encoding: UTF-8\n" +"OS name: \"linux\", version: \"3.2.0-33-generic\", arch: \"amd64\", family: \"unix\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "java" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "set the JAVA_HOME environment variable" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ export JAVA_HOME=/usr/lib/jvm/java-6-openjdk" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In addition, to deploy and run &PRODUCT; in a development environment you will need:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Mysql" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "sudo apt-get install mysql-server-5.5" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start the mysqld service and create a cloud user with cloud as a password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tomcat 6" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "sudo apt-get install tomcat6" +msgstr "" + diff --git a/docs/pot/building-with-maven-deploy.pot b/docs/pot/building-with-maven-deploy.pot new file mode 100644 index 000000000..5efce8836 --- /dev/null +++ b/docs/pot/building-with-maven-deploy.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Deployment and Testing Steps" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Deploying the &PRODUCT; code that you compiled is a two step process:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you have not configured the database or modified its properties do:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "mvn -P developer -pl developer -Ddeploydb" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Then you need to run the &PRODUCT; management server. To attach a debugger to it, do:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "export MAVEN_OPTS=\"-Xmx1024 -Xdebug -Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n\"" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "mvn -pl :cloud-client-ui jetty:run" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When dealing with the database, remember that you may wipe it entirely and lose any data center configuration that you may have set previously." +msgstr "" + diff --git a/docs/pot/building-with-maven-steps.pot b/docs/pot/building-with-maven-steps.pot new file mode 100644 index 000000000..3e8bdb955 --- /dev/null +++ b/docs/pot/building-with-maven-steps.pot @@ -0,0 +1,55 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Building Steps" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; uses git for source version control, first make sure you have the source code by pulling it:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "git clone https://git-wip-us.apache.org/repos/asf/incubator-cloudstack.git" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Several Project Object Models (POM) are defined to deal with the various build targets of &PRODUCT;. Certain features require some packages that are not compatible with the Apache license and therefore need to be downloaded on your own. Check the wiki for additional information https://cwiki.apache.org/CLOUDSTACK/building-with-maven.html. In order to build all the open source targets of &PRODUCT; do:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "mvn clean install" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The resulting jar files will be in the target directory of the subdirectory of the compiled module." +msgstr "" + diff --git a/docs/pot/building-with-maven.pot b/docs/pot/building-with-maven.pot new file mode 100644 index 000000000..aaa0a27b0 --- /dev/null +++ b/docs/pot/building-with-maven.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using Maven to Build &PRODUCT;" +msgstr "" + diff --git a/docs/pot/castor-with-cs.pot b/docs/pot/castor-with-cs.pot new file mode 100644 index 000000000..1637a6b34 --- /dev/null +++ b/docs/pot/castor-with-cs.pot @@ -0,0 +1,123 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using the CAStor Back-end Storage with &PRODUCT;" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This section describes how to use a CAStor cluster as the back-end storage system for a &PRODUCT; S3 front-end. The CAStor back-end storage for &PRODUCT; extends the existing storage classes and allows the storage configuration attribute to point to a CAStor cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This feature makes use of the &PRODUCT; server's local disk to spool files before writing them to CAStor when handling the PUT operations. However, a file must be successfully written into the CAStor cluster prior to the return of a success code to the S3 client to ensure that the transaction outcome is correctly reported." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The S3 multipart file upload is not supported in this release. You are prompted with proper error message if a multipart upload is attempted." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To configure CAStor:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install &PRODUCT; 4.0.0-incubating by following the instructions given in the INSTALL.txt file." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can use the S3 storage system in &PRODUCT; without setting up and installing the compute components." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Enable the S3 API by setting \"enable.s3.api = true\" in the Global parameter section in the UI and register a user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more information, see S3 API in &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Edit the cloud-bridge.properties file and modify the \"storage.root\" parameter." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set \"storage.root\" to the key word \"castor\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Specify a CAStor tenant domain to which content is written. If the domain is not specified, the CAStor default domain, specified by the \"cluster\" parameter in CAStor's node.cfg file, will be used." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Specify a list of node IP addresses, or set \"zeroconf\" and the cluster name. When using a static IP list with a large cluster, it is not necessary to include every node, only a few is required to initialize the client software." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "storage.root=castor domain=cloudstack 10.1.1.51 10.1.1.52 10.1.1.53" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In this example, the configuration file directs &PRODUCT; to write the S3 files to CAStor instead of to a file system, where the CAStor domain name is cloudstack, and the CAStor node IP addresses are those listed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) The last value is a port number on which to communicate with the CAStor cluster. If not specified, the default is 80." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "#Static IP list with optional port\n" +"storage.root=castor domain=cloudstack 10.1.1.51 10.1.1.52 10.1.1.53 80\n" +"#Zeroconf locator for cluster named \"castor.example.com\"\n" +"storage.root=castor domain=cloudstack zeroconf=castor.example.com" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create the tenant domain within the CAStor storage cluster. If you omit this step before attempting to store content, you will get HTTP 412 errors in the awsapi.log." +msgstr "" + diff --git a/docs/pot/change-console-proxy-ssl-certificate-domain.pot b/docs/pot/change-console-proxy-ssl-certificate-domain.pot new file mode 100644 index 000000000..cd1d121d0 --- /dev/null +++ b/docs/pot/change-console-proxy-ssl-certificate-domain.pot @@ -0,0 +1,120 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Changing the Console Proxy SSL Certificate and Domain" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the administrator prefers, it is possible for the URL of the customer's console session to show a domain other than realhostip.com. The administrator can customize the displayed domain by selecting a different domain and uploading a new SSL certificate and private key. The domain must run a DNS service that is capable of resolving queries for addresses of the form aaa-bbb-ccc-ddd.your.domain to an IPv4 IP address in the form aaa.bbb.ccc.ddd, for example, 202.8.44.1. To change the console proxy domain, SSL certificate, and private key:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set up dynamic name resolution or populate all possible DNS names in your public IP range into your existing DNS server with the format aaa-bbb-ccc-ddd.company.com -> aaa.bbb.ccc.ddd." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Generate the private key and certificate signing request (CSR). When you are using openssl to generate private/public key pairs and CSRs, for the private key that you are going to paste into the &PRODUCT; UI, be sure to convert it into PKCS#8 format." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Generate a new 2048-bit private key" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "openssl genrsa -des3 -out yourprivate.key 2048" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Generate a new certificate CSR" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "openssl req -new -key yourprivate.key -out yourcertificate.csr" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Head to the website of your favorite trusted Certificate Authority, purchase an SSL certificate, and submit the CSR. You should receive a valid certificate in return" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Convert your private key format into PKCS#8 encrypted format." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "openssl pkcs8 -topk8 -in yourprivate.key -out yourprivate.pkcs8.encryped.key" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Convert your PKCS#8 encrypted private key into the PKCS#8 format that is compliant with &PRODUCT;" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "openssl pkcs8 -in yourprivate.pkcs8.encrypted.key -out yourprivate.pkcs8.key" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Update SSL Certificate screen of the &PRODUCT; UI, paste the following" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Certificate from step 1(c)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Private key from step 1(e)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The desired new domain name; for example, company.com" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This stops all currently running console proxy VMs, then restarts them with the new certificate and key. Users might notice a brief interruption in console availability" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Server will generate URLs of the form \"aaa-bbb-ccc-ddd.company.com\" after this change is made. New console requests will be served with the new DNS domain name, certificate, and key" +msgstr "" + diff --git a/docs/pot/change-database-config.pot b/docs/pot/change-database-config.pot new file mode 100644 index 000000000..f4f6eb056 --- /dev/null +++ b/docs/pot/change-database-config.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Changing the Database Configuration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; Management Server stores database configuration information (e.g., hostname, port, credentials) in the file /etc/cloud/management/db.properties. To effect a change, edit this file on each Management Server, then restart the Management Server." +msgstr "" + diff --git a/docs/pot/change-database-password.pot b/docs/pot/change-database-password.pot new file mode 100644 index 000000000..19445d566 --- /dev/null +++ b/docs/pot/change-database-password.pot @@ -0,0 +1,126 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Changing the Database Password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You may need to change the password for the MySQL account used by CloudStack. If so, you'll need to change the password in MySQL, and then add the encrypted password to /etc/cloud/management/db.properties." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Before changing the password, you'll need to stop CloudStack's management server and the usage engine if you've deployed that component." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"# service cloud-management stop\n" +"# service cloud-usage stop\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Next, you'll update the password for the CloudStack user on the MySQL server." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"# mysql -u root -p\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "At the MySQL shell, you'll change the password and flush privileges:" +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"update mysql.user set password=PASSWORD(\"newpassword123\") where User='cloud';\n" +"flush privileges;\n" +"quit;\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The next step is to encrypt the password and copy the encrypted password to CloudStack's database configuration (/etc/cloud/management/db.properties)." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +"# java -classpath /usr/share/java/cloud-jasypt-1.8.jar \\\n" +"org.jasypt.intf.cli.JasyptPBEStringEncryptionCLI encrypt.sh \\ \n" +"input=\"newpassword123\" password=\"`cat /etc/cloud/management/key`\" \\\n" +"verbose=false \n" +"\n" +"" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "File encryption type" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Note that this is for the file encryption type. If you're using the web encryption type then you'll use password=\"management_server_secret_key\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now, you'll update /etc/cloud/management/db.properties with the new ciphertext. Open /etc/cloud/management/db.properties in a text editor, and update these parameters:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"db.cloud.password=ENC(encrypted_password_from_above) \n" +"db.usage.password=ENC(encrypted_password_from_above) \n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After copying the new password over, you can now start CloudStack (and the usage engine, if necessary)." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "\n" +" # service cloud-management start\n" +" # service cloud-usage start\n" +" " +msgstr "" + diff --git a/docs/pot/change-host-password.pot b/docs/pot/change-host-password.pot new file mode 100644 index 000000000..8623e8579 --- /dev/null +++ b/docs/pot/change-host-password.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Changing Host Password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The password for a XenServer Node, KVM Node, or vSphere Node may be changed in the database. Note that all Nodes in a Cluster must have the same password." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To change a Node's password:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Identify all hosts in the cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Change the password on all hosts in the cluster. Now the password for the host and the password known to &PRODUCT; will not match. Operations on the cluster will fail until the two passwords match." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Get the list of host IDs for the host in the cluster where you are changing the password. You will need to access the database to determine these host IDs. For each hostname \"h\" (or vSphere cluster) that you are changing the password for, execute:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "mysql> select id from cloud.host where name like '%h%';" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This should return a single ID. Record the set of such IDs for these hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Update the passwords for the host in the database. In this example, we change the passwords for hosts with IDs 5, 10, and 12 to \"password\"." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "mysql> update cloud.host set password='password' where id=5 or id=10 or id=12;" +msgstr "" + diff --git a/docs/pot/change-network-offering-on-guest-network.pot b/docs/pot/change-network-offering-on-guest-network.pot new file mode 100644 index 000000000..1c2778bd8 --- /dev/null +++ b/docs/pot/change-network-offering-on-guest-network.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Changing the Network Offering on a Guest Network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A user or administrator can change the network offering that is associated with an existing guest network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are changing from a network offering that uses the &PRODUCT; virtual router to one that uses external devices as network service providers, you must first stop all the VMs on the network. See Stopping and Starting VMs. Then return here and continue to the next step" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the name of the network you want to modify AttachDiskButton.png: button to attach a volume ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Network Offering, choose the new network offering, then click Apply." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A prompt appears asking whether you want to keep the existing CIDR. This is to let you know that if you change the network offering, the CIDR will be affected. Choose No to proceed with the change." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Wait for the update to complete. Don’t try to restart VMs until after the network change is complete." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you stopped any VMs in step 2, restart them." +msgstr "" + diff --git a/docs/pot/change-to-behavior-of-list-commands.pot b/docs/pot/change-to-behavior-of-list-commands.pot new file mode 100644 index 000000000..4ecb64404 --- /dev/null +++ b/docs/pot/change-to-behavior-of-list-commands.pot @@ -0,0 +1,170 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Change to Behavior of List Commands" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There was a major change in how our List* API commands work in CloudStack 3.0 compared to 2.2.x. The rules below apply only for managed resources – those that belong to an account, domain, or project. They are irrelevant for the List* commands displaying unmanaged (system) resources, such as hosts, clusters, and external network resources." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When no parameters are passed in to the call, the caller sees only resources owned by the caller (even when the caller is the administrator). Previously, the administrator saw everyone else's resources by default." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When accountName and domainId are passed in:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The caller sees the resources dedicated to the account specified." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the call is executed by a regular user, the user is authorized to specify only the user's own account and domainId." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the caller is a domain administrator, CloudStack performs an authorization check to see whether the caller is permitted to view resources for the given account and domainId." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When projectId is passed in, only resources belonging to that project are listed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When domainId is passed in, the call returns only resources belonging to the domain specified. To see the resources of subdomains, use the parameter isRecursive=true. Again, the regular user can see only resources owned by that user, the root administrator can list anything, and a domain administrator is authorized to see only resources of the administrator's own domain and subdomains." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To see all resources the caller is authorized to see, except for Project resources, use the parameter listAll=true." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To see all Project resources the caller is authorized to see, use the parameter projectId=-1." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There is one API command that doesn't fall under the rules above completely: the listTemplates command. This command has its own flags defining the list rules:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listTemplates Flag" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "featured" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Returns templates that have been marked as featured and public." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "self" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Returns templates that have been registered or created by the calling user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "selfexecutable" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Same as self, but only returns templates that are ready to be deployed with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "sharedexecutable" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ready templates that have been granted to the calling user by another user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "executable" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Templates that are owned by the calling user, or public templates, that can be used to deploy a new VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "community" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Returns templates that have been marked as public but not featured." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "all" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Returns all templates (only usable by admins)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; UI on a general view will display all resources that the logged-in user is authorized to see, except for project resources. To see the project resources, select the project view." +msgstr "" + diff --git a/docs/pot/changed-apicommands-4-0.pot b/docs/pot/changed-apicommands-4-0.pot new file mode 100644 index 000000000..7f0024f78 --- /dev/null +++ b/docs/pot/changed-apicommands-4-0.pot @@ -0,0 +1,575 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Changed API Commands in 4.0.0-incubating" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "API Commands" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "copyTemplate" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "prepareTemplate" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "registerTemplate" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateTemplate" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createProject" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "activateProject" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "suspendProject" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateProject" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listProjectAccounts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createVolume" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "migrateVolume" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "attachVolume" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "detachVolume" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "uploadVolume" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createSecurityGroup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "registerIso" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "copyIso" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateIso" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createIpForwardingRule" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listIpForwardingRules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createLoadBalancerRule" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateLoadBalancerRule" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createSnapshot" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The commands in this list have a single new response parameter, and no other changes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameter: tags(*)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Many other commands also have the new tags(*) parameter in addition to other changes; those commands are listed separately." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "rebootVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "attachIso" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "detachIso" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listLoadBalancerRuleInstances" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "resetPasswordForVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "changeServiceForVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "recoverVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "startVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "migrateVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deployVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "assignVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "restoreVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "stopVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "destroyVirtualMachine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The commands in this list have two new response parameters, and no other changes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: keypair, tags(*)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listSecurityGroups" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listFirewallRules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listPortForwardingRules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listSnapshots" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listIsos" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listProjects" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listTemplates" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listLoadBalancerRules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The commands in this list have the following new parameters, and no other changes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameter: tags (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listF5LoadBalancerNetworks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listNetscalerLoadBalancerNetworks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listSrxFirewallNetworks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateNetwork" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The commands in this list have three new response parameters, and no other changes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: canusefordeploy, vpcid, tags(*)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createZone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateZone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameter: localstorageenabled (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameter: localstorageenabled" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listZones" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "rebootRouter" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "changeServiceForRouter" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "startRouter" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "destroyRouter" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "stopRouter" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: vpcid, nic(*)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateAccount" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "disableAccount" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listAccounts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "markDefaultZoneForAccount" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "enableAccount" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: vpcavailable, vpclimit, vpctotal" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listRouters" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: forvpc (optional), vpcid (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listNetworkOfferings" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: forvpc (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: forvpc" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVolumes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: details (optional), tags (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: tags(*)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "addTrafficMonitor" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: excludezones (optional), includezones (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createNetwork" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: vpcid (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listPublicIpAddresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: tags (optional), vpcid (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: vpcid, tags(*)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listNetworks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: canusefordeploy (optional), forvpc (optional), tags (optional), vpcid (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "restartNetwork" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "enableStaticNat" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameter: networkid (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createDiskOffering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameter: storagetype (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameter: storagetype" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listDiskOfferings" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateDiskOffering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createFirewallRule" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Changed request parameters: ipaddressid (old version - optional, new version - required)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVirtualMachines" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New request parameters: isoid (optional), tags (optional), templateid (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateStorageNetworkIpRange" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "New response parameters: id, endip, gateway, netmask, networkid, podid, startip, vlan, zoneid" +msgstr "" + diff --git a/docs/pot/changing-root-password.pot b/docs/pot/changing-root-password.pot new file mode 100644 index 000000000..996cbc2fe --- /dev/null +++ b/docs/pot/changing-root-password.pot @@ -0,0 +1,80 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Changing the Root Password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "During installation and ongoing cloud administration, you will need to log in to the UI as the root administrator. The root administrator account manages the &PRODUCT; deployment, including physical infrastructure. The root administrator can modify configuration settings to change basic functionality, create or delete user accounts, and take many actions that should be performed only by an authorized person. When first installing &PRODUCT;, be sure to change the default password to a new, unique value." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Open your favorite Web browser and go to this URL. Substitute the IP address of your own Management Server:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "http://<management-server-ip-address>:8080/client" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the UI using the current root user ID and password. The default is admin, password." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Accounts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the admin account name." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click View Users." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the admin user name." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Change Password button. change-password.png: button to change a user's password " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Type the new password, and click OK." +msgstr "" + diff --git a/docs/pot/changing-secondary-storage-ip.pot b/docs/pot/changing-secondary-storage-ip.pot new file mode 100644 index 000000000..c02be1a97 --- /dev/null +++ b/docs/pot/changing-secondary-storage-ip.pot @@ -0,0 +1,62 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Making API Requests" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can change the secondary storage IP address after it has been provisioned. After changing the IP address on the host, log in to your management server and execute the following commands. Replace HOSTID below with your own value, and change the URL to use the appropriate IP address and path for your server:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +" # mysql -p\n" +" mysql> use cloud;\n" +" mysql> select id from host where type = 'SecondaryStorage';\n" +" mysql> update host_details set value = 'nfs://192.168.160.20/export/mike-ss1'\n" +" where host_id = HOSTID and name = 'orig.url';\n" +" mysql> update host set name = 'nfs://192.168.160.20/export/mike-ss1' where type\n" +" = 'SecondaryStorage' and id = #;\n" +" mysql> update host set url = 'nfs://192.168.160.20/export/mike-ss1' where type\n" +" = 'SecondaryStorage' and id = #;\n" +" mysql> update host set guid = 'nfs://192.168.160.20/export/mike-ss1' where type\n" +" = 'SecondaryStorage' and id = #;\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When copying and pasting a command, be sure the command has pasted as a single line before executing. Some document viewers may introduce unwanted line breaks in copied text." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Then log in to the cloud console UI and stop and start (not reboot) the Secondary Storage VM for that Zone." +msgstr "" + diff --git a/docs/pot/changing-secondary-storage-servers.pot b/docs/pot/changing-secondary-storage-servers.pot new file mode 100644 index 000000000..2a1740090 --- /dev/null +++ b/docs/pot/changing-secondary-storage-servers.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Changing Secondary Storage Servers" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can change the secondary storage NFS mount. Perform the following steps to do so:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Stop all running Management Servers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Wait 30 minutes. This allows any writes to secondary storage to complete." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Copy all files from the old secondary storage mount to the new." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use the procedure above to change the IP address for secondary storage if required." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start the Management Server." +msgstr "" + diff --git a/docs/pot/changing-service-offering-for-vm.pot b/docs/pot/changing-service-offering-for-vm.pot new file mode 100644 index 000000000..cc0232f39 --- /dev/null +++ b/docs/pot/changing-service-offering-for-vm.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Changing the Service Offering for a VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To upgrade or downgrade the level of compute resources available to a virtual machine, you can change the VM's compute offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as a user or admin." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Instances." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose the VM that you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Stop button to stop the VM StopButton.png: button to stop a VM " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Change Service button ChangeServiceButton.png: button to change the service of a VM . The Change service dialog box is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select the offering you want." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK." +msgstr "" + diff --git a/docs/pot/changing-vm-name-os-group.pot b/docs/pot/changing-vm-name-os-group.pot new file mode 100644 index 000000000..cbf2c279e --- /dev/null +++ b/docs/pot/changing-vm-name-os-group.pot @@ -0,0 +1,90 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Changing the VM Name, OS, or Group" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After a VM is created, you can modify the display name, operating system, and the group it belongs to." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To access a VM through the &PRODUCT; UI:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as a user or admin." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Instances." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select the VM that you want to modify." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Stop button to stop the VM StopButton.png: button to stop a VM " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Edit StopButton.png: button to edit the properties of a VM ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make the desired changes to the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Display name: Enter a new display name if you want to change the name of the VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "OS Type: Select the desired operating system." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Group: Enter the group name for the VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Apply." +msgstr "" + diff --git a/docs/pot/choosing-a-deployment-architecture.pot b/docs/pot/choosing-a-deployment-architecture.pot new file mode 100644 index 000000000..a42b765b5 --- /dev/null +++ b/docs/pot/choosing-a-deployment-architecture.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Choosing a Deployment Architecture" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The architecture used in a deployment will vary depending on the size and purpose of the deployment. This section contains examples of deployment architecture, including a small-scale deployment useful for test and trial deployments and a fully-redundant large-scale setup for production deployments." +msgstr "" + diff --git a/docs/pot/cisco3750-hardware.pot b/docs/pot/cisco3750-hardware.pot new file mode 100644 index 000000000..f819da499 --- /dev/null +++ b/docs/pot/cisco3750-hardware.pot @@ -0,0 +1,76 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Cisco 3750" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following steps show how a Cisco 3750 is configured for zone-level layer-3 switching. These steps assume VLAN 201 is used to route untagged private IPs for pod 1, and pod 1’s layer-2 switch is connected to GigabitEthernet1/0/1." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Setting VTP mode to transparent allows us to utilize VLAN IDs above 1000. Since we only use VLANs up to 999, vtp transparent mode is not strictly required." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vtp mode transparent\n" +"vlan 200-999\n" +"exit" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure GigabitEthernet1/0/1." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "interface GigabitEthernet1/0/1\n" +"switchport trunk encapsulation dot1q\n" +"switchport mode trunk\n" +"switchport trunk native vlan 201\n" +"exit" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The statements configure GigabitEthernet1/0/1 as follows:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN 201 is the native untagged VLAN for port GigabitEthernet1/0/1." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Cisco passes all VLANs by default. As a result, all VLANs (300-999) are passed to all the pod-level layer-2 switches." +msgstr "" + diff --git a/docs/pot/cisco3750-layer2.pot b/docs/pot/cisco3750-layer2.pot new file mode 100644 index 000000000..ad13cc66e --- /dev/null +++ b/docs/pot/cisco3750-layer2.pot @@ -0,0 +1,66 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Cisco 3750" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following steps show how a Cisco 3750 is configured for pod-level layer-2 switching." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Setting VTP mode to transparent allows us to utilize VLAN IDs above 1000. Since we only use VLANs up to 999, vtp transparent mode is not strictly required." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vtp mode transparent\n" +"vlan 300-999\n" +"exit" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure all ports to dot1q and set 201 as the native VLAN." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "interface range GigabitEthernet 1/0/1-24\n" +"switchport trunk encapsulation dot1q\n" +"switchport mode trunk\n" +"switchport trunk native vlan 201\n" +"exit" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "By default, Cisco passes all VLANs. Cisco switches complain of the native VLAN IDs are different when 2 ports are connected together. That’s why you must specify VLAN 201 as the native VLAN on the layer-2 switch." +msgstr "" + diff --git a/docs/pot/citrix-xenserver-installation.pot b/docs/pot/citrix-xenserver-installation.pot new file mode 100644 index 000000000..1a54c152f --- /dev/null +++ b/docs/pot/citrix-xenserver-installation.pot @@ -0,0 +1,1195 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Citrix XenServer Installation for &PRODUCT;" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you want to use the Citrix XenServer hypervisor to run guest virtual machines, install XenServer 6.0 or XenServer 6.0.2 on the host(s) in your cloud. For an initial installation, follow the steps below. If you have previously installed XenServer and want to upgrade to another version, see ." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "System Requirements for XenServer Hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The host must be certified as compatible with one of the following. See the Citrix Hardware Compatibility Guide: http://hcl.xensource.com" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer 5.6 SP2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer 6.0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer 6.0.2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You must re-install Citrix XenServer if you are going to re-use a host from a previous install." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Must support HVM (Intel-VT or AMD-V enabled)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Be sure all the hotfixes provided by the hypervisor vendor are applied. Track the release of hypervisor patches through your hypervisor vendor’s support channel, and apply patches as soon as possible after they are released. &PRODUCT; will not track or notify you of required hypervisor patches. It is essential that your hosts are completely up to date with the provided hypervisor patches. The hypervisor vendor is likely to refuse to support any system that is not up to date with patches." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All hosts within a cluster must be homogenous. The CPUs must be of the same type, count, and feature flags." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Must support HVM (Intel-VT or AMD-V enabled in BIOS)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "64-bit x86 CPU (more cores results in better performance)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hardware virtualization support required" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4 GB of memory" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "36 GB of local disk" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "At least 1 NIC" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Statically allocated IP Address" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you deploy &PRODUCT;, the hypervisor host must not have any VMs already running" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The lack of up-do-date hotfixes can lead to data corruption and lost VMs." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "XenServer Installation Steps" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "From https://www.citrix.com/English/ss/downloads/, download the appropriate version of XenServer for your &PRODUCT; version (see ). Install it using the Citrix XenServer Installation Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After installation, perform the following configuration steps, which are described in the next few sections:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Required" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Optional" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set up SR if not using NFS, iSCSI, or local disk; see " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Configure XenServer dom0 Memory" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure the XenServer dom0 settings to allocate more memory to dom0. This can enable XenServer to handle larger numbers of virtual machines. We recommend 2940 MB of RAM for XenServer dom0. For instructions on how to do this, see http://support.citrix.com/article/CTX126531. The article refers to XenServer 5.6, but the same information applies to XenServer 6.0." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Username and Password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All XenServers in a cluster must have the same username and password as configured in &PRODUCT;." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Time Synchronization" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The host must be set to use NTP. All hosts in a pod must have the same time." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install NTP." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# yum install ntp" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Edit the NTP configuration file to point to your NTP server." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# vi /etc/ntp.conf" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add one or more server lines in this file with the names of the NTP servers you want to use. For example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "server 0.xenserver.pool.ntp.org\n" +"server 1.xenserver.pool.ntp.org\n" +"server 2.xenserver.pool.ntp.org\n" +"server 3.xenserver.pool.ntp.org\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the NTP client." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service ntpd restart" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure NTP will start again upon reboot." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# chkconfig ntpd on" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Licensing" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Citrix XenServer Free version provides 30 days usage without a license. Following the 30 day trial, XenServer requires a free activation and license. You can choose to install a license now or skip this step. If you skip this step, you will need to install a license when you activate and license the XenServer." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Getting and Deploying a License" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you choose to install a license now you will need to use the XenCenter to activate and get a license." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In XenCenter, click Tools > License manager." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select your XenServer and select Activate Free XenServer." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Request a license." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can install the license with XenCenter or using the xe command line tool." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Install &PRODUCT; XenServer Support Package (CSP)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To enable security groups, elastic load balancing, and elastic IP on XenServer, download and install the &PRODUCT; XenServer Support Package (CSP). After installing XenServer, perform the following additional steps on each XenServer host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Download the CSP software onto the XenServer host from one of the following links:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For XenServer 6.0.2:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "http://download.cloud.com/releases/3.0.1/XS-6.0.2/xenserver-cloud-supp.tgz" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For XenServer 5.6 SP2:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "http://download.cloud.com/releases/2.2.0/xenserver-cloud-supp.tgz" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For XenServer 6.0:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "http://download.cloud.com/releases/3.0/xenserver-cloud-supp.tgz" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Extract the file:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# tar xf xenserver-cloud-supp.tgz" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following script:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# xe-install-supplemental-pack xenserver-cloud-supp.iso" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the XenServer host is part of a zone that uses basic networking, disable Open vSwitch (OVS):" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# xe-switch-network-backend bridge" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the host machine when prompted." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The XenServer host is now ready to be added to &PRODUCT;." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Primary Storage Setup for XenServer" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; natively supports NFS, iSCSI and local storage. If you are using one of these storage types, there is no need to create the XenServer Storage Repository (\"SR\")." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If, however, you would like to use storage connected via some other technology, such as FiberChannel, you must set up the SR yourself. To do so, perform the following steps. If you have your hosts in a XenServer pool, perform the steps on the master node. If you are working with a single XenServer which is not part of a cluster, perform the steps on that XenServer." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Connect FiberChannel cable to all hosts in the cluster and to the FiberChannel storage host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Rescan the SCSI bus. Either use the following command or use XenCenter to perform an HBA rescan." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# scsi-rescan" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Repeat step 2 on every host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Check to be sure you see the new SCSI disk." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# ls /dev/disk/by-id/scsi-360a98000503365344e6f6177615a516b -l" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The output should look like this, although the specific file name will be different (scsi-<scsiID>):" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "lrwxrwxrwx 1 root root 9 Mar 16 13:47\n" +"/dev/disk/by-id/scsi-360a98000503365344e6f6177615a516b -> ../../sdc\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Repeat step 4 on every host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On the storage server, run this command to get a unique ID for the new SR." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# uuidgen" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The output should look like this, although the specific ID will be different:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "e6849e96-86c3-4f2c-8fcc-350cc711be3d" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create the FiberChannel SR. In name-label, use the unique ID you just generated." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"# xe sr-create type=lvmohba shared=true\n" +"device-config:SCSIid=360a98000503365344e6f6177615a516b\n" +"name-label=\"e6849e96-86c3-4f2c-8fcc-350cc711be3d\"\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This command returns a unique ID for the SR, like the following example (your ID will be different):" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "7a143820-e893-6c6a-236e-472da6ee66bf" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To create a human-readable description for the SR, use the following command. In uuid, use the SR ID returned by the previous command. In name-description, set whatever friendly text you prefer." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# xe sr-param-set uuid=7a143820-e893-6c6a-236e-472da6ee66bf name-description=\"Fiber Channel storage repository\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make note of the values you will need when you add this storage to &PRODUCT; later (see ). In the Add Primary Storage dialog, in Protocol, you will choose PreSetup. In SR Name-Label, you will enter the name-label you set earlier (in this example, e6849e96-86c3-4f2c-8fcc-350cc711be3d)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) If you want to enable multipath I/O on a FiberChannel SAN, refer to the documentation provided by the SAN vendor." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "iSCSI Multipath Setup for XenServer (Optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When setting up the storage repository on a Citrix XenServer, you can enable multipath I/O, which uses redundant physical components to provide greater reliability in the connection between the server and the SAN. To enable multipathing, use a SAN solution that is supported for Citrix servers and follow the procedures in Citrix documentation. The following links provide a starting point:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "http://support.citrix.com/article/CTX118791" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "http://support.citrix.com/article/CTX125403" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can also ask your SAN vendor for advice about setting up your Citrix repository for multipathing." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make note of the values you will need when you add this storage to the &PRODUCT; later (see ). In the Add Primary Storage dialog, in Protocol, you will choose PreSetup. In SR Name-Label, you will enter the same name used to create the SR." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you encounter difficulty, address the support team for the SAN provided by your vendor. If they are not able to solve your issue, see Contacting Support." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Physical Networking Setup for XenServer" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Once XenServer has been installed, you may need to do some additional network configuration. At this point in the installation, you should have a plan for what NICs the host will have and what traffic each NIC will carry. The NICs should be cabled as necessary to implement your plan." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you plan on using NIC bonding, the NICs on all hosts in the cluster must be cabled exactly the same. For example, if eth0 is in the private bond on one host in a cluster, then eth0 must be in the private bond on all hosts in the cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The IP address assigned for the management network interface must be static. It can be set on the host itself or obtained via static DHCP." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; configures network traffic of various types to use different NICs or bonds on the XenServer host. You can control this process and provide input to the Management Server through the use of XenServer network name labels. The name labels are placed on physical interfaces or bonds and configured in &PRODUCT;. In some simple cases the name labels are not required." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Configuring Public Network with a Dedicated NIC for XenServer (Optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; supports the use of a second NIC (or bonded pair of NICs, described in ) for the public network. If bonding is not used, the public network can be on any NIC and can be on different NICs on the hosts in a cluster. For example, the public network can be on eth0 on node A and eth1 on node B. However, the XenServer name-label for the public network must be identical across all hosts. The following examples set the network label to \"cloud-public\". After the management server is installed and running you must configure it with the name of the chosen network label (e.g. \"cloud-public\"); this is discussed in ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are using two NICs bonded together to create a public network, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are using a single dedicated NIC to provide public network access, follow this procedure on each new host that is added to &PRODUCT; before adding the host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run xe network-list and find the public network. This is usually attached to the NIC that is public. Once you find the network make note of its UUID. Call this <UUID-Public>." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following command." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# xe network-param-set name-label=cloud-public uuid=<UUID-Public>" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Configuring Multiple Guest Networks for XenServer (Optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; supports the use of multiple guest networks with the XenServer hypervisor. Each network is assigned a name-label in XenServer. For example, you might have two networks with the labels \"cloud-guest\" and \"cloud-guest2\". After the management server is installed and running, you must add the networks and use these labels so that &PRODUCT; is aware of the networks." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Follow this procedure on each new host before adding the host to &PRODUCT;:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run xe network-list and find one of the guest networks. Once you find the network make note of its UUID. Call this <UUID-Guest>." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following command, substituting your own name-label and uuid values." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# xe network-param-set name-label=<cloud-guestN> uuid=<UUID-Guest>" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Repeat these steps for each additional guest network, using a different name-label and uuid each time." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Separate Storage Network for XenServer (Optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can optionally set up a separate storage network. This should be done first on the host, before implementing the bonding steps below. This can be done using one or two available NICs. With two NICs bonding may be done as above. It is the administrator's responsibility to set up a separate storage network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Give the storage network a different name-label than what will be given for other networks." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For the separate storage network to work correctly, it must be the only interface that can ping the primary storage device's IP address. For example, if eth0 is the management network NIC, ping -I eth0 <primary storage device IP> must fail. In all deployments, secondary storage devices must be pingable from the management network NIC or bond. If a secondary storage device has been placed on the storage network, it must also be pingable via the storage network NIC or bond on the hosts as well." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can set up two separate storage networks as well. For example, if you intend to implement iSCSI multipath, dedicate two non-bonded NICs to multipath. Each of the two networks needs a unique name-label." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If no bonding is done, the administrator must set up and name-label the separate storage network on all hosts (masters and slaves)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Here is an example to set up eth5 to access a storage network on 172.16.0.0/24." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"# xe pif-list host-name-label='hostname' device=eth5\n" +"uuid(RO): ab0d3dd4-5744-8fae-9693-a022c7a3471d\n" +"device ( RO): eth5\n" +"#xe pif-reconfigure-ip DNS=172.16.3.3 gateway=172.16.0.1 IP=172.16.0.55 mode=static netmask=255.255.255.0 uuid=ab0d3dd4-5744-8fae-9693-a022c7a3471d" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "NIC Bonding for XenServer (Optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer supports Source Level Balancing (SLB) NIC bonding. Two NICs can be bonded together to carry public, private, and guest traffic, or some combination of these. Separate storage networks are also possible. Here are some example supported configurations:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "2 NICs on private, 2 NICs on public, 2 NICs on storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "2 NICs on private, 1 NIC on public, storage uses management network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "2 NICs on private, 2 NICs on public, storage uses management network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "1 NIC for private, public, and storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All NIC bonding is optional." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer expects all nodes in a cluster will have the same network cabling and same bonds implemented. In an installation the master will be the first host that was added to the cluster and the slave hosts will be all subsequent hosts added to the cluster. The bonds present on the master set the expectation for hosts added to the cluster later. The procedure to set up bonds on the master and slaves are different, and are described below. There are several important implications of this:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You must set bonds on the first host added to a cluster. Then you must use xe commands as below to establish the same bonds in the second and subsequent hosts added to a cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Slave hosts in a cluster must be cabled exactly the same as the master. For example, if eth0 is in the private bond on the master, it must be in the management network for added slave hosts." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Management Network Bonding" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The administrator must bond the management network NICs prior to adding the host to &PRODUCT;." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Creating a Private Bond on the First Host in the Cluster" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use the following steps to create a bond in XenServer. These steps should be run on only the first host in a cluster. This example creates the cloud-private network with two physical NICs (eth0 and eth1) bonded into it." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Find the physical NICs that you want to bond together." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# xe pif-list host-name-label='hostname' device=eth0\n" +"# xe pif-list host-name-label='hostname' device=eth1" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "These command shows the eth0 and eth1 NICs and their UUIDs. Substitute the ethX devices of your choice. Call the UUID's returned by the above command slave1-UUID and slave2-UUID." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a new network for the bond. For example, a new network with name \"cloud-private\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This label is important. &PRODUCT; looks for a network by a name you configure. You must use the same name-label for all hosts in the cloud for the management network." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# xe network-create name-label=cloud-private\n" +"# xe bond-create network-uuid=[uuid of cloud-private created above]\n" +"pif-uuids=[slave1-uuid],[slave2-uuid]" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now you have a bonded pair that can be recognized by &PRODUCT; as the management network." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Public Network Bonding" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Bonding can be implemented on a separate, public network. The administrator is responsible for creating a bond for the public network if that network will be bonded and will be separate from the management network." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Creating a Public Bond on the First Host in the Cluster" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "These steps should be run on only the first host in a cluster. This example creates the cloud-public network with two physical NICs (eth2 and eth3) bonded into it." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "#xe pif-list host-name-label='hostname' device=eth2\n" +"# xe pif-list host-name-label='hostname' device=eth3" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "These command shows the eth2 and eth3 NICs and their UUIDs. Substitute the ethX devices of your choice. Call the UUID's returned by the above command slave1-UUID and slave2-UUID." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a new network for the bond. For example, a new network with name \"cloud-public\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This label is important. &PRODUCT; looks for a network by a name you configure. You must use the same name-label for all hosts in the cloud for the public network." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# xe network-create name-label=cloud-public\n" +"# xe bond-create network-uuid=[uuid of cloud-public created above]\n" +"pif-uuids=[slave1-uuid],[slave2-uuid]" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now you have a bonded pair that can be recognized by &PRODUCT; as the public network." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Adding More Hosts to the Cluster" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "With the bonds (if any) established on the master, you should add additional, slave hosts. Run the following command for all additional hosts to be added to the cluster. This will cause the host to join the master in a single XenServer pool." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# xe pool-join master-address=[master IP] master-username=root\n" +"master-password=[your password]" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Complete the Bonding Setup Across the Cluster" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "With all hosts added to the pool, run the cloud-setup-bond script. This script will complete the configuration and set up of the bonds across all hosts in the cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Copy the script from the Management Server in /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/cloud-setup-bonding.sh to the master host and ensure it is executable." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the script:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# ./cloud-setup-bonding.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now the bonds are set up and configured properly across the cluster." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Upgrading XenServer Versions" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This section tells how to upgrade XenServer software on &PRODUCT; hosts. The actual upgrade is described in XenServer documentation, but there are some additional steps you must perform before and after the upgrade." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Be sure the hardware is certified compatible with the new version of XenServer." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To upgrade XenServer:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Upgrade the database. On the Management Server node:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Back up the database:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# mysqldump --user=root --databases cloud > cloud.backup.sql\n" +"# mysqldump --user=root --databases cloud_usage > cloud_usage.backup.sql" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You might need to change the OS type settings for VMs running on the upgraded hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you upgraded from XenServer 5.6 GA to XenServer 5.6 SP2, change any VMs that have the OS type CentOS 5.5 (32-bit), Oracle Enterprise Linux 5.5 (32-bit), or Red Hat Enterprise Linux 5.5 (32-bit) to Other Linux (32-bit). Change any VMs that have the 64-bit versions of these same OS types to Other Linux (64-bit)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you upgraded from XenServer 5.6 SP2 to XenServer 6.0.2, change any VMs that have the OS type CentOS 5.6 (32-bit), CentOS 5.7 (32-bit), Oracle Enterprise Linux 5.6 (32-bit), Oracle Enterprise Linux 5.7 (32-bit), Red Hat Enterprise Linux 5.6 (32-bit) , or Red Hat Enterprise Linux 5.7 (32-bit) to Other Linux (32-bit). Change any VMs that have the 64-bit versions of these same OS types to Other Linux (64-bit)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you upgraded from XenServer 5.6 to XenServer 6.0.2, do all of the above." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the Management Server and Usage Server. You only need to do this once for all clusters." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service cloud-management start\n" +"# service cloud-usage start" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Disconnect the XenServer cluster from &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as root." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Navigate to the XenServer cluster, and click Actions – Unmanage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Watch the cluster status until it shows Unmanaged." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to one of the hosts in the cluster, and run this command to clean up the VLAN:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# . /opt/xensource/bin/cloud-clean-vlan.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Still logged in to the host, run the upgrade preparation script:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# /opt/xensource/bin/cloud-prepare-upgrade.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Troubleshooting: If you see the error \"can't eject CD,\" log in to the VM and umount the CD, then run the script again." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Upgrade the XenServer software on all hosts in the cluster. Upgrade the master first." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Live migrate all VMs on this host to other hosts. See the instructions for live migration in the Administrator's Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Troubleshooting: You might see the following error when you migrate a VM:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "[root@xenserver-qa-2-49-4 ~]# xe vm-migrate live=true host=xenserver-qa-2-49-5 vm=i-2-8-VM\n" +"You attempted an operation on a VM which requires PV drivers to be installed but the drivers were not detected.\n" +"vm: b6cf79c8-02ee-050b-922f-49583d9f1a14 (i-2-8-VM)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To solve this issue, run the following:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# /opt/xensource/bin/make_migratable.sh b6cf79c8-02ee-050b-922f-49583d9f1a14" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Reboot the host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Upgrade to the newer version of XenServer. Use the steps in XenServer documentation." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After the upgrade is complete, copy the following files from the management server to this host, in the directory locations shown below:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Copy this Management Server file..." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "...to this location on the XenServer host" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/xenserver60/NFSSR.py" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/opt/xensource/sm/NFSSR.py" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/setupxenserver.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/opt/xensource/bin/setupxenserver.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/make_migratable.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/opt/xensource/bin/make_migratable.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/cloud-clean-vlan.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "/opt/xensource/bin/cloud-clean-vlan.sh" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# /opt/xensource/bin/setupxenserver.sh" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Troubleshooting: If you see the following error message, you can safely ignore it." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "mv: cannot stat `/etc/cron.daily/logrotate': No such file or directory" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Plug in the storage repositories (physical block devices) to the XenServer host:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# for pbd in `xe pbd-list currently-attached=false| grep ^uuid | awk '{print $NF}'`; do xe pbd-plug uuid=$pbd ; done" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Note: If you add a host to this XenServer pool, you need to migrate all VMs on this host to other hosts, and eject this host from XenServer pool." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Repeat these steps to upgrade every host in the cluster to the same version of XenServer." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following command on one host in the XenServer cluster to clean up the host tags:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# for host in $(xe host-list | grep ^uuid | awk '{print $NF}') ; do xe host-param-clear uuid=$host param-name=tags; done;" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When copying and pasting a command, be sure the command has pasted as a single line before executing. Some document viewers may introduce unwanted line breaks in copied text." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Reconnect the XenServer cluster to &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Navigate to the XenServer cluster, and click Actions – Manage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Watch the status to see that all the hosts come up." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After all hosts are up, run the following on one host in the cluster:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# /opt/xensource/bin/cloud-clean-vlan.sh" +msgstr "" + diff --git a/docs/pot/cloud-infrastructure-concepts.pot b/docs/pot/cloud-infrastructure-concepts.pot new file mode 100644 index 000000000..8fdb0f850 --- /dev/null +++ b/docs/pot/cloud-infrastructure-concepts.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Cloud Infrastructure Concepts" +msgstr "" + diff --git a/docs/pot/cloud-infrastructure-overview.pot b/docs/pot/cloud-infrastructure-overview.pot new file mode 100644 index 000000000..61f338649 --- /dev/null +++ b/docs/pot/cloud-infrastructure-overview.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Cloud Infrastructure Overview" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Server manages one or more zones (typically, datacenters) containing host computers where guest virtual machines will run. The cloud infrastructure is organized as follows:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Zone: Typically, a zone is equivalent to a single datacenter. A zone consists of one or more pods and secondary storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Pod: A pod is usually one rack of hardware that includes a layer-2 switch and one or more clusters." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Cluster: A cluster consists of one or more hosts and primary storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Host: A single compute node within a cluster. The hosts are where the actual cloud services run in the form of guest virtual machines." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Primary storage is associated with a cluster, and it stores the disk volumes for all the VMs running on hosts in that cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Secondary storage is associated with a zone, and it stores templates, ISO images, and disk volume snapshots." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "More Information" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more information, see documentation on cloud infrastructure concepts." +msgstr "" + diff --git a/docs/pot/cloudstack-api.pot b/docs/pot/cloudstack-api.pot new file mode 100644 index 000000000..762ea4a4e --- /dev/null +++ b/docs/pot/cloudstack-api.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "&PRODUCT; API" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The API has a REST-like query basis and returns results in XML or JSON." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "See the Developer’s Guide and the API Reference." +msgstr "" + diff --git a/docs/pot/cloudstack.pot b/docs/pot/cloudstack.pot new file mode 100644 index 000000000..2ebfd4eaa --- /dev/null +++ b/docs/pot/cloudstack.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "&PRODUCT; Complete Documentation" +msgstr "" + +#. Tag: productname +#, no-c-format +msgid "Apache CloudStack" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Complete documentation for &PRODUCT;." +msgstr "" + diff --git a/docs/pot/cluster-add.pot b/docs/pot/cluster-add.pot new file mode 100644 index 000000000..f76014175 --- /dev/null +++ b/docs/pot/cluster-add.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding a Cluster" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You need to tell &PRODUCT; about the hosts that it will manage. Hosts exist inside clusters, so before you begin adding hosts to the cloud, you must add at least one cluster." +msgstr "" + diff --git a/docs/pot/compatibility-matrix.pot b/docs/pot/compatibility-matrix.pot new file mode 100644 index 000000000..0b03bdddd --- /dev/null +++ b/docs/pot/compatibility-matrix.pot @@ -0,0 +1,115 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Compatibility Matrix" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CloudStack 2.1.x" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CloudStack 2.2.x" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CloudStack 3.0.0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CloudStack 3.0.1" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CloudStack 3.0.2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CloudStack 3.0.3" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer 5.6" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Yes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "No" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer 5.6 FP1" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer 5.6 SP2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer 6.0.0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer 6.0.2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer 6.1" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "KVM (RHEL 6.0 or 6.1)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VMware (vSphere and vCenter, both version 4.1)" +msgstr "" + diff --git a/docs/pot/compute-disk-service-offerings.pot b/docs/pot/compute-disk-service-offerings.pot new file mode 100644 index 000000000..93a78d389 --- /dev/null +++ b/docs/pot/compute-disk-service-offerings.pot @@ -0,0 +1,95 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Compute and Disk Service Offerings" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CPU, memory, and network resource guarantees" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "How resources are metered" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "How the resource usage is charged" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "How often the charges are generated" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest CPU" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest RAM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest Networking type (virtual or direct)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tags on the root disk" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The disk offering specifies:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Disk size (optional). An offering without a disk size will allow users to pick their own" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tags on the data disk" +msgstr "" + diff --git a/docs/pot/concepts.pot b/docs/pot/concepts.pot new file mode 100644 index 000000000..ed6f2ab0c --- /dev/null +++ b/docs/pot/concepts.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Concepts" +msgstr "" + diff --git a/docs/pot/configure-acl.pot b/docs/pot/configure-acl.pot new file mode 100644 index 000000000..64e5c96ac --- /dev/null +++ b/docs/pot/configure-acl.pot @@ -0,0 +1,165 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configuring Access Control List" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Define Network Access Control List (ACL) on the VPC virtual router to control incoming (ingress) and outgoing (egress) traffic between the VPC tiers, and the tiers and Internet. By default, all incoming and outgoing traffic to the guest networks is blocked. To open the ports, you must create a new network ACL. The network ACLs can be created for the tiers only if the NetworkACL service is supported." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VPCs that you have created for the account is listed in the page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Settings icon." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following options are displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Addresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateways" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Site-to-Site VPN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network ACLs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select Network ACLs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Network ACLs page is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add Network ACLs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To add an ACL rule, fill in the following fields to specify what kind of network traffic is allowed in this tier." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CIDR: The CIDR acts as the Source CIDR for the Ingress rules, and Destination CIDR for the Egress rules. To accept traffic only from or to the IP addresses within a particular address block, enter a CIDR or a comma-separated list of CIDRs. The CIDR is the base IP address of the incoming traffic. For example, 192.168.0.0/22. To allow all CIDRs, set to 0.0.0.0/0." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Protocol: The networking protocol that sources use to send traffic to the tier. The TCP and UDP protocols are typically used for data exchange and end-user communications. The ICMP protocol is typically used to send error messages or network monitoring data." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start Port, End Port (TCP, UDP only): A range of listening ports that are the destination for the incoming traffic. If you are opening a single port, use the same number in both fields." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select Tier: Select the tier for which you want to add this ACL rule." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ICMP Type, ICMP Code (ICMP only): The type of message and error code that will be sent." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Traffic Type: Select the traffic type you want to apply." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Egress: To add an egress rule, select Egress from the Traffic type drop-down box and click Add. This specifies what type of traffic is allowed to be sent out of VM instances in this tier. If no egress rules are specified, all traffic from the tier is allowed out at the VPC virtual router. Once egress rules are specified, only the traffic specified in egress rules and the responses to any traffic that has been allowed in through an ingress rule are allowed out. No egress rule is required for the VMs in a tier to communicate with each other." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ingress: To add an ingress rule, select Ingress from the Traffic type drop-down box and click Add. This specifies what network traffic is allowed into the VM instances in this tier. If no ingress rules are specified, then no traffic will be allowed in, except for responses to any traffic that has been allowed out through an egress rule." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "By default, all incoming and outgoing traffic to the guest networks is blocked. To open the ports, create a new network ACL." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add. The ACL rule is added." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To view the list of ACL rules you have added, click the desired tier from the Network ACLs page, then select the Network ACL tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can edit the tags assigned to the ACL rules and delete the ACL rules you have created. Click the appropriate button in the Actions column." +msgstr "" + diff --git a/docs/pot/configure-guest-traffic-in-advanced-zone.pot b/docs/pot/configure-guest-traffic-in-advanced-zone.pot new file mode 100644 index 000000000..eedfdcb1a --- /dev/null +++ b/docs/pot/configure-guest-traffic-in-advanced-zone.pot @@ -0,0 +1,95 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configure Guest Traffic in an Advanced Zone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "These steps assume you have already logged in to the &PRODUCT; UI. To configure the base guest network:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Infrastructure. On Zones, click View More, then click the zone to which you want to add a network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Network tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add guest network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Add guest network window is displayed:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide the following information:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name. The name of the network. This will be user-visible" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Display Text: The description of the network. This will be user-visible" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Zone: The zone in which you are configuring the guest network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network offering: If the administrator has configured multiple network offerings, select the one you want to use for this network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest Gateway: The gateway that the guests should use" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest Netmask: The netmask in use on the subnet the guests will use" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK." +msgstr "" + diff --git a/docs/pot/configure-package-repository.pot b/docs/pot/configure-package-repository.pot new file mode 100644 index 000000000..e91535826 --- /dev/null +++ b/docs/pot/configure-package-repository.pot @@ -0,0 +1,131 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configure package repository" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; is only distributed from source from the official mirrors. However, members of the CloudStack community may build convenience binaries so that users can install Apache CloudStack without needing to build from source." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you didn't follow the steps to build your own packages from source in the sections for or you may find pre-built DEB and RPM packages for your convience linked from the downloads page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "These repositories contain both the Management Server and KVM Hypervisor packages." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "DEB package repository" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can add a DEB package repository to your apt sources with the following commands. Please note that only packages for Ubuntu 12.04 LTS (precise) are being built at this time." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use your preferred editor and open (or create) /etc/apt/sources.list.d/cloudstack.list. Add the community provided repository to the file:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "deb http://cloudstack.apt-get.eu/ubuntu precise 4.0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "We now have to add the public key to the trusted keys." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ wget -O - http://cloudstack.apt-get.eu/release.asc|apt-key add -" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now update your local apt cache." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ apt-get update" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Your DEB package repository should now be configured and ready for use." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "RPM package repository" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There is a RPM package repository for &PRODUCT; so you can easily install on RHEL based platforms." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you're using an RPM-based system, you'll want to add the Yum repository so that you can install &PRODUCT; with Yum." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Yum repository information is found under /etc/yum.repos.d. You'll see several .repo files in this directory, each one denoting a specific repository." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To add the &PRODUCT; repository, create /etc/yum.repos.d/cloudstack.repo and insert the following information." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"[cloudstack]\n" +"name=cloudstack\n" +"baseurl=http://cloudstack.apt-get.eu/rhel/4.0/\n" +"enabled=1\n" +"gpgcheck=0\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now you should be able to install CloudStack using Yum." +msgstr "" + diff --git a/docs/pot/configure-public-traffic-in-an-advanced-zone.pot b/docs/pot/configure-public-traffic-in-an-advanced-zone.pot new file mode 100644 index 000000000..e69b5f4be --- /dev/null +++ b/docs/pot/configure-public-traffic-in-an-advanced-zone.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configure Public Traffic in an Advanced Zone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a zone that uses advanced networking, you need to configure at least one range of IP addresses for Internet traffic." +msgstr "" + diff --git a/docs/pot/configure-snmp-rhel.pot b/docs/pot/configure-snmp-rhel.pot new file mode 100644 index 000000000..d614a53aa --- /dev/null +++ b/docs/pot/configure-snmp-rhel.pot @@ -0,0 +1,143 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:57\n" +"PO-Revision-Date: 2013-02-02T20:11:57\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configuring SNMP Community String on a RHEL Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The SNMP Community string is similar to a user id or password that provides access to a network device, such as router. This string is sent along with all SNMP requests. If the community string is correct, the device responds with the requested information. If the community string is incorrect, the device discards the request and does not respond." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The NetScaler device uses SNMP to communicate with the VMs. You must install SNMP and configure SNMP Community string for a secure communication between the NetScaler device and the RHEL machine." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that you installed SNMP on RedHat. If not, run the following command:" +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "yum install net-snmp-utils" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Edit the /etc/snmp/snmpd.conf file to allow the SNMP polling from the NetScaler device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Map the community name into a security name (local and mynetwork, depending on where the request is coming from):" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use a strong password instead of public when you edit the following table." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "# sec.name source community\n" +"com2sec local localhost public\n" +"com2sec mynetwork 0.0.0.0 public" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Setting to 0.0.0.0 allows all IPs to poll the NetScaler server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Map the security names into group names:" +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "# group.name sec.model sec.name\n" +"group MyRWGroup v1 local\n" +"group MyRWGroup v2c local\n" +"group MyROGroup v1 mynetwork\n" +"group MyROGroup v2c mynetwork" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a view to allow the groups to have the permission to:" +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "incl/excl subtree mask view all included .1 " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Grant access with different write permissions to the two groups to the view you created." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "# context sec.model sec.level prefix read write notif\n" +" access MyROGroup \"\" any noauth exact all none none\n" +" access MyRWGroup \"\" any noauth exact all all all " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Unblock SNMP in iptables." +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "iptables -A INPUT -p udp --dport 161 -j ACCEPT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start the SNMP service:" +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "service snmpd start" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that the SNMP service is started automatically during the system startup:" +msgstr "" + +#. Tag: screen +#, no-c-format +msgid "chkconfig snmpd on" +msgstr "" + diff --git a/docs/pot/configure-usage-server.pot b/docs/pot/configure-usage-server.pot new file mode 100644 index 000000000..deadcad6a --- /dev/null +++ b/docs/pot/configure-usage-server.pot @@ -0,0 +1,230 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configuring the Usage Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To configure the usage server:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Be sure the Usage Server has been installed. This requires extra steps beyond just installing the &PRODUCT; software. See Installing the Usage Server (Optional) in the Advanced Installation Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as administrator." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Global Settings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Search, type usage. Find the configuration parameter that controls the behavior you want to set. See the table below for a description of the available parameters." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Actions, click the Edit icon." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Type the desired value and click the Save icon." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the Management Server (as usual with any global configuration change) and also the Usage Server:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service cloud-management restart\n" +"# service cloud-usage restart \n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following table shows the global configuration settings that control the behavior of the Usage Server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Parameter Name" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "enable.usage.server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Whether the Usage Server is active." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usage.aggregation.timezone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Time zone of usage records. Set this if the usage records and daily job execution are in different time zones. For example, with the following settings, the usage job will run at PST 00:15 and generate usage records for the 24 hours from 00:00:00 GMT to 23:59:59 GMT:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "usage.stats.job.exec.time = 00:15 \n" +"usage.execution.timezone = PST\n" +"usage.aggregation.timezone = GMT\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Valid values for the time zone are specified in " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Default: GMT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usage.execution.timezone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The time zone of usage.stats.job.exec.time. Valid values for the time zone are specified in " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Default: The time zone of the management server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usage.sanity.check.interval" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The number of days between sanity checks. Set this in order to periodically search for records with erroneous data before issuing customer invoices. For example, this checks for VM usage records created after the VM was destroyed, and similar checks for templates, volumes, and so on. It also checks for usage times longer than the aggregation range. If any issue is found, the alert ALERT_TYPE_USAGE_SANITY_RESULT = 21 is sent." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usage.stats.job.aggregation.range" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The time period in minutes between Usage Server processing jobs. For example, if you set it to 1440, the Usage Server will run once per day. If you set it to 600, it will run every ten hours. In general, when a Usage Server job runs, it processes all events generated since usage was last run." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There is special handling for the case of 1440 (once per day). In this case the Usage Server does not necessarily process all records since Usage was last run. &PRODUCT; assumes that you require processing once per day for the previous, complete day’s records. For example, if the current day is October 7, then it is assumed you would like to process records for October 6, from midnight to midnight. &PRODUCT; assumes this \"midnight to midnight\" is relative to the usage.execution.timezone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Default: 1440" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usage.stats.job.exec.time" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The time when the Usage Server processing will start. It is specified in 24-hour format (HH:MM) in the time zone of the server, which should be GMT. For example, to start the Usage job at 10:30 GMT, enter \"10:30\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If usage.stats.job.aggregation.range is also set, and its value is not 1440, then its value will be added to usage.stats.job.exec.time to get the time to run the Usage Server job again. This is repeated until 24 hours have elapsed, and the next day's processing begins again at usage.stats.job.exec.time." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Default: 00:15." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For example, suppose that your server is in GMT, your user population is predominantly in the East Coast of the United States, and you would like to process usage records every night at 2 AM local (EST) time. Choose these settings:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "enable.usage.server = true" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usage.execution.timezone = America/New_York" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usage.stats.job.exec.time = 07:00. This will run the Usage job at 2:00 AM EST. Note that this will shift by an hour as the East Coast of the U.S. enters and exits Daylight Savings Time." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usage.stats.job.aggregation.range = 1440" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "With this configuration, the Usage job will run every night at 2 AM EST and will process records for the previous day’s midnight-midnight as defined by the EST (America/New_York) time zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Because the special value 1440 has been used for usage.stats.job.aggregation.range, the Usage Server will ignore the data between midnight and 2 AM. That data will be included in the next day's run" +msgstr "" + diff --git a/docs/pot/configure-virtual-router.pot b/docs/pot/configure-virtual-router.pot new file mode 100644 index 000000000..616d8e066 --- /dev/null +++ b/docs/pot/configure-virtual-router.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configuring the Virtual Router" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can set the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP range" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Supported network services" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Default domain name for the network serviced by the virtual router" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateway IP address" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "How often &PRODUCT; fetches network usage statistics from &PRODUCT; virtual routers. If you want to collect traffic metering data from the virtual router, set the global configuration parameter router.stats.interval. If you are not using the virtual router to gather network usage statistics, set it to 0." +msgstr "" + diff --git a/docs/pot/configure-vpc.pot b/docs/pot/configure-vpc.pot new file mode 100644 index 000000000..13d1bd724 --- /dev/null +++ b/docs/pot/configure-vpc.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configuring a Virtual Private Cloud" +msgstr "" + diff --git a/docs/pot/configure-vpn.pot b/docs/pot/configure-vpn.pot new file mode 100644 index 000000000..9d4e79886 --- /dev/null +++ b/docs/pot/configure-vpn.pot @@ -0,0 +1,105 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configuring VPN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To set up VPN for the cloud:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Global Settings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set the following global configuration parameters." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "remote.access.vpn.client.ip.range – The range of IP addressess to be allocated to remote access VPN clients. The first IP in the range is used by the VPN server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "remote.access.vpn.psk.length – Length of the IPSec key." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "remote.access.vpn.user.limit – Maximum number of VPN users per account." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To enable VPN for a particular network:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in as a user or administrator to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the name of the network you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click View IP Addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click one of the displayed IP address names." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Enable VPN button AttachDiskButton.png: button to attach a volume ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The IPsec key is displayed in a popup window." +msgstr "" + diff --git a/docs/pot/configure-xenserver-dom0-memory.pot b/docs/pot/configure-xenserver-dom0-memory.pot new file mode 100644 index 000000000..33e6b0616 --- /dev/null +++ b/docs/pot/configure-xenserver-dom0-memory.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configure XenServer dom0 Memory" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure the XenServer dom0 settings to allocate more memory to dom0. This can enable XenServer to handle larger numbers of virtual machines. We recommend 2940 MB of RAM for XenServer dom0. For instructions on how to do this, see Citrix Knowledgebase Article.The article refers to XenServer 5.6, but the same information applies to XenServer 6" +msgstr "" + diff --git a/docs/pot/configuring-projects.pot b/docs/pot/configuring-projects.pot new file mode 100644 index 000000000..46b2193e0 --- /dev/null +++ b/docs/pot/configuring-projects.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configuring Projects" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + diff --git a/docs/pot/console-proxy.pot b/docs/pot/console-proxy.pot new file mode 100644 index 000000000..6117a8680 --- /dev/null +++ b/docs/pot/console-proxy.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Console Proxy" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Console Proxy is a type of System Virtual Machine that has a role in presenting a console view via the web UI. It connects the user’s browser to the VNC port made available via the hypervisor for the console of the guest. Both the administrator and end user web UIs offer a console connection." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Clicking on a console icon brings up a new window. The AJAX code downloaded into that window refers to the public IP address of a console proxy VM. There is exactly one public IP address allocated per console proxy VM. The AJAX application connects to this IP. The console proxy then proxies the connection to the VNC port for the requested VM on the Host hosting the guest. ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The hypervisors will have many ports assigned to VNC usage so that multiple VNC sessions can occur simultaneously." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There is never any traffic to the guest virtual IP, and there is no need to enable VNC within the guest." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The console proxy VM will periodically report its active session count to the Management Server. The default reporting interval is five seconds. This can be changed through standard Management Server configuration with the parameter consoleproxy.loadscan.interval." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Assignment of guest VM to console proxy is determined by first determining if the guest VM has a previous session associated with a console proxy. If it does, the Management Server will assign the guest VM to the target Console Proxy VM regardless of the load on the proxy VM. Failing that, the first available running Console Proxy VM that has the capacity to handle new sessions is used." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Console proxies can be restarted by administrators but this will interrupt existing console sessions for users." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The console viewing functionality uses a dynamic DNS service under the domain name realhostip.com to assist in providing SSL security to console sessions. The console proxy is assigned a public IP address. In order to avoid browser warnings for mismatched SSL certificates, the URL for the new console window is set to the form of https://aaa-bbb-ccc-ddd.realhostip.com. Customers will see this URL during console session creation. &PRODUCT; includes the realhostip.com SSL certificate in the console proxy VM. Of course, &PRODUCT; cannot know about DNS A records for our customers' public IPs prior to shipping the software. &PRODUCT; therefore runs a dynamic DNS server that is authoritative for the realhostip.com domain. It maps the aaa-bbb-ccc-ddd part of the DNS name to the IP address aaa.bbb.ccc.ddd on lookups. This allows the browser to correctly connect to the console proxy's public IP, where it then expects and receives a SSL certificate for realhostip.com, and SSL is set up without browser warnings." +msgstr "" + diff --git a/docs/pot/convert-hyperv-vm-to-template.pot b/docs/pot/convert-hyperv-vm-to-template.pot new file mode 100644 index 000000000..c4f6f3801 --- /dev/null +++ b/docs/pot/convert-hyperv-vm-to-template.pot @@ -0,0 +1,170 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Converting a Hyper-V VM to a Template" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To convert a Hyper-V VM to a XenServer-compatible &PRODUCT; template, you will need a standalone XenServer host with an attached NFS VHD SR. Use whatever XenServer version you are using with &PRODUCT;, but use XenCenter 5.6 FP1 or SP2 (it is backwards compatible to 5.6). Additionally, it may help to have an attached NFS ISO SR." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For Linux VMs, you may need to do some preparation in Hyper-V before trying to get the VM to work in XenServer. Clone the VM and work on the clone if you still want to use the VM in Hyper-V. Uninstall Hyper-V Integration Components and check for any references to device names in /etc/fstab:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "From the linux_ic/drivers/dist directory, run make uninstall (where \"linux_ic\" is the path to the copied Hyper-V Integration Components files)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restore the original initrd from backup in /boot/ (the backup is named *.backup0)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Remove the \"hdX=noprobe\" entries from /boot/grub/menu.lst." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Check /etc/fstab for any partitions mounted by device name. Change those entries (if any) to mount by LABEL or UUID (get that information with the \"blkid\" command).." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The next step is make sure the VM is not running in Hyper-V, then get the VHD into XenServer. There are two options for doing this." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Option one:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Import the VHD using XenCenter. In XenCenter, go to Tools>Virtual Appliance Tools>Disk Image Import." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose the VHD, then click Next." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name the VM, choose the NFS VHD SR under Storage, enable \"Run Operating System Fixups\" and choose the NFS ISO SR." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Next, then Finish. A VM should be created." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Option two" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run XenConvert, under From choose VHD, under To choose XenServer. Click Next." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Input the XenServer host info, then click Next." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name the VM, then click Next, then Convert. A VM should be created" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Once you have a VM created from the Hyper-V VHD, prepare it using the following steps:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Boot the VM, uninstall Hyper-V Integration Services, and reboot." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install XenServer Tools, then reboot." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Prepare the VM as desired. For example, run sysprep on Windows VMs. See " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Either option above will create a VM in HVM mode. This is fine for Windows VMs, but Linux VMs may not perform optimally. Converting a Linux VM to PV mode will require additional steps and will vary by distribution." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Shut down the VM and copy the VHD from the NFS storage to a web server; for example, mount the NFS share on the web server and copy it, or from the XenServer host use sftp or scp to upload it to the web server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In &PRODUCT;, create a new template using the following values:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "URL. Give the URL for the VHD" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "OS Type. Use the appropriate OS. For PV mode on CentOS, choose Other PV (32-bit) or Other PV (64-bit). This choice is available only for XenServer." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor. XenServer" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Format. VHD" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The template will be created, and you can create instances from it." +msgstr "" + diff --git a/docs/pot/create-bare-metal-template.pot b/docs/pot/create-bare-metal-template.pot new file mode 100644 index 000000000..09ee1bcbe --- /dev/null +++ b/docs/pot/create-bare-metal-template.pot @@ -0,0 +1,110 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating a Bare Metal Template" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Beta feature. Untested in &PRODUCT; 3.0.3. Provided without guarantee of performance." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Before you can create a bare metal template, you must have performed several other installation and setup steps to create a bare metal cluster and environment. See Bare Metal Installation in the Installation Guide. It is assumed you already have a directory named \"win7_64bit\" on your CIFS server, containing the image for the bare metal instance. This directory and image are set up as part of the Bare Metal Installation procedure." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Templates." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Create Template." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the dialog box, enter the following values." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name. Short name for the template." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Display Text. Description of the template." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "URL. The directory name which contains image file on your CIFS server. For example, win7_64bit." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Zone. All Zones." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "OS Type. Select the OS type of the ISO image. Choose other if the OS Type of the ISO is not listed or if the ISO is not bootable." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor. BareMetal." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Format. BareMetal." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Password Enabled. No." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public. No." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Featured. Choose Yes if you would like this template to be more prominent for users to select. Only administrators may make templates featured." +msgstr "" + diff --git a/docs/pot/create-new-projects.pot b/docs/pot/create-new-projects.pot new file mode 100644 index 000000000..de1b6300a --- /dev/null +++ b/docs/pot/create-new-projects.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating a New Project" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; administrators and domain administrators can create projects. If the global configuration parameter allow.user.create.projects is set to true, end users can also create projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in as administrator to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select view, click Projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click New Project." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Give the project a name and description for display to users, then click Create Project." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A screen appears where you can immediately add more members to the project. This is optional. Click Next when you are ready to move on." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Save." +msgstr "" + diff --git a/docs/pot/create-template-from-existing-vm.pot b/docs/pot/create-template-from-existing-vm.pot new file mode 100644 index 000000000..fbb001297 --- /dev/null +++ b/docs/pot/create-template-from-existing-vm.pot @@ -0,0 +1,105 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating a Template from an Existing Virtual Machine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Once you have at least one VM set up in the way you want, you can use it as the prototype for other VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create and start a virtual machine using any of the techniques given in ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make any desired configuration changes on the running VM, then click Stop." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Wait for the VM to stop. When the status shows Stopped, go to the next step." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Create Template and provide the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name and Display Text. These will be shown in the UI, so choose something descriptive." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "OS Type. This helps &PRODUCT; and the hypervisor perform certain operations and make assumptions that improve the performance of the guest. Select one of the following." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the operating system of the stopped VM is listed, choose it." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the OS type of the stopped VM is not listed, choose Other." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you want to boot from this template in PV mode, choose Other PV (32-bit) or Other PV (64-bit). This choice is available only for XenServere:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Note: Generally you should not choose an older version of the OS than the version in the image. For example, choosing CentOS 5.4 to support a CentOS 6.2 image will in general not work. In those cases you should choose Other." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public. Choose Yes to make this template accessible to all users of this &PRODUCT; installation. The template will appear in the Community Templates list. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Password Enabled. Choose Yes if your template has the &PRODUCT; password change script installed. See Adding Password Management to Your Templates." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The new template will be visible in the Templates section when the template creation process has been completed. The template is then available when creating a new VM" +msgstr "" + diff --git a/docs/pot/create-template-from-snapshot.pot b/docs/pot/create-template-from-snapshot.pot new file mode 100644 index 000000000..1e53985d5 --- /dev/null +++ b/docs/pot/create-template-from-snapshot.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating a Template from a Snapshot" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you do not want to stop the VM in order to use the Create Template menu item (as described in ), you can create a template directly from any snapshot through the &PRODUCT; UI." +msgstr "" + diff --git a/docs/pot/create-templates-overview.pot b/docs/pot/create-templates-overview.pot new file mode 100644 index 000000000..fe715ee40 --- /dev/null +++ b/docs/pot/create-templates-overview.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating Templates: Overview" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; ships with a default template for the CentOS operating system. There are a variety of ways to add more templates. Administrators and end users can add templates. The typical sequence of events is:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Launch a VM instance that has the operating system you want. Make any other desired configuration changes to the VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Stop the VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Convert the volume into a template." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There are other ways to add templates to &PRODUCT;. For example, you can take a snapshot of the VM's volume and create a template from the snapshot, or import a VHD from another system into &PRODUCT;" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The various techniques for creating templates are described in the next few sections." +msgstr "" + diff --git a/docs/pot/create-vpn-connection-vpc.pot b/docs/pot/create-vpn-connection-vpc.pot new file mode 100644 index 000000000..7f9e3a98a --- /dev/null +++ b/docs/pot/create-vpn-connection-vpc.pot @@ -0,0 +1,160 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating a VPN Connection" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VPCs that you create for the account are listed in the page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Configure button of the VPC to which you want to deploy the VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The VPC page is displayed where all the tiers you created are listed in a diagram." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Settings icon." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following options are displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Addresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateways" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Site-to-Site VPN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network ASLs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select Site-to-Site VPN." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Site-to-Site VPN page is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "From the Select View drop-down, ensure that VPN Connection is selected." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Create VPN Connection." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Create VPN Connection dialog is displayed:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select the desired customer gateway, then click OK to confirm." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Within a few moments, the VPN Connection is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following information on the VPN connection is displayed:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Address" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateway" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "State" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IPSec Preshared Key" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IKE Policy" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ESP Policy" +msgstr "" + diff --git a/docs/pot/create-vpn-customer-gateway.pot b/docs/pot/create-vpn-customer-gateway.pot new file mode 100644 index 000000000..69990a2a4 --- /dev/null +++ b/docs/pot/create-vpn-customer-gateway.pot @@ -0,0 +1,180 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating and Updating a VPN Customer Gateway" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A VPN customer gateway can be connected to only one VPN gateway at a time." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To add a VPN Customer Gateway:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPN Customer Gateway." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add site-to-site VPN." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide the following information:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name: A unique name for the VPN customer gateway you create." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateway: The IP address for the remote gateway." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CIDR list: The guest CIDR list of the remote subnets. Enter a CIDR or a comma-separated list of CIDRs. Ensure that a guest CIDR list is not overlapped with the VPC’s CIDR, or another guest CIDR. The CIDR must be RFC1918-compliant." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IPsec Preshared Key: Preshared keying is a method where the endpoints of the VPN share a secret key. This key value is used to authenticate the customer gateway and the VPC VPN gateway to each other." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The IKE peers (VPN end points) authenticate each other by computing and sending a keyed hash of data that includes the Preshared key. If the receiving peer is able to create the same hash independently by using its Preshared key, it knows that both peers must share the same secret, thus authenticating the customer gateway." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IKE Encryption: The Internet Key Exchange (IKE) policy for phase-1. The supported encryption algorithms are AES128, AES192, AES256, and 3DES. Authentication is accomplished through the Preshared Keys." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The phase-1 is the first phase in the IKE process. In this initial negotiation phase, the two VPN endpoints agree on the methods to be used to provide security for the underlying IP traffic. The phase-1 authenticates the two VPN gateways to each other, by confirming that the remote gateway has a matching Preshared Key." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IKE Hash: The IKE hash for phase-1. The supported hash algorithms are SHA1 and MD5." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IKE DH: A public-key cryptography protocol which allows two parties to establish a shared secret over an insecure communications channel. The 1536-bit Diffie-Hellman group is used within IKE to establish session keys. The supported options are None, Group-5 (1536-bit) and Group-2 (1024-bit)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ESP Encryption: Encapsulating Security Payload (ESP) algorithm within phase-2. The supported encryption algorithms are AES128, AES192, AES256, and 3DES." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The phase-2 is the second phase in the IKE process. The purpose of IKE phase-2 is to negotiate IPSec security associations (SA) to set up the IPSec tunnel. In phase-2, new keying material is extracted from the Diffie-Hellman key exchange in phase-1, to provide session keys to use in protecting the VPN data flow." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ESP Hash: Encapsulating Security Payload (ESP) hash for phase-2. Supported hash algorithms are SHA1 and MD5." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Perfect Forward Secrecy: Perfect Forward Secrecy (or PFS) is the property that ensures that a session key derived from a set of long-term public and private keys will not be compromised. This property enforces a new Diffie-Hellman key exchange. It provides the keying material that has greater key material life and thereby greater resistance to cryptographic attacks. The available options are None, Group-5 (1536-bit) and Group-2 (1024-bit). The security of the key exchanges increase as the DH groups grow larger, as does the time of the exchanges." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When PFS is turned on, for every negotiation of a new phase-2 SA the two gateways must generate a new set of phase-1 keys. This adds an extra layer of protection that PFS adds, which ensures if the phase-2 SA’s have expired, the keys used for new phase-2 SA’s have not been generated from the current phase-1 keying material." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IKE Lifetime (seconds): The phase-1 lifetime of the security association in seconds. Default is 86400 seconds (1 day). Whenever the time expires, a new phase-1 exchange is performed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ESP Lifetime (seconds): The phase-2 lifetime of the security association in seconds. Default is 3600 seconds (1 hour). Whenever the value is exceeded, a re-key is initiated to provide a new IPsec encryption and authentication session keys." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Dead Peer Detection: A method to detect an unavailable Internet Key Exchange (IKE) peer. Select this option if you want the virtual router to query the liveliness of its IKE peer at regular intervals. It’s recommended to have the same configuration of DPD on both side of VPN connection." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Updating and Removing a VPN Customer Gateway" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can update a customer gateway either with no VPN connection, or related VPN connection is in error state." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select the VPN customer gateway you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To modify the required parameters, click the Edit VPN Customer Gateway button edit.png: button to edit a VPN customer gateway " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To remove the VPN customer gateway, click the Delete VPN Customer Gateway button delete.png: button to remove a VPN customer gateway " +msgstr "" + diff --git a/docs/pot/create-vpn-gateway-for-vpc.pot b/docs/pot/create-vpn-gateway-for-vpc.pot new file mode 100644 index 000000000..de02f8d4b --- /dev/null +++ b/docs/pot/create-vpn-gateway-for-vpc.pot @@ -0,0 +1,130 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating a VPN gateway for the VPC" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VPCs that you have created for the account is listed in the page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Configure button of the VPC to which you want to deploy the VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The VPC page is displayed where all the tiers you created are listed in a diagram." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Settings icon." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following options are displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Addresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateways" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Site-to-Site VPN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network ACLs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select Site-to-Site VPN." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are creating the VPN gateway for the first time, selecting Site-to-Site VPN prompts you to create a VPN gateway." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the confirmation dialog, click Yes to confirm." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Within a few moments, the VPN gateway is created. You will be prompted to view the details of the VPN gateway you have created. Click Yes to confirm." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following details are displayed in the VPN Gateway page:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Address" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Domain" +msgstr "" + diff --git a/docs/pot/create-vr-network-offering.pot b/docs/pot/create-vr-network-offering.pot new file mode 100644 index 000000000..0c3a0e1ac --- /dev/null +++ b/docs/pot/create-vr-network-offering.pot @@ -0,0 +1,140 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating and Changing a Virtual Router Network Offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To create the network offering in association with a virtual router system service offering:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as a user or admin." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "First, create a system service offering, for example: VRsystemofferingHA." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more information on creating a system service offering, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "From the Select Offering drop-down, choose Network Offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add Network Offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the dialog, make the following choices:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name. Any desired name for the network offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description. A short description of the offering that can be displayed to users." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network Rate. Allowed data transfer rate in MB per second." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Traffic Type. The type of network traffic that will be carried on the network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest Type. Choose whether the guest network is isolated or shared. For a description of these terms, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Specify VLAN. (Isolated guest networks only) Indicate whether a VLAN should be specified when this offering is used." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Supported Services. Select one or more of the possible network services. For some services, you must also choose the service provider; for example, if you select Load Balancer, you can choose the &PRODUCT; virtual router or any other load balancers that have been configured in the cloud. Depending on which services you choose, additional fields may appear in the rest of the dialog box. For more information, see " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "System Offering. Choose the system service offering that you want virtual routers to use in this network. In this case, the default “System Offering For Software Router†and the custom “VRsystemofferingHA†are available and displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK and the network offering is created." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To change the network offering of a guest network to the virtual router service offering:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select Network from the left navigation pane." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select the guest network that you want to offer this network service to." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Edit button." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "From the Network Offering drop-down, select the virtual router network offering you have just created." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK." +msgstr "" + diff --git a/docs/pot/create-windows-template.pot b/docs/pot/create-windows-template.pot new file mode 100644 index 000000000..64b3ae89f --- /dev/null +++ b/docs/pot/create-windows-template.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating a Windows Template" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Windows templates must be prepared with Sysprep before they can be provisioned on multiple machines. Sysprep allows you to create a generic Windows template and avoid any possible SID conflicts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(XenServer) Windows VMs running on XenServer require PV drivers, which may be provided in the template or added after the VM is created. The PV drivers are necessary for essential management functions such as mounting additional volumes and ISO images, live migration, and graceful shutdown." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "An overview of the procedure is as follows:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Upload your Windows ISO." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more information, see " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a VM Instance with this ISO." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more information, see " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Follow the steps in Sysprep for Windows Server 2008 R2 (below) or Sysprep for Windows Server 2003 R2, depending on your version of Windows Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The preparation steps are complete. Now you can actually create the template as described in Creating the Windows Template." +msgstr "" + diff --git a/docs/pot/creating-compute-offerings.pot b/docs/pot/creating-compute-offerings.pot new file mode 100644 index 000000000..92051fd63 --- /dev/null +++ b/docs/pot/creating-compute-offerings.pot @@ -0,0 +1,125 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating a New Compute Offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To create a new compute offering:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in with admin privileges to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Service Offerings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select Offering, choose Compute Offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add Compute Offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the dialog, make the following choices:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name: Any desired name for the service offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description: A short description of the offering that can be displayed to users" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "# of CPU cores: The number of cores which should be allocated to a system VM with this offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network Rate: Allowed data transfer rate in MB per second." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Offer HA: If yes, the administrator can choose to have the system VM be monitored and as highly available as possible." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Storage Tags: The tags that should be associated with the primary storage used by the system VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Host Tags: (Optional) Any tags that you use to organize your hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CPU cap: Whether to limit the level of CPU usage even if spare capacity is available." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add." +msgstr "" + diff --git a/docs/pot/creating-disk-offerings.pot b/docs/pot/creating-disk-offerings.pot new file mode 100644 index 000000000..c4aa06933 --- /dev/null +++ b/docs/pot/creating-disk-offerings.pot @@ -0,0 +1,95 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating a New Disk Offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To create a system service offering:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in with admin privileges to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Service Offerings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select Offering, choose Disk Offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add Disk Offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the dialog, make the following choices:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name. Any desired name for the system offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description. A short description of the offering that can be displayed to users" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Custom Disk Size. If checked, the user can set their own disk size. If not checked, the root administrator must define a value in Disk Size." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Disk Size. Appears only if Custom Disk Size is not selected. Define the volume size in GB." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional)Storage Tags. The tags that should be associated with the primary storage for this disk. Tags are a comma separated list of attributes of the storage. For example \"ssd,blue\". Tags are also added on Primary Storage. &PRODUCT; matches tags on a disk offering to tags on the storage. If a tag is present on a disk offering that tag (or tags) must also be present on Primary Storage for the volume to be provisioned. If no such primary storage exists, allocation from the disk offering will fail.." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add." +msgstr "" + diff --git a/docs/pot/creating-network-offerings.pot b/docs/pot/creating-network-offerings.pot new file mode 100644 index 000000000..c1183db96 --- /dev/null +++ b/docs/pot/creating-network-offerings.pot @@ -0,0 +1,225 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating a New Network Offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To create a network offering:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in with admin privileges to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Service Offerings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select Offering, choose Network Offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add Network Offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the dialog, make the following choices:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name. Any desired name for the network offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description. A short description of the offering that can be displayed to users" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network Rate. Allowed data transfer rate in MB per second" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Traffic Type. The type of network traffic that will be carried on the network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest Type. Choose whether the guest network is isolated or shared. For a description of these terms, see " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Specify VLAN. (Isolated guest networks only) Indicate whether a VLAN should be specified when this offering is used" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Supported Services. Select one or more of the possible network services. For some services, you must also choose the service provider; for example, if you select Load Balancer, you can choose the &PRODUCT; virtual router or any other load balancers that have been configured in the cloud. Depending on which services you choose, additional fields may appear in the rest of the dialog box." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Based on the guest network type selected, you can see the following supported services:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Supported Services" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Isolated" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Shared" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DHCP" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Supported" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DNS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Load Balancer" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you select Load Balancer, you can choose the &PRODUCT; virtual router or any other load balancers that have been configured in the cloud." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Source NAT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you select Source NAT, you can choose the &PRODUCT; virtual router or any other Source NAT providers that have been configured in the cloud." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Static NAT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you select Static NAT, you can choose the &PRODUCT; virtual router or any other Static NAT providers that have been configured in the cloud." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Port Forwarding" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you select Port Forwarding, you can choose the &PRODUCT; virtual router or any other Port Forwarding providers that have been configured in the cloud." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Not Supported" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "User Data" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Security Groups" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "System Offering. If the service provider for any of the services selected in Supported Services is a virtual router, the System Offering field appears. Choose the system service offering that you want virtual routers to use in this network. For example, if you selected Load Balancer in Supported Services and selected a virtual router to provide load balancing, the System Offering field appears so you can choose between the &PRODUCT; default system service offering and any custom system service offerings that have been defined by the &PRODUCT; root administrator. For more information, see System Service Offerings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Redundant router capability. (v3.0.3 and greater) Available only when Virtual Router is selected as the Source NAT provider. Select this option if you want to use two virtual routers in the network for uninterrupted connection: one operating as the master virtual router and the other as the backup. The master virtual router receives requests from and sends responses to the user’s VM. The backup virtual router is activated only when the master is down. After the failover, the backup becomes the master virtual router. &PRODUCT; deploys the routers on different hosts to ensure reliability if one host is down." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Conserve mode. Indicate whether to use conserve mode. In this mode, network resources are allocated only when the first virtual machine starts in the network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tags. Network tag to specify which physical network to use" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add." +msgstr "" + diff --git a/docs/pot/creating-new-volumes.pot b/docs/pot/creating-new-volumes.pot new file mode 100644 index 000000000..bf5d94dab --- /dev/null +++ b/docs/pot/creating-new-volumes.pot @@ -0,0 +1,80 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating a New Volume" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can add more data disk volumes to a guest VM at any time, up to the limits of your storage capacity. Both &PRODUCT; administrators and users can add volumes to VM instances. When you create a new volume, it is stored as an entity in &PRODUCT;, but the actual storage resources are not allocated on the physical storage device until you attach the volume. This optimization allows the &PRODUCT; to provision the volume nearest to the guest that will use it when the first attachment is made." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as a user or admin." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select View, choose Volumes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To create a new volume, click Add Volume, provide the following details, and click OK." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name. Give the volume a unique name so you can find it later." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Availability Zone. Where do you want the storage to reside? This should be close to the VM that will use the volume." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Disk Offering. Choose the characteristics of the storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The new volume appears in the list of volumes with the state “Allocated.†The volume data is stored in &PRODUCT;, but the volume is not yet ready for use" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To start using the volume, continue to Attaching a Volume" +msgstr "" + diff --git a/docs/pot/creating-system-service-offerings.pot b/docs/pot/creating-system-service-offerings.pot new file mode 100644 index 000000000..914376f0f --- /dev/null +++ b/docs/pot/creating-system-service-offerings.pot @@ -0,0 +1,130 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating a New System Service Offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To create a system service offering:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in with admin privileges to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Service Offerings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select Offering, choose System Offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add System Service Offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the dialog, make the following choices:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name. Any desired name for the system offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description. A short description of the offering that can be displayed to users" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "System VM Type. Select the type of system virtual machine that this offering is intended to support." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "# of CPU cores. The number of cores which should be allocated to a system VM with this offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network Rate. Allowed data transfer rate in MB per second." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Offer HA. If yes, the administrator can choose to have the system VM be monitored and as highly available as possible." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Storage Tags. The tags that should be associated with the primary storage used by the system VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Host Tags. (Optional) Any tags that you use to organize your hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CPU cap. Whether to limit the level of CPU usage even if spare capacity is available." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add." +msgstr "" + diff --git a/docs/pot/creating-vms.pot b/docs/pot/creating-vms.pot new file mode 100644 index 000000000..c6b7f456d --- /dev/null +++ b/docs/pot/creating-vms.pot @@ -0,0 +1,95 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Creating VMs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Virtual machines are usually created from a template. Users can also create blank virtual machines. A blank virtual machine is a virtual machine without an OS template. Users can attach an ISO file and install the OS from the CD/DVD-ROM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To create a VM from a template:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Instances." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add Instance." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select a template, then follow the steps in the wizard. (For more information about how the templates came to be in this list, see Working with Templates." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Be sure that the hardware you have allows starting the selected service offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Submit and your VM will be created and started." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For security reason, the internal name of the VM is visible only to the root admin." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Starting with v3.0.3, you can create a VM without starting it. You can determine whether the VM needs to be started as part of the VM deployment. A new request parameter, startVM, is introduced in the deployVm API to support this feature. For more information, see the Developer's Guide" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To create a VM from an ISO:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(XenServer) Windows VMs running on XenServer require PV drivers, which may be provided in the template or added after the VM is created. The PV drivers are necessary for essential management functions such as mounting additional volumes and ISO images, live migration, and graceful shutdown." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select ISO Boot, and follow the steps in the wizard." +msgstr "" + diff --git a/docs/pot/customizing-dns.pot b/docs/pot/customizing-dns.pot new file mode 100644 index 000000000..75d56931a --- /dev/null +++ b/docs/pot/customizing-dns.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Customizing the Network Domain Name" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The root administrator can optionally assign a custom DNS suffix at the level of a network, account, domain, zone, or entire &PRODUCT; installation, and a domain administrator can do so within their own domain. To specify a custom domain name and put it into effect, follow these steps." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set the DNS suffix at the desired scope" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "At the network level, the DNS suffix can be assigned through the UI when creating a new network, as described in or with the updateNetwork command in the &PRODUCT; API." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "At the account, domain, or zone level, the DNS suffix can be assigned with the appropriate &PRODUCT; API commands: createAccount, editAccount, createDomain, editDomain, createZone, or editZone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "At the global level, use the configuration parameter guest.domain.suffix. You can also use the &PRODUCT; API command updateConfiguration. After modifying this global configuration, restart the Management Server to put the new setting into effect." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To make the new DNS suffix take effect for an existing network, call the &PRODUCT; API command updateNetwork. This step is not necessary when the DNS suffix was specified while creating a new network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The source of the network domain that is used depends on the following rules." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For all networks, if a network domain is specified as part of a network's own configuration, that value is used." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For an account-specific network, the network domain specified for the account is used. If none is specified, the system looks for a value in the domain, zone, and global configuration, in that order." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For a domain-specific network, the network domain specified for the domain is used. If none is specified, the system looks for a value in the zone and global configuration, in that order." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For a zone-specific network, the network domain specified for the zone is used. If none is specified, the system looks for a value in the global configuration." +msgstr "" + diff --git a/docs/pot/database-replication.pot b/docs/pot/database-replication.pot new file mode 100644 index 000000000..6efcacf0b --- /dev/null +++ b/docs/pot/database-replication.pot @@ -0,0 +1,254 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Database Replication (Optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; supports database replication from one MySQL node to another. This is achieved using standard MySQL replication. You may want to do this as insurance against MySQL server or storage loss. MySQL replication is implemented using a master/slave model. The master is the node that the Management Servers are configured to use. The slave is a standby node that receives all write operations from the master and applies them to a local, redundant copy of the database. The following steps are a guide to implementing MySQL replication." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Creating a replica is not a backup solution. You should develop a backup procedure for the MySQL data that is distinct from replication." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that this is a fresh install with no data in the master." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Edit my.cnf on the master and add the following in the [mysqld] section below datadir." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"log_bin=mysql-bin\n" +"server_id=1\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The server_id must be unique with respect to other servers. The recommended way to achieve this is to give the master an ID of 1 and each slave a sequential number greater than 1, so that the servers are numbered 1, 2, 3, etc." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the MySQL service:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"# service mysqld restart\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a replication account on the master and give it privileges. We will use the \"cloud-repl\" user with the password \"password\". This assumes that master and slave run on the 172.16.1.0/24 network." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"# mysql -u root\n" +"mysql> create user 'cloud-repl'@'172.16.1.%' identified by 'password';\n" +"mysql> grant replication slave on *.* TO 'cloud-repl'@'172.16.1.%';\n" +"mysql> flush privileges;\n" +"mysql> flush tables with read lock;\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Leave the current MySQL session running." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a new shell start a second MySQL session." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Retrieve the current position of the database." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"# mysql -u root\n" +"mysql> show master status;\n" +"+------------------+----------+--------------+------------------+\n" +"| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |\n" +"+------------------+----------+--------------+------------------+\n" +"| mysql-bin.000001 | 412 | | |\n" +"+------------------+----------+--------------+------------------+\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Note the file and the position that are returned by your instance." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Exit from this session." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Complete the master setup. Returning to your first session on the master, release the locks and exit MySQL." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"mysql> unlock tables;\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install and configure the slave. On the slave server, run the following commands." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"# yum install mysql-server\n" +"# chkconfig mysqld on\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Edit my.cnf and add the following lines in the [mysqld] section below datadir." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"server_id=2\n" +"innodb_rollback_on_timeout=1\n" +"innodb_lock_wait_timeout=600\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart MySQL." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Instruct the slave to connect to and replicate from the master. Replace the IP address, password, log file, and position with the values you have used in the previous steps." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"mysql> change master to\n" +" -> master_host='172.16.1.217',\n" +" -> master_user='cloud-repl',\n" +" -> master_password='password',\n" +" -> master_log_file='mysql-bin.000001',\n" +" -> master_log_pos=412;\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Then start replication on the slave." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"mysql> start slave;\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Optionally, open port 3306 on the slave as was done on the master earlier." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This is not required for replication to work. But if you choose not to do this, you will need to do it when failover to the replica occurs." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Failover" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This will provide for a replicated database that can be used to implement manual failover for the Management Servers. &PRODUCT; failover from one MySQL instance to another is performed by the administrator. In the event of a database failure you should:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Stop the Management Servers (via service cloud-management stop)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Change the replica's configuration to be a master and restart it." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that the replica's port 3306 is open to the Management Servers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make a change so that the Management Server uses the new database. The simplest process here is to put the IP address of the new database server into each Management Server's /etc/cloud/management/db.properties." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the Management Servers:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"# service cloud-management start\n" +" " +msgstr "" + diff --git a/docs/pot/dates-in-usage-record.pot b/docs/pot/dates-in-usage-record.pot new file mode 100644 index 000000000..5ad955581 --- /dev/null +++ b/docs/pot/dates-in-usage-record.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Dates in the Usage Record" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Usage records include a start date and an end date. These dates define the period of time for which the raw usage number was calculated. If daily aggregation is used, the start date is midnight on the day in question and the end date is 23:59:59 on the day in question (with one exception; see below). A virtual machine could have been deployed at noon on that day, stopped at 6pm on that day, then started up again at 11pm. When usage is calculated on that day, there will be 7 hours of running VM usage (usage type 1) and 12 hours of allocated VM usage (usage type 2). If the same virtual machine runs for the entire next day, there will 24 hours of both running VM usage (type 1) and allocated VM usage (type 2)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Note: The start date is not the time a virtual machine was started, and the end date is not the time when a virtual machine was stopped. The start and end dates give the time range within which usage was calculated." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For network usage, the start date and end date again define the range in which the number of bytes transferred was calculated. If a user downloads 10 MB and uploads 1 MB in one day, there will be two records, one showing the 10 megabytes received and one showing the 1 megabyte sent." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There is one case where the start date and end date do not correspond to midnight and 11:59:59pm when daily aggregation is used. This occurs only for network usage records. When the usage server has more than one day's worth of unprocessed data, the old data will be included in the aggregation period. The start date in the usage record will show the date and time of the earliest event. For other types of usage, such as IP addresses and VMs, the old unprocessed data is not included in daily aggregation." +msgstr "" + diff --git a/docs/pot/dedicated-ha-hosts.pot b/docs/pot/dedicated-ha-hosts.pot new file mode 100644 index 000000000..131d48a76 --- /dev/null +++ b/docs/pot/dedicated-ha-hosts.pot @@ -0,0 +1,55 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Dedicated HA Hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(v3.0.3 and greater) One or more hosts can be designated for use only by HA-enabled VMs that are restarting due to a host failure. Setting up a pool of such dedicated HA hosts as the recovery destination for all HA-enabled VMs is useful to:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make it easier to determine which VMs have been restarted as part of the &PRODUCT; high-availability function. If a VM is running on a dedicated HA host, then it must be an HA-enabled VM whose original host failed. (With one exception: It is possible for an administrator to manually migrate any VM to a dedicated HA host.)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Keep HA-enabled VMs from restarting on hosts which may be reserved for other purposes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The dedicated HA option is set through a special host tag when the host is created. To allow the administrator to dedicate hosts to only HA-enabled VMs, set the global configuration variable ha.tag to the desired tag (for example, \"ha_host\"), and restart the Management Server. Enter the value in the Host Tags field when adding the host(s) that you want to dedicate to HA-enabled VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you set ha.tag, be sure to actually use that tag on at least one host in your cloud. If the tag specified in ha.tag is not set for any host in the cloud, the HA-enabled VMs will fail to restart after a crash." +msgstr "" + diff --git a/docs/pot/default-account-resource-limit.pot b/docs/pot/default-account-resource-limit.pot new file mode 100644 index 000000000..a74111d20 --- /dev/null +++ b/docs/pot/default-account-resource-limit.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Default Account Resource Limits" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can limit resource use by accounts. The default limits are set using global configuration parameters, and they affect all accounts within a cloud. The relevant parameters are those beginning with max.account (max.account.snapshots, etc.).." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To override a default limit for a particular account, set a per-account resource limit." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation tree, click Accounts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select the account you want to modify. The current limits are displayed. A value of -1 shows that there is no limit in place" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Edit button editbutton.png: edits the settings. " +msgstr "" + diff --git a/docs/pot/default-template.pot b/docs/pot/default-template.pot new file mode 100644 index 000000000..63b08f4c8 --- /dev/null +++ b/docs/pot/default-template.pot @@ -0,0 +1,79 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "The Default Template" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; includes a CentOS template. This template is downloaded by the Secondary Storage VM after the primary and secondary storage are configured. You can use this template in your production deployment or you can delete it and use custom templates." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The root password for the default template is \"password\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A default template is provided for each of XenServer, KVM, and vSphere. The templates that are downloaded depend on the hypervisor type that is available in your cloud. Each template is approximately 2.5 GB physical size." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The default template includes the standard iptables rules, which will block most access to the template excluding ssh." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# iptables --list\n" +"Chain INPUT (policy ACCEPT)\n" +"target prot opt source destination\n" +"RH-Firewall-1-INPUT all -- anywhere anywhere\n" +"\n" +"Chain FORWARD (policy ACCEPT)\n" +"target prot opt source destination\n" +"RH-Firewall-1-INPUT all -- anywhere anywhere\n" +"\n" +"Chain OUTPUT (policy ACCEPT)\n" +"target prot opt source destination\n" +"\n" +"Chain RH-Firewall-1-INPUT (2 references)\n" +"target prot opt source destination\n" +"ACCEPT all -- anywhere anywhere\n" +"ACCEPT icmp -- anywhere anywhere icmp any\n" +"ACCEPT esp -- anywhere anywhere\n" +"ACCEPT ah -- anywhere anywhere\n" +"ACCEPT udp -- anywhere 224.0.0.251 udp dpt:mdns\n" +"ACCEPT udp -- anywhere anywhere udp dpt:ipp\n" +"ACCEPT tcp -- anywhere anywhere tcp dpt:ipp\n" +"ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED\n" +"ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh\n" +"REJECT all -- anywhere anywhere reject-with icmp-host-\n" +"" +msgstr "" + diff --git a/docs/pot/delete-reset-vpn.pot b/docs/pot/delete-reset-vpn.pot new file mode 100644 index 000000000..54b2143fe --- /dev/null +++ b/docs/pot/delete-reset-vpn.pot @@ -0,0 +1,130 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Restarting and Removing a VPN Connection" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VPCs that you have created for the account is listed in the page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Configure button of the VPC to which you want to deploy the VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The VPC page is displayed where all the tiers you created are listed in a diagram." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Settings icon." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following options are displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Addresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateways" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Site-to-Site VPN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network ASLs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select Site-to-Site VPN." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Site-to-Site VPN page is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "From the Select View drop-down, ensure that VPN Connection is selected." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VPN connections you created are displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select the VPN connection you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Details tab is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To remove a VPN connection, click the Delete VPN connection button remove-vpn.png: button to remove a VPN connection " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To restart a VPN connection, click the Reset VPN connection button present in the Details tab. reset-vpn.png: button to reset a VPN connection " +msgstr "" + diff --git a/docs/pot/delete-templates.pot b/docs/pot/delete-templates.pot new file mode 100644 index 000000000..d1cf15f1e --- /dev/null +++ b/docs/pot/delete-templates.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Deleting Templates" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Templates may be deleted. In general, when a template spans multiple Zones, only the copy that is selected for deletion will be deleted; the same template in other Zones will not be deleted. The provided CentOS template is an exception to this. If the provided CentOS template is deleted, it will be deleted from all Zones." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When templates are deleted, the VMs instantiated from them will continue to run. However, new VMs cannot be created based on the deleted template." +msgstr "" + diff --git a/docs/pot/deleting-vms.pot b/docs/pot/deleting-vms.pot new file mode 100644 index 000000000..236b460ad --- /dev/null +++ b/docs/pot/deleting-vms.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Deleting VMs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Users can delete their own virtual machines. A running virtual machine will be abruptly stopped before it is deleted. Administrators can delete any virtual machines." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To delete a virtual machine:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as a user or admin." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Instances." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose the VM that you want to delete." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Destroy Instance button Destroyinstance.png: button to destroy an instance " +msgstr "" + diff --git a/docs/pot/dell62xx-hardware.pot b/docs/pot/dell62xx-hardware.pot new file mode 100644 index 000000000..b55f4d127 --- /dev/null +++ b/docs/pot/dell62xx-hardware.pot @@ -0,0 +1,82 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Dell 62xx" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following steps show how a Dell 62xx is configured for zone-level layer-3 switching. These steps assume VLAN 201 is used to route untagged private IPs for pod 1, and pod 1’s layer-2 switch is connected to Ethernet port 1/g1." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Dell 62xx Series switch supports up to 1024 VLANs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure all the VLANs in the database." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vlan database\n" +"vlan 200-999\n" +"exit" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure Ethernet port 1/g1." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "interface ethernet 1/g1\n" +"switchport mode general\n" +"switchport general pvid 201\n" +"switchport general allowed vlan add 201 untagged\n" +"switchport general allowed vlan add 300-999 tagged\n" +"exit" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The statements configure Ethernet port 1/g1 as follows:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN 201 is the native untagged VLAN for port 1/g1." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All VLANs (300-999) are passed to all the pod-level layer-2 switches." +msgstr "" + diff --git a/docs/pot/dell62xx-layer2.pot b/docs/pot/dell62xx-layer2.pot new file mode 100644 index 000000000..a0b588c00 --- /dev/null +++ b/docs/pot/dell62xx-layer2.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Dell 62xx" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following steps show how a Dell 62xx is configured for pod-level layer-2 switching." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure all the VLANs in the database." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vlan database\n" +"vlan 300-999\n" +"exit" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN 201 is used to route untagged private IP addresses for pod 1, and pod 1 is connected to this layer-2 switch." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "interface range ethernet all\n" +"switchport mode general\n" +"switchport general allowed vlan add 300-999 tagged\n" +"exit" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The statements configure all Ethernet ports to function as follows:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All ports are configured the same way." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All VLANs (300-999) are passed through all the ports of the layer-2 switch." +msgstr "" + diff --git a/docs/pot/deployment-architecture-overview.pot b/docs/pot/deployment-architecture-overview.pot new file mode 100644 index 000000000..3ce4056de --- /dev/null +++ b/docs/pot/deployment-architecture-overview.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Deployment Architecture Overview" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A &PRODUCT; installation consists of two parts: the Management Server and the cloud infrastructure that it manages. When you set up and manage a &PRODUCT; cloud, you provision resources such as hosts, storage devices, and IP addresses into the Management Server, and the Management Server manages those resources." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The minimum production installation consists of one machine running the &PRODUCT; Management Server and another machine to act as the cloud infrastructure (in this case, a very simple infrastructure consisting of one host running hypervisor software). In its smallest deployment, a single machine can act as both the Management Server and the hypervisor host (using the KVM hypervisor)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A more full-featured installation consists of a highly-available multi-node Management Server installation and up to tens of thousands of hosts using any of several advanced networking setups. For information about deployment options, see Choosing a Deployment Architecture." +msgstr "" + diff --git a/docs/pot/detach-move-volumes.pot b/docs/pot/detach-move-volumes.pot new file mode 100644 index 000000000..405ce9bfc --- /dev/null +++ b/docs/pot/detach-move-volumes.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Attaching a Volume" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This procedure is different from moving disk volumes from one storage pool to another. See VM Storage Migration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A volume can be detached from a guest VM and attached to another guest. Both &PRODUCT; administrators and users can detach volumes from VMs and move them to other VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the two VMs are in different clusters, and the volume is large, it may take several minutes for the volume to be moved to the new VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as a user or admin." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Storage, and choose Volumes in Select View. Alternatively, if you know which VM the volume is attached to, you can click Instances, click the VM name, and click View Volumes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the name of the volume you want to detach, then click the Detach Disk button DetachDiskButton.png: button to detach a volume " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To move the volume to another VM, follow the steps in Attaching a Volume ." +msgstr "" + diff --git a/docs/pot/devcloud-usage-mode.pot b/docs/pot/devcloud-usage-mode.pot new file mode 100644 index 000000000..50a687b61 --- /dev/null +++ b/docs/pot/devcloud-usage-mode.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "DevCloud Usage Mode" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DevCloud can be used in several different ways:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Full sandbox. Where &PRODUCT; is run within the DevCloud instance started in Virtual Box." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In this mode, the &PRODUCT; management server runs within the instance and nested virtualization allows instantiation of tiny VMs within DevCloud itself. &PRODUCT; code modifications are done within DevCloud." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following diagram shows the architecture of the SandBox mode." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A deployment environment. Where &PRODUCT; code is developed in the localhost of the developer and the resulting build is deployed within DevCloud" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This mode was used in the testing procedure of &PRODUCT; 4.0.0 incubating release. See the following screencast to see how: http://vimeo.com/54621457" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A host-only mode. Where DevCloud is used only as a host. &PRODUCT; management server is run in the localhost of the developer" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This mode makes use of a host-only interface defined in the Virtual Box preferences. Check the following screencast to see how: http://vimeo.com/54610161" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following schematic shows the architecture of the Host-Only mode." +msgstr "" + diff --git a/docs/pot/devcloud.pot b/docs/pot/devcloud.pot new file mode 100644 index 000000000..7d9f6f94a --- /dev/null +++ b/docs/pot/devcloud.pot @@ -0,0 +1,55 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "DevCloud" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DevCloud is the &PRODUCT; sandbox. It is provided as a Virtual Box appliance. It is meant to be used as a development environment to easily test new &PRODUCT; development. It has also been used for training and &PRODUCT; demos since it provides a Cloud in a box." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DevCloud is provided as a convenience by community members. It is not an official &PRODUCT; release artifact." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; source code however, contains tools to build your own DevCloud." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DevCloud is under development and should be considered a Work In Progress (WIP), the wiki is the most up to date documentation:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + diff --git a/docs/pot/developer-getting-started.pot b/docs/pot/developer-getting-started.pot new file mode 100644 index 000000000..b0c3703a1 --- /dev/null +++ b/docs/pot/developer-getting-started.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Getting Started" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To get started using the &PRODUCT; API, you should have the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "URL of the &PRODUCT; server you wish to integrate with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Both the API Key and Secret Key for an account. This should have been generated by the administrator of the cloud instance and given to you." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Familiarity with HTTP GET/POST and query strings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Knowledge of either XML or JSON." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Knowledge of a programming language that can generate HTTP requests; for example, Java or PHP." +msgstr "" + diff --git a/docs/pot/developer-introduction.pot b/docs/pot/developer-introduction.pot new file mode 100644 index 000000000..5ce4fe387 --- /dev/null +++ b/docs/pot/developer-introduction.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Introduction to the &PRODUCT; API" +msgstr "" + diff --git a/docs/pot/disable-enable-zones-pods-clusters.pot b/docs/pot/disable-enable-zones-pods-clusters.pot new file mode 100644 index 000000000..064346f09 --- /dev/null +++ b/docs/pot/disable-enable-zones-pods-clusters.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Disabling and Enabling Zones, Pods, and Clusters" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can enable or disable a zone, pod, or cluster without permanently removing it from the cloud. This is useful for maintenance or when there are problems that make a portion of the cloud infrastructure unreliable. No new allocations will be made to a disabled zone, pod, or cluster until its state is returned to Enabled. When a zone, pod, or cluster is first added to the cloud, it is Disabled by default." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To disable and enable a zone, pod, or cluster:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as administrator" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Infrastructure." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Zones, click View More." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are disabling or enabling a zone, find the name of the zone in the list, and click the Enable/Disable button. enable-disable.png: button to enable or disable zone, pod, or cluster. " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are disabling or enabling a pod or cluster, click the name of the zone that contains the pod or cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Compute tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Pods or Clusters node of the diagram, click View All." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the pod or cluster name in the list." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Enable/Disable button. " +msgstr "" + diff --git a/docs/pot/disk-volume-usage-record-format.pot b/docs/pot/disk-volume-usage-record-format.pot new file mode 100644 index 000000000..67e4dff72 --- /dev/null +++ b/docs/pot/disk-volume-usage-record-format.pot @@ -0,0 +1,105 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Disk Volume Usage Record Format" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For disk volumes, the following fields exist in a usage record." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "account – name of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "accountid – ID of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "domainid – ID of the domain in which this account resides" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "zoneid – Zone where the usage occurred" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "description – A string describing what the usage record is tracking" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usage – String representation of the usage, including the units of usage (e.g. 'Hrs' for hours)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usagetype – A number representing the usage type (see Usage Types)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "rawusage – A number representing the actual usage in hours" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usageid – The volume ID" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "offeringid – The ID of the disk offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "type – Hypervisor" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "templateid – ROOT template ID" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "size – The amount of storage allocated" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "startdate, enddate – The range of time for which the usage is aggregated; see Dates in the Usage Record" +msgstr "" + diff --git a/docs/pot/dns-dhcp.pot b/docs/pot/dns-dhcp.pot new file mode 100644 index 000000000..ef86c0ed7 --- /dev/null +++ b/docs/pot/dns-dhcp.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "DNS and DHCP" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Virtual Router provides DNS and DHCP services to the guests. It proxies DNS requests to the DNS server configured on the Availability Zone." +msgstr "" + diff --git a/docs/pot/domains.pot b/docs/pot/domains.pot new file mode 100644 index 000000000..9278a4197 --- /dev/null +++ b/docs/pot/domains.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Domains" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the LDAP server requires SSL, you need to enable it in the ldapConfig command by setting the parameters ssl, truststore, and truststorepass. Before enabling SSL for ldapConfig, you need to get the certificate which the LDAP server is using and add it to a trusted keystore. You will need to know the path to the keystore and the password." +msgstr "" + diff --git a/docs/pot/enable-disable-static-nat-vpc.pot b/docs/pot/enable-disable-static-nat-vpc.pot new file mode 100644 index 000000000..a45a1354d --- /dev/null +++ b/docs/pot/enable-disable-static-nat-vpc.pot @@ -0,0 +1,135 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Enabling or Disabling Static NAT on a VPC" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A static NAT rule maps a public IP address to the private IP address of a VM in a VPC to allow Internet traffic to it. This section tells how to enable or disable static NAT for a particular IP address in a VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If port forwarding rules are already in effect for an IP address, you cannot enable static NAT to that IP." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If a guest VM is part of more than one network, static NAT rules will function only if they are defined on the default network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VPCs that you have created for the account is listed in the page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Configure button of the VPC to which you want to deploy the VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The VPC page is displayed where all the tiers you created are listed in a diagram." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Settings icon." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following options are displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Addresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateways" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Site-to-Site VPN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network ACLs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select IP Addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The IP Addresses page is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the IP you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Details tab,click the Static NAT button. enable-disable.png: button to enable Statid NAT. The button toggles between Enable and Disable, depending on whether static NAT is currently enabled for the IP address." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are enabling static NAT, a dialog appears as follows:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select the tier and the destination VM, then click Apply." +msgstr "" + diff --git a/docs/pot/enable-disable-static-nat.pot b/docs/pot/enable-disable-static-nat.pot new file mode 100644 index 000000000..1b4bab178 --- /dev/null +++ b/docs/pot/enable-disable-static-nat.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Enabling or Disabling Static NAT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If port forwarding rules are already in effect for an IP address, you cannot enable static NAT to that IP." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If a guest VM is part of more than one network, static NAT rules will function only if they are defined on the default network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the name of the network where you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click View IP Addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the IP address you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Static NAT button. ReleaseIPButton.png: button to release an IP The button toggles between Enable and Disable, depending on whether static NAT is currently enabled for the IP address." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are enabling static NAT, a dialog appears where you can choose the destination VM and click Apply" +msgstr "" + diff --git a/docs/pot/enable-security-groups.pot b/docs/pot/enable-security-groups.pot new file mode 100644 index 000000000..4af60756e --- /dev/null +++ b/docs/pot/enable-security-groups.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Enabling Security Groups" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In order for security groups to function in a zone, the security groups feature must first be enabled for the zone. The administrator can do this when creating a new zone, by selecting a network offering that includes security groups. The procedure is described in Basic Zone Configuration in the Advanced Installation Guide." +msgstr "" + diff --git a/docs/pot/enabling-api-call-expiration.pot b/docs/pot/enabling-api-call-expiration.pot new file mode 100644 index 000000000..d21abe2d1 --- /dev/null +++ b/docs/pot/enabling-api-call-expiration.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Enabling API Call Expiration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can set an expiry timestamp on API calls to prevent replay attacks over non-secure channels, such as HTTP. The server tracks the expiry timestamp you have specified and rejects all the subsequent API requests that come in after this validity period." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To enable this feature, add the following parameters to the API request:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "signatureVersion=3: If the signatureVersion parameter is missing or is not equal to 3, the expires parameter is ignored in the API request." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "expires=YYYY-MM-DDThh:mm:ssZ: Specifies the date and time at which the signature included in the request is expired. The timestamp is expressed in the YYYY-MM-DDThh:mm:ssZ format, as specified in the ISO 8601 standard." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "expires=2011-10-10T12:00:00+0530" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A sample API request with expiration is given below:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "http://<IPAddress>:8080/client/api?command=listZones&signatureVersion=3&expires=2011-10-10T12:00:00+0530&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D" +msgstr "" + diff --git a/docs/pot/enabling-port-8096.pot b/docs/pot/enabling-port-8096.pot new file mode 100644 index 000000000..21836fe01 --- /dev/null +++ b/docs/pot/enabling-port-8096.pot @@ -0,0 +1,55 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Enabling Port 8096" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Port 8096, which allows API calls without authentication, is closed and disabled by default on any fresh 3.0.1 installations. You can enable 8096 (or another port) for this purpose as follows:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that the first Management Server is installed and running." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set the global configuration parameter integration.api.port to the desired port." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the Management Server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On the Management Server host machine, create an iptables rule allowing access to that port." +msgstr "" + diff --git a/docs/pot/end-user-ui-overview.pot b/docs/pot/end-user-ui-overview.pot new file mode 100644 index 000000000..9e0e5684f --- /dev/null +++ b/docs/pot/end-user-ui-overview.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "End User's UI Overview" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; UI helps users of cloud infrastructure to view and use their cloud resources, including virtual machines, templates and ISOs, data volumes and snapshots, guest networks, and IP addresses. If the user is a member or administrator of one or more &PRODUCT; projects, the UI can provide a project-oriented view." +msgstr "" + diff --git a/docs/pot/error-handling.pot b/docs/pot/error-handling.pot new file mode 100644 index 000000000..d96cbdaa4 --- /dev/null +++ b/docs/pot/error-handling.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Error Handling" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If an error occurs while processing an API request, the appropriate response in the format specified is returned. Each error response consists of an error code and an error text describing what possibly can go wrong. For an example error response, see page 12." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "An HTTP error code of 401 is always returned if API request was rejected due to bad signatures, missing API Keys, or the user simply did not have the permissions to execute the command." +msgstr "" + diff --git a/docs/pot/event-log-queries.pot b/docs/pot/event-log-queries.pot new file mode 100644 index 000000000..b6ecf6cc7 --- /dev/null +++ b/docs/pot/event-log-queries.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Event Log Queries" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Database logs can be queried from the user interface. The list of events captured by the system includes:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Virtual machine creation, deletion, and on-going management operations" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Virtual router creation, deletion, and on-going management operations" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Template creation and deletion" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network/load balancer rules creation and deletion" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Storage volume creation and deletion" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "User login and logout" +msgstr "" + diff --git a/docs/pot/event-types.pot b/docs/pot/event-types.pot new file mode 100644 index 000000000..fc06fb738 --- /dev/null +++ b/docs/pot/event-types.pot @@ -0,0 +1,575 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Event Types" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VM.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "TEMPLATE.EXTRACT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SG.REVOKE.INGRESS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VM.DESTROY" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "TEMPLATE.UPLOAD" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "HOST.RECONNECT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VM.START" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "TEMPLATE.CLEANUP" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "MAINT.CANCEL" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VM.STOP" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VOLUME.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "MAINT.CANCEL.PS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VM.REBOOT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VOLUME.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "MAINT.PREPARE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VM.UPGRADE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VOLUME.ATTACH" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "MAINT.PREPARE.PS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VM.RESETPASSWORD" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VOLUME.DETACH" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPN.REMOTE.ACCESS.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ROUTER.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VOLUME.UPLOAD" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPN.USER.ADD" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ROUTER.DESTROY" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SERVICEOFFERING.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPN.USER.REMOVE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ROUTER.START" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SERVICEOFFERING.UPDATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NETWORK.RESTART" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ROUTER.STOP" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SERVICEOFFERING.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "UPLOAD.CUSTOM.CERTIFICATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ROUTER.REBOOT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DOMAIN.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ROUTER.HA" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DOMAIN.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "STATICNAT.DISABLE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "PROXY.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DOMAIN.UPDATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SSVM.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "PROXY.DESTROY" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SNAPSHOT.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SSVM.DESTROY" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "PROXY.START" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SNAPSHOT.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SSVM.START" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "PROXY.STOP" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SNAPSHOTPOLICY.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SSVM.STOP" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "PROXY.REBOOT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SNAPSHOTPOLICY.UPDATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SSVM.REBOOT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "PROXY.HA" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SNAPSHOTPOLICY.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SSVM.H" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VNC.CONNECT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VNC.DISCONNECT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NET.IPASSIGN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NET.IPRELEASE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NET.RULEADD" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NET.RULEDELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NET.RULEMODIFY" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NETWORK.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NETWORK.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "LB.ASSIGN.TO.RULE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "LB.REMOVE.FROM.RULE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "LB.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "LB.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "LB.UPDATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "USER.LOGIN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "USER.LOGOUT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "USER.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "USER.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "USER.UPDATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "USER.DISABLE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "TEMPLATE.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "TEMPLATE.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "TEMPLATE.UPDATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "TEMPLATE.COPY" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "TEMPLATE.DOWNLOAD.START" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "TEMPLATE.DOWNLOAD.SUCCESS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "TEMPLATE.DOWNLOAD.FAILED" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ISO.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ISO.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ISO.COPY" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ISO.ATTACH" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ISO.DETACH" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ISO.EXTRACT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ISO.UPLOAD" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SERVICE.OFFERING.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SERVICE.OFFERING.EDIT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SERVICE.OFFERING.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DISK.OFFERING.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DISK.OFFERING.EDIT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DISK.OFFERING.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NETWORK.OFFERING.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NETWORK.OFFERING.EDIT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NETWORK.OFFERING.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "POD.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "POD.EDIT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "POD.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ZONE.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ZONE.EDIT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ZONE.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN.IP.RANGE.CREATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN.IP.RANGE.DELETE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CONFIGURATION.VALUE.EDIT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SG.AUTH.INGRESS" +msgstr "" + diff --git a/docs/pot/events-log.pot b/docs/pot/events-log.pot new file mode 100644 index 000000000..bdfb9c23e --- /dev/null +++ b/docs/pot/events-log.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Event Logs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There are two types of events logged in the &PRODUCT; Event Log. Standard events log the success or failure of an event and can be used to identify jobs or processes that have failed. There are also long running job events. Events for asynchronous jobs log when a job is scheduled, when it starts, and when it completes. Other long running synchronous jobs log when a job starts, and when it completes. Long running synchronous and asynchronous event logs can be used to gain more information on the status of a pending job or can be used to identify a job that is hanging or has not started. The following sections provide more information on these events.." +msgstr "" + diff --git a/docs/pot/events.pot b/docs/pot/events.pot new file mode 100644 index 000000000..24a646eec --- /dev/null +++ b/docs/pot/events.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Events" +msgstr "" + diff --git a/docs/pot/example-LDAP-configuration-commands.pot b/docs/pot/example-LDAP-configuration-commands.pot new file mode 100644 index 000000000..693bf19fa --- /dev/null +++ b/docs/pot/example-LDAP-configuration-commands.pot @@ -0,0 +1,82 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Example LDAP Configuration Commands" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following shows an example invocation of ldapConfig with an ApacheDS LDAP server" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "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" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The command must be URL-encoded. Here is the same example without the URL encoding:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "http://127.0.0.1:8080/client/api?command=ldapConfig\n" +"&hostname=127.0.0.1\n" +"&searchbase=ou=testing,o=project\n" +"&queryfilter=(&(%uid=%u))\n" +"&binddn=cn=John+Singh,ou=testing,o=project\n" +"&bindpass=secret\n" +"&port=10389\n" +"&ssl=true\n" +"&truststore=C:/company/info/trusted.ks\n" +"&truststorepass=secret\n" +"&response=json\n" +"&apiKey=YourAPIKey&signature=YourSignatureHash\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "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" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The next few sections explain some of the concepts you will need to know when filling out the ldapConfig parameters." +msgstr "" + diff --git a/docs/pot/example-response-from-listUsageRecords.pot b/docs/pot/example-response-from-listUsageRecords.pot new file mode 100644 index 000000000..50b39f40a --- /dev/null +++ b/docs/pot/example-response-from-listUsageRecords.pot @@ -0,0 +1,64 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Example response from listUsageRecords" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All &PRODUCT; API requests are submitted in the form of a HTTP GET/POST with an associated command and any parameters. A request is composed of the following whether in HTTP or HTTPS:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +" <listusagerecordsresponse>\n" +" <count>1816</count>\n" +" <usagerecord>\n" +" <account>user5</account>\n" +" <accountid>10004</accountid>\n" +" <domainid>1</domainid>\n" +" <zoneid>1</zoneid>\n" +" <description>i-3-4-WC running time (ServiceOffering: 1) (Template: 3)</description>\n" +" <usage>2.95288 Hrs</usage>\n" +" <usagetype>1</usagetype>\n" +" <rawusage>2.95288</rawusage>\n" +" <virtualmachineid>4</virtualmachineid>\n" +" <name>i-3-4-WC</name>\n" +" <offeringid>1</offeringid>\n" +" <templateid>3</templateid>\n" +" <usageid>245554</usageid>\n" +" <type>XenServer</type>\n" +" <startdate>2009-09-15T00:00:00-0700</startdate>\n" +" <enddate>2009-09-18T16:14:26-0700</enddate>\n" +" </usagerecord>\n" +"\n" +" … (1,815 more usage records)\n" +" </listusagerecordsresponse>\n" +" " +msgstr "" + diff --git a/docs/pot/export-template.pot b/docs/pot/export-template.pot new file mode 100644 index 000000000..8316f4bb9 --- /dev/null +++ b/docs/pot/export-template.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Exporting Templates" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "End users and Administrators may export templates from the &PRODUCT;. Navigate to the template in the UI and choose the Download function from the Actions menu." +msgstr "" + diff --git a/docs/pot/external-firewalls-and-load-balancers.pot b/docs/pot/external-firewalls-and-load-balancers.pot new file mode 100644 index 000000000..8c628710e --- /dev/null +++ b/docs/pot/external-firewalls-and-load-balancers.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "External Firewalls and Load Balancers" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; is capable of replacing its Virtual Router with an external Juniper SRX device and an optional external NetScaler or F5 load balancer for gateway and load balancing services. In this case, the VMs use the SRX as their gateway." +msgstr "" + diff --git a/docs/pot/external-fw-topology-req.pot b/docs/pot/external-fw-topology-req.pot new file mode 100644 index 000000000..f218b10e8 --- /dev/null +++ b/docs/pot/external-fw-topology-req.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "External Firewall Topology Requirements" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When external firewall integration is in place, the public IP VLAN must still be trunked to the Hosts. This is required to support the Secondary Storage VM and Console Proxy VM." +msgstr "" + diff --git a/docs/pot/external-guest-firewall-integration.pot b/docs/pot/external-guest-firewall-integration.pot new file mode 100644 index 000000000..5d7c7d19e --- /dev/null +++ b/docs/pot/external-guest-firewall-integration.pot @@ -0,0 +1,251 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "External Guest Firewall Integration for Juniper SRX (Optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Available only for guests using advanced networking." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; provides for direct management of the Juniper SRX series of firewalls. This enables &PRODUCT; to establish static NAT mappings from public IPs to guest VMs, and to use the Juniper device in place of the virtual router for firewall services. You can have one or more Juniper SRX per zone. This feature is optional. If Juniper integration is not provisioned, &PRODUCT; will use the virtual router for these services." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Juniper SRX can optionally be used in conjunction with an external load balancer. External Network elements can be deployed in a side-by-side or inline configuration." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; requires the Juniper to be configured as follows:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Supported SRX software version is 10.3 or higher." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install your SRX appliance according to the vendor's instructions." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Connect one interface to the management network and one interface to the public network. Alternatively, you can connect the same interface to both networks and a use a VLAN for the public network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure \"vlan-tagging\" is enabled on the private interface." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Record the public and private interface names. If you used a VLAN for the public interface, add a \".[VLAN TAG]\" after the interface name. For example, if you are using ge-0/0/3 for your public interface and VLAN tag 301, your public interface name would be \"ge-0/0/3.301\". Your private interface name should always be untagged because the &PRODUCT; software automatically creates tagged logical interfaces." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a public security zone and a private security zone. By default, these will already exist and will be called \"untrust\" and \"trust\". Add the public interface to the public zone and the private interface to the private zone. Note down the security zone names." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure there is a security policy from the private zone to the public zone that allows all traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Note the username and password of the account you want the &PRODUCT; software to log in to when it is programming rules." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure the \"ssh\" and \"xnm-clear-text\" system services are enabled." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If traffic metering is desired:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "a. Create an incoming firewall filter and an outgoing firewall filter. These filters should be the same names as your public security zone name and private security zone name respectively. The filters should be set to be \"interface-specific\". For example, here is the configuration where the public zone is \"untrust\" and the private zone is \"trust\":" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "root@cloud-srx# show firewall\n" +"filter trust {\n" +" interface-specific;\n" +"}\n" +"filter untrust {\n" +" interface-specific;\n" +"}" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add the firewall filters to your public interface. For example, a sample configuration output (for public interface ge-0/0/3.0, public security zone untrust, and private security zone trust) is:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "ge-0/0/3 {\n" +" unit 0 {\n" +" family inet {\n" +" filter {\n" +" input untrust;\n" +" output trust;\n" +" }\n" +" address 172.25.0.252/16;\n" +" }\n" +" }\n" +"}" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure all VLANs are brought to the private interface of the SRX." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After the &PRODUCT; Management Server is installed, log in to the &PRODUCT; UI as administrator." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Infrastructure." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Zones, click View More." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose the zone you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Network tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Network Service Providers node of the diagram, click Configure. (You might have to scroll down to see this.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click SRX." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Add New SRX button (+) and provide the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Address: The IP address of the SRX." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Username: The user name of the account on the SRX that &PRODUCT; should use." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Password: The password of the account." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public Interface. The name of the public interface on the SRX. For example, ge-0/0/2. A \".x\" at the end of the interface indicates the VLAN that is in use." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Private Interface: The name of the private interface on the SRX. For example, ge-0/0/1." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Usage Interface: (Optional) Typically, the public interface is used to meter traffic. If you want to use a different interface, specify its name here" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Number of Retries: The number of times to attempt a command on the SRX before failing. The default value is 2." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Timeout (seconds): The time to wait for a command on the SRX before considering it failed. Default is 300 seconds." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public Network: The name of the public network on the SRX. For example, trust." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Private Network: The name of the private network on the SRX. For example, untrust." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Capacity: The number of networks the device can handle" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Dedicated: When marked as dedicated, this device will be dedicated to a single account. When Dedicated is checked, the value in the Capacity field has no significance implicitly, its value is 1" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Global Settings. Set the parameter external.network.stats.interval to indicate how often you want &PRODUCT; to fetch network usage statistics from the Juniper SRX. If you are not using the SRX to gather network usage statistics, set to 0." +msgstr "" + diff --git a/docs/pot/external-guest-lb-integration.pot b/docs/pot/external-guest-lb-integration.pot new file mode 100644 index 000000000..e1939dbf1 --- /dev/null +++ b/docs/pot/external-guest-lb-integration.pot @@ -0,0 +1,155 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "External Guest Load Balancer Integration (Optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; can optionally use a Citrix NetScaler or BigIP F5 load balancer to provide load balancing services to guests. If this is not enabled, &PRODUCT; will use the software load balancer in the virtual router." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To install and enable an external load balancer for &PRODUCT; management:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set up the appliance according to the vendor's directions." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Connect it to the networks carrying public traffic and management traffic (these could be the same network)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Record the IP address, username, password, public interface name, and private interface name. The interface names will be something like \"1.1\" or \"1.2\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure that the VLANs are trunked to the management network interface." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After the &PRODUCT; Management Server is installed, log in as administrator to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Infrastructure." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Zones, click View More." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose the zone you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Network tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Network Service Providers node of the diagram, click Configure. (You might have to scroll down to see this.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click NetScaler or F5." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Add button (+) and provide the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For NetScaler:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Address: The IP address of the SRX." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Username/Password: The authentication credentials to access the device. &PRODUCT; uses these credentials to access the device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Type: The type of device that is being added. It could be F5 Big Ip Load Balancer, NetScaler VPX, NetScaler MPX, or NetScaler SDX. For a comparison of the NetScaler types, see the &PRODUCT; Administration Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public interface: Interface of device that is configured to be part of the public network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Private interface: Interface of device that is configured to be part of the private network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Number of retries. Number of times to attempt a command on the device before considering the operation failed. Default is 2." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Capacity: The number of networks the device can handle." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Dedicated: When marked as dedicated, this device will be dedicated to a single account. When Dedicated is checked, the value in the Capacity field has no significance implicitly, its value is 1." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The installation and provisioning of the external load balancer is finished. You can proceed to add VMs and NAT or load balancing rules." +msgstr "" + diff --git a/docs/pot/extracting-source.pot b/docs/pot/extracting-source.pot new file mode 100644 index 000000000..eb739a6dd --- /dev/null +++ b/docs/pot/extracting-source.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Extracting source" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Extracting the &PRODUCT; release is relatively simple and can be done with a single command as follows:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ tar -jxvf apache-cloudstack-4.0.0-incubating-src.tar.bz2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can now move into the directory:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ cd ./apache-cloudstack-4.0.0-incubating-src" +msgstr "" + diff --git a/docs/pot/feature-overview.pot b/docs/pot/feature-overview.pot new file mode 100644 index 000000000..3f50f9f96 --- /dev/null +++ b/docs/pot/feature-overview.pot @@ -0,0 +1,100 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "What Can &PRODUCT; Do?" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Multiple Hypervisor Support" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; works with a variety of hypervisors, and a single cloud deployment can contain multiple hypervisor implementations. The current release of &PRODUCT; supports pre-packaged enterprise solutions like Citrix XenServer and VMware vSphere, as well as KVM or Xen running on Ubuntu or CentOS." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Massively Scalable Infrastructure Management" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; can manage tens of thousands of servers installed in multiple geographically distributed datacenters. The centralized management server scales linearly, eliminating the need for intermediate cluster-level management servers. No single component failure can cause cloud-wide outage. Periodic maintenance of the management server can be performed without affecting the functioning of virtual machines running in the cloud." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Automatic Configuration Management" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; automatically configures each guest virtual machine’s networking and storage settings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; internally manages a pool of virtual appliances to support the cloud itself. These appliances offer services such as firewalling, routing, DHCP, VPN access, console proxy, storage access, and storage replication. The extensive use of virtual appliances simplifies the installation, configuration, and ongoing management of a cloud deployment." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Graphical User Interface" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; offers an administrator's Web interface, used for provisioning and managing the cloud, as well as an end-user's Web interface, used for running VMs and managing VM templates. The UI can be customized to reflect the desired service provider or enterprise look and feel." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "API and Extensibility" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; provides an API that gives programmatic access to all the management features available in the UI. The API is maintained and documented. This API enables the creation of command line tools and new user interfaces to suit particular needs. See the Developer’s Guide and API Reference, both available at Apache CloudStack Guides and Apache CloudStack API Reference respectively." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; pluggable allocation architecture allows the creation of new types of allocators for the selection of storage and Hosts. See the Allocator Implementation Guide (http://docs.cloudstack.org/CloudStack_Documentation/Allocator_Implementation_Guide)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "High Availability" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; has a number of features to increase the availability of the system. The Management Server itself may be deployed in a multi-node installation where the servers are load balanced. MySQL may be configured to use replication to provide for a manual failover in the event of database loss. For the hosts, &PRODUCT; supports NIC bonding and the use of separate networks for storage as well as iSCSI Multipath." +msgstr "" + diff --git a/docs/pot/firewall-rules.pot b/docs/pot/firewall-rules.pot new file mode 100644 index 000000000..6c6610144 --- /dev/null +++ b/docs/pot/firewall-rules.pot @@ -0,0 +1,105 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Firewall Rules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "By default, all incoming traffic to the public IP address is rejected by the firewall. To allow external traffic, you can open firewall ports by specifying firewall rules. You can optionally specify one or more CIDRs to filter the source IPs. This is useful when you want to allow only incoming requests from certain IP addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You cannot use firewall rules to open ports for an elastic IP address. When elastic IP is used, outside access is instead controlled through the use of security groups. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Firewall rules can be created using the Firewall tab in the Management Server UI. This tab is not displayed by default when &PRODUCT; is installed. To display the Firewall tab, the &PRODUCT; administrator must set the global configuration parameter firewall.rule.ui.enabled to \"true.\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To create a firewall rule:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the name of the network where you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click View IP Addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the IP address you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Configuration tab and fill in the following values." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Source CIDR. (Optional) To accept only traffic from IP addresses within a particular address block, enter a CIDR or a comma-separated list of CIDRs. Example: 192.168.0.0/22. Leave empty to allow all CIDRs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Protocol. The communication protocol in use on the opened port(s)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start Port and End Port. The port(s) you want to open on the firewall. If you are opening a single port, use the same number in both fields" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ICMP Type and ICMP Code. Used only if Protocol is set to ICMP. Provide the type and code required by the ICMP protocol to fill out the ICMP header. Refer to ICMP documentation for more details if you are not sure what to enter" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add" +msgstr "" + diff --git a/docs/pot/first_ms_node_install.pot b/docs/pot/first_ms_node_install.pot new file mode 100644 index 000000000..6ecb5b7f0 --- /dev/null +++ b/docs/pot/first_ms_node_install.pot @@ -0,0 +1,64 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Install the First Management Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure you have configured your machine according to or as appropriate for your platform." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install the &PRODUCT; management server packages by issuing one of the following commands as appropriate:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# yum install cloud-client" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# apt-get install cloud-client" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(RPM-based distributions) When the installation is finished, run the following commands to start essential services:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service rpcbind start\n" +"# service nfs start\n" +"# chkconfig nfs on\n" +"# chkconfig rpcbind on\n" +" " +msgstr "" + diff --git a/docs/pot/generic-firewall-provisions.pot b/docs/pot/generic-firewall-provisions.pot new file mode 100644 index 000000000..0f1d0a3d7 --- /dev/null +++ b/docs/pot/generic-firewall-provisions.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Generic Firewall Provisions" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The hardware firewall is required to serve two purposes:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Protect the Management Servers. NAT and port forwarding should be configured to direct traffic from the public Internet to the Management Servers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Route management network traffic between multiple zones. Site-to-site VPN should be configured between multiple zones." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To achieve the above purposes you must set up fixed configurations for the firewall. Firewall rules and policies need not change as users are provisioned into the cloud. Any brand of hardware firewall that supports NAT and site-to-site VPN can be used." +msgstr "" + diff --git a/docs/pot/getting-release.pot b/docs/pot/getting-release.pot new file mode 100644 index 000000000..c2505e554 --- /dev/null +++ b/docs/pot/getting-release.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Getting the release" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can download the latest &PRODUCT; release from the Apache CloudStack project download page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You'll notice several links under the 'Latest release' section." +msgstr "" + +#. Tag: para +#, no-c-format +msgid " apache-cloudstack-4.0.0-incubating-src.tar.bz2 - This is the link to the release itself." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "PGP - This is a detached cryptographic signature that can be used to help verify the authenticity of the release." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "MD5 - An MD5 hash of the release to aid in verify the validity of the release download." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SHA512 - A SHA512 hash of the release to aid in verify the validity of the release download." +msgstr "" + diff --git a/docs/pot/global-config.pot b/docs/pot/global-config.pot new file mode 100644 index 000000000..2b6b3015d --- /dev/null +++ b/docs/pot/global-config.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Setting Global Configuration Parameters" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; provides parameters that you can set to control many aspects of the cloud. When &PRODUCT; is first installed, and periodically thereafter, you might need to modify these settings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the UI as administrator." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Global Settings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select View, choose one of the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Global Settings. This displays a list of the parameters with brief descriptions and current values." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor Capabilities. This displays a list of hypervisor versions with the maximum number of guests supported for each." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use the search box to narrow down the list to those you are interested in." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Edit icon to modify a value. If you are viewing Hypervisor Capabilities, you must click the name of the hypervisor first to display the editing screen." +msgstr "" + diff --git a/docs/pot/globally-configured-limits.pot b/docs/pot/globally-configured-limits.pot new file mode 100644 index 000000000..390e8ab49 --- /dev/null +++ b/docs/pot/globally-configured-limits.pot @@ -0,0 +1,175 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Globally Configured Limits" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a zone, the guest virtual network has a 24 bit CIDR by default. This limits the guest virtual network to 254 running instances. It can be adjusted as needed, but this must be done before any instances are created in the zone. For example, 10.1.1.0/22 would provide for ~1000 addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following table lists limits set in the Global Configuration:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Parameter Name" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Definition" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "max.account.public.ips" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Number of public IP addresses that can be owned by an account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "max.account.snapshots" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Number of snapshots that can exist for an account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "max.account.templates" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Number of templates that can exist for an account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "max.account.user.vms" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Number of virtual machine instances that can exist for an account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "max.account.volumes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Number of disk volumes that can exist for an account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "max.template.iso.size" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Maximum size for a downloaded template or ISO in GB" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "max.volume.size.gb" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Maximum size for a volume in GB" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "network.throttling.rate" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Default data transfer rate in megabits per second allowed per user (supported on XenServer)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "snapshot.max.hourly" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Maximum recurring hourly snapshots to be retained for a volume. If the limit is reached, early snapshots from the start of the hour are deleted so that newer ones can be saved. This limit does not apply to manual snapshots. If set to 0, recurring hourly snapshots can not be scheduled" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "snapshot.max.daily" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Maximum recurring daily snapshots to be retained for a volume. If the limit is reached, snapshots from the start of the day are deleted so that newer ones can be saved. This limit does not apply to manual snapshots. If set to 0, recurring daily snapshots can not be scheduled" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "snapshot.max.weekly" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Maximum recurring weekly snapshots to be retained for a volume. If the limit is reached, snapshots from the beginning of the week are deleted so that newer ones can be saved. This limit does not apply to manual snapshots. If set to 0, recurring weekly snapshots can not be scheduled" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "snapshot.max.monthly" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Maximum recurring monthly snapshots to be retained for a volume. If the limit is reached, snapshots from the beginning of the month are deleted so that newer ones can be saved. This limit does not apply to manual snapshots. If set to 0, recurring monthly snapshots can not be scheduled." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To modify global configuration parameters, use the global configuration screen in the &PRODUCT; UI. See Setting Global Configuration Parameters" +msgstr "" + diff --git a/docs/pot/guest-ip-ranges.pot b/docs/pot/guest-ip-ranges.pot new file mode 100644 index 000000000..f193ca7df --- /dev/null +++ b/docs/pot/guest-ip-ranges.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Guest IP Ranges" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The IP ranges for guest network traffic are set on a per-account basis by the user. This allows the users to configure their network in a fashion that will enable VPN linking between their guest network and their clients." +msgstr "" + diff --git a/docs/pot/guest-network.pot b/docs/pot/guest-network.pot new file mode 100644 index 000000000..9f79450d7 --- /dev/null +++ b/docs/pot/guest-network.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Guest Network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a &PRODUCT; cloud, guest VMs can communicate with each other using shared infrastructure with the security and user perception that the guests have a private LAN." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; virtual router is the main component providing networking features for guest traffic." +msgstr "" + diff --git a/docs/pot/guest-nw-usage-with-traffic-sentinel.pot b/docs/pot/guest-nw-usage-with-traffic-sentinel.pot new file mode 100644 index 000000000..baafd5d44 --- /dev/null +++ b/docs/pot/guest-nw-usage-with-traffic-sentinel.pot @@ -0,0 +1,90 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Guest Network Usage Integration for Traffic Sentinel" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To collect usage data for a guest network, &PRODUCT; needs to pull the data from an external network statistics collector installed on the network. Metering statistics for guest networks are available through &PRODUCT;’s integration with inMon Traffic Sentinel." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Traffic Sentinel is a network traffic usage data collection package. &PRODUCT; can feed statistics from Traffic Sentinel into its own usage records, providing a basis for billing users of cloud infrastructure. Traffic Sentinel uses the traffic monitoring protocol sFlow. Routers and switches generate sFlow records and provide them for collection by Traffic Sentinel, then &PRODUCT; queries the Traffic Sentinel database to obtain this information" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To construct the query, &PRODUCT; determines what guest IPs were in use during the current query interval. This includes both newly assigned IPs and IPs that were assigned in a previous time period and continued to be in use. &PRODUCT; queries Traffic Sentinel for network statistics that apply to these IPs during the time period they remained allocated in &PRODUCT;. The returned data is correlated with the customer account that owned each IP and the timestamps when IPs were assigned and released in order to create billable metering records in &PRODUCT;. When the Usage Server runs, it collects this data." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To set up the integration between &PRODUCT; and Traffic Sentinel:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On your network infrastructure, install Traffic Sentinel and configure it to gather traffic data. For installation and configuration steps, see inMon documentation at Traffic Sentinel Documentation." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Traffic Sentinel UI, configure Traffic Sentinel to accept script querying from guest users. &PRODUCT; will be the guest user performing the remote queries to gather network usage for one or more IP addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click File > Users > Access Control > Reports Query, then select Guest from the drop-down list." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On &PRODUCT;, add the Traffic Sentinel host by calling the &PRODUCT; API command addTrafficMonitor. Pass in the URL of the Traffic Sentinel as protocol + host + port (optional); for example, http://10.147.28.100:8080. For the addTrafficMonitor command syntax, see the API Reference at API Documentation." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For information about how to call the &PRODUCT; API, see the Developer’s Guide at CloudStack API Developer's Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as administrator." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select Configuration from the Global Settings page, and set the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "direct.network.stats.interval: How often you want &PRODUCT; to query Traffic Sentinel." +msgstr "" + diff --git a/docs/pot/guest-traffic.pot b/docs/pot/guest-traffic.pot new file mode 100644 index 000000000..2da57bf53 --- /dev/null +++ b/docs/pot/guest-traffic.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Guest Traffic" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A network can carry guest traffic only between VMs within one zone. Virtual machines in different zones cannot communicate with each other using their IP addresses; they must communicate with each other by routing through a public IP address." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Server automatically creates a virtual router for each network. A virtual router is a special virtual machine that runs on the hosts. Each virtual router has three network interfaces. Its eth0 interface serves as the gateway for the guest traffic and has the IP address of 10.1.1.1. Its eth1 interface is used by the system to configure the virtual router. Its eth2 interface is assigned a public IP address for public traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The virtual router provides DHCP and will automatically assign an IP address for each guest VM within the IP range assigned for the network. The user can manually reconfigure guest VMs to assume different IP addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Source NAT is automatically configured in the virtual router to forward outbound traffic for all guest VMs" +msgstr "" + diff --git a/docs/pot/ha-enabled-vm.pot b/docs/pot/ha-enabled-vm.pot new file mode 100644 index 000000000..b91f9d1c6 --- /dev/null +++ b/docs/pot/ha-enabled-vm.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "HA-Enabled Virtual Machines" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The user can specify a virtual machine as HA-enabled. By default, all virtual router VMs and Elastic Load Balancing VMs are automatically configured as HA-enabled. When an HA-enabled VM crashes, &PRODUCT; detects the crash and restarts the VM automatically within the same Availability Zone. HA is never performed across different Availability Zones. &PRODUCT; has a conservative policy towards restarting VMs and ensures that there will never be two instances of the same VM running at the same time. The Management Server attempts to start the VM on another Host in the same cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "HA features work with iSCSI or NFS primary storage. HA with local storage is not supported." +msgstr "" + diff --git a/docs/pot/ha-for-hosts.pot b/docs/pot/ha-for-hosts.pot new file mode 100644 index 000000000..c95851645 --- /dev/null +++ b/docs/pot/ha-for-hosts.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "HA for Hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The user can specify a virtual machine as HA-enabled. By default, all virtual router VMs and Elastic Load Balancing VMs are automatically configured as HA-enabled. When an HA-enabled VM crashes, &PRODUCT; detects the crash and restarts the VM automatically within the same Availability Zone. HA is never performed across different Availability Zones. &PRODUCT; has a conservative policy towards restarting VMs and ensures that there will never be two instances of the same VM running at the same time. The Management Server attempts to start the VM on another Host in the same cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "HA features work with iSCSI or NFS primary storage. HA with local storage is not supported." +msgstr "" + diff --git a/docs/pot/ha-management-server.pot b/docs/pot/ha-management-server.pot new file mode 100644 index 000000000..62404d8e6 --- /dev/null +++ b/docs/pot/ha-management-server.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "HA for Management Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; Management Server should be deployed in a multi-node configuration such that it is not susceptible to individual server failures. The Management Server itself (as distinct from the MySQL database) is stateless and may be placed behind a load balancer." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Normal operation of Hosts is not impacted by an outage of all Management Serves. All guest VMs will continue to work." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When the Management Server is down, no new VMs can be created, and the end user and admin UI, API, dynamic load distribution, and HA will cease to work." +msgstr "" + diff --git a/docs/pot/hardware-config-eg.pot b/docs/pot/hardware-config-eg.pot new file mode 100644 index 000000000..b42f0df24 --- /dev/null +++ b/docs/pot/hardware-config-eg.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Example Hardware Configuration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This section contains an example configuration of specific switch models for zone-level layer-3 switching. It assumes VLAN management protocols, such as VTP or GVRP, have been disabled. The example scripts must be changed appropriately if you choose to use VTP or GVRP." +msgstr "" + diff --git a/docs/pot/hardware-firewall.pot b/docs/pot/hardware-firewall.pot new file mode 100644 index 000000000..ba3d5f162 --- /dev/null +++ b/docs/pot/hardware-firewall.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Hardware Firewall" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All deployments should have a firewall protecting the management server; see Generic Firewall Provisions. Optionally, some deployments may also have a Juniper SRX firewall that will be the default gateway for the guest networks; see ." +msgstr "" + diff --git a/docs/pot/host-add-vsphere.pot b/docs/pot/host-add-vsphere.pot new file mode 100644 index 000000000..4798035d2 --- /dev/null +++ b/docs/pot/host-add-vsphere.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding a Host (vSphere)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For vSphere servers, we recommend creating the cluster of hosts in vCenter and then adding the entire cluster to &PRODUCT;. See Add Cluster: vSphere." +msgstr "" + diff --git a/docs/pot/host-add-xenserver-kvm-ovm.pot b/docs/pot/host-add-xenserver-kvm-ovm.pot new file mode 100644 index 000000000..7b984e460 --- /dev/null +++ b/docs/pot/host-add-xenserver-kvm-ovm.pot @@ -0,0 +1,210 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding a Host (XenServer or KVM)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer and KVM hosts can be added to a cluster at any time." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Requirements for XenServer and KVM Hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure the hypervisor host does not have any VMs already running before you add it to &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configuration requirements:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Each cluster must contain only hosts with the identical hypervisor." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For XenServer, do not put more than 8 hosts in a cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For KVM, do not put more than 16 hosts in a cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For hardware requirements, see the installation section for your hypervisor in the &PRODUCT; Installation Guide." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "XenServer Host Additional Requirements" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If network bonding is in use, the administrator must cable the new host identically to other hosts in the cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For all additional hosts to be added to the cluster, run the following command. This will cause the host to join the master in a XenServer pool." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# xe pool-join master-address=[master IP] master-username=root master-password=[your password]" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When copying and pasting a command, be sure the command has pasted as a single line before executing. Some document viewers may introduce unwanted line breaks in copied text." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "With all hosts added to the XenServer pool, run the cloud-setup-bond script. This script will complete the configuration and setup of the bonds on the new hosts in the cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Copy the script from the Management Server in /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver/cloud-setup-bonding.sh to the master host and ensure it is executable." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the script:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# ./cloud-setup-bonding.sh" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "KVM Host Additional Requirements" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If shared mountpoint storage is in use, the administrator should ensure that the new host has all the same mountpoints (with storage mounted) as the other hosts in the cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure the new host has the same network configuration (guest, private, and public network) as other hosts in the cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are using OpenVswitch bridges edit the file agent.properties on the KVM host and set the parameter network.bridge.type to openvswitch before adding the host to &PRODUCT;" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Adding a XenServer or KVM Host" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you have not already done so, install the hypervisor software on the host. You will need to know which version of the hypervisor software version is supported by &PRODUCT; and what additional configuration is required to ensure the host will work with &PRODUCT;. To find these installation details, see the appropriate section for your hypervisor in the &PRODUCT; Installation Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as administrator." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Infrastructure. In Zones, click View More, then click the zone in which you want to add the host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Compute tab. In the Clusters node, click View All." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the cluster where you want to add the host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click View Hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add Host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide the following information." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Host Name. The DNS name or IP address of the host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Username. Usually root." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Password. This is the password for the user from your XenServer or KVM install)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Host Tags (Optional). Any labels that you use to categorize hosts for ease of maintenance. For example, you can set to the cloud's HA tag (set in the ha.tag global configuration parameter) if you want this host to be used only for VMs with the \"high availability\" feature enabled. For more information, see HA-Enabled Virtual Machines as well as HA for Hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There may be a slight delay while the host is provisioned. It should automatically display in the UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Repeat for additional hosts." +msgstr "" + diff --git a/docs/pot/host-add.pot b/docs/pot/host-add.pot new file mode 100644 index 000000000..c52ebaa7d --- /dev/null +++ b/docs/pot/host-add.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding a Host" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Before adding a host to the &PRODUCT; configuration, you must first install your chosen hypervisor on the host. &PRODUCT; can manage hosts running VMs under a variety of hypervisors." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; Installation Guide provides instructions on how to install each supported hypervisor and configure it for use with &PRODUCT;. See the appropriate section in the Installation Guide for information about which version of your chosen hypervisor is supported, as well as crucial additional steps to configure the hypervisor hosts for use with &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Be sure you have performed the additional &PRODUCT;-specific configuration steps described in the hypervisor installation section for your particular hypervisor." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now add the hypervisor host to &PRODUCT;. The technique to use varies depending on the hypervisor." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + diff --git a/docs/pot/host-allocation.pot b/docs/pot/host-allocation.pot new file mode 100644 index 000000000..cb6bee69c --- /dev/null +++ b/docs/pot/host-allocation.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Host Allocation" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The system automatically picks the most appropriate host to run each virtual machine. End users may specify the zone in which the virtual machine will be created. End users do not have control over which host will run the virtual machine instance." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; administrators can specify that certain hosts should have a preference for particular types of guest instances. For example, an administrator could state that a host should have a preference to run Windows guests. The default host allocator will attempt to place guests of that OS type on such hosts first. If no such host is available, the allocator will place the instance wherever there is sufficient physical capacity." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Both vertical and horizontal allocation is allowed. Vertical allocation consumes all the resources of a given host before allocating any guests on a second host. This reduces power consumption in the cloud. Horizontal allocation places a guest on each host in a round-robin fashion. This may yield better performance to the guests in some cases. &PRODUCT; also allows an element of CPU over-provisioning as configured by the administrator. Over-provisioning allows the administrator to commit more CPU cycles to the allocated guests than are actually available from the hardware." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; also provides a pluggable interface for adding new allocators. These custom allocators can provide any policy the administrator desires." +msgstr "" + diff --git a/docs/pot/hypervisor-host-install-agent.pot b/docs/pot/hypervisor-host-install-agent.pot new file mode 100644 index 000000000..2c314d761 --- /dev/null +++ b/docs/pot/hypervisor-host-install-agent.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Install and configure the Agent" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To manage KVM instances on the host &PRODUCT; uses a Agent. This Agent communicates with the Management server and controls all the instances on the host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "First we start by installing the agent:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In RHEL or CentOS:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ yum install cloud-agent" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Ubuntu:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ apt-get install cloud-agent" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The host is now ready to be added to a cluster. This is covered in a later section, see . It is recommended that you continue to read the documentation before adding the host!" +msgstr "" + diff --git a/docs/pot/hypervisor-host-install-finish.pot b/docs/pot/hypervisor-host-install-finish.pot new file mode 100644 index 000000000..ae14351d5 --- /dev/null +++ b/docs/pot/hypervisor-host-install-finish.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Add the host to CloudStack" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The host is now ready to be added to a cluster. This is covered in a later section, see . It is recommended that you continue to read the documentation before adding the host!" +msgstr "" + diff --git a/docs/pot/hypervisor-host-install-firewall.pot b/docs/pot/hypervisor-host-install-firewall.pot new file mode 100644 index 000000000..fb7a56cc6 --- /dev/null +++ b/docs/pot/hypervisor-host-install-firewall.pot @@ -0,0 +1,160 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configuring the firewall" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The hypervisor needs to be able to communicate with other hypervisors and the management server needs to be able to reach the hypervisor." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In order to do so we have to open the following TCP ports (if you are using a firewall):" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "22 (SSH)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "1798" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "16509 (libvirt)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "5900 - 6100 (VNC consoles)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "49152 - 49216 (libvirt live migration)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "It depends on the firewall you are using how to open these ports. Below you'll find examples how to open these ports in RHEL/CentOS and Ubuntu." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Open ports in RHEL/CentOS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "RHEL and CentOS use iptables for firewalling the system, you can open extra ports by executing the following iptable commands:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ iptables -I INPUT -p tcp -m tcp --dport 22 -j ACCEPT" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ iptables -I INPUT -p tcp -m tcp --dport 1798 -j ACCEPT" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ iptables -I INPUT -p tcp -m tcp --dport 16509 -j ACCEPT" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ iptables -I INPUT -p tcp -m tcp --dport 5900:6100 -j ACCEPT" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ iptables -I INPUT -p tcp -m tcp --dport 49152:49216 -j ACCEPT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "These iptable settings are not persistent accross reboots, we have to save them first." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ iptables-save > /etc/sysconfig/iptables" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Open ports in Ubuntu" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The default firewall under Ubuntu is UFW (Uncomplicated FireWall), which is a Python wrapper around iptables." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To open the required ports, execute the following commands:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ ufw allow proto tcp from any to any port 22" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ ufw allow proto tcp from any to any port 1798" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ ufw allow proto tcp from any to any port 16509" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ ufw allow proto tcp from any to any port 5900:6100" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ ufw allow proto tcp from any to any port 49152:49216" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "By default UFW is not enabled on Ubuntu. Executing these commands with the firewall disabled does not enable the firewall." +msgstr "" + diff --git a/docs/pot/hypervisor-host-install-libvirt.pot b/docs/pot/hypervisor-host-install-libvirt.pot new file mode 100644 index 000000000..f7eeed990 --- /dev/null +++ b/docs/pot/hypervisor-host-install-libvirt.pot @@ -0,0 +1,140 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Install and Configure libvirt" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; uses libvirt for managing virtual machines. Therefore it is vital that libvirt is configured correctly. Libvirt is a dependency of cloud-agent and should already be installed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In order to have live migration working libvirt has to listen for unsecured TCP connections. We also need to turn off libvirts attempt to use Multicast DNS advertising. Both of these settings are in /etc/libvirt/libvirtd.conf" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set the following paramaters:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "listen_tls = 0" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "listen_tcp = 1" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "tcp_port = 16059" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "auth_tcp = \"none\"" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "mdns_adv = 0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Turning on \"listen_tcp\" in libvirtd.conf is not enough, we have to change the parameters as well:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On RHEL or CentOS modify /etc/sysconfig/libvirtd:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Uncomment the following line:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "#LIBVIRTD_ARGS=\"--listen\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On Ubuntu: modify /etc/init/libvirt-bin.conf" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Change the following line (at the end of the file):" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "exec /usr/sbin/libvirtd -d" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "to (just add -l)" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "exec /usr/sbin/libvirtd -d -l" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart libvirt" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In RHEL or CentOS:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ service libvirtd restart" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Ubuntu:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ service libvirt-bin restart" +msgstr "" + diff --git a/docs/pot/hypervisor-host-install-network-openvswitch.pot b/docs/pot/hypervisor-host-install-network-openvswitch.pot new file mode 100644 index 000000000..ab01e23a1 --- /dev/null +++ b/docs/pot/hypervisor-host-install-network-openvswitch.pot @@ -0,0 +1,263 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configure the network using OpenVswitch" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This is a very important section, please make sure you read this thoroughly." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In order to forward traffic to your instances you will need at least two bridges: public and private." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "By default these bridges are called cloudbr0 and cloudbr1, but you do have to make sure they are available on each hypervisor." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The most important factor is that you keep the configuration consistent on all your hypervisors." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Preparing" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To make sure that the native bridge module will not interfere with openvswitch the bridge module should be added to the blacklist. See the modprobe documentation for your distribution on where to find the blacklist. Make sure the module is not loaded either by rebooting or executing rmmod bridge before executing next steps." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The network configurations below depend on the ifup-ovs and ifdown-ovs scripts which are part of the openvswitch installation. They should be installed in /etc/sysconfig/network-scripts/" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Network example" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There are many ways to configure your network. In the Basic networking mode you should have two (V)LAN's, one for your private network and one for the public network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "We assume that the hypervisor has one NIC (eth0) with three tagged VLAN's:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN 100 for management of the hypervisor" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN 200 for public network of the instances (cloudbr0)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN 300 for private network of the instances (cloudbr1)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On VLAN 100 we give the Hypervisor the IP-Address 192.168.42.11/24 with the gateway 192.168.42.1" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Hypervisor and Management server don't have to be in the same subnet!" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Configuring the network bridges" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "It depends on the distribution you are using how to configure these, below you'll find examples for RHEL/CentOS." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The goal is to have three bridges called 'mgmt0', 'cloudbr0' and 'cloudbr1' after this section. This should be used as a guideline only. The exact configuration will depend on your network layout." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Configure OpenVswitch" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The network interfaces using OpenVswitch are created using the ovs-vsctl command. This command will configure the interfaces and persist them to the OpenVswitch database." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "First we create a main bridge connected to the eth0 interface. Next we create three fake bridges, each connected to a specific vlan tag." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# ovs-vsctl add-br cloudbr\n" +"# ovs-vsctl add-port cloudbr eth0 \n" +"# ovs-vsctl set port cloudbr trunks=100,200,300\n" +"# ovs-vsctl add-br mgmt0 cloudbr 100\n" +"# ovs-vsctl add-br cloudbr0 cloudbr 200\n" +"# ovs-vsctl add-br cloudbr1 cloudbr 300" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Configure in RHEL or CentOS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The required packages were installed when openvswitch and libvirt were installed, we can proceed to configuring the network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "First we configure eth0" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vi /etc/sysconfig/network-scripts/ifcfg-eth0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure it looks similair to:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "DEVICE=eth0\n" +"HWADDR=00:04:xx:xx:xx:xx\n" +"ONBOOT=yes\n" +"HOTPLUG=no\n" +"BOOTPROTO=none\n" +"TYPE=Ethernet" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "We have to configure the base bridge with the trunk." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vi /etc/sysconfig/network-scripts/ifcfg-cloudbr" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "DEVICE=cloudbr\n" +"ONBOOT=yes\n" +"HOTPLUG=no\n" +"BOOTPROTO=none\n" +"DEVICETYPE=ovs\n" +"TYPE=OVSBridge" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "We now have to configure the three VLAN bridges:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vi /etc/sysconfig/network-scripts/ifcfg-mgmt0" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "DEVICE=mgmt0\n" +"ONBOOT=yes\n" +"HOTPLUG=no\n" +"BOOTPROTO=static\n" +"DEVICETYPE=ovs\n" +"TYPE=OVSBridge\n" +"IPADDR=192.168.42.11\n" +"GATEWAY=192.168.42.1\n" +"NETMASK=255.255.255.0" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vi /etc/sysconfig/network-scripts/ifcfg-cloudbr0" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "DEVICE=cloudbr0\n" +"ONBOOT=yes\n" +"HOTPLUG=no\n" +"BOOTPROTO=none\n" +"DEVICETYPE=ovs\n" +"TYPE=OVSBridge" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vi /etc/sysconfig/network-scripts/ifcfg-cloudbr1" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "DEVICE=cloudbr1\n" +"ONBOOT=yes\n" +"HOTPLUG=no\n" +"BOOTPROTO=none\n" +"TYPE=OVSBridge\n" +"DEVICETYPE=ovs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "With this configuration you should be able to restart the network, although a reboot is recommended to see if everything works properly." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure you have an alternative way like IPMI or ILO to reach the machine in case you made a configuration error and the network stops functioning!" +msgstr "" + diff --git a/docs/pot/hypervisor-host-install-network.pot b/docs/pot/hypervisor-host-install-network.pot new file mode 100644 index 000000000..f46ef2ee8 --- /dev/null +++ b/docs/pot/hypervisor-host-install-network.pot @@ -0,0 +1,313 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configure the network bridges" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This is a very important section, please make sure you read this thoroughly." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This section details how to configure bridges using the native implementation in Linux. Please refer to the next section if you intend to use OpenVswitch" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In order to forward traffic to your instances you will need at least two bridges: public and private." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "By default these bridges are called cloudbr0 and cloudbr1, but you do have to make sure they are available on each hypervisor." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The most important factor is that you keep the configuration consistent on all your hypervisors." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Network example" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There are many ways to configure your network. In the Basic networking mode you should have two (V)LAN's, one for your private network and one for the public network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "We assume that the hypervisor has one NIC (eth0) with three tagged VLAN's:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN 100 for management of the hypervisor" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN 200 for public network of the instances (cloudbr0)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN 300 for private network of the instances (cloudbr1)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On VLAN 100 we give the Hypervisor the IP-Address 192.168.42.11/24 with the gateway 192.168.42.1" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Hypervisor and Management server don't have to be in the same subnet!" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Configuring the network bridges" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "It depends on the distribution you are using how to configure these, below you'll find examples for RHEL/CentOS and Ubuntu." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The goal is to have two bridges called 'cloudbr0' and 'cloudbr1' after this section. This should be used as a guideline only. The exact configuration will depend on your network layout." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Configure in RHEL or CentOS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The required packages were installed when libvirt was installed, we can proceed to configuring the network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "First we configure eth0" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vi /etc/sysconfig/network-scripts/ifcfg-eth0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure it looks similair to:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "DEVICE=eth0\n" +"HWADDR=00:04:xx:xx:xx:xx\n" +"ONBOOT=yes\n" +"HOTPLUG=no\n" +"BOOTPROTO=none\n" +"TYPE=Ethernet" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "We now have to configure the three VLAN interfaces:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vi /etc/sysconfig/network-scripts/ifcfg-eth0.100" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "DEVICE=eth0.100\n" +"HWADDR=00:04:xx:xx:xx:xx\n" +"ONBOOT=yes\n" +"HOTPLUG=no\n" +"BOOTPROTO=none\n" +"TYPE=Ethernet\n" +"VLAN=yes\n" +"IPADDR=192.168.42.11\n" +"GATEWAY=192.168.42.1\n" +"NETMASK=255.255.255.0" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vi /etc/sysconfig/network-scripts/ifcfg-eth0.200" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "DEVICE=eth0.200\n" +"HWADDR=00:04:xx:xx:xx:xx\n" +"ONBOOT=yes\n" +"HOTPLUG=no\n" +"BOOTPROTO=none\n" +"TYPE=Ethernet\n" +"VLAN=yes\n" +"BRIDGE=cloudbr0" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vi /etc/sysconfig/network-scripts/ifcfg-eth0.300" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "DEVICE=eth0.300\n" +"HWADDR=00:04:xx:xx:xx:xx\n" +"ONBOOT=yes\n" +"HOTPLUG=no\n" +"BOOTPROTO=none\n" +"TYPE=Ethernet\n" +"VLAN=yes\n" +"BRIDGE=cloudbr1" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now we have the VLAN interfaces configured we can add the bridges on top of them." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vi /etc/sysconfig/network-scripts/ifcfg-cloudbr0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now we just configure it is a plain bridge without an IP-Adress" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "DEVICE=cloudbr0\n" +"TYPE=Bridge\n" +"ONBOOT=yes\n" +"BOOTPROTO=none\n" +"IPV6INIT=no\n" +"IPV6_AUTOCONF=no\n" +"DELAY=5\n" +"STP=yes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "We do the same for cloudbr1" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vi /etc/sysconfig/network-scripts/ifcfg-cloudbr1" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "DEVICE=cloudbr1\n" +"TYPE=Bridge\n" +"ONBOOT=yes\n" +"BOOTPROTO=none\n" +"IPV6INIT=no\n" +"IPV6_AUTOCONF=no\n" +"DELAY=5\n" +"STP=yes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "With this configuration you should be able to restart the network, although a reboot is recommended to see if everything works properly." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure you have an alternative way like IPMI or ILO to reach the machine in case you made a configuration error and the network stops functioning!" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Configure in Ubuntu" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the required packages were installed when you installed libvirt, so we only have to configure the network." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vi /etc/network/interfaces" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Modify the interfaces file to look like this:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "auto lo\n" +"iface lo inet loopback\n" +"\n" +"# The primary network interface\n" +"auto eth0.100\n" +"iface eth0.100 inet static\n" +" address 192.168.42.11\n" +" netmask 255.255.255.240\n" +" gateway 192.168.42.1\n" +" dns-nameservers 8.8.8.8 8.8.4.4\n" +" dns-domain lab.example.org\n" +"\n" +"# Public network\n" +"auto cloudbr0\n" +"iface cloudbr0 inet manual\n" +" bridge_ports eth0.200\n" +" bridge_fd 5\n" +" bridge_stp off\n" +" bridge_maxwait 1\n" +"\n" +"# Private network\n" +"auto cloudbr1\n" +"iface cloudbr1 inet manual\n" +" bridge_ports eth0.300\n" +" bridge_fd 5\n" +" bridge_stp off\n" +" bridge_maxwait 1" +msgstr "" + diff --git a/docs/pot/hypervisor-host-install-overview.pot b/docs/pot/hypervisor-host-install-overview.pot new file mode 100644 index 000000000..f9eb4b77c --- /dev/null +++ b/docs/pot/hypervisor-host-install-overview.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "KVM Installation Overview" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you want to use the Linux Kernel Virtual Machine (KVM) hypervisor to run guest virtual machines, install KVM on the host(s) in your cloud. The material in this section doesn't duplicate KVM installation docs. It provides the &PRODUCT;-specific steps that are needed to prepare a KVM host to work with &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Before continuing, make sure that you have applied the latest updates to your host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "It is NOT recommended to run services on this host not controlled by &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The procedure for installing a KVM Hypervisor Host is:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Prepare the Operating System" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install and configure libvirt" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure Security Policies (AppArmor and SELinux)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install and configure the Agent" +msgstr "" + diff --git a/docs/pot/hypervisor-host-install-prepare-os.pot b/docs/pot/hypervisor-host-install-prepare-os.pot new file mode 100644 index 000000000..eb37323d0 --- /dev/null +++ b/docs/pot/hypervisor-host-install-prepare-os.pot @@ -0,0 +1,105 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Prepare the Operating System" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The OS of the Host must be prepared to host the &PRODUCT; Agent and run KVM instances." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to your OS as root." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Check for a fully qualified hostname." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ hostname --fqdn" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This should return a fully qualified hostname such as \"kvm1.lab.example.org\". If it does not, edit /etc/hosts so that it does." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure that the machine can reach the Internet." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ ping www.cloudstack.org" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Turn on NTP for time synchronization." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NTP is required to synchronize the clocks of the servers in your cloud. Unsynchronized clocks can cause unexpected problems." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install NTP" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On RHEL or CentOS:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ yum install ntp" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On Ubuntu:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ apt-get install openntpd" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Repeat all of these steps on every hypervisor host." +msgstr "" + diff --git a/docs/pot/hypervisor-host-install-security-policies.pot b/docs/pot/hypervisor-host-install-security-policies.pot new file mode 100644 index 000000000..e13fd5fa3 --- /dev/null +++ b/docs/pot/hypervisor-host-install-security-policies.pot @@ -0,0 +1,145 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configure the Security Policies" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; does various things which can be blocked by security mechanisms like AppArmor and SELinux. These have to be disabled to ensure the Agent has all the required permissions." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure SELinux (RHEL and CentOS)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Check to see whether SELinux is installed on your machine. If not, you can skip this section." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In RHEL or CentOS, SELinux is installed and enabled by default. You can verify this with:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ rpm -qa | grep selinux" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set the SELINUX variable in /etc/selinux/config to \"permissive\". This ensures that the permissive setting will be maintained after a system reboot." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In RHEL or CentOS:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "vi /etc/selinux/config" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Change the following line" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "SELINUX=enforcing" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "to this" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "SELINUX=permissive" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Then set SELinux to permissive starting immediately, without requiring a system reboot." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ setenforce permissive" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure Apparmor (Ubuntu)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Check to see whether AppArmor is installed on your machine. If not, you can skip this section." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Ubuntu AppArmor is installed and enabled by default. You can verify this with:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ dpkg --list 'apparmor'" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Disable the AppArmor profiles for libvirt" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ ln -s /etc/apparmor.d/usr.sbin.libvirtd /etc/apparmor.d/disable/" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ ln -s /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper /etc/apparmor.d/disable/" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ apparmor_parser -R /etc/apparmor.d/usr.sbin.libvirtd" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ apparmor_parser -R /etc/apparmor.d/usr.lib.libvirt.virt-aa-helper" +msgstr "" + diff --git a/docs/pot/hypervisor-installation.pot b/docs/pot/hypervisor-installation.pot new file mode 100644 index 000000000..d8d769981 --- /dev/null +++ b/docs/pot/hypervisor-installation.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Hypervisor Installation" +msgstr "" + diff --git a/docs/pot/hypervisor-kvm-install-flow.pot b/docs/pot/hypervisor-kvm-install-flow.pot new file mode 100644 index 000000000..88595e474 --- /dev/null +++ b/docs/pot/hypervisor-kvm-install-flow.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "KVM Hypervisor Host Installation" +msgstr "" + diff --git a/docs/pot/hypervisor-kvm-requirements.pot b/docs/pot/hypervisor-kvm-requirements.pot new file mode 100644 index 000000000..10e56f616 --- /dev/null +++ b/docs/pot/hypervisor-kvm-requirements.pot @@ -0,0 +1,115 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "System Requirements for KVM Hypervisor Hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "KVM is included with a variety of Linux-based operating systems. Although you are not required to run these distributions, the following are recommended:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CentOS / RHEL: 6.3" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ubuntu: 12.04(.1)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The main requirement for KVM hypervisors is the libvirt and Qemu version. No matter what Linux distribution you are using, make sure the following requirements are met:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "libvirt: 0.9.4 or higher" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Qemu/KVM: 1.0 or higher" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The default bridge in &PRODUCT; is the Linux native bridge implementation (bridge module). &PRODUCT; includes an option to work with OpenVswitch, the requirements are listed below" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "libvirt: 0.9.11 or higher" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "openvswitch: 1.7.1 or higher" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In addition, the following hardware requirements apply:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Within a single cluster, the hosts must be of the same distribution version." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All hosts within a cluster must be homogenous. The CPUs must be of the same type, count, and feature flags." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Must support HVM (Intel-VT or AMD-V enabled)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "64-bit x86 CPU (more cores results in better performance)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4 GB of memory" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "At least 1 NIC" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you deploy &PRODUCT;, the hypervisor host must not have any VMs already running" +msgstr "" + diff --git a/docs/pot/hypervisor-support-for-primarystorage.pot b/docs/pot/hypervisor-support-for-primarystorage.pot new file mode 100644 index 000000000..89d19323c --- /dev/null +++ b/docs/pot/hypervisor-support-for-primarystorage.pot @@ -0,0 +1,155 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Hypervisor Support for Primary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following table shows storage options and parameters for different hypervisors." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VMware vSphere" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Citrix XenServer" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "KVM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Format for Disks, Templates, and Snapshots" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VMDK" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VHD" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "QCOW2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "iSCSI support" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VMFS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Clustered LVM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Yes, via Shared Mountpoint" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Fiber Channel support" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Yes, via Existing SR" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NFS support" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Y" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Local storage support" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Storage over-provisioning" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NFS and iSCSI" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NFS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer uses a clustered LVM system to store VM images on iSCSI and Fiber Channel volumes and does not support over-provisioning in the hypervisor. The storage server itself, however, can support thin-provisioning. As a result the &PRODUCT; can still support storage over-provisioning by running on thin-provisioned storage volumes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "KVM supports \"Shared Mountpoint\" storage. A shared mountpoint is a file system path local to each server in a given cluster. The path must be the same across all Hosts in the cluster, for example /mnt/primary1. This shared mountpoint is assumed to be a clustered filesystem such as OCFS2. In this case the &PRODUCT; does not attempt to mount or unmount the storage as is done with NFS. The &PRODUCT; requires that the administrator insure that the storage is available" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "With NFS storage, &PRODUCT; manages the overprovisioning. In this case the global configuration parameter storage.overprovisioning.factor controls the degree of overprovisioning. This is independent of hypervisor type." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Local storage is an option for primary storage for vSphere, XenServer, and KVM. When the local disk option is enabled, a local disk storage pool is automatically created on each host. To use local storage for the System Virtual Machines (such as the Virtual Router), set system.vm.use.local.storage to true in global configuration." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; supports multiple primary storage pools in a Cluster. For example, you could provision 2 NFS servers in primary storage. Or you could provision 1 iSCSI LUN initially and then add a second iSCSI LUN when the first approaches capacity." +msgstr "" + diff --git a/docs/pot/import-ami.pot b/docs/pot/import-ami.pot new file mode 100644 index 000000000..84225fb4f --- /dev/null +++ b/docs/pot/import-ami.pot @@ -0,0 +1,270 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Importing Amazon Machine Images" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following procedures describe how to import an Amazon Machine Image (AMI) into &PRODUCT; when using the XenServer hypervisor." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Assume you have an AMI file and this file is called CentOS_6.2_x64. Assume further that you are working on a CentOS host. If the AMI is a Fedora image, you need to be working on a Fedora host initially." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You need to have a XenServer host with a file-based storage repository (either a local ext3 SR or an NFS SR) to convert to a VHD once the image file has been customized on the Centos/Fedora host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When copying and pasting a command, be sure the command has pasted as a single line before executing. Some document viewers may introduce unwanted line breaks in copied text." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set up loopback on image file:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# mkdir -p /mnt/loop/centos62\n" +"# mount -o loop CentOS_6.2_x64 /mnt/loop/centos54\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install the kernel-xen package into the image. This downloads the PV kernel and ramdisk to the image." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# yum -c /mnt/loop/centos54/etc/yum.conf --installroot=/mnt/loop/centos62/ -y install kernel-xen" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a grub entry in /boot/grub/grub.conf." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# mkdir -p /mnt/loop/centos62/boot/grub\n" +"# touch /mnt/loop/centos62/boot/grub/grub.conf\n" +"# echo \"\" > /mnt/loop/centos62/boot/grub/grub.conf\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Determine the name of the PV kernel that has been installed into the image." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# cd /mnt/loop/centos62\n" +"# ls lib/modules/\n" +"2.6.16.33-xenU 2.6.16-xenU 2.6.18-164.15.1.el5xen 2.6.18-164.6.1.el5.centos.plus 2.6.18-xenU-ec2-v1.0 2.6.21.7-2.fc8xen 2.6.31-302-ec2\n" +"# ls boot/initrd*\n" +"boot/initrd-2.6.18-164.6.1.el5.centos.plus.img boot/initrd-2.6.18-164.15.1.el5xen.img\n" +"# ls boot/vmlinuz*\n" +"boot/vmlinuz-2.6.18-164.15.1.el5xen boot/vmlinuz-2.6.18-164.6.1.el5.centos.plus boot/vmlinuz-2.6.18-xenU-ec2-v1.0 boot/vmlinuz-2.6.21-2952.fc8xen\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Xen kernels/ramdisk always end with \"xen\". For the kernel version you choose, there has to be an entry for that version under lib/modules, there has to be an initrd and vmlinuz corresponding to that. Above, the only kernel that satisfies this condition is 2.6.18-164.15.1.el5xen." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Based on your findings, create an entry in the grub.conf file. Below is an example entry." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "default=0\n" +"timeout=5\n" +"hiddenmenu\n" +"title CentOS (2.6.18-164.15.1.el5xen)\n" +" root (hd0,0)\n" +" kernel /boot/vmlinuz-2.6.18-164.15.1.el5xen ro root=/dev/xvda \n" +" initrd /boot/initrd-2.6.18-164.15.1.el5xen.img\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Edit etc/fstab, changing “sda1†to “xvda†and changing “sdb†to “xvdbâ€." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# cat etc/fstab\n" +"/dev/xvda / ext3 defaults 1 1\n" +"/dev/xvdb /mnt ext3 defaults 0 0\n" +"none /dev/pts devpts gid=5,mode=620 0 0\n" +"none /proc proc defaults 0 0\n" +"none /sys sysfs defaults 0 0\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Enable login via the console. The default console device in a XenServer system is xvc0. Ensure that etc/inittab and etc/securetty have the following lines respectively:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# grep xvc0 etc/inittab \n" +"co:2345:respawn:/sbin/agetty xvc0 9600 vt100-nav\n" +"# grep xvc0 etc/securetty \n" +"xvc0\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure the ramdisk supports PV disk and PV network. Customize this for the kernel version you have determined above." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# chroot /mnt/loop/centos54\n" +"# cd /boot/\n" +"# mv initrd-2.6.18-164.15.1.el5xen.img initrd-2.6.18-164.15.1.el5xen.img.bak\n" +"# mkinitrd -f /boot/initrd-2.6.18-164.15.1.el5xen.img --with=xennet --preload=xenblk --omit-scsi-modules 2.6.18-164.15.1.el5xen\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Change the password." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# passwd\n" +"Changing password for user root.\n" +"New UNIX password: \n" +"Retype new UNIX password: \n" +"passwd: all authentication tokens updated successfully.\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Exit out of chroot." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# exit" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Check etc/ssh/sshd_config for lines allowing ssh login using a password." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# egrep \"PermitRootLogin|PasswordAuthentication\" /mnt/loop/centos54/etc/ssh/sshd_config \n" +"PermitRootLogin yes\n" +"PasswordAuthentication yes\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you need the template to be enabled to reset passwords from the &PRODUCT; UI or API, install the password change script into the image at this point. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Unmount and delete loopback mount." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# umount /mnt/loop/centos54\n" +"# losetup -d /dev/loop0\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Copy the image file to your XenServer host's file-based storage repository. In the example below, the Xenserver is \"xenhost\". This XenServer has an NFS repository whose uuid is a9c5b8c8-536b-a193-a6dc-51af3e5ff799." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# scp CentOS_6.2_x64 xenhost:/var/run/sr-mount/a9c5b8c8-536b-a193-a6dc-51af3e5ff799/" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the Xenserver and create a VDI the same size as the image." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "[root@xenhost ~]# cd /var/run/sr-mount/a9c5b8c8-536b-a193-a6dc-51af3e5ff799\n" +"[root@xenhost a9c5b8c8-536b-a193-a6dc-51af3e5ff799]# ls -lh CentOS_6.2_x64\n" +"-rw-r--r-- 1 root root 10G Mar 16 16:49 CentOS_6.2_x64\n" +"[root@xenhost a9c5b8c8-536b-a193-a6dc-51af3e5ff799]# xe vdi-create virtual-size=10GiB sr-uuid=a9c5b8c8-536b-a193-a6dc-51af3e5ff799 type=user name-label=\"Centos 6.2 x86_64\"\n" +"cad7317c-258b-4ef7-b207-cdf0283a7923\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Import the image file into the VDI. This may take 10–20 minutes." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "[root@xenhost a9c5b8c8-536b-a193-a6dc-51af3e5ff799]# xe vdi-import filename=CentOS_6.2_x64 uuid=cad7317c-258b-4ef7-b207-cdf0283a7923" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Locate a the VHD file. This is the file with the VDI’s UUID as its name. Compress it and upload it to your web server." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "[root@xenhost a9c5b8c8-536b-a193-a6dc-51af3e5ff799]# bzip2 -c cad7317c-258b-4ef7-b207-cdf0283a7923.vhd > CentOS_6.2_x64.vhd.bz2\n" +"[root@xenhost a9c5b8c8-536b-a193-a6dc-51af3e5ff799]# scp CentOS_6.2_x64.vhd.bz2 webserver:/var/www/html/templates/\n" +"" +msgstr "" + diff --git a/docs/pot/increase-management-server-max-memory.pot b/docs/pot/increase-management-server-max-memory.pot new file mode 100644 index 000000000..77e2d5862 --- /dev/null +++ b/docs/pot/increase-management-server-max-memory.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Increase Management Server Maximum Memory" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the Management Server is subject to high demand, the default maximum JVM memory allocation can be insufficient. To increase the memory:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Edit the Tomcat configuration file:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "/etc/cloud/management/tomcat6.conf" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Change the command-line parameter -XmxNNNm to a higher value of N." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For example, if the current value is -Xmx128m, change it to -Xmx1024m or higher." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To put the new setting into effect, restart the Management Server." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service cloud-management restart" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more information about memory issues, see \"FAQ: Memory\" at Tomcat Wiki." +msgstr "" + diff --git a/docs/pot/incremental-snapshots-backup.pot b/docs/pot/incremental-snapshots-backup.pot new file mode 100644 index 000000000..8bf7ddbbe --- /dev/null +++ b/docs/pot/incremental-snapshots-backup.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Incremental Snapshots and Backup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Snapshots are created on primary storage where a disk resides. After a snapshot is created, it is immediately backed up to secondary storage and removed from primary storage for optimal utilization of space on primary storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; does incremental backups for some hypervisors. When incremental backups are supported, every N backup is a full backup." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VMware vSphere" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Citrix XenServer" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "KVM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Support incremental backup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "N" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Y" +msgstr "" + diff --git a/docs/pot/initial-setup-of-external-firewalls-loadbalancers.pot b/docs/pot/initial-setup-of-external-firewalls-loadbalancers.pot new file mode 100644 index 000000000..1534cbafb --- /dev/null +++ b/docs/pot/initial-setup-of-external-firewalls-loadbalancers.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Initial Setup of External Firewalls and Load Balancers" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When the first VM is created for a new account, &PRODUCT; programs the external firewall and load balancer to work with the VM. The following objects are created on the firewall:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A new logical interface to connect to the account's private VLAN. The interface IP is always the first IP of the account's private subnet (e.g. 10.1.1.1)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A source NAT rule that forwards all outgoing traffic from the account's private VLAN to the public Internet, using the account's public IP address as the source address" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A firewall filter counter that measures the number of bytes of outgoing traffic for the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following objects are created on the load balancer:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A new VLAN that matches the account's provisioned Zone VLAN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A self IP for the VLAN. This is always the second IP of the account's private subnet (e.g. 10.1.1.2)." +msgstr "" + diff --git a/docs/pot/initialize-and-test.pot b/docs/pot/initialize-and-test.pot new file mode 100644 index 000000000..f6a88b918 --- /dev/null +++ b/docs/pot/initialize-and-test.pot @@ -0,0 +1,100 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Initialize and Test" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After everything is configured, &PRODUCT; will perform its initialization. This can take 30 minutes or more, depending on the speed of your network. When the initialization has completed successfully, the administrator's Dashboard should be displayed in the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Verify that the system is ready. In the left navigation bar, select Templates. Click on the CentOS 5.5 (64bit) no Gui (KVM) template. Check to be sure that the status is \"Download Complete.\" Do not proceed to the next step until this status is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Go to the Instances tab, and filter by My Instances." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add Instance and follow the steps in the wizard." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose the zone you just added." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the template selection, choose the template to use in the VM. If this is a fresh installation, likely only the provided CentOS template is available." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select a service offering. Be sure that the hardware you have allows starting the selected service offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In data disk offering, if desired, add another data disk. This is a second volume that will be available to but not mounted in the guest. For example, in Linux on XenServer you will see /dev/xvdb in the guest after rebooting the VM. A reboot is not required if you have a PV-enabled OS kernel in use." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In default network, choose the primary network for the guest. In a trial installation, you would have only one option here." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Optionally give your VM a name and a group. Use any descriptive text you would like." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Launch VM. Your VM will be created and started. It might take some time to download the template and complete the VM startup. You can watch the VM’s progress in the Instances screen." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To use the VM, click the View Console button. ConsoleButton.png: button to launch a console " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Congratulations! You have successfully completed a &PRODUCT; Installation." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you decide to grow your deployment, you can add more hosts, primary storage, zones, pods, and clusters." +msgstr "" + diff --git a/docs/pot/install-usage-server.pot b/docs/pot/install-usage-server.pot new file mode 100644 index 000000000..7a82178dd --- /dev/null +++ b/docs/pot/install-usage-server.pot @@ -0,0 +1,106 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Installing the Usage Server (Optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can optionally install the Usage Server once the Management Server is configured properly. The Usage Server takes data from the events in the system and enables usage-based billing for accounts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When multiple Management Servers are present, the Usage Server may be installed on any number of them. The Usage Servers will coordinate usage processing. A site that is concerned about availability should install Usage Servers on at least two Management Servers." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Requirements for Installing the Usage Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Server must be running when the Usage Server is installed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Usage Server must be installed on the same server as a Management Server." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Steps to Install the Usage Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run ./install.sh." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"# ./install.sh\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You should see a few messages as the installer prepares, followed by a list of choices." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose \"S\" to install the Usage Server." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +" > S\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Once installed, start the Usage Server with the following command." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"# service cloud-usage start\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Administration Guide discusses further configuration of the Usage Server." +msgstr "" + diff --git a/docs/pot/installation-complete.pot b/docs/pot/installation-complete.pot new file mode 100644 index 000000000..a2a7eb2a4 --- /dev/null +++ b/docs/pot/installation-complete.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Installation Complete! Next Steps" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Congratulations! You have now installed &PRODUCT; Management Server and the database it uses to persist system data." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "What should you do next?" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Even without adding any cloud infrastructure, you can run the UI to get a feel for what's offered and how you will interact with &PRODUCT; on an ongoing basis. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you're ready, add the cloud infrastructure and try running some virtual machines on it, so you can watch how &PRODUCT; manages the infrastructure. See ." +msgstr "" + diff --git a/docs/pot/installation-steps-overview.pot b/docs/pot/installation-steps-overview.pot new file mode 100644 index 000000000..43c22e135 --- /dev/null +++ b/docs/pot/installation-steps-overview.pot @@ -0,0 +1,110 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Overview of Installation Steps" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For anything more than a simple trial installation, you will need guidance for a variety of configuration choices. It is strongly recommended that you read the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choosing a Deployment Architecture" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choosing a Hypervisor: Supported Features" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network Setup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Storage Setup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Best Practices" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure you have the required hardware ready. See " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install the Management Server (choose single-node or multi-node). See " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the UI. See " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add a zone. Includes the first pod, cluster, and host. See " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add more pods (optional). See " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add more clusters (optional). See " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add more hosts (optional). See " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add more primary storage (optional). See " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add more secondary storage (optional). See " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Try using the cloud. See " +msgstr "" + diff --git a/docs/pot/installation.pot b/docs/pot/installation.pot new file mode 100644 index 000000000..1d572b028 --- /dev/null +++ b/docs/pot/installation.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Installation" +msgstr "" + diff --git a/docs/pot/installation_steps_overview.pot b/docs/pot/installation_steps_overview.pot new file mode 100644 index 000000000..c3a7186e4 --- /dev/null +++ b/docs/pot/installation_steps_overview.pot @@ -0,0 +1,135 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Overview of Installation Steps" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For anything more than a simple trial installation, you will need guidance for a variety of configuration choices. It is strongly recommended that you read the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choosing a Deployment Architecture" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choosing a Hypervisor: Supported Features" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network Setup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Storage Setup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Best Practices" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Prepare" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure you have the required hardware ready" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) Fill out the preparation checklists" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install the &PRODUCT; software" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install the Management Server (choose single-node or multi-node)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the UI" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provision your cloud infrastructure" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add a zone. Includes the first pod, cluster, and host" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add more pods" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add more clusters" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add more hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add more primary storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add more secondary storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Try using the cloud" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Initialization and testing" +msgstr "" + diff --git a/docs/pot/inter-vlan-routing.pot b/docs/pot/inter-vlan-routing.pot new file mode 100644 index 000000000..d65e88e48 --- /dev/null +++ b/docs/pot/inter-vlan-routing.pot @@ -0,0 +1,120 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "About Inter-VLAN Routing" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Inter-VLAN Routing is the capability to route network traffic between VLANs. This feature enables you to build Virtual Private Clouds (VPC), an isolated segment of your cloud, that can hold multi-tier applications. These tiers are deployed on different VLANs that can communicate with each other. You provision VLANs to the tiers your create, and VMs can be deployed on different tiers. The VLANs are connected to a virtual router, which facilitates communication between the VMs. In effect, you can segment VMs by means of VLANs into different networks that can host multi-tier applications, such as Web, Application, or Database. Such segmentation by means of VLANs logically separate application VMs for higher security and lower broadcasts, while remaining physically connected to the same device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This feature is supported on XenServer and VMware hypervisors." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The major advantages are:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The administrator can deploy a set of VLANs and allow users to deploy VMs on these VLANs. A guest VLAN is randomly alloted to an account from a pre-specified set of guest VLANs. All the VMs of a certain tier of an account reside on the guest VLAN allotted to that account." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A VLAN allocated for an account cannot be shared between multiple accounts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The administrator can allow users create their own VPC and deploy the application. In this scenario, the VMs that belong to the account are deployed on the VLANs allotted to that account." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Both administrators and users can create multiple VPCs. The guest network NIC is plugged to the VPC virtual router when the first VM is deployed in a tier." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The administrator can create the following gateways to send to or receive traffic from the VMs:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPN Gateway: For more information, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public Gateway: The public gateway for a VPC is added to the virtual router when the virtual router is created for VPC. The public gateway is not exposed to the end users. You are not allowed to list it, nor allowed to create any static routes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Private Gateway: For more information, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Both administrators and users can create various possible destinations-gateway combinations. However, only one gateway of each type can be used in a deployment." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For example:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLANs and Public Gateway: For example, an application is deployed in the cloud, and the Web application VMs communicate with the Internet." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLANs, VPN Gateway, and Public Gateway: For example, an application is deployed in the cloud; the Web application VMs communicate with the Internet; and the database VMs communicate with the on-premise devices." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The administrator can define Access Control List (ACL) on the virtual router to filter the traffic among the VLANs or between the Internet and a VLAN. You can define ACL based on CIDR, port range, protocol, type code (if ICMP protocol is selected) and Ingress/Egress type." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following figure shows the possible deployment scenarios of a Inter-VLAN setup:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To set up a multi-tier Inter-VLAN deployment, see ." +msgstr "" + diff --git a/docs/pot/introduction.pot b/docs/pot/introduction.pot new file mode 100644 index 000000000..d5ae7911e --- /dev/null +++ b/docs/pot/introduction.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Introduction" +msgstr "" + diff --git a/docs/pot/ip-forwarding-firewalling.pot b/docs/pot/ip-forwarding-firewalling.pot new file mode 100644 index 000000000..d4aeefa0d --- /dev/null +++ b/docs/pot/ip-forwarding-firewalling.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "IP Forwarding and Firewalling" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "By default, all incoming traffic to the public IP address is rejected. All outgoing traffic from the guests is translated via NAT to the public IP address and is allowed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To allow incoming traffic, users may set up firewall rules and/or port forwarding rules. For example, you can use a firewall rule to open a range of ports on the public IP address, such as 33 through 44. Then use port forwarding rules to direct traffic from individual ports within that range to specific ports on user VMs. For example, one port forwarding rule could route incoming traffic on the public IP's port 33 to port 100 on one user VM's private IP." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For the steps to implement these rules, see Firewall Rules and Port Forwarding." +msgstr "" + diff --git a/docs/pot/ip-load-balancing.pot b/docs/pot/ip-load-balancing.pot new file mode 100644 index 000000000..ef46d00ae --- /dev/null +++ b/docs/pot/ip-load-balancing.pot @@ -0,0 +1,55 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "IP Load Balancing" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The user may choose to associate the same public IP for multiple guests. &PRODUCT; implements a TCP-level load balancer with the following policies." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Round-robin" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Least connection" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Source IP" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This is similar to port forwarding but the destination may be multiple IP addresses." +msgstr "" + diff --git a/docs/pot/ipaddress-usage-record-format.pot b/docs/pot/ipaddress-usage-record-format.pot new file mode 100644 index 000000000..99a0044cc --- /dev/null +++ b/docs/pot/ipaddress-usage-record-format.pot @@ -0,0 +1,95 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "IP Address Usage Record Format" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For IP address usage the following fields exist in a usage record." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "account - name of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "accountid - ID of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "domainid - ID of the domain in which this account resides" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "zoneid - Zone where the usage occurred" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "description - A string describing what the usage record is tracking" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usage - String representation of the usage, including the units of usage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usagetype - A number representing the usage type (see Usage Types)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "rawusage - A number representing the actual usage in hours" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usageid - IP address ID" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "startdate, enddate - The range of time for which the usage is aggregated; see Dates in the Usage Record" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "issourcenat - Whether source NAT is enabled for the IP address" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "iselastic - True if the IP address is elastic." +msgstr "" + diff --git a/docs/pot/isolated-networks.pot b/docs/pot/isolated-networks.pot new file mode 100644 index 000000000..0e550ba64 --- /dev/null +++ b/docs/pot/isolated-networks.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Isolated Networks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "An isolated network can be accessed only by virtual machines of a single account. Isolated networks have the following properties." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Resources such as VLAN are allocated and garbage collected dynamically" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There is one network offering for the entire network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The network offering can be upgraded or downgraded but it is for the entire network" +msgstr "" + diff --git a/docs/pot/job-status.pot b/docs/pot/job-status.pot new file mode 100644 index 000000000..8e27d84b2 --- /dev/null +++ b/docs/pot/job-status.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Job Status" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The key to using an asynchronous command is the job ID that is returned immediately once the command has been executed. With the job ID, you can periodically check the job status by making calls to queryAsyncJobResult command. The command will return three possible job status integer values:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "0 - Job is still in progress. Continue to periodically poll for any status changes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "1 - Job has successfully completed. The job will return any successful response values associated with command that was originally executed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "2 - Job has failed to complete. Please check the \"jobresultcode\" tag for failure reason code and \"jobresult\" for the failure reason." +msgstr "" + diff --git a/docs/pot/kvm-topology-req.pot b/docs/pot/kvm-topology-req.pot new file mode 100644 index 000000000..6b6752448 --- /dev/null +++ b/docs/pot/kvm-topology-req.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "KVM Topology Requirements" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Servers communicate with KVM hosts on port 22 (ssh)." +msgstr "" + diff --git a/docs/pot/large_scale_redundant_setup.pot b/docs/pot/large_scale_redundant_setup.pot new file mode 100644 index 000000000..ccfbde45a --- /dev/null +++ b/docs/pot/large_scale_redundant_setup.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Large-Scale Redundant Setup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This diagram illustrates the network architecture of a large-scale &PRODUCT; deployment." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A layer-3 switching layer is at the core of the data center. A router redundancy protocol like VRRP should be deployed. Typically high-end core switches also include firewall modules. Separate firewall appliances may also be used if the layer-3 switch does not have integrated firewall capabilities. The firewalls are configured in NAT mode. The firewalls provide the following functions:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Forwards HTTP requests and API calls from the Internet to the Management Server. The Management Server resides on the management network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When the cloud spans multiple zones, the firewalls should enable site-to-site VPN such that servers in different zones can directly reach each other." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A layer-2 access switch layer is established for each pod. Multiple switches can be stacked to increase port count. In either case, redundant pairs of layer-2 switches should be deployed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Server cluster (including front-end load balancers, Management Server nodes, and the MySQL database) is connected to the management network through a pair of load balancers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Secondary storage servers are connected to the management network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Each pod contains storage and computing servers. Each storage and computing server should have redundant NICs connected to separate layer-2 access switches." +msgstr "" + diff --git a/docs/pot/layer2-switch.pot b/docs/pot/layer2-switch.pot new file mode 100644 index 000000000..8eab8f7e0 --- /dev/null +++ b/docs/pot/layer2-switch.pot @@ -0,0 +1,55 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Layer-2 Switch" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The layer-2 switch is the access switching layer inside the pod." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "It should trunk all VLANs into every computing host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "It should switch traffic for the management network containing computing and storage hosts. The layer-3 switch will serve as the gateway for the management network." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Example Configurations" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This section contains example configurations for specific switch models for pod-level layer-2 switching. It assumes VLAN management protocols such as VTP or GVRP have been disabled. The scripts must be changed appropriately if you choose to use VTP or GVRP." +msgstr "" + diff --git a/docs/pot/lb-policy-pfwd-rule-usage-record-format.pot b/docs/pot/lb-policy-pfwd-rule-usage-record-format.pot new file mode 100644 index 000000000..4fe042f32 --- /dev/null +++ b/docs/pot/lb-policy-pfwd-rule-usage-record-format.pot @@ -0,0 +1,80 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Load Balancer Policy or Port Forwarding Rule Usage Record Format" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "account - name of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "accountid - ID of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "domainid - ID of the domain in which this account resides" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "zoneid - Zone where the usage occurred" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "description - A string describing what the usage record is tracking" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usage - String representation of the usage, including the units of usage (e.g. 'Hrs' for hours)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usagetype - A number representing the usage type (see Usage Types)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "rawusage - A number representing the actual usage in hours" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usageid - ID of the load balancer policy or port forwarding rule" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "startdate, enddate - The range of time for which the usage is aggregated; see Dates in the Usage Record" +msgstr "" + diff --git a/docs/pot/linux-installation.pot b/docs/pot/linux-installation.pot new file mode 100644 index 000000000..495d96b97 --- /dev/null +++ b/docs/pot/linux-installation.pot @@ -0,0 +1,101 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Linux OS Installation" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use the following steps to begin the Linux OS installation:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Download the script file cloud-set-guest-password:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Linux: " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Windows: " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Copy this file to /etc/init.d." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On some Linux distributions, copy the file to /etc/rc.d/init.d." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following command to make the script executable:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "chmod +x /etc/init.d/cloud-set-guest-password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Depending on the Linux distribution, continue with the appropriate step." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On Fedora, CentOS/RHEL, and Debian, run:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "chkconfig --add cloud-set-guest-password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On Ubuntu with VMware tools, link the script file to the /etc/network/if-up and /etc/network/if-down folders, and run the script:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "#ln -s /etc/init.d/cloud-set-guest-password /etc/network/if-up/cloud-set-guest-password\n" +" #ln -s /etc/init.d/cloud-set-guest-password /etc/network/if-down/cloud-set-guest-password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are using Ubuntu 11.04, start by creating a directory called /var/lib/dhcp3 on your Ubuntu machine (works around a known issue with this version of Ubuntu). On all Ubuntu versions: Run “sudo update-rc.d cloud-set-guest-password defaults 98â€. To test, run \"mkpasswd\" and check that it is generating a new password. If the “mkpasswd†command does not exist, run \"sudo apt-get install whois\" (or sudo apt-get install mkpasswd, depending on your Ubuntu version) and repeat." +msgstr "" + diff --git a/docs/pot/load-balancer-rules.pot b/docs/pot/load-balancer-rules.pot new file mode 100644 index 000000000..ac3cd6440 --- /dev/null +++ b/docs/pot/load-balancer-rules.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Load Balancer Rules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A &PRODUCT; user or administrator may create load balancing rules that balance traffic received at a public IP to one or more VMs. A user creates a rule, specifies an algorithm, and assigns the rule to a set of VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you create load balancing rules while using a network service offering that includes an external load balancer device such as NetScaler, and later change the network service offering to one that uses the &PRODUCT; virtual router, you must create a firewall rule on the virtual router for each of your existing load balancing rules so that they continue to function." +msgstr "" + diff --git a/docs/pot/log-in-root-admin.pot b/docs/pot/log-in-root-admin.pot new file mode 100644 index 000000000..08484eb3c --- /dev/null +++ b/docs/pot/log-in-root-admin.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Logging In as the Root Administrator" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After the Management Server software is installed and running, you can run the &PRODUCT; user interface. This UI is there to help you provision, view, and manage your cloud infrastructure." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Open your favorite Web browser and go to this URL. Substitute the IP address of your own Management Server:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "http://<management-server-ip-address>:8080/client" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After logging into a fresh Management Server installation, a guided tour splash screen appears. On later visits, you’ll be taken directly into the Dashboard." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you see the first-time splash screen, choose one of the following." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Continue with basic setup. Choose this if you're just trying &PRODUCT;, and you want a guided walkthrough of the simplest possible configuration so that you can get started right away. We'll help you set up a cloud with the following features: a single machine that runs &PRODUCT; software and uses NFS to provide storage; a single machine running VMs under the XenServer or KVM hypervisor; and a shared public network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The prompts in this guided tour should give you all the information you need, but if you want just a bit more detail, you can follow along in the Trial Installation Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "I have used &PRODUCT; before. Choose this if you have already gone through a design phase and planned a more sophisticated deployment, or you are ready to start scaling up a trial cloud that you set up earlier with the basic setup screens. In the Administrator UI, you can start using the more powerful features of &PRODUCT;, such as advanced VLAN networking, high availability, additional network elements such as load balancers and firewalls, and support for multiple hypervisors including Citrix XenServer, KVM, and VMware vSphere." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The root administrator Dashboard appears." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You should set a new root administrator password. If you chose basic setup, you’ll be prompted to create a new password right away. If you chose experienced user, use the steps in ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You are logging in as the root administrator. This account manages the &PRODUCT; deployment, including physical infrastructure. The root administrator can modify configuration settings to change basic functionality, create or delete user accounts, and take many actions that should be performed only by an authorized person. Please change the default password to a new, unique password." +msgstr "" + diff --git a/docs/pot/log-in.pot b/docs/pot/log-in.pot new file mode 100644 index 000000000..2faf14b17 --- /dev/null +++ b/docs/pot/log-in.pot @@ -0,0 +1,90 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Log In to the UI" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; provides a web-based UI that can be used by both administrators and end users. The appropriate version of the UI is displayed depending on the credentials used to log in. The UI is available in popular browsers including IE7, IE8, IE9, Firefox 3.5+, Firefox 4, Safari 4, and Safari 5. The URL is: (substitute your own management server IP address)" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "http://<management-server-ip-address>:8080/client" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On a fresh Management Server installation, a guided tour splash screen appears. On later visits, you’ll see a login screen where you specify the following to proceed to your Dashboard:" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Username" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The user ID of your account. The default username is admin." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The password associated with the user ID. The password for the default username is password." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Domain" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are a root user, leave this field blank." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are a user in the sub-domains, enter the full path to the domain, excluding the root domain." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For example, suppose multiple levels are created under the root domain, such as Comp1/hr. The users in the Comp1 domain should enter Comp1 in the Domain field, whereas the users in the Comp1/sales domain should enter Comp1/sales." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more guidance about the choices that appear when you log in to this UI, see Logging In as the Root Administrator." +msgstr "" + diff --git a/docs/pot/long-running-job-events.pot b/docs/pot/long-running-job-events.pot new file mode 100644 index 000000000..ecb39473a --- /dev/null +++ b/docs/pot/long-running-job-events.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Long Running Job Events" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The events log records three types of standard events." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "INFO. This event is generated when an operation has been successfully performed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "WARN. This event is generated in the following circumstances." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a network is disconnected while monitoring a template download." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a template download is abandoned." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When an issue on the storage server causes the volumes to fail over to the mirror storage server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ERROR. This event is generated when an operation has not been successfully performed" +msgstr "" + diff --git a/docs/pot/maintain-hypervisors-on-hosts.pot b/docs/pot/maintain-hypervisors-on-hosts.pot new file mode 100644 index 000000000..5acc8771d --- /dev/null +++ b/docs/pot/maintain-hypervisors-on-hosts.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Maintaining Hypervisors on Hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When running hypervisor software on hosts, be sure all the hotfixes provided by the hypervisor vendor are applied. Track the release of hypervisor patches through your hypervisor vendor’s support channel, and apply patches as soon as possible after they are released. &PRODUCT; will not track or notify you of required hypervisor patches. It is essential that your hosts are completely up to date with the provided hypervisor patches. The hypervisor vendor is likely to refuse to support any system that is not up to date with patches." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The lack of up-do-date hotfixes can lead to data corruption and lost VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(XenServer) For more information, see Highly Recommended Hotfixes for XenServer in the &PRODUCT; Knowledge Base" +msgstr "" + diff --git a/docs/pot/maintenance-mode-for-primary-storage.pot b/docs/pot/maintenance-mode-for-primary-storage.pot new file mode 100644 index 000000000..85363ce57 --- /dev/null +++ b/docs/pot/maintenance-mode-for-primary-storage.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Maintenance Mode for Primary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Primary storage may be placed into maintenance mode. This is useful, for example, to replace faulty RAM in a storage device. Maintenance mode for a storage device will first stop any new guests from being provisioned on the storage device. Then it will stop all guests that have any volume on that storage device. When all such guests are stopped the storage device is in maintenance mode and may be shut down. When the storage device is online again you may cancel maintenance mode for the device. The &PRODUCT; will bring the device back online and attempt to start all guests that were running at the time of the entry into maintenance mode." +msgstr "" + diff --git a/docs/pot/making-api-request.pot b/docs/pot/making-api-request.pot new file mode 100644 index 000000000..a3faea0b6 --- /dev/null +++ b/docs/pot/making-api-request.pot @@ -0,0 +1,105 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Making API Requests" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All &PRODUCT; API requests are submitted in the form of a HTTP GET/POST with an associated command and any parameters. A request is composed of the following whether in HTTP or HTTPS:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; API URL: This is the web services API entry point(for example, http://www.cloud.com:8080/client/api)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Command: The web services command you wish to execute, such as start a virtual machine or create a disk volume" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Parameters: Any additional required or optional parameters for the command" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A sample API GET request looks like the following:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "http://localhost:8080/client/api?command=deployVirtualMachine&serviceOfferingId=1&diskOfferingId=1&templateId=2&zoneId=4&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Or in a more readable format:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"1. http://localhost:8080/client/api\n" +"2. ?command=deployVirtualMachine\n" +"3. &serviceOfferingId=1\n" +"4. &diskOfferingId=1\n" +"5. &templateId=2\n" +"6. &zoneId=4\n" +"7. &apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXqjB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ\n" +"8. &signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The first line is the &PRODUCT; API URL. This is the Cloud instance you wish to interact with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The second line refers to the command you wish to execute. In our example, we are attempting to deploy a fresh new virtual machine. It is preceded by a (?) to separate itself from the &PRODUCT; API URL." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Lines 3-6 are the parameters for this given command. To see the command and its request parameters, please refer to the appropriate section in the &PRODUCT; API documentation. Each parameter field-value pair (field=value) is preceded by an ampersand character (&)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Line 7 is the user API Key that uniquely identifies the account. See Signing API Requests on page 7." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Line 8 is the signature hash created to authenticate the user account executing the API command. See Signing API Requests on page 7." +msgstr "" + diff --git a/docs/pot/manage-cloud.pot b/docs/pot/manage-cloud.pot new file mode 100644 index 000000000..a263fef34 --- /dev/null +++ b/docs/pot/manage-cloud.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Managing the Cloud" +msgstr "" + diff --git a/docs/pot/management-server-install-client.pot b/docs/pot/management-server-install-client.pot new file mode 100644 index 000000000..e663f7f21 --- /dev/null +++ b/docs/pot/management-server-install-client.pot @@ -0,0 +1,95 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Install the Management Server on the First Host" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The first step in installation, whether you are installing the Management Server on one host or many, is to install the software on a single node." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are planning to install the Management Server on multiple nodes for high availability, do not proceed to the additional nodes yet. That step will come later." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; Management server can be installed using either RPM or DEB packages. These packages will depend on everything you need to run the Management server." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Downloading vhd-util" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This procedure is required only for installations where XenServer is installed on the hypervisor hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Before setting up the Management Server, download vhd-util from vhd-util." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the Management Server is RHEL or CentOS, copy vhd-util to /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the Management Server is Ubuntu, copy vhd-util to /usr/lib/cloud/common/scripts/vm/hypervisor/xenserver/vhd-util." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Install on CentOS/RHEL" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "We start by installing the required packages:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "yum install cloud-client" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Install on Ubuntu" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "apt-get install cloud-client" +msgstr "" + diff --git a/docs/pot/management-server-install-complete.pot b/docs/pot/management-server-install-complete.pot new file mode 100644 index 000000000..a171be6f1 --- /dev/null +++ b/docs/pot/management-server-install-complete.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Installation Complete! Next Steps" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Congratulations! You have now installed &PRODUCT; Management Server and the database it uses to persist system data." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "What should you do next?" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Even without adding any cloud infrastructure, you can run the UI to get a feel for what's offered and how you will interact with &PRODUCT; on an ongoing basis. See Log In to the UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you're ready, add the cloud infrastructure and try running some virtual machines on it, so you can watch how &PRODUCT; manages the infrastructure. See Provision Your Cloud Infrastructure." +msgstr "" + diff --git a/docs/pot/management-server-install-db-external.pot b/docs/pot/management-server-install-db-external.pot new file mode 100644 index 000000000..7b0f6474c --- /dev/null +++ b/docs/pot/management-server-install-db-external.pot @@ -0,0 +1,219 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Install the Database on a Separate Node" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This section describes how to install MySQL on a standalone machine, separate from the Management Server. This technique is intended for a deployment that includes several Management Server nodes. If you have a single-node Management Server deployment, you will typically use the same node for MySQL. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The management server doesn't require a specific distribution for the MySQL node. You can use a distribution or Operating System of your choice. Using the same distribution as the management server is recommended, but not required. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install MySQL from the package repository from your distribution:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On RHEL or CentOS:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "yum install mysql-server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On Ubuntu:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "apt-get install mysql-server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Edit the MySQL configuration (/etc/my.cnf or /etc/mysql/my.cnf, depending on your OS) and insert the following lines in the [mysqld] section. You can put these lines below the datadir line. The max_connections parameter should be set to 350 multiplied by the number of Management Servers you are deploying. This example assumes two Management Servers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On Ubuntu, you can also create /etc/mysql/conf.d/cloudstack.cnf file and add these directives there. Don't forget to add [mysqld] on the first line of the file." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "innodb_rollback_on_timeout=1\n" +"innodb_lock_wait_timeout=600\n" +"max_connections=700\n" +"log-bin=mysql-bin\n" +"binlog-format = 'ROW'\n" +"bind-address = 0.0.0.0" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start or restart MySQL to put the new configuration into effect." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On RHEL/CentOS, MySQL doesn't automatically start after installation. Start it manually." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "service mysqld start" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On Ubuntu, restart MySQL." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "service mysqld restart" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(CentOS and RHEL only; not required on Ubuntu)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On RHEL and CentOS, MySQL does not set a root password by default. It is very strongly recommended that you set a root password as a security precaution." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following command to secure your installation. You can answer \"Y\" to all questions except \"Disallow root login remotely?\". Remote root login is required to set up the databases." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "mysql_secure_installation" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If a firewall is present on the system, open TCP port 3306 so external MySQL connections can be established." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On Ubuntu, UFW is the default firewall. Open the port with this command:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "ufw allow mysql" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On RHEL/CentOS:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Edit the /etc/sysconfig/iptables file and add the following line at the beginning of the INPUT chain." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "-A INPUT -p tcp --dport 3306 -j ACCEPT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now reload the iptables rules." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "service iptables restart" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Return to the root shell on your first Management Server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set up the database. The following command creates the cloud user on the database." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In dbpassword, specify the password to be assigned to the cloud user. You can choose to provide no password." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In deploy-as, specify the username and password of the user deploying the database. In the following command, it is assumed the root user is deploying the database and creating the cloud user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) For encryption_type, use file or web to indicate the technique used to pass in the database encryption password. Default: file. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) For management_server_key, substitute the default key that is used to encrypt confidential parameters in the &PRODUCT; properties file. Default: password. It is highly recommended that you replace this with a more secure value. See About Password and Key Encryption." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) For database_key, substitute the default key that is used to encrypt confidential parameters in the &PRODUCT; database. Default: password. It is highly recommended that you replace this with a more secure value. See ." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "cloud-setup-databases cloud:<dbpassword>@<ip address mysql server> \\\n" +"--deploy-as=root:<password> \\\n" +"-e <encryption_type> \\\n" +"-m <management_server_key> \\\n" +"-k <database_key>" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When this script is finished, you should see a message like “Successfully initialized the database.â€" +msgstr "" + diff --git a/docs/pot/management-server-install-db-local.pot b/docs/pot/management-server-install-db-local.pot new file mode 100644 index 000000000..36af4d0ff --- /dev/null +++ b/docs/pot/management-server-install-db-local.pot @@ -0,0 +1,198 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Install the Database on the Management Server Node" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This section describes how to install MySQL on the same machine with the Management Server. This technique is intended for a simple deployment that has a single Management Server node. If you have a multi-node Management Server deployment, you will typically use a separate node for MySQL. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install MySQL from the package repository from your distribution:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On RHEL or CentOS:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "yum install mysql-server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On Ubuntu:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "apt-get install mysql-server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Edit the MySQL configuration (/etc/my.cnf or /etc/mysql/my.cnf, depending on your OS) and insert the following lines in the [mysqld] section. You can put these lines below the datadir line. The max_connections parameter should be set to 350 multiplied by the number of Management Servers you are deploying. This example assumes one Management Server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On Ubuntu, you can also create a file /etc/mysql/conf.d/cloudstack.cnf and add these directives there. Don't forget to add [mysqld] on the first line of the file." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "innodb_rollback_on_timeout=1\n" +"innodb_lock_wait_timeout=600\n" +"max_connections=350\n" +"log-bin=mysql-bin\n" +"binlog-format = 'ROW'" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start or restart MySQL to put the new configuration into effect." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On RHEL/CentOS, MySQL doesn't automatically start after installation. Start it manually." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "service mysqld start" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On Ubuntu, restart MySQL." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "service mysqld restart" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(CentOS and RHEL only; not required on Ubuntu)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On RHEL and CentOS, MySQL does not set a root password by default. It is very strongly recommended that you set a root password as a security precaution." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following command to secure your installation. You can answer \"Y\" to all questions." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "mysql_secure_installation" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set up the database. The following command creates the \"cloud\" user on the database." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In dbpassword, specify the password to be assigned to the \"cloud\" user. You can choose to provide no password although that is not recommended." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In deploy-as, specify the username and password of the user deploying the database. In the following command, it is assumed the root user is deploying the database and creating the \"cloud\" user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) For encryption_type, use file or web to indicate the technique used to pass in the database encryption password. Default: file. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) For management_server_key, substitute the default key that is used to encrypt confidential parameters in the &PRODUCT; properties file. Default: password. It is highly recommended that you replace this with a more secure value. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) For database_key, substitute the default key that is used to encrypt confidential parameters in the &PRODUCT; database. Default: password. It is highly recommended that you replace this with a more secure value. See ." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "cloud-setup-databases cloud:<dbpassword>@localhost \\\n" +"--deploy-as=root:<password> \\\n" +"-e <encryption_type> \\\n" +"-m <management_server_key> \\\n" +"-k <database_key>" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When this script is finished, you should see a message like “Successfully initialized the database.â€" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are running the KVM hypervisor on the same machine with the Management Server, edit /etc/sudoers and add the following line:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "Defaults:cloud !requiretty" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This type of single-machine setup is recommended only for a trial installation." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now that the database is set up, you can finish configuring the OS for the Management Server. This command will set up iptables, sudoers, and start the Management Server." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# cloud-setup-management" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You should see the message “&PRODUCT; Management Server setup is done.â€" +msgstr "" + diff --git a/docs/pot/management-server-install-db.pot b/docs/pot/management-server-install-db.pot new file mode 100644 index 000000000..cca61e42a --- /dev/null +++ b/docs/pot/management-server-install-db.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Install the database server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; management server uses a MySQL database server to store its data. When you are installing the management server on a single node, you can install the MySQL server locally. For an installation that has multiple management server nodes, we assume the MySQL database also runs on a separate node." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; has been tested with MySQL 5.1 and 5.5. These versions are included in RHEL/CentOS and Ubuntu." +msgstr "" + diff --git a/docs/pot/management-server-install-flow.pot b/docs/pot/management-server-install-flow.pot new file mode 100644 index 000000000..43c2a0cc6 --- /dev/null +++ b/docs/pot/management-server-install-flow.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Management Server Installation" +msgstr "" + diff --git a/docs/pot/management-server-install-multi-node.pot b/docs/pot/management-server-install-multi-node.pot new file mode 100644 index 000000000..22d80b6f2 --- /dev/null +++ b/docs/pot/management-server-install-multi-node.pot @@ -0,0 +1,110 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Prepare and Start Additional Management Servers" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For your second and subsequent Management Servers, you will install the Management Server software, connect it to the database, and set up the OS for the Management Server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Perform the steps in and or as appropriate." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This step is required only for installations where XenServer is installed on the hypervisor hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Download vhd-util from vhd-util" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the Management Server is RHEL or CentOS, copy vhd-util to /usr/lib64/cloud/common/scripts/vm/hypervisor/xenserver." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the Management Server is Ubuntu, copy vhd-util to /usr/lib/cloud/common/scripts/vm/hypervisor/xenserver/vhd-util." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that necessary services are started and set to start on boot." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service rpcbind start\n" +"# service nfs start\n" +"# chkconfig nfs on\n" +"# chkconfig rpcbind on\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure the database client. Note the absence of the --deploy-as argument in this case. (For more details about the arguments to this command, see .)" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# cloud-setup-databases cloud:dbpassword@dbhost -e encryption_type -m management_server_key -k database_key\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure the OS and start the Management Server:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# cloud-setup-management" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Server on this node should now be running." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Repeat these steps on each additional Management Server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Be sure to configure a load balancer for the Management Servers. See Management Server Load Balancing." +msgstr "" + diff --git a/docs/pot/management-server-install-nfs-shares.pot b/docs/pot/management-server-install-nfs-shares.pot new file mode 100644 index 000000000..b269c4955 --- /dev/null +++ b/docs/pot/management-server-install-nfs-shares.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:58\n" +"PO-Revision-Date: 2013-02-02T20:11:58\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Prepare NFS Shares" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; needs a place to keep primary and secondary storage (see Cloud Infrastructure Overview). Both of these can be NFS shares. This section tells how to set up the NFS shares before adding the storage to &PRODUCT;." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Alternative Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NFS is not the only option for primary or secondary storage. For example, you may use a Ceph RDB cluster, GlusterFS, iSCSI, and otthers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The requirements for primary and secondary storage are described in:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A production installation typically uses a separate NFS server. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can also use the Management Server node as the NFS server. This is more typical of a trial installation, but is technically possible in a larger deployment. See ." +msgstr "" + diff --git a/docs/pot/management-server-install-overview.pot b/docs/pot/management-server-install-overview.pot new file mode 100644 index 000000000..5eb764408 --- /dev/null +++ b/docs/pot/management-server-install-overview.pot @@ -0,0 +1,95 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Management Server Installation Overview" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This section describes installing the Management Server. There are two slightly different installation flows, depending on how many Management Server nodes will be in your cloud:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A single Management Server node, with MySQL on the same node." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Multiple Management Server nodes, with MySQL on a node separate from the Management Servers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In either case, each machine must meet the system requirements described in System Requirements." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For the sake of security, be sure the public Internet can not access port 8096 or port 8250 on the Management Server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The procedure for installing the Management Server is:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Prepare the Operating System" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(XenServer only) Download and install vhd-util." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install the First Management Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install and Configure the MySQL database" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Prepare NFS Shares" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Prepare and Start Additional Management Servers (optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Prepare the System VM Template" +msgstr "" + diff --git a/docs/pot/management-server-install-prepare-os.pot b/docs/pot/management-server-install-prepare-os.pot new file mode 100644 index 000000000..e8360ff68 --- /dev/null +++ b/docs/pot/management-server-install-prepare-os.pot @@ -0,0 +1,105 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Prepare the Operating System" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The OS must be prepared to host the Management Server using the following steps. These steps must be performed on each Management Server node." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to your OS as root." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Check for a fully qualified hostname." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "hostname --fqdn" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This should return a fully qualified hostname such as \"managament1.lab.example.org\". If it does not, edit /etc/hosts so that it does." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure that the machine can reach the Internet." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "ping www.cloudstack.org" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Turn on NTP for time synchronization." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NTP is required to synchronize the clocks of the servers in your cloud." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install NTP." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On RHEL or CentOS:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "yum install ntp" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On Ubuntu:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "apt-get install openntpd" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Repeat all of these steps on every host where the Management Server will be installed." +msgstr "" + diff --git a/docs/pot/management-server-install-systemvm.pot b/docs/pot/management-server-install-systemvm.pot new file mode 100644 index 000000000..d6d238c04 --- /dev/null +++ b/docs/pot/management-server-install-systemvm.pot @@ -0,0 +1,111 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Prepare the System VM Template" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Secondary storage must be seeded with a template that is used for &PRODUCT; system VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When copying and pasting a command, be sure the command has pasted as a single line before executing. Some document viewers may introduce unwanted line breaks in copied text." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On the Management Server, run one or more of the following cloud-install-sys-tmplt commands to retrieve and decompress the system VM template. Run the command for each hypervisor type that you expect end users to run in this Zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If your secondary storage mount point is not named /mnt/secondary, substitute your own mount point name." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you set the &PRODUCT; database encryption type to \"web\" when you set up the database, you must now add the parameter -s <management-server-secret-key>. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This process will require approximately 5 GB of free space on the local file system and up to 30 minutes each time it runs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For XenServer:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2 -h xenserver -s <optional-management-server-secret-key> -F" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For vSphere:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/burbank/burbank-systemvm-08012012.ova -h vmware -s <optional-management-server-secret-key> -F" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For KVM:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 -h kvm -s <optional-management-server-secret-key> -F" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are using a separate NFS server, perform this step. If you are using the Management Server as the NFS server, you MUST NOT perform this step." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When the script has finished, unmount secondary storage and remove the created directory." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# umount /mnt/secondary\n" +"# rmdir /mnt/secondary" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Repeat these steps for each secondary storage server." +msgstr "" + diff --git a/docs/pot/management-server-lb.pot b/docs/pot/management-server-lb.pot new file mode 100644 index 000000000..df9ded463 --- /dev/null +++ b/docs/pot/management-server-lb.pot @@ -0,0 +1,105 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Setting Zone VLAN and Running VM Maximums" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; can use a load balancer to provide a virtual IP for multiple Management Servers. The administrator is responsible for creating the load balancer rules for the Management Servers. The application requires persistence or stickiness across multiple sessions. The following chart lists the ports that should be load balanced and whether or not persistence is required." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Even if persistence is not required, enabling it is permitted." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Source Port" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Destination Port" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Protocol" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Persistence Required?" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "80 or 443" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "8080 (or 20400 with AJP)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "HTTP (or AJP)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Yes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "8250" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "TCP" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "8096" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "HTTP" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "No" +msgstr "" + diff --git a/docs/pot/management-server-overview.pot b/docs/pot/management-server-overview.pot new file mode 100644 index 000000000..0f79f5e85 --- /dev/null +++ b/docs/pot/management-server-overview.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Management Server Overview" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Server is the &PRODUCT; software that manages cloud resources. By interacting with the Management Server through its UI or API, you can configure and manage your cloud infrastructure." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Server runs on a dedicated server or VM. It controls allocation of virtual machines to hosts and assigns storage and IP addresses to the virtual machine instances. The Management Server runs in a Tomcat container and requires a MySQL database for persistence." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The machine must meet the system requirements described in System Requirements." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Server:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provides the web user interface for the administrator and a reference user interface for end users." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provides the APIs for &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Manages the assignment of guest VMs to particular hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Manages the assignment of public and private IP addresses to particular accounts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Manages the allocation of storage to guests as virtual disks." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Manages snapshots, templates, and ISO images, possibly replicating them across data centers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provides a single point of configuration for the cloud." +msgstr "" + diff --git a/docs/pot/manual-live-migration.pot b/docs/pot/manual-live-migration.pot new file mode 100644 index 000000000..80043620c --- /dev/null +++ b/docs/pot/manual-live-migration.pot @@ -0,0 +1,95 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Moving VMs Between Hosts (Manual Live Migration)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; administrator can move a running VM from one host to another without interrupting service to users or going into maintenance mode. This is called manual live migration, and can be done under the following conditions:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The root administrator is logged in. Domain admins and users can not perform manual live migration of VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The VM is running. Stopped VMs can not be live migrated." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The destination host must be in the same cluster as the original host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The VM must not be using local disk storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The destination host must have enough available capacity. If not, the VM will remain in the \"migrating\" state until memory becomes available." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To manually live migrate a virtual machine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as a user or admin." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Instances." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose the VM that you want to migrate." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Migrate Instance button Migrateinstance.png: button to migrate an instance " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "From the list of hosts, choose the one to which you want to move the VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK." +msgstr "" + diff --git a/docs/pot/marvin.pot b/docs/pot/marvin.pot new file mode 100644 index 000000000..f693be5c0 --- /dev/null +++ b/docs/pot/marvin.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Marvin" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Marvin is the &PRODUCT; automation framework. It originated as a tool for integration testing but is now also used to build DevCloud as well as to provide a Python &PRODUCT; API binding." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Marvin's complete documenation is on the wiki at https://cwiki.apache.org/CLOUDSTACK/testing-with-python.html" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The source code is located at tools/marvin" +msgstr "" + diff --git a/docs/pot/max-result-page-returned.pot b/docs/pot/max-result-page-returned.pot new file mode 100644 index 000000000..031e59f29 --- /dev/null +++ b/docs/pot/max-result-page-returned.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Maximum Result Pages Returned" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For each cloud, there is a default upper limit on the number of results that any API command will return in a single page. This is to help prevent overloading the cloud servers and prevent DOS attacks. For example, if the page size limit is 500 and a command returns 10,000 results, the command will return 20 pages." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The default page size limit can be different for each cloud. It is set in the global configuration parameter default.page.size. If your cloud has many users with lots of VMs, you might need to increase the value of this parameter. At the same time, be careful not to set it so high that your site can be taken down by an enormous return from an API call. For more information about how to set global configuration parameters, see \"Describe Your Deployment\" in the Installation Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To decrease the page size limit for an individual API command, override the global setting with the page and pagesize parameters, which are available in any list* command (listCapabilities, listDiskOfferings, etc.)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Both parameters must be specified together." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The value of the pagesize parameter must be smaller than the value of default.page.size. That is, you can not increase the number of possible items in a result page, only decrease it." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For syntax information on the list* commands, see the API Reference." +msgstr "" + diff --git a/docs/pot/migrate-datadisk-volume-new-storage-pool.pot b/docs/pot/migrate-datadisk-volume-new-storage-pool.pot new file mode 100644 index 000000000..d9e2f9716 --- /dev/null +++ b/docs/pot/migrate-datadisk-volume-new-storage-pool.pot @@ -0,0 +1,55 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Migrating a Data Disk Volume to a New Storage Pool" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as a user or admin." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Detach the data disk from the VM. See Detaching and Moving Volumes (but skip the “reattach†step at the end. You will do that after migrating to new storage)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Call the &PRODUCT; API command migrateVolume and pass in the volume ID and the ID of any storage pool in the zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Watch for the volume status to change to Migrating, then back to Ready." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Attach the volume to any desired VM running in the same cluster as the new storage server. See Attaching a Volume " +msgstr "" + diff --git a/docs/pot/migrate-vm-rootvolume-volume-new-storage-pool.pot b/docs/pot/migrate-vm-rootvolume-volume-new-storage-pool.pot new file mode 100644 index 000000000..7da0f8d07 --- /dev/null +++ b/docs/pot/migrate-vm-rootvolume-volume-new-storage-pool.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Migrating a VM Root Volume to a New Storage Pool" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When migrating the root disk volume, the VM must first be stopped, and users can not access the VM. After migration is complete, the VM can be restarted." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as a user or admin." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Detach the data disk from the VM. See Detaching and Moving Volumes (but skip the “reattach†step at the end. You will do that after migrating to new storage)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Stop the VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Call the &PRODUCT; API command migrateVirtualMachine with the ID of the VM to migrate and the IDs of a destination host and destination storage pool in the same zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Watch for the VM status to change to Migrating, then back to Stopped." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the VM." +msgstr "" + diff --git a/docs/pot/minimum-system-requirements.pot b/docs/pot/minimum-system-requirements.pot new file mode 100644 index 000000000..c7862b4b6 --- /dev/null +++ b/docs/pot/minimum-system-requirements.pot @@ -0,0 +1,150 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Minimum System Requirements" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Management Server, Database, and Storage System Requirements" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The machines that will run the Management Server and MySQL database must meet the following requirements. The same machines can also be used to provide primary and secondary storage, such as via localdisk or NFS. The Management Server may be placed on a virtual machine." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Operating system:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Preferred: CentOS/RHEL 6.3+ or Ubuntu 12.04(.1)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "64-bit x86 CPU (more cores results in better performance)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4 GB of memory" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "50 GB of local disk (When running secondary storage on the management server 500GB is recommended)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "At least 1 NIC" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Statically allocated IP address" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Fully qualified domain name as returned by the hostname command" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Host/Hypervisor System Requirements" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The host is where the cloud services run in the form of guest virtual machines. Each host is one machine that meets the following requirements:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Must support HVM (Intel-VT or AMD-V enabled)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hardware virtualization support required" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "36 GB of local disk" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If DHCP is used for hosts, ensure that no conflict occurs between DHCP server used for these hosts and the DHCP router created by &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Latest hotfixes applied to hypervisor software" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you deploy &PRODUCT;, the hypervisor host must not have any VMs already running" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All hosts within a cluster must be homogenous. The CPUs must be of the same type, count, and feature flags." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hosts have additional requirements depending on the hypervisor. See the requirements listed at the top of the Installation section for your chosen hypervisor:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Be sure you fulfill the additional hypervisor requirements and installation steps provided in this Guide. Hypervisor hosts must be properly prepared to work with CloudStack. For example, the requirements for XenServer are listed under Citrix XenServer Installation." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + diff --git a/docs/pot/modify-delete-service-offerings.pot b/docs/pot/modify-delete-service-offerings.pot new file mode 100644 index 000000000..028353183 --- /dev/null +++ b/docs/pot/modify-delete-service-offerings.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Modifying or Deleting a Service Offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Service offerings cannot be changed once created. This applies to both compute offerings and disk offerings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A service offering can be deleted. If it is no longer in use, it is deleted immediately and permanently. If the service offering is still in use, it will remain in the database until all the virtual machines referencing it have been deleted. After deletion by the administrator, a service offering will not be available to end users that are creating new instances." +msgstr "" + diff --git a/docs/pot/multi_node_management_server.pot b/docs/pot/multi_node_management_server.pot new file mode 100644 index 000000000..edada3cbe --- /dev/null +++ b/docs/pot/multi_node_management_server.pot @@ -0,0 +1,55 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Multi-Node Management Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; Management Server is deployed on one or more front-end servers connected to a single MySQL database. Optionally a pair of hardware load balancers distributes requests from the web. A backup management server set may be deployed using MySQL replication at a remote site to add DR capabilities." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The administrator must decide the following." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Whether or not load balancers will be used." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "How many Management Servers will be deployed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Whether MySQL replication will be deployed to enable disaster recovery." +msgstr "" + diff --git a/docs/pot/multi_node_overview.pot b/docs/pot/multi_node_overview.pot new file mode 100644 index 000000000..c67e8a792 --- /dev/null +++ b/docs/pot/multi_node_overview.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Management Server Multi-Node Installation Overview" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This section describes installing multiple Management Servers and installing MySQL on a node separate from the Management Servers. The machines must meet the system requirements described in System Requirements." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For the sake of security, be sure the public Internet can not access port 8096 or port 8250 on the Management Server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The procedure for a multi-node installation is:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Prepare the Operating System" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install the First Management Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install and Configure the Database" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Prepare NFS Shares" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Prepare and Start Additional Management Servers" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Prepare the System VM Template" +msgstr "" + diff --git a/docs/pot/multi_site_deployment.pot b/docs/pot/multi_site_deployment.pot new file mode 100644 index 000000000..822c64a19 --- /dev/null +++ b/docs/pot/multi_site_deployment.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Multi-Site Deployment" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; platform scales well into multiple sites through the use of zones. The following diagram shows an example of a multi-site deployment." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Data Center 1 houses the primary Management Server as well as zone 1. The MySQL database is replicated in real time to the secondary Management Server installation in Data Center 2." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This diagram illustrates a setup with a separate storage network. Each server has four NICs, two connected to pod-level network switches and two connected to storage network switches." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There are two ways to configure the storage network:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Bonded NIC and redundant switches can be deployed for NFS. In NFS deployments, redundant switches and bonded NICs still result in one network (one CIDR block+ default gateway address)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "iSCSI can take advantage of two separate storage networks (two CIDR blocks each with its own default gateway). Multipath iSCSI client can failover and load balance between separate storage networks." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This diagram illustrates the differences between NIC bonding and Multipath I/O (MPIO). NIC bonding configuration involves only one network. MPIO involves two separate networks." +msgstr "" + diff --git a/docs/pot/multiple-system-vm-vmware.pot b/docs/pot/multiple-system-vm-vmware.pot new file mode 100644 index 000000000..1ef8e4357 --- /dev/null +++ b/docs/pot/multiple-system-vm-vmware.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Multiple System VM Support for VMware" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Every &PRODUCT; zone has single System VM for template processing tasks such as downloading templates, uploading templates, and uploading ISOs. In a zone where VMware is being used, additional System VMs can be launched to process VMware-specific tasks such as taking snapshots and creating private templates. The &PRODUCT; management server launches additional System VMs for VMware-specific tasks as the load increases. The management server monitors and weights all commands sent to these System VMs and performs dynamic load balancing and scaling-up of more System VMs." +msgstr "" + diff --git a/docs/pot/network-offering-usage-record-format.pot b/docs/pot/network-offering-usage-record-format.pot new file mode 100644 index 000000000..b50371eb7 --- /dev/null +++ b/docs/pot/network-offering-usage-record-format.pot @@ -0,0 +1,90 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Network Offering Usage Record Format" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "account – name of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "accountid – ID of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "domainid – ID of the domain in which this account resides" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "zoneid – Zone where the usage occurred" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "description – A string describing what the usage record is tracking" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usage – String representation of the usage, including the units of usage (e.g. 'Hrs' for hours)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usagetype – A number representing the usage type (see Usage Types)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "rawusage – A number representing the actual usage in hours" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usageid – ID of the network offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "offeringid – Network offering ID" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "virtualMachineId – The ID of the virtual machine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "startdate, enddate – The range of time for which the usage is aggregated; see Dates in the Usage Record" +msgstr "" + diff --git a/docs/pot/network-offerings.pot b/docs/pot/network-offerings.pot new file mode 100644 index 000000000..5493e2bdc --- /dev/null +++ b/docs/pot/network-offerings.pot @@ -0,0 +1,115 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Network Offerings" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For the most up-to-date list of supported network services, see the &PRODUCT; UI or call listNetworkServices." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A network offering is a named set of network services, such as:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DHCP" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "DNS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Source NAT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Static NAT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Port Forwarding" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Load Balancing" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Firewall" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Optional) Name one of several available providers to use for a given service, such as Juniper for the firewall" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) Network tag to specify which physical network to use" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When creating a new VM, the user chooses one of the available network offerings, and that determines which network services the VM can use." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; administrator can create any number of custom network offerings, in addition to the default network offerings provided by &PRODUCT;. By creating multiple custom network offerings, you can set up your cloud to offer different classes of service on a single multi-tenant physical network. For example, while the underlying physical wiring may be the same for two tenants, tenant A may only need simple firewall protection for their website, while tenant B may be running a web server farm and require a scalable firewall solution, load balancing solution, and alternate networks for accessing the database backend." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you create load balancing rules while using a network service offering that includes an external load balancer device such as NetScaler, and later change the network service offering to one that uses the &PRODUCT; virtual router, you must create a firewall rule on the virtual router for each of your existing load balancing rules so that they continue to function." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When creating a new virtual network, the &PRODUCT; administrator chooses which network offering to enable for that network. Each virtual network is associated with one network offering. A virtual network can be upgraded or downgraded by changing its associated network offering. If you do this, be sure to reprogram the physical network to match." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; also has internal network offerings for use by &PRODUCT; system VMs. These network offerings are not visible to users but can be modified by administrators." +msgstr "" + diff --git a/docs/pot/network-rate.pot b/docs/pot/network-rate.pot new file mode 100644 index 000000000..ca9784b9c --- /dev/null +++ b/docs/pot/network-rate.pot @@ -0,0 +1,195 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Network Throttling" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network throttling is the process of controlling the network access and bandwidth usage based on certain rules. &PRODUCT; controls this behaviour of the guest networks in the cloud by using the network rate parameter. This parameter is defined as the default data transfer rate in Mbps (Megabits Per Second) allowed in a guest network. It defines the upper limits for network utilization. If the current utilization is below the allowed upper limits, access is granted, else revoked." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can throttle the network bandwidth either to control the usage above a certain limit for some accounts, or to control network congestion in a large cloud environment. The network rate for your cloud can be configured on the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network Offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Service Offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Global parameter" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If network rate is set to NULL in service offering, the value provided in the vm.network.throttling.rate global parameter is applied. If the value is set to NULL for network offering, the value provided in the network.throttling.rate global parameter is considered." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For the default public, storage, and management networks, network rate is set to 0. This implies that the public, storage, and management networks will have unlimited bandwidth by default. For default guest networks, network rate is set to NULL. In this case, network rate is defaulted to the global parameter value." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following table gives you an overview of how network rate is applied on different types of networks in &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Networks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network Rate Is Taken from" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest network of Virtual Router" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Guest Network Offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public network of Virtual Router" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Storage network of Secondary Storage VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "System Network Offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Management network of Secondary Storage VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Storage network of Console Proxy VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Management network of Console Proxy VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Storage network of Virtual Router" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Management network of Virtual Router" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public network of Secondary Storage VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public network of Console Proxy VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Default network of a guest VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Compute Offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Additional networks of a guest VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Corresponding Network Offerings" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A guest VM must have a default network, and can also have many additional networks. Depending on various parameters, such as the host and virtual switch used, you can observe a difference in the network rate in your cloud. For example, on a VMware host the actual network rate varies based on where they are configured (compute offering, network offering, or both); the network type (shared or isolated); and traffic direction (ingress or egress)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The network rate set for a network offering used by a particular network in &PRODUCT; is used for the traffic shaping policy of a port group, for example: port group A, for that network: a particular subnet or VLAN on the actual network. The virtual routers for that network connects to the port group A, and by default instances in that network connects to this port group. However, if an instance is deployed with a compute offering with the network rate set, and if this rate is used for the traffic shaping policy of another port group for the network, for example port group B, then instances using this compute offering are connected to the port group B, instead of connecting to port group A." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The traffic shaping policy on standard port groups in VMware only applies to the egress traffic, and the net effect depends on the type of network used in &PRODUCT;. In shared networks, ingress traffic is unlimited for &PRODUCT;, and egress traffic is limited to the rate that applies to the port group used by the instance if any. If the compute offering has a network rate configured, this rate applies to the egress traffic, otherwise the network rate set for the network offering applies. For isolated networks, the network rate set for the network offering, if any, effectively applies to the ingress traffic. This is mainly because the network rate set for the network offering applies to the egress traffic from the virtual router to the instance. The egress traffic is limited by the rate that applies to the port group used by the instance if any, similar to shared networks." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For example:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network rate of network offering = 10 Mbps" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network rate of compute offering = 200 Mbps" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In shared networks, ingress traffic will not be limited for &PRODUCT;, while egress traffic will be limited to 200 Mbps. In an isolated network, ingress traffic will be limited to 10 Mbps and egress to 200 Mbps." +msgstr "" + diff --git a/docs/pot/network-service-providers.pot b/docs/pot/network-service-providers.pot new file mode 100644 index 000000000..7bdf8d799 --- /dev/null +++ b/docs/pot/network-service-providers.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Network Service Providers" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For the most up-to-date list of supported network service providers, see the &PRODUCT; UI or call listNetworkServiceProviders." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A service provider (also called a network element) is hardware or virtual appliance that makes a network service possible; for example, a firewall appliance can be installed in the cloud to provide firewall service. On a single network, multiple providers can provide the same network service. For example, a firewall service may be provided by Cisco or Juniper devices in the same physical network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can have multiple instances of the same service provider in a network (say, more than one Juniper SRX device)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If different providers are set up to provide the same service on the network, the administrator can create network offerings so users can specify which network service provider they prefer (along with the other choices offered in network offerings). Otherwise, &PRODUCT; will choose which provider to use whenever the service is called for." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Supported Network Service Providers" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; ships with an internal list of the supported service providers, and you can choose from this list when creating a network offering." +msgstr "" + diff --git a/docs/pot/network-setup.pot b/docs/pot/network-setup.pot new file mode 100644 index 000000000..37153fb6d --- /dev/null +++ b/docs/pot/network-setup.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Network Setup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Achieving the correct networking setup is crucial to a successful &PRODUCT; installation. This section contains information to help you make decisions and follow the right procedures to get your network set up correctly." +msgstr "" + diff --git a/docs/pot/network-usage-record-format.pot b/docs/pot/network-usage-record-format.pot new file mode 100644 index 000000000..75d648153 --- /dev/null +++ b/docs/pot/network-usage-record-format.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Network Usage Record Format" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For network usage (bytes sent/received), the following fields exist in a usage record." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "account – name of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "accountid – ID of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "domainid – ID of the domain in which this account resides" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "zoneid – Zone where the usage occurred" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "description – A string describing what the usage record is tracking" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usagetype – A number representing the usage type (see Usage Types)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "rawusage – A number representing the actual usage in hours" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usageid – Device ID (virtual router ID or external device ID)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "type – Device type (domain router, external load balancer, etc.)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "startdate, enddate – The range of time for which the usage is aggregated; see Dates in the Usage Record" +msgstr "" + diff --git a/docs/pot/networking-in-a-pod.pot b/docs/pot/networking-in-a-pod.pot new file mode 100644 index 000000000..3cbf807cf --- /dev/null +++ b/docs/pot/networking-in-a-pod.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Networking in a Pod" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Figure 2 illustrates network setup within a single pod. The hosts are connected to a pod-level switch. At a minimum, the hosts should have one physical uplink to each switch. Bonded NICs are supported as well. The pod-level switch is a pair of redundant gigabit switches with 10 G uplinks." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Servers are connected as follows:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Storage devices are connected to only the network that carries management traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hosts are connected to networks for both management traffic and public traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hosts are also connected to one or more networks carrying guest traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "We recommend the use of multiple physical Ethernet cards to implement each network interface as well as redundant switch fabric in order to maximize throughput and improve reliability." +msgstr "" + diff --git a/docs/pot/networking-in-a-zone.pot b/docs/pot/networking-in-a-zone.pot new file mode 100644 index 000000000..99481c81b --- /dev/null +++ b/docs/pot/networking-in-a-zone.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Networking in a Zone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Figure 3 illustrates the network setup within a single zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A firewall for management traffic operates in the NAT mode. The network typically is assigned IP addresses in the 192.168.0.0/16 Class B private address space. Each pod is assigned IP addresses in the 192.168.*.0/24 Class C private address space." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Each zone has its own set of public IP addresses. Public IP addresses from different zones do not overlap." +msgstr "" + diff --git a/docs/pot/networking-overview.pot b/docs/pot/networking-overview.pot new file mode 100644 index 000000000..24c56a960 --- /dev/null +++ b/docs/pot/networking-overview.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Networking Overview" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; offers two types of networking scenario:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Basic. For AWS-style networking. Provides a single network where guest isolation can be provided through layer-3 means such as security groups (IP address source filtering)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Advanced. For more sophisticated network topologies. This network model provides the most flexibility in defining guest networks." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more details, see Network Setup." +msgstr "" + diff --git a/docs/pot/networking_overview.pot b/docs/pot/networking_overview.pot new file mode 100644 index 000000000..aedc7ae38 --- /dev/null +++ b/docs/pot/networking_overview.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Networking Overview" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CloudStack offers two types of networking scenario:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Basic. For AWS-style networking. Provides a single network where guest isolation can be provided through layer-3 means such as security groups (IP address source filtering)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Advanced. For more sophisticated network topologies. This network model provides the most flexibility in defining guest networks." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more details, see Network Setup." +msgstr "" + diff --git a/docs/pot/networks-for-users-overview.pot b/docs/pot/networks-for-users-overview.pot new file mode 100644 index 000000000..62eed8c41 --- /dev/null +++ b/docs/pot/networks-for-users-overview.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Overview of Setting Up Networking for Users" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "People using cloud infrastructure have a variety of needs and preferences when it comes to the networking services provided by the cloud. As a &PRODUCT; administrator, you can do the following things to set up networking for your users:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set up physical networks in zones" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set up several different providers for the same service on a single physical network (for example, both Cisco and Juniper firewalls)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Bundle different types of network services into network offerings, so users can choose the desired network services for any given virtual machine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add new network offerings as time goes on so end users can upgrade to a better class of service on their network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide more ways for a network to be accessed by a user, such as through a project of which the user is a member" +msgstr "" + diff --git a/docs/pot/networks.pot b/docs/pot/networks.pot new file mode 100644 index 000000000..6f08ba2d5 --- /dev/null +++ b/docs/pot/networks.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Managing Networks and Traffic" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a &PRODUCT;, guest VMs can communicate with each other using shared infrastructure with the security and user perception that the guests have a private LAN. The &PRODUCT; virtual router is the main component providing networking features for guest traffic." +msgstr "" + diff --git a/docs/pot/nfs-shares-on-management-server.pot b/docs/pot/nfs-shares-on-management-server.pot new file mode 100644 index 000000000..bec36a1ee --- /dev/null +++ b/docs/pot/nfs-shares-on-management-server.pot @@ -0,0 +1,240 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using the Management Server as the NFS Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This section tells how to set up NFS shares for primary and secondary storage on the same node with the Management Server. This is more typical of a trial installation, but is technically possible in a larger deployment. It is assumed that you will have less than 16TB of storage on the host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The exact commands for the following steps may vary depending on your operating system version." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On Ubuntu/Debian systems, you'll need to install the nfs-kernel-server package:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"$ sudo apt-get install nfs-kernel-server\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On the Management Server host, create two directories that you will use for primary and secondary storage. For example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"# mkdir -p /export/primary\n" +"# mkdir -p /export/secondary\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To configure the new directories as NFS exports, edit /etc/exports. Export the NFS share(s) with rw,async,no_root_squash. For example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# vi /etc/exports" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Insert the following line." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "/export *(rw,async,no_root_squash)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Export the /export directory." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# exportfs -a" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Edit the /etc/sysconfig/nfs file." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# vi /etc/sysconfig/nfs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Uncomment the following lines:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"LOCKD_TCPPORT=32803\n" +"LOCKD_UDPPORT=32769\n" +"MOUNTD_PORT=892\n" +"RQUOTAD_PORT=875\n" +"STATD_PORT=662\n" +"STATD_OUTGOING_PORT=2020\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Edit the /etc/sysconfig/iptables file." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# vi /etc/sysconfig/iptables" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add the following lines at the beginning of the INPUT chain where <NETWORK> is the network that you'll be using:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"-A INPUT -s <NETWORK> -m state --state NEW -p udp --dport 111 -j ACCEPT\n" +"-A INPUT -s <NETWORK> -m state --state NEW -p tcp --dport 111 -j ACCEPT\n" +"-A INPUT -s <NETWORK> -m state --state NEW -p tcp --dport 2049 -j ACCEPT\n" +"-A INPUT -s <NETWORK> -m state --state NEW -p tcp --dport 32803 -j ACCEPT\n" +"-A INPUT -s <NETWORK> -m state --state NEW -p udp --dport 32769 -j ACCEPT\n" +"-A INPUT -s <NETWORK> -m state --state NEW -p tcp --dport 892 -j ACCEPT\n" +"-A INPUT -s <NETWORK> -m state --state NEW -p udp --dport 892 -j ACCEPT\n" +"-A INPUT -s <NETWORK> -m state --state NEW -p tcp --dport 875 -j ACCEPT\n" +"-A INPUT -s <NETWORK> -m state --state NEW -p udp --dport 875 -j ACCEPT\n" +"-A INPUT -s <NETWORK> -m state --state NEW -p tcp --dport 662 -j ACCEPT\n" +"-A INPUT -s <NETWORK> -m state --state NEW -p udp --dport 662 -j ACCEPT \n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following commands:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"# service iptables restart\n" +"# service iptables save\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If NFS v4 communication is used between client and server, add your domain to /etc/idmapd.conf on both the hypervisor host and Management Server." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# vi /etc/idmapd.conf" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Remove the character # from the beginning of the Domain line in idmapd.conf and replace the value in the file with your own domain. In the example below, the domain is company.com." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "Domain = company.com" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Reboot the Management Server host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Two NFS shares called /export/primary and /export/secondary are now set up." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "It is recommended that you test to be sure the previous steps have been successful." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the hypervisor host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Be sure NFS and rpcbind are running. The commands might be different depending on your OS. For example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"# service rpcbind start\n" +"# service nfs start\n" +"# chkconfig nfs on\n" +"# chkconfig rpcbind on\n" +"# reboot \n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log back in to the hypervisor host and try to mount the /export directories. For example (substitute your own management server name):" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"# mkdir /primarymount\n" +"# mount -t nfs <management-server-name>:/export/primary /primarymount\n" +"# umount /primarymount\n" +"# mkdir /secondarymount\n" +"# mount -t nfs <management-server-name>:/export/secondary /secondarymount\n" +"# umount /secondarymount \n" +" " +msgstr "" + diff --git a/docs/pot/nfs-shares-on-separate-server.pot b/docs/pot/nfs-shares-on-separate-server.pot new file mode 100644 index 000000000..6dc037a98 --- /dev/null +++ b/docs/pot/nfs-shares-on-separate-server.pot @@ -0,0 +1,108 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using a Separate NFS Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This section tells how to set up NFS shares for secondary and (optionally) primary storage on an NFS server running on a separate node from the Management Server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The exact commands for the following steps may vary depending on your operating system version." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(KVM only) Ensure that no volume is already mounted at your NFS mount point." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On the storage server, create an NFS share for secondary storage and, if you are using NFS for primary storage as well, create a second NFS share. For example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"# mkdir -p /export/primary\n" +"# mkdir -p /export/secondary\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To configure the new directories as NFS exports, edit /etc/exports. Export the NFS share(s) with rw,async,no_root_squash. For example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# vi /etc/exports" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Insert the following line." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "/export *(rw,async,no_root_squash)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Export the /export directory." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# exportfs -a" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On the management server, create a mount point for secondary storage. For example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# mkdir -p /mnt/secondary" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Mount the secondary storage on your Management Server. Replace the example NFS server name and NFS share paths below with your own." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# mount -t nfs nfsservername:/nfs/share/secondary /mnt/secondary" +msgstr "" + diff --git a/docs/pot/offerings.pot b/docs/pot/offerings.pot new file mode 100644 index 000000000..7f22cbed3 --- /dev/null +++ b/docs/pot/offerings.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Service Offerings" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In this chapter we discuss compute, disk, and system service offerings. Network offerings are discussed in the section on setting up networking for users." +msgstr "" + diff --git a/docs/pot/ongoing-config-of-external-firewalls-lb.pot b/docs/pot/ongoing-config-of-external-firewalls-lb.pot new file mode 100644 index 000000000..1976fc00f --- /dev/null +++ b/docs/pot/ongoing-config-of-external-firewalls-lb.pot @@ -0,0 +1,55 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Ongoing Configuration of External Firewalls and Load Balancers" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Additional user actions (e.g. setting a port forward) will cause further programming of the firewall and load balancer. A user may request additional public IP addresses and forward traffic received at these IPs to specific VMs. This is accomplished by enabling static NAT for a public IP address, assigning the IP to a VM, and specifying a set of protocols and port ranges to open. When a static NAT rule is created, &PRODUCT; programs the zone's external firewall with the following objects:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A static NAT rule that maps the public IP address to the private IP address of a VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A security policy that allows traffic within the set of protocols and port ranges that are specified." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A firewall filter counter that measures the number of bytes of incoming traffic to the public IP." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The number of incoming and outgoing bytes through source NAT, static NAT, and load balancing rules is measured and saved on each external element. This data is collected on a regular basis and stored in the &PRODUCT; database." +msgstr "" + diff --git a/docs/pot/over-provisioning-service-offering-limits.pot b/docs/pot/over-provisioning-service-offering-limits.pot new file mode 100644 index 000000000..1be8e13a1 --- /dev/null +++ b/docs/pot/over-provisioning-service-offering-limits.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Over-Provisioning and Service Offering Limits" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; performs CPU over-provisioning based on an over-provisioning ratio configured by the administrator. This is defined by the cpu.overprovisioning.factor global configuration variable." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; performs CPU over-provisioning based on an over-provisioning ratio configured by the administrator. This is defined by the cpu.overprovisioning.factor global configuration variable" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Service offerings limits (e.g. 1 GHz, 1 core) are strictly enforced for core count. For example, a guest with a service offering of one core will have only one core available to it regardless of other activity on the Host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Service offering limits for gigahertz are enforced only in the presence of contention for CPU resources. For example, suppose that a guest was created with a service offering of 1 GHz on a Host that has 2 GHz cores, and that guest is the only guest running on the Host. The guest will have the full 2 GHz available to it. When multiple guests are attempting to use the CPU a weighting factor is used to schedule CPU resources. The weight is based on the clock speed in the service offering. Guests receive a CPU allocation that is proportionate to the GHz in the service offering. For example, a guest created from a 2 GHz service offering will receive twice the CPU allocation as a guest created from a 1 GHz service offering. &PRODUCT; does not perform memory over-provisioning." +msgstr "" + diff --git a/docs/pot/ovm-install.pot b/docs/pot/ovm-install.pot new file mode 100644 index 000000000..aba639b63 --- /dev/null +++ b/docs/pot/ovm-install.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Installing OVM for &PRODUCT;" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "TODO" +msgstr "" + diff --git a/docs/pot/ovm-requirements.pot b/docs/pot/ovm-requirements.pot new file mode 100644 index 000000000..263f46ebf --- /dev/null +++ b/docs/pot/ovm-requirements.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "System Requirements for OVM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "TODO" +msgstr "" + diff --git a/docs/pot/per-domain-limits.pot b/docs/pot/per-domain-limits.pot new file mode 100644 index 000000000..4ac3828d2 --- /dev/null +++ b/docs/pot/per-domain-limits.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Per-Domain Limits" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; allows the configuration of limits on a domain basis. With a domain limit in place, all users still have their account limits. They are additionally limited, as a group, to not exceed the resource limits set on their domain. Domain limits aggregate the usage of all accounts in the domain as well as all accounts in all subdomains of that domain. Limits set at the root domain level apply to the sum of resource usage by the accounts in all domains and sub-domains below that root domain." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To set a domain limit:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation tree, click Domains." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select the domain you want to modify. The current domain limits are displayed. A value of -1 shows that there is no limit in place." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Edit button editbutton.png: edits the settings. " +msgstr "" + diff --git a/docs/pot/performance-monitoring.pot b/docs/pot/performance-monitoring.pot new file mode 100644 index 000000000..b5afcfb70 --- /dev/null +++ b/docs/pot/performance-monitoring.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Performance Monitoring" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Host and guest performance monitoring is available to end users and administrators. This allows the user to monitor their utilization of resources and determine when it is appropriate to choose a more powerful service offering or larger disk." +msgstr "" + diff --git a/docs/pot/physical-network-configuration-settings.pot b/docs/pot/physical-network-configuration-settings.pot new file mode 100644 index 000000000..204f7f2ad --- /dev/null +++ b/docs/pot/physical-network-configuration-settings.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configurable Characteristics of Physical Networks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; provides configuration settings you can use to set up a physical network in a zone, including:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "What type of network traffic it carries (guest, public, management, storage)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLANs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Unique name that the hypervisor can use to find that particular network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Enabled or disabled. When a network is first set up, it is disabled – not in use yet. The administrator sets the physical network to enabled, and it begins to be used. The administrator can later disable the network again, which prevents any new virtual networks from being created on that physical network; the existing network traffic continues even though the state is disabled." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Speed" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tags, so network offerings can be matched to physical networks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Isolation method" +msgstr "" + diff --git a/docs/pot/plugin-niciranvp-about.pot b/docs/pot/plugin-niciranvp-about.pot new file mode 100644 index 000000000..fb39acbc1 --- /dev/null +++ b/docs/pot/plugin-niciranvp-about.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "The Nicira NVP Plugin" +msgstr "" + diff --git a/docs/pot/plugin-niciranvp-devicemanagement.pot b/docs/pot/plugin-niciranvp-devicemanagement.pot new file mode 100644 index 000000000..34bcc0ebf --- /dev/null +++ b/docs/pot/plugin-niciranvp-devicemanagement.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Device-management" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The plugin introduces a set of new API calls to manage the devices, see below or refer to the API reference." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "addNiciraNvpDevice" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "physicalnetworkid: the UUID of the physical network on which the device is configured" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "hostname: the IP address of the NVP controller" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "username: the username for access to the NVP API" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "password: the password for access to the NVP API" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "transportzoneuuid: the UUID of the transportzone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "deleteNiciraNVPDevice" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "nvpdeviceid: the UUID of the device" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listNiciraNVPDevices" +msgstr "" + diff --git a/docs/pot/plugin-niciranvp-features.pot b/docs/pot/plugin-niciranvp-features.pot new file mode 100644 index 000000000..0c4154bfb --- /dev/null +++ b/docs/pot/plugin-niciranvp-features.pot @@ -0,0 +1,55 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Features of the Nicira NVP Plugin" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In CloudStack release 4.0.0-incubating 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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The plugin has been tested with Nicira NVP versions 2.1.0, 2.2.0 and 2.2.1" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In CloudStack 4.0.0-incubating only the XenServer hypervisor is supported for use in combination with Nicira NVP." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In CloudStack 4.1.0-incubating both KVM and XenServer hypervisors are supported." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In CloudStack 4.0.0-incubating the UI components for this plugin are not complete, configuration is done by sending commands to the API." +msgstr "" + diff --git a/docs/pot/plugin-niciranvp-guide.pot b/docs/pot/plugin-niciranvp-guide.pot new file mode 100644 index 000000000..665e4ff21 --- /dev/null +++ b/docs/pot/plugin-niciranvp-guide.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Plugin Guide for the Nicira NVP Plugin" +msgstr "" + diff --git a/docs/pot/plugin-niciranvp-introduction.pot b/docs/pot/plugin-niciranvp-introduction.pot new file mode 100644 index 000000000..2f50cf01f --- /dev/null +++ b/docs/pot/plugin-niciranvp-introduction.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Introduction to the Nicira NVP Plugin" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Nicira NVP plugin allows CloudStack to use the Nicira solution for virtualized network as a provider for CloudStack networks and services." +msgstr "" + diff --git a/docs/pot/plugin-niciranvp-preparations.pot b/docs/pot/plugin-niciranvp-preparations.pot new file mode 100644 index 000000000..c3bdbaea3 --- /dev/null +++ b/docs/pot/plugin-niciranvp-preparations.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Prerequisites" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Before enabling the Nicira NVP plugin the NVP Controller needs to be configured. Please review the NVP User Guide on how to do that." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Guest traffic type should be configured with the traffic label that matches the name of the Integration Bridge on the hypervisor. See the Nicira NVP User Guide for more details on how to set this up in XenServer or KVM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure you have the following information ready:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The IP address of the NVP Controller" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The username to access the API" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The password to access the API" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The UUID of the Transport Zone that contains the hypervisors in this Zone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The UUID of the Physical Network that will used for the Guest networks" +msgstr "" + diff --git a/docs/pot/plugin-niciranvp-provider.pot b/docs/pot/plugin-niciranvp-provider.pot new file mode 100644 index 000000000..1f1b1e914 --- /dev/null +++ b/docs/pot/plugin-niciranvp-provider.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Enabling the service provider" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "addNetworkServiceProvider" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "name = \"NiciraNvp\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "physicalnetworkid = <the uuid of the physical network>" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "updateNetworkServiceProvider" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "id = <the provider uuid returned by the previous call>" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "state = \"Enabled\"" +msgstr "" + diff --git a/docs/pot/plugin-niciranvp-revisions.pot b/docs/pot/plugin-niciranvp-revisions.pot new file mode 100644 index 000000000..ea63a27dc --- /dev/null +++ b/docs/pot/plugin-niciranvp-revisions.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Revision History" +msgstr "" + +#. Tag: firstname +#, no-c-format +msgid "Hugo" +msgstr "" + +#. Tag: surname +#, no-c-format +msgid "Trippaers" +msgstr "" + +#. Tag: member +#, no-c-format +msgid "Documentation created for 4.0.0-incubating version of the NVP Plugin" +msgstr "" + diff --git a/docs/pot/plugin-niciranvp-tables.pot b/docs/pot/plugin-niciranvp-tables.pot new file mode 100644 index 000000000..5e1570f99 --- /dev/null +++ b/docs/pot/plugin-niciranvp-tables.pot @@ -0,0 +1,90 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Database tables" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following tables are added to the cloud database for the Nicira NVP Plugin" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "nicira_nvp_nic_map, contains a mapping from nic to logical switch port" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "id" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "logicalswitch, uuid of the logical switch this port is connected to" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "logicalswitchport, uuid of the logical switch port for this nic" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "nic, the CloudStack uuid for this nic, reference to the nics table" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "external_nicira_nvp_devices, contains all configured devices" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "uuid" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "physical_network_id, the physical network this device is configured on" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "provider_name, set to \"NiciraNvp\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "device_name, display name for this device" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "host_id, reference to the host table with the device configuration" +msgstr "" + diff --git a/docs/pot/plugin-niciranvp-troubleshooting.pot b/docs/pot/plugin-niciranvp-troubleshooting.pot new file mode 100644 index 000000000..45cdc9aa0 --- /dev/null +++ b/docs/pot/plugin-niciranvp-troubleshooting.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Troubleshooting the Nicira NVP Plugin" +msgstr "" + diff --git a/docs/pot/plugin-niciranvp-ui.pot b/docs/pot/plugin-niciranvp-ui.pot new file mode 100644 index 000000000..80d69bd63 --- /dev/null +++ b/docs/pot/plugin-niciranvp-ui.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Configuring the Nicira NVP plugin from the UI" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In CloudStack 4.1.0-incubating the Nicira NVP plugin and its resources can be configured in the infrastructure tab of the UI. Navigate to the physical network with STT isolation and configure the network elements. The NiciraNvp is listed here." +msgstr "" + diff --git a/docs/pot/plugin-niciranvp-usage.pot b/docs/pot/plugin-niciranvp-usage.pot new file mode 100644 index 000000000..165ea6d74 --- /dev/null +++ b/docs/pot/plugin-niciranvp-usage.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using the Nicira NVP Plugin" +msgstr "" + diff --git a/docs/pot/plugin-niciranvp-uuidreferences.pot b/docs/pot/plugin-niciranvp-uuidreferences.pot new file mode 100644 index 000000000..8cbf47742 --- /dev/null +++ b/docs/pot/plugin-niciranvp-uuidreferences.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "UUID References" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The plugin maintains several references in the CloudStack database to items created on the NVP Controller." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + diff --git a/docs/pot/pod-add.pot b/docs/pot/pod-add.pot new file mode 100644 index 000000000..857b5a136 --- /dev/null +++ b/docs/pot/pod-add.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding a Pod" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you created a new zone, &PRODUCT; adds the first pod for you. You can add more pods at any time using the procedure in this section." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Infrastructure. In Zones, click View More, then click the zone to which you want to add a pod." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Compute and Storage tab. In the Pods node of the diagram, click View All." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add Pod." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Enter the following details in the dialog." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name. The name of the pod." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateway. The gateway for the hosts in that pod." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Netmask. The network prefix that defines the pod's subnet. Use CIDR notation." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start/End Reserved System IP. The IP range in the management network that &PRODUCT; uses to manage various system VMs, such as Secondary Storage VMs, Console Proxy VMs, and DHCP. For more information, see System Reserved IP Addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK." +msgstr "" + diff --git a/docs/pot/port-forwarding.pot b/docs/pot/port-forwarding.pot new file mode 100644 index 000000000..47f16ff90 --- /dev/null +++ b/docs/pot/port-forwarding.pot @@ -0,0 +1,115 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Port Forwarding" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A port forward service is a set of port forwarding rules that define a policy. A port forward service is then applied to one or more guest VMs. The guest VM then has its inbound network access managed according to the policy defined by the port forwarding service. You can optionally specify one or more CIDRs to filter the source IPs. This is useful when you want to allow only incoming requests from certain IP addresses to be forwarded." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A guest VM can be in any number of port forward services. Port forward services can be defined but have no members. If a guest VM is part of more than one network, port forwarding rules will function only if they are defined on the default network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You cannot use port forwarding to open ports for an elastic IP address. When elastic IP is used, outside access is instead controlled through the use of security groups. See Security Groups." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To set up port forwarding:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you have not already done so, add a public IP address range to a zone in &PRODUCT;. See Adding a Zone and Pod in the Installation Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add one or more VM instances to &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the name of the guest network where the VMs are running." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose an existing IP address or acquire a new IP address. (See Acquiring a New IP Address on page 73.) Click the name of the IP address in the list." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Configuration tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Port Forwarding node of the diagram, click View All." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Fill in the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public Port. The port to which public traffic will be addressed on the IP address you acquired in the previous step." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Private Port. The port on which the instance is listening for forwarded public traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Protocol. The communication protocol in use between the two ports." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add." +msgstr "" + diff --git a/docs/pot/prepare-system-vm-template.pot b/docs/pot/prepare-system-vm-template.pot new file mode 100644 index 000000000..6429e4ee0 --- /dev/null +++ b/docs/pot/prepare-system-vm-template.pot @@ -0,0 +1,116 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Prepare the System VM Template" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Secondary storage must be seeded with a template that is used for &PRODUCT; system VMs. Citrix provides you with the necessary binary package of the system VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When copying and pasting a command, be sure the command has pasted as a single line before executing. Some document viewers may introduce unwanted line breaks in copied text." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On the Management Server, run one or more of the following cloud-install-sys-tmplt commands to retrieve and decompress the system VM template. Run the command for each hypervisor type that you expect end users to run in this Zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If your secondary storage mount point is not named /mnt/secondary, substitute your own mount point name." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you set the &PRODUCT; database encryption type to \"web\" when you set up the database, you must now add the parameter -s <management-server-secret-key>. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This process will require approximately 5 GB of free space on the local file system and up to 30 minutes each time it runs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For XenServer:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.vhd.bz2 -h xenserver -s <optional-management-server-secret-key> -F" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For vSphere:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.ova -h vmware -s <optional-management-server-secret-key> -F" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For KVM:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# /usr/lib64/cloud/common/scripts/storage/secondary/cloud-install-sys-tmplt -m /mnt/secondary -u http://download.cloud.com/templates/acton/acton-systemvm-02062012.qcow2.bz2 -h kvm -s <optional-management-server-secret-key> -F" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are using a separate NFS server, perform this step." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Do not perform this step if you are using the Management Server as the NFS server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When the script has finished, unmount secondary storage and remove the created directory." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# umount /mnt/secondary\n" +"# rmdir /mnt/secondary" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Repeat these steps for each secondary storage server." +msgstr "" + diff --git a/docs/pot/primary-storage-add.pot b/docs/pot/primary-storage-add.pot new file mode 100644 index 000000000..c414a1110 --- /dev/null +++ b/docs/pot/primary-storage-add.pot @@ -0,0 +1,190 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Add Primary Storage" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "System Requirements for Primary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hardware requirements:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Any standards-compliant iSCSI or NFS server that is supported by the underlying hypervisor." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The storage server should be a machine with a large number of disks. The disks should ideally be managed by a hardware RAID controller." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Minimum required capacity depends on your needs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When setting up primary storage, follow these restrictions:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Primary storage cannot be added until a host has been added to the cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you do not provision shared primary storage, you must set the global configuration parameter system.vm.local.storage.required to true, or else you will not be able to start VMs." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Adding Primary Stroage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you create a new zone, the first primary storage is added as part of that procedure. You can add primary storage servers at any time, such as when adding a new cluster or adding more servers to an existing cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Be sure there is nothing stored on the server. Adding the server to &PRODUCT; will destroy any existing data." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI (see )." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Infrastructure. In Zones, click View More, then click the zone in which you want to add the primary storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Compute tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Primary Storage node of the diagram, click View All." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add Primary Storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide the following information in the dialog. The information required varies depending on your choice in Protocol." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Pod. The pod for the storage device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Cluster. The cluster for the storage device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name. The name of the storage device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Protocol. For XenServer, choose either NFS, iSCSI, or PreSetup. For KVM, choose NFS or SharedMountPoint. For vSphere choose either VMFS (iSCSI or FiberChannel) or NFS." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Server (for NFS, iSCSI, or PreSetup). The IP address or DNS name of the storage device." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Server (for VMFS). The IP address or DNS name of the vCenter server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Path (for NFS). In NFS this is the exported path from the server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Path (for VMFS). In vSphere this is a combination of the datacenter name and the datastore name. The format is \"/\" datacenter name \"/\" datastore name. For example, \"/cloud.dc.VM/cluster1datastore\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Path (for SharedMountPoint). With KVM this is the path on each host that is where this primary storage is mounted. For example, \"/mnt/primary\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SR Name-Label (for PreSetup). Enter the name-label of the SR that has been set up outside &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Target IQN (for iSCSI). In iSCSI this is the IQN of the target. For example, iqn.1986-03.com.sun:02:01ec9bb549-1271378984." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Lun # (for iSCSI). In iSCSI this is the LUN number. For example, 3." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tags (optional). The comma-separated list of tags for this storage device. It should be an equivalent set or superset of the tags on your disk offerings.." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The tag sets on primary storage across clusters in a Zone must be identical. For example, if cluster A provides primary storage that has tags T1 and T2, all other clusters in the Zone must also provide primary storage that has tags T1 and T2." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK." +msgstr "" + diff --git a/docs/pot/primary-storage-outage-and-data-loss.pot b/docs/pot/primary-storage-outage-and-data-loss.pot new file mode 100644 index 000000000..4801afdf6 --- /dev/null +++ b/docs/pot/primary-storage-outage-and-data-loss.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Primary Storage Outage and Data Loss" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a primary storage outage occurs the hypervisor immediately stops all VMs stored on that storage device. Guests that are marked for HA will be restarted as soon as practical when the primary storage comes back on line. With NFS, the hypervisor may allow the virtual machines to continue running depending on the nature of the issue. For example, an NFS hang will cause the guest VMs to be suspended until storage connectivity is restored.Primary storage is not designed to be backed up. Individual volumes in primary storage can be backed up using snapshots." +msgstr "" + diff --git a/docs/pot/primary-storage.pot b/docs/pot/primary-storage.pot new file mode 100644 index 000000000..5fb36b302 --- /dev/null +++ b/docs/pot/primary-storage.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Primary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This section gives concepts and technical details about &PRODUCT; primary storage. For information about how to install and configure primary storage through the &PRODUCT; UI, see the Installation Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + diff --git a/docs/pot/private-public-template.pot b/docs/pot/private-public-template.pot new file mode 100644 index 000000000..b982f60f4 --- /dev/null +++ b/docs/pot/private-public-template.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Private and Public Templates" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a user creates a template, it can be designated private or public." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Private templates are only available to the user who created them. By default, an uploaded template is private." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a user marks a template as “public,†the template becomes available to all users in all accounts in the user's domain, as well as users in any other domains that have access to the Zone where the template is stored. This depends on whether the Zone, in turn, was defined as private or public. A private Zone is assigned to a single domain, and a public Zone is accessible to any domain. If a public template is created in a private Zone, it is available only to users in the domain assigned to that Zone. If a public template is created in a public Zone, it is available to all users in all domains." +msgstr "" + diff --git a/docs/pot/projects-overview.pot b/docs/pot/projects-overview.pot new file mode 100644 index 000000000..e5fd8f122 --- /dev/null +++ b/docs/pot/projects-overview.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Overview of Projects" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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.." +msgstr "" + diff --git a/docs/pot/projects.pot b/docs/pot/projects.pot new file mode 100644 index 000000000..2b6939a71 --- /dev/null +++ b/docs/pot/projects.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using Projects to Organize Users and Resources" +msgstr "" + diff --git a/docs/pot/provisioning-auth-api.pot b/docs/pot/provisioning-auth-api.pot new file mode 100644 index 000000000..671e64173 --- /dev/null +++ b/docs/pot/provisioning-auth-api.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Provisioning and Authentication API" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; expects that a customer will have their own user provisioning infrastructure. It provides APIs to integrate with these existing systems where the systems call out to &PRODUCT; to add/remove users.." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; supports pluggable authenticators. By default, &PRODUCT; assumes it is provisioned with the user’s password, and as a result authentication is done locally. However, external authentication is possible as well. For example, see Using an LDAP Server for User Authentication." +msgstr "" + diff --git a/docs/pot/provisioning-steps-overview.pot b/docs/pot/provisioning-steps-overview.pot new file mode 100644 index 000000000..8d2873aef --- /dev/null +++ b/docs/pot/provisioning-steps-overview.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Overview of Provisioning Steps" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After the Management Server is installed and running, you can add the compute resources for it to manage. For an overview of how a &PRODUCT; cloud infrastructure is organized, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To provision the cloud infrastructure, or to scale it up at any time, follow these procedures:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Change the root password. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add a zone. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add more pods (optional). See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add more clusters (optional). See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add more hosts (optional). See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add primary storage. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Add secondary storage. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Initialize and test the new cloud. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you have finished these steps, you will have a deployment with the following basic structure:" +msgstr "" + diff --git a/docs/pot/provisioning-steps.pot b/docs/pot/provisioning-steps.pot new file mode 100644 index 000000000..cb3d44c36 --- /dev/null +++ b/docs/pot/provisioning-steps.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Steps to Provisioning Your Cloud Infrastructure" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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 ." +msgstr "" + diff --git a/docs/pot/query-filter.pot b/docs/pot/query-filter.pot new file mode 100644 index 000000000..ff221b07a --- /dev/null +++ b/docs/pot/query-filter.pot @@ -0,0 +1,115 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Query Filter" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The query filter is used to find a mapped user in the external LDAP server. The query filter should uniquely map the &PRODUCT; user to LDAP user for a meaningful authentication. For more information about query filter syntax, consult the documentation for your LDAP server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; query filter wildcards are:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Query Filter Wildcard" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "%u" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "User name" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "%e" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Email address" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "%n" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "First and last name" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following examples assume you are using Active Directory, and refer to user attributes from the Active Directory schema." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the &PRODUCT; user name is the same as the LDAP user ID:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "(uid=%u)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the &PRODUCT; user name is the LDAP display name:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "(displayName=%u)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To find a user by email address:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "(mail=%e)" +msgstr "" + diff --git a/docs/pot/re-install-hosts.pot b/docs/pot/re-install-hosts.pot new file mode 100644 index 000000000..5f21c743b --- /dev/null +++ b/docs/pot/re-install-hosts.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Re-Installing Hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can re-install a host after placing it in maintenance mode and then removing it. If a host is down and cannot be placed in maintenance mode, it should still be removed before the re-install." +msgstr "" + diff --git a/docs/pot/release-ip-address.pot b/docs/pot/release-ip-address.pot new file mode 100644 index 000000000..3f70c4d19 --- /dev/null +++ b/docs/pot/release-ip-address.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Releasing an IP Address" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the name of the network where you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click View IP Addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the IP address you want to release." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Release IP button ReleaseIPButton.png: button to release an IP ." +msgstr "" + diff --git a/docs/pot/release-ip-for-vpc.pot b/docs/pot/release-ip-for-vpc.pot new file mode 100644 index 000000000..49d743a4e --- /dev/null +++ b/docs/pot/release-ip-for-vpc.pot @@ -0,0 +1,115 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Releasing an IP Address Alloted to a VPC" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The IP address is a limited resource. If you no longer need a particular IP, you can disassociate it from its VPC and return it to the pool of available addresses. An IP address can be released from its tier, only when all the networking ( port forwarding, load balancing, or StaticNAT ) rules are removed for this IP address. The released IP address will still belongs to the same VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VPCs that you have created for the account is listed in the page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Configure button of the VPC whose IP you want to release." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The VPC page is displayed where all the tiers you created are listed in a diagram." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Settings icon." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following options are displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Addresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Gateways" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Site-to-Site VPN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network ACLs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select IP Addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The IP Addresses page is displayed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the IP you want to release." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Details tab, click the Release IP button release-ip-icon.png: button to release an IP. " +msgstr "" + diff --git a/docs/pot/remove-member-from-project.pot b/docs/pot/remove-member-from-project.pot new file mode 100644 index 000000000..9933fe45e --- /dev/null +++ b/docs/pot/remove-member-from-project.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Removing a Member From a Project" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a member is removed from a project, the member’s resources continue to be owned by the project. The former project member cannot create any new resources within the project or use any of the project’s existing resources." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A member of a project can be removed by the project administrator, the domain administrator of the domain the project belongs to or of its parent domain, or the &PRODUCT; root administrator." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select View, choose Projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the name of the project." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Accounts tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the name of the member." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Delete button. deletebutton.png: Removes a member " +msgstr "" + diff --git a/docs/pot/remove-tier.pot b/docs/pot/remove-tier.pot new file mode 100644 index 000000000..ac6742506 --- /dev/null +++ b/docs/pot/remove-tier.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Removing Tiers" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can remove a tier from a VPC. A removed tier cannot be revoked. When a tier is removed, only the resources of the tier are expunged. All the network rules (port forwarding, load balancing and staticNAT) and the IP addresses associated to the tier are removed. The IP address still be belonging to the same VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VPC that you have created for the account is listed in the page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Configure button of the VPC for which you want to set up tiers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Configure VPC page is displayed. Locate the tier you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Remove VPC button:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Wait for some time for the tier to be removed." +msgstr "" + diff --git a/docs/pot/remove-vpc.pot b/docs/pot/remove-vpc.pot new file mode 100644 index 000000000..5627b1eac --- /dev/null +++ b/docs/pot/remove-vpc.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Editing, Restarting, and Removing a Virtual Private Cloud" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that all the tiers are removed before you remove a VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or end user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Select view, select VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the VPCs that you have created for the account is listed in the page." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select the VPC you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To remove, click the Remove VPC button remove-vpc.png: button to remove a VPC " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can edit the name and description of a VPC. To do that, select the VPC, then click the Edit button. edit-icon.png: button to edit a VPC " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To restart a VPC, select the VPC, then click the Restart button. restart-vpc.png: button to restart a VPC " +msgstr "" + diff --git a/docs/pot/removed-API-commands.pot b/docs/pot/removed-API-commands.pot new file mode 100644 index 000000000..3a068c23b --- /dev/null +++ b/docs/pot/removed-API-commands.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Removed API commands" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "createConfiguration (Adds configuration value)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "configureSimulator (Configures simulator)" +msgstr "" + diff --git a/docs/pot/removing-hosts.pot b/docs/pot/removing-hosts.pot new file mode 100644 index 000000000..335eeef81 --- /dev/null +++ b/docs/pot/removing-hosts.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Removing Hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hosts can be removed from the cloud as needed. The procedure to remove a host depends on the hypervisor type." +msgstr "" + diff --git a/docs/pot/removing-vsphere-hosts.pot b/docs/pot/removing-vsphere-hosts.pot new file mode 100644 index 000000000..02db0a5e4 --- /dev/null +++ b/docs/pot/removing-vsphere-hosts.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Removing vSphere Hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To remove this type of host, first place it in maintenance mode, as described in . Then use &PRODUCT; to remove the host. &PRODUCT; will not direct commands to a host that has been removed using &PRODUCT;. However, the host may still exist in the vCenter cluster." +msgstr "" + diff --git a/docs/pot/removing-xenserver-kvm-hosts.pot b/docs/pot/removing-xenserver-kvm-hosts.pot new file mode 100644 index 000000000..fa092ae46 --- /dev/null +++ b/docs/pot/removing-xenserver-kvm-hosts.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Removing XenServer and KVM Hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A node cannot be removed from a cluster until it has been placed in maintenance mode. This will ensure that all of the VMs on it have been migrated to other Hosts. To remove a Host from the cloud:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Place the node in maintenance mode." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For KVM, stop the cloud-agent service." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use the UI option to remove the node." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Then you may power down the Host, re-use its IP address, re-install it, etc" +msgstr "" + diff --git a/docs/pot/requirements-templates.pot b/docs/pot/requirements-templates.pot new file mode 100644 index 000000000..5d1a8e7ae --- /dev/null +++ b/docs/pot/requirements-templates.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Requirements for Templates" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For XenServer, install PV drivers / Xen tools on each template that you create. This will enable live migration and clean guest shutdown." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For vSphere, install VMware Tools on each template that you create. This will enable console view to work properly." +msgstr "" + diff --git a/docs/pot/resizing-volumes.pot b/docs/pot/resizing-volumes.pot new file mode 100644 index 000000000..457d1bace --- /dev/null +++ b/docs/pot/resizing-volumes.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Resizing Volumes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; does not provide the ability to resize root disks or data disks; the disk size is fixed based on the template used to create the VM. However, the tool VHD Resizer), while not officially supported by Cloud.com or Citrix, might provide a workaround. To increase disk size with VHD Resizer:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Get the VHD from the secondary storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Import it into VHD Resizer." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Resize the VHD." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Upload the new VHD." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a new VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Take a snapshot, then create a new template from that snapshot." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more information, see How to Resize a Provisioning Server 5 Virtual Disk at the Citrix Knowledge Center" +msgstr "" + diff --git a/docs/pot/response-formats.pot b/docs/pot/response-formats.pot new file mode 100644 index 000000000..706fcc811 --- /dev/null +++ b/docs/pot/response-formats.pot @@ -0,0 +1,79 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Response Formats: XML and JSON" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CloudStack supports two formats as the response to an API call. The default response is XML. If you would like the response to be in JSON, add &response=json to the Command String." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Sample XML Response:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +" <listipaddressesresponse> \n" +" <allocatedipaddress>\n" +" <ipaddress>192.168.10.141</ipaddress> \n" +" <allocated>2009-09-18T13:16:10-0700</allocated> \n" +" <zoneid>4</zoneid> \n" +" <zonename>WC</zonename> \n" +" <issourcenat>true</issourcenat> \n" +" </allocatedipaddress>\n" +" </listipaddressesresponse>\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Sample JSON Response:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +" { \"listipaddressesresponse\" : \n" +" { \"allocatedipaddress\" :\n" +" [ \n" +" { \n" +" \"ipaddress\" : \"192.168.10.141\", \n" +" \"allocated\" : \"2009-09-18T13:16:10-0700\",\n" +" \"zoneid\" : \"4\", \n" +" \"zonename\" : \"WC\", \n" +" \"issourcenat\" : \"true\" \n" +" } \n" +" ]\n" +" } \n" +" } \n" +" " +msgstr "" + diff --git a/docs/pot/responses.pot b/docs/pot/responses.pot new file mode 100644 index 000000000..629746bff --- /dev/null +++ b/docs/pot/responses.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Responses" +msgstr "" + diff --git a/docs/pot/roles.pot b/docs/pot/roles.pot new file mode 100644 index 000000000..9dba537d7 --- /dev/null +++ b/docs/pot/roles.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Roles" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; API supports three access roles:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Root Admin. Access to all features of the cloud, including both virtual and physical resource management." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Domain Admin. Access to only the virtual resources of the clouds that belong to the administrator’s domain." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "User. Access to only the features that allow management of the user’s virtual instances, storage, and network." +msgstr "" + diff --git a/docs/pot/root-admin-ui-overview.pot b/docs/pot/root-admin-ui-overview.pot new file mode 100644 index 000000000..5f0df53fe --- /dev/null +++ b/docs/pot/root-admin-ui-overview.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Root Administrator's UI Overview" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; UI helps the &PRODUCT; administrator provision, view, and manage the cloud infrastructure, domains, user accounts, projects, and configuration settings. The first time you start the UI after a fresh Management Server installation, you can choose to follow a guided tour to provision your cloud infrastructure. On subsequent logins, the dashboard of the logged-in user appears. The various links in this screen and the navigation bar on the left provide access to a variety of administrative functions. The root administrator can also use the UI to perform all the same tasks that are present in the end-user’s UI." +msgstr "" + diff --git a/docs/pot/runtime-allocation-virtual-network-resources.pot b/docs/pot/runtime-allocation-virtual-network-resources.pot new file mode 100644 index 000000000..df343402c --- /dev/null +++ b/docs/pot/runtime-allocation-virtual-network-resources.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Runtime Allocation of Virtual Network Resources" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you define a new virtual network, all your settings for that network are stored in &PRODUCT;. The actual network resources are activated only when the first virtual machine starts in the network. When all virtual machines have left the virtual network, the network resources are garbage collected so they can be allocated again. This helps to conserve network resources.." +msgstr "" + diff --git a/docs/pot/runtime-behavior-of-primary-storage.pot b/docs/pot/runtime-behavior-of-primary-storage.pot new file mode 100644 index 000000000..1862b3f89 --- /dev/null +++ b/docs/pot/runtime-behavior-of-primary-storage.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Runtime Behavior of Primary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Root volumes are created automatically when a virtual machine is created. Root volumes are deleted when the VM is destroyed. Data volumes can be created and dynamically attached to VMs. Data volumes are not deleted when VMs are destroyed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Administrators should monitor the capacity of primary storage devices and add additional primary storage as needed. See the Advanced Installation Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Administrators add primary storage to the system by creating a &PRODUCT; storage pool. Each storage pool is associated with a cluster." +msgstr "" + diff --git a/docs/pot/runtime-internal-comm-req.pot b/docs/pot/runtime-internal-comm-req.pot new file mode 100644 index 000000000..78738beee --- /dev/null +++ b/docs/pot/runtime-internal-comm-req.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Runtime Internal Communications Requirements" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Servers communicate with each other to coordinate tasks. This communication uses TCP on ports 8250 and 9090." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The console proxy VMs connect to all hosts in the zone over the management traffic network. Therefore the management traffic network of any given pod in the zone must have connectivity to the management traffic network of all other pods in the zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The secondary storage VMs and console proxy VMs connect to the Management Server on port 8250. If you are using multiple Management Servers, the load balanced IP address of the Management Servers on port 8250 must be reachable." +msgstr "" + diff --git a/docs/pot/scheduled-maintenance-maintenance-mode-hosts.pot b/docs/pot/scheduled-maintenance-maintenance-mode-hosts.pot new file mode 100644 index 000000000..f83df48da --- /dev/null +++ b/docs/pot/scheduled-maintenance-maintenance-mode-hosts.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Scheduled Maintenance and Maintenance Mode for Hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can place a host into maintenance mode. When maintenance mode is activated, the host becomes unavailable to receive new guest VMs, and the guest VMs already running on the host are seamlessly migrated to another host not in maintenance mode. This migration uses live migration technology and does not interrupt the execution of the guest." +msgstr "" + diff --git a/docs/pot/search-base.pot b/docs/pot/search-base.pot new file mode 100644 index 000000000..99efd746d --- /dev/null +++ b/docs/pot/search-base.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Search Base" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "An LDAP query is relative to a given node of the LDAP directory tree, called the search base. The search base is the distinguished name (DN) of a level of the directory tree below which all users can be found. The users can be in the immediate base directory or in some subdirectory. The search base may be equivalent to the organization, group, or domain name. The syntax for writing a DN varies depending on which LDAP server you are using. A full discussion of distinguished names is outside the scope of our documentation. The following table shows some examples of search bases to find users in the testing department.." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "LDAP Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Example Search Base DN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ApacheDS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ou=testing,o=project" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Active Directory" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "OU=testing, DC=company" +msgstr "" + diff --git a/docs/pot/search-user-bind-dn.pot b/docs/pot/search-user-bind-dn.pot new file mode 100644 index 000000000..5cb326c9f --- /dev/null +++ b/docs/pot/search-user-bind-dn.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Search User Bind DN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The bind DN is the user on the external LDAP server permitted to search the LDAP directory within the defined search base. When the DN is returned, the DN and passed password are used to authenticate the &PRODUCT; user with an LDAP bind. A full discussion of bind DNs is outside the scope of our documentation. The following table shows some examples of bind DNs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "LDAP Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Example Bind DN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ApacheDS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "cn=Administrator,dc=testing,ou=project,ou=org" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Active Directory" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CN=Administrator, OU=testing, DC=company, DC=com" +msgstr "" + diff --git a/docs/pot/secondary-storage-add.pot b/docs/pot/secondary-storage-add.pot new file mode 100644 index 000000000..419cb15e5 --- /dev/null +++ b/docs/pot/secondary-storage-add.pot @@ -0,0 +1,95 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Add Secondary Storage" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "System Requirements for Secondary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NFS storage appliance or Linux NFS server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) OpenStack Object Storage (Swift) (see http://swift.openstack.org)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "100GB minimum capacity" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A secondary storage device must be located in the same zone as the guest VMs it serves." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Each Secondary Storage server must be available to all hosts in the zone." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Adding Secondary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When you create a new zone, the first secondary storage is added as part of that procedure. You can add secondary storage servers at any time to add more servers to an existing zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Be sure there is nothing stored on the server. Adding the server to &PRODUCT; will destroy any existing data." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are going to use Swift for cloud-wide secondary storage, you must add the Swift storage to &PRODUCT; before you add the local zone secondary storage servers. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To prepare for local zone secondary storage, you should have created and mounted an NFS share during Management Server installation. See .See Preparing NFS Shares in the Installation Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure you prepared the system VM template during Management Server installation. See .See Prepare the System VM Template in the Installation Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now that the secondary storage server for per-zone storage is prepared, add it to &PRODUCT;. Secondary storage is added as part of the procedure for adding a new zone. See ." +msgstr "" + diff --git a/docs/pot/secondary-storage-outage-and-data-loss.pot b/docs/pot/secondary-storage-outage-and-data-loss.pot new file mode 100644 index 000000000..bc00e1c56 --- /dev/null +++ b/docs/pot/secondary-storage-outage-and-data-loss.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Secondary Storage Outage and Data Loss" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For a Zone that has only one secondary storage server, a secondary storage outage will have feature level impact to the system but will not impact running guest VMs. It may become impossible to create a VM with the selected template for a user. A user may also not be able to save snapshots or examine/restore saved snapshots. These features will automatically be available when the secondary storage comes back online." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Secondary storage data loss will impact recently added user data including templates, snapshots, and ISO images. Secondary storage should be backed up periodically. Multiple secondary storage servers can be provisioned within each zone to increase the scalability of the system." +msgstr "" + diff --git a/docs/pot/secondary-storage-vm.pot b/docs/pot/secondary-storage-vm.pot new file mode 100644 index 000000000..8f9354a93 --- /dev/null +++ b/docs/pot/secondary-storage-vm.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Secondary Storage VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In addition to the hosts, &PRODUCT;’s Secondary Storage VM mounts and writes to secondary storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Submissions to secondary storage go through the Secondary Storage VM. The Secondary Storage VM can retrieve templates and ISO images from URLs using a variety of protocols." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The secondary storage VM provides a background task that takes care of a variety of secondary storage activities: downloading a new template to a Zone, copying templates between Zones, and snapshot backups." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The administrator can log in to the secondary storage VM if needed." +msgstr "" + diff --git a/docs/pot/secondary-storage.pot b/docs/pot/secondary-storage.pot new file mode 100644 index 000000000..3139de6a9 --- /dev/null +++ b/docs/pot/secondary-storage.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Secondary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This section gives concepts and technical details about &PRODUCT; secondary storage. For information about how to install and configure secondary storage through the &PRODUCT; UI, see the Advanced Installation Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + diff --git a/docs/pot/security-groups.pot b/docs/pot/security-groups.pot new file mode 100644 index 000000000..c7c8480d9 --- /dev/null +++ b/docs/pot/security-groups.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Security Groups" +msgstr "" + diff --git a/docs/pot/security-req.pot b/docs/pot/security-req.pot new file mode 100644 index 000000000..373e3ba84 --- /dev/null +++ b/docs/pot/security-req.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Security Requirements" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The public Internet must not be able to access port 8096 or port 8250 on the Management Server." +msgstr "" + diff --git a/docs/pot/send-projects-membership-invitation.pot b/docs/pot/send-projects-membership-invitation.pot new file mode 100644 index 000000000..f77e51f2d --- /dev/null +++ b/docs/pot/send-projects-membership-invitation.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Sending Project Membership Invitations" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use these steps to add a new member to a project if the invitations feature is enabled in the cloud as described in . If the invitations feature is not turned on, use the procedure in Adding Project Members From the UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select View, choose Projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the name of the project you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Invitations tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Add by, select one of the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Account – The invitation will appear in the user’s Invitations tab in the Project View. See Using the Project View." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Email – The invitation will be sent to the user’s email address. Each emailed invitation includes a unique code called a token which the recipient will provide back to &PRODUCT; when accepting the invitation. Email invitations will work only if the global parameters related to the SMTP server have been set. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Type the user name or email address of the new member you want to add, and click Invite. Type the &PRODUCT; user name if you chose Account in the previous step. If you chose Email, type the email address. You can invite only people who have an account in this cloud within the same domain as the project. However, you can send the invitation to any email address." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To view and manage the invitations you have sent, return to this tab. When an invitation is accepted, the new member will appear in the project’s Accounts tab." +msgstr "" + diff --git a/docs/pot/separate_storage_network.pot b/docs/pot/separate_storage_network.pot new file mode 100644 index 000000000..421246003 --- /dev/null +++ b/docs/pot/separate_storage_network.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Separate Storage Network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the large-scale redundant setup described in the previous section, storage traffic can overload the management network. A separate storage network is optional for deployments. Storage protocols such as iSCSI are sensitive to network delays. A separate storage network ensures guest network traffic contention does not impact storage performance." +msgstr "" + diff --git a/docs/pot/service-offerings.pot b/docs/pot/service-offerings.pot new file mode 100644 index 000000000..59d9de44e --- /dev/null +++ b/docs/pot/service-offerings.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Service Offerings" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vCenter Maintenance Mode" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer and Maintenance Mode" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vCenter Maintenance Mode" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer and Maintenance Mode" +msgstr "" + diff --git a/docs/pot/set-database-buffer-pool-size.pot b/docs/pot/set-database-buffer-pool-size.pot new file mode 100644 index 000000000..c29786c53 --- /dev/null +++ b/docs/pot/set-database-buffer-pool-size.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Set Database Buffer Pool Size" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "It is important to provide enough memory space for the MySQL database to cache data and indexes:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Edit the Tomcat configuration file:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "/etc/my.cnf" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Insert the following line in the [mysqld] section, below the datadir line. Use a value that is appropriate for your situation. We recommend setting the buffer pool at 40% of RAM if MySQL is on the same server as the management server or 70% of RAM if MySQL has a dedicated server. The following example assumes a dedicated server with 1024M of RAM." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "innodb_buffer_pool_size=700M" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the MySQL service." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service mysqld restart" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more information about the buffer pool, see \"The InnoDB Buffer Pool\" at MySQL Reference Manual." +msgstr "" + diff --git a/docs/pot/set-global-project-resource-limits.pot b/docs/pot/set-global-project-resource-limits.pot new file mode 100644 index 000000000..ece55dbe3 --- /dev/null +++ b/docs/pot/set-global-project-resource-limits.pot @@ -0,0 +1,110 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Setting the Global Project Resource Limits" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in as administrator to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Global Settings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the search box, type max.projects and click the search button." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the search results, you will see the parameters you can use to set per-project maximum resource amounts that apply to all projects in the cloud. No project can have more resources, but an individual project can have lower limits. Click the edit button to set each parameter. editbutton.png: Edits parameters " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "max.project.public.ips" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Maximum number of public IP addresses that can be owned by any project in the cloud. See About Public IP Addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "max.project.snapshots" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Maximum number of snapshots that can be owned by any project in the cloud. See Working with Snapshots." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "max.project.templates" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Maximum number of templates that can be owned by any project in the cloud. See Working with Templates." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "max.project.uservms" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Maximum number of guest virtual machines that can be owned by any project in the cloud. See Working With Virtual Machines." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "max.project.volumes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Maximum number of data volumes that can be owned by any project in the cloud. See Working with Volumes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the Management Server." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service cloud-management restart" +msgstr "" + diff --git a/docs/pot/set-monitor-total-vm-limits-per-host.pot b/docs/pot/set-monitor-total-vm-limits-per-host.pot new file mode 100644 index 000000000..50fe43213 --- /dev/null +++ b/docs/pot/set-monitor-total-vm-limits-per-host.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Set and Monitor Total VM Limits per Host" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; administrator should monitor the total number of VM instances in each cluster, and disable allocation to the cluster if the total is approaching the maximum that the hypervisor can handle. Be sure to leave a safety margin to allow for the possibility of one or more hosts failing, which would increase the VM load on the other hosts as the VMs are automatically redeployed. Consult the documentation for your chosen hypervisor to find the maximum permitted number of VMs per host, then use &PRODUCT; global configuration settings to set this as the default limit. Monitor the VM activity in each cluster at all times. Keep the total number of VMs below a safe level that allows for the occasional host failure. For example, if there are N hosts in the cluster, and you want to allow for one host in the cluster to be down at any given time, the total number of VM instances you can permit in the cluster is at most (N-1) * (per-host-limit). Once a cluster reaches this number of VMs, use the &PRODUCT; UI to disable allocation of more VMs to the cluster." +msgstr "" + diff --git a/docs/pot/set-per-project-resource-limits.pot b/docs/pot/set-per-project-resource-limits.pot new file mode 100644 index 000000000..b79197401 --- /dev/null +++ b/docs/pot/set-per-project-resource-limits.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Setting Per-Project Resource Limits" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; root administrator or the domain administrator of the domain where the project resides can set new resource limits for an individual project. The project owner can set resource limits only if the owner is also a domain or root administrator." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The new limits must be below the global default limits set by the &PRODUCT; administrator (as described in ). If the project already owns more of a given type of resource than the new maximum, the resources are not affected; however, the project can not add any new resources of that type until the total drops below the new limit." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in as administrator to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select View, choose Projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the name of the project you want to work with." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Resources tab. This tab lists the current maximum amount that the project is allowed to own for each type of resource." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Type new values for one or more resources." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Apply." +msgstr "" + diff --git a/docs/pot/set-projects-creator-permissions.pot b/docs/pot/set-projects-creator-permissions.pot new file mode 100644 index 000000000..230e3651f --- /dev/null +++ b/docs/pot/set-projects-creator-permissions.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Setting Project Creator Permissions" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can configure &PRODUCT; to allow any user to create a new project, or you can restrict that ability to just &PRODUCT; administrators." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in as administrator to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Global Settings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the search box, type allow.user.create.projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the edit button to set the parameter. editbutton.png: Edits parameters " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "allow.user.create.projects" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set to true to allow end users to create projects. Set to false if you want only the &PRODUCT; root administrator and domain administrators to create projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the Management Server." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service cloud-management restart" +msgstr "" + diff --git a/docs/pot/set-resource-limits-for-projects.pot b/docs/pot/set-resource-limits-for-projects.pot new file mode 100644 index 000000000..e833c5464 --- /dev/null +++ b/docs/pot/set-resource-limits-for-projects.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Setting Resource Limits for Projects" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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" +msgstr "" + diff --git a/docs/pot/set-up-invitations.pot b/docs/pot/set-up-invitations.pot new file mode 100644 index 000000000..0ea9fe7cc --- /dev/null +++ b/docs/pot/set-up-invitations.pot @@ -0,0 +1,160 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Setting Up Invitations" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; can be set up either so that project administrators can add people directly to a project, or so that it is necessary to send an invitation which the recipient must accept. The invitation can be sent by email or through the user’s &PRODUCT; account. If you want administrators to use invitations to add members to projects, turn on and set up the invitations feature in &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in as administrator to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Global Settings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the search box, type project and click the search button." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the search box, type project and click the search button. searchbutton.png: Searches projects " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the search results, you will see a few other parameters you need to set to control how invitations behave. The table below shows global configuration parameters related to project invitations. Click the edit button to set each parameter" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configuration Parameters" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "project.invite.required" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set to true to turn on the invitations feature." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "project.email.sender" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The email address to show in the From field of invitation emails." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "project.invite.timeout" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Amount of time to allow for a new member to respond to the invitation." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "project.smtp.host" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name of the host that acts as an email server to handle invitations." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "project.smtp.password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) Password required by the SMTP server. You must also set project.smtp.username and set project.smtp.useAuth to true." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "project.smtp.port" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SMTP server’s listening port." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "project.smtp.useAuth" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set to true if the SMTP server requires a username and password." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "project.smtp.username" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) User name required by the SMTP server for authentication. You must also set project.smtp.password and set project.smtp.useAuth to true.." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the Management Server" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "service cloud-management restart" +msgstr "" + diff --git a/docs/pot/set-up-network-for-users.pot b/docs/pot/set-up-network-for-users.pot new file mode 100644 index 000000000..48c1cb762 --- /dev/null +++ b/docs/pot/set-up-network-for-users.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Setting Up Networking for Users" +msgstr "" + diff --git a/docs/pot/set-usage-limit.pot b/docs/pot/set-usage-limit.pot new file mode 100644 index 000000000..f39f0d629 --- /dev/null +++ b/docs/pot/set-usage-limit.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Setting Usage Limits" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; provides several administrator control points for capping resource usage by users. Some of these limits are global configuration parameters. Others are applied at the ROOT domain and may be overridden on a per-account basis." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Aggregate limits may be set on a per-domain basis. For example, you may limit a domain and all subdomains to the creation of 100 VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This section covers the following topics:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Globally Configured Limits" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Default Account Resource Limits" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Per Domain Limits" +msgstr "" + diff --git a/docs/pot/set-zone-vlan-run-vm-max.pot b/docs/pot/set-zone-vlan-run-vm-max.pot new file mode 100644 index 000000000..6fc47e67b --- /dev/null +++ b/docs/pot/set-zone-vlan-run-vm-max.pot @@ -0,0 +1,115 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Setting Zone VLAN and Running VM Maximums" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the external networking case, every VM in a zone must have a unique guest IP address. There are two variables that you need to consider in determining how to configure &PRODUCT; to support this: how many Zone VLANs do you expect to have and how many VMs do you expect to have running in the Zone at any one time." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use the following table to determine how to configure &PRODUCT; for your deployment." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "guest.vlan.bits" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Maximum Running VMs per Zone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Maximum Zone VLANs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "12" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4096" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4094" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "11" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "8192" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "2048" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "10" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "16384" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "1024" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "32768" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "512" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Based on your deployment's needs, choose the appropriate value of guest.vlan.bits. Set it as described in Edit the Global Configuration Settings (Optional) section and restart the Management Server." +msgstr "" + diff --git a/docs/pot/shared-networks.pot b/docs/pot/shared-networks.pot new file mode 100644 index 000000000..9d8085dcb --- /dev/null +++ b/docs/pot/shared-networks.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Shared Networks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A shared network can be accessed by virtual machines that belong to many different accounts. Network Isolation on shared networks is accomplished using techniques such as security groups (supported only in basic zones in &PRODUCT; 3.0.3)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Shared Networks are created by the administrator" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Shared Networks can be designated to a certain domain" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Shared Network resources such as VLAN and physical network that it maps to are designated by the administrator" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Shared Networks are isolated by security groups" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public Network is a shared network that is not shown to the end users" +msgstr "" + diff --git a/docs/pot/signing-api-requests.pot b/docs/pot/signing-api-requests.pot new file mode 100644 index 000000000..10d171473 --- /dev/null +++ b/docs/pot/signing-api-requests.pot @@ -0,0 +1,140 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Signing API Requests" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Whether you access the CloudStack API with HTTP or HTTPS, it must still be signed so that CloudStack can verify the caller has been authenticated and authorized to execute the command. Make sure that you have both the API Key and Secret Key provided by the CloudStack administrator for your account before proceeding with the signing process." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To show how to sign a request, we will re-use the previous example." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "http://http://localhost:8080/client/api?command=deployVirtualMachine&serviceOfferingId=1&diskOfferingId=1&templateId=2&zoneId=4&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Breaking this down, we have several distinct parts to this URL." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Base URL: This is the base URL to the CloudStack Management Server." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "http://localhost:8080" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "API Path: This is the path to the API Servlet that processes the incoming requests." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "/client/api?" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Command String: This part of the query string comprises of the command, its parameters, and the API Key that identifies the account." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "As with all query string parameters of field-value pairs, the \"field\" component is case insensitive while all \"value\" values are case sensitive." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "command=deployVirtualMachine&serviceOfferingId=1&diskOfferingId=1&templateId=2&zoneId=4&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Signature: This is the hashed signature of the Base URL that is generated using a combination of the user’s Secret Key and the HMAC SHA-1 hashing algorithm." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Every API request has the format Base URL+API Path+Command String+Signature." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To generate the signature." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For each field-value pair (as separated by a '&') in the Command String, URL encode each value so that it can be safely sent via HTTP GET." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure all spaces are encoded as \"%20\" rather than \"+\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Lower case the entire Command String and sort it alphabetically via the field for each field-value pair. The result of this step would look like the following." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "apikey=mivr6x7u6bn_sdahobpjnejpgest35exq-jb8cg20yi3yaxxcgpyuairmfi_ejtvwz0nukkjbpmy3y2bcikwfq&command=deployvirtualmachine&diskofferingid=1&serviceofferingid=1&templateid=2&zoneid=4" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Take the sorted Command String and run it through the HMAC SHA-1 hashing algorithm (most programming languages offer a utility method to do this) with the user’s Secret Key. Base64 encode the resulting byte array in UTF-8 so that it can be safely transmitted via HTTP. The final string produced after Base64 encoding should be \"Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D\"." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "By reconstructing the final URL in the format Base URL+API Path+Command String+Signature, the final URL should look like:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "http://localhost:8080/client/api?command=deployVirtualMachine&serviceOfferingId=1&diskOfferingId=1&templateId=2&zoneId=4&apiKey=miVr6X7u6bN_sdahOBpjNejPgEsT35eXq-jB8CG20YI3yaxXcgpyuaIRmFI_EJTVwZ0nUkkJbPmY3y2bciKwFQ&signature=Lxx1DM40AjcXU%2FcaiK8RAP0O1hU%3D" +msgstr "" + diff --git a/docs/pot/site-to-site-vpn.pot b/docs/pot/site-to-site-vpn.pot new file mode 100644 index 000000000..e3be2197d --- /dev/null +++ b/docs/pot/site-to-site-vpn.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Setting Up a Site-to-Site VPN Connection" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A Site-to-Site VPN connection helps you establish a secure connection from an enterprise datacenter to the cloud infrastructure. This allows users to access the guest VMs by establishing a VPN connection to the virtual router of the account from a device in the datacenter of the enterprise. Having this facility eliminates the need to establish VPN connections to individual VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The supported endpoints on the remote datacenters are:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Cisco ISR with IOS 12.4 or later" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Juniper J-Series routers with JunOS 9.5 or later" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In addition to the specific Cisco and Juniper devices listed above, the expectation is that any Cisco or Juniper device running on the supported operating systems are able to establish VPN connections." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To set up a Site-to-Site VPN connection, perform the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a Virtual Private Cloud (VPC)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a VPN Customer Gateway." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a VPN gateway for the VPC that you created." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create VPN connection from the VPC VPN gateway to the customer VPN gateway." +msgstr "" + diff --git a/docs/pot/small_scale_deployment.pot b/docs/pot/small_scale_deployment.pot new file mode 100644 index 000000000..033f3c425 --- /dev/null +++ b/docs/pot/small_scale_deployment.pot @@ -0,0 +1,55 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Small-Scale Deployment" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This diagram illustrates the network architecture of a small-scale &PRODUCT; deployment." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A firewall provides a connection to the Internet. The firewall is configured in NAT mode. The firewall forwards HTTP requests and API calls from the Internet to the Management Server. The Management Server resides on the management network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A layer-2 switch connects all physical servers and storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A single NFS server functions as both the primary and secondary storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Server is connected to the management network." +msgstr "" + diff --git a/docs/pot/snapshot-restore.pot b/docs/pot/snapshot-restore.pot new file mode 100644 index 000000000..5d4d1f551 --- /dev/null +++ b/docs/pot/snapshot-restore.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Snapshot Restore" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There are two paths to restoring snapshots. Users can create a volume from the snapshot. The volume can then be mounted to a VM and files recovered as needed. Alternatively, a template may be created from the snapshot of a root disk. The user can then boot a VM from this template to effect recovery of the root disk." +msgstr "" + diff --git a/docs/pot/source-build.pot b/docs/pot/source-build.pot new file mode 100644 index 000000000..304d2eb36 --- /dev/null +++ b/docs/pot/source-build.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Building &PRODUCT; from Source" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Prior to the 4.0.0 incubating release, Ant was used to build &PRODUCT;. Starting with 4.0.0 a migration to Maven is underway." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The website and the wiki contain up to date information on the build procedure at:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "https://cwiki.apache.org/CLOUDSTACK/building-with-maven.html" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "http://incubator.apache.org/cloudstack/develop/environment.html" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The overarching steps to build &PRODUCT; are:." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Install the prerequisites and setup your environment" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Understand that various Maven profiles and build targets" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Deploy and test your build" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If needed, learn how to build binaries" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Learning Maven is outside the scope of this documentation." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Go to the Maven website at http://maven.apache.org/guides/getting-started/index.html" +msgstr "" + diff --git a/docs/pot/source-prereqs.pot b/docs/pot/source-prereqs.pot new file mode 100644 index 000000000..b22b5f714 --- /dev/null +++ b/docs/pot/source-prereqs.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Prerequisites for building Apache CloudStack" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There are a number of prerequisites needed to build &PRODUCT;. This document assumes compilation on a Linux system that uses RPMs or DEBs for package management." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The minimum bootstrapped prerequisites for building &PRODUCT; includes the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ant" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "maven (version 3)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Java (Java 6/OpenJDK 1.6)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "rpmbuild or dpkg-dev" +msgstr "" + diff --git a/docs/pot/source.pot b/docs/pot/source.pot new file mode 100644 index 000000000..525c0b43d --- /dev/null +++ b/docs/pot/source.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Building from Source" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The official &PRODUCT; release is always in source code form. While there may exist convenience binaries in various forms from a number of places, the source is the canonical release will be source. In this document we'll cover acquiring the source release, building that into binary, deployable packages." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "While building and deploying directly from source is certainly possible, the reality of Infrastructure-as-a-Service cloud computing implies a need to deploy packages on a potentially large number of systems, which RPMs and DEBs fill nicely." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Building and deploying directly from source is thus outside the scope of this document, but is documented in the INSTALL.md file in the release." +msgstr "" + diff --git a/docs/pot/ssl.pot b/docs/pot/ssl.pot new file mode 100644 index 000000000..037169bea --- /dev/null +++ b/docs/pot/ssl.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "SSL (Optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; provides HTTP access in its default installation. There are a number of technologies and sites which choose to implement SSL. As a result, we have left &PRODUCT; to expose HTTP under the assumption that a site will implement its typical practice." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; uses Tomcat as its servlet container. For sites that would like &PRODUCT; to terminate the SSL session, Tomcat’s SSL access may be enabled. Tomcat SSL configuration is described at http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html." +msgstr "" + diff --git a/docs/pot/standard-events.pot b/docs/pot/standard-events.pot new file mode 100644 index 000000000..adb22613c --- /dev/null +++ b/docs/pot/standard-events.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Standard Events" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The events log records three types of standard events." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "INFO. This event is generated when an operation has been successfully performed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "WARN. This event is generated in the following circumstances." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a network is disconnected while monitoring a template download." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a template download is abandoned." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When an issue on the storage server causes the volumes to fail over to the mirror storage server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ERROR. This event is generated when an operation has not been successfully performed" +msgstr "" + diff --git a/docs/pot/static-nat.pot b/docs/pot/static-nat.pot new file mode 100644 index 000000000..60f01be8e --- /dev/null +++ b/docs/pot/static-nat.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Static NAT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A static NAT rule maps a public IP address to the private IP address of a VM in order to allow Internet traffic into the VM. The public IP address always remains the same, which is why it is called \"static\" NAT. This section tells how to enable or disable static NAT for a particular IP address." +msgstr "" + diff --git a/docs/pot/sticky-session-policies-for-lb-rules.pot b/docs/pot/sticky-session-policies-for-lb-rules.pot new file mode 100644 index 000000000..cbe4ae616 --- /dev/null +++ b/docs/pot/sticky-session-policies-for-lb-rules.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Sticky Session Policies for Load Balancer Rules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Sticky sessions are used in Web-based applications to ensure continued availability of information across the multiple requests in a user's session. For example, if a shopper is filling a cart, you need to remember what has been purchased so far. The concept of \"stickiness\" is also referred to as persistence or maintaining state." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Any load balancer rule defined in &PRODUCT; can have a stickiness policy. The policy consists of a name, stickiness method, and parameters. The parameters are name-value pairs or flags, which are defined by the load balancer vendor. The stickiness method could be load balancer-generated cookie, application-generated cookie, or source-based. In the source-based method, the source IP address is used to identify the user and locate the user’s stored data. In the other methods, cookies are used. The cookie generated by the load balancer or application is included in request and response URLs to create persistence. The cookie name can be specified by the administrator or automatically generated. A variety of options are provided to control the exact behavior of cookies, such as how they are generated and whether they are cached." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For the most up to date list of available stickiness methods, see the &PRODUCT; UI or call listNetworks and check the SupportedStickinessMethods capability." +msgstr "" + diff --git a/docs/pot/stop-restart-management-server.pot b/docs/pot/stop-restart-management-server.pot new file mode 100644 index 000000000..dec05253f --- /dev/null +++ b/docs/pot/stop-restart-management-server.pot @@ -0,0 +1,65 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Stopping and Restarting the Management Server" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The root administrator will need to stop and restart the Management Server from time to time." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For example, after changing a global configuration parameter, a restart is required. If you have multiple Management Server nodes, restart all of them to put the new parameter value into effect consistently throughout the cloud." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To stop the Management Server, issue the following command at the operating system prompt on the Management Server node:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service cloud-management stop" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To start the Management Server:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service cloud-management start" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To stop the Management Server:" +msgstr "" + diff --git a/docs/pot/stopped-vm.pot b/docs/pot/stopped-vm.pot new file mode 100644 index 000000000..8f5f7c1b3 --- /dev/null +++ b/docs/pot/stopped-vm.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Stopped VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; now supports creating a VM without starting it. You can determine whether the VM needs to be started as part of the VM deployment. A VM can now be deployed in two ways: create and start a VM (the default method); or create a VM and leave it in the stopped state." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A new request parameter, startVM, is introduced in the deployVm API to support the stopped VM feature." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The possible values are:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "true - The VM starts as a part of the VM deployment." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "false - The VM is left in the stopped state at the end of the VM deployment." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The default value is true." +msgstr "" + diff --git a/docs/pot/stopping-and-starting-vms.pot b/docs/pot/stopping-and-starting-vms.pot new file mode 100644 index 000000000..2228d58c2 --- /dev/null +++ b/docs/pot/stopping-and-starting-vms.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Stopping and Starting VMs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Any user can access their own virtual machines. The administrator can access all VMs running in the cloud." +msgstr "" + diff --git a/docs/pot/storage-nw-topology-req.pot b/docs/pot/storage-nw-topology-req.pot new file mode 100644 index 000000000..978696185 --- /dev/null +++ b/docs/pot/storage-nw-topology-req.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Storage Network Topology Requirements" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The secondary storage NFS export is mounted by the secondary storage VM. Secondary storage traffic goes over the management traffic network, even if there is a separate storage network. Primary storage traffic goes over the storage network, if available. If you choose to place secondary storage NFS servers on the storage network, you must make sure there is a route from the management traffic network to the storage network." +msgstr "" + diff --git a/docs/pot/storage-overview.pot b/docs/pot/storage-overview.pot new file mode 100644 index 000000000..a2cad3573 --- /dev/null +++ b/docs/pot/storage-overview.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Storage Overview" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; defines two types of storage: primary and secondary. Primary storage can be accessed by either iSCSI or NFS. Additionally, direct attached storage may be used for primary storage. Secondary storage is always accessed using NFS." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There is no ephemeral storage in &PRODUCT;. All volumes on all nodes are persistent." +msgstr "" + diff --git a/docs/pot/storage-tags.pot b/docs/pot/storage-tags.pot new file mode 100644 index 000000000..8ed6ccf22 --- /dev/null +++ b/docs/pot/storage-tags.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Storage Tags" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Storage may be \"tagged\". A tag is a text string attribute associated with primary storage, a Disk Offering, or a Service Offering. Tags allow administrators to provide additional information about the storage. For example, that is a \"SSD\" or it is \"slow\". Tags are not interpreted by &PRODUCT;. They are matched against tags placed on service and disk offerings. &PRODUCT; requires all tags on service and disk offerings to exist on the primary storage before it allocates root or data disks on the primary storage. Service and disk offering tags are used to identify the requirements of the storage that those offerings have. For example, the high end service offering may require \"fast\" for its root disk volume." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The interaction between tags, allocation, and volume copying across clusters and pods can be complex. To simplify the situation, use the same set of tags on the primary storage for all clusters in a pod. Even if different devices are used to present those tags, the set of exposed tags can be the same." +msgstr "" + diff --git a/docs/pot/storage.pot b/docs/pot/storage.pot new file mode 100644 index 000000000..cc72673f6 --- /dev/null +++ b/docs/pot/storage.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Working With Storage" +msgstr "" + diff --git a/docs/pot/suspend-project.pot b/docs/pot/suspend-project.pot new file mode 100644 index 000000000..e2c6c7d3d --- /dev/null +++ b/docs/pot/suspend-project.pot @@ -0,0 +1,80 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Suspending or Deleting a Project" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a project is suspended, it retains the resources it owns, but they can no longer be used. No new resources or members can be added to a suspended project." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a project is deleted, its resources are destroyed, and member accounts are removed from the project. The project’s status is shown as Disabled pending final deletion." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A project can be suspended or deleted by the project administrator, the domain administrator of the domain the project belongs to or of its parent domain, or the &PRODUCT; root administrator." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, click Projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Select View, choose Projects." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the name of the project." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click one of the buttons:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To delete, use deletebutton.png: Removes a project " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To suspend, use deletebutton.png: suspends a project " +msgstr "" + diff --git a/docs/pot/sys-offering-sysvm.pot b/docs/pot/sys-offering-sysvm.pot new file mode 100644 index 000000000..995ae9a3c --- /dev/null +++ b/docs/pot/sys-offering-sysvm.pot @@ -0,0 +1,130 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Changing the Default System Offering for System VMs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can manually change the system offering for a particular System VM. Additionally, as a &PRODUCT; administrator, you can also change the default system offering used for System VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a new system offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more information, see Creating a New System Service Offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Back up the database:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "mysqldump -u root -p cloud | bzip2 > cloud_backup.sql.bz2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Open an MySQL prompt:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "mysql -u cloud -p cloud" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following queries on the cloud database." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the disk_offering table, identify the original default offering and the new offering you want to use by default." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Take a note of the ID of the new offering." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "select id,name,unique_name,type from disk_offering;" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For the original default offering, set the value of unique_name to NULL." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# update disk_offering set unique_name = NULL where id = 10;" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that you use the correct value for the ID." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For the new offering that you want to use by default, set the value of unique_name as follows:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For the default Console Proxy VM (CPVM) offering,set unique_name to 'Cloud.com-ConsoleProxy'. For the default Secondary Storage VM (SSVM) offering, set unique_name to 'Cloud.com-SecondaryStorage'. For example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "update disk_offering set unique_name = 'Cloud.com-ConsoleProxy' where id = 16;" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart &PRODUCT; Management Server. Restarting is required because the default offerings are loaded into the memory at startup." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "service cloud-management restart" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Destroy the existing CPVM or SSVM offerings and wait for them to be recreated. The new CPVM or SSVM are configured with the new offering." +msgstr "" + diff --git a/docs/pot/sys-reliability-and-ha.pot b/docs/pot/sys-reliability-and-ha.pot new file mode 100644 index 000000000..f6820688a --- /dev/null +++ b/docs/pot/sys-reliability-and-ha.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "System Reliability and High Availability" +msgstr "" + diff --git a/docs/pot/sysprep-for-windows-server-2003R2.pot b/docs/pot/sysprep-for-windows-server-2003R2.pot new file mode 100644 index 000000000..c975206ed --- /dev/null +++ b/docs/pot/sysprep-for-windows-server-2003R2.pot @@ -0,0 +1,160 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Sysprep for Windows Server 2003 R2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Earlier versions of Windows have a different sysprep tool. Follow these steps for Windows Server 2003 R2." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Extract the content of \\support\\tools\\deploy.cab on the Windows installation CD into a directory called c:\\sysprep on the Windows 2003 R2 VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run c:\\sysprep\\setupmgr.exe to create the sysprep.inf file." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select Create New to create a new Answer File." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Enter “Sysprep setup†for the Type of Setup." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select the appropriate OS version and edition." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On the License Agreement screen, select “Yes fully automate the installationâ€." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide your name and organization." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Leave display settings at default." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set the appropriate time zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide your product key." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select an appropriate license mode for your deployment" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select “Automatically generate computer nameâ€." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Type a default administrator password. If you enable the password reset feature, the users will not actually use this password. This password will be reset by the instance manager after the guest boots up." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Leave Network Components at “Typical Settingsâ€." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select the “WORKGROUP†option." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Leave Telephony options at default." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select appropriate Regional Settings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select appropriate language settings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Do not install printers." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Do not specify “Run Once commandsâ€." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You need not specify an identification string." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Save the Answer File as c:\\sysprep\\sysprep.inf." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following command to sysprep the image:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "c:\\sysprep\\sysprep.exe -reseal -mini -activated" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After this step the machine will automatically shut down" +msgstr "" + diff --git a/docs/pot/sysprep-windows-server-2008R2.pot b/docs/pot/sysprep-windows-server-2008R2.pot new file mode 100644 index 000000000..91202d855 --- /dev/null +++ b/docs/pot/sysprep-windows-server-2008R2.pot @@ -0,0 +1,147 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "System Preparation for Windows Server 2008 R2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For Windows 2008 R2, you run Windows System Image Manager to create a custom sysprep response XML file. Windows System Image Manager is installed as part of the Windows Automated Installation Kit (AIK). Windows AIK can be downloaded from the Microsoft Download Center at the following location:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Microsoft Download Center." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use the following steps to run sysprep for Windows 2008 R2:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The steps outlined here are derived from the excellent guide by Charity Shelbourne, originally published at Windows Server 2008 Sysprep Mini-Setup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Download and install the Windows AIK" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Windows AIK should not be installed on the Windows 2008 R2 VM you just created. Windows AIK should not be part of the template you create. It is only used to create the sysprep answer file." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Copy the install.wim file in the \\sources directory of the Windows 2008 R2 installation DVD to the hard disk. This is a very large file and may take a long time to copy. Windows AIK requires the WIM file to be writable." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Start the Windows System Image Manager, which is part of the Windows AIK." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Windows Image pane, right click “Select a Windows image or catalog file†to load the install.wim file you just copied." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select the Windows 2008 R2 Edition" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You may be prompted with a warning that the catalog file cannot be opened. Click Yes to create a new catalog file." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Answer File pane, right click to create a new answer file." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Generate the answer file from the Windows System Image Manager using the following steps:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The first page you need to automate is the Language and Country or Region Selection page. To automate this, expand Components in your Windows Image pane, right-click and add the Microsoft-Windows-International-Core setting to Pass 7 oobeSystem. In your Answer File pane, configure the InputLocale, SystemLocale, UILanguage, and UserLocale with the appropriate settings for your language and country or region. Should you have a question about any of these settings, you can right-click on the specific setting and select Help. This will open the appropriate CHM help file with more information, including examples on the setting you are attempting to configure." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You need to automate the Software License Terms Selection page, otherwise known as the End-User License Agreement (EULA). To do this, expand the Microsoft-Windows-Shell-Setup component. High-light the OOBE setting, and add the setting to the Pass 7 oobeSystem. In Settings, set HideEULAPage true." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure the license key is properly set. If you use MAK key, you can just enter the MAK key on the Windows 2008 R2 VM. You need not input the MAK into the Windows System Image Manager. If you use KMS host for activation you need not enter the Product Key. Details of Windows Volume Activation can be found at " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You need to automate is the Change Administrator Password page. Expand the Microsoft-Windows-Shell-Setup component (if it is not still expanded), expand UserAccounts, right-click on AdministratorPassword, and add the setting to the Pass 7 oobeSystem configuration pass of your answer file. Under Settings, specify a password next to Value." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You may read the AIK documentation and set many more options that suit your deployment. The steps above are the minimum needed to make Windows unattended setup work." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Save the answer file as unattend.xml. You can ignore the warning messages that appear in the validation window." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Copy the unattend.xml file into the c:\\windows\\system32\\sysprep directory of the Windows 2008 R2 Virtual Machine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Once you place the unattend.xml file in c:\\windows\\system32\\sysprep directory, you run the sysprep tool as follows:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "cd c:\\Windows\\System32\\sysprep\n" +"sysprep.exe /oobe /generalize /shutdown\n" +"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Windows 2008 R2 VM will automatically shut down after sysprep is complete." +msgstr "" + diff --git a/docs/pot/system-reserved-ip-addresses.pot b/docs/pot/system-reserved-ip-addresses.pot new file mode 100644 index 000000000..5caf9fa39 --- /dev/null +++ b/docs/pot/system-reserved-ip-addresses.pot @@ -0,0 +1,95 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "System Reserved IP Addresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In each zone, you need to configure a range of reserved IP addresses for the management network. This network carries communication between the &PRODUCT; Management Server and various system VMs, such as Secondary Storage VMs, Console Proxy VMs, and DHCP." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The reserved IP addresses must be unique across the cloud. You cannot, for example, have a host in one zone which has the same private IP address as a host in another zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The hosts in a pod are assigned private IP addresses. These are typically RFC1918 addresses. The Console Proxy and Secondary Storage system VMs are also allocated private IP addresses in the CIDR of the pod that they are created in." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure computing servers and Management Servers use IP addresses outside of the System Reserved IP range. For example, suppose the System Reserved IP range starts at 192.168.154.2 and ends at 192.168.154.7. &PRODUCT; can use .2 to .7 for System VMs. This leaves the rest of the pod CIDR, from .8 to .254, for the Management Server and hypervisor hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In all zones:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide private IPs for the system in each pod and provision them in &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For KVM and XenServer, the recommended number of private IPs per pod is one per host. If you expect a pod to grow, add enough private IPs now to accommodate the growth." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a zone that uses advanced networking:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For zones with advanced networking, we recommend provisioning enough private IPs for your total number of customers, plus enough for the required &PRODUCT; System VMs. Typically, about 10 additional IPs are required for the System VMs. For more information about System VMs, see Working with System Virtual Machines in the Administrator's Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When advanced networking is being used, the number of private IP addresses available in each pod varies depending on which hypervisor is running on the nodes in that pod. Citrix XenServer and KVM use link-local addresses, which in theory provide more than 65,000 private IP addresses within the address block. As the pod grows over time, this should be more than enough for any reasonable number of hosts as well as IP addresses for guest virtual routers. VMWare ESXi, by contrast uses any administrator-specified subnetting scheme, and the typical administrator provides only 255 IPs per pod. Since these are shared by physical machines, the guest virtual router, and other entities, it is possible to run out of private IPs when scaling up a pod whose nodes are running ESXi." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To ensure adequate headroom to scale private IP space in an ESXi pod that uses advanced networking, use one or both of the following techniques:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Specify a larger CIDR block for the subnet. A subnet mask with a /20 suffix will provide more than 4,000 IP addresses." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create multiple pods, each with its own subnet. For example, if you create 10 pods and each pod has 255 IPs, this will provide 2,550 IP addresses." +msgstr "" + diff --git a/docs/pot/system-service-offerings.pot b/docs/pot/system-service-offerings.pot new file mode 100644 index 000000000..726d0d0f2 --- /dev/null +++ b/docs/pot/system-service-offerings.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "System Service Offerings" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + diff --git a/docs/pot/system-vm-template.pot b/docs/pot/system-vm-template.pot new file mode 100644 index 000000000..9b739867a --- /dev/null +++ b/docs/pot/system-vm-template.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "The System VM Template" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The System VMs come from a single template. The System VM has the following characteristics:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Debian 6.0 (\"Squeeze\"), 2.6.32 kernel with the latest security patches from the Debian security APT repository" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Has a minimal set of packages installed thereby reducing the attack surface" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "32-bit for enhanced performance on Xen/VMWare" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "pvops kernel with Xen PV drivers, KVM virtio drivers, and VMware tools for optimum performance on all hypervisors" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Xen tools inclusion allows performance monitoring" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Latest versions of HAProxy, iptables, IPsec, and Apache from debian repository ensures improved security and speed" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Latest version of JRE from Sun/Oracle ensures improved security and speed" +msgstr "" + diff --git a/docs/pot/tagging-resources.pot b/docs/pot/tagging-resources.pot new file mode 100644 index 000000000..935fc5f51 --- /dev/null +++ b/docs/pot/tagging-resources.pot @@ -0,0 +1,140 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using Tags to Organize Resources in the Cloud" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A tag is a key-value pair that stores metadata about a resource in the cloud. Tags are useful for categorizing resources. For example, you can tag a user VM with a value that indicates the user's city of residence. In this case, the key would be \"city\" and the value might be \"Toronto\" or \"Tokyo.\" You can then request &PRODUCT; to find all resources that have a given tag; for example, VMs for users in a given city." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can tag a user virtual machine, volume, snapshot, guest network, template, ISO, firewall rule, port forwarding rule, public IP address, security group, load balancer rule, project, VPC, network ACL, or static route. You can not tag a remote access VPN." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can work with tags through the UI or through the API commands createTags, deleteTags, and listTags. You can define multiple tags for each resource. There is no limit on the number of tags you can define. Each tag can be up to 255 characters long. Users can define tags on the resources they own, and administrators can define tags on any resources in the cloud." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "An optional input parameter, \"tags,\" exists on many of the list* API commands. The following example shows how to use this new parameter to find all the volumes having tag region=canada OR tag city=Toronto:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "command=listVolumes\n" +" &listAll=true\n" +" &tags[0].key=region\n" +" &tags[0].value=canada\n" +" &tags[1].key=city\n" +" &tags[1].value=Toronto" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following API commands have the \"tags\" input parameter:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVirtualMachines" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVolumes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listSnapshots" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listNetworks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listTemplates" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listIsos" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listFirewallRules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listPortForwardingRules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listPublicIpAddresses" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listSecurityGroups" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listLoadBalancerRules" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listProjects" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listVPCs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listNetworkACLs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "listStaticRoutes" +msgstr "" + diff --git a/docs/pot/template-iso-snapshot-usage-record-format.pot b/docs/pot/template-iso-snapshot-usage-record-format.pot new file mode 100644 index 000000000..c76cb5baa --- /dev/null +++ b/docs/pot/template-iso-snapshot-usage-record-format.pot @@ -0,0 +1,95 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Template, ISO, and Snapshot Usage Record Format" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "account – name of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "accountid – ID of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "domainid – ID of the domain in which this account resides" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "zoneid – Zone where the usage occurred" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "description – A string describing what the usage record is tracking" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usage – String representation of the usage, including the units of usage (e.g. 'Hrs' for hours)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usagetype – A number representing the usage type (see Usage Types)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "rawusage – A number representing the actual usage in hours" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usageid – The ID of the the template, ISO, or snapshot" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "offeringid – The ID of the disk offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "templateid – – Included only for templates (usage type 7). Source template ID." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "size – Size of the template, ISO, or snapshot" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "startdate, enddate – The range of time for which the usage is aggregated; see Dates in the Usage Record" +msgstr "" + diff --git a/docs/pot/templates.pot b/docs/pot/templates.pot new file mode 100644 index 000000000..90eac76c4 --- /dev/null +++ b/docs/pot/templates.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Templates" +msgstr "" + diff --git a/docs/pot/time-zones.pot b/docs/pot/time-zones.pot new file mode 100644 index 000000000..b5573031c --- /dev/null +++ b/docs/pot/time-zones.pot @@ -0,0 +1,330 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Time Zones" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following time zone identifiers are accepted by &PRODUCT;. There are several places that have a time zone as a required or optional parameter. These include scheduling recurring snapshots, creating a user, and specifying the usage time zone in the Configuration table." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Etc/GMT+12" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Etc/GMT+11" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Pacific/Samoa" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Pacific/Honolulu" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "US/Alaska" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Los_Angeles" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Mexico/BajaNorte" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "US/Arizona" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "US/Mountain" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Chihuahua" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Chicago" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Costa_Rica" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Mexico_City" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Canada/Saskatchewan" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Bogota" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/New_York" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Caracas" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Asuncion" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Cuiaba" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Halifax" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/La_Paz" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Santiago" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/St_Johns" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Araguaina" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Argentina/Buenos_Aires" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Cayenne" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Godthab" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "America/Montevideo" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Etc/GMT+2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Atlantic/Azores" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Atlantic/Cape_Verde" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Africa/Casablanca" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Etc/UTC" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Atlantic/Reykjavik" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Europe/London" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "CET" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Europe/Bucharest" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Africa/Johannesburg" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Asia/Beirut" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Africa/Cairo" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Asia/Jerusalem" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Europe/Minsk" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Europe/Moscow" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Africa/Nairobi" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Asia/Karachi" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Asia/Kolkata" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Asia/Bangkok" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Asia/Shanghai" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Asia/Kuala_Lumpur" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Australia/Perth" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Asia/Taipei" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Asia/Tokyo" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Asia/Seoul" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Australia/Adelaide" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Australia/Darwin" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Australia/Brisbane" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Australia/Canberra" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Pacific/Guam" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Pacific/Auckland" +msgstr "" + diff --git a/docs/pot/tools.pot b/docs/pot/tools.pot new file mode 100644 index 000000000..08a478c92 --- /dev/null +++ b/docs/pot/tools.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Tools" +msgstr "" + diff --git a/docs/pot/topology-req.pot b/docs/pot/topology-req.pot new file mode 100644 index 000000000..3eb0f27eb --- /dev/null +++ b/docs/pot/topology-req.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Topology Requirements" +msgstr "" + diff --git a/docs/pot/troubleshooting-alerts.pot b/docs/pot/troubleshooting-alerts.pot new file mode 100644 index 000000000..be428933b --- /dev/null +++ b/docs/pot/troubleshooting-alerts.pot @@ -0,0 +1,68 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Alerts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following is the list of alert type numbers." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"MEMORY = 0\n" +"CPU = 1\n" +"STORAGE =2\n" +"STORAGE_ALLOCATED = 3\n" +"PUBLIC_IP = 4\n" +"PRIVATE_IP = 5\n" +"HOST = 6\n" +"USERVM = 7\n" +"DOMAIN_ROUTER = 8\n" +"CONSOLE_PROXY = 9\n" +"ROUTING = 10// lost connection to default route (to the gateway)\n" +"STORAGE_MISC = 11 // lost connection to default route (to the gateway)\n" +"USAGE_SERVER = 12 // lost connection to default route (to the gateway)\n" +"MANAGMENT_NODE = 13 // lost connection to default route (to the gateway)\n" +"DOMAIN_ROUTER_MIGRATE = 14\n" +"CONSOLE_PROXY_MIGRATE = 15\n" +"USERVM_MIGRATE = 16\n" +"VLAN = 17\n" +"SSVM = 18\n" +"USAGE_SERVER_RESULT = 19\n" +"STORAGE_DELETE = 20;\n" +"UPDATE_RESOURCE_COUNT = 21; //Generated when we fail to update the resource count\n" +"USAGE_SANITY_RESULT = 22;\n" +"DIRECT_ATTACHED_PUBLIC_IP = 23;\n" +"LOCAL_STORAGE = 24;\n" +"RESOURCE_LIMIT_EXCEEDED = 25; //Generated when the resource limit exceeds the limit. Currently used for recurring snapshots only\n" +"\n" +" " +msgstr "" + diff --git a/docs/pot/troubleshooting-lb-rules-fails.pot b/docs/pot/troubleshooting-lb-rules-fails.pot new file mode 100644 index 000000000..224d0b880 --- /dev/null +++ b/docs/pot/troubleshooting-lb-rules-fails.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Load balancer rules fail after changing network offering" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Symptom" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After changing the network offering on a network, load balancer rules stop working." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Cause" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Load balancing rules were created while using a network service offering that includes an external load balancer device such as NetScaler, and later the network service offering changed to one that uses the &PRODUCT; virtual router." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Solution" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a firewall rule on the virtual router for each of your existing load balancing rules so that they continue to function." +msgstr "" + diff --git a/docs/pot/troubleshooting-recover-lost-virtual-router.pot b/docs/pot/troubleshooting-recover-lost-virtual-router.pot new file mode 100644 index 000000000..8affe2a2f --- /dev/null +++ b/docs/pot/troubleshooting-recover-lost-virtual-router.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Recovering a Lost Virtual Router" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Symptom" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A virtual router is running, but the host is disconnected. A virtual router no longer functions as expected." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Cause" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Virtual router is lost or down." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Solution" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are sure that a virtual router is down forever, or no longer functions as expected, destroy it. You must create one afresh while keeping the backup router up and running (it is assumed this is in a redundant router setup):" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Force stop the router. Use the stopRouter API with forced=true parameter to do so." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Before you continue with destroying this router, ensure that the backup router is running. Otherwise the network connection will be lost." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Destroy the router by using the destroyRouter API." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Recreate the missing router by using the restartNetwork API with cleanup=false parameter. For more information about redundant router setup, see Creating a New Network Offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more information about the API syntax, see the API Reference at API Reference." +msgstr "" + diff --git a/docs/pot/troubleshooting-unable-to-deploy-vms.pot b/docs/pot/troubleshooting-unable-to-deploy-vms.pot new file mode 100644 index 000000000..ebc0f2130 --- /dev/null +++ b/docs/pot/troubleshooting-unable-to-deploy-vms.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Unable to deploy VMs from uploaded vSphere template" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Symptom" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When attempting to create a VM, the VM will not deploy." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Cause" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the template was created by uploading an OVA file that was created using vSphere Client, it is possible the OVA contained an ISO image. If it does, the deployment of VMs from the template will fail." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Solution" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Remove the ISO and re-upload the template." +msgstr "" + diff --git a/docs/pot/troubleshooting-unable-to-power-on-vm.pot b/docs/pot/troubleshooting-unable-to-power-on-vm.pot new file mode 100644 index 000000000..f2b5e71b7 --- /dev/null +++ b/docs/pot/troubleshooting-unable-to-power-on-vm.pot @@ -0,0 +1,80 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Unable to power on virtual machine on VMware" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Symptom" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Virtual machine does not power on. You might see errors like:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Unable to open Swap File" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Unable to access a file since it is locked" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Unable to access Virtual machine configuration" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Cause" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A known issue on VMware machines. ESX hosts lock certain critical virtual machine files and file systems to prevent concurrent changes. Sometimes the files are not unlocked when the virtual machine is powered off. When a virtual machine attempts to power on, it can not access these critical files, and the virtual machine is unable to power on." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Solution" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "See the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VMware Knowledge Base Article" +msgstr "" + diff --git a/docs/pot/troubleshooting-working-with-server-logs.pot b/docs/pot/troubleshooting-working-with-server-logs.pot new file mode 100644 index 000000000..367936c48 --- /dev/null +++ b/docs/pot/troubleshooting-working-with-server-logs.pot @@ -0,0 +1,76 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Working with Server Logs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; Management Server logs all web site, middle tier, and database activities for diagnostics purposes in /var/log/cloud/management/. The &PRODUCT; logs a variety of error messages. We recommend this command to find the problematic output in the Management Server log:." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When copying and pasting a command, be sure the command has pasted as a single line before executing. Some document viewers may introduce unwanted line breaks in copied text." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +" grep -i -E 'exception|unable|fail|invalid|leak|warn|error' /var/log/cloud/management/management-server.log\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; processes requests with a Job ID. If you find an error in the logs and you are interested in debugging the issue you can grep for this job ID in the management server log. For example, suppose that you find the following ERROR message:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +" 2010-10-04 13:49:32,595 ERROR [cloud.vm.UserVmManagerImpl] (Job-Executor-11:job-1076) Unable to find any host for [User|i-8-42-VM-untagged]\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Note that the job ID is 1076. You can track back the events relating to job 1076 with the following grep:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +" grep \"job-1076)\" management-server.log\n" +" " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; Agent Server logs its activities in /var/log/cloud/agent/." +msgstr "" + diff --git a/docs/pot/troubleshooting.pot b/docs/pot/troubleshooting.pot new file mode 100644 index 000000000..b233f5a9f --- /dev/null +++ b/docs/pot/troubleshooting.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Troubleshooting" +msgstr "" + diff --git a/docs/pot/troublesht-dataloss-on-exp-primary-storage.pot b/docs/pot/troublesht-dataloss-on-exp-primary-storage.pot new file mode 100644 index 000000000..43272a472 --- /dev/null +++ b/docs/pot/troublesht-dataloss-on-exp-primary-storage.pot @@ -0,0 +1,80 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Data Loss on Exported Primary Storage" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Symptom" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Loss of existing data on primary storage which has been exposed as a Linux NFS server export on an iSCSI volume." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Cause" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "It is possible that a client from outside the intended pool has mounted the storage. When this occurs, the LVM is wiped and all data in the volume is lost" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Solution" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When setting up LUN exports, restrict the range of IP addresses that are allowed access by specifying a subnet mask. For example:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "echo “/export 192.168.1.0/24(rw,async,no_root_squash)†> /etc/exports" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Adjust the above command to suit your deployment needs." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "More Information" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "See the export procedure in the \"Secondary Storage\" section of the &PRODUCT; Installation Guide" +msgstr "" + diff --git a/docs/pot/troublesht-mtn-mode-not-working-on-vCenter.pot b/docs/pot/troublesht-mtn-mode-not-working-on-vCenter.pot new file mode 100644 index 000000000..e49786b60 --- /dev/null +++ b/docs/pot/troublesht-mtn-mode-not-working-on-vCenter.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Maintenance mode not working on vCenter" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Symptom" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Host was placed in maintenance mode, but still appears live in vCenter." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Cause" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; administrator UI was used to place the host in scheduled maintenance mode. This mode is separate from vCenter's maintenance mode." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Solution" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use vCenter to place the host in maintenance mode." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "More Information" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "See " +msgstr "" + diff --git a/docs/pot/tuning.pot b/docs/pot/tuning.pot new file mode 100644 index 000000000..0c4544734 --- /dev/null +++ b/docs/pot/tuning.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Tuning" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This section provides tips on how to improve the performance of your cloud." +msgstr "" + diff --git a/docs/pot/ui.pot b/docs/pot/ui.pot new file mode 100644 index 000000000..59f89ccf5 --- /dev/null +++ b/docs/pot/ui.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "User Interface" +msgstr "" + diff --git a/docs/pot/upgrade-virtual-router-with-service-offering.pot b/docs/pot/upgrade-virtual-router-with-service-offering.pot new file mode 100644 index 000000000..51de0692e --- /dev/null +++ b/docs/pot/upgrade-virtual-router-with-service-offering.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Upgrading a Virtual Router with System Service Offerings" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When &PRODUCT; creates a virtual router, it uses default settings which are defined in a default system service offering. See . All the virtual routers in a single guest network use the same system service offering. You can upgrade the capabilities of the virtual router by creating and applying a custom system service offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Define your custom system service offering. See . In System VM Type, choose Domain Router." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Associate the system service offering with a network offering. See " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Apply the network offering to the network where you want the virtual routers to use the new system service offering. If this is a new network, follow the steps in Adding an Additional Guest Network on page 66. To change the service offering for existing virtual routers, follow the steps in ." +msgstr "" + diff --git a/docs/pot/upload-existing-volume-to-vm.pot b/docs/pot/upload-existing-volume-to-vm.pot new file mode 100644 index 000000000..167f1e9e0 --- /dev/null +++ b/docs/pot/upload-existing-volume-to-vm.pot @@ -0,0 +1,150 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Uploading an Existing Volume to a Virtual Machine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Existing data can be made accessible to a virtual machine. This is called uploading a volume to the VM. For example, this is useful to upload data from a local file system and attach it to a VM. Root administrators, domain administrators, and end users can all upload existing volumes to VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The upload is performed using HTTP. The uploaded volume is placed in the zone's secondary storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You cannot upload a volume if the preconfigured volume limit has already been reached. The default limit for the cloud is set in the global configuration parameter max.account.volumes, but administrators can also set per-domain limits that are different from the global default. See Setting Usage Limits" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To upload a volume:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) Create an MD5 hash (checksum) of the disk image file that you are going to upload. After uploading the data disk, &PRODUCT; will use this value to verify that no data corruption has occurred." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as an administrator or user" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Storage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Upload Volume." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name and Description. Any desired name and a brief description that can be shown in the UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Availability Zone. Choose the zone where you want to store the volume. VMs running on hosts in this zone can attach the volume." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Format. Choose one of the following to indicate the disk image format of the volume." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Disk Image Format" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "XenServer" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VHD" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VMware" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "OVA" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "KVM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "QCOW2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "URL. The secure HTTP or HTTPS URL that &PRODUCT; can use to access your disk. The type of file at the URL must match the value chosen in Format. For example, if Format is VHD, the URL might look like the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "http://yourFileServerIP/userdata/myDataDisk.vhd" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "MD5 checksum. (Optional) Use the hash that you created in step 1." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Wait until the status of the volume shows that the upload is complete. Click Instances - Volumes, find the name you specified in step 5, and make sure the status is Uploaded." +msgstr "" + diff --git a/docs/pot/upload-template.pot b/docs/pot/upload-template.pot new file mode 100644 index 000000000..9d6e56ce3 --- /dev/null +++ b/docs/pot/upload-template.pot @@ -0,0 +1,130 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Uploading Templates" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "vSphere Templates and ISOs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are uploading a template that was created using vSphere Client, be sure the OVA file does not contain an ISO. If it does, the deployment of VMs from the template will fail." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Templates are uploaded based on a URL. HTTP is the supported access protocol. Templates are frequently large files. You can optionally gzip them to decrease upload times." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To upload a template:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Templates." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Create Template." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Provide the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name and Display Text. These will be shown in the UI, so choose something descriptive." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "URL. The Management Server will download the file from the specified URL, such as http://my.web.server/filename.vhd.gz." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Zone. Choose the zone where you want the template to be available, or All Zones to make it available throughout &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "OS Type: This helps &PRODUCT; and the hypervisor perform certain operations and make assumptions that improve the performance of the guest. Select one of the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the operating system of the stopped VM is listed, choose it." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the OS type of the stopped VM is not listed, choose Other." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You should not choose an older version of the OS than the version in the image. For example, choosing CentOS 5.4 to support a CentOS 6.2 image will in general not work. In those cases you should choose Other." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hypervisor" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Format. The format of the template upload file, such as VHD or OVA." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Password Enabled. Choose Yes if your template has the &PRODUCT; password change script installed. See Adding Password Management to Your Templates" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Extractable. Choose Yes if the template is available for extraction. If this option is selected, end users can download a full image of a template." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public. Choose Yes to make this template accessible to all users of this &PRODUCT; installation. The template will appear in the Community Templates list. See " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Featured. Choose Yes if you would like this template to be more prominent for users to select. The template will appear in the Featured Templates list. Only an administrator can make a template Featured." +msgstr "" + diff --git a/docs/pot/usage-record-format.pot b/docs/pot/usage-record-format.pot new file mode 100644 index 000000000..3142d0445 --- /dev/null +++ b/docs/pot/usage-record-format.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Usage Record Format" +msgstr "" + diff --git a/docs/pot/usage-types.pot b/docs/pot/usage-types.pot new file mode 100644 index 000000000..cb246352d --- /dev/null +++ b/docs/pot/usage-types.pot @@ -0,0 +1,245 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Usage Types" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following table shows all usage types." +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "Type ID" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "Type Name" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "Description" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "1" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "RUNNING_VM" +msgstr "" + +#. Tag: entry +#, no-c-format +msgid "Tracks the total running time of a VM per usage record period. If the VM is upgraded during the usage period, you will get a separate Usage Record for the new upgraded VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "2" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ALLOCATED_VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tracks the total time the VM has been created to the time when it has been destroyed. This usage type is also useful in determining usage for specific templates such as Windows-based templates." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "3" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP_ADDRESS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tracks the public IP address owned by the account." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NETWORK_BYTES_SENT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tracks the total number of bytes sent by all the VMs for an account. Cloud.com does not currently track network traffic per VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "5" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NETWORK_BYTES_RECEIVED" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tracks the total number of bytes received by all the VMs for an account. Cloud.com does not currently track network traffic per VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "6" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VOLUME" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tracks the total time a disk volume has been created to the time when it has been destroyed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "7" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "TEMPLATE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tracks the total time a template (either created from a snapshot or uploaded to the cloud) has been created to the time it has been destroyed. The size of the template is also returned." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "8" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ISO" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tracks the total time an ISO has been uploaded to the time it has been removed from the cloud. The size of the ISO is also returned." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "9" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SNAPSHOT" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tracks the total time from when a snapshot has been created to the time it have been destroyed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "11" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "LOAD_BALANCER_POLICY" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tracks the total time a load balancer policy has been created to the time it has been removed. Cloud.com does not track whether a VM has been assigned to a policy." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "12" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "PORT_FORWARDING_RULE" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Tracks the time from when a port forwarding rule was created until the time it was removed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "13" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NETWORK_OFFERING" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The time from when a network offering was assigned to a VM until it is removed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "14" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPN_USERS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The time from when a VPN user is created until it is removed." +msgstr "" + diff --git a/docs/pot/use-project-view.pot b/docs/pot/use-project-view.pot new file mode 100644 index 000000000..e89b390b0 --- /dev/null +++ b/docs/pot/use-project-view.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using the Project View" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are a member of a project, you can use &PRODUCT;’s project view to see project members, resources consumed, and more. The project view shows only information related to one project. It is a useful way to filter out other information so you can concentrate on a project status and resources." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Project View." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The project dashboard appears, showing the project’s VMs, volumes, users, events, network settings, and more. From the dashboard, you can:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Accounts tab to view and manage project members. If you are the project administrator, you can add new members, remove members, or change the role of a member from user to admin. Only one member at a time can have the admin role, so if you set another user’s role to admin, your role will change to regular user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(If invitations are enabled) Click the Invitations tab to view and manage invitations that have been sent to new project members but not yet accepted. Pending invitations will remain in this list until the new member accepts, the invitation timeout is reached, or you cancel the invitation." +msgstr "" + diff --git a/docs/pot/user-data-and-meta-data.pot b/docs/pot/user-data-and-meta-data.pot new file mode 100644 index 000000000..239cd72a2 --- /dev/null +++ b/docs/pot/user-data-and-meta-data.pot @@ -0,0 +1,100 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:11:59\n" +"PO-Revision-Date: 2013-02-02T20:11:59\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "User Data and Meta Data" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; provides API access to attach user data to a deployed VM. Deployed VMs also have access to instance metadata via the virtual router." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "User data can be accessed once the IP address of the virtual router is known. Once the IP address is known, use the following steps to access the user data:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following command to find the virtual router." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# cat /var/lib/dhclient/dhclient-eth0.leases | grep dhcp-server-identifier | tail -1" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Access user data by running the following command using the result of the above command" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# curl http://10.1.1.1/latest/user-data" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Meta Data can be accessed similarly, using a URL of the form http://10.1.1.1/latest/meta-data/{metadata type}. (For backwards compatibility, the previous URL http://10.1.1.1/latest/{metadata type} is also supported.) For metadata type, use one of the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "service-offering. A description of the VMs service offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "availability-zone. The Zone name" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "local-ipv4. The guest IP of the VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "local-hostname. The hostname of the VM" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "public-ipv4. The first public IP for the router. (E.g. the first IP of eth2)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "public-hostname. This is the same as public-ipv4" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "instance-id. The instance name of the VM" +msgstr "" + diff --git a/docs/pot/user-services-overview.pot b/docs/pot/user-services-overview.pot new file mode 100644 index 000000000..7fc57020e --- /dev/null +++ b/docs/pot/user-services-overview.pot @@ -0,0 +1,70 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "User Services Overview" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Service Offerings, Disk Offerings, Network Offerings, and Templates" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Disk Offerings, defined by the &PRODUCT; administrator, provide a choice of disk size for primary data storage. See Creating a New Disk Offering." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + diff --git a/docs/pot/using-multiple-guest-networks.pot b/docs/pot/using-multiple-guest-networks.pot new file mode 100644 index 000000000..c3a6c5643 --- /dev/null +++ b/docs/pot/using-multiple-guest-networks.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using Multiple Guest Networks" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In zones that use advanced networking, additional networks for guest traffic may be added at any time after the initial installation. You can also customize the domain name associated with the network by specifying a DNS suffix for each network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A VM's networks are defined at VM creation time. A VM cannot add or remove networks after it has been created, although the user can go into the guest and remove the IP address from the NIC on a particular network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Each VM has just one default network. The virtual router's DHCP reply will set the guest's default gateway as that for the default network. Multiple non-default networks may be added to a guest in addition to the single, required default network. The administrator can control which networks are available as the default network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Additional networks can either be available to all accounts or be assigned to a specific account. Networks that are available to all accounts are zone-wide. Any user with access to the zone can create a VM with access to that network. These zone-wide networks provide little or no isolation between guests.Networks that are assigned to a specific account provide strong isolation." +msgstr "" + diff --git a/docs/pot/using-netscaler-load-balancers.pot b/docs/pot/using-netscaler-load-balancers.pot new file mode 100644 index 000000000..289490169 --- /dev/null +++ b/docs/pot/using-netscaler-load-balancers.pot @@ -0,0 +1,110 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "About Using a NetScaler Load Balancer" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Citrix NetScaler is supported as an external network element for load balancing in zones that use advanced networking (also called advanced zones). Set up an external load balancer when you want to provide load balancing through means other than &PRODUCT;’s provided virtual router." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The NetScaler can be set up in direct (outside the firewall) mode. It must be added before any load balancing rules are deployed on guest VMs in the zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The functional behavior of the NetScaler with &PRODUCT; is the same as described in the &PRODUCT; documentation for using an F5 external load balancer. The only exception is that the F5 supports routing domains, and NetScaler does not. NetScaler can not yet be used as a firewall." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Citrix NetScaler comes in three varieties. The following table summarizes how these variants are treated in &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NetScaler ADC Type" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Description of Capabilities" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; Supported Features" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "MPX" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Physical appliance. Capable of deep packet inspection. Can act as application firewall and load balancer" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In advanced zones, load balancer functionality fully supported without limitation. In basic zones, static NAT, elastic IP (EIP), and elastic load balancing (ELB) are also provided" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPX" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Virtual appliance. Can run as VM on XenServer, ESXi, and Hyper-V hypervisors. Same functionality as MPX" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Supported only on ESXi. Same functional support as for MPX. &PRODUCT; will treat VPX and MPX as the same device type" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "SDX" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Physical appliance. Can create multiple fully isolated VPX instances on a single appliance to support multi-tenant usage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; will dynamically provision, configure, and manage the lifecycle of VPX instances on the SDX. Provisioned instances are added into &PRODUCT; automatically – no manual configuration by the administrator is required. Once a VPX instance is added into &PRODUCT;, it is treated the same as a VPX on an ESXi host." +msgstr "" + diff --git a/docs/pot/using-sshkeys.pot b/docs/pot/using-sshkeys.pot new file mode 100644 index 000000000..d594e8a12 --- /dev/null +++ b/docs/pot/using-sshkeys.pot @@ -0,0 +1,238 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using SSH Keys for Authentication" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In addition to the username and password authentication, &PRODUCT; supports using SSH keys to log in to the cloud infrastructure for additional security. You can use the createSSHKeyPair API to generate the SSH keys." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Because each cloud user has their own SSH key, one cloud user cannot log in to another cloud user's instances unless they share their SSH key files. Using a single SSH key pair, you can manage multiple instances." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Creating an Instance Template that Supports SSH Keys" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a instance template that supports SSH Keys." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Create a new instance by using the template provided by cloudstack." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more information on creating a new instance, see" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Download the cloudstack script from The SSH Key Gen Scriptto the instance you have created." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "wget http://downloads.sourceforge.net/project/cloudstack/SSH%20Key%20Gen%20Script/cloud-set-guest-sshkey.in?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fcloudstack%2Ffiles%2FSSH%2520Key%2520Gen%2520Script%2F&ts=1331225219&use_mirror=iweb" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Copy the file to /etc/init.d." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "cp cloud-set-guest-sshkey.in /etc/init.d/" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Give the necessary permissions on the script:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "chmod +x /etc/init.d/cloud-set-guest-sshkey.in" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the script while starting up the operating system:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "chkconfig --add cloud-set-guest-sshkey.in" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Stop the instance." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Creating the SSH Keypair" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You must make a call to the createSSHKeyPair api method. You can either use the &PRODUCT; Python API library or the curl commands to make the call to the cloudstack api." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For example, make a call from the cloudstack server to create a SSH keypair called \"keypair-doc\" for the admin account in the root domain:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that you adjust these values to meet your needs. If you are making the API call from a different server, your URL/PORT will be different, and you will need to use the API keys." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Run the following curl command:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "curl --globoff \"http://localhost:8096/?command=createSSHKeyPair&name=keypair-doc&account=admin&domainid=5163440e-c44b-42b5-9109-ad75cae8e8a2\"" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The output is something similar to what is given below:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?><createsshkeypairresponse cloud-stack-version=\"3.0.0.20120228045507\"><keypair><name>keypair-doc</name><fingerprint>f6:77:39:d5:5e:77:02:22:6a:d8:7f:ce:ab:cd:b3:56</fingerprint><privatekey>-----BEGIN RSA PRIVATE KEY-----\n" +"MIICXQIBAAKBgQCSydmnQ67jP6lNoXdX3noZjQdrMAWNQZ7y5SrEu4wDxplvhYci\n" +"dXYBeZVwakDVsU2MLGl/K+wefwefwefwefwefJyKJaogMKn7BperPD6n1wIDAQAB\n" +"AoGAdXaJ7uyZKeRDoy6wA0UmF0kSPbMZCR+UTIHNkS/E0/4U+6lhMokmFSHtu\n" +"mfDZ1kGGDYhMsdytjDBztljawfawfeawefawfawfawQQDCjEsoRdgkduTy\n" +"QpbSGDIa11Jsc+XNDx2fgRinDsxXI/zJYXTKRhSl/LIPHBw/brW8vzxhOlSOrwm7\n" +"VvemkkgpAkEAwSeEw394LYZiEVv395ar9MLRVTVLwpo54jC4tsOxQCBlloocK\n" +"lYaocpk0yBqqOUSBawfIiDCuLXSdvBo1Xz5ICTM19vgvEp/+kMuECQBzm\n" +"nVo8b2Gvyagqt/KEQo8wzH2THghZ1qQ1QRhIeJG2aissEacF6bGB2oZ7Igim5L14\n" +"4KR7OeEToyCLC2k+02UCQQCrniSnWKtDVoVqeK/zbB32JhW3Wullv5p5zUEcd\n" +"KfEEuzcCUIxtJYTahJ1pvlFkQ8anpuxjSEDp8x/18bq3\n" +"-----END RSA PRIVATE KEY-----\n" +"</privatekey></keypair></createsshkeypairresponse>" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Copy the key data into a file. The file looks like this:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "-----BEGIN RSA PRIVATE KEY-----\n" +"MIICXQIBAAKBgQCSydmnQ67jP6lNoXdX3noZjQdrMAWNQZ7y5SrEu4wDxplvhYci\n" +"dXYBeZVwakDVsU2MLGl/K+wefwefwefwefwefJyKJaogMKn7BperPD6n1wIDAQAB\n" +"AoGAdXaJ7uyZKeRDoy6wA0UmF0kSPbMZCR+UTIHNkS/E0/4U+6lhMokmFSHtu\n" +"mfDZ1kGGDYhMsdytjDBztljawfawfeawefawfawfawQQDCjEsoRdgkduTy\n" +"QpbSGDIa11Jsc+XNDx2fgRinDsxXI/zJYXTKRhSl/LIPHBw/brW8vzxhOlSOrwm7\n" +"VvemkkgpAkEAwSeEw394LYZiEVv395ar9MLRVTVLwpo54jC4tsOxQCBlloocK\n" +"lYaocpk0yBqqOUSBawfIiDCuLXSdvBo1Xz5ICTM19vgvEp/+kMuECQBzm\n" +"nVo8b2Gvyagqt/KEQo8wzH2THghZ1qQ1QRhIeJG2aissEacF6bGB2oZ7Igim5L14\n" +"4KR7OeEToyCLC2k+02UCQQCrniSnWKtDVoVqeK/zbB32JhW3Wullv5p5zUEcd\n" +"KfEEuzcCUIxtJYTahJ1pvlFkQ8anpuxjSEDp8x/18bq3\n" +"-----END RSA PRIVATE KEY-----" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Save the file." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Creating an Instance" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "After you save the SSH keypair file, you must create an instance by using the template that you created at . Ensure that you use the same SSH key name that you created at ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You cannot create the instance by using the GUI at this time and associate the instance with the newly created SSH keypair." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A sample curl command to create a new instance is:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "curl --globoff http://localhost:<port numbet>/?command=deployVirtualMachine\\&zoneId=1\\&serviceOfferingId=18727021-7556-4110-9322-d625b52e0813\\&templateId=e899c18a-ce13-4bbf-98a9-625c5026e0b5\\&securitygroupids=ff03f02f-9e3b-48f8-834d-91b822da40c5\\&account=admin\\&domainid=1\\&keypair=keypair-doc" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Substitute the template, service offering and security group IDs (if you are using the security group feature) that are in your cloud environment." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Logging In Using the SSH Keypair" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To test your SSH key generation is successful, check whether you can log in to the cloud setup." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For exaple, from a Linux OS, run:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "ssh -i ~/.ssh/keypair-doc <ip address>" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The -i parameter tells the ssh client to use a ssh key found at ~/.ssh/keypair-doc." +msgstr "" + diff --git a/docs/pot/using-swift-for-secondary-storage.pot b/docs/pot/using-swift-for-secondary-storage.pot new file mode 100644 index 000000000..72863d80b --- /dev/null +++ b/docs/pot/using-swift-for-secondary-storage.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using Swift for Secondary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; supports OpenStack Object Storage ( Swift) for secondary storage. When using Swift, you configure Swift storage for the entire &PRODUCT;, then set up NFS secondary storage for each zone as usual. The NFS storage in each zone acts as a staging area through which all templates and other secondary storage data pass before being forwarded to Swift. The Swift storage acts as a cloud-wide resource, making templates and other data available to any zone in the cloud. There is no hierarchy in the Swift storage, just one Swift container per storage object. Any secondary storage in the whole cloud can pull a container from Swift at need. It is not necessary to copy templates and snapshots from one zone to another, as would be required when using zone NFS alone. Everything is available everywhere" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Swift storage must be set up before you add NFS secondary storage to zones. This is accomplished through some additional configuration steps on a fresh Management Server installation, before you add the first zone. The procedure is described in Adding a Zone in the Advanced Installation Guide." +msgstr "" + diff --git a/docs/pot/using-vpn-with-mac.pot b/docs/pot/using-vpn-with-mac.pot new file mode 100644 index 000000000..d54cfb378 --- /dev/null +++ b/docs/pot/using-vpn-with-mac.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using VPN with Mac OS X" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Mac OS X, in Network Preferences - Advanced, make sure Send all traffic over VPN connection is not checked." +msgstr "" + diff --git a/docs/pot/using-vpn-with-windows.pot b/docs/pot/using-vpn-with-windows.pot new file mode 100644 index 000000000..ccde5a211 --- /dev/null +++ b/docs/pot/using-vpn-with-windows.pot @@ -0,0 +1,95 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using VPN with Windows" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The procedure to use VPN varies by Windows version. Generally, the user must edit the VPN properties and make sure that the default route is not the VPN. The following steps are for Windows L2TP clients on Windows Vista. The commands should be similar for other Windows versions." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI and click on the source NAT IP for the account. The VPN tab should display the IPsec preshared key. Make a note of this and the source NAT IP. The UI also lists one or more users and their passwords. Choose one of these users, or, if none exists, add a user and password." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On the Windows box, go to Control Panel, then select Network and Sharing center. Click Setup a connection or network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the next dialog, select No, create a new connection." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the next dialog, select Use my Internet Connection (VPN)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the next dialog, enter the source NAT IP from step 1 and give the connection a name. Check Don't connect now." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the next dialog, enter the user name and password selected in step 1." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Create." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Go back to the Control Panel and click Network Connections to see the new connection. The connection is not active yet." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Right-click the new connection and select Properties. In the Properties dialog, select the Networking tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In Type of VPN, choose L2TP IPsec VPN, then click IPsec settings. Select Use preshared key. Enter the preshared key from Step 1." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The connection is ready for activation. Go back to Control Panel -> Network Connections and double-click the created connection." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Enter the user name and password from Step 1." +msgstr "" + diff --git a/docs/pot/vcenter-maintenance-mode.pot b/docs/pot/vcenter-maintenance-mode.pot new file mode 100644 index 000000000..71536afea --- /dev/null +++ b/docs/pot/vcenter-maintenance-mode.pot @@ -0,0 +1,80 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "vCenter and Maintenance Mode" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To enter maintenance mode on a vCenter host, both vCenter and &PRODUCT; must be used in concert. &PRODUCT; and vCenter have separate maintenance modes that work closely together." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Place the host into &PRODUCT;'s \"scheduled maintenance\" mode. This does not invoke the vCenter maintenance mode, but only causes VMs to be migrated off the host" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When the &PRODUCT; maintenance mode is requested, the host first moves into the Prepare for Maintenance state. In this state it cannot be the target of new guest VM starts. Then all VMs will be migrated off the server. Live migration will be used to move VMs off the host. This allows the guests to be migrated to other hosts with no disruption to the guests. After this migration is completed, the host will enter the Ready for Maintenance mode." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Wait for the \"Ready for Maintenance\" indicator to appear in the UI." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Now use vCenter to perform whatever actions are necessary to maintain the host. During this time, the host cannot be the target of new VM allocations." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When the maintenance tasks are complete, take the host out of maintenance mode as follows:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "First use vCenter to exit the vCenter maintenance mode." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This makes the host ready for &PRODUCT; to reactivate it." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Then use &PRODUCT;'s administrator UI to cancel the &PRODUCT; maintenance mode" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When the host comes back online, the VMs that were migrated off of it may be migrated back to it manually and new VMs can be added." +msgstr "" + diff --git a/docs/pot/verifying-source.pot b/docs/pot/verifying-source.pot new file mode 100644 index 000000000..9b2d586aa --- /dev/null +++ b/docs/pot/verifying-source.pot @@ -0,0 +1,115 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Verifying the downloaded release" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There are a number of mechanisms to check the authenticity and validity of a downloaded release." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Getting the KEYS" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To enable you to verify the GPG signature, you will need to download the KEYS file." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You next need to import those keys, which you can do by running the following command:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# gpg --import KEYS" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "GPG" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; project provides a detached GPG signature of the release. To check the signature, run the following command:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ gpg --verify apache-cloudstack-4.0.0-incubating-src.tar.bz2.asc" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the signature is valid you will see a line of output that contains 'Good signature'." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "MD5" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In addition to the cryptographic signature, &PRODUCT; has an MD5 checksum that you can use to verify the download matches the release. You can verify this hash by executing the following command:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ gpg --print-md MD5 apache-cloudstack-4.0.0-incubating-src.tar.bz2 | diff - apache-cloudstack-4.0.0-incubating-src.tar.bz2.md5" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If this successfully completes you should see no output. If there is any output from them, then there is a difference between the hash you generated locally and the hash that has been pulled from the server." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "SHA512" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In addition to the MD5 hash, the &PRODUCT; project provides a SHA512 cryptographic hash to aid in assurance of the validity of the downloaded release. You can verify this hash by executing the following command:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "$ gpg --print-md SHA512 apache-cloudstack-4.0.0-incubating-src.tar.bz2 | diff - apache-cloudstack-4.0.0-incubating-src.tar.bz2.sha" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If this command successfully completes you should see no output. If there is any output from them, then there is a difference between the hash you generated locally and the hash that has been pulled from the server." +msgstr "" + diff --git a/docs/pot/virtual-machine-usage-record-format.pot b/docs/pot/virtual-machine-usage-record-format.pot new file mode 100644 index 000000000..5a8763a48 --- /dev/null +++ b/docs/pot/virtual-machine-usage-record-format.pot @@ -0,0 +1,110 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Virtual Machine Usage Record Format" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For running and allocated virtual machine usage, the following fields exist in a usage record:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "account – name of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "accountid – ID of the account" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "domainid – ID of the domain in which this account resides" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "zoneid – Zone where the usage occurred" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "description – A string describing what the usage record is tracking" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usage – String representation of the usage, including the units of usage (e.g. 'Hrs' for VM running time)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usagetype – A number representing the usage type (see Usage Types)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "rawusage – A number representing the actual usage in hours" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "virtualMachineId – The ID of the virtual machine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "name – The name of the virtual machine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "offeringid – The ID of the service offering" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "templateid – The ID of the template or the ID of the parent template. The parent template value is present when the current template was created from a volume." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "usageid – Virtual machine" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "type – Hypervisor" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "startdate, enddate – The range of time for which the usage is aggregated; see Dates in the Usage Record" +msgstr "" + diff --git a/docs/pot/virtual-machines.pot b/docs/pot/virtual-machines.pot new file mode 100644 index 000000000..9991bc8ff --- /dev/null +++ b/docs/pot/virtual-machines.pot @@ -0,0 +1,30 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Working With Virtual Machines" +msgstr "" + diff --git a/docs/pot/virtual-router.pot b/docs/pot/virtual-router.pot new file mode 100644 index 000000000..d5748aef1 --- /dev/null +++ b/docs/pot/virtual-router.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Virtual Router" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The virtual router is a type of System Virtual Machine. The virtual router is one of the most frequently used service providers in &PRODUCT;. The end user has no direct access to the virtual router. Users can ping the virtual router and take actions that affect it (such as setting up port forwarding), but users do not have SSH access into the virtual router." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "There is no mechanism for the administrator to log in to the virtual router. Virtual routers can be restarted by administrators, but this will interrupt public network access and other services for end users. A basic test in debugging networking issues is to attempt to ping the virtual router from a guest VM. Some of the characteristics of the virtual router are determined by its associated system service offering." +msgstr "" + diff --git a/docs/pot/vlan-allocation-eg.pot b/docs/pot/vlan-allocation-eg.pot new file mode 100644 index 000000000..52608ca03 --- /dev/null +++ b/docs/pot/vlan-allocation-eg.pot @@ -0,0 +1,130 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "VLAN Allocation Example" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLANs are required for public and guest traffic. The following is an example of a VLAN allocation scheme:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN IDs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Traffic type" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Scope" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "less than 500" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Management traffic. Reserved for administrative purposes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; software can access this, hypervisors, system VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "500-599" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN carrying public traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; accounts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "600-799" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLANs carrying guest traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; accounts. Account-specific VLAN is chosen from this pool." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "800-899" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; accounts. Account-specific VLAN chosen by &PRODUCT; admin to assign to that account." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "900-999" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN carrying guest traffic" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; accounts. Can be scoped by project, domain, or all accounts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "greater than 1000" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Reserved for future use" +msgstr "" + diff --git a/docs/pot/vlan-provisioning.pot b/docs/pot/vlan-provisioning.pot new file mode 100644 index 000000000..406027d32 --- /dev/null +++ b/docs/pot/vlan-provisioning.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "VLAN Provisioning" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; automatically creates and destroys interfaces bridged to VLANs on the hosts. In general the administrator does not need to manage this process." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; manages VLANs differently based on hypervisor type. For XenServer or KVM, the VLANs are created on only the hosts where they will be used and then they are destroyed when all guests that require them have been terminated or moved to another host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For vSphere the VLANs are provisioned on all hosts in the cluster even if there is no guest running on a particular Host that requires the VLAN. This allows the administrator to perform live migration and other functions in vCenter without having to create the VLAN on the destination Host. Additionally, the VLANs are not removed from the Hosts when they are no longer needed." +msgstr "" + diff --git a/docs/pot/vm-lifecycle.pot b/docs/pot/vm-lifecycle.pot new file mode 100644 index 000000000..0430f6671 --- /dev/null +++ b/docs/pot/vm-lifecycle.pot @@ -0,0 +1,75 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "VM Lifecycle" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Virtual machines can be in the following states:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Once a virtual machine is destroyed, it cannot be recovered. All the resources used by the virtual machine will be reclaimed by the system. This includes the virtual machine’s IP address." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A stop will attempt to gracefully shut down the operating system, which typically involves terminating all the running applications. If the operation system cannot be stopped, it will be forcefully terminated. This has the same effect as pulling the power cord to a physical machine." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A reboot is a stop followed by a start." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; preserves the state of the virtual machine hard disk until the machine is destroyed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A running virtual machine may fail because of hardware or network issues. A failed virtual machine is in the down state." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The system places the virtual machine into the down state if it does not receive the heartbeat from the hypervisor for three minutes." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The user can manually restart the virtual machine from the down state." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The system will start the virtual machine from the down state automatically if the virtual machine is marked as HA-enabled." +msgstr "" + diff --git a/docs/pot/vm-storage-migration.pot b/docs/pot/vm-storage-migration.pot new file mode 100644 index 000000000..4e0ca1f5f --- /dev/null +++ b/docs/pot/vm-storage-migration.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "VM Storage Migration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Supported in XenServer, KVM, and VMware." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This procedure is different from moving disk volumes from one VM to another. See Detaching and Moving Volumes ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can migrate a virtual machine’s root disk volume or any additional data disk volume from one storage pool to another in the same zone." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can use the storage migration feature to achieve some commonly desired administration goals, such as balancing the load on storage pools and increasing the reliability of virtual machines by moving them away from any storage pool that is experiencing issues." +msgstr "" + diff --git a/docs/pot/vmware-install.pot b/docs/pot/vmware-install.pot new file mode 100644 index 000000000..c5c97349e --- /dev/null +++ b/docs/pot/vmware-install.pot @@ -0,0 +1,618 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "VMware vSphere Installation and Configuration" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you want to use the VMware vSphere hypervisor to run guest virtual machines, install vSphere on the host(s) in your cloud." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Preparation Checklist for VMware" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For a smoother installation, gather the following information before you start:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Information listed in " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Information listed in " +msgstr "" + +#. Tag: title +#, no-c-format +msgid "vCenter Checklist" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You will need the following information about vCenter." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vCenter Requirement" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Value" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Notes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vCenter User" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This user must have admin privileges." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vCenter User Password" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Password for the above user." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vCenter Datacenter Name" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name of the datacenter." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vCenter Cluster Name" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Name of the cluster." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Networking Checklist for VMware" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You will need the following information about VLAN." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN Information" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ESXi VLAN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN on which all your ESXi hypervisors reside." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ESXI VLAN IP Address" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "IP Address Range in the ESXi VLAN. One address per Virtual Router is used from this range." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ESXi VLAN IP Gateway" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ESXi VLAN Netmask" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Management Server VLAN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN on which the &PRODUCT; Management server is installed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public VLAN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN for the Public Network." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public VLAN Gateway" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public VLAN Netmask" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public VLAN IP Address Range" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Range of Public IP Addresses available for &PRODUCT; use. These addresses will be used for virtual router on &PRODUCT; to route private traffic to external networks." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN Range for Customer use" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A contiguous range of non-routable VLANs. One VLAN will be assigned for each customer." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "vSphere Installation Steps" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you haven't already, you'll need to download and purchase vSphere from the VMware Website (https://www.vmware.com/tryvmware/index.php?p=vmware-vsphere&lp=1) and install it by following the VMware vSphere Installation Guide." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Following installation, perform the following configuration, which are described in the next few sections:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Required" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Optional" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ESXi host setup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NIC bonding" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure host physical networking, virtual switch, vCenter Management Network, and extended port range" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Multipath storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Prepare storage for iSCSI" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Configure clusters in vCenter and add hosts to them, or add hosts without clusters to vCenter" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "ESXi Host setup" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All ESXi hosts should enable CPU hardware virtualization support in BIOS. Please note hardware virtualization support is not enabled by default on most servers." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Physical Host Networking" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You should have a plan for cabling the vSphere hosts. Proper network configuration is required before adding a vSphere host to &PRODUCT;. To configure an ESXi host, you can use vClient to add it as standalone host to vCenter first. Once you see the host appearing in the vCenter inventory tree, click the host node in the inventory tree, and navigate to the Configuration tab." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the host configuration tab, click the \"Hardware/Networking\" link to bring up the networking configuration page as above." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Configure Virtual Switch" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A default virtual switch vSwitch0 is created. &PRODUCT; requires all ESXi hosts in the cloud to use the same set of virtual switch names. If you change the default virtual switch name, you will need to configure one or more &PRODUCT; configuration variables as well." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Separating Traffic" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; allows you to use vCenter to configure three separate networks per ESXi host. These networks are identified by the name of the vSwitch they are connected to. The allowed networks for configuration are public (for traffic to/from the public internet), guest (for guest-guest traffic), and private (for management and usually storage traffic). You can use the default virtual switch for all three, or create one or two other vSwitches for those traffic types." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you want to separate traffic in this way you should first create and configure vSwitches in vCenter according to the vCenter instructions. Take note of the vSwitch names you have used for each traffic type. You will configure &PRODUCT; to use these vSwitches." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Increasing Ports" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "By default a virtual switch on ESXi hosts is created with 56 ports. We recommend setting it to 4088, the maximum number of ports allowed. To do that, click the \"Properties...\" link for virtual switch (note this is not the Properties link for Networking)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In vSwitch properties dialog, select the vSwitch and click Edit. You should see the following dialog:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In this dialog, you can change the number of switch ports. After you've done that, ESXi hosts are required to reboot in order for the setting to take effect." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Configure vCenter Management Network" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the vSwitch properties dialog box, you may see a vCenter management network. This same network will also be used as the &PRODUCT; management network. &PRODUCT; requires the vCenter management network to be configured properly. Select the management network item in the dialog, then click Edit." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure the following values are set:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VLAN ID set to the desired ID" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vMotion enabled." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Management traffic enabled." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If the ESXi hosts have multiple VMKernel ports, and ESXi is not using the default value \"Management Network\" as the management network name, you must follow these guidelines to configure the management network port group so that &PRODUCT; can find it:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use one label for the management network port across all ESXi hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the &PRODUCT; UI, go to Configuration - Global Settings and set vmware.management.portgroup to the management network label from the ESXi hosts." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Extend Port Range for &PRODUCT; Console Proxy" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Applies only to VMware vSphere version 4.x)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You need to extend the range of firewall ports that the console proxy works with on the hosts. This is to enable the console proxy to work with VMware-based VMs. The default additional port range is 59000-60000. To extend the port range, log in to the VMware ESX service console on each host and run the following commands:" +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "\n" +"esxcfg-firewall -o 59000-60000,tcp,in,vncextras\n" +"esxcfg-firewall -o 59000-60000,tcp,out,vncextras\n" +" " +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Configure NIC Bonding for vSphere" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NIC bonding on vSphere hosts may be done according to the vSphere installation guide." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Storage Preparation for vSphere (iSCSI only)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use of iSCSI requires preparatory work in vCenter. You must add an iSCSI target and create an iSCSI datastore." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If you are using NFS, skip this section." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Enable iSCSI initiator for ESXi hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In vCenter, go to hosts and Clusters/Configuration, and click Storage Adapters link. You will see:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select iSCSI software adapter and click Properties." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the Configure... button." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Check Enabled to enable the initiator." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click OK to save." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Add iSCSI target" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Under the properties dialog, add the iSCSI target info:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Repeat these steps for all ESXi hosts in the cluster." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Create an iSCSI datastore" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You should now create a VMFS datastore. Follow these steps to do so:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Select Home/Inventory/Datastores." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Right click on the datacenter node." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose Add Datastore... command." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Follow the wizard to create a iSCSI datastore." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "This procedure should be done on one host in the cluster. It is not necessary to do this on all hosts." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Multipathing for vSphere (Optional)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Storage multipathing on vSphere nodes may be done according to the vSphere installation guide." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Add Hosts or Configure Clusters (vSphere)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Use vCenter to create a vCenter cluster and add your desired hosts to the cluster. You will later add the entire cluster to &PRODUCT;. (see )." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Applying Hotfixes to a VMware vSphere Host" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Disconnect the VMware vSphere cluster from &PRODUCT;. It should remain disconnected long enough to apply the hotfix on the host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as root." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Navigate to the VMware cluster, click Actions, and select Unmanage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Watch the cluster status until it shows Unmanaged." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Perform the following on each of the ESXi hosts in the cluster:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Move each of the ESXi hosts in the cluster to maintenance mode." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Ensure that all the VMs are migrated to other hosts in that cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If there is only one host in that cluster, shutdown all the VMs and move the host into maintenance mode." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Apply the patch on the ESXi host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the host if prompted." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Cancel the maintenance mode on the host." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Reconnect the cluster to &PRODUCT;:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Navigate to the VMware cluster, click Actions, and select Manage." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Watch the status to see that all the hosts come up. It might take several minutes for the hosts to come up." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Alternatively, verify the host state is properly synchronized and updated in the &PRODUCT; database." +msgstr "" + diff --git a/docs/pot/vmware-requirements.pot b/docs/pot/vmware-requirements.pot new file mode 100644 index 000000000..38aab24fb --- /dev/null +++ b/docs/pot/vmware-requirements.pot @@ -0,0 +1,210 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "System Requirements for vSphere Hosts" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Software requirements:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vSphere and vCenter, both version 4.1 or 5.0." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vSphere Standard is recommended. Note however that customers need to consider the CPU constraints in place with vSphere licensing. See http://www.vmware.com/files/pdf/vsphere_pricing.pdf and discuss with your VMware sales representative." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vCenter Server Standard is recommended." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Be sure all the hotfixes provided by the hypervisor vendor are applied. Track the release of hypervisor patches through your hypervisor vendor's support channel, and apply patches as soon as possible after they are released. &PRODUCT; will not track or notify you of required hypervisor patches. It is essential that your hosts are completely up to date with the provided hypervisor patches. The hypervisor vendor is likely to refuse to support any system that is not up to date with patches." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Apply All Necessary Hotfixes" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The lack of up-do-date hotfixes can lead to data corruption and lost VMs." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Hardware requirements:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The host must be certified as compatible with vSphere. See the VMware Hardware Compatibility Guide at http://www.vmware.com/resources/compatibility/search.php." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All hosts must be 64-bit and must support HVM (Intel-VT or AMD-V enabled)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All hosts within a cluster must be homogenous. That means the CPUs must be of the same type, count, and feature flags." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "64-bit x86 CPU (more cores results in better performance)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Hardware virtualization support required" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "4 GB of memory" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "36 GB of local disk" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "At least 1 NIC" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Statically allocated IP Address" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "vCenter Server requirements:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Processor - 2 CPUs 2.0GHz or higher Intel or AMD x86 processors. Processor requirements may be higher if the database runs on the same machine." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Memory - 3GB RAM. RAM requirements may be higher if your database runs on the same machine." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Disk storage - 2GB. Disk requirements may be higher if your database runs on the same machine." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Microsoft SQL Server 2005 Express disk requirements. The bundled database requires up to 2GB free disk space to decompress the installation archive." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Networking - 1Gbit or 10Gbit." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more information, see \"vCenter Server and the vSphere Client Hardware Requirements\" at http://pubs.vmware.com/vsp40/wwhelp/wwhimpl/js/html/wwhelp.htm#href=install/c_vc_hw.html." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Other requirements:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VMware vCenter Standard Edition 4.1 or 5.0 must be installed and available to manage the vSphere hosts." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "vCenter must be configured to use the standard port 443 so that it can communicate with the &PRODUCT; Management Server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You must re-install VMware ESXi if you are going to re-use a host from a previous install." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; requires VMware vSphere 4.1 or 5.0. VMware vSphere 4.0 is not supported." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All hosts must be 64-bit and must support HVM (Intel-VT or AMD-V enabled). All hosts within a cluster must be homogenous. That means the CPUs must be of the same type, count, and feature flags." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The &PRODUCT; management network must not be configured as a separate virtual network. The &PRODUCT; management network is the same as the vCenter management network, and will inherit its configuration. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; requires ESXi. ESX is not supported." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All resources used for &PRODUCT; must be used for &PRODUCT; only. &PRODUCT; cannot share instance of ESXi or storage with other management consoles. Do not share the same storage volumes that will be used by &PRODUCT; with a different set of ESXi servers that are not managed by &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Put all target ESXi hypervisors in a cluster in a separate Datacenter in vCenter." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The cluster that will be managed by &PRODUCT; should not contain any VMs. Do not run the management server, vCenter or any other VMs on the cluster that is designated for &PRODUCT; use. Create a separate cluster for use of &PRODUCT; and make sure that they are no VMs in this cluster." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All the required VLANS must be trunked into all network switches that are connected to the ESXi hypervisor hosts. These would include the VLANS for Management, Storage, vMotion, and guest VLANs. The guest VLAN (used in Advanced Networking; see Network Setup) is a contiguous range of VLANs that will be managed by &PRODUCT;." +msgstr "" + diff --git a/docs/pot/vmware-topology-req.pot b/docs/pot/vmware-topology-req.pot new file mode 100644 index 000000000..05e0e5548 --- /dev/null +++ b/docs/pot/vmware-topology-req.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "VMware Topology Requirements" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Server and secondary storage VMs must be able to access vCenter and all ESXi hosts in the zone. To allow the necessary access through the firewall, keep port 443 open." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Servers communicate with VMware vCenter servers on port 443 (HTTPs)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Servers communicate with the System VMs on port 3922 (ssh) on the management traffic network." +msgstr "" + diff --git a/docs/pot/volume-deletion-garbage-collection.pot b/docs/pot/volume-deletion-garbage-collection.pot new file mode 100644 index 000000000..16ca68056 --- /dev/null +++ b/docs/pot/volume-deletion-garbage-collection.pot @@ -0,0 +1,60 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Volume Deletion and Garbage Collection" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The deletion of a volume does not delete the snapshots that have been created from the volume" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a VM is destroyed, data disk volumes that are attached to the VM are not deleted." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Volumes are permanently destroyed using a garbage collection process. The global configuration variables expunge.delay and expunge.interval determine when the physical deletion of volumes will occur." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "expunge.delay: determines how old the volume must be before it is destroyed, in seconds" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "expunge.interval: determines how often to run the garbage collection check" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Administrators should adjust these values depending on site policies around data retention." +msgstr "" + diff --git a/docs/pot/volume-status.pot b/docs/pot/volume-status.pot new file mode 100644 index 000000000..086400536 --- /dev/null +++ b/docs/pot/volume-status.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Volume Status" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a snapshot operation is triggered by means of a recurring snapshot policy, a snapshot is skipped if a volume has remained inactive since its last snapshot was taken. A volume is considered to be inactive if it is either detached or attached to a VM that is not running. &PRODUCT; ensures that at least one snapshot is taken since the volume last became inactive." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a snapshot is taken manually, a snapshot is always created regardless of whether a volume has been active or not." +msgstr "" + diff --git a/docs/pot/vpc.pot b/docs/pot/vpc.pot new file mode 100644 index 000000000..9841ebca2 --- /dev/null +++ b/docs/pot/vpc.pot @@ -0,0 +1,240 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "About Virtual Private Clouds" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; Virtual Private Cloud is a private, isolated part of &PRODUCT;. A VPC can have its own virtual network topology that resembles a traditional physical network. You can launch VMs in the virtual network that can have private addresses in the range of your choice, for example: 10.0.0.0/16. You can define network tiers within your VPC network range, which in turn enables you to group similar kinds of instances based on IP address range." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For example, if a VPC has the private range 10.0.0.0/16, its guest networks can have the network ranges 10.0.1.0/24, 10.0.2.0/24, 10.0.3.0/24, and so on." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Major Components of a VPC:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A VPC is comprised of the following network components:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPC: A VPC acts as a container for multiple isolated networks that can communicate with each other via its virtual router." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Network Tiers: Each tier acts as an isolated network with its own VLANs and CIDR list, where you can place groups of resources, such as VMs. The tiers are segmented by means of VLANs. The NIC of each tier acts as its gateway." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Virtual Router: A virtual router is automatically created and started when you create a VPC. The virtual router connect the tiers and direct traffic among the public gateway, the VPN gateways, and the NAT instances. For each tier, a corresponding NIC and IP exist in the virtual router. The virtual router provides DNS and DHCP services through its IP." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Public Gateway: The traffic to and from the Internet routed to the VPC through the public gateway. In a VPC, the public gateway is not exposed to the end user; therefore, static routes are not support for the public gateway." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Private Gateway: All the traffic to and from a private network routed to the VPC through the private gateway. For more information, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPN Gateway: The VPC side of a VPN connection." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Site-to-Site VPN Connection: A hardware-based VPN connection between your VPC and your datacenter, home network, or co-location facility. For more information, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Customer Gateway: The customer side of a VPN Connection. For more information, see ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "NAT Instance: An instance that provides Port Address Translation for instances to access the Internet via the public gateway. For more information, see ." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Network Architecture in a VPC" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In a VPC, the following four basic options of network architectures are present:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPC with a public gateway only" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPC with public and private gateways" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPC with public and private gateways and site-to-site VPN access" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "VPC with a private gateway only and site-to-site VPN access" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Connectivity Options for a VPC" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "You can connect your VPC to:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Internet through the public gateway." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The corporate datacenter by using a site-to-site VPN connection through the VPN gateway." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Both the Internet and your corporate datacenter by using both the public gateway and a VPN gateway." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "VPC Network Considerations" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Consider the following before you create a VPC:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A VPC, by default, is created in the enabled state." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A VPC can be created in Advance zone only, and can't belong to more than one zone at a time." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The default number of VPCs an account can create is 20. However, you can change it by using the max.account.vpcs global parameter, which controls the maximum number of VPCs an account is allowed to create." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The default number of tiers an account can create within a VPC is 3. You can configure this number by using the vpc.max.networks parameter." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Each tier should have an unique CIDR in the VPC. Ensure that the tier's CIDR should be within the VPC CIDR range." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A tier belongs to only one VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "All network tiers inside the VPC should belong to the same account." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "When a VPC is created, by default, a SourceNAT IP is allocated to it. The Source NAT IP is released only when the VPC is removed." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A public IP can be used for only one purpose at a time. If the IP is a sourceNAT, it cannot be used for StaticNAT or port forwarding." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The instances only have a private IP address that you provision. To communicate with the Internet, enable NAT to an instance that you launch in your VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Only new networks can be added to a VPC. The maximum number of networks per VPC is limited by the value you specify in the vpc.max.networks parameter. The default value is three." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The load balancing service can be supported by only one tier inside the VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If an IP address is assigned to a tier:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "That IP can't be used by more than one tier at a time in the VPC. For example, if you have tiers A and B, and a public IP1, you can create a port forwarding rule by using the IP either for A or B, but not for both." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "That IP can't be used for StaticNAT, load balancing, or port forwarding rules for another guest network inside the VPC." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Remote access VPN is not supported in VPC networks." +msgstr "" + diff --git a/docs/pot/vpn.pot b/docs/pot/vpn.pot new file mode 100644 index 000000000..d8c1dafdf --- /dev/null +++ b/docs/pot/vpn.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "VPN" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; account owners can create virtual private networks (VPN) to access their virtual machines. If the guest network is instantiated from a network offering that offers the Remote Access VPN service, the virtual router (based on the System VM) is used to provide the service. &PRODUCT; provides a L2TP-over-IPsec-based remote access VPN service to guest virtual networks. Since each network gets its own virtual router, VPNs are not shared across the networks. VPN clients native to Windows, Mac OS X and iOS can be used to connect to the guest networks. The account owner can create and manage users for their VPN. &PRODUCT; does not use its account database for this purpose but uses a separate table. The VPN user database is shared across all the VPNs created by the account owner. All VPN users get access to all VPNs created by the account owner." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Make sure that not all traffic goes through the VPN. That is, the route installed by the VPN should be only for the guest network and not for all traffic." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Road Warrior / Remote Access. Users want to be able to connect securely from a home or office to a private network in the cloud. Typically, the IP address of the connecting client is dynamic and cannot be preconfigured on the VPN server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Site to Site. In this scenario, two private subnets are connected over the public Internet with a secure VPN tunnel. The cloud user’s subnet (for example, an office network) is connected through a gateway to the network in the cloud. The address of the user’s gateway must be preconfigured on the VPN server in the cloud. Note that although L2TP-over-IPsec can be used to set up Site-to-Site VPNs, this is not the primary intent of this feature." +msgstr "" + diff --git a/docs/pot/whatis.pot b/docs/pot/whatis.pot new file mode 100644 index 000000000..2c3216d27 --- /dev/null +++ b/docs/pot/whatis.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "What Is &PRODUCT;?" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; is an open source software platform that pools computing resources to build public, private, and hybrid Infrastructure as a Service (IaaS) clouds. &PRODUCT; manages the network, storage, and compute nodes that make up a cloud infrastructure. Use &PRODUCT; to deploy, manage, and configure cloud computing environments." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Typical users are service providers and enterprises. With &PRODUCT;, you can:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set up an on-demand, elastic cloud computing service. Service providers can sell self service virtual machine instances, storage volumes, and networking configurations over the Internet." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Set up an on-premise private cloud for use by employees. Rather than managing virtual machines in the same way as physical machines, with &PRODUCT; an enterprise can offer self-service virtual machines to users without involving IT departments." +msgstr "" + diff --git a/docs/pot/whats-in-this-adminguide.pot b/docs/pot/whats-in-this-adminguide.pot new file mode 100644 index 000000000..ba033be31 --- /dev/null +++ b/docs/pot/whats-in-this-adminguide.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Who Should Read This" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "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." +msgstr "" + diff --git a/docs/pot/whats-new.pot b/docs/pot/whats-new.pot new file mode 100644 index 000000000..50d7f5af4 --- /dev/null +++ b/docs/pot/whats-new.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "What's New in the API?" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The following describes any new major features of each &PRODUCT; version as it applies to API usage." +msgstr "" + +#. Tag: title +#, no-c-format +msgid "What's New in the API for 4.0" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "What's New in the API for 3.0" +msgstr "" + diff --git a/docs/pot/who-should-read-installation.pot b/docs/pot/who-should-read-installation.pot new file mode 100644 index 000000000..cb90df98e --- /dev/null +++ b/docs/pot/who-should-read-installation.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Who Should Read This" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For those who have already gone through a design phase and planned a more sophisticated deployment, or those who are ready to start scaling up a trial installation. With the following procedures, you can start using the more powerful features of &PRODUCT;, such as advanced VLAN networking, high availability, additional network elements such as load balancers and firewalls, and support for multiple hypervisors including Citrix XenServer, KVM, and VMware vSphere." +msgstr "" + diff --git a/docs/pot/windows-installation.pot b/docs/pot/windows-installation.pot new file mode 100644 index 000000000..23fddc97e --- /dev/null +++ b/docs/pot/windows-installation.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Windows OS Installation" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Download the installer, CloudInstanceManager.msi, from Download page and run the installer in the newly created Windows VM." +msgstr "" + diff --git a/docs/pot/work-with-usage.pot b/docs/pot/work-with-usage.pot new file mode 100644 index 000000000..996b6a0dd --- /dev/null +++ b/docs/pot/work-with-usage.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Working with Usage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Usage Server is an optional, separately-installed part of &PRODUCT; that provides aggregated usage records which you can use to create billing integration for &PRODUCT;. The Usage Server works by taking data from the events log and creating summary usage records that you can access using the listUsageRecords API call." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The usage records show the amount of resources, such as VM run time or template storage space, consumed by guest instances." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Usage Server runs at least once per day. It can be configured to run multiple times per day." +msgstr "" + diff --git a/docs/pot/working-with-hosts.pot b/docs/pot/working-with-hosts.pot new file mode 100644 index 000000000..0f12cec59 --- /dev/null +++ b/docs/pot/working-with-hosts.pot @@ -0,0 +1,40 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Working With Hosts" +msgstr "" + +#. Tag: title +#, no-c-format +msgid "Adding Hosts" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Additional hosts can be added at any time to provide more capacity for guest VMs. For requirements and instructions, see ." +msgstr "" + diff --git a/docs/pot/working-with-iso.pot b/docs/pot/working-with-iso.pot new file mode 100644 index 000000000..bf6af43cb --- /dev/null +++ b/docs/pot/working-with-iso.pot @@ -0,0 +1,50 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Working with ISOs" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; supports ISOs and their attachment to guest VMs. An ISO is a read-only file that has an ISO/CD-ROM style file system. Users can upload their own ISOs and mount them on their guest VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ISOs are uploaded based on a URL. HTTP is the supported protocol. Once the ISO is available via HTTP specify an upload URL such as http://my.web.server/filename.iso." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ISOs may be public or private, like templates.ISOs are not hypervisor-specific. That is, a guest on vSphere can mount the exact same image that a guest on KVM can mount." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "ISO images may be stored in the system and made available with a privacy level similar to templates. ISO images are classified as either bootable or not bootable. A bootable ISO image is one that contains an OS image. &PRODUCT; allows a user to boot a guest VM off of an ISO image. Users can also attach ISO images to guest VMs. For example, this enables installing PV drivers into Windows. ISO images are not hypervisor-specific." +msgstr "" + diff --git a/docs/pot/working-with-snapshots.pot b/docs/pot/working-with-snapshots.pot new file mode 100644 index 000000000..8f051bd46 --- /dev/null +++ b/docs/pot/working-with-snapshots.pot @@ -0,0 +1,55 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Working with Snapshots" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Supported for the following hypervisors: XenServer, VMware vSphere, and KVM)" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; supports snapshots of disk volumes. Snapshots are a point-in-time capture of virtual machine disks. Memory and CPU states are not captured." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Snapshots may be taken for volumes, including both root and data disks. The administrator places a limit on the number of stored snapshots per user. Users can create new volumes from the snapshot for recovery of particular files and they can create templates from snapshots to boot from a restored disk." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Users can create snapshots manually or by setting up automatic recurring snapshot policies. Users can also create disk volumes from snapshots, which may be attached to a VM like any other disk volume. Snapshots of both root disks and data disks are supported. However, &PRODUCT; does not currently support booting a VM from a recovered root disk. A disk recovered from snapshot of a root disk is treated as a regular data disk; the data on recovered disk can be accessed by attaching the disk to a VM." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A completed snapshot is copied from primary storage to secondary storage, where it is stored until deleted or purged by newer snapshot." +msgstr "" + diff --git a/docs/pot/working-with-system-vm.pot b/docs/pot/working-with-system-vm.pot new file mode 100644 index 000000000..8ef8d8148 --- /dev/null +++ b/docs/pot/working-with-system-vm.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Working with System Virtual Machines" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; uses several types of system virtual machines to perform tasks in the cloud. In general &PRODUCT; manages these system VMs and creates, starts, and stops them as needed based on scale and immediate needs. However, the administrator should be aware of them and their roles to assist in debugging issues." +msgstr "" + diff --git a/docs/pot/working-with-templates.pot b/docs/pot/working-with-templates.pot new file mode 100644 index 000000000..fc687a376 --- /dev/null +++ b/docs/pot/working-with-templates.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Working with Templates" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A template is a reusable configuration for virtual machines. When users launch VMs, they can choose from a list of templates in &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Specifically, a template is a virtual disk image that includes one of a variety of operating systems, optional additional software such as office applications, and settings such as access control to determine who can use the template. Each template is associated with a particular type of hypervisor, which is specified when the template is added to &PRODUCT;." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; ships with a default template. In order to present more choices to users, &PRODUCT; administrators and users can create templates and add them to &PRODUCT;." +msgstr "" + diff --git a/docs/pot/working-with-usage-data.pot b/docs/pot/working-with-usage-data.pot new file mode 100644 index 000000000..8fdafd8ee --- /dev/null +++ b/docs/pot/working-with-usage-data.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Working With Usage Data" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Usage Server provides aggregated usage records which you can use to create billing integration for the &PRODUCT; platform. The Usage Server works by taking data from the events log and creating summary usage records that you can access using the listUsageRecords API call." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The usage records show the amount of resources, such as VM run time or template storage space, consumed by guest instances. In the special case of bare metal instances, no template storage resources are consumed, but records showing zero usage are still included in the Usage Server's output." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Usage Server runs at least once per day. It can be configured to run multiple times per day. Its behavior is controlled by configuration settings as described in the &PRODUCT; Administration Guide." +msgstr "" + diff --git a/docs/pot/working-with-volumes.pot b/docs/pot/working-with-volumes.pot new file mode 100644 index 000000000..fedfc58ba --- /dev/null +++ b/docs/pot/working-with-volumes.pot @@ -0,0 +1,45 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Using Swift for Secondary Storage" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "A volume provides storage to a guest VM. The volume can provide for a root disk or an additional data disk. &PRODUCT; supports additional volumes for guest VMs." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Volumes are created for a specific hypervisor type. A volume that has been attached to guest using one hypervisor type (e.g, XenServer) may not be attached to a guest that is using another hypervisor type (e.g. vSphere, KVM). This is because the different hypervisors use different disk image formats." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "&PRODUCT; defines a volume as a unit of storage available to a guest VM. Volumes are either root disks or data disks. The root disk has \"/\" in the file system and is usually the boot device. Data disks provide for additional storage (e.g. As \"/opt\" or \"D:\"). Every guest VM has a root disk, and VMs can also optionally have a data disk. End users can mount multiple data disks to guest VMs. Users choose data disks from the disk offerings created by administrators. The user can create a template from a volume as well; this is the standard procedure for private template creation. Volumes are hypervisor-specific: a volume from one hypervisor type may not be used on a guest of another hypervisor type." +msgstr "" + diff --git a/docs/pot/xenserver-maintenance-mode.pot b/docs/pot/xenserver-maintenance-mode.pot new file mode 100644 index 000000000..a5d4aabbd --- /dev/null +++ b/docs/pot/xenserver-maintenance-mode.pot @@ -0,0 +1,85 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "XenServer and Maintenance Mode" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For XenServer, you can take a server offline temporarily by using the Maintenance Mode feature in XenCenter. When you place a server into Maintenance Mode, all running VMs are automatically migrated from it to another host in the same pool. If the server is the pool master, a new master will also be selected for the pool. While a server is Maintenance Mode, you cannot create or start any VMs on it." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To place a server in Maintenance Mode:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the Resources pane, select the server, then do one of the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Right-click, then click Enter Maintenance Mode on the shortcut menu." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On the Server menu, click Enter Maintenance Mode" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Enter Maintenance Mode" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The server's status in the Resources pane shows when all running VMs have been successfully migrated off the server." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "To take a server out of Maintenance Mode:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Right-click, then click Exit Maintenance Mode on the shortcut menu." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On the Server menu, click Exit Maintenance Mode" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Exit Maintenance Mode" +msgstr "" + diff --git a/docs/pot/xenserver-topology-req.pot b/docs/pot/xenserver-topology-req.pot new file mode 100644 index 000000000..765427bb6 --- /dev/null +++ b/docs/pot/xenserver-topology-req.pot @@ -0,0 +1,35 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "XenServer Topology Requirements" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The Management Servers communicate with XenServer hosts on ports 22 (ssh), 80 (HTTP), and 443 (HTTPs)." +msgstr "" + diff --git a/docs/pot/zone-add.pot b/docs/pot/zone-add.pot new file mode 100644 index 000000000..f9944a306 --- /dev/null +++ b/docs/pot/zone-add.pot @@ -0,0 +1,155 @@ +#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. +msgid "" +msgstr "" +"Project-Id-Version: 0\n" +"POT-Creation-Date: 2013-02-02T20:12:00\n" +"PO-Revision-Date: 2013-02-02T20:12:00\n" +"Last-Translator: Automatically generated\n" +"Language-Team: None\n" +"MIME-Version: 1.0\n" +"Content-Type: application/x-publican; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" + +#. Tag: title +#, no-c-format +msgid "Adding a Zone" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "These steps assume you have already logged in to the &PRODUCT; UI. See ." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) If you are going to use Swift for cloud-wide secondary storage, you need to add it before you add zones." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Log in to the &PRODUCT; UI as administrator." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "If this is your first time visiting the UI, you will see the guided tour splash screen. Choose “Experienced user.†The Dashboard appears." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation bar, click Global Settings." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the search box, type swift.enable and click the search button." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click the edit button and set swift.enable to true. edit-icon.png: button to modify data " +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Restart the Management Server." +msgstr "" + +#. Tag: programlisting +#, no-c-format +msgid "# service cloud-management restart" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Refresh the &PRODUCT; UI browser tab and log back in." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "In the left navigation, choose Infrastructure." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "On Zones, click View More." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "(Optional) If you are using Swift storage, click Enable Swift. Provide the following:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "URL. The Swift URL." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Account. The Swift account." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Username. The Swift account’s username." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Key. The Swift key." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Click Add Zone. The zone creation wizard will appear." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Choose one of the following network types:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Basic. For AWS-style networking. Provides a single network where each VM instance is assigned an IP directly from the network. Guest isolation can be provided through layer-3 means such as security groups (IP address source filtering)." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "Advanced. For more sophisticated network topologies. This network model provides the most flexibility in defining guest networks and providing custom network offerings such as firewall, VPN, or load balancer support." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "For more information about the network types, see Network Setup." +msgstr "" + +#. Tag: para +#, no-c-format +msgid "The rest of the steps differ depending on whether you chose Basic or Advanced. Continue with the steps that apply to you:" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + +#. Tag: para +#, no-c-format +msgid "" +msgstr "" + diff --git a/docs/publican-cloudstack/defaults.cfg b/docs/publican-cloudstack/defaults.cfg index 6aebaee5a..b288b33af 100644 --- a/docs/publican-cloudstack/defaults.cfg +++ b/docs/publican-cloudstack/defaults.cfg @@ -16,6 +16,6 @@ # specific language governing permissions and limitations # under the License. -doc_url: "http://docs.cloudstack.org" -prod_url: "http://cloudstack.org" +doc_url: "http://cloudstack.apache.org/docs" +prod_url: "http://cloudstack.apache.org" diff --git a/docs/publican-cloudstack/en-US/Feedback.xml b/docs/publican-cloudstack/en-US/Feedback.xml index fb457a9ca..8aa5f67dc 100644 --- a/docs/publican-cloudstack/en-US/Feedback.xml +++ b/docs/publican-cloudstack/en-US/Feedback.xml @@ -2,33 +2,43 @@ -
- We Need Feedback! - +
+ Submitting Feedback and Getting Help + feedback1 - contact information for this brand + contact information for this brand - If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a bug: https://issues.apache.org/jira/browse/CLOUDSTACK against the component Doc. + If you find a typographical error in this manual, or if you have thought of a way to make this manual better, we would love to hear from you! Please submit a bug: https://issues.apache.org/jira/browse/CLOUDSTACK against the component Doc. If you have a suggestion for improving the documentation, try to be as specific as possible when describing it. If you have found an error, please include the section number and some of the surrounding text so we can find it easily. - Better yet, feel free to submit a patch if you would like to enhance the documentation. Our documentation is, along with the rest of the CloudStack source code, kept in the project's git repository. + Better yet, feel free to submit a patch if you would like to enhance the documentation. Our documentation is, along with the rest of the &PRODUCT; source code, kept in the project's git repository. + The most efficient way to get help with &PRODUCT; is to ask on the mailing lists. + The Apache CloudStack project has mailing lists for users and developers. These are the + official channels of communication for the project and are the best way to get answers about + using and contributing to CloudStack. It's a good idea to subscribe to the + users@cloudstack.apache.org mailing list if you've deployed or are deploying + CloudStack into production, and even for test deployments. + The CloudStack developer's mailing list (dev@cloudstack.apache.org) is for discussions + about CloudStack development, and is the best list for discussing possible bugs in CloudStack. + Anyone contributing to CloudStack should be on this mailing list. + To posts to the lists, you'll need to be subscribed. See the + CloudStack Web site + for instructions.
- - diff --git a/docs/publican-cloudstack/en-US/Legal_Notice.xml b/docs/publican-cloudstack/en-US/Legal_Notice.xml index 0e4be5bf5..5e30efb07 100644 --- a/docs/publican-cloudstack/en-US/Legal_Notice.xml +++ b/docs/publican-cloudstack/en-US/Legal_Notice.xml @@ -53,6 +53,15 @@ completeness or stability of the code, it does indicate that the project has yet to be fully endorsed by the ASF. + + + CloudStack® is a registered trademark of the Apache Software Foundation. + + + + Apache CloudStack, the CloudStack word design, the Apache CloudStack word design, and the cloud monkey logo are trademarks of the + Apache Software Foundation. + diff --git a/docs/publican-cloudstack/en-US/images/title_logo.svg b/docs/publican-cloudstack/en-US/images/title_logo.svg index a5888de4c..1d2913bf5 100644 --- a/docs/publican-cloudstack/en-US/images/title_logo.svg +++ b/docs/publican-cloudstack/en-US/images/title_logo.svg @@ -1,5 +1,6 @@ + + + 4.0.0 + cloud-engine-api + Apache CloudStack Cloud Engine API + + org.apache.cloudstack + cloud-engine + 4.2.0-SNAPSHOT + ../pom.xml + + + + org.apache.cloudstack + cloud-utils + ${project.version} + + + org.apache.cloudstack + cloud-api + ${project.version} + + + org.apache.cloudstack + cloud-framework-api + ${project.version} + + + org.apache.cxf + cxf-bundle-jaxrs + 2.7.0 + + + org.eclipse.jetty + jetty-server + + + com.sun.xml.bind + jaxb-impl + + + + + org.apache.cloudstack + cloud-framework-rest + ${project.version} + + + + install + src + test + + diff --git a/engine/api/src/org/apache/cloudstack/engine/Rules.java b/engine/api/src/org/apache/cloudstack/engine/Rules.java new file mode 100755 index 000000000..b700fa5fc --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/Rules.java @@ -0,0 +1,85 @@ +/* + * 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 org.apache.cloudstack.engine; + +import java.util.ArrayList; +import java.util.List; + +import com.cloud.utils.StringUtils; + +/** + * Rules specifies all rules about developing and using CloudStack Orchestration + * Platforms APIs. This class is not actually used in CloudStack Orchestration + * Platform but must be read by all who wants to use and develop against + * CloudStack Orchestration Platform. + * + * Make sure to make changes here when there are changes to how the APIs should + * be used and developed. + * + * Changes to this class must be approved by the maintainer of this project. + * + */ +public class Rules { + public static List whenUsing() { + List rules = new ArrayList(); + rules.add("Always be prepared to handle RuntimeExceptions."); + return rules; + } + + public static List whenWritingNewApis() { + List rules = new ArrayList(); + rules.add("You may think you're the greatest developer in the " + + "world but every change to the API must be reviewed and approved. "); + rules.add("Every API must have unit tests written against it. And not it's unit tests"); + rules.add(""); + + + return rules; + } + + private static void printRule(String rule) { + System.out.print("API Rule: "); + String skip = ""; + int brk = 0; + while (true) { + int stop = StringUtils.formatForOutput(rule, brk, 75 - skip.length(), ' '); + if (stop < 0) { + break; + } + System.out.print(skip); + skip = " "; + System.out.println(rule.substring(brk, stop).trim()); + brk = stop; + } + } + + public static void main(String[] args) { + System.out.println("When developing against the CloudStack Orchestration Platform, you must following the following rules:"); + for (String rule : whenUsing()) { + printRule(rule); + } + System.out.println(""); + System.out.println("When writing APIs, you must follow these rules:"); + for (String rule : whenWritingNewApis()) { + printRule(rule); + } + } + +} + diff --git a/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/BackupEntity.java b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/BackupEntity.java new file mode 100755 index 000000000..cc69705c5 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/BackupEntity.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.cloudstack.engine.cloud.entity.api; + +import org.apache.cloudstack.engine.entity.api.CloudStackEntity; + +/** + * @author ahuang + * + */ +public interface BackupEntity extends CloudStackEntity { + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/EdgeService.java b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/EdgeService.java new file mode 100755 index 000000000..3283ff0e7 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/EdgeService.java @@ -0,0 +1,23 @@ +/* + * 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 org.apache.cloudstack.engine.cloud.entity.api; + +public interface EdgeService { + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/NetworkEntity.java b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/NetworkEntity.java new file mode 100755 index 000000000..c161d0435 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/NetworkEntity.java @@ -0,0 +1,39 @@ +/* + * 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 org.apache.cloudstack.engine.cloud.entity.api; + +import java.util.List; + +import org.apache.cloudstack.engine.entity.api.CloudStackEntity; + +import com.cloud.network.Network; + +public interface NetworkEntity extends CloudStackEntity, Network { + void routeTo(NetworkEntity network); + + List listEdgeServicesTo(); + + List listVirtualMachineUuids(); + + List listVirtualMachines(); + + List listNics(); + + void addIpRange(); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/NicEntity.java b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/NicEntity.java new file mode 100755 index 000000000..f78267add --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/NicEntity.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.cloudstack.engine.cloud.entity.api; + +import org.apache.cloudstack.engine.entity.api.CloudStackEntity; + +/** + * @author ahuang + * + */ +public interface NicEntity extends CloudStackEntity { + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/SnapshotEntity.java b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/SnapshotEntity.java new file mode 100755 index 000000000..0dcccb3c8 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/SnapshotEntity.java @@ -0,0 +1,49 @@ +/* + * 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 org.apache.cloudstack.engine.cloud.entity.api; + +import org.apache.cloudstack.engine.entity.api.CloudStackEntity; + +import com.cloud.storage.Snapshot; + +public interface SnapshotEntity extends CloudStackEntity, Snapshot { + /** + * Make a reservation for backing up this snapshot + * @param expiration time in seconds to expire the reservation + * @return reservation token + */ + String reserveForBackup(int expiration); + + /** + * Perform the backup according to the reservation token + * @param reservationToken token returned by reserveForBackup + */ + void backup(String reservationToken); + + /** + * restore this snapshot to this vm. + * @param vm + */ + void restore(String vm); + + /** + * Destroy this snapshot. + */ + void destroy(); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/TemplateEntity.java b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/TemplateEntity.java new file mode 100755 index 000000000..f10ba5ef1 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/TemplateEntity.java @@ -0,0 +1,28 @@ +/* + * 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 org.apache.cloudstack.engine.cloud.entity.api; + +import org.apache.cloudstack.engine.entity.api.CloudStackEntity; + +import com.cloud.template.VirtualMachineTemplate; + +public interface TemplateEntity extends CloudStackEntity, VirtualMachineTemplate { + public long getPhysicalSize(); + public long getVirtualSize(); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/VirtualMachineEntity.java b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/VirtualMachineEntity.java new file mode 100755 index 000000000..de0e7c2f2 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/VirtualMachineEntity.java @@ -0,0 +1,166 @@ +/* + * 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 org.apache.cloudstack.engine.cloud.entity.api; + +import java.util.List; +import java.util.Map; + +import javax.ws.rs.BeanParam; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.xml.bind.annotation.XmlRootElement; + +import org.apache.cloudstack.engine.entity.api.CloudStackEntity; + + +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; +import com.cloud.exception.AgentUnavailableException; +import com.cloud.exception.CloudException; +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.ResourceUnavailableException; +import com.cloud.vm.VirtualMachineProfile; + + +/** + * VirtualMachineEntity represents a Virtual Machine in Cloud Orchestration + * Platform. + * + */ +@Path("vm/{id}") +@Produces({"application/json", "application/xml"}) +@XmlRootElement(name="vm") +public interface VirtualMachineEntity extends CloudStackEntity { + + /** + * @return List of uuids for volumes attached to this virtual machine. + */ + @GET + List listVolumeIds(); + + /** + * @return List of volumes attached to this virtual machine. + */ + List listVolumes(); + + /** + * @return List of uuids for nics attached to this virtual machine. + */ + List listNicUuids(); + + /** + * @return List of nics attached to this virtual machine. + */ + List listNics(); + + /** + * @return the template this virtual machine is based off. + */ + TemplateEntity getTemplate(); + + /** + * @return the list of tags associated with the virtual machine + */ + List listTags(); + + void addTag(); + + void delTag(); + + /** + * Start the virtual machine with a given deployment plan + * @param plannerToUse the Deployment Planner that should be used + * @param plan plan to which to deploy the machine + * @param exclude list of areas to exclude + * @return a reservation id + */ + String reserve(String plannerToUse, @BeanParam DeploymentPlan plan, ExcludeList exclude, String caller) throws InsufficientCapacityException, ResourceUnavailableException; + + /** + * Migrate this VM to a certain destination. + * + * @param reservationId reservation id from reserve call. + */ + void migrateTo(String reservationId, String caller); + + /** + * Deploy this virtual machine according to the reservation from before. + * @param reservationId reservation id from reserve call. + * + */ + void deploy(String reservationId, String caller, Map params) throws InsufficientCapacityException, ResourceUnavailableException; + + /** + * Stop the virtual machine + * + */ + boolean stop(String caller) throws ResourceUnavailableException, CloudException; + + /** + * Cleans up after any botched starts. CloudStack Orchestration Platform + * will attempt a best effort to actually shutdown any resource but + * even if it cannot, it releases the resource from its database. + */ + void cleanup(); + + /** + * Destroys the VM. + */ + boolean destroy(String caller) throws AgentUnavailableException, CloudException, ConcurrentOperationException; + + /** + * Duplicate this VM in the database so that it will start new + * @param externalId + * @return a new VirtualMachineEntity + */ + VirtualMachineEntity duplicate(String externalId); + + /** + * Take a VM snapshot + */ + SnapshotEntity takeSnapshotOf(); + + /** + * Attach volume to this VM + * @param volume volume to attach + * @param deviceId deviceId to use + */ + void attach(VolumeEntity volume, short deviceId); + + /** + * Detach the volume from this VM + * @param volume volume to detach + */ + void detach(VolumeEntity volume); + + /** + * Connect the VM to a network + * @param network network to attach + * @param deviceId device id to use when a nic is created + */ + void connectTo(NetworkEntity network, short nicId); + + /** + * Disconnect the VM from this network + * @param netowrk network to disconnect from + */ + void disconnectFrom(NetworkEntity netowrk, short nicId); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/VolumeEntity.java b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/VolumeEntity.java new file mode 100755 index 000000000..a63c2b47c --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/cloud/entity/api/VolumeEntity.java @@ -0,0 +1,84 @@ +/* + * 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 org.apache.cloudstack.engine.cloud.entity.api; + +import org.apache.cloudstack.engine.datacenter.entity.api.StorageEntity; +import org.apache.cloudstack.engine.entity.api.CloudStackEntity; +import org.apache.cloudstack.engine.subsystem.api.storage.disktype.DiskFormat; +import org.apache.cloudstack.engine.subsystem.api.storage.type.VolumeType; + + +public interface VolumeEntity extends CloudStackEntity { + + /** + * Take a snapshot of the volume + */ + SnapshotEntity takeSnapshotOf(boolean full); + + /** + * Make a reservation to do storage migration + * + * @param expirationTime time in seconds the reservation is cancelled + * @return reservation token + */ + String reserveForMigration(long expirationTime); + + /** + * Migrate using a reservation. + * @param reservationToken reservation token + */ + void migrate(String reservationToken); + + /** + * Setup for a copy of this volume. + * @return destination to copy to + */ + VolumeEntity setupForCopy(); + + /** + * Perform the copy + * @param dest copy to this volume + */ + void copy(VolumeEntity dest); + + /** + * Attach to the vm + * @param vm vm to attach to + * @param deviceId device id to use + */ + void attachTo(String vm, long deviceId); + + /** + * Detach from the vm + */ + void detachFrom(); + + /** + * Destroy the volume + */ + void destroy(); + + long getSize(); + + DiskFormat getDiskType(); + + VolumeType getType(); + + StorageEntity getDataStore(); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/ClusterEntity.java b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/ClusterEntity.java new file mode 100755 index 000000000..9497dd381 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/ClusterEntity.java @@ -0,0 +1,40 @@ +/* + * 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 org.apache.cloudstack.engine.datacenter.entity.api; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.org.Cluster.ClusterType; +import com.cloud.org.Grouping.AllocationState; +import com.cloud.org.Managed.ManagedState; + +public interface ClusterEntity extends DataCenterResourceEntity, OrganizationScope { + + long getDataCenterId(); + + long getPodId(); + + HypervisorType getHypervisorType(); + + ClusterType getClusterType(); + + AllocationState getAllocationState(); + + ManagedState getManagedState(); + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/DataCenterResourceEntity.java b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/DataCenterResourceEntity.java new file mode 100755 index 000000000..08175537d --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/DataCenterResourceEntity.java @@ -0,0 +1,104 @@ +/* + * 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 org.apache.cloudstack.engine.datacenter.entity.api; + +import javax.ws.rs.GET; + + +import javax.ws.rs.POST; +import javax.ws.rs.Produces; + +import org.apache.cloudstack.engine.entity.api.CloudStackEntity; + +import com.cloud.utils.fsm.StateMachine2; +import com.cloud.utils.fsm.StateObject; + +/** + * This interface specifies the states and operations all physical + * and virtual resources in the data center must implement. + */ +@Produces({"application/json", "application/xml"}) +public interface DataCenterResourceEntity extends CloudStackEntity, StateObject { + + /** + * This is the state machine for how CloudStack should interact with + * + */ + public enum State { + Disabled("The resource is disabled so CloudStack should not use it. This is the initial state of all resources added to CloudStack."), + Enabled("The resource is now enabled for CloudStack to use."), + Deactivated("The resource is deactivated so CloudStack should not use it for new resource needs."); + + String _description; + + private State(String description) { + _description = description; + } + + public enum Event { + EnableRequest, + DisableRequest, + DeactivateRequest, + ActivatedRequest + } + + protected static final StateMachine2 s_fsm = new StateMachine2(); + static { + s_fsm.addTransition(Disabled, Event.EnableRequest, Enabled); + s_fsm.addTransition(Enabled, Event.DisableRequest, Disabled); + s_fsm.addTransition(Enabled, Event.DeactivateRequest, Deactivated); + s_fsm.addTransition(Deactivated, Event.ActivatedRequest, Enabled); + } + + } + + /** + * Prepare the resource to take new on new demands. + */ + @POST + boolean enable(); + + /** + * Disables the resource. Cleanup. Prepare for the resource to be removed. + */ + @POST + boolean disable(); + + /** + * Do not use the resource for new demands. + */ + @POST + boolean deactivate(); + + /** + * Reactivates a deactivated resource. + */ + @POST + boolean reactivate(); + + + @Override + @GET + State getState(); + + + public void persist(); + + String getName(); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/HostEntity.java b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/HostEntity.java new file mode 100644 index 000000000..68a2ed280 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/HostEntity.java @@ -0,0 +1,60 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; + +public interface HostEntity extends DataCenterResourceEntity { + + /** + * @return total amount of memory. + */ + Long getTotalMemory(); + + /** + * @return # of cores in a machine. Note two cpus with two cores each returns 4. + */ + Integer getCpus(); + + /** + * @return speed of each cpu in mhz. + */ + Long getSpeed(); + + /** + * @return the pod. + */ + Long getPodId(); + + /** + * @return availability zone. + */ + long getDataCenterId(); + + /** + * @return type of hypervisor + */ + HypervisorType getHypervisorType(); + + /** + * @return the mac address of the host. + */ + String getGuid(); + + Long getClusterId(); + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/OrganizationScope.java b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/OrganizationScope.java new file mode 100755 index 000000000..c39f58111 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/OrganizationScope.java @@ -0,0 +1,23 @@ +/* + * 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 org.apache.cloudstack.engine.datacenter.entity.api; + +public interface OrganizationScope { + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/PodEntity.java b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/PodEntity.java new file mode 100755 index 000000000..fc8703882 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/PodEntity.java @@ -0,0 +1,43 @@ +/* + * 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 org.apache.cloudstack.engine.datacenter.entity.api; + +import java.util.List; + +import com.cloud.dc.Pod; +import com.cloud.org.Cluster; +import com.cloud.org.Grouping.AllocationState; + +public interface PodEntity extends DataCenterResourceEntity { + + List listClusters(); + + String getCidrAddress(); + + int getCidrSize(); + + String getGateway(); + + long getDataCenterId(); + + AllocationState getAllocationState(); + + boolean getExternalDhcp(); + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/StorageEntity.java b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/StorageEntity.java new file mode 100755 index 000000000..872931b1c --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/StorageEntity.java @@ -0,0 +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. + */ +package org.apache.cloudstack.engine.datacenter.entity.api; + +import com.cloud.storage.StoragePool; + +public interface StorageEntity extends DataCenterResourceEntity, StoragePool { + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/ZoneEntity.java b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/ZoneEntity.java new file mode 100755 index 000000000..5bf355400 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/datacenter/entity/api/ZoneEntity.java @@ -0,0 +1,43 @@ +/* + * 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 org.apache.cloudstack.engine.datacenter.entity.api; + +import java.util.List; + +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.xml.bind.annotation.XmlRootElement; + +import org.apache.cloudstack.engine.service.api.ProvisioningService; +import org.apache.cloudstack.framework.ws.jackson.Url; +/** + * Describes a zone and operations that can be done in a zone. + */ +@Path("/zone/{zoneid}") +@Produces({"application/json"}) +@XmlRootElement(name="zone") +public interface ZoneEntity extends DataCenterResourceEntity { + @GET + @Path("/pods") + List listPods(); + + @Url(clazz=ProvisioningService.class, method="getPod", name="id", type=List.class) + List listPodIds(); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/entity/api/CloudStackEntity.java b/engine/api/src/org/apache/cloudstack/engine/entity/api/CloudStackEntity.java new file mode 100755 index 000000000..09130d1d9 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/entity/api/CloudStackEntity.java @@ -0,0 +1,96 @@ +/* + * 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 org.apache.cloudstack.engine.entity.api; + +import java.lang.reflect.Method; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import javax.ws.rs.GET; +import javax.ws.rs.QueryParam; + +/** + * All entities returned by the Cloud Orchestration Platform must implement + * this interface. CloudValueEntity is an immutable representation of + * an entity exposed by Cloud Orchestration Platform. For each object, it + * defines two ids: uuid, generated by CloudStack Orchestration Platform, and + * an external id that is set by the caller when the entity is created. All + * ids must be unique for that entity. CloudValueEntity also can be converted + * to a CloudActionableEntity which contains actions the object can perform. + */ +public interface CloudStackEntity { + /** + * @return the uuid of the object. + */ + @GET + String getUuid(); + + /** + * @return the id which is often the database id. + */ + long getId(); + + /** + * @return current state for the entity + */ + @GET + String getCurrentState(); + + /** + * @return desired state for the entity + */ + @GET + String getDesiredState(); + + /** + * Get the time the entity was created + */ + @GET + Date getCreatedTime(); + + /** + * Get the time the entity was last updated + */ + @GET + Date getLastUpdatedTime(); + + /** + * @return reference to the owner of this entity + */ + @GET + String getOwner(); + + /** + * @return details stored for this entity when created. + */ + Map getDetails(); + + void addDetail(String name, String value); + + void delDetail(String name, String value); + + void updateDetail(String name, String value); + + /** + * @return list of actions that can be performed on the object in its current state + */ + List getApplicableActions(); + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/exception/InsufficientCapacityException.java b/engine/api/src/org/apache/cloudstack/engine/exception/InsufficientCapacityException.java new file mode 100755 index 000000000..c60ad3003 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/exception/InsufficientCapacityException.java @@ -0,0 +1,24 @@ +/* + * 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 org.apache.cloudstack.engine.exception; + +public class InsufficientCapacityException { + + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/rest/service/api/ClusterRestService.java b/engine/api/src/org/apache/cloudstack/engine/rest/service/api/ClusterRestService.java new file mode 100755 index 000000000..2718e2fdb --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/rest/service/api/ClusterRestService.java @@ -0,0 +1,86 @@ +/* + * 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 org.apache.cloudstack.engine.rest.service.api; + +import java.util.List; + +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; + +import org.apache.cloudstack.engine.datacenter.entity.api.ClusterEntity; +import org.apache.cloudstack.engine.service.api.ProvisioningService; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; + +@Component +@Service("ClusterRestService") +@Produces("application/json") +public class ClusterRestService { +// @Inject + ProvisioningService _provisioningService; + + @GET @Path("/clusters") + public List listAll() { + return null; + } + + + @GET @Path("/cluster/{clusterid}") + public ClusterEntity get(@PathParam("clusterid") String clusterId) { + return null; + } + + @POST @Path("/cluster/{clusterid}/enable") + public String enable(@PathParam("clusterid") String clusterId) { + return null; + } + + @POST @Path("/cluster/{clusterid}/disable") + public String disable(@PathParam("clusterid") String clusterId) { + return null; + } + + @POST @Path("/cluster/{clusterid}/deactivate") + public String deactivate(@PathParam("clusterid") String clusterId) { + return null; + } + + @POST @Path("/cluster/{clusterid}/reactivate") + public String reactivate(@PathParam("clusterid") String clusterId) { + return null; + } + + @PUT @Path("/cluster/create") + public ClusterEntity create( + @QueryParam("xid") String xid, + @QueryParam("display-name") String displayName) { + return null; + } + + @PUT @Path("/cluster/{clusterid}/update") + public ClusterEntity update( + @QueryParam("display-name") String displayName) { + return null; + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/rest/service/api/NetworkRestService.java b/engine/api/src/org/apache/cloudstack/engine/rest/service/api/NetworkRestService.java new file mode 100755 index 000000000..b75600e08 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/rest/service/api/NetworkRestService.java @@ -0,0 +1,62 @@ +/* + * 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 org.apache.cloudstack.engine.rest.service.api; + +import java.util.List; + +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; + +import org.apache.cloudstack.engine.cloud.entity.api.NetworkEntity; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; + +@Service("NetworkRestService") +@Component +@Produces("application/json") +public class NetworkRestService { + @PUT @Path("/network/create") + public NetworkEntity create( + @QueryParam("xid") String xid, + @QueryParam("display-name") String displayName) { + return null; + } + + @GET @Path("/network/{network-id}") + public NetworkEntity get(@PathParam("network-id") String networkId) { + return null; + } + + @GET @Path("/networks") + public List listAll() { + return null; + } + + @POST @Path("/network/{network-id}/") + public String deploy(@PathParam("network-id") String networkId) { + return null; + } + + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/rest/service/api/PodRestService.java b/engine/api/src/org/apache/cloudstack/engine/rest/service/api/PodRestService.java new file mode 100755 index 000000000..9c009b9ae --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/rest/service/api/PodRestService.java @@ -0,0 +1,79 @@ +/* + * 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 org.apache.cloudstack.engine.rest.service.api; + +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; + +import org.apache.cloudstack.engine.datacenter.entity.api.PodEntity; +import org.apache.cloudstack.engine.service.api.ProvisioningService; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; + +@Component +@Service("PodService") +@Produces({"application/json"}) +public class PodRestService { +// @Inject + ProvisioningService _provisioningService; + + @GET @Path("/pod/{pod-id}") + public PodEntity getPod(@PathParam("pod-id") String podId) { + return null; + } + + @POST @Path("/pod/{pod-id}/enable") + public String enable(@PathParam("pod-id") String podId) { + return null; + } + + @POST @Path("/pod/{pod-id}/disable") + public String disable(@PathParam("pod-id") String podId) { + return null; + } + + @POST @Path("/pod/{pod-id}/deactivate") + public String deactivate(@PathParam("pod-id") String podId) { + return null; + } + + @POST @Path("/pod/{pod-id}/reactivate") + public String reactivate(@PathParam("pod-id") String podId) { + return null; + } + + @PUT @Path("/pod/create") + public PodEntity create( + @QueryParam("xid") String xid, + @QueryParam("display-name") String displayName) { + return null; + } + + @PUT @Path("/pod/{pod-id}") + public PodEntity update( + @PathParam("pod-id") String podId, + @QueryParam("display-name") String displayName) { + return null; + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/rest/service/api/VirtualMachineRestService.java b/engine/api/src/org/apache/cloudstack/engine/rest/service/api/VirtualMachineRestService.java new file mode 100755 index 000000000..f3f7bad19 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/rest/service/api/VirtualMachineRestService.java @@ -0,0 +1,56 @@ +/* + * 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 org.apache.cloudstack.engine.rest.service.api; + +import java.util.List; + +import javax.ws.rs.GET; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; + +import org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntity; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; + +@Component +@Service("VirtualMachineRestService") +@Produces("application/xml") +public class VirtualMachineRestService { + + @GET @Path("/vm/{vmid}") + public VirtualMachineEntity get(@PathParam("vmid") String vmId) { + return null; + } + + @PUT @Path("/vm/create") + public VirtualMachineEntity create( + @QueryParam("xid") String xid, + @QueryParam("hostname") String hostname, + @QueryParam("display-name") String displayName) { + return null; + } + + @GET @Path("/vms") + public List listAll() { + return null; + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/rest/service/api/VolumeRestService.java b/engine/api/src/org/apache/cloudstack/engine/rest/service/api/VolumeRestService.java new file mode 100755 index 000000000..cb1a0d3dc --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/rest/service/api/VolumeRestService.java @@ -0,0 +1,76 @@ +/* + * 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 org.apache.cloudstack.engine.rest.service.api; + +import java.util.List; + +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; + +import org.apache.cloudstack.engine.cloud.entity.api.VolumeEntity; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; + +@Component +@Service("VolumeRestService") +@Produces("application/json") +public class VolumeRestService { + + @PUT @Path("/vol/create") + public VolumeEntity create( + @QueryParam("xid") String xid, + @QueryParam("display-name") String displayName) { + return null; + } + + @POST @Path("/vol/{volid}/deploy") + public String deploy(@PathParam("volid") String volumeId) { + return null; + } + + @GET @Path("/vols") + public List listAll() { + return null; + } + + @POST @Path("/vol/{volid}/attach-to") + public String attachTo( + @PathParam("volid") String volumeId, + @QueryParam("vmid") String vmId, + @QueryParam("device-order") short device) { + return null; + } + + @DELETE @Path("/vol/{volid}") + public String delete(@PathParam("volid") String volumeId) { + return null; + } + + @POST @Path("/vol/{volid}/detach") + public String detach(@QueryParam("volid") String volumeId) { + return null; + } + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/rest/service/api/ZoneRestService.java b/engine/api/src/org/apache/cloudstack/engine/rest/service/api/ZoneRestService.java new file mode 100755 index 000000000..bd6980e06 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/rest/service/api/ZoneRestService.java @@ -0,0 +1,87 @@ +/* + * 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 org.apache.cloudstack.engine.rest.service.api; + +import java.util.List; + +import javax.ws.rs.DELETE; +import javax.ws.rs.GET; +import javax.ws.rs.POST; +import javax.ws.rs.PUT; +import javax.ws.rs.Path; +import javax.ws.rs.PathParam; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; + +import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntity; +import org.apache.cloudstack.engine.service.api.ProvisioningService; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; + +@Component +@Service("zoneService") +@Produces({"application/json"}) +public class ZoneRestService { +// @Inject + ProvisioningService _provisioningService; + + @GET @Path("/zones") + public List listAll() { + return _provisioningService.listZones(); + } + + @GET @Path("/zone/{zone-id}") + public ZoneEntity get(@PathParam("zone-id") String zoneId) { + return _provisioningService.getZone(zoneId); + } + + @POST @Path("/zone/{zone-id}/enable") + public String enable(String zoneId) { + return null; + } + + @POST @Path("/zone/{zone-id}/disable") + public String disable(@PathParam("zone-id") String zoneId) { + ZoneEntity zoneEntity = _provisioningService.getZone(zoneId); + zoneEntity.disable(); + return null; + } + + @POST @Path("/zone/{zone-id}/deactivate") + public String deactivate(@PathParam("zone-id") String zoneId) { + return null; + } + + @POST @Path("/zone/{zone-id}/activate") + public String reactivate(@PathParam("zone-id") String zoneId) { + return null; + } + + + @PUT @Path("/zone/create") + public ZoneEntity createZone(@QueryParam("xid") String xid, + @QueryParam("display-name") String displayName) { + return null; + } + + @DELETE @Path("/zone/{zone-id}") + public String deleteZone(@QueryParam("zone-id") String xid) { + return null; + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/service/api/DirectoryService.java b/engine/api/src/org/apache/cloudstack/engine/service/api/DirectoryService.java new file mode 100755 index 000000000..360e08f17 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/service/api/DirectoryService.java @@ -0,0 +1,34 @@ +/* + * 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 org.apache.cloudstack.engine.service.api; + +import java.net.URI; +import java.util.List; + +import com.cloud.utils.component.PluggableService; + +public interface DirectoryService { + void registerService(String serviceName, URI endpoint); + void unregisterService(String serviceName, URI endpoint); + List getEndPoints(String serviceName); + URI getLoadBalancedEndPoint(String serviceName); + + List listServices(); + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/service/api/EntityService.java b/engine/api/src/org/apache/cloudstack/engine/service/api/EntityService.java new file mode 100755 index 000000000..2743ab852 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/service/api/EntityService.java @@ -0,0 +1,48 @@ +/* + * 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 org.apache.cloudstack.engine.service.api; + +import java.util.List; + +import javax.ws.rs.Path; + +import com.cloud.network.Network; +import com.cloud.storage.Volume; +import com.cloud.vm.VirtualMachine; + +/** + * Service to retrieve CloudStack entities + * very likely to change + */ +@Path("resources") +public interface EntityService { + List listVirtualMachines(); + List listVolumes(); + List listNetworks(); + List listNics(); + List listSnapshots(); + List listTemplates(); + List listStoragePools(); + List listHosts(); + + VirtualMachine getVirtualMachine(String vm); + Volume getVolume(String volume); + Network getNetwork(String network); + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/service/api/OperationsServices.java b/engine/api/src/org/apache/cloudstack/engine/service/api/OperationsServices.java new file mode 100755 index 000000000..25a0b19d1 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/service/api/OperationsServices.java @@ -0,0 +1,57 @@ +/* + * 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 org.apache.cloudstack.engine.service.api; + +import java.net.URL; +import java.util.List; + +import com.cloud.alert.Alert; +import com.cloud.async.AsyncJob; + +public interface OperationsServices { + List listJobs(); + + List listJobsInProgress(); + + List listJobsCompleted(); + + List listJobsCompleted(Long from); + + List listJobsInWaiting(); + + void cancelJob(String job); + + List listAlerts(); + + Alert getAlert(String uuid); + + void cancelAlert(String alert); + + void registerForAlerts(); + + String registerForEventNotifications(String type, String topic, URL url); + + boolean deregisterForEventNotifications(String notificationId); + + /** + * @return the list of event topics someone can register for + */ + List listEventTopics(); + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/service/api/OrchestrationService.java b/engine/api/src/org/apache/cloudstack/engine/service/api/OrchestrationService.java new file mode 100755 index 000000000..64ef063d0 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/service/api/OrchestrationService.java @@ -0,0 +1,114 @@ +/* + * 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 org.apache.cloudstack.engine.service.api; + +import java.net.URL; +import java.util.List; +import java.util.Map; + +import javax.ws.rs.DELETE; +import javax.ws.rs.POST; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.QueryParam; + +import org.apache.cloudstack.engine.cloud.entity.api.NetworkEntity; +import org.apache.cloudstack.engine.cloud.entity.api.TemplateEntity; +import org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntity; +import org.apache.cloudstack.engine.cloud.entity.api.VolumeEntity; + +import com.cloud.deploy.DeploymentPlan; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.hypervisor.Hypervisor; +import com.cloud.vm.NicProfile; + +@Path("orchestration") +@Produces({"application/json", "application/xml"}) +public interface OrchestrationService { + /** + * creates a new virtual machine + * + * @param id externally unique name to reference the virtual machine + * @param owner owner reference + * @param template reference to the template + * @param hostName name of the host + * @param displayName name to look at + * @param cpu # of cpu cores + * @param speed speed of the cpu core in MHZ + * @param memory memory to allocate in bytes + * @param computeTags tags for the compute + * @param rootDiskTags tags for the root disk + * @param networks networks that this VM should join + * @return VirtualMachineEntity + */ + @POST + @Path("/createvm") + VirtualMachineEntity createVirtualMachine( + @QueryParam("id") String id, + @QueryParam("owner") String owner, + @QueryParam("template-id") String templateId, + @QueryParam("host-name") String hostName, + @QueryParam("display-name") String displayName, + @QueryParam("hypervisor") String hypervisor, + @QueryParam("cpu") int cpu, + @QueryParam("speed") int speed, + @QueryParam("ram") long memory, + @QueryParam("disk-size") Long diskSize, + @QueryParam("compute-tags") List computeTags, + @QueryParam("root-disk-tags") List rootDiskTags, + @QueryParam("network-nic-map") Map networkNicMap, + @QueryParam("deploymentplan") DeploymentPlan plan + ) throws InsufficientCapacityException; + + @POST + VirtualMachineEntity createVirtualMachineFromScratch( + @QueryParam("id") String id, + @QueryParam("owner") String owner, + @QueryParam("iso-id") String isoId, + @QueryParam("host-name") String hostName, + @QueryParam("display-name") String displayName, + @QueryParam("hypervisor") String hypervisor, + @QueryParam("os") String os, + @QueryParam("cpu") int cpu, + @QueryParam("speed") int speed, + @QueryParam("ram") long memory, + @QueryParam("disk-size") Long diskSize, + @QueryParam("compute-tags") List computeTags, + @QueryParam("root-disk-tags") List rootDiskTags, + @QueryParam("network-nic-map") Map networkNicMap, + @QueryParam("deploymentplan") DeploymentPlan plan + ) throws InsufficientCapacityException; + + @POST + NetworkEntity createNetwork(String id, String name, String domainName, String cidr, String gateway); + + @DELETE + void destroyNetwork(String networkUuid); + + @POST + VolumeEntity createVolume(); + + @DELETE + void destroyVolume(String volumeEntity); + + @POST + TemplateEntity registerTemplate(String name, URL path, String os, Hypervisor hypervisor); + + VirtualMachineEntity getVirtualMachine(@QueryParam("id") String id); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/service/api/ProvisioningService.java b/engine/api/src/org/apache/cloudstack/engine/service/api/ProvisioningService.java new file mode 100755 index 000000000..e1ba1de58 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/service/api/ProvisioningService.java @@ -0,0 +1,72 @@ +/* + * 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 org.apache.cloudstack.engine.service.api; + +import java.util.List; +import java.util.Map; + +import org.apache.cloudstack.engine.datacenter.entity.api.ClusterEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.HostEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.PodEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.StorageEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntity; + +import com.cloud.host.Host; +import com.cloud.host.Status; +import com.cloud.storage.StoragePool; + + +/** + * ProvisioningService registers and deregisters physical and virtual + * resources that the management server can use. + */ +public interface ProvisioningService { + + StorageEntity registerStorage(String name, List tags, Map details); + + ZoneEntity registerZone(String zoneUuid, String name, String owner, List tags, Map details); + + PodEntity registerPod(String podUuid, String name, String owner, String zoneUuid, List tags, Map details); + + ClusterEntity registerCluster(String clusterUuid, String name, String owner, List tags, Map details); + + HostEntity registerHost(String uuid, String name, String owner, List tags, Map details); + + void deregisterStorage(String uuid); + + void deregisterZone(String uuid); + + void deregisterPod(String uuid); + + void deregisterCluster(String uuid); + + void deregisterHost(String uuid); + + void changeState(String type, String entity, Status state); + + List listHosts(); + + List listPods(); + + List listZones(); + + List listStorage(); + + ZoneEntity getZone(String id); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/hypervisor/ComputeSubsystem.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/hypervisor/ComputeSubsystem.java new file mode 100644 index 000000000..f972e816d --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/hypervisor/ComputeSubsystem.java @@ -0,0 +1,31 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.hypervisor; + + +public interface ComputeSubsystem { + + void start(String vm, String reservationId); + + void cancel(String reservationId); + + void stop(String vm, String reservationId); + + void migrate(String vm, String reservationId); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/network/NetworkServiceProvider.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/network/NetworkServiceProvider.java new file mode 100755 index 000000000..20c5a88ac --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/network/NetworkServiceProvider.java @@ -0,0 +1,47 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.network; + +public interface NetworkServiceProvider { + /** + * Plug your network elements into this network + * @param network + * @param reservationId + */ + void plugInto(String network, String reservationId); + + /** + * Unplug your network elements from this network + * @param network + * @param reservationId + */ + void unplugFrom(String network, String reservationId); + + /** + * Cancel a previous work + * @param reservationId + */ + void cancel(String reservationId); + + void provideServiceTo(String vm, String network, String reservationId); + + void removeServiceFrom(String vm, String network, String reservationId); + + void cleanUp(String network, String reservationId); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/network/NetworkSubsystem.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/network/NetworkSubsystem.java new file mode 100755 index 000000000..53254cce5 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/network/NetworkSubsystem.java @@ -0,0 +1,35 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.network; + +public interface NetworkSubsystem { + String create(); + + String start(String network, String reservationId); + + void shutdown(String nework, String reservationId); + + void prepare(String vm, String network, String reservationId); + + void release(String vm, String network, String reservationId); + + void cancel(String reservationId); + + void destroy(String network, String reservationId); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/AbstractScope.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/AbstractScope.java new file mode 100644 index 000000000..c94db66b2 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/AbstractScope.java @@ -0,0 +1,30 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +public abstract class AbstractScope implements Scope { + @Override + public boolean isSameScope(Scope scope) { + if (this.getScopeType() == scope.getScopeType() && this.getScopeId() == scope.getScopeId()) { + return true; + } else { + return false; + } + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ClusterScope.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ClusterScope.java new file mode 100644 index 000000000..0f0e95815 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ClusterScope.java @@ -0,0 +1,52 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + + +public class ClusterScope extends AbstractScope { + private ScopeType type = ScopeType.CLUSTER; + private Long clusterId; + private Long podId; + private Long zoneId; + + public ClusterScope(Long clusterId, Long podId, Long zoneId) { + this.clusterId = clusterId; + this.podId = podId; + this.zoneId = zoneId; + } + + @Override + public ScopeType getScopeType() { + return this.type; + } + + @Override + public Long getScopeId() { + return this.clusterId; + } + + public Long getPodId() { + return this.podId; + } + + public Long getZoneId() { + return this.zoneId; + } + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java new file mode 100644 index 000000000..cc45914dc --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CommandResult.java @@ -0,0 +1,52 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +public class CommandResult { + private boolean success; + private String result; + public CommandResult() { + this.success = true; + this.result = ""; + } + + public boolean isSuccess() { + return this.success; + } + + public boolean isFailed() { + return !this.success; + } + + public void setSuccess(boolean success) { + this.success = success; + } + + public String getResult() { + return this.result; + } + + public void setResult(String result) { + this.result = result; + if (result != null) { + this.success = false; + } + } +} + \ No newline at end of file diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CopyCommandResult.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CopyCommandResult.java new file mode 100644 index 000000000..571a77c37 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CopyCommandResult.java @@ -0,0 +1,39 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import com.cloud.agent.api.Answer; + +public class CopyCommandResult extends CommandResult { + private final String path; + private final Answer answer; + public CopyCommandResult(String path, Answer answer) { + super(); + this.path = path; + this.answer = answer; + } + + public String getPath() { + return this.path; + } + + public Answer getAnswer() { + return this.answer; + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CreateCmdResult.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CreateCmdResult.java new file mode 100644 index 000000000..b6d5b6899 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/CreateCmdResult.java @@ -0,0 +1,37 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +public class CreateCmdResult extends CommandResult { + private String path; + private Long size; + public CreateCmdResult(String path, Long size) { + super(); + this.path = path; + this.size = size; + } + + public String getPath() { + return this.path; + } + + public Long getSize() { + return this.size; + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataMigrationSubSystem.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataMigrationSubSystem.java new file mode 100755 index 000000000..65928bd55 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataMigrationSubSystem.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import java.net.URI; + +import com.cloud.org.Grouping; + +public interface DataMigrationSubSystem { + + Class getScopeCoverage(); + void migrate(URI source, URI dest, String reservationId); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataObject.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataObject.java new file mode 100644 index 000000000..0827cf6b6 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataObject.java @@ -0,0 +1,32 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import org.apache.cloudstack.engine.subsystem.api.storage.disktype.DiskFormat; + +public interface DataObject { + public long getId(); + public String getUri(); + public DataStore getDataStore(); + public Long getSize(); + public DataObjectType getType(); + public DiskFormat getFormat(); + public String getUuid(); + public void processEvent(ObjectInDataStoreStateMachine.Event event); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataObjectInStore.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataObjectInStore.java new file mode 100644 index 000000000..32ea996e6 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataObjectInStore.java @@ -0,0 +1,27 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import com.cloud.utils.fsm.StateObject; + + +public interface DataObjectInStore extends StateObject { + public String getInstallPath(); + public void setInstallPath(String path); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataObjectType.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataObjectType.java new file mode 100644 index 000000000..b4d1a57c8 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataObjectType.java @@ -0,0 +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. + */ +package org.apache.cloudstack.engine.subsystem.api.storage; + +public enum DataObjectType { + VOLUME, + SNAPSHOT, + TEMPLATE +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStore.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStore.java new file mode 100644 index 000000000..f101f2430 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStore.java @@ -0,0 +1,28 @@ +// 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 org.apache.cloudstack.engine.subsystem.api.storage; + +public interface DataStore { + DataStoreDriver getDriver(); + DataStoreRole getRole(); + long getId(); + String getUuid(); + String getUri(); + Scope getScope(); + DataObject create(DataObject obj); + boolean delete(DataObject obj); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreDriver.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreDriver.java new file mode 100644 index 000000000..cf5759b29 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreDriver.java @@ -0,0 +1,34 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import java.util.Set; + +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; + +public interface DataStoreDriver { + public String grantAccess(DataObject data, EndPoint ep); + public boolean revokeAccess(DataObject data, EndPoint ep); + public Set listObjects(DataStore store); + public void createAsync(DataObject data, AsyncCompletionCallback callback); + public void deleteAsync(DataObject data, AsyncCompletionCallback callback); + public void copyAsync(DataObject srcdata, DataObject destData, AsyncCompletionCallback callback); + public boolean canCopy(DataObject srcData, DataObject destData); + public void resize(DataObject data, AsyncCompletionCallback callback); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreLifeCycle.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreLifeCycle.java new file mode 100644 index 000000000..280e02e2a --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreLifeCycle.java @@ -0,0 +1,42 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import java.util.Map; + +import com.cloud.agent.api.StoragePoolInfo; + + +public interface DataStoreLifeCycle { + public DataStore initialize(Map dsInfos); + + public boolean attachCluster(DataStore store, ClusterScope scope); + public boolean attachHost(DataStore store, HostScope scope, StoragePoolInfo existingInfo); + boolean attachZone(DataStore dataStore, ZoneScope scope); + + public boolean dettach(); + + public boolean unmanaged(); + + public boolean maintain(DataStore store); + + public boolean cancelMaintain(DataStore store); + + public boolean deleteDataStore(DataStore store); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreManager.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreManager.java new file mode 100644 index 000000000..15e49e133 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreManager.java @@ -0,0 +1,31 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import java.util.List; +import java.util.Map; + + +public interface DataStoreManager { + public DataStore getDataStore(long storeId, DataStoreRole role); + public DataStore getPrimaryDataStore(long storeId); + public DataStore getDataStore(String uuid, DataStoreRole role); + public List getImageStores(Scope scope); + public DataStore registerDataStore(Map params, String providerUuid); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreProvider.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreProvider.java new file mode 100644 index 000000000..115a52f92 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreProvider.java @@ -0,0 +1,37 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import java.util.Map; +import java.util.Set; + + +public interface DataStoreProvider { + public static enum DataStoreProviderType { + PRIMARY, + IMAGE + } + public DataStoreLifeCycle getDataStoreLifeCycle(); + public DataStoreDriver getDataStoreDriver(); + public HypervisorHostListener getHostListener(); + public String getName(); + public boolean configure(Map params); + public Set getTypes(); + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreProviderManager.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreProviderManager.java new file mode 100644 index 000000000..906720a1f --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreProviderManager.java @@ -0,0 +1,31 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import java.util.List; + +import com.cloud.storage.DataStoreProviderApiService; +import com.cloud.utils.component.Manager; + +public interface DataStoreProviderManager extends Manager, DataStoreProviderApiService { + public DataStoreProvider getDataStoreProvider(String name); + public DataStoreProvider getDefaultPrimaryDataStoreProvider(); + public List getDataStoreProviders(); + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreRole.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreRole.java new file mode 100644 index 000000000..a45ca7a6c --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/DataStoreRole.java @@ -0,0 +1,54 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import com.cloud.utils.exception.CloudRuntimeException; + +public enum DataStoreRole { + Primary("primary"), + Image("image"), + ImageCache("imagecache"), + Backup("backup"); + + public boolean isImageStore() { + return (this.role.equalsIgnoreCase("image") || this.role.equalsIgnoreCase("imagecache")) ? true : false; + } + + private final String role; + DataStoreRole(String type) { + this.role = type; + } + + public static DataStoreRole getRole(String role) { + if (role == null) { + throw new CloudRuntimeException("role can't be empty"); + } + if (role.equalsIgnoreCase("primary")) { + return Primary; + } else if (role.equalsIgnoreCase("image")) { + return Image; + } else if (role.equalsIgnoreCase("imagecache")) { + return ImageCache; + } else if (role.equalsIgnoreCase("backup")) { + return Backup; + } else { + throw new CloudRuntimeException("can't identify the role"); + } + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/EndPoint.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/EndPoint.java new file mode 100644 index 000000000..2ff45b1bf --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/EndPoint.java @@ -0,0 +1,28 @@ +// 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; + +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.Command; + +public interface EndPoint { + public long getId(); + public Answer sendMessage(Command cmd); + public void sendMessageAsync(Command cmd, AsyncCompletionCallback callback); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/HostScope.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/HostScope.java new file mode 100644 index 000000000..c5e90ac89 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/HostScope.java @@ -0,0 +1,37 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + + +public class HostScope extends AbstractScope { + private ScopeType type = ScopeType.HOST; + private Long hostId; + public HostScope(Long hostId) { + this.hostId = hostId; + } + @Override + public ScopeType getScopeType() { + return this.type; + } + + @Override + public Long getScopeId() { + return this.hostId; + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/HypervisorHostListener.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/HypervisorHostListener.java new file mode 100644 index 000000000..3ac17598b --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/HypervisorHostListener.java @@ -0,0 +1,24 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +public interface HypervisorHostListener { + boolean hostConnect(long hostId, long poolId); + boolean hostDisconnected(long hostId, long poolId); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ImageDataFactory.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ImageDataFactory.java new file mode 100644 index 000000000..f0d69887c --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ImageDataFactory.java @@ -0,0 +1,26 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + + +public interface ImageDataFactory { + TemplateInfo getTemplate(long templateId, DataStore store); + TemplateInfo getTemplate(DataObject obj, DataStore store); + TemplateInfo getTemplate(long templateId); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ImageDataStoreProvider.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ImageDataStoreProvider.java new file mode 100644 index 000000000..1fb987e81 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ImageDataStoreProvider.java @@ -0,0 +1,24 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + + +public interface ImageDataStoreProvider extends DataStoreProvider { + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ImageService.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ImageService.java new file mode 100644 index 000000000..119f3b1d3 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ImageService.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import org.apache.cloudstack.framework.async.AsyncCallFuture; + +public interface ImageService { + AsyncCallFuture createTemplateAsync(TemplateInfo template, DataStore store); + AsyncCallFuture createTemplateFromSnapshotAsync(SnapshotInfo snapshot, TemplateInfo template, DataStore store); + AsyncCallFuture createTemplateFromVolumeAsync(VolumeInfo volume, TemplateInfo template, DataStore store); + AsyncCallFuture deleteTemplateAsync(TemplateInfo template); + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java new file mode 100644 index 000000000..f619ef4e9 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java @@ -0,0 +1,56 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import com.cloud.utils.fsm.StateObject; + +public interface ObjectInDataStoreStateMachine extends StateObject { + enum State { + Allocated("The initial state"), + Creating2("This is only used with createOnlyRequested event"), + Creating("The object is being creating on data store"), + Created("The object is created"), + Ready("Template downloading is accomplished"), + Copying("The object is being coping"), + Destroying("Template is destroying"), + Destroyed("Template is destroyed"), + Failed("Failed to download template"); + String _description; + + private State(String description) { + _description = description; + } + + public String getDescription() { + return _description; + } + } + + enum Event { + CreateRequested, + CreateOnlyRequested, + DestroyRequested, + OperationSuccessed, + OperationFailed, + CopyingRequested, + ResizeRequested, + ExpungeRequested + + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java new file mode 100644 index 000000000..78a1014d3 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreDriver.java @@ -0,0 +1,26 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; + +public interface PrimaryDataStoreDriver extends DataStoreDriver { + public void takeSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback callback); + public void revertSnapshot(SnapshotInfo snapshot, AsyncCompletionCallback callback); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreInfo.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreInfo.java new file mode 100644 index 000000000..3497f7a89 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreInfo.java @@ -0,0 +1,37 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + + +import org.apache.cloudstack.engine.subsystem.api.storage.disktype.DiskFormat; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.storage.Storage.StoragePoolType; +import com.cloud.storage.StoragePool; + +public interface PrimaryDataStoreInfo extends StoragePool { + public boolean isHypervisorSupported(HypervisorType hypervisor); + public boolean isLocalStorageSupported(); + public boolean isVolumeDiskTypeSupported(DiskFormat diskType); + + public String getUuid(); + + public StoragePoolType getPoolType(); + public PrimaryDataStoreLifeCycle getLifeCycle(); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreLifeCycle.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreLifeCycle.java new file mode 100644 index 000000000..cf29d9fea --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreLifeCycle.java @@ -0,0 +1,23 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + + +public interface PrimaryDataStoreLifeCycle extends DataStoreLifeCycle { +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreParameters.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreParameters.java new file mode 100644 index 000000000..b2b787cc1 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreParameters.java @@ -0,0 +1,220 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import java.util.Map; + +import com.cloud.storage.Storage.StoragePoolType; + +public class PrimaryDataStoreParameters { + private Long zoneId; + private Long podId; + private Long clusterId; + private String providerName; + private Map details; + private String tags; + private StoragePoolType type; + private String host; + private String path; + private int port; + private String uuid; + private String name; + private String userInfo; + /** + * @return the userInfo + */ + public String getUserInfo() { + return userInfo; + } + + /** + * @param userInfo the userInfo to set + */ + public void setUserInfo(String userInfo) { + this.userInfo = userInfo; + } + + /** + * @return the name + */ + public String getName() { + return name; + } + + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + + /** + * @return the uuid + */ + public String getUuid() { + return uuid; + } + + /** + * @param uuid the uuid to set + */ + public void setUuid(String uuid) { + this.uuid = uuid; + } + + /** + * @return the port + */ + public int getPort() { + return port; + } + + /** + * @param port the port to set + */ + public void setPort(int port) { + this.port = port; + } + + /** + * @return the path + */ + public String getPath() { + return path; + } + + /** + * @param path the path to set + */ + public void setPath(String path) { + this.path = path; + } + + /** + * @return the host + */ + public String getHost() { + return host; + } + + /** + * @param host the host to set + */ + public void setHost(String host) { + this.host = host; + } + + /** + * @return the type + */ + public StoragePoolType getType() { + return type; + } + + /** + * @param type the type to set + */ + public void setType(StoragePoolType type) { + this.type = type; + } + + /** + * @return the tags + */ + public String getTags() { + return tags; + } + + /** + * @param tags the tags to set + */ + public void setTags(String tags) { + this.tags = tags; + } + + /** + * @return the details + */ + public Map getDetails() { + return details; + } + + /** + * @param details the details to set + */ + public void setDetails(Map details) { + this.details = details; + } + + /** + * @return the providerName + */ + public String getProviderName() { + return providerName; + } + + /** + * @param providerName the providerName to set + */ + public void setProviderName(String providerName) { + this.providerName = providerName; + } + + /** + * @return the clusterId + */ + public Long getClusterId() { + return clusterId; + } + + /** + * @param clusterId the clusterId to set + */ + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + /** + * @return the podId + */ + public Long getPodId() { + return podId; + } + + /** + * @param podId the podId to set + */ + public void setPodId(Long podId) { + this.podId = podId; + } + + /** + * @return the zoneId + */ + public Long getZoneId() { + return zoneId; + } + + /** + * @param zoneId the zoneId to set + */ + public void setZoneId(Long zoneId) { + this.zoneId = zoneId; + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreProvider.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreProvider.java new file mode 100644 index 000000000..b349ac9ad --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/PrimaryDataStoreProvider.java @@ -0,0 +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. +package org.apache.cloudstack.engine.subsystem.api.storage; + +public interface PrimaryDataStoreProvider extends DataStoreProvider { +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/Scope.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/Scope.java new file mode 100644 index 000000000..91d4734ef --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/Scope.java @@ -0,0 +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. + */ +package org.apache.cloudstack.engine.subsystem.api.storage; + +public interface Scope { + public ScopeType getScopeType(); + public boolean isSameScope(Scope scope); + public Long getScopeId(); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ScopeType.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ScopeType.java new file mode 100644 index 000000000..a3d21ce9b --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ScopeType.java @@ -0,0 +1,27 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +public enum ScopeType { + HOST, + CLUSTER, + ZONE, + REGION, + GLOBAL; +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotDataFactory.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotDataFactory.java new file mode 100644 index 000000000..1ff3ff250 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotDataFactory.java @@ -0,0 +1,26 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + + +public interface SnapshotDataFactory { + public SnapshotInfo getSnapshot(long snapshotId, DataStore store); + public SnapshotInfo getSnapshot(DataObject obj, DataStore store); + public SnapshotInfo getSnapshot(long snapshotId); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java new file mode 100644 index 000000000..b90404c56 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java @@ -0,0 +1,28 @@ +// 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import com.cloud.storage.Snapshot; + + +public interface SnapshotInfo extends DataObject, Snapshot { + public SnapshotInfo getParent(); + public SnapshotInfo getChild(); + public VolumeInfo getBaseVolume(); + Long getDataCenterId(); + public Long getPrevSnapshotId(); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotProfile.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotProfile.java new file mode 100644 index 000000000..50a12002c --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotProfile.java @@ -0,0 +1,26 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +public class SnapshotProfile { + private String _uri; + public String getURI() { + return _uri; + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotStrategy.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotStrategy.java new file mode 100644 index 000000000..e9492c4af --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotStrategy.java @@ -0,0 +1,27 @@ +// 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 org.apache.cloudstack.engine.subsystem.api.storage; + + +public interface SnapshotStrategy { + public boolean canHandle(SnapshotInfo snapshot); + public SnapshotInfo takeSnapshot(VolumeInfo volume, Long snapshotId); + public SnapshotInfo backupSnapshot(SnapshotInfo snapshot); + public boolean deleteSnapshot(SnapshotInfo snapshot); + public boolean revertSnapshot(SnapshotInfo snapshot); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StorageEvent.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StorageEvent.java new file mode 100644 index 000000000..3f64002ed --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StorageEvent.java @@ -0,0 +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. + */ +package org.apache.cloudstack.engine.subsystem.api.storage; + +public enum StorageEvent { + DownloadTemplateToPrimary, + RegisterTemplate, + CreateVolumeFromTemplate; +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StorageOrchestrator.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StorageOrchestrator.java new file mode 100755 index 000000000..fdb15c733 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StorageOrchestrator.java @@ -0,0 +1,68 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import java.util.List; + +import org.apache.cloudstack.engine.cloud.entity.api.TemplateEntity; +import org.apache.cloudstack.engine.cloud.entity.api.VolumeEntity; +import org.apache.cloudstack.engine.subsystem.api.storage.disktype.DiskFormat; +import org.apache.cloudstack.engine.subsystem.api.storage.type.VolumeType; + +import com.cloud.deploy.DeploymentPlan; + +public interface StorageOrchestrator { + + /** + * Prepares all storage ready for a VM to start + * @param vm + * @param reservationId + */ + void prepare(long vmId, DeploymentPlan plan, String reservationId); + + /** + * Releases all storage that were used for a VM shutdown + * @param vm + * @param disks + * @param reservationId + */ + void release(long vmId, String reservationId); + + /** + * Destroy all disks + * @param disks + * @param reservationId + */ + void destroy(List disks, String reservationId); + + /** + * Cancel a reservation + * @param reservationId reservation to + */ + void cancel(String reservationId); + + /** + * If attaching a volume in allocated state to a running vm, need to create this volume + */ + void prepareAttachDiskToVM(long diskId, long vmId, String reservationId); + + boolean createVolume(VolumeEntity volume, long dataStoreId, DiskFormat diskType); + boolean createVolumeFromTemplate(VolumeEntity volume, long dataStoreId, DiskFormat dis, TemplateEntity template); + VolumeEntity allocateVolumeInDb(long size, VolumeType type,String volName, Long templateId); +} diff --git a/server/src/com/cloud/storage/allocator/StoragePoolAllocator.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StoragePoolAllocator.java similarity index 79% rename from server/src/com/cloud/storage/allocator/StoragePoolAllocator.java rename to engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StoragePoolAllocator.java index 1c02c6cb6..ffced54c2 100644 --- a/server/src/com/cloud/storage/allocator/StoragePoolAllocator.java +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StoragePoolAllocator.java @@ -14,14 +14,12 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -package com.cloud.storage.allocator; +package org.apache.cloudstack.engine.subsystem.api.storage; import java.util.List; -import java.util.Set; import com.cloud.deploy.DeploymentPlan; import com.cloud.deploy.DeploymentPlanner.ExcludeList; -import com.cloud.host.Host; import com.cloud.storage.StoragePool; import com.cloud.utils.component.Adapter; import com.cloud.vm.DiskProfile; @@ -31,12 +29,6 @@ /** */ public interface StoragePoolAllocator extends Adapter { - - //keeping since storageMgr is using this API for some existing functionalities - List allocateToPool(DiskProfile dskCh, VirtualMachineProfile vmProfile, long dcId, long podId, Long clusterId, Long hostId, Set avoids, int returnUpTo); - - String chooseStorageIp(VirtualMachine vm, Host host, Host storage); - /** * Determines which storage pools are suitable for the guest virtual machine * diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StorageSubSystem.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StorageSubSystem.java new file mode 100644 index 000000000..8043487d4 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/StorageSubSystem.java @@ -0,0 +1,29 @@ +// 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import java.net.URI; + +import com.cloud.org.Grouping; + +public interface StorageSubSystem { + String getType(); + Class getScope(); + + URI grantAccess(String vol, String reservationId); + URI RemoveAccess(String vol, String reservationId); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateEvent.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateEvent.java new file mode 100644 index 000000000..c677166b3 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateEvent.java @@ -0,0 +1,26 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +public enum TemplateEvent { + CreateRequested, + OperationFailed, + OperationSucceeded, + DestroyRequested; +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateInfo.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateInfo.java new file mode 100644 index 000000000..8e0350391 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateInfo.java @@ -0,0 +1,22 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +public interface TemplateInfo extends DataObject { +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateProfile.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateProfile.java new file mode 100755 index 000000000..e05e7db67 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateProfile.java @@ -0,0 +1,287 @@ +// 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import java.util.Map; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.storage.Storage.ImageFormat; +import com.cloud.template.VirtualMachineTemplate; + +public class TemplateProfile { + Long userId; + String name; + String displayText; + Integer bits; + Boolean passwordEnabled; + Boolean sshKeyEnbaled; + Boolean requiresHvm; + String url; + Boolean isPublic; + Boolean featured; + Boolean isExtractable; + ImageFormat format; + Long guestOsId; + Long zoneId; + HypervisorType hypervisorType; + String accountName; + Long domainId; + Long accountId; + String chksum; + Boolean bootable; + Long templateId; + VirtualMachineTemplate template; + String templateTag; + Map details; + + public TemplateProfile(Long templateId, Long userId, String name, String displayText, Integer bits, Boolean passwordEnabled, Boolean requiresHvm, + String url, Boolean isPublic, Boolean featured, Boolean isExtractable, ImageFormat format, Long guestOsId, Long zoneId, + HypervisorType hypervisorType, String accountName, Long domainId, Long accountId, String chksum, Boolean bootable, Map details, Boolean sshKeyEnabled) { + this.templateId = templateId; + this.userId = userId; + this.name = name; + this.displayText = displayText; + this.bits = bits; + this.passwordEnabled = passwordEnabled; + this.requiresHvm = requiresHvm; + this.url = url; + this.isPublic = isPublic; + this.featured = featured; + this.isExtractable = isExtractable; + this.format = format; + this.guestOsId = guestOsId; + this.zoneId = zoneId; + this.hypervisorType = hypervisorType; + this.accountName = accountName; + this.domainId = domainId; + this.accountId = accountId; + this.chksum = chksum; + this.bootable = bootable; + this.details = details; + this.sshKeyEnbaled = sshKeyEnabled; + } + + public TemplateProfile(Long userId, VirtualMachineTemplate template, Long zoneId) { + this.userId = userId; + this.template = template; + this.zoneId = zoneId; + } + + public TemplateProfile(Long templateId, Long userId, String name, String displayText, Integer bits, Boolean passwordEnabled, Boolean requiresHvm, + String url, Boolean isPublic, Boolean featured, Boolean isExtractable, ImageFormat format, Long guestOsId, Long zoneId, + HypervisorType hypervisorType, String accountName, Long domainId, Long accountId, String chksum, Boolean bootable, String templateTag, Map details, Boolean sshKeyEnabled) { + this(templateId, userId, name, displayText, bits, passwordEnabled, requiresHvm, url, isPublic, featured, isExtractable, format, guestOsId, zoneId, + hypervisorType, accountName, domainId, accountId, chksum, bootable, details, sshKeyEnabled); + this.templateTag = templateTag; + } + + public Long getTemplateId() { + return templateId; + } + public void setTemplateId(Long id) { + this.templateId = id; + } + + public Long getUserId() { + return userId; + } + public void setUserId(Long userId) { + this.userId = userId; + } + + public String getName() { + return name; + } + public void setName(String name) { + this.name = name; + } + + public String getDisplayText() { + return displayText; + } + public void setDisplayText(String text) { + this.displayText = text; + } + + public Integer getBits() { + return bits; + } + public void setBits(Integer bits) { + this.bits = bits; + } + + public Boolean getPasswordEnabled() { + return passwordEnabled; + } + public void setPasswordEnabled(Boolean enabled) { + this.passwordEnabled = enabled; + } + + public Boolean getRequiresHVM() { + return requiresHvm; + } + public void setRequiresHVM(Boolean hvm) { + this.requiresHvm = hvm; + } + + public String getUrl() { + return url; + } + public void setUrl(String url) { + this.url = url; + } + + public Boolean getIsPublic() { + return isPublic; + } + public void setIsPublic(Boolean is) { + this.isPublic = is; + } + + public Boolean getFeatured() { + return featured; + } + public void setFeatured(Boolean featured) { + this.featured = featured; + } + + public Boolean getIsExtractable() { + return isExtractable; + } + public void setIsExtractable(Boolean is) { + this.isExtractable = is; + } + + public ImageFormat getFormat() { + return format; + } + public void setFormat(ImageFormat format) { + this.format = format; + } + + public Long getGuestOsId() { + return guestOsId; + } + public void setGuestOsId(Long id) { + this.guestOsId = id; + } + + public Long getZoneId() { + return zoneId; + } + public void setZoneId(Long id) { + this.zoneId = id; + } + + public HypervisorType getHypervisorType() { + return hypervisorType; + } + public void setHypervisorType(HypervisorType type) { + this.hypervisorType = type; + } + + public Long getDomainId() { + return domainId; + } + public void setDomainId(Long id) { + this.domainId = id; + } + + public Long getAccountId() { + return accountId; + } + public void setAccountId(Long id) { + this.accountId = id; + } + + public String getCheckSum() { + return chksum; + } + public void setCheckSum(String chksum) { + this.chksum = chksum; + } + + public Boolean getBootable() { + return this.bootable; + } + public void setBootable(Boolean bootable) { + this.bootable = bootable; + } + + public VirtualMachineTemplate getTemplate() { + return template; + } + public void setTemplate(VirtualMachineTemplate template) { + this.template = template; + } + + public String getTemplateTag() { + return templateTag; + } + + public void setTemplateTag(String templateTag) { + this.templateTag = templateTag; + } + + public Map getDetails() { + return this.details; + } + + public void setDetails(Map details) { + this.details = details; + } + + public void setSshKeyEnabled(Boolean enabled) { + this.sshKeyEnbaled = enabled; + } + + public Boolean getSshKeyEnabled() { + return this.sshKeyEnbaled; + } + + public String getImageStorageUri() { + return null; + } + + public void setLocalPath(String path) { + + } + + public String getLocalPath() { + return null; + } + + public String getJobId() { + return null; + } + + public void setTemplatePoolRefId(long id) { + + } + + public long getId() { + return 0; + } + + public long getTemplatePoolRefId() { + return 0; + } + + public long getSize() { + return 0; + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateState.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateState.java new file mode 100644 index 000000000..ef2488080 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/TemplateState.java @@ -0,0 +1,27 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +public enum TemplateState { + Allocated, + Creating, + Destroying, + Destroyed, + Ready; +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeDataFactory.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeDataFactory.java new file mode 100644 index 000000000..1518fd2eb --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeDataFactory.java @@ -0,0 +1,26 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + + +public interface VolumeDataFactory { + VolumeInfo getVolume(long volumeId, DataStore store); + VolumeInfo getVolume(DataObject volume, DataStore store); + VolumeInfo getVolume(long volumeId); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeInfo.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeInfo.java new file mode 100644 index 000000000..349325af4 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeInfo.java @@ -0,0 +1,30 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.storage.Volume; + +public interface VolumeInfo extends DataObject, Volume { + public boolean isAttachedVM(); + public void addPayload(Object data); + public Object getpayload(); + public HypervisorType getHypervisorType(); + public Long getLastPoolId(); +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeProfile.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeProfile.java new file mode 100644 index 000000000..ed4d42187 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeProfile.java @@ -0,0 +1,34 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +public class VolumeProfile { + private String _uri; + public String getURI() { + return _uri; + } + + public String getPath() { + return null; + } + + public long getSize() { + return 0; + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java new file mode 100644 index 000000000..102c47174 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/VolumeService.java @@ -0,0 +1,80 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import org.apache.cloudstack.engine.cloud.entity.api.VolumeEntity; +import org.apache.cloudstack.framework.async.AsyncCallFuture; + +import com.cloud.exception.ConcurrentOperationException; + + +public interface VolumeService { + + public class VolumeApiResult extends CommandResult { + private final VolumeInfo volume; + public VolumeApiResult(VolumeInfo volume) { + this.volume = volume; + } + + public VolumeInfo getVolume() { + return this.volume; + } + } + + /** + * Creates the volume based on the given criteria + * + * @param cmd + * + * @return the volume object + */ + AsyncCallFuture createVolumeAsync(VolumeInfo volume, DataStore store); + + /** + * Delete volume + * + * @param volumeId + * @return + * @throws ConcurrentOperationException + */ + AsyncCallFuture expungeVolumeAsync(VolumeInfo volume); + + /** + * + */ + boolean cloneVolume(long volumeId, long baseVolId); + + /** + * + */ + AsyncCallFuture createVolumeFromSnapshot(VolumeInfo volume, DataStore store, SnapshotInfo snapshot); + + + VolumeEntity getVolumeEntity(long volumeId); + + AsyncCallFuture createVolumeFromTemplateAsync(VolumeInfo volume, long dataStoreId, TemplateInfo template); + AsyncCallFuture copyVolume(VolumeInfo srcVolume, DataStore destStore); + + boolean destroyVolume(long volumeId) throws ConcurrentOperationException; + + AsyncCallFuture registerVolume(VolumeInfo volume, DataStore store); + + AsyncCallFuture resize(VolumeInfo volume); + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ZoneScope.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ZoneScope.java new file mode 100644 index 000000000..2d3d41f22 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/ZoneScope.java @@ -0,0 +1,40 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + + +public class ZoneScope extends AbstractScope { + private ScopeType type = ScopeType.ZONE; + private Long zoneId; + + public ZoneScope(Long zoneId) { + this.zoneId = zoneId; + } + + @Override + public ScopeType getScopeType() { + return this.type; + } + + @Override + public Long getScopeId() { + return this.zoneId; + } + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/DiskFormat.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/DiskFormat.java new file mode 100644 index 000000000..e059fa903 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/DiskFormat.java @@ -0,0 +1,38 @@ +// 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 org.apache.cloudstack.engine.subsystem.api.storage.disktype; + +import com.cloud.utils.exception.CloudRuntimeException; + +public enum DiskFormat { + VMDK, + VHD, + ISO, + QCOW2; + public static DiskFormat getFormat(String format) { + if (VMDK.toString().equalsIgnoreCase(format)) { + return VMDK; + } else if (VHD.toString().equalsIgnoreCase(format)) { + return VHD; + } else if (QCOW2.toString().equalsIgnoreCase(format)) { + return QCOW2; + } else if (ISO.toString().equalsIgnoreCase(format)) { + return ISO; + } + throw new CloudRuntimeException("can't find format match: " + format); + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/QCOW2.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/QCOW2.java new file mode 100644 index 000000000..b248758bc --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/QCOW2.java @@ -0,0 +1,16 @@ +// 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. diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/Unknown.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/Unknown.java new file mode 100644 index 000000000..b248758bc --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/Unknown.java @@ -0,0 +1,16 @@ +// 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. diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VHD.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VHD.java new file mode 100644 index 000000000..b248758bc --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VHD.java @@ -0,0 +1,16 @@ +// 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. diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VMDK.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VMDK.java new file mode 100644 index 000000000..b248758bc --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VMDK.java @@ -0,0 +1,16 @@ +// 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. diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VolumeDiskType.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VolumeDiskType.java new file mode 100644 index 000000000..b248758bc --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VolumeDiskType.java @@ -0,0 +1,16 @@ +// 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. diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VolumeDiskTypeBase.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VolumeDiskTypeBase.java new file mode 100644 index 000000000..b248758bc --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VolumeDiskTypeBase.java @@ -0,0 +1,16 @@ +// 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. diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VolumeDiskTypeHelper.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VolumeDiskTypeHelper.java new file mode 100644 index 000000000..b248758bc --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/disktype/VolumeDiskTypeHelper.java @@ -0,0 +1,16 @@ +// 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. diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/BaseImage.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/BaseImage.java new file mode 100644 index 000000000..9991cedfa --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/BaseImage.java @@ -0,0 +1,23 @@ +// 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 org.apache.cloudstack.engine.subsystem.api.storage.type; + +public class BaseImage extends VolumeTypeBase { + public BaseImage() { + this.type = "BaseImage"; + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/DataDisk.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/DataDisk.java new file mode 100644 index 000000000..762233e94 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/DataDisk.java @@ -0,0 +1,26 @@ +// 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 org.apache.cloudstack.engine.subsystem.api.storage.type; + +import org.springframework.stereotype.Component; + +@Component +public class DataDisk extends VolumeTypeBase { + public DataDisk() { + this.type = "DataDisk"; + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/Iso.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/Iso.java new file mode 100644 index 000000000..43611b461 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/Iso.java @@ -0,0 +1,26 @@ +// 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 org.apache.cloudstack.engine.subsystem.api.storage.type; + +import org.springframework.stereotype.Component; + +@Component +public class Iso extends VolumeTypeBase { + public Iso() { + this.type = "iso"; + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/RootDisk.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/RootDisk.java new file mode 100644 index 000000000..723d59c66 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/RootDisk.java @@ -0,0 +1,26 @@ +// 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 org.apache.cloudstack.engine.subsystem.api.storage.type; + +import org.springframework.stereotype.Component; + +@Component +public class RootDisk extends VolumeTypeBase { + public RootDisk() { + this.type = "Root"; + } +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/Unknown.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/Unknown.java new file mode 100644 index 000000000..6f8904a5a --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/Unknown.java @@ -0,0 +1,24 @@ +// 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 org.apache.cloudstack.engine.subsystem.api.storage.type; + +public class Unknown extends VolumeTypeBase { + public Unknown() { + this.type = "Unknown"; + } + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/VolumeType.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/VolumeType.java new file mode 100644 index 000000000..fcc1c4b38 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/VolumeType.java @@ -0,0 +1,22 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage.type; + +public interface VolumeType { +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/VolumeTypeBase.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/VolumeTypeBase.java new file mode 100644 index 000000000..6ffd9d7c9 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/VolumeTypeBase.java @@ -0,0 +1,47 @@ +// 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 org.apache.cloudstack.engine.subsystem.api.storage.type; + +public class VolumeTypeBase implements VolumeType { + protected String type = "Unknown"; + + @Override + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that instanceof String) { + if (this.toString().equalsIgnoreCase((String)that)) { + return true; + } + } else if (that instanceof VolumeTypeBase) { + VolumeTypeBase th = (VolumeTypeBase)that; + if (this.toString().equalsIgnoreCase(th.toString())) { + return true; + } + } else { + return false; + } + return false; + } + + @Override + public String toString() { + return type; + } + +} diff --git a/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/VolumeTypeHelper.java b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/VolumeTypeHelper.java new file mode 100644 index 000000000..f29dd0872 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/engine/subsystem/api/storage/type/VolumeTypeHelper.java @@ -0,0 +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. +package org.apache.cloudstack.engine.subsystem.api.storage.type; + +import java.util.List; + +import javax.inject.Inject; + +import org.springframework.stereotype.Component; + +@Component +public class VolumeTypeHelper { + static private List types; + private static VolumeType defaultType = new Unknown(); + + @Inject + public void setTypes(List types) { + VolumeTypeHelper.types = types; + } + + public static VolumeType getType(String type) { + for (VolumeType ty : types) { + if (ty.equals(type)) { + return ty; + } + } + return VolumeTypeHelper.defaultType; + } + +} diff --git a/engine/api/src/org/apache/cloudstack/storage/datastore/db/DataStoreProviderDao.java b/engine/api/src/org/apache/cloudstack/storage/datastore/db/DataStoreProviderDao.java new file mode 100644 index 000000000..dca83ce0b --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/storage/datastore/db/DataStoreProviderDao.java @@ -0,0 +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. + */ +package org.apache.cloudstack.storage.datastore.db; + +import com.cloud.utils.db.GenericDao; + +public interface DataStoreProviderDao extends GenericDao { + public DataStoreProviderVO findByName(String name); +} diff --git a/engine/api/src/org/apache/cloudstack/storage/datastore/db/DataStoreProviderDaoImpl.java b/engine/api/src/org/apache/cloudstack/storage/datastore/db/DataStoreProviderDaoImpl.java new file mode 100644 index 000000000..ccb6b4832 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/storage/datastore/db/DataStoreProviderDaoImpl.java @@ -0,0 +1,38 @@ +/* + * 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 org.apache.cloudstack.storage.datastore.db; + +import org.springframework.stereotype.Component; + +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchCriteria2; +import com.cloud.utils.db.SearchCriteriaService; +import com.cloud.utils.db.SearchCriteria.Op; + +@Component +class DataStoreProviderDaoImpl extends GenericDaoBase implements DataStoreProviderDao { + + @Override + public DataStoreProviderVO findByName(String name) { + SearchCriteriaService sc = SearchCriteria2.create(DataStoreProviderVO.class); + sc.addAnd(sc.getEntity().getName(), Op.EQ, name); + return sc.find(); + } + +} \ No newline at end of file diff --git a/engine/api/src/org/apache/cloudstack/storage/datastore/db/DataStoreProviderVO.java b/engine/api/src/org/apache/cloudstack/storage/datastore/db/DataStoreProviderVO.java new file mode 100644 index 000000000..dcdafddb1 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/storage/datastore/db/DataStoreProviderVO.java @@ -0,0 +1,60 @@ +/* + * 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 org.apache.cloudstack.storage.datastore.db; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.TableGenerator; + +@Entity +@Table(name = "data_store_provider") +public class DataStoreProviderVO { + @Id + @TableGenerator(name = "data_store_provider_sq", table = "sequence", pkColumnName = "name", valueColumnName = "value", pkColumnValue = "data_store_provider_seq", allocationSize = 1) + @Column(name = "id", updatable = false, nullable = false) + private long id; + + @Column(name = "name", nullable = false) + private String name; + + @Column(name = "uuid", nullable = false) + private String uuid; + + public long getId() { + return id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getUuid() { + return this.uuid; + } +} diff --git a/engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java b/engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java new file mode 100644 index 000000000..4d845252f --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDao.java @@ -0,0 +1,112 @@ +// 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 org.apache.cloudstack.storage.datastore.db; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import org.apache.cloudstack.engine.subsystem.api.storage.ScopeType; + +import com.cloud.storage.StoragePoolStatus; +import com.cloud.utils.db.GenericDao; +/** + * Data Access Object for storage_pool table + */ +public interface PrimaryDataStoreDao extends GenericDao { + + /** + * @param datacenterId -- the id of the datacenter (availability zone) + */ + List listByDataCenterId(long datacenterId); + + /** + * @param datacenterId -- the id of the datacenter (availability zone) + */ + List listBy(long datacenterId, long podId, Long clusterId, ScopeType scope); + + /** + * Set capacity of storage pool in bytes + * @param id pool id. + * @param capacity capacity in bytes + */ + void updateCapacity(long id, long capacity); + + /** + * Set available bytes of storage pool in bytes + * @param id pool id. + * @param available available capacity in bytes + */ + void updateAvailable(long id, long available); + + + StoragePoolVO persist(StoragePoolVO pool, Map details); + + /** + * Find pool by name. + * + * @param name name of pool. + * @return the single StoragePoolVO + */ + List findPoolByName(String name); + + /** + * Find pools by the pod that matches the details. + * + * @param podId pod id to find the pools in. + * @param details details to match. All must match for the pool to be returned. + * @return List of StoragePoolVO + */ + List findPoolsByDetails(long dcId, long podId, Long clusterId, Map details, ScopeType scope); + + List findPoolsByTags(long dcId, long podId, Long clusterId, String[] tags); + + /** + * Find pool by UUID. + * + * @param uuid uuid of pool. + * @return the single StoragePoolVO + */ + StoragePoolVO findPoolByUUID(String uuid); + + List listByStorageHost(String hostFqdnOrIp); + + StoragePoolVO findPoolByHostPath(long dcId, Long podId, String host, String path, String uuid); + + List listPoolByHostPath(String host, String path); + + void updateDetails(long poolId, Map details); + + Map getDetails(long poolId); + + List searchForStoragePoolDetails(long poolId, String value); + + List findIfDuplicatePoolsExistByUUID(String uuid); + + List listByStatus(StoragePoolStatus status); + + long countPoolsByStatus(StoragePoolStatus... statuses); + + List listByStatusInZone(long dcId, StoragePoolStatus status); + + List listPoolsByCluster(long clusterId); + + List findLocalStoragePoolsByTags(long dcId, long podId, + Long clusterId, String[] tags); + + List findZoneWideStoragePoolsByTags(long dcId, String[] tags); +} diff --git a/engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java b/engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java new file mode 100644 index 000000000..7fcddf194 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDaoImpl.java @@ -0,0 +1,430 @@ +// 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 org.apache.cloudstack.storage.datastore.db; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.ejb.Local; +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import org.apache.cloudstack.engine.subsystem.api.storage.ScopeType; +import org.springframework.stereotype.Component; + +import com.cloud.host.Status; + +import com.cloud.storage.StoragePoolStatus; + +import com.cloud.utils.db.DB; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.GenericSearchBuilder; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.SearchCriteria.Func; +import com.cloud.utils.db.SearchCriteria.Op; +import com.cloud.utils.db.SearchCriteria2; +import com.cloud.utils.db.SearchCriteriaService; +import com.cloud.utils.db.Transaction; +import com.cloud.utils.exception.CloudRuntimeException; + +@Component +@Local(value={PrimaryDataStoreDao.class}) @DB(txn=false) +public class PrimaryDataStoreDaoImpl extends GenericDaoBase implements PrimaryDataStoreDao { + protected final SearchBuilder AllFieldSearch; + protected final SearchBuilder DcPodSearch; + protected final SearchBuilder DcPodAnyClusterSearch; + protected final SearchBuilder DeleteLvmSearch; + protected final GenericSearchBuilder StatusCountSearch; + + @Inject protected StoragePoolDetailsDao _detailsDao; + + private final String DetailsSqlPrefix = "SELECT storage_pool.* from storage_pool LEFT JOIN storage_pool_details ON storage_pool.id = storage_pool_details.pool_id WHERE storage_pool.removed is null and storage_pool.status = 'Up' and storage_pool.data_center_id = ? and (storage_pool.pod_id = ? or storage_pool.pod_id is null) and storage_pool.scope = ? and ("; + private final String DetailsSqlSuffix = ") GROUP BY storage_pool_details.pool_id HAVING COUNT(storage_pool_details.name) >= ?"; + private final String ZoneWideDetailsSqlPrefix = "SELECT storage_pool.* from storage_pool LEFT JOIN storage_pool_details ON storage_pool.id = storage_pool_details.pool_id WHERE storage_pool.removed is null and storage_pool.status = 'Up' and storage_pool.data_center_id = ? and storage_pool.scope = ? and ("; + private final String ZoneWideDetailsSqlSuffix = ") GROUP BY storage_pool_details.pool_id HAVING COUNT(storage_pool_details.name) >= ?"; + + private final String FindPoolTagDetails = "SELECT storage_pool_details.name FROM storage_pool_details WHERE pool_id = ? and value = ?"; + + public PrimaryDataStoreDaoImpl() { + AllFieldSearch = createSearchBuilder(); + AllFieldSearch.and("name", AllFieldSearch.entity().getName(), SearchCriteria.Op.EQ); + AllFieldSearch.and("uuid", AllFieldSearch.entity().getUuid(), SearchCriteria.Op.EQ); + AllFieldSearch.and("datacenterId", AllFieldSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + AllFieldSearch.and("hostAddress", AllFieldSearch.entity().getHostAddress(), SearchCriteria.Op.EQ); + AllFieldSearch.and("status",AllFieldSearch.entity().getStatus(),SearchCriteria.Op.EQ); + AllFieldSearch.and("path", AllFieldSearch.entity().getPath(), SearchCriteria.Op.EQ); + AllFieldSearch.and("podId", AllFieldSearch.entity().getPodId(), Op.EQ); + AllFieldSearch.and("clusterId", AllFieldSearch.entity().getClusterId(), Op.EQ); + AllFieldSearch.done(); + + DcPodSearch = createSearchBuilder(); + DcPodSearch.and("datacenterId", DcPodSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + DcPodSearch.and("status", DcPodSearch.entity().getStatus(), SearchCriteria.Op.EQ); + DcPodSearch.and("scope", DcPodSearch.entity().getScope(), SearchCriteria.Op.EQ); + DcPodSearch.and().op("nullpod", DcPodSearch.entity().getPodId(), SearchCriteria.Op.NULL); + DcPodSearch.or("podId", DcPodSearch.entity().getPodId(), SearchCriteria.Op.EQ); + DcPodSearch.cp(); + DcPodSearch.and().op("nullcluster", DcPodSearch.entity().getClusterId(), SearchCriteria.Op.NULL); + DcPodSearch.or("cluster", DcPodSearch.entity().getClusterId(), SearchCriteria.Op.EQ); + DcPodSearch.cp(); + DcPodSearch.done(); + + DcPodAnyClusterSearch = createSearchBuilder(); + DcPodAnyClusterSearch.and("datacenterId", DcPodAnyClusterSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + DcPodAnyClusterSearch.and("status", DcPodAnyClusterSearch.entity().getStatus(), SearchCriteria.Op.EQ); + DcPodAnyClusterSearch.and("scope", DcPodAnyClusterSearch.entity().getScope(), SearchCriteria.Op.EQ); + DcPodAnyClusterSearch.and().op("nullpod", DcPodAnyClusterSearch.entity().getPodId(), SearchCriteria.Op.NULL); + DcPodAnyClusterSearch.or("podId", DcPodAnyClusterSearch.entity().getPodId(), SearchCriteria.Op.EQ); + DcPodAnyClusterSearch.cp(); + DcPodAnyClusterSearch.done(); + + DeleteLvmSearch = createSearchBuilder(); + DeleteLvmSearch.and("ids", DeleteLvmSearch.entity().getId(), SearchCriteria.Op.IN); + DeleteLvmSearch.and().op("LVM", DeleteLvmSearch.entity().getPoolType(), SearchCriteria.Op.EQ); + DeleteLvmSearch.or("Filesystem", DeleteLvmSearch.entity().getPoolType(), SearchCriteria.Op.EQ); + DeleteLvmSearch.cp(); + DeleteLvmSearch.done(); + + + + StatusCountSearch = createSearchBuilder(Long.class); + StatusCountSearch.and("status", StatusCountSearch.entity().getStatus(), SearchCriteria.Op.IN); + StatusCountSearch.select(null, Func.COUNT, null); + StatusCountSearch.done(); + + } + + @Override + public List findPoolByName(String name) { + SearchCriteria sc = AllFieldSearch.create(); + sc.setParameters("name", name); + return listIncludingRemovedBy(sc); + } + + + @Override + public StoragePoolVO findPoolByUUID(String uuid) { + SearchCriteria sc = AllFieldSearch.create(); + sc.setParameters("uuid", uuid); + return findOneIncludingRemovedBy(sc); + } + + + + @Override + public List findIfDuplicatePoolsExistByUUID(String uuid) { + SearchCriteria sc = AllFieldSearch.create(); + sc.setParameters("uuid", uuid); + return listBy(sc); + } + + + @Override + public List listByDataCenterId(long datacenterId) { + SearchCriteria sc = AllFieldSearch.create(); + sc.setParameters("datacenterId", datacenterId); + return listBy(sc); + } + + + @Override + public void updateAvailable(long id, long available) { + StoragePoolVO pool = createForUpdate(id); + pool.setAvailableBytes(available); + update(id, pool); + } + + + @Override + public void updateCapacity(long id, long capacity) { + StoragePoolVO pool = createForUpdate(id); + pool.setCapacityBytes(capacity); + update(id, pool); + + } + + @Override + public List listByStorageHost(String hostFqdnOrIp) { + SearchCriteria sc = AllFieldSearch.create(); + sc.setParameters("hostAddress", hostFqdnOrIp); + return listIncludingRemovedBy(sc); + } + + @Override + public List listByStatus(StoragePoolStatus status){ + SearchCriteria sc = AllFieldSearch.create(); + sc.setParameters("status", status); + return listBy(sc); + } + + @Override + public List listByStatusInZone(long dcId, StoragePoolStatus status){ + SearchCriteria sc = AllFieldSearch.create(); + sc.setParameters("status", status); + sc.setParameters("datacenterId", dcId); + return listBy(sc); + } + + @Override + public StoragePoolVO findPoolByHostPath(long datacenterId, Long podId, String host, String path, String uuid) { + SearchCriteria sc = AllFieldSearch.create(); + sc.setParameters("hostAddress", host); + sc.setParameters("path", path); + sc.setParameters("datacenterId", datacenterId); + sc.setParameters("podId", podId); + sc.setParameters("uuid", uuid); + + return findOneBy(sc); + } + + @Override + public List listBy(long datacenterId, long podId, Long clusterId, ScopeType scope) { + if (clusterId != null) { + SearchCriteria sc = DcPodSearch.create(); + sc.setParameters("datacenterId", datacenterId); + sc.setParameters("podId", podId); + sc.setParameters("status", Status.Up); + sc.setParameters("scope", scope); + + sc.setParameters("cluster", clusterId); + return listBy(sc); + } else { + SearchCriteria sc = DcPodAnyClusterSearch.create(); + sc.setParameters("datacenterId", datacenterId); + sc.setParameters("podId", podId); + sc.setParameters("status", Status.Up); + sc.setParameters("scope", scope); + return listBy(sc); + } + } + + @Override + public List listPoolByHostPath(String host, String path) { + SearchCriteria sc = AllFieldSearch.create(); + sc.setParameters("hostAddress", host); + sc.setParameters("path", path); + + return listBy(sc); + } + + public StoragePoolVO listById(Integer id) + { + SearchCriteria sc = AllFieldSearch.create(); + sc.setParameters("id", id); + + return findOneIncludingRemovedBy(sc); + } + + @Override @DB + public StoragePoolVO persist(StoragePoolVO pool, Map details) { + Transaction txn = Transaction.currentTxn(); + txn.start(); + pool = super.persist(pool); + if (details != null) { + for (Map.Entry detail : details.entrySet()) { + StoragePoolDetailVO vo = new StoragePoolDetailVO(pool.getId(), detail.getKey(), detail.getValue()); + _detailsDao.persist(vo); + } + } + txn.commit(); + return pool; + } + + @DB + @Override + public List findPoolsByDetails(long dcId, long podId, Long clusterId, Map details, ScopeType scope) { + StringBuilder sql = new StringBuilder(DetailsSqlPrefix); + if (clusterId != null) { + sql.append("storage_pool.cluster_id = ? OR storage_pool.cluster_id IS NULL) AND ("); + } + + for (Map.Entry detail : details.entrySet()) { + sql.append("((storage_pool_details.name='").append(detail.getKey()).append("') AND (storage_pool_details.value='").append(detail.getValue()).append("')) OR "); + } + sql.delete(sql.length() - 4, sql.length()); + sql.append(DetailsSqlSuffix); + Transaction txn = Transaction.currentTxn(); + PreparedStatement pstmt = null; + try { + pstmt = txn.prepareAutoCloseStatement(sql.toString()); + int i = 1; + pstmt.setLong(i++, dcId); + pstmt.setLong(i++, podId); + pstmt.setString(i++, scope.toString()); + if (clusterId != null) { + pstmt.setLong(i++, clusterId); + } + pstmt.setInt(i++, details.size()); + ResultSet rs = pstmt.executeQuery(); + List pools = new ArrayList(); + while (rs.next()) { + pools.add(toEntityBean(rs, false)); + } + return pools; + } catch (SQLException e) { + throw new CloudRuntimeException("Unable to execute " + pstmt, e); + } + } + + protected Map tagsToDetails(String[] tags) { + Map details = new HashMap(tags.length); + for (String tag: tags) { + details.put(tag, "true"); + } + return details; + } + + @Override + public List findPoolsByTags(long dcId, long podId, Long clusterId, String[] tags) { + List storagePools = null; + if (tags == null || tags.length == 0) { + storagePools = listBy(dcId, podId, clusterId, ScopeType.CLUSTER); + } else { + Map details = tagsToDetails(tags); + storagePools = findPoolsByDetails(dcId, podId, clusterId, details, ScopeType.CLUSTER); + } + + return storagePools; + } + + @Override + public List findLocalStoragePoolsByTags(long dcId, long podId, Long clusterId, String[] tags) { + List storagePools = null; + if (tags == null || tags.length == 0) { + storagePools = listBy(dcId, podId, clusterId, ScopeType.HOST); + } else { + Map details = tagsToDetails(tags); + storagePools = findPoolsByDetails(dcId, podId, clusterId, details, ScopeType.HOST); + } + + return storagePools; + } + + @Override + public List findZoneWideStoragePoolsByTags(long dcId, String[] tags) { + List storagePools = null; + if (tags == null || tags.length == 0) { + SearchCriteriaService sc = SearchCriteria2.create(StoragePoolVO.class); + sc.addAnd(sc.getEntity().getDataCenterId(), Op.EQ, dcId); + sc.addAnd(sc.getEntity().getStatus(), Op.EQ, Status.Up); + sc.addAnd(sc.getEntity().getScope(), Op.EQ, ScopeType.ZONE); + return sc.list(); + } else { + Map details = tagsToDetails(tags); + + StringBuilder sql = new StringBuilder(ZoneWideDetailsSqlPrefix); + + for (Map.Entry detail : details.entrySet()) { + sql.append("((storage_pool_details.name='").append(detail.getKey()).append("') AND (storage_pool_details.value='").append(detail.getValue()).append("')) OR "); + } + sql.delete(sql.length() - 4, sql.length()); + sql.append(ZoneWideDetailsSqlSuffix); + Transaction txn = Transaction.currentTxn(); + PreparedStatement pstmt = null; + try { + pstmt = txn.prepareAutoCloseStatement(sql.toString()); + int i = 1; + pstmt.setLong(i++, dcId); + pstmt.setString(i++, ScopeType.ZONE.toString()); + pstmt.setInt(i++, details.size()); + ResultSet rs = pstmt.executeQuery(); + List pools = new ArrayList(); + while (rs.next()) { + pools.add(toEntityBean(rs, false)); + } + return pools; + } catch (SQLException e) { + throw new CloudRuntimeException("Unable to execute " + pstmt, e); + } + } + } + + @Override + @DB + public List searchForStoragePoolDetails(long poolId, String value){ + + StringBuilder sql = new StringBuilder(FindPoolTagDetails); + + Transaction txn = Transaction.currentTxn(); + PreparedStatement pstmt = null; + try { + pstmt = txn.prepareAutoCloseStatement(sql.toString()); + pstmt.setLong(1, poolId); + pstmt.setString(2, value); + + ResultSet rs = pstmt.executeQuery(); + List tags = new ArrayList(); + + while (rs.next()) { + tags.add(rs.getString("name")); + } + return tags; + } catch (SQLException e) { + throw new CloudRuntimeException("Unable to execute " + pstmt.toString(), e); + } + + } + + @Override + public void updateDetails(long poolId, Map details) { + if (details != null) { + _detailsDao.update(poolId, details); + } + } + + @Override + public Map getDetails(long poolId) { + return _detailsDao.getDetails(poolId); + } + + @Override + public boolean configure(String name, Map params) throws ConfigurationException { + super.configure(name, params); + _detailsDao.configure("DetailsDao", params); + return true; + } + + + + @Override + public long countPoolsByStatus( StoragePoolStatus... statuses) { + SearchCriteria sc = StatusCountSearch.create(); + + sc.setParameters("status", (Object[])statuses); + + List rs = customSearchIncludingRemoved(sc, null); + if (rs.size() == 0) { + return 0; + } + + return rs.get(0); + } + + @Override + public List listPoolsByCluster(long clusterId) { + SearchCriteria sc = AllFieldSearch.create(); + sc.setParameters("clusterId", clusterId); + + return listBy(sc); + } +} diff --git a/engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDetailVO.java b/engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDetailVO.java new file mode 100644 index 000000000..d1f802de9 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDetailVO.java @@ -0,0 +1,79 @@ +// 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 org.apache.cloudstack.storage.datastore.db; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +@Entity +@Table(name="storage_pool_details") +public class PrimaryDataStoreDetailVO { + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + @Column(name="id") + long id; + + @Column(name="pool_id") + long poolId; + + @Column(name="name") + String name; + + @Column(name="value") + String value; + + public PrimaryDataStoreDetailVO(long poolId, String name, String value) { + this.poolId = poolId; + this.name = name; + this.value = value; + } + + public long getId() { + return id; + } + + public long getPoolId() { + return poolId; + } + + public void setPoolId(long poolId) { + this.poolId = poolId; + } + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + protected PrimaryDataStoreDetailVO() { + } +} diff --git a/engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDetailsDao.java b/engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDetailsDao.java new file mode 100644 index 000000000..c2b109a95 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDetailsDao.java @@ -0,0 +1,27 @@ +// 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 org.apache.cloudstack.storage.datastore.db; + +import java.util.Map; + +import com.cloud.utils.db.GenericDao; + +public interface PrimaryDataStoreDetailsDao extends GenericDao { + + void update(long poolId, Map details); + Map getDetails(long poolId); +} \ No newline at end of file diff --git a/engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDetailsDaoImpl.java b/engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDetailsDaoImpl.java new file mode 100644 index 000000000..59c488cf6 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/storage/datastore/db/PrimaryDataStoreDetailsDaoImpl.java @@ -0,0 +1,71 @@ +// 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 org.apache.cloudstack.storage.datastore.db; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.springframework.stereotype.Component; + +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.Transaction; + +@Component +public class PrimaryDataStoreDetailsDaoImpl extends GenericDaoBase implements PrimaryDataStoreDetailsDao { + + protected final SearchBuilder PoolSearch = null; + + protected PrimaryDataStoreDetailsDaoImpl() { + /* + super(); + PoolSearch = createSearchBuilder(); + PoolSearch.and("pool", PoolSearch.entity().getPoolId(), SearchCriteria.Op.EQ); + PoolSearch.done(); + */ + } + + @Override + public void update(long poolId, Map details) { + Transaction txn = Transaction.currentTxn(); + SearchCriteria sc = PoolSearch.create(); + sc.setParameters("pool", poolId); + + txn.start(); + expunge(sc); + for (Map.Entry entry : details.entrySet()) { + PrimaryDataStoreDetailVO detail = new PrimaryDataStoreDetailVO(poolId, entry.getKey(), entry.getValue()); + persist(detail); + } + txn.commit(); + } + + @Override + public Map getDetails(long poolId) { + SearchCriteria sc = PoolSearch.create(); + sc.setParameters("pool", poolId); + + List details = listBy(sc); + Map detailsMap = new HashMap(); + for (PrimaryDataStoreDetailVO detail : details) { + detailsMap.put(detail.getName(), detail.getValue()); + } + + return detailsMap; + } +} diff --git a/core/src/com/cloud/storage/StoragePoolDetailVO.java b/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolDetailVO.java similarity index 97% rename from core/src/com/cloud/storage/StoragePoolDetailVO.java rename to engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolDetailVO.java index 48487e566..699beef90 100644 --- a/core/src/com/cloud/storage/StoragePoolDetailVO.java +++ b/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolDetailVO.java @@ -14,7 +14,7 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -package com.cloud.storage; +package org.apache.cloudstack.storage.datastore.db; import org.apache.cloudstack.api.InternalIdentity; diff --git a/server/src/com/cloud/storage/dao/StoragePoolDetailsDao.java b/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolDetailsDao.java similarity index 93% rename from server/src/com/cloud/storage/dao/StoragePoolDetailsDao.java rename to engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolDetailsDao.java index 34aa87f58..be71670e9 100644 --- a/server/src/com/cloud/storage/dao/StoragePoolDetailsDao.java +++ b/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolDetailsDao.java @@ -14,11 +14,11 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -package com.cloud.storage.dao; +package org.apache.cloudstack.storage.datastore.db; import java.util.Map; -import com.cloud.storage.StoragePoolDetailVO; + import com.cloud.utils.db.GenericDao; public interface StoragePoolDetailsDao extends GenericDao { diff --git a/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java b/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java new file mode 100644 index 000000000..55b2314f0 --- /dev/null +++ b/engine/api/src/org/apache/cloudstack/storage/datastore/db/StoragePoolVO.java @@ -0,0 +1,311 @@ +// 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 org.apache.cloudstack.storage.datastore.db; + +import java.util.Date; +import java.util.UUID; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.TableGenerator; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.apache.cloudstack.engine.subsystem.api.storage.ScopeType; + +import com.cloud.storage.Storage.StoragePoolType; +import com.cloud.storage.StoragePool; +import com.cloud.storage.StoragePoolStatus; +import com.cloud.utils.db.GenericDao; + +@Entity +@Table(name="storage_pool") +public class StoragePoolVO implements StoragePool{ + @Id + @TableGenerator(name = "storage_pool_sq", table = "sequence", pkColumnName = "name", valueColumnName = "value", pkColumnValue = "storage_pool_seq", allocationSize = 1) + @Column(name = "id", updatable = false, nullable = false) + private long id; + + @Column(name = "name", updatable = false, nullable = false, length = 255) + private String name = null; + + @Column(name = "uuid", length = 255) + private String uuid = null; + + @Column(name = "pool_type", updatable = false, nullable = false, length = 32) + @Enumerated(value = EnumType.STRING) + private StoragePoolType poolType; + + @Column(name = GenericDao.CREATED_COLUMN) + Date created; + + @Column(name = GenericDao.REMOVED_COLUMN) + private Date removed; + + @Column(name = "update_time", updatable = true) + @Temporal(value = TemporalType.TIMESTAMP) + private Date updateTime; + + @Column(name = "data_center_id", updatable = true, nullable = false) + private long dataCenterId; + + @Column(name = "pod_id", updatable = true) + private Long podId; + + @Column(name = "available_bytes", updatable = true, nullable = true) + private long availableBytes; + + @Column(name = "capacity_bytes", updatable = true, nullable = true) + private long capacityBytes; + + @Column(name = "status", updatable = true, nullable = false) + @Enumerated(value = EnumType.STRING) + private StoragePoolStatus status; + + @Column(name = "storage_provider_name", updatable = true, nullable = false) + private String storageProviderName; + + @Column(name = "host_address") + private String hostAddress; + + @Column(name = "path") + private String path; + + @Column(name = "port") + private int port; + + @Column(name = "user_info") + private String userInfo; + + @Column(name = "cluster_id") + private Long clusterId; + + @Column(name = "scope") + @Enumerated(value = EnumType.STRING) + private ScopeType scope; + + public long getId() { + return id; + } + + public StoragePoolStatus getStatus() { + return status; + } + + public StoragePoolVO() { + this.status = StoragePoolStatus.Initial; + } + + public StoragePoolVO(long poolId, String name, String uuid, StoragePoolType type, + long dataCenterId, Long podId, long availableBytes, long capacityBytes, String hostAddress, int port, String hostPath) { + this.name = name; + this.id = poolId; + this.uuid = uuid; + this.poolType = type; + this.dataCenterId = dataCenterId; + this.availableBytes = availableBytes; + this.capacityBytes = capacityBytes; + this.hostAddress = hostAddress; + this.path = hostPath; + this.port = port; + this.podId = podId; + this.setStatus(StoragePoolStatus.Initial); + } + + public StoragePoolVO(StoragePoolVO that) { + this(that.id, that.name, that.uuid, that.poolType, that.dataCenterId, that.podId, that.availableBytes, that.capacityBytes, that.hostAddress, that.port, that.path); + } + + public StoragePoolVO(StoragePoolType type, String hostAddress, int port, String path) { + this.poolType = type; + this.hostAddress = hostAddress; + this.port = port; + this.path = path; + this.setStatus(StoragePoolStatus.Initial); + this.uuid = UUID.randomUUID().toString(); + } + + + public String getName() { + return name; + } + + public String getUuid() { + return uuid; + } + + public StoragePoolType getPoolType() { + return poolType; + } + + public void setPoolType(StoragePoolType protocol) { + this.poolType = protocol; + } + + public Date getCreated() { + return created; + } + + public Date getRemoved() { + return removed; + } + + public Date getUpdateTime() { + return updateTime; + } + + public long getDataCenterId() { + return dataCenterId; + } + + public long getAvailableBytes() { + return availableBytes; + } + + public String getStorageProviderName() { + return storageProviderName; + } + + public void setStorageProviderName(String providerName) { + storageProviderName = providerName; + } + + public long getCapacityBytes() { + return capacityBytes; + } + + public void setAvailableBytes(long available) { + availableBytes = available; + } + + public void setCapacityBytes(long capacity) { + capacityBytes = capacity; + } + + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public String getHostAddress() { + return hostAddress; + } + + public void setHostAddress(String host) { + this.hostAddress = host; + } + + public String getPath() { + return path; + } + + public String getUserInfo() { + return userInfo; + } + + public void setStatus(StoragePoolStatus status) { + this.status = status; + } + + public void setId(long id) { + this.id = id; + } + + public void setDataCenterId(long dcId) { + this.dataCenterId = dcId; + } + + public void setPodId(Long podId) { + this.podId = podId; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public void setPath(String path) { + this.path = path; + } + + public void setUserInfo(String userInfo) { + this.userInfo = userInfo; + } + + public int getPort() { + return port; + } + + public void setPort(int port) { + this.port = port; + } + + public Long getPodId() { + return podId; + } + + public void setName(String name) { + this.name = name; + } + + public void setScope(ScopeType scope) { + this.scope = scope; + } + + public ScopeType getScope() { + return this.scope; + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof StoragePoolVO) || obj == null) { + return false; + } + StoragePoolVO that = (StoragePoolVO) obj; + return this.id == that.id; + } + + @Override + public int hashCode() { + return new Long(id).hashCode(); + } + + @Override + public String toString() { + return new StringBuilder("Pool[").append(id).append("|").append(poolType).append("]").toString(); + } + + public boolean isShared() { + return this.scope == ScopeType.HOST ? false : true; + } + + public boolean isLocal() { + return !isShared(); + } + + @Override + public boolean isInMaintenance() { + // TODO Auto-generated method stub + return false; + } +} diff --git a/engine/api/test/org/apache/cloudstack/engine/subsystem/api/storage/ScopeTest.java b/engine/api/test/org/apache/cloudstack/engine/subsystem/api/storage/ScopeTest.java new file mode 100644 index 000000000..e3ec48c74 --- /dev/null +++ b/engine/api/test/org/apache/cloudstack/engine/subsystem/api/storage/ScopeTest.java @@ -0,0 +1,59 @@ +/* + * 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 org.apache.cloudstack.engine.subsystem.api.storage; + +import static org.junit.Assert.*; +import junit.framework.Assert; + +import org.junit.Test; + +public class ScopeTest { + + @Test + public void testZoneScope() { + ZoneScope zoneScope = new ZoneScope(1L); + ZoneScope zoneScope2 = new ZoneScope(1L); + Assert.assertTrue(zoneScope.isSameScope(zoneScope2)); + + ZoneScope zoneScope3 = new ZoneScope(2L); + Assert.assertFalse(zoneScope.isSameScope(zoneScope3)); + } + + @Test + public void testClusterScope() { + ClusterScope clusterScope = new ClusterScope(1L, 1L, 1L); + ClusterScope clusterScope2 = new ClusterScope(1L, 1L, 1L); + + Assert.assertTrue(clusterScope.isSameScope(clusterScope2)); + + ClusterScope clusterScope3 = new ClusterScope(2L, 2L, 1L); + Assert.assertFalse(clusterScope.isSameScope(clusterScope3)); + } + + @Test + public void testHostScope() { + HostScope hostScope = new HostScope(1L); + HostScope hostScope2 = new HostScope(1L); + HostScope hostScope3 = new HostScope(2L); + + Assert.assertTrue(hostScope.isSameScope(hostScope2)); + Assert.assertFalse(hostScope.isSameScope(hostScope3)); + } + +} diff --git a/engine/components-api/pom.xml b/engine/components-api/pom.xml new file mode 100644 index 000000000..6d6ad4d14 --- /dev/null +++ b/engine/components-api/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + cloud-engine-components-api + Apache CloudStack Cloud Engine Internal Components API + + org.apache.cloudstack + cloud-engine + 4.2.0-SNAPSHOT + ../pom.xml + + + + org.apache.cloudstack + cloud-engine-api + ${project.version} + + + org.apache.cloudstack + cloud-framework-ipc + ${project.version} + + + + install + src + test + + diff --git a/engine/components-api/src/org/apache/cloudstack/compute/ComputeGuru.java b/engine/components-api/src/org/apache/cloudstack/compute/ComputeGuru.java new file mode 100644 index 000000000..73aa84c61 --- /dev/null +++ b/engine/components-api/src/org/apache/cloudstack/compute/ComputeGuru.java @@ -0,0 +1,34 @@ +/* + * 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 org.apache.cloudstack.compute; + +import com.cloud.vm.VirtualMachineProfile; + +/** + * ComputeGuru understands everything about the hypervisor. + * + */ +public interface ComputeGuru { + String getVersion(); + String getHypervisor(); + void start(VirtualMachineProfile vm); + void stop(VirtualMachineProfile vm); + + +} diff --git a/engine/compute/pom.xml b/engine/compute/pom.xml new file mode 100644 index 000000000..0875bb63f --- /dev/null +++ b/engine/compute/pom.xml @@ -0,0 +1,52 @@ + + + 4.0.0 + cloud-engine-compute + Apache CloudStack Cloud Engine Compute Component + + org.apache.cloudstack + cloud-engine + 4.2.0-SNAPSHOT + ../pom.xml + + + + org.apache.cloudstack + cloud-engine-api + ${project.version} + + + org.apache.cloudstack + cloud-framework-ipc + ${project.version} + + + org.apache.cloudstack + cloud-engine-components-api + ${project.version} + + + + install + src + test + + diff --git a/engine/compute/src/org/apache/cloudstack/compute/ComputeOrchestrator.java b/engine/compute/src/org/apache/cloudstack/compute/ComputeOrchestrator.java new file mode 100755 index 000000000..37d0e6bdb --- /dev/null +++ b/engine/compute/src/org/apache/cloudstack/compute/ComputeOrchestrator.java @@ -0,0 +1,34 @@ +/* + * 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 org.apache.cloudstack.compute; + +import java.util.logging.Handler; + +public interface ComputeOrchestrator { + /** + * start the vm + * @param vm vm + * @param reservationId + */ + void start(String vm, String reservationId, Handler handler); + + void cancel(String reservationId); + + void stop(String vm, String reservationId); +} diff --git a/engine/compute/src/org/apache/cloudstack/compute/ComputeOrchestratorImpl.java b/engine/compute/src/org/apache/cloudstack/compute/ComputeOrchestratorImpl.java new file mode 100755 index 000000000..12d45332f --- /dev/null +++ b/engine/compute/src/org/apache/cloudstack/compute/ComputeOrchestratorImpl.java @@ -0,0 +1,42 @@ +/* + * 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 org.apache.cloudstack.compute; + +import java.util.logging.Handler; + + +public class ComputeOrchestratorImpl implements ComputeOrchestrator { + + @Override + public void cancel(String reservationId) { + } + + @Override + public void stop(String vm, String reservationId) { + // Retrieve the VM + // Locate the HypervisorGuru based on the VM type + // Call HypervisorGuru to stop the VM + } + + @Override + public void start(String vm, String reservationId, Handler handler) { + // TODO Auto-generated method stub + + } +} diff --git a/engine/network/pom.xml b/engine/network/pom.xml new file mode 100644 index 000000000..60cb7e950 --- /dev/null +++ b/engine/network/pom.xml @@ -0,0 +1,52 @@ + + + 4.0.0 + cloud-engine-network + Apache CloudStack Cloud Engine API + + org.apache.cloudstack + cloud-engine + 4.2.0-SNAPSHOT + ../pom.xml + + + + org.apache.cloudstack + cloud-engine-api + ${project.version} + + + org.apache.cloudstack + cloud-engine-components-api + ${project.version} + + + org.apache.cloudstack + cloud-framework-ipc + ${project.version} + + + + install + src + test + + diff --git a/engine/network/src/org/apache/cloudstack/network/NetworkOrchestrator.java b/engine/network/src/org/apache/cloudstack/network/NetworkOrchestrator.java new file mode 100755 index 000000000..82756ac83 --- /dev/null +++ b/engine/network/src/org/apache/cloudstack/network/NetworkOrchestrator.java @@ -0,0 +1,40 @@ +/* + * 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 org.apache.cloudstack.network; + +public interface NetworkOrchestrator { + + /** + * Prepares for a VM to join a network + * @param vm vm + * @param reservationId reservation id + */ + void prepare(String vm, String reservationId); + + /** + * Release all reservation + */ + void release(String vm, String reservationId); + + /** + * Cancel a previous reservation + * @param reservationId + */ + void cancel(String reservationId); +} diff --git a/engine/orchestration/pom.xml b/engine/orchestration/pom.xml new file mode 100755 index 000000000..c98373aa3 --- /dev/null +++ b/engine/orchestration/pom.xml @@ -0,0 +1,88 @@ + + + 4.0.0 + cloud-engine-orchestration + Apache CloudStack Cloud Engine Orchestration Component + + org.apache.cloudstack + cloud-engine + 4.2.0-SNAPSHOT + ../pom.xml + + + + org.apache.cloudstack + cloud-engine-api + ${project.version} + + + org.apache.cloudstack + cloud-framework-ipc + ${project.version} + + + org.apache.cloudstack + cloud-engine-components-api + ${project.version} + + + org.apache.cloudstack + cloud-utils + ${project.version} + + + org.apache.cloudstack + cloud-server + ${project.version} + + + org.mockito + mockito-all + 1.9.5 + + + javax.inject + javax.inject + 1 + + + + install + src + test + + + maven-surefire-plugin + + true + + + + integration-test + + test + + + + + + + diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManager.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManager.java new file mode 100644 index 000000000..82c580fd5 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManager.java @@ -0,0 +1,45 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api; + +import org.apache.cloudstack.engine.cloud.entity.api.db.VMEntityVO; + +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; +import com.cloud.exception.AgentUnavailableException; +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.OperationTimedoutException; +import com.cloud.exception.ResourceUnavailableException; +import com.cloud.vm.VirtualMachineProfile; + +import java.util.Map; + +public interface VMEntityManager { + + VMEntityVO loadVirtualMachine(String vmId); + + void saveVirtualMachine(VMEntityVO vmInstanceVO); + + String reserveVirtualMachine(VMEntityVO vmEntityVO, String plannerToUse, DeploymentPlan plan, ExcludeList exclude) throws InsufficientCapacityException, ResourceUnavailableException; + + void deployVirtualMachine(String reservationId, String caller, Map params) throws InsufficientCapacityException, ResourceUnavailableException; + + boolean stopvirtualmachine(VMEntityVO vmEntityVO, String caller) throws ResourceUnavailableException; + + boolean destroyVirtualMachine(VMEntityVO vmEntityVO, String caller) throws AgentUnavailableException, OperationTimedoutException, ConcurrentOperationException; +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java new file mode 100755 index 000000000..ec813b2e9 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VMEntityManagerImpl.java @@ -0,0 +1,243 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.cloud.entity.api.db.VMEntityVO; +import org.apache.cloudstack.engine.cloud.entity.api.db.VMReservationVO; +import org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMEntityDao; +import org.apache.cloudstack.engine.cloud.entity.api.db.dao.VMReservationDao; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.springframework.stereotype.Component; + +import com.cloud.dc.DataCenter; +import com.cloud.deploy.DataCenterDeployment; +import com.cloud.deploy.DeployDestination; +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner; +import com.cloud.deploy.DeploymentPlanningManager; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; +import com.cloud.exception.AffinityConflictException; +import com.cloud.exception.AgentUnavailableException; +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.InsufficientServerCapacityException; +import com.cloud.exception.OperationTimedoutException; +import com.cloud.exception.ResourceUnavailableException; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.network.dao.NetworkDao; +import com.cloud.org.Cluster; +import com.cloud.service.dao.ServiceOfferingDao; +import com.cloud.storage.StoragePool; +import com.cloud.storage.Volume; +import com.cloud.storage.VolumeVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.dao.VMTemplateDao; +import com.cloud.storage.dao.VolumeDao; +import com.cloud.user.dao.AccountDao; +import com.cloud.user.dao.UserDao; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.VirtualMachineManager; +import com.cloud.vm.VirtualMachineProfile; +import com.cloud.vm.VirtualMachineProfileImpl; +import com.cloud.vm.dao.VMInstanceDao; + +@Component +public class VMEntityManagerImpl implements VMEntityManager { + + @Inject + protected VMInstanceDao _vmDao; + @Inject + protected VMTemplateDao _templateDao = null; + + @Inject + protected ServiceOfferingDao _serviceOfferingDao; + + @Inject + protected DiskOfferingDao _diskOfferingDao = null; + + @Inject + protected NetworkDao _networkDao; + + @Inject + protected AccountDao _accountDao = null; + + @Inject + protected UserDao _userDao = null; + + @Inject + protected VMEntityDao _vmEntityDao; + + @Inject + protected VMReservationDao _reservationDao; + + @Inject + protected VirtualMachineManager _itMgr; + + @Inject + protected List _planners; + + @Inject + protected VolumeDao _volsDao; + + @Inject + protected PrimaryDataStoreDao _storagePoolDao; + @Inject + DataStoreManager dataStoreMgr; + + @Inject + DeploymentPlanningManager _dpMgr; + + @Override + public VMEntityVO loadVirtualMachine(String vmId) { + // TODO Auto-generated method stub + return _vmEntityDao.findByUuid(vmId); + } + + @Override + public void saveVirtualMachine(VMEntityVO entity) { + _vmEntityDao.persist(entity); + + } + + @Override + public String reserveVirtualMachine(VMEntityVO vmEntityVO, String plannerToUse, DeploymentPlan planToDeploy, ExcludeList exclude) + throws InsufficientCapacityException, ResourceUnavailableException { + + //call planner and get the deployDestination. + //load vm instance and offerings and call virtualMachineManagerImpl + //FIXME: profile should work on VirtualMachineEntity + VMInstanceVO vm = _vmDao.findByUuid(vmEntityVO.getUuid()); + VirtualMachineProfileImpl vmProfile = new VirtualMachineProfileImpl(vm); + DataCenterDeployment plan = new DataCenterDeployment(vm.getDataCenterId(), vm.getPodIdToDeployIn(), null, null, null, null); + if(planToDeploy != null && planToDeploy.getDataCenterId() != 0){ + plan = new DataCenterDeployment(planToDeploy.getDataCenterId(), planToDeploy.getPodId(), planToDeploy.getClusterId(), planToDeploy.getHostId(), planToDeploy.getPoolId(), planToDeploy.getPhysicalNetworkId()); + } + + List vols = _volsDao.findReadyRootVolumesByInstance(vm.getId()); + if(!vols.isEmpty()){ + VolumeVO vol = vols.get(0); + StoragePool pool = (StoragePool)this.dataStoreMgr.getPrimaryDataStore(vol.getPoolId()); + + if (!pool.isInMaintenance()) { + long rootVolDcId = pool.getDataCenterId(); + Long rootVolPodId = pool.getPodId(); + Long rootVolClusterId = pool.getClusterId(); + if (planToDeploy != null && planToDeploy.getDataCenterId() != 0) { + Long clusterIdSpecified = planToDeploy.getClusterId(); + if (clusterIdSpecified != null && rootVolClusterId != null) { + if (rootVolClusterId.longValue() != clusterIdSpecified.longValue()) { + // cannot satisfy the plan passed in to the + // planner + throw new ResourceUnavailableException("Root volume is ready in different cluster, Deployment plan provided cannot be satisfied, unable to create a deployment for " + + vm, Cluster.class, clusterIdSpecified); + } + } + plan = new DataCenterDeployment(planToDeploy.getDataCenterId(), planToDeploy.getPodId(), planToDeploy.getClusterId(), planToDeploy.getHostId(), vol.getPoolId(), null, null); + }else{ + plan = new DataCenterDeployment(rootVolDcId, rootVolPodId, rootVolClusterId, null, vol.getPoolId(), null, null); + + } + } + + } + + DeployDestination dest; + try { + dest = _dpMgr.planDeployment(vmProfile, plan, exclude); + } catch (AffinityConflictException e) { + throw new CloudRuntimeException("Unable to create deployment, affinity rules associted to the VM conflict"); + } + + if (dest != null) { + //save destination with VMEntityVO + VMReservationVO vmReservation = new VMReservationVO(vm.getId(), dest.getDataCenter().getId(), dest.getPod().getId(), dest.getCluster().getId(), dest.getHost().getId()); + Map volumeReservationMap = new HashMap(); + + if (vm.getHypervisorType() != HypervisorType.BareMetal) { + for(Volume vo : dest.getStorageForDisks().keySet()){ + volumeReservationMap.put(vo.getId(), dest.getStorageForDisks().get(vo).getId()); + } + vmReservation.setVolumeReservation(volumeReservationMap); + } + + vmEntityVO.setVmReservation(vmReservation); + _vmEntityDao.persist(vmEntityVO); + + return vmReservation.getUuid(); + }else{ + throw new InsufficientServerCapacityException("Unable to create a deployment for " + vmProfile, DataCenter.class, plan.getDataCenterId()); + } + + } + + @Override + public void deployVirtualMachine(String reservationId, String caller, Map params) throws InsufficientCapacityException, ResourceUnavailableException{ + //grab the VM Id and destination using the reservationId. + + VMReservationVO vmReservation = _reservationDao.findByReservationId(reservationId); + long vmId = vmReservation.getVmId(); + + VMInstanceVO vm = _vmDao.findById(vmId); + //Pass it down + Long poolId = null; + Map storage = vmReservation.getVolumeReservation(); + if(storage != null){ + List volIdList = new ArrayList(storage.keySet()); + if(volIdList !=null && !volIdList.isEmpty()){ + poolId = storage.get(volIdList.get(0)); + } + } + + DataCenterDeployment reservedPlan = new DataCenterDeployment(vm.getDataCenterId(), vmReservation.getPodId(), vmReservation.getClusterId(), + vmReservation.getHostId(), null , null); + try{ + VMInstanceVO vmDeployed = _itMgr.start(vm, params, _userDao.findById(new Long(caller)), _accountDao.findById(vm.getAccountId()), reservedPlan); + }catch(Exception ex){ + //Retry the deployment without using the reservation plan + DataCenterDeployment plan = new DataCenterDeployment(vm.getDataCenterId(), null, null,null, null , null); + _itMgr.start(vm, params, _userDao.findById(new Long(caller)), _accountDao.findById(vm.getAccountId()), plan); + } + + } + + @Override + public boolean stopvirtualmachine(VMEntityVO vmEntityVO, String caller) throws ResourceUnavailableException { + + VMInstanceVO vm = _vmDao.findByUuid(vmEntityVO.getUuid()); + return _itMgr.stop(vm, _userDao.findById(new Long(caller)), _accountDao.findById(vm.getAccountId())); + + } + + @Override + public boolean destroyVirtualMachine(VMEntityVO vmEntityVO, String caller) throws AgentUnavailableException, OperationTimedoutException, ConcurrentOperationException{ + + VMInstanceVO vm = _vmDao.findByUuid(vmEntityVO.getUuid()); + return _itMgr.destroy(vm, _userDao.findById(new Long(caller)), _accountDao.findById(vm.getAccountId())); + + + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VirtualMachineEntityFactory.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VirtualMachineEntityFactory.java new file mode 100644 index 000000000..e8ad8e477 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VirtualMachineEntityFactory.java @@ -0,0 +1,41 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api; + +import com.cloud.utils.component.ComponentContext; +import org.springframework.beans.factory.FactoryBean; +import org.springframework.stereotype.Component; + +@Component +public class VirtualMachineEntityFactory implements FactoryBean{ + + @Override + public VirtualMachineEntityImpl getObject() throws Exception { + return ComponentContext.inject(VirtualMachineEntityImpl.class.newInstance()); + } + + @Override + public Class getObjectType() { + return VirtualMachineEntityImpl.class; + } + + @Override + public boolean isSingleton() { + return false; + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VirtualMachineEntityImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VirtualMachineEntityImpl.java new file mode 100644 index 000000000..c2ca729c9 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/VirtualMachineEntityImpl.java @@ -0,0 +1,264 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api; + +import java.lang.reflect.Method; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.cloud.entity.api.db.VMEntityVO; +import org.springframework.stereotype.Component; + +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; +import com.cloud.exception.AgentUnavailableException; +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.OperationTimedoutException; +import com.cloud.exception.ResourceUnavailableException; +import com.cloud.vm.VirtualMachineProfile; + +@Component +public class VirtualMachineEntityImpl implements VirtualMachineEntity { + + @Inject private VMEntityManager manager; + + private VMEntityVO vmEntityVO; + + public VirtualMachineEntityImpl() { + } + + public void init(String vmId) { + this.vmEntityVO = this.manager.loadVirtualMachine(vmId); + } + + public void init(String vmId, String owner, String hostName, String displayName, int cpu, int speed, long memory, List computeTags, List rootDiskTags, List networks) { + init(vmId); + this.vmEntityVO.setOwner(owner); + this.vmEntityVO.setHostname(hostName); + this.vmEntityVO.setDisplayname(displayName); + this.vmEntityVO.setSpeed(speed); + this.vmEntityVO.setComputeTags(computeTags); + this.vmEntityVO.setRootDiskTags(rootDiskTags); + this.vmEntityVO.setNetworkIds(networks); + + manager.saveVirtualMachine(vmEntityVO); + } + + public VirtualMachineEntityImpl(String vmId, VMEntityManager manager) { + this.manager = manager; + this.vmEntityVO = this.manager.loadVirtualMachine(vmId); + } + + public VirtualMachineEntityImpl(String vmId, String owner, String hostName, String displayName, int cpu, int speed, long memory, List computeTags, List rootDiskTags, List networks, VMEntityManager manager) { + this(vmId, manager); + this.vmEntityVO.setOwner(owner); + this.vmEntityVO.setHostname(hostName); + this.vmEntityVO.setDisplayname(displayName); + this.vmEntityVO.setSpeed(speed); + this.vmEntityVO.setComputeTags(computeTags); + this.vmEntityVO.setRootDiskTags(rootDiskTags); + this.vmEntityVO.setNetworkIds(networks); + + manager.saveVirtualMachine(vmEntityVO); + } + + @Override + public String getUuid() { + return vmEntityVO.getUuid(); + } + + @Override + public long getId() { + return vmEntityVO.getId(); + } + + @Override + public String getCurrentState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getDesiredState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Date getCreatedTime() { + return vmEntityVO.getCreated(); + } + + @Override + public Date getLastUpdatedTime() { + return vmEntityVO.getUpdateTime(); + } + + @Override + public String getOwner() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Map getDetails() { + return vmEntityVO.getDetails(); + } + + @Override + public void addDetail(String name, String value) { + vmEntityVO.setDetail(name, value); + } + + @Override + public void delDetail(String name, String value) { + // TODO Auto-generated method stub + } + + @Override + public void updateDetail(String name, String value) { + // TODO Auto-generated method stub + } + + @Override + public List getApplicableActions() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List listVolumeIds() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List listVolumes() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List listNicUuids() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List listNics() { + // TODO Auto-generated method stub + return null; + } + + @Override + public TemplateEntity getTemplate() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List listTags() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void addTag() { + // TODO Auto-generated method stub + + } + + @Override + public void delTag() { + // TODO Auto-generated method stub + + } + + @Override + public String reserve(String plannerToUse, DeploymentPlan plan, + ExcludeList exclude, String caller) throws InsufficientCapacityException, ResourceUnavailableException { + return manager.reserveVirtualMachine(this.vmEntityVO, plannerToUse, plan, exclude); + } + + @Override + public void migrateTo(String reservationId, String caller) { + // TODO Auto-generated method stub + + } + + @Override + public void deploy(String reservationId, String caller, Map params) throws InsufficientCapacityException, ResourceUnavailableException{ + manager.deployVirtualMachine(reservationId, caller, params); + } + + @Override + public boolean stop(String caller) throws ResourceUnavailableException{ + return manager.stopvirtualmachine(this.vmEntityVO, caller); + } + + @Override + public void cleanup() { + // TODO Auto-generated method stub + + } + + @Override + public boolean destroy(String caller) throws AgentUnavailableException, OperationTimedoutException, ConcurrentOperationException { + return manager.destroyVirtualMachine(this.vmEntityVO, caller); + } + + @Override + public VirtualMachineEntity duplicate(String externalId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public SnapshotEntity takeSnapshotOf() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void attach(VolumeEntity volume, short deviceId) { + // TODO Auto-generated method stub + + } + + @Override + public void detach(VolumeEntity volume) { + // TODO Auto-generated method stub + + } + + @Override + public void connectTo(NetworkEntity network, short nicId) { + // TODO Auto-generated method stub + + } + + @Override + public void disconnectFrom(NetworkEntity netowrk, short nicId) { + // TODO Auto-generated method stub + + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMComputeTagVO.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMComputeTagVO.java new file mode 100644 index 000000000..e4fc22833 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMComputeTagVO.java @@ -0,0 +1,67 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +import org.apache.cloudstack.api.InternalIdentity; + +@Entity +@Table(name = "vm_compute_tags") +public class VMComputeTagVO implements InternalIdentity{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + private long id; + + @Column(name = "vm_id") + private long vmId; + + @Column(name = "compute_tag") + private String computeTag; + + /** + * There should never be a public constructor for this class. Since it's + * only here to define the table for the DAO class. + */ + protected VMComputeTagVO() { + } + + public VMComputeTagVO(long vmId, String tag) { + this.vmId = vmId; + this.computeTag = tag; + } + + public long getId() { + return id; + } + + public long getVmId() { + return vmId; + } + + public String getComputeTag() { + return computeTag; + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMEntityVO.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMEntityVO.java new file mode 100644 index 000000000..4748215e3 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMEntityVO.java @@ -0,0 +1,577 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db; + +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Random; +import java.util.UUID; + +import javax.persistence.Column; +import javax.persistence.DiscriminatorColumn; +import javax.persistence.DiscriminatorType; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.Id; +import javax.persistence.Inheritance; +import javax.persistence.InheritanceType; +import javax.persistence.Table; +import javax.persistence.TableGenerator; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.Transient; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.utils.db.Encrypt; +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.db.StateMachine; +import com.cloud.utils.fsm.FiniteStateObject; +import com.cloud.vm.VirtualMachine; +import com.cloud.vm.VirtualMachine.State; + +@Entity +@Table(name="vm_instance") +@Inheritance(strategy=InheritanceType.JOINED) +@DiscriminatorColumn(name="type", discriminatorType=DiscriminatorType.STRING, length=32) +public class VMEntityVO implements VirtualMachine, FiniteStateObject { + @Id + @TableGenerator(name="vm_instance_sq", table="sequence", pkColumnName="name", valueColumnName="value", pkColumnValue="vm_instance_seq", allocationSize=1) + @Column(name="id", updatable=false, nullable = false) + protected long id; + + @Column(name="name", updatable=false, nullable=false, length=255) + protected String hostName = null; + + @Encrypt + @Column(name="vnc_password", updatable=true, nullable=false, length=255) + protected String vncPassword; + + @Column(name="proxy_id", updatable=true, nullable=true) + protected Long proxyId; + + @Temporal(TemporalType.TIMESTAMP) + @Column(name="proxy_assign_time", updatable=true, nullable=true) + protected Date proxyAssignTime; + + /** + * Note that state is intentionally missing the setter. Any updates to + * the state machine needs to go through the DAO object because someone + * else could be updating it as well. + */ + @Enumerated(value=EnumType.STRING) + @StateMachine(state=State.class, event=Event.class) + @Column(name="state", updatable=true, nullable=false, length=32) + protected State state = null; + + @Column(name="private_ip_address", updatable=true) + protected String privateIpAddress; + + @Column(name="instance_name", updatable=true, nullable=false) + protected String instanceName; + + @Column(name="vm_template_id", updatable=true, nullable=true, length=17) + protected Long templateId = new Long(-1); + + @Column(name="guest_os_id", nullable=false, length=17) + protected long guestOSId; + + @Column(name="host_id", updatable=true, nullable=true) + protected Long hostId; + + @Column(name="last_host_id", updatable=true, nullable=true) + protected Long lastHostId; + + @Column(name="pod_id", updatable=true, nullable=false) + protected Long podIdToDeployIn; + + @Column(name="private_mac_address", updatable=true, nullable=true) + protected String privateMacAddress; + + @Column(name="data_center_id", updatable=true, nullable=false) + protected long dataCenterIdToDeployIn; + + @Column(name="vm_type", updatable=false, nullable=false, length=32) + @Enumerated(value=EnumType.STRING) + protected Type type; + + @Column(name="ha_enabled", updatable=true, nullable=true) + protected boolean haEnabled; + + @Column(name="limit_cpu_use", updatable=true, nullable=true) + private boolean limitCpuUse; + + @Column(name="update_count", updatable = true, nullable=false) + protected long updated; // This field should be updated everytime the state is updated. There's no set method in the vo object because it is done with in the dao code. + + @Column(name=GenericDao.CREATED_COLUMN) + protected Date created; + + @Column(name=GenericDao.REMOVED_COLUMN) + protected Date removed; + + @Column(name="update_time", updatable=true) + @Temporal(value=TemporalType.TIMESTAMP) + protected Date updateTime; + + @Column(name="domain_id") + protected long domainId; + + @Column(name="account_id") + protected long accountId; + + @Column(name="service_offering_id") + protected long serviceOfferingId; + + @Column(name="reservation_id") + protected String reservationId; + + @Column(name="hypervisor_type") + @Enumerated(value=EnumType.STRING) + protected HypervisorType hypervisorType; + + @Column(name="ram") + protected long ram; + + @Column(name="cpu") + protected int cpu; + + @Transient + Map details; + + @Column(name="uuid") + protected String uuid = UUID.randomUUID().toString(); + + //orchestration columns + @Column(name="owner") + private String owner = null; + + @Column(name="speed") + private int speed; + + @Transient + List computeTags; + + @Transient + List rootDiskTags; + + @Column(name="host_name") + private String hostname = null; + + @Column(name="display_name") + private String displayname = null; + + @Transient + List networkIds; + + @Column(name="disk_offering_id") + protected Long diskOfferingId; + + @Transient + private VMReservationVO vmReservation; + + + public VMEntityVO(long id, + long serviceOfferingId, + String name, + String instanceName, + Type type, + Long vmTemplateId, + HypervisorType hypervisorType, + long guestOSId, + long domainId, + long accountId, + boolean haEnabled, Long diskOfferingId) { + this.id = id; + this.hostName = name != null ? name : this.uuid; + if (vmTemplateId != null) { + this.templateId = vmTemplateId; + } + this.instanceName = instanceName; + this.type = type; + this.guestOSId = guestOSId; + this.haEnabled = haEnabled; + this.vncPassword = Long.toHexString(new Random().nextLong()); + this.state = State.Stopped; + this.accountId = accountId; + this.domainId = domainId; + this.serviceOfferingId = serviceOfferingId; + this.hypervisorType = hypervisorType; + this.limitCpuUse = false; + this.diskOfferingId = diskOfferingId; + } + + public VMEntityVO(long id, + long serviceOfferingId, + String name, + String instanceName, + Type type, + Long vmTemplateId, + HypervisorType hypervisorType, + long guestOSId, + long domainId, + long accountId, + boolean haEnabled, + boolean limitResourceUse) { + this(id, serviceOfferingId, name, instanceName, type, vmTemplateId, hypervisorType, guestOSId, domainId, accountId, haEnabled, null); + this.limitCpuUse = limitResourceUse; + } + + + + protected VMEntityVO() { + } + + public Date getRemoved() { + return removed; + } + + @Override + public long getDomainId() { + return domainId; + } + + @Override + public long getAccountId() { + return accountId; + } + + @Override + public Type getType() { + return type; + } + + public long getUpdated() { + return updated; + } + + @Override + public long getId() { + return id; + } + + @Override + public String getUuid() { + return uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + @Override + public HypervisorType getHypervisorType() { + return hypervisorType; + } + + @Override + public Date getCreated() { + return created; + } + + public Date getUpdateTime() { + return updateTime; + } + + @Override + public long getDataCenterId() { + return dataCenterIdToDeployIn; + } + + @Override + public String getHostName() { + return hostName; + } + + @Override + public String getInstanceName() { + return instanceName; + } + + @Override + public State getState() { + return state; + } + + // don't use this directly, use VM state machine instead, this method is added for migration tool only + @Override + public void setState(State state) { + this.state = state; + } + + @Override + public String getPrivateIpAddress() { + return privateIpAddress; + } + + public void setPrivateIpAddress(String address) { + privateIpAddress = address; + } + + public void setVncPassword(String vncPassword) { + this.vncPassword = vncPassword; + } + + @Override + public String getVncPassword() { + return vncPassword; + } + + @Override + public long getServiceOfferingId() { + return serviceOfferingId; + } + + public Long getProxyId() { + return proxyId; + } + + public void setProxyId(Long proxyId) { + this.proxyId = proxyId; + } + + public Date getProxyAssignTime() { + return this.proxyAssignTime; + } + + public void setProxyAssignTime(Date time) { + this.proxyAssignTime = time; + } + + @Override + public long getTemplateId() { + if (templateId == null) { + return -1; + } else { + return templateId; + } + } + + public void setTemplateId(Long templateId) { + this.templateId = templateId; + } + + @Override + public long getGuestOSId() { + return guestOSId; + } + + public void setGuestOSId(long guestOSId) { + this.guestOSId = guestOSId; + } + + public void incrUpdated() { + updated++; + } + + public void decrUpdated() { + updated--; + } + + @Override + public Long getHostId() { + return hostId; + } + + @Override + public Long getLastHostId() { + return lastHostId; + } + + public void setLastHostId(Long lastHostId) { + this.lastHostId = lastHostId; + } + + public void setHostId(Long hostId) { + this.hostId = hostId; + } + + @Override + public boolean isHaEnabled() { + return haEnabled; + } + + @Override + public boolean limitCpuUse() { + return limitCpuUse; + } + + public void setLimitCpuUse(boolean value) { + limitCpuUse = value; + } + + @Override + public String getPrivateMacAddress() { + return privateMacAddress; + } + + @Override + public Long getPodIdToDeployIn() { + return podIdToDeployIn; + } + + public void setPodId(long podId) { + this.podIdToDeployIn = podId; + } + + public void setPrivateMacAddress(String privateMacAddress) { + this.privateMacAddress = privateMacAddress; + } + + public void setDataCenterId(long dataCenterId) { + this.dataCenterIdToDeployIn = dataCenterId; + } + + public boolean isRemoved() { + return removed != null; + } + + public void setHaEnabled(boolean value) { + haEnabled = value; + } + + public void setReservationId(String reservationId) { + this.reservationId = reservationId; + } + + public String getReservationId() { + return this.reservationId; + } + + @Override + public Map getDetails() { + return details; + } + + public void setDetail(String name, String value) { + assert (details != null) : "Did you forget to load the details?"; + + details.put(name, value); + } + + public void setDetails(Map details) { + this.details = details; + } + + transient String toString; + @Override + public String toString() { + if (toString == null) { + toString = new StringBuilder("VM[").append(type.toString()).append("|").append(hostName).append("]").toString(); + } + return toString; + } + + + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + (int) (id ^ (id >>> 32)); + return result; + } + + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + VMEntityVO other = (VMEntityVO) obj; + if (id != other.id) + return false; + return true; + } + + + public void setServiceOfferingId(long serviceOfferingId) { + this.serviceOfferingId = serviceOfferingId; + } + + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public int getSpeed() { + return speed; + } + + public void setSpeed(int speed) { + this.speed = speed; + } + + public List getComputeTags() { + return computeTags; + } + + public void setComputeTags(List computeTags) { + this.computeTags = computeTags; + } + + public List getRootDiskTags() { + return rootDiskTags; + } + + public void setRootDiskTags(List rootDiskTags) { + this.rootDiskTags = rootDiskTags; + } + + public String getHostname() { + return hostname; + } + + public void setHostname(String hostname) { + this.hostname = hostname; + } + + public String getDisplayname() { + return displayname; + } + + public void setDisplayname(String displayname) { + this.displayname = displayname; + } + + public List getNetworkIds() { + return networkIds; + } + + public void setNetworkIds(List networkIds) { + this.networkIds = networkIds; + } + + @Override + public Long getDiskOfferingId() { + return diskOfferingId; + } + + public VMReservationVO getVmReservation() { + return vmReservation; + } + + public void setVmReservation(VMReservationVO vmReservation) { + this.vmReservation = vmReservation; + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMNetworkMapVO.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMNetworkMapVO.java new file mode 100644 index 000000000..f29b19f9f --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMNetworkMapVO.java @@ -0,0 +1,71 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db; + + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import org.apache.cloudstack.api.InternalIdentity; + + +@Entity +@Table(name = "vm_network_map") +public class VMNetworkMapVO implements InternalIdentity{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + private long id; + + @Column(name = "vm_id") + private long vmId; + + @Column(name="network_id") + private long networkId; + + + /** + * There should never be a public constructor for this class. Since it's + * only here to define the table for the DAO class. + */ + protected VMNetworkMapVO() { + } + + public VMNetworkMapVO(long vmId, long networkId) { + this.vmId = vmId; + this.networkId = networkId; + } + + + public long getId() { + return id; + } + + public long getVmId() { + return vmId; + } + + + public long getNetworkId() { + return networkId; + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMReservationVO.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMReservationVO.java new file mode 100644 index 000000000..5a69ec841 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMReservationVO.java @@ -0,0 +1,127 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db; + +import java.util.Date; +import java.util.Map; +import java.util.UUID; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Transient; + +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + +import com.cloud.utils.db.GenericDao; + +@Entity +@Table(name = "vm_reservation") +public class VMReservationVO implements Identity, InternalIdentity{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + private long id; + + @Column(name = "vm_id") + private long vmId; + + @Column(name="uuid") + private String uuid; + + @Column(name="data_center_id") + private long dataCenterId; + + @Column(name="pod_id") + private long podId; + + @Column(name="cluster_id") + private long clusterId; + + @Column(name="host_id") + private long hostId; + + @Column(name=GenericDao.CREATED_COLUMN) + private Date created; + + @Column(name=GenericDao.REMOVED_COLUMN) + private Date removed; + + // VolumeId -> poolId + @Transient + Map volumeReservationMap; + + /** + * There should never be a public constructor for this class. Since it's + * only here to define the table for the DAO class. + */ + protected VMReservationVO() { + } + + public VMReservationVO(long vmId, long dataCenterId, long podId, long clusterId, long hostId) { + this.vmId = vmId; + this.dataCenterId = dataCenterId; + this.podId = podId; + this.clusterId = clusterId; + this.hostId = hostId; + this.uuid = UUID.randomUUID().toString(); + } + + + public long getId() { + return id; + } + + public long getVmId() { + return vmId; + } + + @Override + public String getUuid() { + return uuid; + } + + public long getDataCenterId() { + return dataCenterId; + } + + public Long getPodId() { + return podId; + } + + public Long getClusterId() { + return clusterId; + } + + public Long getHostId() { + return hostId; + } + + public Map getVolumeReservation(){ + return volumeReservationMap; + } + + public void setVolumeReservation(Map volumeReservationMap){ + this.volumeReservationMap = volumeReservationMap; + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMRootDiskTagVO.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMRootDiskTagVO.java new file mode 100644 index 000000000..3c09e9306 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VMRootDiskTagVO.java @@ -0,0 +1,67 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +import org.apache.cloudstack.api.InternalIdentity; + +@Entity +@Table(name = "vm_root_disk_tags") +public class VMRootDiskTagVO implements InternalIdentity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + private long id; + + @Column(name = "vm_id") + private long vmId; + + @Column(name = "root_disk_tag") + private String rootDiskTag; + + /** + * There should never be a public constructor for this class. Since it's + * only here to define the table for the DAO class. + */ + protected VMRootDiskTagVO() { + } + + public VMRootDiskTagVO(long vmId, String rootDiskTag) { + this.vmId = vmId; + this.rootDiskTag = rootDiskTag; + } + + public long getId() { + return id; + } + + public long getVmId() { + return vmId; + } + + public String getRootDiskTag() { + return rootDiskTag; + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VolumeReservationVO.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VolumeReservationVO.java new file mode 100644 index 000000000..f064623f8 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/VolumeReservationVO.java @@ -0,0 +1,100 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db; + +import java.util.Date; +import java.util.Map; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Transient; + +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.api.InternalIdentity; + +import com.cloud.utils.db.GenericDao; + +@Entity +@Table(name = "volume_reservation") +public class VolumeReservationVO implements InternalIdentity{ + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + private long id; + + @Column(name = "vm_reservation_id") + private Long vmReservationId; + + @Column(name = "vm_id") + private long vmId; + + @Column(name="volume_id") + private long volumeId; + + @Column(name="pool_id") + private long poolId; + + // VolumeId -> poolId + @Transient + Map volumeReservationMap; + + /** + * There should never be a public constructor for this class. Since it's + * only here to define the table for the DAO class. + */ + protected VolumeReservationVO() { + } + + public VolumeReservationVO(long vmId, long volumeId, long poolId, Long vmReservationId) { + this.vmId = vmId; + this.volumeId = volumeId; + this.poolId = poolId; + this.vmReservationId = vmReservationId; + } + + + public long getId() { + return id; + } + + public long getVmId() { + return vmId; + } + + public Long geVmReservationId() { + return vmReservationId; + } + + public long getVolumeId() { + return volumeId; + } + + public Long getPoolId() { + return poolId; + } + + + public Map getVolumeReservation(){ + return volumeReservationMap; + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMComputeTagDao.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMComputeTagDao.java new file mode 100644 index 000000000..d8178d4a8 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMComputeTagDao.java @@ -0,0 +1,31 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db.dao; + +import java.util.List; + +import org.apache.cloudstack.engine.cloud.entity.api.db.VMComputeTagVO; + +import com.cloud.utils.db.GenericDao; + +public interface VMComputeTagDao extends GenericDao{ + + void persist(long vmId, List computeTags); + + List getComputeTags(long vmId); + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMComputeTagDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMComputeTagDaoImpl.java new file mode 100644 index 000000000..6f70b3531 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMComputeTagDaoImpl.java @@ -0,0 +1,89 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db.dao; + + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.PostConstruct; +import javax.ejb.Local; + + +import org.apache.cloudstack.engine.cloud.entity.api.db.VMComputeTagVO; + +import org.springframework.stereotype.Component; + +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.Transaction; + +@Component +@Local(value = { VMComputeTagDao.class }) +public class VMComputeTagDaoImpl extends GenericDaoBase implements VMComputeTagDao { + + protected SearchBuilder VmIdSearch; + + public VMComputeTagDaoImpl() { + } + + @PostConstruct + public void init() { + VmIdSearch = createSearchBuilder(); + VmIdSearch.and("vmId", VmIdSearch.entity().getVmId(), SearchCriteria.Op.EQ); + VmIdSearch.done(); + + } + + @Override + public void persist(long vmId, List computeTags) { + Transaction txn = Transaction.currentTxn(); + + txn.start(); + SearchCriteria sc = VmIdSearch.create(); + sc.setParameters("vmId", vmId); + expunge(sc); + + for (String tag : computeTags) { + if(tag != null){ + tag = tag.trim(); + if(tag.length() > 0) { + VMComputeTagVO vo = new VMComputeTagVO(vmId, tag); + persist(vo); + } + } + } + txn.commit(); + } + + @Override + public List getComputeTags(long vmId) { + + SearchCriteria sc = VmIdSearch.create(); + sc.setParameters("vmId", vmId); + + List results = search(sc, null); + List computeTags = new ArrayList(results.size()); + for (VMComputeTagVO result : results) { + computeTags.add(result.getComputeTag()); + } + + return computeTags; + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMEntityDao.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMEntityDao.java new file mode 100644 index 000000000..aa063dc07 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMEntityDao.java @@ -0,0 +1,41 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db.dao; + +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.cloudstack.engine.cloud.entity.api.db.VMEntityVO; + +import com.cloud.utils.Pair; +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.fsm.StateDao; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.VirtualMachine; +import com.cloud.vm.VirtualMachine.State; +import com.cloud.vm.VirtualMachine.Type; + + +/* + * Data Access Object for vm_instance table + */ +public interface VMEntityDao extends GenericDao { + + void loadVmReservation(VMEntityVO vm); + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMEntityDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMEntityDaoImpl.java new file mode 100644 index 000000000..3082d21c1 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMEntityDaoImpl.java @@ -0,0 +1,169 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db.dao; + + +import java.sql.PreparedStatement; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.PostConstruct; +import javax.ejb.Local; +import javax.inject.Inject; + +import org.apache.cloudstack.engine.cloud.entity.api.db.VMEntityVO; +import org.apache.cloudstack.engine.cloud.entity.api.db.VMReservationVO; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + + +import com.cloud.network.dao.NetworkDao; +import com.cloud.network.dao.NetworkVO; +import com.cloud.utils.Pair; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.Transaction; +import com.cloud.vm.NicProfile; + + + +@Component +@Local(value = { VMEntityDao.class }) +public class VMEntityDaoImpl extends GenericDaoBase implements VMEntityDao { + + public static final Logger s_logger = Logger.getLogger(VMEntityDaoImpl.class); + + + @Inject protected VMReservationDao _vmReservationDao; + + @Inject protected VMComputeTagDao _vmComputeTagDao; + + @Inject protected VMRootDiskTagDao _vmRootDiskTagsDao; + + @Inject protected VMNetworkMapDao _vmNetworkMapDao; + + + @Inject + protected NetworkDao _networkDao; + + public VMEntityDaoImpl() { + } + + @PostConstruct + protected void init() { + + } + + @Override + public void loadVmReservation(VMEntityVO vm) { + VMReservationVO vmReservation = _vmReservationDao.findByVmId(vm.getId()); + vm.setVmReservation(vmReservation); + } + + @Override + @DB + public VMEntityVO persist(VMEntityVO vm) { + Transaction txn = Transaction.currentTxn(); + txn.start(); + + VMEntityVO dbVO = super.persist(vm); + + saveVmNetworks(vm); + loadVmNetworks(dbVO); + saveVmReservation(vm); + loadVmReservation(dbVO); + saveComputeTags(vm.getId(), vm.getComputeTags()); + loadComputeTags(dbVO); + saveRootDiskTags(vm.getId(), vm.getRootDiskTags()); + loadRootDiskTags(dbVO); + + txn.commit(); + + return dbVO; + } + + private void loadVmNetworks(VMEntityVO dbVO) { + List networksIds = _vmNetworkMapDao.getNetworks(dbVO.getId()); + + List networks = new ArrayList(); + for(Long networkId : networksIds){ + NetworkVO network = _networkDao.findById(networkId); + if(network != null){ + networks.add(network.getUuid()); + } + } + + dbVO.setNetworkIds(networks); + + } + + private void saveVmNetworks(VMEntityVO vm) { + List networks = new ArrayList(); + + List networksIds = vm.getNetworkIds(); + + if (networksIds == null || (networksIds != null && networksIds.isEmpty())) { + return; + } + + + for(String uuid : networksIds){ + NetworkVO network = _networkDao.findByUuid(uuid); + if(network != null){ + networks.add(network.getId()); + } + } + _vmNetworkMapDao.persist(vm.getId(), networks); + + } + + private void loadRootDiskTags(VMEntityVO dbVO) { + List rootDiskTags = _vmRootDiskTagsDao.getRootDiskTags(dbVO.getId()); + dbVO.setRootDiskTags(rootDiskTags); + + } + + private void loadComputeTags(VMEntityVO dbVO) { + List computeTags = _vmComputeTagDao.getComputeTags(dbVO.getId()); + dbVO.setComputeTags(computeTags); + + } + + private void saveRootDiskTags(long vmId, List rootDiskTags) { + if (rootDiskTags == null || (rootDiskTags != null && rootDiskTags.isEmpty())) { + return; + } + _vmRootDiskTagsDao.persist(vmId, rootDiskTags); + + } + + private void saveComputeTags(long vmId, List computeTags) { + if (computeTags == null || (computeTags != null && computeTags.isEmpty())) { + return; + } + + _vmComputeTagDao.persist(vmId, computeTags); + } + + private void saveVmReservation(VMEntityVO vm) { + if(vm.getVmReservation() != null){ + _vmReservationDao.persist(vm.getVmReservation()); + } + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMNetworkMapDao.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMNetworkMapDao.java new file mode 100644 index 000000000..59c41c298 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMNetworkMapDao.java @@ -0,0 +1,31 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db.dao; + +import java.util.List; + +import org.apache.cloudstack.engine.cloud.entity.api.db.VMNetworkMapVO; + +import com.cloud.utils.db.GenericDao; + +public interface VMNetworkMapDao extends GenericDao{ + + void persist(long vmId, List networks); + + List getNetworks(long vmId); + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMNetworkMapDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMNetworkMapDaoImpl.java new file mode 100644 index 000000000..0f2c4ccb7 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMNetworkMapDaoImpl.java @@ -0,0 +1,85 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db.dao; + + +import java.util.ArrayList; +import java.util.List; +import javax.annotation.PostConstruct; +import javax.ejb.Local; +import javax.inject.Inject; +import org.apache.cloudstack.engine.cloud.entity.api.db.VMNetworkMapVO; +import org.springframework.stereotype.Component; +import com.cloud.network.dao.NetworkDao; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.Transaction; + +@Component +@Local(value = { VMNetworkMapDao.class }) +public class VMNetworkMapDaoImpl extends GenericDaoBase implements VMNetworkMapDao { + + protected SearchBuilder VmIdSearch; + + @Inject + protected NetworkDao _networkDao; + + public VMNetworkMapDaoImpl() { + } + + @PostConstruct + public void init() { + VmIdSearch = createSearchBuilder(); + VmIdSearch.and("vmId", VmIdSearch.entity().getVmId(), SearchCriteria.Op.EQ); + VmIdSearch.done(); + + } + + @Override + public void persist(long vmId, List networks) { + Transaction txn = Transaction.currentTxn(); + + txn.start(); + SearchCriteria sc = VmIdSearch.create(); + sc.setParameters("vmId", vmId); + expunge(sc); + + for (Long networkId : networks) { + VMNetworkMapVO vo = new VMNetworkMapVO(vmId, networkId); + persist(vo); + } + + txn.commit(); + } + + @Override + public List getNetworks(long vmId) { + + SearchCriteria sc = VmIdSearch.create(); + sc.setParameters("vmId", vmId); + + List results = search(sc, null); + List networks = new ArrayList(results.size()); + for (VMNetworkMapVO result : results) { + networks.add(result.getNetworkId()); + } + + return networks; + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMReservationDao.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMReservationDao.java new file mode 100644 index 000000000..721a8c483 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMReservationDao.java @@ -0,0 +1,34 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db.dao; + + +import java.util.Map; + +import org.apache.cloudstack.engine.cloud.entity.api.db.VMReservationVO; + +import com.cloud.utils.db.GenericDao; + +public interface VMReservationDao extends GenericDao{ + + VMReservationVO findByVmId(long vmId); + + void loadVolumeReservation(VMReservationVO reservation); + + VMReservationVO findByReservationId(String reservationId); + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMReservationDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMReservationDaoImpl.java new file mode 100644 index 000000000..73b4dd219 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMReservationDaoImpl.java @@ -0,0 +1,111 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db.dao; + + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.annotation.PostConstruct; +import javax.ejb.Local; +import javax.inject.Inject; + +import org.apache.cloudstack.engine.cloud.entity.api.db.VMEntityVO; +import org.apache.cloudstack.engine.cloud.entity.api.db.VMReservationVO; +import org.apache.cloudstack.engine.cloud.entity.api.db.VolumeReservationVO; +import org.springframework.stereotype.Component; + +import com.cloud.host.dao.HostTagsDaoImpl; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.Transaction; + +@Component +@Local(value = { VMReservationDao.class }) +public class VMReservationDaoImpl extends GenericDaoBase implements VMReservationDao { + + protected SearchBuilder VmIdSearch; + + @Inject protected VolumeReservationDao _volumeReservationDao; + + public VMReservationDaoImpl() { + } + + @PostConstruct + public void init() { + VmIdSearch = createSearchBuilder(); + VmIdSearch.and("vmId", VmIdSearch.entity().getVmId(), SearchCriteria.Op.EQ); + VmIdSearch.done(); + } + + @Override + public VMReservationVO findByVmId(long vmId) { + SearchCriteria sc = VmIdSearch.create("vmId", vmId); + VMReservationVO vmRes = findOneBy(sc); + loadVolumeReservation(vmRes); + return vmRes; + } + + + @Override + public void loadVolumeReservation(VMReservationVO reservation){ + if(reservation != null){ + List volumeResList = _volumeReservationDao.listVolumeReservation(reservation.getId()); + Map volumeReservationMap = new HashMap(); + + for(VolumeReservationVO res : volumeResList){ + volumeReservationMap.put(res.getVolumeId(), res.getPoolId()); + } + reservation.setVolumeReservation(volumeReservationMap); + } + } + + @Override + @DB + public VMReservationVO persist(VMReservationVO reservation) { + Transaction txn = Transaction.currentTxn(); + txn.start(); + + VMReservationVO dbVO = super.persist(reservation); + + saveVolumeReservation(reservation); + loadVolumeReservation(dbVO); + + txn.commit(); + + return dbVO; + } + + private void saveVolumeReservation(VMReservationVO reservation) { + if(reservation.getVolumeReservation() != null){ + for(Long volumeId : reservation.getVolumeReservation().keySet()){ + VolumeReservationVO volumeReservation = new VolumeReservationVO(reservation.getVmId(), volumeId, reservation.getVolumeReservation().get(volumeId), reservation.getId()); + _volumeReservationDao.persist(volumeReservation); + } + } + } + + @Override + public VMReservationVO findByReservationId(String reservationId) { + VMReservationVO vmRes = super.findByUuid(reservationId); + loadVolumeReservation(vmRes); + return vmRes; + } +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMRootDiskTagDao.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMRootDiskTagDao.java new file mode 100644 index 000000000..dc00880d7 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMRootDiskTagDao.java @@ -0,0 +1,31 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db.dao; + +import java.util.List; + +import org.apache.cloudstack.engine.cloud.entity.api.db.VMRootDiskTagVO; + +import com.cloud.utils.db.GenericDao; + +public interface VMRootDiskTagDao extends GenericDao{ + + void persist(long vmId, List diskTags); + + List getRootDiskTags(long vmId); + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMRootDiskTagDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMRootDiskTagDaoImpl.java new file mode 100644 index 000000000..be194bbfc --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VMRootDiskTagDaoImpl.java @@ -0,0 +1,88 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db.dao; + + +import java.util.ArrayList; +import java.util.List; + +import javax.annotation.PostConstruct; +import javax.ejb.Local; + + +import org.apache.cloudstack.engine.cloud.entity.api.db.VMRootDiskTagVO; + +import org.springframework.stereotype.Component; + +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.Transaction; + +@Component +@Local(value = { VMRootDiskTagDao.class }) +public class VMRootDiskTagDaoImpl extends GenericDaoBase implements VMRootDiskTagDao { + + protected SearchBuilder VmIdSearch; + + public VMRootDiskTagDaoImpl() { + } + + @PostConstruct + public void init() { + VmIdSearch = createSearchBuilder(); + VmIdSearch.and("vmId", VmIdSearch.entity().getVmId(), SearchCriteria.Op.EQ); + VmIdSearch.done(); + + } + + @Override + public void persist(long vmId, List rootDiskTags) { + Transaction txn = Transaction.currentTxn(); + + txn.start(); + SearchCriteria sc = VmIdSearch.create(); + sc.setParameters("vmId", vmId); + expunge(sc); + + for (String tag : rootDiskTags) { + if(tag != null){ + tag = tag.trim(); + if(tag.length() > 0) { + VMRootDiskTagVO vo = new VMRootDiskTagVO(vmId, tag); + persist(vo); + } + } + } + txn.commit(); + } + + + @Override + public List getRootDiskTags(long vmId) { + SearchCriteria sc = VmIdSearch.create(); + sc.setParameters("vmId", vmId); + + List results = search(sc, null); + List computeTags = new ArrayList(results.size()); + for (VMRootDiskTagVO result : results) { + computeTags.add(result.getRootDiskTag()); + } + return computeTags; + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VolumeReservationDao.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VolumeReservationDao.java new file mode 100644 index 000000000..fd709b0db --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VolumeReservationDao.java @@ -0,0 +1,31 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db.dao; + +import java.util.List; + +import org.apache.cloudstack.engine.cloud.entity.api.db.VolumeReservationVO; + +import com.cloud.utils.db.GenericDao; + +public interface VolumeReservationDao extends GenericDao{ + + VolumeReservationVO findByVmId(long vmId); + + List listVolumeReservation(long vmReservationId); + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VolumeReservationDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VolumeReservationDaoImpl.java new file mode 100644 index 000000000..26bc65f35 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/cloud/entity/api/db/dao/VolumeReservationDaoImpl.java @@ -0,0 +1,68 @@ +// 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 org.apache.cloudstack.engine.cloud.entity.api.db.dao; + + +import java.util.List; + +import javax.annotation.PostConstruct; +import javax.ejb.Local; +import javax.inject.Inject; + +import org.apache.cloudstack.engine.cloud.entity.api.db.VMReservationVO; +import org.apache.cloudstack.engine.cloud.entity.api.db.VolumeReservationVO; +import org.springframework.stereotype.Component; + +import com.cloud.host.dao.HostTagsDaoImpl; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; + +@Component +@Local(value = { VolumeReservationDao.class }) +public class VolumeReservationDaoImpl extends GenericDaoBase implements VolumeReservationDao { + + protected SearchBuilder VmIdSearch; + protected SearchBuilder VmReservationIdSearch; + + public VolumeReservationDaoImpl() { + } + + @PostConstruct + public void init() { + VmIdSearch = createSearchBuilder(); + VmIdSearch.and("vmId", VmIdSearch.entity().getVmId(), SearchCriteria.Op.EQ); + VmIdSearch.done(); + + VmReservationIdSearch = createSearchBuilder(); + VmReservationIdSearch.and("vmReservationId", VmReservationIdSearch.entity().geVmReservationId(), SearchCriteria.Op.EQ); + VmReservationIdSearch.done(); + } + + @Override + public VolumeReservationVO findByVmId(long vmId) { + SearchCriteria sc = VmIdSearch.create("vmId", vmId); + return findOneBy(sc); + } + + @Override + public List listVolumeReservation(long vmReservationId) { + SearchCriteria sc = VmReservationIdSearch.create("vmReservationId", vmReservationId); + return listBy(sc); + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/ClusterEntityImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/ClusterEntityImpl.java new file mode 100644 index 000000000..46dd21d28 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/ClusterEntityImpl.java @@ -0,0 +1,209 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api; + +import java.lang.reflect.Method; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineClusterVO; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.org.Cluster.ClusterType; +import com.cloud.org.Grouping.AllocationState; +import com.cloud.org.Managed.ManagedState; +import com.cloud.utils.fsm.NoTransitionException; + + +public class ClusterEntityImpl implements ClusterEntity { + + + private DataCenterResourceManager manager; + + private EngineClusterVO clusterVO; + + + public ClusterEntityImpl(String clusterId, DataCenterResourceManager manager) { + this.manager = manager; + this.clusterVO = this.manager.loadCluster(clusterId); + } + + @Override + public boolean enable() { + try { + manager.changeState(this, Event.EnableRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + @Override + public boolean disable() { + try { + manager.changeState(this, Event.DisableRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + @Override + public boolean deactivate() { + try { + manager.changeState(this, Event.DeactivateRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + + @Override + public boolean reactivate() { + try { + manager.changeState(this, Event.ActivatedRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + + @Override + public State getState() { + return clusterVO.getState(); + } + + @Override + public void persist() { + manager.saveCluster(clusterVO); + } + + @Override + public String getUuid() { + return clusterVO.getUuid(); + } + + @Override + public long getId() { + return clusterVO.getId(); + } + + @Override + public String getCurrentState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getDesiredState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Date getCreatedTime() { + return clusterVO.getCreated(); + } + + @Override + public Date getLastUpdatedTime() { + return clusterVO.getLastUpdated(); + } + + @Override + public String getOwner() { + return clusterVO.getOwner(); + } + + @Override + public Map getDetails() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void addDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public void delDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public void updateDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public List getApplicableActions() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getName() { + return clusterVO.getName(); + } + + @Override + public long getDataCenterId() { + return clusterVO.getDataCenterId(); + } + + @Override + public long getPodId() { + return clusterVO.getPodId(); + } + + @Override + public HypervisorType getHypervisorType() { + return clusterVO.getHypervisorType(); + } + + @Override + public ClusterType getClusterType() { + return clusterVO.getClusterType(); + } + + @Override + public AllocationState getAllocationState() { + return clusterVO.getAllocationState(); + } + + @Override + public ManagedState getManagedState() { + return clusterVO.getManagedState(); + } + + public void setOwner(String owner) { + clusterVO.setOwner(owner); + } + + public void setName(String name) { + clusterVO.setName(name); + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/DataCenterResourceManager.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/DataCenterResourceManager.java new file mode 100644 index 000000000..a5f6d5e81 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/DataCenterResourceManager.java @@ -0,0 +1,50 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api; + + +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineClusterVO; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO; + +import com.cloud.utils.fsm.NoTransitionException; + + + +public interface DataCenterResourceManager { + + EngineDataCenterVO loadDataCenter(String dataCenterId); + + void saveDataCenter(EngineDataCenterVO dc); + + void savePod(EngineHostPodVO dc); + + void saveCluster(EngineClusterVO cluster); + + boolean changeState(DataCenterResourceEntity entity, Event event) throws NoTransitionException; + + EngineHostPodVO loadPod(String uuid); + + EngineClusterVO loadCluster(String uuid); + + EngineHostVO loadHost(String uuid); + + void saveHost(EngineHostVO hostVO); + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/DataCenterResourceManagerImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/DataCenterResourceManagerImpl.java new file mode 100644 index 000000000..c267e5515 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/DataCenterResourceManagerImpl.java @@ -0,0 +1,129 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineClusterVO; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO; +import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineClusterDao; +import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineDataCenterDao; +import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostDao; +import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostPodDao; +import org.springframework.stereotype.Component; + + +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.utils.fsm.NoTransitionException; +import com.cloud.utils.fsm.StateMachine2; + +@Component +public class DataCenterResourceManagerImpl implements DataCenterResourceManager { + + @Inject + EngineDataCenterDao _dataCenterDao; + + @Inject + EngineHostPodDao _podDao; + + @Inject + EngineClusterDao _clusterDao; + + @Inject + EngineHostDao _hostDao; + + + protected StateMachine2 _stateMachine = DataCenterResourceEntity.State.s_fsm; + + @Override + public EngineDataCenterVO loadDataCenter(String dataCenterId) { + EngineDataCenterVO dataCenterVO = _dataCenterDao.findByUuid(dataCenterId); + if(dataCenterVO == null){ + throw new InvalidParameterValueException("Zone does not exist"); + } + return dataCenterVO; + } + + @Override + public void saveDataCenter(EngineDataCenterVO dc) { + _dataCenterDao.persist(dc); + + } + + @Override + public boolean changeState(DataCenterResourceEntity entity, Event event) throws NoTransitionException { + + if(entity instanceof ZoneEntity){ + return _stateMachine.transitTo(entity, event, null, _dataCenterDao); + }else if(entity instanceof PodEntity){ + return _stateMachine.transitTo(entity, event, null, _podDao); + }else if(entity instanceof ClusterEntity){ + return _stateMachine.transitTo(entity, event, null, _clusterDao); + }else if(entity instanceof HostEntity){ + return _stateMachine.transitTo(entity, event, null, _hostDao); + } + + return false; + } + + @Override + public EngineHostPodVO loadPod(String uuid) { + EngineHostPodVO pod = _podDao.findByUuid(uuid); + if(pod == null){ + throw new InvalidParameterValueException("Pod does not exist"); + } + return pod; + } + + @Override + public EngineClusterVO loadCluster(String uuid) { + EngineClusterVO cluster = _clusterDao.findByUuid(uuid); + if(cluster == null){ + throw new InvalidParameterValueException("Pod does not exist"); + } + return cluster; + } + + @Override + public void savePod(EngineHostPodVO pod) { + _podDao.persist(pod); + } + + @Override + public void saveCluster(EngineClusterVO cluster) { + _clusterDao.persist(cluster); + } + + @Override + public EngineHostVO loadHost(String uuid) { + EngineHostVO host = _hostDao.findByUuid(uuid); + if(host == null){ + throw new InvalidParameterValueException("Host does not exist"); + } + return host; + } + + @Override + public void saveHost(EngineHostVO hostVO) { + _hostDao.persist(hostVO); + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/HostEntityImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/HostEntityImpl.java new file mode 100644 index 000000000..17114e7ce --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/HostEntityImpl.java @@ -0,0 +1,215 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api; + +import java.lang.reflect.Method; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.utils.fsm.NoTransitionException; + +public class HostEntityImpl implements HostEntity { + + private DataCenterResourceManager manager; + + private EngineHostVO hostVO; + + public HostEntityImpl(String uuid, DataCenterResourceManager manager) { + this.manager = manager; + hostVO = manager.loadHost(uuid); + } + + @Override + public boolean enable() { + try { + manager.changeState(this, Event.EnableRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + @Override + public boolean disable() { + try { + manager.changeState(this, Event.DisableRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + @Override + public boolean deactivate() { + try { + manager.changeState(this, Event.DeactivateRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + @Override + public boolean reactivate() { + try { + manager.changeState(this, Event.ActivatedRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + @Override + public State getState() { + return hostVO.getOrchestrationState(); + } + + @Override + public void persist() { + manager.saveHost(hostVO); + } + + @Override + public String getName() { + return hostVO.getName(); + } + + @Override + public String getUuid() { + return hostVO.getUuid(); + } + + @Override + public long getId() { + return hostVO.getId(); + } + + @Override + public String getCurrentState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getDesiredState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Date getCreatedTime() { + return hostVO.getCreated(); + } + + @Override + public Date getLastUpdatedTime() { + return hostVO.getLastUpdated(); + } + + @Override + public String getOwner() { + // TODO Auto-generated method stub + return hostVO.getOwner(); + } + + + public void setDetails(Map details) { + hostVO.setDetails(details); + } + + @Override + public Map getDetails() { + return hostVO.getDetails(); + } + + @Override + public void addDetail(String name, String value) { + hostVO.setDetail(name, value); + } + + @Override + public void delDetail(String name, String value) { + // TODO Auto-generated method stub + } + + @Override + public void updateDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public List getApplicableActions() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Long getTotalMemory() { + return hostVO.getTotalMemory(); + } + + @Override + public Integer getCpus() { + return hostVO.getCpus(); + } + + @Override + public Long getSpeed() { + return hostVO.getSpeed(); + } + + @Override + public Long getPodId() { + return hostVO.getPodId(); + } + + @Override + public long getDataCenterId() { + return hostVO.getDataCenterId(); + } + + @Override + public HypervisorType getHypervisorType() { + return hostVO.getHypervisorType(); + } + + @Override + public String getGuid() { + return hostVO.getGuid(); + } + + @Override + public Long getClusterId() { + return hostVO.getClusterId(); + } + + public void setOwner(String owner) { + hostVO.setOwner(owner); + } + + public void setName(String name) { + hostVO.setName(name); + } + + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/PodEntityImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/PodEntityImpl.java new file mode 100755 index 000000000..758a99751 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/PodEntityImpl.java @@ -0,0 +1,211 @@ +/* + * 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 org.apache.cloudstack.engine.datacenter.entity.api; + +import java.lang.reflect.Method; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO; + +import com.cloud.org.Cluster; +import com.cloud.org.Grouping.AllocationState; +import com.cloud.utils.fsm.NoTransitionException; + +public class PodEntityImpl implements PodEntity { + + + private DataCenterResourceManager manager; + + private EngineHostPodVO podVO; + + public PodEntityImpl(String uuid, DataCenterResourceManager manager) { + this.manager = manager; + podVO = manager.loadPod(uuid); + } + + @Override + public boolean enable() { + try { + manager.changeState(this, Event.EnableRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + @Override + public boolean disable() { + try { + manager.changeState(this, Event.DisableRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + @Override + public boolean deactivate() { + try { + manager.changeState(this, Event.DeactivateRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + @Override + public boolean reactivate() { + try { + manager.changeState(this, Event.ActivatedRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + @Override + public State getState() { + return podVO.getState(); + } + + @Override + public String getUuid() { + return podVO.getUuid(); + } + + @Override + public long getId() { + return podVO.getId(); + } + + @Override + public String getCurrentState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getDesiredState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Date getCreatedTime() { + return podVO.getCreated(); + } + + @Override + public Date getLastUpdatedTime() { + return podVO.getLastUpdated(); + } + + @Override + public String getOwner() { + return podVO.getOwner(); + } + + + @Override + public List getApplicableActions() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getCidrAddress() { + return podVO.getCidrAddress(); + } + + @Override + public int getCidrSize() { + return podVO.getCidrSize(); + } + + @Override + public String getGateway() { + return podVO.getGateway(); + } + + @Override + public long getDataCenterId() { + return podVO.getDataCenterId(); + } + + @Override + public String getName() { + return podVO.getName(); + } + + @Override + public AllocationState getAllocationState() { + return podVO.getAllocationState(); + } + + @Override + public boolean getExternalDhcp() { + return podVO.getExternalDhcp(); + } + + @Override + public List listClusters() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void persist() { + manager.savePod(podVO); + + } + + @Override + public Map getDetails() { + return null; + } + + @Override + public void addDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public void delDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public void updateDetail(String name, String value) { + + } + + public void setOwner(String owner) { + podVO.setOwner(owner); + } + + public void setName(String name) { + podVO.setName(name); + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/ZoneEntityImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/ZoneEntityImpl.java new file mode 100644 index 000000000..e2548803d --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/ZoneEntityImpl.java @@ -0,0 +1,201 @@ +/* + * 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 org.apache.cloudstack.engine.datacenter.entity.api; + +import java.lang.reflect.Method; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO; +import com.cloud.utils.fsm.FiniteStateObject; +import com.cloud.utils.fsm.NoTransitionException; + + +@Path("/zone/{id}") +public class ZoneEntityImpl implements ZoneEntity, FiniteStateObject { + + + private DataCenterResourceManager manager; + + private EngineDataCenterVO dataCenterVO; + + + public ZoneEntityImpl(String dataCenterId, DataCenterResourceManager manager) { + this.manager = manager; + this.dataCenterVO = this.manager.loadDataCenter(dataCenterId); + } + + @Override + @GET + public String getUuid() { + return dataCenterVO.getUuid(); + } + + @Override + public long getId() { + return dataCenterVO.getId(); + } + + @Override + public boolean enable() { + try { + manager.changeState(this, Event.EnableRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + @Override + public boolean disable() { + try { + manager.changeState(this, Event.DisableRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + @Override + public boolean deactivate() { + try { + manager.changeState(this, Event.DeactivateRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + @Override + public boolean reactivate() { + try { + manager.changeState(this, Event.ActivatedRequest); + } catch (NoTransitionException e) { + return false; + } + return true; + } + + @Override + public String getCurrentState() { + // TODO Auto-generated method stub + return "state"; + } + + @Override + public String getDesiredState() { + // TODO Auto-generated method stub + return "desired_state"; + } + + @Override + public Date getCreatedTime() { + return dataCenterVO.getCreated(); + } + + @Override + public Date getLastUpdatedTime() { + return dataCenterVO.getLastUpdated(); + } + + @Override + public String getOwner() { + return dataCenterVO.getOwner(); + } + + + public void setOwner(String owner) { + dataCenterVO.setOwner(owner); + } + + @Override + public Map getDetails() { + return dataCenterVO.getDetails(); + } + + public void setDetails(Map details) { + dataCenterVO.setDetails(details); + } + + + @Override + public void addDetail(String name, String value) { + dataCenterVO.setDetail(name, value); + } + + @Override + public void delDetail(String name, String value) { + // TODO Auto-generated method stub + } + + @Override + public void updateDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public List getApplicableActions() { + // TODO Auto-generated method stub + return null; + } + + @Override + public State getState() { + return dataCenterVO.getState(); + } + + + @Override + public List listPods() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void setState(State state) { + //use FSM to set state. + } + + @Override + public void persist() { + manager.saveDataCenter(dataCenterVO); + } + + @Override + public String getName() { + return dataCenterVO.getName(); + } + + @Override + public List listPodIds() { + List podIds = new ArrayList(); + podIds.add("pod-uuid-1"); + podIds.add("pod-uuid-2"); + return podIds; + } + + public void setName(String name) { + dataCenterVO.setName(name); + } +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/ClusterDetailsVO.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/ClusterDetailsVO.java new file mode 100644 index 000000000..d735c47dc --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/ClusterDetailsVO.java @@ -0,0 +1,68 @@ +// Copyright 2012 Citrix Systems, Inc. Licensed under the +// Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. Citrix Systems, Inc. +// reserves all rights not expressly granted by 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. +// +// Automatically generated by addcopyright.py at 04/03/2012 +package org.apache.cloudstack.engine.datacenter.entity.api.db; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +@Entity +@Table(name="cluster_details") +public class ClusterDetailsVO { + + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + @Column(name="id") + private long id; + + @Column(name="cluster_id") + private long clusterId; + + @Column(name="name") + private String name; + + @Column(name="value") + private String value; + + protected ClusterDetailsVO() { + } + + public ClusterDetailsVO(long clusterId, String name, String value) { + this.clusterId = clusterId; + this.name = name; + this.value = value; + } + + public long getClusterId() { + return clusterId; + } + + public String getName() { + return name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public long getId() { + return id; + } +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/DcDetailVO.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/DcDetailVO.java new file mode 100644 index 000000000..ef59118ef --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/DcDetailVO.java @@ -0,0 +1,67 @@ +// Copyright 2012 Citrix Systems, Inc. Licensed under the +// Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. Citrix Systems, Inc. +// reserves all rights not expressly granted by 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. +// +// Automatically generated by addcopyright.py at 04/03/2012 +package org.apache.cloudstack.engine.datacenter.entity.api.db; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +@Entity +@Table(name="data_center_details") +public class DcDetailVO { + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + @Column(name="id") + private long id; + + @Column(name="dc_id") + private long dcId; + + @Column(name="name") + private String name; + + @Column(name="value") + private String value; + + protected DcDetailVO() { + } + + public DcDetailVO(long dcId, String name, String value) { + this.dcId = dcId; + this.name = name; + this.value = value; + } + + public long getDcId() { + return dcId; + } + + public String getName() { + return name; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public long getId() { + return id; + } +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineCluster.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineCluster.java new file mode 100644 index 000000000..98b7a991a --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineCluster.java @@ -0,0 +1,23 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api.db; + +import com.cloud.org.Cluster; + +public interface EngineCluster extends Cluster { + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineClusterVO.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineClusterVO.java new file mode 100644 index 000000000..00344198d --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineClusterVO.java @@ -0,0 +1,243 @@ +// Copyright 2012 Citrix Systems, Inc. Licensed under the +// Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. Citrix Systems, Inc. +// reserves all rights not expressly granted by 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. +// +// Automatically generated by addcopyright.py at 04/03/2012 +package org.apache.cloudstack.engine.datacenter.entity.api.db; + +import java.util.Date; +import java.util.UUID; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.org.Cluster; +import com.cloud.org.Grouping; +import com.cloud.org.Managed.ManagedState; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.db.StateMachine; + +@Entity +@Table(name="cluster") +public class EngineClusterVO implements EngineCluster, Identity { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name="id") + long id; + + @Column(name="name") + String name; + + @Column(name="guid") + String guid; + + @Column(name="data_center_id") + long dataCenterId; + + @Column(name="pod_id") + long podId; + + @Column(name="hypervisor_type") + String hypervisorType; + + @Column(name="cluster_type") + @Enumerated(value=EnumType.STRING) + Cluster.ClusterType clusterType; + + @Column(name="allocation_state") + @Enumerated(value=EnumType.STRING) + AllocationState allocationState; + + @Column(name="managed_state") + @Enumerated(value=EnumType.STRING) + ManagedState managedState; + + @Column(name=GenericDao.REMOVED_COLUMN) + private Date removed; + + @Column(name="uuid") + String uuid; + + //orchestration + + @Column(name="owner") + private String owner = null; + + @Column(name=GenericDao.CREATED_COLUMN) + protected Date created; + + @Column(name="lastUpdated", updatable=true) + @Temporal(value=TemporalType.TIMESTAMP) + protected Date lastUpdated; + + /** + * Note that state is intentionally missing the setter. Any updates to + * the state machine needs to go through the DAO object because someone + * else could be updating it as well. + */ + @Enumerated(value=EnumType.STRING) + @StateMachine(state=State.class, event=Event.class) + @Column(name="engine_state", updatable=true, nullable=false, length=32) + protected State engineState = null; + + + public EngineClusterVO() { + clusterType = Cluster.ClusterType.CloudManaged; + allocationState = Grouping.AllocationState.Enabled; + + this.uuid = UUID.randomUUID().toString(); + this.engineState = State.Disabled; + } + + public EngineClusterVO(long dataCenterId, long podId, String name) { + this.dataCenterId = dataCenterId; + this.podId = podId; + this.name = name; + this.clusterType = Cluster.ClusterType.CloudManaged; + this.allocationState = Grouping.AllocationState.Enabled; + this.managedState = ManagedState.Managed; + this.uuid = UUID.randomUUID().toString(); + this.engineState = State.Disabled; + } + + @Override + public long getId() { + return id; + } + + @Override + public String getName() { + return name; + } + + @Override + public long getDataCenterId() { + return dataCenterId; + } + + @Override + public long getPodId() { + return podId; + } + + @Override + public Cluster.ClusterType getClusterType() { + return clusterType; + } + + public void setClusterType(Cluster.ClusterType clusterType) { + this.clusterType = clusterType; + } + + @Override + public AllocationState getAllocationState() { + return allocationState; + } + + public void setAllocationState(AllocationState allocationState) { + this.allocationState = allocationState; + } + + @Override + public ManagedState getManagedState() { + return managedState; + } + + public void setManagedState(ManagedState managedState) { + this.managedState = managedState; + } + + public EngineClusterVO(long clusterId) { + this.id = clusterId; + } + + @Override + public int hashCode() { + return NumbersUtil.hash(id); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof EngineClusterVO)) { + return false; + } + EngineClusterVO that = (EngineClusterVO)obj; + return this.id == that.id; + } + + @Override + public HypervisorType getHypervisorType() { + return HypervisorType.getType(hypervisorType); + } + + public void setHypervisorType(String hy) { + hypervisorType = hy; + } + + public String getGuid() { + return guid; + } + + public void setGuid(String guid) { + this.guid = guid; + } + + public Date getRemoved() { + return removed; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public String getUuid() { + return this.uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public Date getCreated() { + return created; + } + + public Date getLastUpdated() { + return lastUpdated; + } + + public State getState() { + return engineState; + } +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineDataCenter.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineDataCenter.java new file mode 100644 index 000000000..240dddf15 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineDataCenter.java @@ -0,0 +1,23 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api.db; + +import com.cloud.dc.DataCenter; + +public interface EngineDataCenter extends DataCenter { + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineDataCenterVO.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineDataCenterVO.java new file mode 100644 index 000000000..cdf08cc5b --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineDataCenterVO.java @@ -0,0 +1,504 @@ +// Copyright 2012 Citrix Systems, Inc. Licensed under the +// Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. Citrix Systems, Inc. +// reserves all rights not expressly granted by 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. +// +// Automatically generated by addcopyright.py at 04/03/2012 +package org.apache.cloudstack.engine.datacenter.entity.api.db; + +import java.util.Date; +import java.util.Map; +import java.util.UUID; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.TableGenerator; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.Transient; + +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event; + + +import com.cloud.network.Network.Provider; +import com.cloud.org.Grouping; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.db.StateMachine; + +@Entity +@Table(name="data_center") +public class EngineDataCenterVO implements EngineDataCenter, Identity { + + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + @Column(name="id") + private long id; + + @Column(name="name") + private String name = null; + + @Column(name="description") + private String description = null; + + @Column(name="dns1") + private String dns1 = null; + + @Column(name="dns2") + private String dns2 = null; + + @Column(name="ip6Dns1") + private String ip6Dns1 = null; + + @Column(name="ip6Dns2") + private String ip6Dns2 = null; + + @Column(name="internal_dns1") + private String internalDns1 = null; + + @Column(name="internal_dns2") + private String internalDns2 = null; + + @Column(name="router_mac_address", updatable = false, nullable=false) + private String routerMacAddress = "02:00:00:00:00:01"; + + @Column(name="guest_network_cidr") + private String guestNetworkCidr = null; + + @Column(name="domain_id") + private Long domainId = null; + + @Column(name="domain") + private String domain; + + @Column(name="networktype") + @Enumerated(EnumType.STRING) + NetworkType networkType; + + @Column(name="dns_provider") + private String dnsProvider; + + @Column(name="dhcp_provider") + private String dhcpProvider; + + @Column(name="gateway_provider") + private String gatewayProvider; + + @Column(name="vpn_provider") + private String vpnProvider; + + @Column(name="userdata_provider") + private String userDataProvider; + + @Column(name="lb_provider") + private String loadBalancerProvider; + + @Column(name="firewall_provider") + private String firewallProvider; + + @Column(name="mac_address", nullable=false) + @TableGenerator(name="mac_address_sq", table="data_center", pkColumnName="id", valueColumnName="mac_address", allocationSize=1) + private long macAddress = 1; + + @Column(name="zone_token") + private String zoneToken; + + @Column(name=GenericDao.REMOVED_COLUMN) + private Date removed; + + // This is a delayed load value. If the value is null, + // then this field has not been loaded yet. + // Call the dao to load it. + @Transient + Map details; + + @Column(name="allocation_state") + @Enumerated(value=EnumType.STRING) + AllocationState allocationState; + + @Column(name="uuid") + private String uuid; + + @Column(name="is_security_group_enabled") + boolean securityGroupEnabled; + + @Column(name="is_local_storage_enabled") + boolean localStorageEnabled; + + //orchestration + @Column(name="owner") + private String owner = null; + + @Column(name=GenericDao.CREATED_COLUMN) + protected Date created; + + @Column(name="lastUpdated", updatable=true) + @Temporal(value=TemporalType.TIMESTAMP) + protected Date lastUpdated; + + /** + * Note that state is intentionally missing the setter. Any updates to + * the state machine needs to go through the DAO object because someone + * else could be updating it as well. + */ + @Enumerated(value=EnumType.STRING) + @StateMachine(state=State.class, event=Event.class) + @Column(name="engine_state", updatable=true, nullable=false, length=32) + protected State engineState = null; + + + @Override + public String getDnsProvider() { + return dnsProvider; + } + + public void setDnsProvider(String dnsProvider) { + this.dnsProvider = dnsProvider; + } + + @Override + public String getDhcpProvider() { + return dhcpProvider; + } + + public void setDhcpProvider(String dhcpProvider) { + this.dhcpProvider = dhcpProvider; + } + + @Override + public String getGatewayProvider() { + return gatewayProvider; + } + + public void setGatewayProvider(String gatewayProvider) { + this.gatewayProvider = gatewayProvider; + } + + @Override + public String getLoadBalancerProvider() { + return loadBalancerProvider; + } + + public void setLoadBalancerProvider(String loadBalancerProvider) { + this.loadBalancerProvider = loadBalancerProvider; + } + + @Override + public String getFirewallProvider() { + return firewallProvider; + } + + public void setFirewallProvider(String firewallProvider) { + this.firewallProvider = firewallProvider; + } + + public EngineDataCenterVO(long id, String name, String description, String dns1, String dns2, String dns3, String dns4, String guestCidr, String domain, Long domainId, NetworkType zoneType, String zoneToken, String domainSuffix) { + this(name, description, dns1, dns2, dns3, dns4, guestCidr, domain, domainId, zoneType, zoneToken, domainSuffix, false, false, null, null); + this.id = id; + this.allocationState = Grouping.AllocationState.Enabled; + this.uuid = UUID.randomUUID().toString(); + } + + public EngineDataCenterVO(String name, String description, String dns1, String dns2, String dns3, String dns4, String guestCidr, String domain, Long domainId, NetworkType zoneType, String zoneToken, String domainSuffix, boolean securityGroupEnabled, boolean localStorageEnabled, String ip6Dns1, String ip6Dns2) { + this.name = name; + this.description = description; + this.dns1 = dns1; + this.dns2 = dns2; + this.internalDns1 = dns3; + this.internalDns2 = dns4; + this.guestNetworkCidr = guestCidr; + this.domain = domain; + this.domainId = domainId; + this.networkType = zoneType; + this.allocationState = Grouping.AllocationState.Enabled; + this.securityGroupEnabled = securityGroupEnabled; + this.localStorageEnabled = localStorageEnabled; + + if (zoneType == NetworkType.Advanced) { + loadBalancerProvider = Provider.VirtualRouter.getName(); + firewallProvider = Provider.VirtualRouter.getName(); + dhcpProvider = Provider.VirtualRouter.getName(); + dnsProvider = Provider.VirtualRouter.getName(); + gatewayProvider = Provider.VirtualRouter.getName(); + vpnProvider = Provider.VirtualRouter.getName(); + userDataProvider = Provider.VirtualRouter.getName(); + } else if (zoneType == NetworkType.Basic){ + dhcpProvider = Provider.VirtualRouter.getName(); + dnsProvider = Provider.VirtualRouter.getName(); + userDataProvider = Provider.VirtualRouter.getName(); + loadBalancerProvider = Provider.ElasticLoadBalancerVm.getName(); + } + + this.zoneToken = zoneToken; + this.domain = domainSuffix; + this.uuid = UUID.randomUUID().toString(); + this.engineState = State.Disabled; + } + + @Override + public String getVpnProvider() { + return vpnProvider; + } + + public void setVpnProvider(String vpnProvider) { + this.vpnProvider = vpnProvider; + } + + @Override + public String getUserDataProvider() { + return userDataProvider; + } + + public void setUserDataProvider(String userDataProvider) { + this.userDataProvider = userDataProvider; + } + + @Override + public String getGuestNetworkCidr() + { + return guestNetworkCidr; + } + + public void setGuestNetworkCidr(String guestNetworkCidr) + { + this.guestNetworkCidr = guestNetworkCidr; + } + + @Override + public Long getDomainId() { + return domainId; + } + + public void setDomainId(Long domainId) { + this.domainId = domainId; + } + + @Override + public String getDescription() { + return description; + } + + public String getRouterMacAddress() { + return routerMacAddress; + } + + @Override + public String getDns1() { + return dns1; + } + + @Override + public String getDns2() { + return dns2; + } + + @Override + public String getInternalDns1() { + return internalDns1; + } + + @Override + public String getInternalDns2() { + return internalDns2; + } + + protected EngineDataCenterVO() { + } + + @Override + public long getId() { + return id; + } + + @Override + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public void setDns1(String dns1) { + this.dns1 = dns1; + } + + public void setDns2(String dns2) { + this.dns2 = dns2; + } + + public void setInternalDns1(String dns3) { + this.internalDns1 = dns3; + } + + public void setInternalDns2(String dns4) { + this.internalDns2 = dns4; + } + + public void setRouterMacAddress(String routerMacAddress) { + this.routerMacAddress = routerMacAddress; + } + + @Override + public String getDomain() { + return domain; + } + + public void setDomain(String domain) { + this.domain = domain; + } + + public void setNetworkType(NetworkType zoneNetworkType) { + this.networkType = zoneNetworkType; + } + + @Override + public NetworkType getNetworkType() { + return networkType; + } + + @Override + public boolean isSecurityGroupEnabled() { + return securityGroupEnabled; + } + + public void setSecurityGroupEnabled(boolean enabled) { + this.securityGroupEnabled = enabled; + } + + @Override + public boolean isLocalStorageEnabled() { + return localStorageEnabled; + } + + public void setLocalStorageEnabled(boolean enabled) { + this.localStorageEnabled = enabled; + } + + @Override + public Map getDetails() { + return details; + } + + @Override + public void setDetails(Map details2) { + details = details2; + } + + public String getDetail(String name) { + assert (details != null) : "Did you forget to load the details?"; + + return details != null ? details.get(name) : null; + } + + public void setDetail(String name, String value) { + assert (details != null) : "Did you forget to load the details?"; + + details.put(name, value); + } + + @Override + public AllocationState getAllocationState() { + return allocationState; + } + + public void setAllocationState(AllocationState allocationState) { + this.allocationState = allocationState; + } + + @Override + public int hashCode() { + return NumbersUtil.hash(id); + } + + @Override + public boolean equals(Object obj) { + if (!(obj instanceof EngineDataCenterVO)) { + return false; + } + EngineDataCenterVO that = (EngineDataCenterVO)obj; + return this.id == that.id; + } + + @Override + public String getZoneToken() { + return zoneToken; + } + + public void setZoneToken(String zoneToken) { + this.zoneToken = zoneToken; + } + + public Date getRemoved() { + return removed; + } + + @Override + public String getUuid() { + return this.uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public long getMacAddress() { + return macAddress; + } + + public void setMacAddress(long macAddress) { + this.macAddress = macAddress; + } + + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public Date getCreated() { + return created; + } + + public Date getLastUpdated() { + return lastUpdated; + } + + public State getState() { + return engineState; + } + + @Override + public String getIp6Dns1() { + return ip6Dns1; + } + + public void setIp6Dns1(String ip6Dns1) { + this.ip6Dns1 = ip6Dns1; + } + + @Override + public String getIp6Dns2() { + return ip6Dns2; + } + + public void setIp6Dns2(String ip6Dns2) { + this.ip6Dns2 = ip6Dns2; + } +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHost.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHost.java new file mode 100644 index 000000000..127c44570 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHost.java @@ -0,0 +1,24 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api.db; + +import com.cloud.host.Host; + +public interface EngineHost extends Host { + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostPodVO.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostPodVO.java new file mode 100644 index 000000000..65b9db53e --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostPodVO.java @@ -0,0 +1,245 @@ +// Copyright 2012 Citrix Systems, Inc. Licensed under the +// Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. Citrix Systems, Inc. +// reserves all rights not expressly granted by 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. +// +// Automatically generated by addcopyright.py at 04/03/2012 +package org.apache.cloudstack.engine.datacenter.entity.api.db; + +import java.util.Date; +import java.util.UUID; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event; + +import com.cloud.org.Grouping; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.db.StateMachine; + +@Entity +@Table(name = "host_pod_ref") +public class EngineHostPodVO implements EnginePod, Identity { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + long id; + + @Column(name = "name") + private String name = null; + + @Column(name = "data_center_id") + private long dataCenterId; + + @Column(name = "gateway") + private String gateway; + + @Column(name = "cidr_address") + private String cidrAddress; + + @Column(name = "cidr_size") + private int cidrSize; + + @Column(name = "description") + private String description; + + @Column(name="allocation_state") + @Enumerated(value=EnumType.STRING) + AllocationState allocationState; + + @Column(name = "external_dhcp") + private Boolean externalDhcp; + + @Column(name=GenericDao.REMOVED_COLUMN) + private Date removed; + + @Column(name = "uuid") + private String uuid; + + //orchestration + @Column(name="owner") + private String owner = null; + + @Column(name=GenericDao.CREATED_COLUMN) + protected Date created; + + @Column(name="lastUpdated", updatable=true) + @Temporal(value=TemporalType.TIMESTAMP) + protected Date lastUpdated; + + /** + * Note that state is intentionally missing the setter. Any updates to + * the state machine needs to go through the DAO object because someone + * else could be updating it as well. + */ + @Enumerated(value=EnumType.STRING) + @StateMachine(state=State.class, event=Event.class) + @Column(name="engine_state", updatable=true, nullable=false, length=32) + protected State engineState = null; + + public EngineHostPodVO(String name, long dcId, String gateway, String cidrAddress, int cidrSize, String description) { + this.name = name; + this.dataCenterId = dcId; + this.gateway = gateway; + this.cidrAddress = cidrAddress; + this.cidrSize = cidrSize; + this.description = description; + this.allocationState = Grouping.AllocationState.Enabled; + this.externalDhcp = false; + this.uuid = UUID.randomUUID().toString(); + this.engineState = State.Disabled; + } + + /* + * public HostPodVO(String name, long dcId) { this(null, name, dcId); } + */ + protected EngineHostPodVO() { + this.uuid = UUID.randomUUID().toString(); + } + + @Override + public long getId() { + return id; + } + + @Override + public long getDataCenterId() { + return dataCenterId; + } + + public void setDataCenterId(long dataCenterId) { + this.dataCenterId = dataCenterId; + } + + @Override + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + @Override + public String getCidrAddress() { + return cidrAddress; + } + + public void setCidrAddress(String cidrAddress) { + this.cidrAddress = cidrAddress; + } + + @Override + public int getCidrSize() { + return cidrSize; + } + + public void setCidrSize(int cidrSize) { + this.cidrSize = cidrSize; + } + + @Override + public String getGateway() { + return gateway; + } + + public void setGateway(String gateway) { + this.gateway = gateway; + } + + @Override + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + @Override + public AllocationState getAllocationState() { + return allocationState; + } + + public void setAllocationState(AllocationState allocationState) { + this.allocationState = allocationState; + } + + // Use for comparisons only. + public EngineHostPodVO(Long id) { + this.id = id; + } + + @Override + public int hashCode() { + return NumbersUtil.hash(id); + } + + @Override + public boolean getExternalDhcp() { + return externalDhcp; + } + + public void setExternalDhcp(boolean use) { + externalDhcp = use; + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof EngineHostPodVO) { + return id == ((EngineHostPodVO)obj).id; + } else { + return false; + } + } + + public Date getRemoved() { + return removed; + } + + @Override + public String getUuid() { + return this.uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public Date getCreated() { + return created; + } + + public Date getLastUpdated() { + return lastUpdated; + } + + public State getState() { + return engineState; + } +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostVO.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostVO.java new file mode 100644 index 000000000..4b4a56003 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EngineHostVO.java @@ -0,0 +1,778 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api.db; + +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import javax.persistence.Column; +import javax.persistence.DiscriminatorColumn; +import javax.persistence.DiscriminatorType; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Inheritance; +import javax.persistence.InheritanceType; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; +import javax.persistence.Transient; + +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event; + +import com.cloud.host.Status; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.resource.ResourceState; +import com.cloud.storage.Storage.StoragePoolType; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.db.StateMachine; + +@Entity +@Table(name="host") +@Inheritance(strategy=InheritanceType.TABLE_PER_CLASS) +@DiscriminatorColumn(name="type", discriminatorType=DiscriminatorType.STRING, length=32) +public class EngineHostVO implements EngineHost, Identity { + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + @Column(name="id") + private long id; + + @Column(name="disconnected") + @Temporal(value=TemporalType.TIMESTAMP) + private Date disconnectedOn; + + @Column(name="name", nullable=false) + private String name = null; + + /** + * Note: There is no setter for status because it has to be set in the dao code. + */ + @Column(name="status", nullable=false) + private Status status = null; + + @Column(name="type", updatable = true, nullable=false) + @Enumerated(value=EnumType.STRING) + private Type type; + + @Column(name="private_ip_address", nullable=false) + private String privateIpAddress; + + @Column(name="private_mac_address", nullable=false) + private String privateMacAddress; + + @Column(name="private_netmask", nullable=false) + private String privateNetmask; + + @Column(name="public_netmask") + private String publicNetmask; + + @Column(name="public_ip_address") + private String publicIpAddress; + + @Column(name="public_mac_address") + private String publicMacAddress; + + @Column(name="storage_ip_address") + private String storageIpAddress; + + @Column(name="cluster_id") + private Long clusterId; + + @Column(name="storage_netmask") + private String storageNetmask; + + @Column(name="storage_mac_address") + private String storageMacAddress; + + @Column(name="storage_ip_address_2") + private String storageIpAddressDeux; + + @Column(name="storage_netmask_2") + private String storageNetmaskDeux; + + @Column(name="storage_mac_address_2") + private String storageMacAddressDeux; + + @Column(name="hypervisor_type", updatable = true, nullable=false) + @Enumerated(value=EnumType.STRING) + private HypervisorType hypervisorType; + + @Column(name="proxy_port") + private Integer proxyPort; + + @Column(name="resource") + private String resource; + + @Column(name="fs_type") + private StoragePoolType fsType; + + @Column(name="available") + private boolean available = true; + + @Column(name="setup") + private boolean setup = false; + + @Column(name="resource_state", nullable=false) + @Enumerated(value=EnumType.STRING) + private ResourceState resourceState; + + @Column(name="hypervisor_version") + private String hypervisorVersion; + + @Column(name="update_count", updatable = true, nullable=false) + protected long updated; // This field should be updated everytime the state is updated. There's no set method in the vo object because it is done with in the dao code. + + @Column(name="uuid") + private String uuid; + + // This is a delayed load value. If the value is null, + // then this field has not been loaded yet. + // Call host dao to load it. + @Transient + Map details; + + // This is a delayed load value. If the value is null, + // then this field has not been loaded yet. + // Call host dao to load it. + @Transient + List hostTags; + + @Override + public String getStorageIpAddressDeux() { + return storageIpAddressDeux; + } + + public void setStorageIpAddressDeux(String deuxStorageIpAddress) { + this.storageIpAddressDeux = deuxStorageIpAddress; + } + + @Override + public String getStorageNetmaskDeux() { + return storageNetmaskDeux; + } + + @Override + public Long getClusterId() { + return clusterId; + } + + public void setClusterId(Long clusterId) { + this.clusterId = clusterId; + } + + public void setStorageNetmaskDeux(String deuxStorageNetmask) { + this.storageNetmaskDeux = deuxStorageNetmask; + } + + @Override + public String getStorageMacAddressDeux() { + return storageMacAddressDeux; + } + + public void setStorageMacAddressDeux(String duexStorageMacAddress) { + this.storageMacAddressDeux = duexStorageMacAddress; + } + + @Override + public String getPrivateMacAddress() { + return privateMacAddress; + } + + public void setPrivateMacAddress(String privateMacAddress) { + this.privateMacAddress = privateMacAddress; + } + + public boolean isAvailable() { + return available; + } + + public void setAvailable(boolean available) { + this.available = available; + } + + @Override + public String getPrivateNetmask() { + return privateNetmask; + } + + public void setPrivateNetmask(String privateNetmask) { + this.privateNetmask = privateNetmask; + } + + @Override + public String getPublicNetmask() { + return publicNetmask; + } + + public void setPublicNetmask(String publicNetmask) { + this.publicNetmask = publicNetmask; + } + + @Override + public String getPublicIpAddress() { + return publicIpAddress; + } + + public void setPublicIpAddress(String publicIpAddress) { + this.publicIpAddress = publicIpAddress; + } + + @Override + public String getPublicMacAddress() { + return publicMacAddress; + } + + public void setPublicMacAddress(String publicMacAddress) { + this.publicMacAddress = publicMacAddress; + } + + @Override + public String getStorageIpAddress() { + return storageIpAddress; + } + + public void setStorageIpAddress(String storageIpAddress) { + this.storageIpAddress = storageIpAddress; + } + + @Override + public String getStorageNetmask() { + return storageNetmask; + } + + public void setStorageNetmask(String storageNetmask) { + this.storageNetmask = storageNetmask; + } + + @Override + public String getStorageMacAddress() { + return storageMacAddress; + } + + public boolean isSetup() { + return setup; + } + + public void setSetup(boolean setup) { + this.setup = setup; + } + + public void setStorageMacAddress(String storageMacAddress) { + this.storageMacAddress = storageMacAddress; + } + + public String getResource() { + return resource; + } + + public void setResource(String resource) { + this.resource = resource; + } + + public Map getDetails() { + return details; + } + + public String getDetail(String name) { + assert (details != null) : "Did you forget to load the details?"; + + return details != null ? details.get(name) : null; + } + + public void setDetail(String name, String value) { + assert (details != null) : "Did you forget to load the details?"; + + details.put(name, value); + } + + public void setDetails(Map details) { + this.details = details; + } + + public List getHostTags() { + return hostTags; + } + + public void setHostTags(List hostTags) { + this.hostTags = hostTags; + } + + @Column(name="data_center_id", nullable=false) + private long dataCenterId; + + @Column(name="pod_id") + private Long podId; + + @Column(name="cpus") + private Integer cpus; + + @Column(name="url") + private String storageUrl; + + @Column(name="speed") + private Long speed; + + @Column(name="ram") + private long totalMemory; + + @Column(name="parent", nullable=false) + private String parent; + + @Column(name="guid", updatable=true, nullable=false) + private String guid; + + @Column(name="capabilities") + private String caps; + + @Column(name="total_size") + private Long totalSize; + + @Column(name="last_ping") + private long lastPinged; + + @Column(name="mgmt_server_id") + private Long managementServerId; + + @Column(name="dom0_memory") + private long dom0MinMemory; + + @Column(name="version") + private String version; + + @Column(name=GenericDao.CREATED_COLUMN) + private Date created; + + @Column(name=GenericDao.REMOVED_COLUMN) + private Date removed; + + //orchestration + @Column(name="owner") + private String owner = null; + + @Column(name="lastUpdated", updatable=true) + @Temporal(value=TemporalType.TIMESTAMP) + protected Date lastUpdated; + + /** + * Note that state is intentionally missing the setter. Any updates to + * the state machine needs to go through the DAO object because someone + * else could be updating it as well. + */ + @Enumerated(value=EnumType.STRING) + @StateMachine(state=State.class, event=Event.class) + @Column(name="engine_state", updatable=true, nullable=false, length=32) + protected State engineState = null; + + + public EngineHostVO(String guid) { + this.guid = guid; + this.status = Status.Creating; + this.totalMemory = 0; + this.dom0MinMemory = 0; + this.resourceState = ResourceState.Creating; + this.uuid = UUID.randomUUID().toString(); + this.engineState = State.Disabled; + } + + protected EngineHostVO() { + this.uuid = UUID.randomUUID().toString(); + this.engineState = State.Disabled; + } + + public EngineHostVO(long id, + String name, + Type type, + String privateIpAddress, + String privateNetmask, + String privateMacAddress, + String publicIpAddress, + String publicNetmask, + String publicMacAddress, + String storageIpAddress, + String storageNetmask, + String storageMacAddress, + String deuxStorageIpAddress, + String duxStorageNetmask, + String deuxStorageMacAddress, + String guid, + Status status, + String version, + String iqn, + Date disconnectedOn, + long dcId, + Long podId, + long serverId, + long ping, + String parent, + long totalSize, + StoragePoolType fsType) { + this(id, name, type, privateIpAddress, privateNetmask, privateMacAddress, publicIpAddress, publicNetmask, publicMacAddress, storageIpAddress, storageNetmask, storageMacAddress, guid, status, version, iqn, disconnectedOn, dcId, podId, serverId, ping, null, null, null, 0, null); + this.parent = parent; + this.totalSize = totalSize; + this.fsType = fsType; + this.uuid = UUID.randomUUID().toString(); + this.engineState = State.Disabled; + } + + public EngineHostVO(long id, + String name, + Type type, + String privateIpAddress, + String privateNetmask, + String privateMacAddress, + String publicIpAddress, + String publicNetmask, + String publicMacAddress, + String storageIpAddress, + String storageNetmask, + String storageMacAddress, + String guid, + Status status, + String version, + String url, + Date disconnectedOn, + long dcId, + Long podId, + long serverId, + long ping, + Integer cpus, + Long speed, + Long totalMemory, + long dom0MinMemory, + String caps) { + this.id = id; + this.name = name; + this.status = status; + this.type = type; + this.privateIpAddress = privateIpAddress; + this.privateNetmask = privateNetmask; + this.privateMacAddress = privateMacAddress; + this.publicIpAddress = publicIpAddress; + this.publicNetmask = publicNetmask; + this.publicMacAddress = publicMacAddress; + this.storageIpAddress = storageIpAddress; + this.storageNetmask = storageNetmask; + this.storageMacAddress = storageMacAddress; + this.dataCenterId = dcId; + this.podId = podId; + this.cpus = cpus; + this.version = version; + this.speed = speed; + this.totalMemory = totalMemory != null ? totalMemory : 0; + this.guid = guid; + this.parent = null; + this.totalSize = null; + this.fsType = null; + this.managementServerId = serverId; + this.lastPinged = ping; + this.caps = caps; + this.disconnectedOn = disconnectedOn; + this.dom0MinMemory = dom0MinMemory; + this.storageUrl = url; + this.uuid = UUID.randomUUID().toString(); + this.engineState = State.Disabled; + } + + public void setPodId(Long podId) { + + this.podId = podId; + } + + public void setDataCenterId(long dcId) { + this.dataCenterId = dcId; + } + + public void setVersion(String version) { + this.version = version; + } + + public void setStorageUrl(String url) { + this.storageUrl = url; + } + + public void setDisconnectedOn(Date disconnectedOn) { + this.disconnectedOn = disconnectedOn; + } + + public String getStorageUrl() { + return storageUrl; + } + + public void setName(String name) { + this.name = name; + } + + public void setPrivateIpAddress(String ipAddress) { + this.privateIpAddress = ipAddress; + } + + public void setCpus(Integer cpus) { + this.cpus = cpus; + } + + public void setSpeed(Long speed) { + this.speed = speed; + } + + public void setTotalMemory(long totalMemory) { + this.totalMemory = totalMemory; + } + + public void setParent(String parent) { + this.parent = parent; + } + + public void setCaps(String caps) { + this.caps = caps; + } + + public void setTotalSize(Long totalSize) { + this.totalSize = totalSize; + } + + public void setLastPinged(long lastPinged) { + this.lastPinged = lastPinged; + } + + public void setManagementServerId(Long managementServerId) { + this.managementServerId = managementServerId; + } + + @Override + public long getLastPinged() { + return lastPinged; + } + + @Override + public String getParent() { + return parent; + } + + @Override + public long getTotalSize() { + return totalSize; + } + + @Override + public String getCapabilities() { + return caps; + } + + @Override + public Date getCreated() { + return created; + } + + @Override + public Date getRemoved() { + return removed; + } + + @Override + public String getVersion() { + return version; + } + + public void setType(Type type) { + this.type = type; + } + + @Override + public long getId() { + return id; + } + + @Override + public String getName() { + return name; + } + + @Override + public Status getStatus() { + return status; + } + + @Override + public long getDataCenterId() { + return dataCenterId; + } + + @Override + public Long getPodId() { + return podId; + } + + @Override + public Long getManagementServerId() { + return managementServerId; + } + + @Override + public Date getDisconnectedOn() { + return disconnectedOn; + } + + @Override + public String getPrivateIpAddress() { + return privateIpAddress; + } + + @Override + public String getGuid() { + return guid; + } + + public void setGuid(String guid) { + this.guid = guid; + } + + @Override + public Integer getCpus() { + return cpus; + } + + @Override + public Long getSpeed() { + return speed; + } + + @Override + public Long getTotalMemory() { + return totalMemory; + } + + @Override + public Integer getProxyPort() { + return proxyPort; + } + + public void setProxyPort(Integer port) { + proxyPort = port; + } + + public StoragePoolType getFsType() { + return fsType; + } + + @Override + public Type getType() { + return type; + } + + @Override + public int hashCode() { + return NumbersUtil.hash(id); + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof EngineHostVO) { + return ((EngineHostVO)obj).getId() == this.getId(); + } else { + return false; + } + } + + @Override + public String toString() { + return new StringBuilder("Host[").append("-").append(id).append("-").append(type).append("]").toString(); + } + + public void setHypervisorType(HypervisorType hypervisorType) { + this.hypervisorType = hypervisorType; + } + + @Override + public HypervisorType getHypervisorType() { + return hypervisorType; + } + + public void setHypervisorVersion(String hypervisorVersion) { + this.hypervisorVersion = hypervisorVersion; + } + + @Override + public String getHypervisorVersion() { + return hypervisorVersion; + } + + @Override + + // TODO, I tempoerary disable it as it breaks GenericSearchBuild when @Transient is applied + // @Transient + public Status getState() { + return status; + } + + @Override + public ResourceState getResourceState() { + return resourceState; + } + + public void setResourceState(ResourceState state) { + resourceState = state; + } + + @Override + public boolean isInMaintenanceStates() { + return (getResourceState() == ResourceState.Maintenance || getResourceState() == ResourceState.ErrorInMaintenance + || getResourceState() == ResourceState.PrepareForMaintenance); + } + + public long getUpdated() { + return updated; + } + + public long incrUpdated() { + updated++; + return updated; + } + + @Override + public String getUuid() { + return this.uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + + public Date getLastUpdated() { + return lastUpdated; + } + + public State getOrchestrationState() { + return engineState; + } +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EnginePod.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EnginePod.java new file mode 100644 index 000000000..2adbca36a --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/EnginePod.java @@ -0,0 +1,23 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api.db; + +import com.cloud.dc.Pod; + +public interface EnginePod extends Pod { + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/DcDetailsDao.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/DcDetailsDao.java new file mode 100644 index 000000000..ef1b3a0a5 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/DcDetailsDao.java @@ -0,0 +1,29 @@ +// Copyright 2012 Citrix Systems, Inc. Licensed under the +// Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. Citrix Systems, Inc. +// reserves all rights not expressly granted by 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. +// +// Automatically generated by addcopyright.py at 04/03/2012 +package org.apache.cloudstack.engine.datacenter.entity.api.db.dao; + +import java.util.Map; + +import org.apache.cloudstack.engine.datacenter.entity.api.db.DcDetailVO; + +import com.cloud.utils.db.GenericDao; + +public interface DcDetailsDao extends GenericDao { + Map findDetails(long dcId); + + void persist(long dcId, Map details); + + DcDetailVO findDetail(long dcId, String name); + + void deleteDetails(long dcId); +} \ No newline at end of file diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/DcDetailsDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/DcDetailsDaoImpl.java new file mode 100644 index 000000000..60eec4cf9 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/DcDetailsDaoImpl.java @@ -0,0 +1,94 @@ +// Copyright 2012 Citrix Systems, Inc. Licensed under the +// Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. Citrix Systems, Inc. +// reserves all rights not expressly granted by 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. +// +// Automatically generated by addcopyright.py at 04/03/2012 +package org.apache.cloudstack.engine.datacenter.entity.api.db.dao; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.ejb.Local; + +import org.apache.cloudstack.engine.datacenter.entity.api.db.DcDetailVO; +import org.springframework.stereotype.Component; + + +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.Transaction; + +@Component(value="EngineDcDetailsDao") +@Local(value=DcDetailsDao.class) +public class DcDetailsDaoImpl extends GenericDaoBase implements DcDetailsDao { + protected final SearchBuilder DcSearch; + protected final SearchBuilder DetailSearch; + + protected DcDetailsDaoImpl() { + DcSearch = createSearchBuilder(); + DcSearch.and("dcId", DcSearch.entity().getDcId(), SearchCriteria.Op.EQ); + DcSearch.done(); + + DetailSearch = createSearchBuilder(); + DetailSearch.and("dcId", DetailSearch.entity().getDcId(), SearchCriteria.Op.EQ); + DetailSearch.and("name", DetailSearch.entity().getName(), SearchCriteria.Op.EQ); + DetailSearch.done(); + } + + @Override + public DcDetailVO findDetail(long dcId, String name) { + SearchCriteria sc = DetailSearch.create(); + sc.setParameters("dcId", dcId); + sc.setParameters("name", name); + + return findOneIncludingRemovedBy(sc); + } + + @Override + public Map findDetails(long dcId) { + SearchCriteria sc = DcSearch.create(); + sc.setParameters("dcId", dcId); + + List results = search(sc, null); + Map details = new HashMap(results.size()); + for (DcDetailVO result : results) { + details.put(result.getName(), result.getValue()); + } + return details; + } + + @Override + public void deleteDetails(long dcId) { + SearchCriteria sc = DcSearch.create(); + sc.setParameters("dcId", dcId); + + List results = search(sc, null); + for (DcDetailVO result : results) { + remove(result.getId()); + } + } + + @Override + public void persist(long dcId, Map details) { + Transaction txn = Transaction.currentTxn(); + txn.start(); + SearchCriteria sc = DcSearch.create(); + sc.setParameters("dcId", dcId); + expunge(sc); + + for (Map.Entry detail : details.entrySet()) { + DcDetailVO vo = new DcDetailVO(dcId, detail.getKey(), detail.getValue()); + persist(vo); + } + txn.commit(); + } +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineClusterDao.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineClusterDao.java new file mode 100644 index 000000000..af1b1536e --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineClusterDao.java @@ -0,0 +1,37 @@ +// Copyright 2012 Citrix Systems, Inc. Licensed under the +// Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. Citrix Systems, Inc. +// reserves all rights not expressly granted by 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. +// +// Automatically generated by addcopyright.py at 04/03/2012 +package org.apache.cloudstack.engine.datacenter.entity.api.db.dao; + +import java.util.List; +import java.util.Map; + +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineClusterVO; + + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.fsm.StateDao; + +public interface EngineClusterDao extends GenericDao, StateDao { + List listByPodId(long podId); + EngineClusterVO findBy(String name, long podId); + List listByHyTypeWithoutGuid(String hyType); + List listByZoneId(long zoneId); + + List getAvailableHypervisorInZone(Long zoneId); + List listByDcHyType(long dcId, String hyType); + Map> getPodClusterIdMap(List clusterIds); + List listDisabledClusters(long zoneId, Long podId); + List listClustersWithDisabledPods(long zoneId); +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineClusterDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineClusterDaoImpl.java new file mode 100644 index 000000000..1f0bd4d84 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineClusterDaoImpl.java @@ -0,0 +1,288 @@ +// Copyright 2012 Citrix Systems, Inc. Licensed under the +// Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. Citrix Systems, Inc. +// reserves all rights not expressly granted by 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. +// +// Automatically generated by addcopyright.py at 04/03/2012 +package org.apache.cloudstack.engine.datacenter.entity.api.db.dao; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.ejb.Local; +import javax.inject.Inject; + +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineClusterVO; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.org.Grouping; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.GenericSearchBuilder; +import com.cloud.utils.db.JoinBuilder; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.SearchCriteria.Func; +import com.cloud.utils.db.SearchCriteria.Op; +import com.cloud.utils.db.Transaction; +import com.cloud.utils.db.UpdateBuilder; +import com.cloud.utils.exception.CloudRuntimeException; + +@Component(value="EngineClusterDao") +@Local(value=EngineClusterDao.class) +public class EngineClusterDaoImpl extends GenericDaoBase implements EngineClusterDao { + private static final Logger s_logger = Logger.getLogger(EngineClusterDaoImpl.class); + + protected final SearchBuilder PodSearch; + protected final SearchBuilder HyTypeWithoutGuidSearch; + protected final SearchBuilder AvailHyperSearch; + protected final SearchBuilder ZoneSearch; + protected final SearchBuilder ZoneHyTypeSearch; + protected SearchBuilder StateChangeSearch; + protected SearchBuilder UUIDSearch; + + private static final String GET_POD_CLUSTER_MAP_PREFIX = "SELECT pod_id, id FROM cloud.cluster WHERE cluster.id IN( "; + private static final String GET_POD_CLUSTER_MAP_SUFFIX = " )"; + + @Inject protected EngineHostPodDao _hostPodDao; + + protected EngineClusterDaoImpl() { + super(); + + HyTypeWithoutGuidSearch = createSearchBuilder(); + HyTypeWithoutGuidSearch.and("hypervisorType", HyTypeWithoutGuidSearch.entity().getHypervisorType(), SearchCriteria.Op.EQ); + HyTypeWithoutGuidSearch.and("guid", HyTypeWithoutGuidSearch.entity().getGuid(), SearchCriteria.Op.NULL); + HyTypeWithoutGuidSearch.done(); + + ZoneHyTypeSearch = createSearchBuilder(); + ZoneHyTypeSearch.and("hypervisorType", ZoneHyTypeSearch.entity().getHypervisorType(), SearchCriteria.Op.EQ); + ZoneHyTypeSearch.and("dataCenterId", ZoneHyTypeSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + ZoneHyTypeSearch.done(); + + PodSearch = createSearchBuilder(); + PodSearch.and("pod", PodSearch.entity().getPodId(), SearchCriteria.Op.EQ); + PodSearch.and("name", PodSearch.entity().getName(), SearchCriteria.Op.EQ); + PodSearch.done(); + + ZoneSearch = createSearchBuilder(); + ZoneSearch.and("dataCenterId", ZoneSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + ZoneSearch.groupBy(ZoneSearch.entity().getHypervisorType()); + ZoneSearch.done(); + + AvailHyperSearch = createSearchBuilder(); + AvailHyperSearch.and("zoneId", AvailHyperSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + AvailHyperSearch.select(null, Func.DISTINCT, AvailHyperSearch.entity().getHypervisorType()); + AvailHyperSearch.done(); + + UUIDSearch = createSearchBuilder(); + UUIDSearch.and("uuid", UUIDSearch.entity().getUuid(), SearchCriteria.Op.EQ); + UUIDSearch.done(); + + StateChangeSearch = createSearchBuilder(); + StateChangeSearch.and("id", StateChangeSearch.entity().getId(), SearchCriteria.Op.EQ); + StateChangeSearch.and("state", StateChangeSearch.entity().getState(), SearchCriteria.Op.EQ); + StateChangeSearch.done(); + } + + @Override + public List listByZoneId(long zoneId) { + SearchCriteria sc = ZoneSearch.create(); + sc.setParameters("dataCenterId", zoneId); + return listBy(sc); + } + + @Override + public List listByPodId(long podId) { + SearchCriteria sc = PodSearch.create(); + sc.setParameters("pod", podId); + + return listBy(sc); + } + + @Override + public EngineClusterVO findBy(String name, long podId) { + SearchCriteria sc = PodSearch.create(); + sc.setParameters("pod", podId); + sc.setParameters("name", name); + + return findOneBy(sc); + } + + @Override + public List listByHyTypeWithoutGuid(String hyType) { + SearchCriteria sc = HyTypeWithoutGuidSearch.create(); + sc.setParameters("hypervisorType", hyType); + + return listBy(sc); + } + + @Override + public List listByDcHyType(long dcId, String hyType) { + SearchCriteria sc = ZoneHyTypeSearch.create(); + sc.setParameters("dataCenterId", dcId); + sc.setParameters("hypervisorType", hyType); + return listBy(sc); + } + + @Override + public List getAvailableHypervisorInZone(Long zoneId) { + SearchCriteria sc = AvailHyperSearch.create(); + if (zoneId != null) { + sc.setParameters("zoneId", zoneId); + } + List clusters = listBy(sc); + List hypers = new ArrayList(4); + for (EngineClusterVO cluster : clusters) { + hypers.add(cluster.getHypervisorType()); + } + + return hypers; + } + + @Override + public Map> getPodClusterIdMap(List clusterIds){ + Transaction txn = Transaction.currentTxn(); + PreparedStatement pstmt = null; + Map> result = new HashMap>(); + + try { + StringBuilder sql = new StringBuilder(GET_POD_CLUSTER_MAP_PREFIX); + if (clusterIds.size() > 0) { + for (Long clusterId : clusterIds) { + sql.append(clusterId).append(","); + } + sql.delete(sql.length()-1, sql.length()); + sql.append(GET_POD_CLUSTER_MAP_SUFFIX); + } + + pstmt = txn.prepareAutoCloseStatement(sql.toString()); + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) { + Long podId = rs.getLong(1); + Long clusterIdInPod = rs.getLong(2); + if(result.containsKey(podId)){ + List clusterList = result.get(podId); + clusterList.add(clusterIdInPod); + result.put(podId, clusterList); + }else{ + List clusterList = new ArrayList(); + clusterList.add(clusterIdInPod); + result.put(podId, clusterList); + } + } + return result; + } catch (SQLException e) { + throw new CloudRuntimeException("DB Exception on: " + GET_POD_CLUSTER_MAP_PREFIX, e); + } catch (Throwable e) { + throw new CloudRuntimeException("Caught: " + GET_POD_CLUSTER_MAP_PREFIX, e); + } + } + + @Override + public List listDisabledClusters(long zoneId, Long podId) { + GenericSearchBuilder clusterIdSearch = createSearchBuilder(Long.class); + clusterIdSearch.selectField(clusterIdSearch.entity().getId()); + clusterIdSearch.and("dataCenterId", clusterIdSearch.entity().getDataCenterId(), Op.EQ); + if(podId != null){ + clusterIdSearch.and("podId", clusterIdSearch.entity().getPodId(), Op.EQ); + } + clusterIdSearch.and("allocationState", clusterIdSearch.entity().getAllocationState(), Op.EQ); + clusterIdSearch.done(); + + + SearchCriteria sc = clusterIdSearch.create(); + sc.addAnd("dataCenterId", SearchCriteria.Op.EQ, zoneId); + if (podId != null) { + sc.addAnd("podId", SearchCriteria.Op.EQ, podId); + } + sc.addAnd("allocationState", SearchCriteria.Op.EQ, Grouping.AllocationState.Disabled); + return customSearch(sc, null); + } + + @Override + public List listClustersWithDisabledPods(long zoneId) { + + GenericSearchBuilder disabledPodIdSearch = _hostPodDao.createSearchBuilder(Long.class); + disabledPodIdSearch.selectField(disabledPodIdSearch.entity().getId()); + disabledPodIdSearch.and("dataCenterId", disabledPodIdSearch.entity().getDataCenterId(), Op.EQ); + disabledPodIdSearch.and("allocationState", disabledPodIdSearch.entity().getAllocationState(), Op.EQ); + + GenericSearchBuilder clusterIdSearch = createSearchBuilder(Long.class); + clusterIdSearch.selectField(clusterIdSearch.entity().getId()); + clusterIdSearch.join("disabledPodIdSearch", disabledPodIdSearch, clusterIdSearch.entity().getPodId(), disabledPodIdSearch.entity().getId(), JoinBuilder.JoinType.INNER); + clusterIdSearch.done(); + + + SearchCriteria sc = clusterIdSearch.create(); + sc.setJoinParameters("disabledPodIdSearch", "dataCenterId", zoneId); + sc.setJoinParameters("disabledPodIdSearch", "allocationState", Grouping.AllocationState.Disabled); + + return customSearch(sc, null); + } + + @Override + public boolean remove(Long id) { + Transaction txn = Transaction.currentTxn(); + txn.start(); + EngineClusterVO cluster = createForUpdate(); + cluster.setName(null); + cluster.setGuid(null); + + update(id, cluster); + + boolean result = super.remove(id); + txn.commit(); + return result; + } + + @Override + public boolean updateState(State currentState, Event event, State nextState, DataCenterResourceEntity clusterEntity, Object data) { + + EngineClusterVO vo = findById(clusterEntity.getId()); + + Date oldUpdatedTime = vo.getLastUpdated(); + + SearchCriteria sc = StateChangeSearch.create(); + sc.setParameters("id", vo.getId()); + sc.setParameters("state", currentState); + + UpdateBuilder builder = getUpdateBuilder(vo); + builder.set(vo, "state", nextState); + builder.set(vo, "lastUpdated", new Date()); + + int rows = update(vo, sc); + + if (rows == 0 && s_logger.isDebugEnabled()) { + EngineClusterVO dbCluster = findByIdIncludingRemoved(vo.getId()); + if (dbCluster != null) { + StringBuilder str = new StringBuilder("Unable to update ").append(vo.toString()); + str.append(": DB Data={id=").append(dbCluster.getId()).append("; state=").append(dbCluster.getState()).append(";updatedTime=") + .append(dbCluster.getLastUpdated()); + str.append(": New Data={id=").append(vo.getId()).append("; state=").append(nextState).append("; event=").append(event).append("; updatedTime=").append(vo.getLastUpdated()); + str.append(": stale Data={id=").append(vo.getId()).append("; state=").append(currentState).append("; event=").append(event).append("; updatedTime=").append(oldUpdatedTime); + } else { + s_logger.debug("Unable to update dataCenter: id=" + vo.getId() + ", as there is no such dataCenter exists in the database anymore"); + } + } + return rows > 0; + + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineDataCenterDao.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineDataCenterDao.java new file mode 100644 index 000000000..83060cfee --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineDataCenterDao.java @@ -0,0 +1,54 @@ +// Copyright 2012 Citrix Systems, Inc. Licensed under the +// Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. Citrix Systems, Inc. +// reserves all rights not expressly granted by 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. +// +// Automatically generated by addcopyright.py at 04/03/2012 +package org.apache.cloudstack.engine.datacenter.entity.api.db.dao; + +import java.util.List; + +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO; + + +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.fsm.StateDao; + + +public interface EngineDataCenterDao extends GenericDao, StateDao { + EngineDataCenterVO findByName(String name); + + /** + * @param id data center id + * @return a pair of mac address strings. The first one is private and second is public. + */ + String[] getNextAvailableMacAddressPair(long id); + String[] getNextAvailableMacAddressPair(long id, long mask); + List findZonesByDomainId(Long domainId); + + List listPublicZones(String keyword); + + List findChildZones(Object[] ids, String keyword); + + void loadDetails(EngineDataCenterVO zone); + void saveDetails(EngineDataCenterVO zone); + + List listDisabledZones(); + List listEnabledZones(); + EngineDataCenterVO findByToken(String zoneToken); + EngineDataCenterVO findByTokenOrIdOrName(String tokenIdOrName); + + + + List findZonesByDomainId(Long domainId, String keyword); + + List findByKeyword(String keyword); + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineDataCenterDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineDataCenterDaoImpl.java new file mode 100644 index 000000000..f99bc6c0c --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineDataCenterDaoImpl.java @@ -0,0 +1,327 @@ +// Copyright 2012 Citrix Systems, Inc. Licensed under the +// Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. Citrix Systems, Inc. +// reserves all rights not expressly granted by 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. +// +// Automatically generated by addcopyright.py at 04/03/2012 +package org.apache.cloudstack.engine.datacenter.entity.api.db.dao; + +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.Random; + +import javax.ejb.Local; +import javax.inject.Inject; +import javax.naming.ConfigurationException; +import javax.persistence.TableGenerator; + +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.org.Grouping; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.SequenceFetcher; +import com.cloud.utils.db.Transaction; +import com.cloud.utils.db.UpdateBuilder; +import com.cloud.utils.net.NetUtils; + +/** + * @config + * {@table + * || Param Name | Description | Values | Default || + * || mac.address.prefix | prefix to attach to all public and private mac addresses | number | 06 || + * } + **/ +@Component(value="EngineDataCenterDao") +@Local(value={EngineDataCenterDao.class}) +public class EngineDataCenterDaoImpl extends GenericDaoBase implements EngineDataCenterDao { + private static final Logger s_logger = Logger.getLogger(EngineDataCenterDaoImpl.class); + + protected SearchBuilder NameSearch; + protected SearchBuilder ListZonesByDomainIdSearch; + protected SearchBuilder PublicZonesSearch; + protected SearchBuilder ChildZonesSearch; + protected SearchBuilder DisabledZonesSearch; + protected SearchBuilder TokenSearch; + protected SearchBuilder StateChangeSearch; + protected SearchBuilder UUIDSearch; + + protected long _prefix; + protected Random _rand = new Random(System.currentTimeMillis()); + protected TableGenerator _tgMacAddress; + + @Inject protected DcDetailsDao _detailsDao; + + + @Override + public EngineDataCenterVO findByName(String name) { + SearchCriteria sc = NameSearch.create(); + sc.setParameters("name", name); + return findOneBy(sc); + } + + + @Override + public EngineDataCenterVO findByToken(String zoneToken){ + SearchCriteria sc = TokenSearch.create(); + sc.setParameters("zoneToken", zoneToken); + return findOneBy(sc); + } + + @Override + public List findZonesByDomainId(Long domainId){ + SearchCriteria sc = ListZonesByDomainIdSearch.create(); + sc.setParameters("domainId", domainId); + return listBy(sc); + } + + @Override + public List findZonesByDomainId(Long domainId, String keyword){ + SearchCriteria sc = ListZonesByDomainIdSearch.create(); + sc.setParameters("domainId", domainId); + if (keyword != null) { + SearchCriteria ssc = createSearchCriteria(); + ssc.addOr("name", SearchCriteria.Op.LIKE, "%" + keyword + "%"); + ssc.addOr("description", SearchCriteria.Op.LIKE, "%" + keyword + "%"); + sc.addAnd("name", SearchCriteria.Op.SC, ssc); + } + return listBy(sc); + } + + @Override + public List findChildZones(Object[] ids, String keyword){ + SearchCriteria sc = ChildZonesSearch.create(); + sc.setParameters("domainid", ids); + if (keyword != null) { + SearchCriteria ssc = createSearchCriteria(); + ssc.addOr("name", SearchCriteria.Op.LIKE, "%" + keyword + "%"); + ssc.addOr("description", SearchCriteria.Op.LIKE, "%" + keyword + "%"); + sc.addAnd("name", SearchCriteria.Op.SC, ssc); + } + return listBy(sc); + } + + @Override + public List listPublicZones(String keyword){ + SearchCriteria sc = PublicZonesSearch.create(); + if (keyword != null) { + SearchCriteria ssc = createSearchCriteria(); + ssc.addOr("name", SearchCriteria.Op.LIKE, "%" + keyword + "%"); + ssc.addOr("description", SearchCriteria.Op.LIKE, "%" + keyword + "%"); + sc.addAnd("name", SearchCriteria.Op.SC, ssc); + } + //sc.setParameters("domainId", domainId); + return listBy(sc); + } + + @Override + public List findByKeyword(String keyword){ + SearchCriteria ssc = createSearchCriteria(); + ssc.addOr("name", SearchCriteria.Op.LIKE, "%" + keyword + "%"); + ssc.addOr("description", SearchCriteria.Op.LIKE, "%" + keyword + "%"); + return listBy(ssc); + } + + + @Override + public String[] getNextAvailableMacAddressPair(long id) { + return getNextAvailableMacAddressPair(id, 0); + } + + @Override + public String[] getNextAvailableMacAddressPair(long id, long mask) { + SequenceFetcher fetch = SequenceFetcher.getInstance(); + + long seq = fetch.getNextSequence(Long.class, _tgMacAddress, id); + seq = seq | _prefix | ((id & 0x7f) << 32); + seq |= mask; + seq |= ((_rand.nextInt(Short.MAX_VALUE) << 16) & 0x00000000ffff0000l); + String[] pair = new String[2]; + pair[0] = NetUtils.long2Mac(seq); + pair[1] = NetUtils.long2Mac(seq | 0x1l << 39); + return pair; + } + + + @Override + public boolean configure(String name, Map params) throws ConfigurationException { + if (!super.configure(name, params)) { + return false; + } + + String value = (String)params.get("mac.address.prefix"); + _prefix = (long)NumbersUtil.parseInt(value, 06) << 40; + + return true; + } + + protected EngineDataCenterDaoImpl() { + super(); + NameSearch = createSearchBuilder(); + NameSearch.and("name", NameSearch.entity().getName(), SearchCriteria.Op.EQ); + NameSearch.done(); + + ListZonesByDomainIdSearch = createSearchBuilder(); + ListZonesByDomainIdSearch.and("domainId", ListZonesByDomainIdSearch.entity().getDomainId(), SearchCriteria.Op.EQ); + ListZonesByDomainIdSearch.done(); + + PublicZonesSearch = createSearchBuilder(); + PublicZonesSearch.and("domainId", PublicZonesSearch.entity().getDomainId(), SearchCriteria.Op.NULL); + PublicZonesSearch.done(); + + ChildZonesSearch = createSearchBuilder(); + ChildZonesSearch.and("domainid", ChildZonesSearch.entity().getDomainId(), SearchCriteria.Op.IN); + ChildZonesSearch.done(); + + DisabledZonesSearch = createSearchBuilder(); + DisabledZonesSearch.and("allocationState", DisabledZonesSearch.entity().getAllocationState(), SearchCriteria.Op.EQ); + DisabledZonesSearch.done(); + + TokenSearch = createSearchBuilder(); + TokenSearch.and("zoneToken", TokenSearch.entity().getZoneToken(), SearchCriteria.Op.EQ); + TokenSearch.done(); + + StateChangeSearch = createSearchBuilder(); + StateChangeSearch.and("id", StateChangeSearch.entity().getId(), SearchCriteria.Op.EQ); + StateChangeSearch.and("state", StateChangeSearch.entity().getState(), SearchCriteria.Op.EQ); + StateChangeSearch.done(); + + UUIDSearch = createSearchBuilder(); + UUIDSearch.and("uuid", UUIDSearch.entity().getUuid(), SearchCriteria.Op.EQ); + UUIDSearch.done(); + + + _tgMacAddress = _tgs.get("macAddress"); + assert _tgMacAddress != null : "Couldn't get mac address table generator"; + } + + @Override @DB + public boolean update(Long zoneId, EngineDataCenterVO zone) { + Transaction txn = Transaction.currentTxn(); + txn.start(); + boolean persisted = super.update(zoneId, zone); + if (!persisted) { + return persisted; + } + saveDetails(zone); + txn.commit(); + return persisted; + } + + @Override + public void loadDetails(EngineDataCenterVO zone) { + Map details =_detailsDao.findDetails(zone.getId()); + zone.setDetails(details); + } + + @Override + public void saveDetails(EngineDataCenterVO zone) { + Map details = zone.getDetails(); + if (details == null) { + return; + } + _detailsDao.persist(zone.getId(), details); + } + + @Override + public List listDisabledZones(){ + SearchCriteria sc = DisabledZonesSearch.create(); + sc.setParameters("allocationState", Grouping.AllocationState.Disabled); + + List dcs = listBy(sc); + + return dcs; + } + + @Override + public List listEnabledZones(){ + SearchCriteria sc = DisabledZonesSearch.create(); + sc.setParameters("allocationState", Grouping.AllocationState.Enabled); + + List dcs = listBy(sc); + + return dcs; + } + + @Override + public EngineDataCenterVO findByTokenOrIdOrName(String tokenOrIdOrName) { + EngineDataCenterVO result = findByToken(tokenOrIdOrName); + if (result == null) { + result = findByName(tokenOrIdOrName); + if (result == null) { + try { + Long dcId = Long.parseLong(tokenOrIdOrName); + return findById(dcId); + } catch (NumberFormatException nfe) { + + } + } + } + return result; + } + + @Override + public boolean remove(Long id) { + Transaction txn = Transaction.currentTxn(); + txn.start(); + EngineDataCenterVO zone = createForUpdate(); + zone.setName(null); + + update(id, zone); + + boolean result = super.remove(id); + txn.commit(); + return result; + } + + + @Override + public boolean updateState(State currentState, Event event, State nextState, DataCenterResourceEntity zoneEntity, Object data) { + + EngineDataCenterVO vo = findById(zoneEntity.getId()); + + Date oldUpdatedTime = vo.getLastUpdated(); + + SearchCriteria sc = StateChangeSearch.create(); + sc.setParameters("id", vo.getId()); + sc.setParameters("state", currentState); + + UpdateBuilder builder = getUpdateBuilder(vo); + builder.set(vo, "state", nextState); + builder.set(vo, "lastUpdated", new Date()); + + int rows = update(vo, sc); + + if (rows == 0 && s_logger.isDebugEnabled()) { + EngineDataCenterVO dbDC = findByIdIncludingRemoved(vo.getId()); + if (dbDC != null) { + StringBuilder str = new StringBuilder("Unable to update ").append(vo.toString()); + str.append(": DB Data={id=").append(dbDC.getId()).append("; state=").append(dbDC.getState()).append(";updatedTime=") + .append(dbDC.getLastUpdated()); + str.append(": New Data={id=").append(vo.getId()).append("; state=").append(nextState).append("; event=").append(event).append("; updatedTime=").append(vo.getLastUpdated()); + str.append(": stale Data={id=").append(vo.getId()).append("; state=").append(currentState).append("; event=").append(event).append("; updatedTime=").append(oldUpdatedTime); + } else { + s_logger.debug("Unable to update dataCenter: id=" + vo.getId() + ", as there is no such dataCenter exists in the database anymore"); + } + } + return rows > 0; + + } + + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDao.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDao.java new file mode 100644 index 000000000..3a71fe2cf --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDao.java @@ -0,0 +1,85 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api.db.dao; + +import java.util.Date; +import java.util.List; + +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO; + +import com.cloud.host.Host; +import com.cloud.host.Host.Type; +import com.cloud.host.Status; +import com.cloud.info.RunningHostCountInfo; +import com.cloud.resource.ResourceState; +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.fsm.StateDao; + +/** + * Data Access Object for server + * + */ +public interface EngineHostDao extends GenericDao, StateDao { + long countBy(long clusterId, ResourceState... states); + + /** + * Mark all hosts associated with a certain management server + * as disconnected. + * + * @param msId management server id. + */ + void markHostsAsDisconnected(long msId, long lastPing); + + List findLostHosts(long timeout); + + List findAndUpdateDirectAgentToLoad(long lastPingSecondsAfter, Long limit, long managementServerId); + + List getRunningHostCounts(Date cutTime); + + long getNextSequence(long hostId); + + void loadDetails(EngineHostVO host); + + void saveDetails(EngineHostVO host); + + void loadHostTags(EngineHostVO host); + + List listByHostTag(Host.Type type, Long clusterId, Long podId, long dcId, String hostTag); + + long countRoutingHostsByDataCenter(long dcId); + + List findAndUpdateApplianceToLoad(long lastPingSecondsAfter, long managementServerId); + + boolean updateResourceState(ResourceState oldState, ResourceState.Event event, ResourceState newState, Host vo); + + EngineHostVO findByGuid(String guid); + + EngineHostVO findByTypeNameAndZoneId(long zoneId, String name, Host.Type type); + List findHypervisorHostInCluster(long clusterId); + + + /** + * @param type + * @param clusterId + * @param podId + * @param dcId + * @param haTag TODO + * @return + */ + List listAllUpAndEnabledNonHAHosts(Type type, Long clusterId, Long podId, long dcId, String haTag); +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java new file mode 100644 index 000000000..3c34023c0 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java @@ -0,0 +1,809 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api.db.dao; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.TimeZone; + +import javax.ejb.Local; +import javax.inject.Inject; +import javax.persistence.TableGenerator; + +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.host.Host; +import com.cloud.host.Host.Type; +import com.cloud.host.HostTagVO; +import com.cloud.host.Status; +import com.cloud.info.RunningHostCountInfo; +import com.cloud.org.Managed; +import com.cloud.resource.ResourceState; +import com.cloud.utils.DateUtil; +import com.cloud.utils.db.Attribute; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.Filter; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.GenericSearchBuilder; +import com.cloud.utils.db.JoinBuilder; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.SearchCriteria.Func; +import com.cloud.utils.db.SearchCriteria.Op; +import com.cloud.utils.db.Transaction; +import com.cloud.utils.db.UpdateBuilder; +import com.cloud.utils.exception.CloudRuntimeException; + +@Component(value="EngineHostDao") +@Local(value = { EngineHostDao.class }) +@DB(txn = false) +@TableGenerator(name = "host_req_sq", table = "op_host", pkColumnName = "id", valueColumnName = "sequence", allocationSize = 1) +public class EngineHostDaoImpl extends GenericDaoBase implements EngineHostDao { + private static final Logger s_logger = Logger.getLogger(EngineHostDaoImpl.class); + private static final Logger status_logger = Logger.getLogger(Status.class); + private static final Logger state_logger = Logger.getLogger(ResourceState.class); + + protected final SearchBuilder TypePodDcStatusSearch; + + protected final SearchBuilder IdStatusSearch; + protected final SearchBuilder TypeDcSearch; + protected final SearchBuilder TypeDcStatusSearch; + protected final SearchBuilder TypeClusterStatusSearch; + protected final SearchBuilder MsStatusSearch; + protected final SearchBuilder DcPrivateIpAddressSearch; + protected final SearchBuilder DcStorageIpAddressSearch; + + protected final SearchBuilder GuidSearch; + protected final SearchBuilder DcSearch; + protected final SearchBuilder PodSearch; + protected final SearchBuilder TypeSearch; + protected final SearchBuilder StatusSearch; + protected final SearchBuilder ResourceStateSearch; + protected final SearchBuilder NameLikeSearch; + protected final SearchBuilder NameSearch; + protected final SearchBuilder SequenceSearch; + protected final SearchBuilder DirectlyConnectedSearch; + protected final SearchBuilder UnmanagedDirectConnectSearch; + protected final SearchBuilder UnmanagedApplianceSearch; + protected final SearchBuilder MaintenanceCountSearch; + protected final SearchBuilder ClusterStatusSearch; + protected final SearchBuilder TypeNameZoneSearch; + protected final SearchBuilder AvailHypevisorInZone; + + protected final SearchBuilder DirectConnectSearch; + protected final SearchBuilder ManagedDirectConnectSearch; + protected final SearchBuilder ManagedRoutingServersSearch; + protected final SearchBuilder SecondaryStorageVMSearch; + protected SearchBuilder StateChangeSearch; + + protected SearchBuilder UUIDSearch; + + protected final GenericSearchBuilder HostsInStatusSearch; + protected final GenericSearchBuilder CountRoutingByDc; + protected final SearchBuilder RoutingSearch; + + protected final Attribute _statusAttr; + protected final Attribute _resourceStateAttr; + protected final Attribute _msIdAttr; + protected final Attribute _pingTimeAttr; + + @Inject protected HostDetailsDao _detailsDao; + @Inject protected HostTagsDao _hostTagsDao; + @Inject protected EngineClusterDao _clusterDao; + + + public EngineHostDaoImpl() { + + MaintenanceCountSearch = createSearchBuilder(); + MaintenanceCountSearch.and("cluster", MaintenanceCountSearch.entity().getClusterId(), SearchCriteria.Op.EQ); + MaintenanceCountSearch.and("resourceState", MaintenanceCountSearch.entity().getResourceState(), SearchCriteria.Op.IN); + MaintenanceCountSearch.done(); + + TypePodDcStatusSearch = createSearchBuilder(); + EngineHostVO entity = TypePodDcStatusSearch.entity(); + TypePodDcStatusSearch.and("type", entity.getType(), SearchCriteria.Op.EQ); + TypePodDcStatusSearch.and("pod", entity.getPodId(), SearchCriteria.Op.EQ); + TypePodDcStatusSearch.and("dc", entity.getDataCenterId(), SearchCriteria.Op.EQ); + TypePodDcStatusSearch.and("cluster", entity.getClusterId(), SearchCriteria.Op.EQ); + TypePodDcStatusSearch.and("status", entity.getStatus(), SearchCriteria.Op.EQ); + TypePodDcStatusSearch.and("resourceState", entity.getResourceState(), SearchCriteria.Op.EQ); + TypePodDcStatusSearch.done(); + + MsStatusSearch = createSearchBuilder(); + MsStatusSearch.and("ms", MsStatusSearch.entity().getManagementServerId(), SearchCriteria.Op.EQ); + MsStatusSearch.and("type", MsStatusSearch.entity().getType(), SearchCriteria.Op.EQ); + MsStatusSearch.and("resourceState", MsStatusSearch.entity().getResourceState(), SearchCriteria.Op.NIN); + MsStatusSearch.done(); + + TypeDcSearch = createSearchBuilder(); + TypeDcSearch.and("type", TypeDcSearch.entity().getType(), SearchCriteria.Op.EQ); + TypeDcSearch.and("dc", TypeDcSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + TypeDcSearch.done(); + + SecondaryStorageVMSearch = createSearchBuilder(); + SecondaryStorageVMSearch.and("type", SecondaryStorageVMSearch.entity().getType(), SearchCriteria.Op.EQ); + SecondaryStorageVMSearch.and("dc", SecondaryStorageVMSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + SecondaryStorageVMSearch.and("status", SecondaryStorageVMSearch.entity().getStatus(), SearchCriteria.Op.EQ); + SecondaryStorageVMSearch.done(); + + TypeDcStatusSearch = createSearchBuilder(); + TypeDcStatusSearch.and("type", TypeDcStatusSearch.entity().getType(), SearchCriteria.Op.EQ); + TypeDcStatusSearch.and("dc", TypeDcStatusSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + TypeDcStatusSearch.and("status", TypeDcStatusSearch.entity().getStatus(), SearchCriteria.Op.EQ); + TypeDcStatusSearch.and("resourceState", TypeDcStatusSearch.entity().getResourceState(), SearchCriteria.Op.EQ); + TypeDcStatusSearch.done(); + + TypeClusterStatusSearch = createSearchBuilder(); + TypeClusterStatusSearch.and("type", TypeClusterStatusSearch.entity().getType(), SearchCriteria.Op.EQ); + TypeClusterStatusSearch.and("cluster", TypeClusterStatusSearch.entity().getClusterId(), SearchCriteria.Op.EQ); + TypeClusterStatusSearch.and("status", TypeClusterStatusSearch.entity().getStatus(), SearchCriteria.Op.EQ); + TypeClusterStatusSearch.and("resourceState", TypeClusterStatusSearch.entity().getResourceState(), SearchCriteria.Op.EQ); + TypeClusterStatusSearch.done(); + + IdStatusSearch = createSearchBuilder(); + IdStatusSearch.and("id", IdStatusSearch.entity().getId(), SearchCriteria.Op.EQ); + IdStatusSearch.and("states", IdStatusSearch.entity().getStatus(), SearchCriteria.Op.IN); + IdStatusSearch.done(); + + DcPrivateIpAddressSearch = createSearchBuilder(); + DcPrivateIpAddressSearch.and("privateIpAddress", DcPrivateIpAddressSearch.entity().getPrivateIpAddress(), SearchCriteria.Op.EQ); + DcPrivateIpAddressSearch.and("dc", DcPrivateIpAddressSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + DcPrivateIpAddressSearch.done(); + + DcStorageIpAddressSearch = createSearchBuilder(); + DcStorageIpAddressSearch.and("storageIpAddress", DcStorageIpAddressSearch.entity().getStorageIpAddress(), SearchCriteria.Op.EQ); + DcStorageIpAddressSearch.and("dc", DcStorageIpAddressSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + DcStorageIpAddressSearch.done(); + + GuidSearch = createSearchBuilder(); + GuidSearch.and("guid", GuidSearch.entity().getGuid(), SearchCriteria.Op.EQ); + GuidSearch.done(); + + DcSearch = createSearchBuilder(); + DcSearch.and("dc", DcSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + DcSearch.done(); + + ClusterStatusSearch = createSearchBuilder(); + ClusterStatusSearch.and("cluster", ClusterStatusSearch.entity().getClusterId(), SearchCriteria.Op.EQ); + ClusterStatusSearch.and("status", ClusterStatusSearch.entity().getStatus(), SearchCriteria.Op.EQ); + ClusterStatusSearch.done(); + + TypeNameZoneSearch = createSearchBuilder(); + TypeNameZoneSearch.and("name", TypeNameZoneSearch.entity().getName(), SearchCriteria.Op.EQ); + TypeNameZoneSearch.and("type", TypeNameZoneSearch.entity().getType(), SearchCriteria.Op.EQ); + TypeNameZoneSearch.and("zoneId", TypeNameZoneSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + TypeNameZoneSearch.done(); + + PodSearch = createSearchBuilder(); + PodSearch.and("pod", PodSearch.entity().getPodId(), SearchCriteria.Op.EQ); + PodSearch.done(); + + TypeSearch = createSearchBuilder(); + TypeSearch.and("type", TypeSearch.entity().getType(), SearchCriteria.Op.EQ); + TypeSearch.done(); + + StatusSearch = createSearchBuilder(); + StatusSearch.and("status", StatusSearch.entity().getStatus(), SearchCriteria.Op.IN); + StatusSearch.done(); + + ResourceStateSearch = createSearchBuilder(); + ResourceStateSearch.and("resourceState", ResourceStateSearch.entity().getResourceState(), SearchCriteria.Op.IN); + ResourceStateSearch.done(); + + NameLikeSearch = createSearchBuilder(); + NameLikeSearch.and("name", NameLikeSearch.entity().getName(), SearchCriteria.Op.LIKE); + NameLikeSearch.done(); + + NameSearch = createSearchBuilder(); + NameSearch.and("name", NameSearch.entity().getName(), SearchCriteria.Op.EQ); + NameSearch.done(); + + SequenceSearch = createSearchBuilder(); + SequenceSearch.and("id", SequenceSearch.entity().getId(), SearchCriteria.Op.EQ); + // SequenceSearch.addRetrieve("sequence", SequenceSearch.entity().getSequence()); + SequenceSearch.done(); + + DirectlyConnectedSearch = createSearchBuilder(); + DirectlyConnectedSearch.and("resource", DirectlyConnectedSearch.entity().getResource(), SearchCriteria.Op.NNULL); + DirectlyConnectedSearch.and("ms", DirectlyConnectedSearch.entity().getManagementServerId(), SearchCriteria.Op.EQ); + DirectlyConnectedSearch.and("statuses", DirectlyConnectedSearch.entity().getStatus(), SearchCriteria.Op.EQ); + DirectlyConnectedSearch.and("resourceState", DirectlyConnectedSearch.entity().getResourceState(), SearchCriteria.Op.NOTIN); + DirectlyConnectedSearch.done(); + + UnmanagedDirectConnectSearch = createSearchBuilder(); + UnmanagedDirectConnectSearch.and("resource", UnmanagedDirectConnectSearch.entity().getResource(), SearchCriteria.Op.NNULL); + UnmanagedDirectConnectSearch.and("server", UnmanagedDirectConnectSearch.entity().getManagementServerId(), SearchCriteria.Op.NULL); + UnmanagedDirectConnectSearch.and("lastPinged", UnmanagedDirectConnectSearch.entity().getLastPinged(), SearchCriteria.Op.LTEQ); + UnmanagedDirectConnectSearch.and("resourceStates", UnmanagedDirectConnectSearch.entity().getResourceState(), SearchCriteria.Op.NIN); + /* + * UnmanagedDirectConnectSearch.op(SearchCriteria.Op.OR, "managementServerId", + * UnmanagedDirectConnectSearch.entity().getManagementServerId(), SearchCriteria.Op.EQ); + * UnmanagedDirectConnectSearch.and("lastPinged", UnmanagedDirectConnectSearch.entity().getLastPinged(), + * SearchCriteria.Op.LTEQ); UnmanagedDirectConnectSearch.cp(); UnmanagedDirectConnectSearch.cp(); + */ + + DirectConnectSearch = createSearchBuilder(); + DirectConnectSearch.and("resource", DirectConnectSearch.entity().getResource(), SearchCriteria.Op.NNULL); + DirectConnectSearch.and("id", DirectConnectSearch.entity().getId(), SearchCriteria.Op.EQ); + DirectConnectSearch.and().op("nullserver", DirectConnectSearch.entity().getManagementServerId(), SearchCriteria.Op.NULL); + DirectConnectSearch.or("server", DirectConnectSearch.entity().getManagementServerId(), SearchCriteria.Op.EQ); + DirectConnectSearch.cp(); + DirectConnectSearch.done(); + + UnmanagedApplianceSearch = createSearchBuilder(); + UnmanagedApplianceSearch.and("resource", UnmanagedApplianceSearch.entity().getResource(), SearchCriteria.Op.NNULL); + UnmanagedApplianceSearch.and("server", UnmanagedApplianceSearch.entity().getManagementServerId(), SearchCriteria.Op.NULL); + UnmanagedApplianceSearch.and("types", UnmanagedApplianceSearch.entity().getType(), SearchCriteria.Op.IN); + UnmanagedApplianceSearch.and("lastPinged", UnmanagedApplianceSearch.entity().getLastPinged(), SearchCriteria.Op.LTEQ); + UnmanagedApplianceSearch.done(); + + AvailHypevisorInZone = createSearchBuilder(); + AvailHypevisorInZone.and("zoneId", AvailHypevisorInZone.entity().getDataCenterId(), SearchCriteria.Op.EQ); + AvailHypevisorInZone.and("hostId", AvailHypevisorInZone.entity().getId(), SearchCriteria.Op.NEQ); + AvailHypevisorInZone.and("type", AvailHypevisorInZone.entity().getType(), SearchCriteria.Op.EQ); + AvailHypevisorInZone.groupBy(AvailHypevisorInZone.entity().getHypervisorType()); + AvailHypevisorInZone.done(); + + HostsInStatusSearch = createSearchBuilder(Long.class); + HostsInStatusSearch.selectField(HostsInStatusSearch.entity().getId()); + HostsInStatusSearch.and("dc", HostsInStatusSearch.entity().getDataCenterId(), Op.EQ); + HostsInStatusSearch.and("pod", HostsInStatusSearch.entity().getPodId(), Op.EQ); + HostsInStatusSearch.and("cluster", HostsInStatusSearch.entity().getClusterId(), Op.EQ); + HostsInStatusSearch.and("type", HostsInStatusSearch.entity().getType(), Op.EQ); + HostsInStatusSearch.and("statuses", HostsInStatusSearch.entity().getStatus(), Op.IN); + HostsInStatusSearch.done(); + + CountRoutingByDc = createSearchBuilder(Long.class); + CountRoutingByDc.select(null, Func.COUNT, null); + CountRoutingByDc.and("dc", CountRoutingByDc.entity().getDataCenterId(), SearchCriteria.Op.EQ); + CountRoutingByDc.and("type", CountRoutingByDc.entity().getType(), SearchCriteria.Op.EQ); + CountRoutingByDc.and("status", CountRoutingByDc.entity().getStatus(), SearchCriteria.Op.EQ); + + CountRoutingByDc.done(); + + ManagedDirectConnectSearch = createSearchBuilder(); + ManagedDirectConnectSearch.and("resource", ManagedDirectConnectSearch.entity().getResource(), SearchCriteria.Op.NNULL); + ManagedDirectConnectSearch.and("server", ManagedDirectConnectSearch.entity().getManagementServerId(), SearchCriteria.Op.NULL); + ManagedDirectConnectSearch.done(); + + ManagedRoutingServersSearch = createSearchBuilder(); + ManagedRoutingServersSearch.and("server", ManagedRoutingServersSearch.entity().getManagementServerId(), SearchCriteria.Op.NNULL); + ManagedRoutingServersSearch.and("type", ManagedRoutingServersSearch.entity().getType(), SearchCriteria.Op.EQ); + ManagedRoutingServersSearch.done(); + + RoutingSearch = createSearchBuilder(); + RoutingSearch.and("type", RoutingSearch.entity().getType(), SearchCriteria.Op.EQ); + RoutingSearch.done(); + + _statusAttr = _allAttributes.get("status"); + _msIdAttr = _allAttributes.get("managementServerId"); + _pingTimeAttr = _allAttributes.get("lastPinged"); + _resourceStateAttr = _allAttributes.get("resourceState"); + + assert (_statusAttr != null && _msIdAttr != null && _pingTimeAttr != null) : "Couldn't find one of these attributes"; + + UUIDSearch = createSearchBuilder(); + UUIDSearch.and("uuid", UUIDSearch.entity().getUuid(), SearchCriteria.Op.EQ); + UUIDSearch.done(); + + StateChangeSearch = createSearchBuilder(); + StateChangeSearch.and("id", StateChangeSearch.entity().getId(), SearchCriteria.Op.EQ); + StateChangeSearch.and("state", StateChangeSearch.entity().getState(), SearchCriteria.Op.EQ); + StateChangeSearch.done(); + } + + @Override + public long countBy(long clusterId, ResourceState... states) { + SearchCriteria sc = MaintenanceCountSearch.create(); + + sc.setParameters("resourceState", (Object[]) states); + sc.setParameters("cluster", clusterId); + + List hosts = listBy(sc); + return hosts.size(); + } + + + @Override + public EngineHostVO findByGuid(String guid) { + SearchCriteria sc = GuidSearch.create("guid", guid); + return findOneBy(sc); + } + + @Override @DB + public List findAndUpdateDirectAgentToLoad(long lastPingSecondsAfter, Long limit, long managementServerId) { + Transaction txn = Transaction.currentTxn(); + txn.start(); + SearchCriteria sc = UnmanagedDirectConnectSearch.create(); + sc.setParameters("lastPinged", lastPingSecondsAfter); + //sc.setParameters("resourceStates", ResourceState.ErrorInMaintenance, ResourceState.Maintenance, ResourceState.PrepareForMaintenance, ResourceState.Disabled); + sc.setJoinParameters("ClusterManagedSearch", "managed", Managed.ManagedState.Managed); + List hosts = lockRows(sc, new Filter(EngineHostVO.class, "clusterId", true, 0L, limit), true); + + for (EngineHostVO host : hosts) { + host.setManagementServerId(managementServerId); + update(host.getId(), host); + } + + txn.commit(); + + return hosts; + } + + @Override @DB + public List findAndUpdateApplianceToLoad(long lastPingSecondsAfter, long managementServerId) { + Transaction txn = Transaction.currentTxn(); + + txn.start(); + SearchCriteria sc = UnmanagedApplianceSearch.create(); + sc.setParameters("lastPinged", lastPingSecondsAfter); + sc.setParameters("types", Type.ExternalDhcp, Type.ExternalFirewall, Type.ExternalLoadBalancer, Type.PxeServer, Type.TrafficMonitor, Type.L2Networking); + List hosts = lockRows(sc, null, true); + + for (EngineHostVO host : hosts) { + host.setManagementServerId(managementServerId); + update(host.getId(), host); + } + + txn.commit(); + + return hosts; + } + + @Override + public void markHostsAsDisconnected(long msId, long lastPing) { + SearchCriteria sc = MsStatusSearch.create(); + sc.setParameters("ms", msId); + + EngineHostVO host = createForUpdate(); + host.setLastPinged(lastPing); + host.setDisconnectedOn(new Date()); + UpdateBuilder ub = getUpdateBuilder(host); + ub.set(host, "status", Status.Disconnected); + + update(ub, sc, null); + + sc = MsStatusSearch.create(); + sc.setParameters("ms", msId); + + host = createForUpdate(); + host.setManagementServerId(null); + host.setLastPinged((System.currentTimeMillis() >> 10) - (10 * 60)); + host.setDisconnectedOn(new Date()); + ub = getUpdateBuilder(host); + update(ub, sc, null); + } + + @Override + public List listByHostTag(Host.Type type, Long clusterId, Long podId, long dcId, String hostTag) { + + SearchBuilder hostTagSearch = _hostTagsDao.createSearchBuilder(); + HostTagVO tagEntity = hostTagSearch.entity(); + hostTagSearch.and("tag", tagEntity.getTag(), SearchCriteria.Op.EQ); + + SearchBuilder hostSearch = createSearchBuilder(); + EngineHostVO entity = hostSearch.entity(); + hostSearch.and("type", entity.getType(), SearchCriteria.Op.EQ); + hostSearch.and("pod", entity.getPodId(), SearchCriteria.Op.EQ); + hostSearch.and("dc", entity.getDataCenterId(), SearchCriteria.Op.EQ); + hostSearch.and("cluster", entity.getClusterId(), SearchCriteria.Op.EQ); + hostSearch.and("status", entity.getStatus(), SearchCriteria.Op.EQ); + hostSearch.and("resourceState", entity.getResourceState(), SearchCriteria.Op.EQ); + hostSearch.join("hostTagSearch", hostTagSearch, entity.getId(), tagEntity.getHostId(), JoinBuilder.JoinType.INNER); + + SearchCriteria sc = hostSearch.create(); + sc.setJoinParameters("hostTagSearch", "tag", hostTag); + sc.setParameters("type", type.toString()); + if (podId != null) { + sc.setParameters("pod", podId); + } + if (clusterId != null) { + sc.setParameters("cluster", clusterId); + } + sc.setParameters("dc", dcId); + sc.setParameters("status", Status.Up.toString()); + sc.setParameters("resourceState", ResourceState.Enabled.toString()); + + return listBy(sc); + } + + + @Override + public List listAllUpAndEnabledNonHAHosts(Type type, Long clusterId, Long podId, long dcId, String haTag) { + SearchBuilder hostTagSearch = null; + if (haTag != null && !haTag.isEmpty()) { + hostTagSearch = _hostTagsDao.createSearchBuilder(); + hostTagSearch.and().op("tag", hostTagSearch.entity().getTag(), SearchCriteria.Op.NEQ); + hostTagSearch.or("tagNull", hostTagSearch.entity().getTag(), SearchCriteria.Op.NULL); + hostTagSearch.cp(); + } + + SearchBuilder hostSearch = createSearchBuilder(); + + hostSearch.and("type", hostSearch.entity().getType(), SearchCriteria.Op.EQ); + hostSearch.and("clusterId", hostSearch.entity().getClusterId(), SearchCriteria.Op.EQ); + hostSearch.and("podId", hostSearch.entity().getPodId(), SearchCriteria.Op.EQ); + hostSearch.and("zoneId", hostSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + hostSearch.and("status", hostSearch.entity().getStatus(), SearchCriteria.Op.EQ); + hostSearch.and("resourceState", hostSearch.entity().getResourceState(), SearchCriteria.Op.EQ); + + if (haTag != null && !haTag.isEmpty()) { + hostSearch.join("hostTagSearch", hostTagSearch, hostSearch.entity().getId(), hostTagSearch.entity().getHostId(), JoinBuilder.JoinType.LEFTOUTER); + } + + SearchCriteria sc = hostSearch.create(); + + if (haTag != null && !haTag.isEmpty()) { + sc.setJoinParameters("hostTagSearch", "tag", haTag); + } + + if (type != null) { + sc.setParameters("type", type); + } + + if (clusterId != null) { + sc.setParameters("clusterId", clusterId); + } + + if (podId != null) { + sc.setParameters("podId", podId); + } + + sc.setParameters("zoneId", dcId); + sc.setParameters("status", Status.Up); + sc.setParameters("resourceState", ResourceState.Enabled); + + return listBy(sc); + } + + @Override + public void loadDetails(EngineHostVO host) { + Map details = _detailsDao.findDetails(host.getId()); + host.setDetails(details); + } + + @Override + public void loadHostTags(EngineHostVO host) { + List hostTags = _hostTagsDao.gethostTags(host.getId()); + host.setHostTags(hostTags); + } + + @DB + @Override + public List findLostHosts(long timeout) { + Transaction txn = Transaction.currentTxn(); + PreparedStatement pstmt = null; + List result = new ArrayList(); + ResultSet rs = null; + try { + String sql = "select h.id from host h left join cluster c on h.cluster_id=c.id where h.mgmt_server_id is not null and h.last_ping < ? and h.status in ('Up', 'Updating', 'Disconnected', 'Connecting') and h.type not in ('ExternalFirewall', 'ExternalLoadBalancer', 'TrafficMonitor', 'SecondaryStorage', 'LocalSecondaryStorage', 'L2Networking') and (h.cluster_id is null or c.managed_state = 'Managed') ;" ; + pstmt = txn.prepareStatement(sql); + pstmt.setLong(1, timeout); + rs = pstmt.executeQuery(); + while (rs.next()) { + long id = rs.getLong(1); //ID column + result.add(findById(id)); + } + } catch (Exception e) { + s_logger.warn("Exception: ", e); + } finally { + try { + if (rs != null) { + rs.close(); + } + if (pstmt != null) { + pstmt.close(); + } + } catch (SQLException e) { + } + } + return result; + } + + @Override + public void saveDetails(EngineHostVO host) { + Map details = host.getDetails(); + if (details == null) { + return; + } + _detailsDao.persist(host.getId(), details); + } + + protected void saveHostTags(EngineHostVO host) { + List hostTags = host.getHostTags(); + if (hostTags == null || (hostTags != null && hostTags.isEmpty())) { + return; + } + _hostTagsDao.persist(host.getId(), hostTags); + } + + @Override + @DB + public EngineHostVO persist(EngineHostVO host) { + final String InsertSequenceSql = "INSERT INTO op_host(id) VALUES(?)"; + + Transaction txn = Transaction.currentTxn(); + txn.start(); + + EngineHostVO dbHost = super.persist(host); + + try { + PreparedStatement pstmt = txn.prepareAutoCloseStatement(InsertSequenceSql); + pstmt.setLong(1, dbHost.getId()); + pstmt.executeUpdate(); + } catch (SQLException e) { + throw new CloudRuntimeException("Unable to persist the sequence number for this host"); + } + + saveDetails(host); + loadDetails(dbHost); + saveHostTags(host); + loadHostTags(dbHost); + + txn.commit(); + + return dbHost; + } + + @Override + @DB + public boolean update(Long hostId, EngineHostVO host) { + Transaction txn = Transaction.currentTxn(); + txn.start(); + + boolean persisted = super.update(hostId, host); + if (!persisted) { + return persisted; + } + + saveDetails(host); + saveHostTags(host); + + txn.commit(); + + return persisted; + } + + @Override + @DB + public List getRunningHostCounts(Date cutTime) { + String sql = "select * from (" + "select h.data_center_id, h.type, count(*) as count from host as h INNER JOIN mshost as m ON h.mgmt_server_id=m.msid " + + "where h.status='Up' and h.type='SecondaryStorage' and m.last_update > ? " + "group by h.data_center_id, h.type " + "UNION ALL " + + "select h.data_center_id, h.type, count(*) as count from host as h INNER JOIN mshost as m ON h.mgmt_server_id=m.msid " + + "where h.status='Up' and h.type='Routing' and m.last_update > ? " + "group by h.data_center_id, h.type) as t " + "ORDER by t.data_center_id, t.type"; + + ArrayList l = new ArrayList(); + + Transaction txn = Transaction.currentTxn(); + ; + PreparedStatement pstmt = null; + try { + pstmt = txn.prepareAutoCloseStatement(sql); + String gmtCutTime = DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), cutTime); + pstmt.setString(1, gmtCutTime); + pstmt.setString(2, gmtCutTime); + + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) { + RunningHostCountInfo info = new RunningHostCountInfo(); + info.setDcId(rs.getLong(1)); + info.setHostType(rs.getString(2)); + info.setCount(rs.getInt(3)); + + l.add(info); + } + } catch (SQLException e) { + } catch (Throwable e) { + } + return l; + } + + @Override + public long getNextSequence(long hostId) { + if (s_logger.isTraceEnabled()) { + s_logger.trace("getNextSequence(), hostId: " + hostId); + } + + TableGenerator tg = _tgs.get("host_req_sq"); + assert tg != null : "how can this be wrong!"; + + return s_seqFetcher.getNextSequence(Long.class, tg, hostId); + } + + /*TODO: this is used by mycloud, check if it needs resource state Enabled */ + @Override + public long countRoutingHostsByDataCenter(long dcId) { + SearchCriteria sc = CountRoutingByDc.create(); + sc.setParameters("dc", dcId); + sc.setParameters("type", Host.Type.Routing); + sc.setParameters("status", Status.Up.toString()); + return customSearch(sc, null).get(0); + } + + + @Override + public boolean updateState(State currentState, DataCenterResourceEntity.State.Event event, State nextState, DataCenterResourceEntity hostEntity, Object data) { + EngineHostVO vo = findById(hostEntity.getId()); + Date oldUpdatedTime = vo.getLastUpdated(); + + SearchCriteria sc = StateChangeSearch.create(); + sc.setParameters("id", hostEntity.getId()); + sc.setParameters("state", currentState); + + UpdateBuilder builder = getUpdateBuilder(vo); + builder.set(vo, "state", nextState); + builder.set(vo, "lastUpdated", new Date()); + + int rows = update(vo, sc); + + if (rows == 0 && s_logger.isDebugEnabled()) { + EngineHostVO dbHost = findByIdIncludingRemoved(vo.getId()); + if (dbHost != null) { + StringBuilder str = new StringBuilder("Unable to update ").append(vo.toString()); + str.append(": DB Data={id=").append(dbHost.getId()).append("; state=").append(dbHost.getState()).append(";updatedTime=") + .append(dbHost.getLastUpdated()); + str.append(": New Data={id=").append(vo.getId()).append("; state=").append(nextState).append("; event=").append(event).append("; updatedTime=").append(vo.getLastUpdated()); + str.append(": stale Data={id=").append(vo.getId()).append("; state=").append(currentState).append("; event=").append(event).append("; updatedTime=").append(oldUpdatedTime); + } else { + s_logger.debug("Unable to update dataCenter: id=" + vo.getId() + ", as there is no such dataCenter exists in the database anymore"); + } + } + return rows > 0; + } + + @Override + public boolean updateResourceState(ResourceState oldState, ResourceState.Event event, ResourceState newState, Host vo) { + EngineHostVO host = (EngineHostVO)vo; + SearchBuilder sb = createSearchBuilder(); + sb.and("resource_state", sb.entity().getResourceState(), SearchCriteria.Op.EQ); + sb.and("id", sb.entity().getId(), SearchCriteria.Op.EQ); + sb.done(); + + SearchCriteria sc = sb.create(); + + sc.setParameters("resource_state", oldState); + sc.setParameters("id", host.getId()); + + UpdateBuilder ub = getUpdateBuilder(host); + ub.set(host, _resourceStateAttr, newState); + int result = update(ub, sc, null); + assert result <= 1 : "How can this update " + result + " rows? "; + + if (state_logger.isDebugEnabled() && result == 0) { + EngineHostVO ho = findById(host.getId()); + assert ho != null : "How how how? : " + host.getId(); + + StringBuilder str = new StringBuilder("Unable to update resource state: ["); + str.append("m = " + host.getId()); + str.append("; name = " + host.getName()); + str.append("; old state = " + oldState); + str.append("; event = " + event); + str.append("; new state = " + newState + "]"); + state_logger.debug(str.toString()); + } else { + StringBuilder msg = new StringBuilder("Resource state update: ["); + msg.append("id = " + host.getId()); + msg.append("; name = " + host.getName()); + msg.append("; old state = " + oldState); + msg.append("; event = " + event); + msg.append("; new state = " + newState + "]"); + state_logger.debug(msg.toString()); + } + + return result > 0; + } + + @Override + public EngineHostVO findByTypeNameAndZoneId(long zoneId, String name, Host.Type type) { + SearchCriteria sc = TypeNameZoneSearch.create(); + sc.setParameters("type", type); + sc.setParameters("name", name); + sc.setParameters("zoneId", zoneId); + return findOneBy(sc); + } + + @Override + public List findHypervisorHostInCluster(long clusterId) { + SearchCriteria sc = TypeClusterStatusSearch.create(); + sc.setParameters("type", Host.Type.Routing); + sc.setParameters("cluster", clusterId); + sc.setParameters("status", Status.Up); + sc.setParameters("resourceState", ResourceState.Enabled); + + return listBy(sc); + } + + @Override + public List lockRows( + SearchCriteria sc, + Filter filter, boolean exclusive) { + // TODO Auto-generated method stub + return null; + } + + @Override + public org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO lockOneRandomRow( + SearchCriteria sc, + boolean exclusive) { + // TODO Auto-generated method stub + return null; + } + + + @Override + public List search( + SearchCriteria sc, + Filter filter) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List search( + SearchCriteria sc, + Filter filter, boolean enable_query_cache) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List searchIncludingRemoved( + SearchCriteria sc, + Filter filter, Boolean lock, boolean cache) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List searchIncludingRemoved( + SearchCriteria sc, + Filter filter, Boolean lock, boolean cache, + boolean enable_query_cache) { + // TODO Auto-generated method stub + return null; + } + + + @Override + public int remove( + SearchCriteria sc) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int expunge(SearchCriteria sc) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public EngineHostVO findOneBy(SearchCriteria sc) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostPodDao.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostPodDao.java new file mode 100644 index 000000000..451723e53 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostPodDao.java @@ -0,0 +1,33 @@ +// Copyright 2012 Citrix Systems, Inc. Licensed under the +// Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. Citrix Systems, Inc. +// reserves all rights not expressly granted by 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. +// +// Automatically generated by addcopyright.py at 04/03/2012 +package org.apache.cloudstack.engine.datacenter.entity.api.db.dao; + +import java.util.HashMap; +import java.util.List; + +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO; + + +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.fsm.StateDao; + +public interface EngineHostPodDao extends GenericDao, StateDao { + public List listByDataCenterId(long id); + + public EngineHostPodVO findByName(String name, long dcId); + + public HashMap> getCurrentPodCidrSubnets(long zoneId, long podIdToSkip); + + public List listDisabledPods(long zoneId); +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostPodDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostPodDaoImpl.java new file mode 100644 index 000000000..fee083a39 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostPodDaoImpl.java @@ -0,0 +1,184 @@ +// Copyright 2012 Citrix Systems, Inc. Licensed under the +// Apache License, Version 2.0 (the "License"); you may not use this +// file except in compliance with the License. Citrix Systems, Inc. +// reserves all rights not expressly granted by 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. +// +// Automatically generated by addcopyright.py at 04/03/2012 +package org.apache.cloudstack.engine.datacenter.entity.api.db.dao; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; + +import javax.ejb.Local; + +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State.Event; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + + +import com.cloud.org.Grouping; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.GenericSearchBuilder; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.UpdateBuilder; +import com.cloud.utils.db.SearchCriteria.Op; +import com.cloud.utils.db.Transaction; + +@Component(value="EngineHostPodDao") +@Local(value={EngineHostPodDao.class}) +public class EngineHostPodDaoImpl extends GenericDaoBase implements EngineHostPodDao { + private static final Logger s_logger = Logger.getLogger(EngineHostPodDaoImpl.class); + + protected SearchBuilder DataCenterAndNameSearch; + protected SearchBuilder DataCenterIdSearch; + protected SearchBuilder UUIDSearch; + protected SearchBuilder StateChangeSearch; + + protected EngineHostPodDaoImpl() { + DataCenterAndNameSearch = createSearchBuilder(); + DataCenterAndNameSearch.and("dc", DataCenterAndNameSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + DataCenterAndNameSearch.and("name", DataCenterAndNameSearch.entity().getName(), SearchCriteria.Op.EQ); + DataCenterAndNameSearch.done(); + + DataCenterIdSearch = createSearchBuilder(); + DataCenterIdSearch.and("dcId", DataCenterIdSearch.entity().getDataCenterId(), SearchCriteria.Op.EQ); + DataCenterIdSearch.done(); + + + UUIDSearch = createSearchBuilder(); + UUIDSearch.and("uuid", UUIDSearch.entity().getUuid(), SearchCriteria.Op.EQ); + UUIDSearch.done(); + + StateChangeSearch = createSearchBuilder(); + StateChangeSearch.and("id", StateChangeSearch.entity().getId(), SearchCriteria.Op.EQ); + StateChangeSearch.and("state", StateChangeSearch.entity().getState(), SearchCriteria.Op.EQ); + StateChangeSearch.done(); + + } + + @Override + public List listByDataCenterId(long id) { + SearchCriteria sc = DataCenterIdSearch.create(); + sc.setParameters("dcId", id); + + return listBy(sc); + } + + @Override + public EngineHostPodVO findByName(String name, long dcId) { + SearchCriteria sc = DataCenterAndNameSearch.create(); + sc.setParameters("dc", dcId); + sc.setParameters("name", name); + + return findOneBy(sc); + } + + @Override + public HashMap> getCurrentPodCidrSubnets(long zoneId, long podIdToSkip) { + HashMap> currentPodCidrSubnets = new HashMap>(); + + String selectSql = "SELECT id, cidr_address, cidr_size FROM host_pod_ref WHERE data_center_id=" + zoneId +" and removed IS NULL"; + Transaction txn = Transaction.currentTxn(); + try { + PreparedStatement stmt = txn.prepareAutoCloseStatement(selectSql); + ResultSet rs = stmt.executeQuery(); + while (rs.next()) { + Long podId = rs.getLong("id"); + if (podId.longValue() == podIdToSkip) { + continue; + } + String cidrAddress = rs.getString("cidr_address"); + long cidrSize = rs.getLong("cidr_size"); + List cidrPair = new ArrayList(); + cidrPair.add(0, cidrAddress); + cidrPair.add(1, new Long(cidrSize)); + currentPodCidrSubnets.put(podId, cidrPair); + } + } catch (SQLException ex) { + s_logger.warn("DB exception " + ex.getMessage(), ex); + return null; + } + + return currentPodCidrSubnets; + } + + @Override + public boolean remove(Long id) { + Transaction txn = Transaction.currentTxn(); + txn.start(); + EngineHostPodVO pod = createForUpdate(); + pod.setName(null); + + update(id, pod); + + boolean result = super.remove(id); + txn.commit(); + return result; + } + + @Override + public List listDisabledPods(long zoneId) { + GenericSearchBuilder podIdSearch = createSearchBuilder(Long.class); + podIdSearch.selectField(podIdSearch.entity().getId()); + podIdSearch.and("dataCenterId", podIdSearch.entity().getDataCenterId(), Op.EQ); + podIdSearch.and("allocationState", podIdSearch.entity().getAllocationState(), Op.EQ); + podIdSearch.done(); + + + SearchCriteria sc = podIdSearch.create(); + sc.addAnd("dataCenterId", SearchCriteria.Op.EQ, zoneId); + sc.addAnd("allocationState", SearchCriteria.Op.EQ, Grouping.AllocationState.Disabled); + return customSearch(sc, null); + } + + + @Override + public boolean updateState(State currentState, Event event, State nextState, DataCenterResourceEntity podEntity, Object data) { + + EngineHostPodVO vo = findById(podEntity.getId()); + + Date oldUpdatedTime = vo.getLastUpdated(); + + SearchCriteria sc = StateChangeSearch.create(); + sc.setParameters("id", vo.getId()); + sc.setParameters("state", currentState); + + UpdateBuilder builder = getUpdateBuilder(vo); + builder.set(vo, "state", nextState); + builder.set(vo, "lastUpdated", new Date()); + + int rows = update((EngineHostPodVO) vo, sc); + + if (rows == 0 && s_logger.isDebugEnabled()) { + EngineHostPodVO dbDC = findByIdIncludingRemoved(vo.getId()); + if (dbDC != null) { + StringBuilder str = new StringBuilder("Unable to update ").append(vo.toString()); + str.append(": DB Data={id=").append(dbDC.getId()).append("; state=").append(dbDC.getState()).append(";updatedTime=") + .append(dbDC.getLastUpdated()); + str.append(": New Data={id=").append(vo.getId()).append("; state=").append(nextState).append("; event=").append(event).append("; updatedTime=").append(vo.getLastUpdated()); + str.append(": stale Data={id=").append(vo.getId()).append("; state=").append(currentState).append("; event=").append(event).append("; updatedTime=").append(oldUpdatedTime); + } else { + s_logger.debug("Unable to update dataCenter: id=" + vo.getId() + ", as there is no such dataCenter exists in the database anymore"); + } + } + return rows > 0; + + } + + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/HostDetailsDao.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/HostDetailsDao.java new file mode 100644 index 000000000..d6455038f --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/HostDetailsDao.java @@ -0,0 +1,32 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api.db.dao; + +import java.util.Map; + +import com.cloud.host.DetailVO; +import com.cloud.utils.db.GenericDao; + +public interface HostDetailsDao extends GenericDao { + Map findDetails(long hostId); + + void persist(long hostId, Map details); + + DetailVO findDetail(long hostId, String name); + + void deleteDetails(long hostId); +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/HostDetailsDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/HostDetailsDaoImpl.java new file mode 100644 index 000000000..02f8c2c54 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/HostDetailsDaoImpl.java @@ -0,0 +1,110 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api.db.dao; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.ejb.Local; + +import org.springframework.stereotype.Component; + +import com.cloud.host.DetailVO; +import com.cloud.utils.crypt.DBEncryptionUtil; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.Transaction; + +@Component(value="EngineHostDetailsDao") +@Local(value=HostDetailsDao.class) +public class HostDetailsDaoImpl extends GenericDaoBase implements HostDetailsDao { + protected final SearchBuilder HostSearch; + protected final SearchBuilder DetailSearch; + + public HostDetailsDaoImpl() { + HostSearch = createSearchBuilder(); + HostSearch.and("hostId", HostSearch.entity().getHostId(), SearchCriteria.Op.EQ); + HostSearch.done(); + + DetailSearch = createSearchBuilder(); + DetailSearch.and("hostId", DetailSearch.entity().getHostId(), SearchCriteria.Op.EQ); + DetailSearch.and("name", DetailSearch.entity().getName(), SearchCriteria.Op.EQ); + DetailSearch.done(); + } + + @Override + public DetailVO findDetail(long hostId, String name) { + SearchCriteria sc = DetailSearch.create(); + sc.setParameters("hostId", hostId); + sc.setParameters("name", name); + + DetailVO detail = findOneIncludingRemovedBy(sc); + if("password".equals(name) && detail != null){ + detail.setValue(DBEncryptionUtil.decrypt(detail.getValue())); + } + return detail; + } + + @Override + public Map findDetails(long hostId) { + SearchCriteria sc = HostSearch.create(); + sc.setParameters("hostId", hostId); + + List results = search(sc, null); + Map details = new HashMap(results.size()); + for (DetailVO result : results) { + if("password".equals(result.getName())){ + details.put(result.getName(), DBEncryptionUtil.decrypt(result.getValue())); + } else { + details.put(result.getName(), result.getValue()); + } + } + return details; + } + + @Override + public void deleteDetails(long hostId) { + SearchCriteria sc = HostSearch.create(); + sc.setParameters("hostId", hostId); + + List results = search(sc, null); + for (DetailVO result : results) { + remove(result.getId()); + } + } + + @Override + public void persist(long hostId, Map details) { + Transaction txn = Transaction.currentTxn(); + txn.start(); + SearchCriteria sc = HostSearch.create(); + sc.setParameters("hostId", hostId); + expunge(sc); + + for (Map.Entry detail : details.entrySet()) { + String value = detail.getValue(); + if("password".equals(detail.getKey())){ + value = DBEncryptionUtil.encrypt(value); + } + DetailVO vo = new DetailVO(hostId, detail.getKey(), value); + persist(vo); + } + txn.commit(); + } +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/HostTagsDao.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/HostTagsDao.java new file mode 100644 index 000000000..09503d801 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/HostTagsDao.java @@ -0,0 +1,30 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api.db.dao; + +import java.util.List; +import com.cloud.host.HostTagVO; +import com.cloud.utils.db.GenericDao; + +public interface HostTagsDao extends GenericDao { + + void persist(long hostId, List hostTags); + + List gethostTags(long hostId); + +} + diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/HostTagsDaoImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/HostTagsDaoImpl.java new file mode 100644 index 000000000..a70b7d1b2 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/HostTagsDaoImpl.java @@ -0,0 +1,75 @@ +// 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 org.apache.cloudstack.engine.datacenter.entity.api.db.dao; + +import java.util.ArrayList; +import java.util.List; + +import javax.ejb.Local; + +import org.springframework.stereotype.Component; + +import com.cloud.host.HostTagVO; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.Transaction; + +@Component(value="EngineHostTagsDao") +@Local(value=HostTagsDao.class) +public class HostTagsDaoImpl extends GenericDaoBase implements HostTagsDao { + protected final SearchBuilder HostSearch; + + protected HostTagsDaoImpl() { + HostSearch = createSearchBuilder(); + HostSearch.and("hostId", HostSearch.entity().getHostId(), SearchCriteria.Op.EQ); + HostSearch.done(); + } + + @Override + public List gethostTags(long hostId) { + SearchCriteria sc = HostSearch.create(); + sc.setParameters("hostId", hostId); + + List results = search(sc, null); + List hostTags = new ArrayList(results.size()); + for (HostTagVO result : results) { + hostTags.add(result.getTag()); + } + + return hostTags; + } + + @Override + public void persist(long hostId, List hostTags) { + Transaction txn = Transaction.currentTxn(); + + txn.start(); + SearchCriteria sc = HostSearch.create(); + sc.setParameters("hostId", hostId); + expunge(sc); + + for (String tag : hostTags) { + tag = tag.trim(); + if(tag.length() > 0) { + HostTagVO vo = new HostTagVO(hostId, tag); + persist(vo); + } + } + txn.commit(); + } +} diff --git a/engine/orchestration/src/org/apache/cloudstack/engine/service/api/ProvisioningServiceImpl.java b/engine/orchestration/src/org/apache/cloudstack/engine/service/api/ProvisioningServiceImpl.java new file mode 100644 index 000000000..863c181a9 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/engine/service/api/ProvisioningServiceImpl.java @@ -0,0 +1,170 @@ +/* + * 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 org.apache.cloudstack.engine.service.api; + +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import javax.inject.Inject; +import javax.ws.rs.Path; + +import org.apache.cloudstack.engine.datacenter.entity.api.ClusterEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.ClusterEntityImpl; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceManager; +import org.apache.cloudstack.engine.datacenter.entity.api.HostEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.HostEntityImpl; +import org.apache.cloudstack.engine.datacenter.entity.api.PodEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.PodEntityImpl; +import org.apache.cloudstack.engine.datacenter.entity.api.StorageEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntityImpl; +import org.springframework.stereotype.Component; +import org.springframework.stereotype.Service; + +import com.cloud.host.Host; +import com.cloud.host.Status; +import com.cloud.storage.StoragePool; + + +@Component +@Service("provisioningService") +@Path("/provisioning") +public class ProvisioningServiceImpl implements ProvisioningService { + + @Inject + DataCenterResourceManager manager; + + @Override + public StorageEntity registerStorage(String name, List tags, Map details) { + // TODO Auto-generated method stub + return null; + } + + @Override + public ZoneEntity registerZone(String zoneUuid, String name, String owner, List tags, Map details) { + ZoneEntityImpl zoneEntity = new ZoneEntityImpl(zoneUuid, manager); + zoneEntity.setName(name); + zoneEntity.setOwner(owner); + zoneEntity.setDetails(details); + zoneEntity.persist(); + return zoneEntity; + } + + @Override + public PodEntity registerPod(String podUuid, String name, String owner, String zoneUuid, List tags, Map details) { + PodEntityImpl podEntity = new PodEntityImpl(podUuid, manager); + podEntity.setOwner(owner); + podEntity.setName(name); + podEntity.persist(); + return podEntity; + } + + @Override + public ClusterEntity registerCluster(String clusterUuid, String name, String owner, List tags, Map details) { + ClusterEntityImpl clusterEntity = new ClusterEntityImpl(clusterUuid, manager); + clusterEntity.setOwner(owner); + clusterEntity.setName(name); + clusterEntity.persist(); + return clusterEntity; + } + + @Override + public HostEntity registerHost(String hostUuid, String name, String owner, List tags, Map details) { + HostEntityImpl hostEntity = new HostEntityImpl(hostUuid, manager); + hostEntity.setOwner(owner); + hostEntity.setName(name); + hostEntity.setDetails(details); + + hostEntity.persist(); + return hostEntity; + } + + @Override + public void deregisterStorage(String uuid) { + // TODO Auto-generated method stub + + } + + @Override + public void deregisterZone(String uuid) { + ZoneEntityImpl zoneEntity = new ZoneEntityImpl(uuid, manager); + zoneEntity.disable(); + } + + @Override + public void deregisterPod(String uuid) { + PodEntityImpl podEntity = new PodEntityImpl(uuid, manager); + podEntity.disable(); + } + + @Override + public void deregisterCluster(String uuid) { + ClusterEntityImpl clusterEntity = new ClusterEntityImpl(uuid, manager); + clusterEntity.disable(); + + } + + @Override + public void deregisterHost(String uuid) { + HostEntityImpl hostEntity = new HostEntityImpl(uuid, manager); + hostEntity.disable(); + } + + @Override + public void changeState(String type, String entity, Status state) { + // TODO Auto-generated method stub + + } + + @Override + public List listHosts() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List listPods() { + List pods = new ArrayList(); + //pods.add(new PodEntityImpl("pod-uuid-1", "pod1")); + //pods.add(new PodEntityImpl("pod-uuid-2", "pod2")); + return null; + } + + @Override + public List listZones() { + List zones = new ArrayList(); + //zones.add(new ZoneEntityImpl("zone-uuid-1")); + //zones.add(new ZoneEntityImpl("zone-uuid-2")); + return zones; + } + + @Override + public List listStorage() { + // TODO Auto-generated method stub + return null; + } + + @Override + public ZoneEntity getZone(String uuid) { + ZoneEntityImpl impl = new ZoneEntityImpl(uuid, manager); + return impl; + } + +} diff --git a/engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java b/engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java new file mode 100755 index 000000000..963e4d7d9 --- /dev/null +++ b/engine/orchestration/src/org/apache/cloudstack/platform/orchestration/CloudOrchestrator.java @@ -0,0 +1,283 @@ +/* + * 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 org.apache.cloudstack.platform.orchestration; + +import java.net.URL; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.cloud.entity.api.NetworkEntity; +import org.apache.cloudstack.engine.cloud.entity.api.TemplateEntity; +import org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntity; +import org.apache.cloudstack.engine.cloud.entity.api.VirtualMachineEntityImpl; +import org.apache.cloudstack.engine.cloud.entity.api.VMEntityManager; +import org.apache.cloudstack.engine.cloud.entity.api.VolumeEntity; +import org.apache.cloudstack.engine.service.api.OrchestrationService; +import org.springframework.stereotype.Component; + +import com.cloud.deploy.DeploymentPlan; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.hypervisor.Hypervisor; +import com.cloud.hypervisor.Hypervisor.HypervisorType; + +import com.cloud.network.dao.NetworkDao; +import com.cloud.network.dao.NetworkVO; +import com.cloud.service.ServiceOfferingVO; +import com.cloud.service.dao.ServiceOfferingDao; +import com.cloud.storage.DiskOfferingVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.dao.VMTemplateDao; +import com.cloud.user.dao.AccountDao; +import com.cloud.utils.Pair; +import com.cloud.utils.component.ComponentContext; +import com.cloud.vm.NicProfile; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.VirtualMachineManager; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.dao.VMInstanceDao; + + +@Component +public class CloudOrchestrator implements OrchestrationService { + + @Inject + private VMEntityManager vmEntityManager; + + @Inject + private VirtualMachineManager _itMgr; + + @Inject + protected VMTemplateDao _templateDao = null; + + @Inject + protected VMInstanceDao _vmDao; + + @Inject + protected UserVmDao _userVmDao = null; + + @Inject + protected ServiceOfferingDao _serviceOfferingDao; + + @Inject + protected DiskOfferingDao _diskOfferingDao = null; + + @Inject + protected NetworkDao _networkDao; + + @Inject + protected AccountDao _accountDao = null; + + public CloudOrchestrator() { + } + + public VirtualMachineEntity createFromScratch(String uuid, String iso, String os, String hypervisor, String hostName, int cpu, int speed, long memory, List networks, List computeTags, + Map details, String owner) { + // TODO Auto-generated method stub + return null; + } + + public String reserve(String vm, String planner, Long until) throws InsufficientCapacityException { + // TODO Auto-generated method stub + return null; + } + + public String deploy(String reservationId) { + // TODO Auto-generated method stub + return null; + } + + public void joinNetwork(String network1, String network2) { + // TODO Auto-generated method stub + + } + + public void createNetwork() { + // TODO Auto-generated method stub + + } + + public void destroyNetwork() { + // TODO Auto-generated method stub + + } + + @Override + public VolumeEntity createVolume() { + // TODO Auto-generated method stub + return null; + } + + @Override + public TemplateEntity registerTemplate(String name, URL path, String os, Hypervisor hypervisor) { + return null; + } + + @Override + public void destroyNetwork(String networkUuid) { + // TODO Auto-generated method stub + + } + + @Override + public void destroyVolume(String volumeEntity) { + // TODO Auto-generated method stub + + } + + @Override + public VirtualMachineEntity createVirtualMachine( + String id, + String owner, + String templateId, + String hostName, + String displayName, + String hypervisor, + int cpu, + int speed, + long memory, + Long diskSize, + List computeTags, + List rootDiskTags, + Map networkNicMap, DeploymentPlan plan) throws InsufficientCapacityException { + + // VirtualMachineEntityImpl vmEntity = new VirtualMachineEntityImpl(id, owner, hostName, displayName, cpu, speed, memory, computeTags, rootDiskTags, networks, vmEntityManager); + + List> networkIpMap = new ArrayList>(); + for (String uuid : networkNicMap.keySet()) { + NetworkVO network = _networkDao.findByUuid(uuid); + if(network != null){ + networkIpMap.add(new Pair(network, networkNicMap.get(uuid))); + } + } + + VirtualMachineEntityImpl vmEntity = ComponentContext.inject(VirtualMachineEntityImpl.class); + vmEntity.init(id, owner, hostName, displayName, cpu, speed, memory, computeTags, rootDiskTags, new ArrayList(networkNicMap.keySet())); + + + HypervisorType hypervisorType = HypervisorType.valueOf(hypervisor); + + //load vm instance and offerings and call virtualMachineManagerImpl + VMInstanceVO vm = _vmDao.findByUuid(id); + + // If the template represents an ISO, a disk offering must be passed in, and will be used to create the root disk + // Else, a disk offering is optional, and if present will be used to create the data disk + + Pair rootDiskOffering = new Pair(null, null); + List> dataDiskOfferings = new ArrayList>(); + + ServiceOfferingVO offering = _serviceOfferingDao.findById(vm.getServiceOfferingId()); + rootDiskOffering.first(offering); + + if(vm.getDiskOfferingId() != null){ + DiskOfferingVO diskOffering = _diskOfferingDao.findById(vm.getDiskOfferingId()); + if (diskOffering == null) { + throw new InvalidParameterValueException("Unable to find disk offering " + vm.getDiskOfferingId()); + } + Long size = null; + if (diskOffering.getDiskSize() == 0) { + size = diskSize; + if (size == null) { + throw new InvalidParameterValueException( + "Disk offering " + diskOffering + + " requires size parameter."); + } + } + dataDiskOfferings.add(new Pair(diskOffering, size)); + } + + + + if (_itMgr.allocate(_userVmDao.findById(vm.getId(), true), _templateDao.findById(new Long(templateId)), offering, rootDiskOffering, dataDiskOfferings, networkIpMap, null, plan, hypervisorType, _accountDao.findById(new Long(owner))) == null) { + return null; + } + + return vmEntity; + } + + @Override + public VirtualMachineEntity createVirtualMachineFromScratch(String id, String owner, String isoId, String hostName, String displayName, String hypervisor, String os, int cpu, int speed, long memory,Long diskSize, + List computeTags, List rootDiskTags, Map networkNicMap, DeploymentPlan plan) throws InsufficientCapacityException { + + // VirtualMachineEntityImpl vmEntity = new VirtualMachineEntityImpl(id, owner, hostName, displayName, cpu, speed, memory, computeTags, rootDiskTags, networks, vmEntityManager); + VirtualMachineEntityImpl vmEntity = ComponentContext.inject(VirtualMachineEntityImpl.class); + vmEntity.init(id, owner, hostName, displayName, cpu, speed, memory, computeTags, rootDiskTags, new ArrayList(networkNicMap.keySet())); + + //load vm instance and offerings and call virtualMachineManagerImpl + VMInstanceVO vm = _vmDao.findByUuid(id); + + + Pair rootDiskOffering = new Pair(null, null); + ServiceOfferingVO offering = _serviceOfferingDao.findById(vm.getServiceOfferingId()); + rootDiskOffering.first(offering); + + List> dataDiskOfferings = new ArrayList>(); + Long diskOfferingId = vm.getDiskOfferingId(); + if (diskOfferingId == null) { + throw new InvalidParameterValueException( + "Installing from ISO requires a disk offering to be specified for the root disk."); + } + DiskOfferingVO diskOffering = _diskOfferingDao.findById(diskOfferingId); + if (diskOffering == null) { + throw new InvalidParameterValueException("Unable to find disk offering " + diskOfferingId); + } + Long size = null; + if (diskOffering.getDiskSize() == 0) { + size = diskSize; + if (size == null) { + throw new InvalidParameterValueException("Disk offering " + + diskOffering + " requires size parameter."); + } + } + rootDiskOffering.first(diskOffering); + rootDiskOffering.second(size); + + List> networkIpMap = new ArrayList>(); + for (String uuid : networkNicMap.keySet()) { + NetworkVO network = _networkDao.findByUuid(uuid); + if(network != null){ + networkIpMap.add(new Pair(network, networkNicMap.get(uuid))); + } + } + + HypervisorType hypervisorType = HypervisorType.valueOf(hypervisor); + + if (_itMgr.allocate(_userVmDao.findById(vm.getId(), true), _templateDao.findById(new Long(isoId)), offering, rootDiskOffering, dataDiskOfferings, networkIpMap, null, plan, hypervisorType, _accountDao.findById(new Long(owner))) == null) { + return null; + } + + return vmEntity; + } + + @Override + public NetworkEntity createNetwork(String id, String name, String domainName, String cidr, String gateway) { + // TODO Auto-generated method stub + return null; + } + + @Override + public VirtualMachineEntity getVirtualMachine(String id) { + VirtualMachineEntityImpl vmEntity = new VirtualMachineEntityImpl(id, vmEntityManager); + return vmEntity; + } + +} diff --git a/engine/orchestration/test/org/apache/cloudstack/engine/provisioning/test/ChildTestConfiguration.java b/engine/orchestration/test/org/apache/cloudstack/engine/provisioning/test/ChildTestConfiguration.java new file mode 100644 index 000000000..3b1721f37 --- /dev/null +++ b/engine/orchestration/test/org/apache/cloudstack/engine/provisioning/test/ChildTestConfiguration.java @@ -0,0 +1,51 @@ +// 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 org.apache.cloudstack.engine.provisioning.test; + + +import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineClusterDao; +import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineDataCenterDao; +import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostDao; +import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostPodDao; +import org.mockito.Mockito; +import org.springframework.context.annotation.Bean; + + + + +public class ChildTestConfiguration { + + @Bean + public EngineDataCenterDao dataCenterDao() { + return Mockito.mock(EngineDataCenterDao.class); + } + + @Bean + public EngineHostPodDao hostPodDao() { + return Mockito.mock(EngineHostPodDao.class); + } + + @Bean + public EngineClusterDao clusterDao() { + return Mockito.mock(EngineClusterDao.class); + } + + @Bean + public EngineHostDao hostDao() { + return Mockito.mock(EngineHostDao.class); + } +} diff --git a/engine/orchestration/test/org/apache/cloudstack/engine/provisioning/test/ProvisioningTest.java b/engine/orchestration/test/org/apache/cloudstack/engine/provisioning/test/ProvisioningTest.java new file mode 100644 index 000000000..0976f838b --- /dev/null +++ b/engine/orchestration/test/org/apache/cloudstack/engine/provisioning/test/ProvisioningTest.java @@ -0,0 +1,137 @@ +// 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 org.apache.cloudstack.engine.provisioning.test; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.datacenter.entity.api.ClusterEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.DataCenterResourceEntity.State; +import org.apache.cloudstack.engine.datacenter.entity.api.HostEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.PodEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.ZoneEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineClusterDao; +import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineDataCenterDao; +import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostDao; +import org.apache.cloudstack.engine.datacenter.entity.api.db.dao.EngineHostPodDao; +import org.apache.cloudstack.engine.service.api.ProvisioningService; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mockito; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineClusterVO; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineDataCenterVO; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostPodVO; +import org.apache.cloudstack.engine.datacenter.entity.api.db.EngineHostVO; + +import com.cloud.dc.DataCenter.NetworkType; + +import junit.framework.TestCase; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations="classpath:/resource/provisioningContext.xml") +public class ProvisioningTest extends TestCase { + + @Inject + ProvisioningService service; + + @Inject + EngineDataCenterDao dcDao; + + @Inject + EngineHostPodDao _podDao; + + @Inject + EngineClusterDao _clusterDao; + + @Inject + EngineHostDao _hostDao; + + @Before + public void setUp() { + EngineDataCenterVO dc = new EngineDataCenterVO(UUID.randomUUID().toString(), "test", "8.8.8.8", null, "10.0.0.1", null, "10.0.0.1/24", + null, null, NetworkType.Basic, null, null, true, true, null, null); + Mockito.when(dcDao.findByUuid(Mockito.anyString())).thenReturn(dc); + Mockito.when(dcDao.persist((EngineDataCenterVO) Mockito.anyObject())).thenReturn(dc); + + EngineHostPodVO pod = new EngineHostPodVO("lab", 123, "10.0.0.1", "10.0.0.1", 24, "test"); + Mockito.when(_podDao.findByUuid(Mockito.anyString())).thenReturn(pod); + Mockito.when(_podDao.persist((EngineHostPodVO) Mockito.anyObject())).thenReturn(pod); + + EngineClusterVO cluster = new EngineClusterVO(); + Mockito.when(_clusterDao.findByUuid(Mockito.anyString())).thenReturn(cluster); + Mockito.when(_clusterDao.persist((EngineClusterVO) Mockito.anyObject())).thenReturn(cluster); + + EngineHostVO host = new EngineHostVO("68765876598"); + Mockito.when(_hostDao.findByUuid(Mockito.anyString())).thenReturn(host); + Mockito.when(_hostDao.persist((EngineHostVO) Mockito.anyObject())).thenReturn(host); + + } + + private void registerAndEnableZone() { + ZoneEntity zone = service.registerZone("47547648", "lab","owner", null, new HashMap()); + State state = zone.getState(); + System.out.println("state:"+state); + boolean result = zone.enable(); + System.out.println("result:"+result); + + } + + private void registerAndEnablePod() { + PodEntity pod = service.registerPod("47547648", "lab","owner", "8709874074", null, new HashMap()); + State state = pod.getState(); + System.out.println("state:"+state); + boolean result = pod.enable(); + System.out.println("result:"+result); + } + + private void registerAndEnableCluster() { + ClusterEntity cluster = service.registerCluster("1265476542", "lab","owner", null, new HashMap()); + State state = cluster.getState(); + System.out.println("state:"+state); + boolean result = cluster.enable(); + System.out.println("result:"+result); + } + + private void registerAndEnableHost() { + HostEntity host = service.registerHost("1265476542", "lab","owner", null, new HashMap()); + State state = host.getState(); + System.out.println("state:"+state); + boolean result = host.enable(); + System.out.println("result:"+result); + } + + @Test + public void testProvisioning() { + registerAndEnableZone(); + registerAndEnablePod(); + registerAndEnableCluster(); + registerAndEnableHost(); + } + + +} diff --git a/engine/orchestration/test/resource/provisioningContext.xml b/engine/orchestration/test/resource/provisioningContext.xml new file mode 100644 index 000000000..6ed0ab5d4 --- /dev/null +++ b/engine/orchestration/test/resource/provisioningContext.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/engine/planning/src/org/apache/cloudstack/platform/planning/Concierge.java b/engine/planning/src/org/apache/cloudstack/platform/planning/Concierge.java new file mode 100755 index 000000000..97dfb2bbf --- /dev/null +++ b/engine/planning/src/org/apache/cloudstack/platform/planning/Concierge.java @@ -0,0 +1,36 @@ +/* + * 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 org.apache.cloudstack.platform.planning; + +import org.apache.cloudstack.framework.ipc.Ipc; + +public interface Concierge { + @Ipc(topic="cs.concierge.reserve") + String reserve(String vm, String planner, Long until); + + @Ipc(topic="cs.concierge.cancel") + String cancel(String reservationId); + + @Ipc(topic="cs.concierge.claim") + String claim(String reservationId); + + @Ipc(topic="cs.concierge.reserveAnother") + String reserveAnother(String reservationId); + +} diff --git a/engine/pom.xml b/engine/pom.xml new file mode 100644 index 000000000..1a3d896d5 --- /dev/null +++ b/engine/pom.xml @@ -0,0 +1,51 @@ + + + 4.0.0 + cloud-engine + Apache CloudStack Cloud Engine + pom + + org.apache.cloudstack + cloudstack + 4.2.0-SNAPSHOT + ../pom.xml + + + install + src + test + + + api + compute + orchestration + storage + storage/volume + storage/image + storage/imagemotion + storage/backup + storage/snapshot + storage/integration-test + components-api + schema + network + service + + diff --git a/engine/schema/pom.xml b/engine/schema/pom.xml new file mode 100644 index 000000000..da40d9cc4 --- /dev/null +++ b/engine/schema/pom.xml @@ -0,0 +1,52 @@ + + + 4.0.0 + cloud-engine-schema + Apache CloudStack Cloud Engine Schema Component + + org.apache.cloudstack + cloud-engine + 4.2.0-SNAPSHOT + ../pom.xml + + + + org.apache.cloudstack + cloud-engine-api + ${project.version} + + + org.apache.cloudstack + cloud-framework-ipc + ${project.version} + + + org.apache.cloudstack + cloud-engine-components-api + ${project.version} + + + + install + src + test + + diff --git a/engine/service/pom.xml b/engine/service/pom.xml new file mode 100644 index 000000000..47c0edcef --- /dev/null +++ b/engine/service/pom.xml @@ -0,0 +1,119 @@ + + + 4.0.0 + + org.apache.cloudstack + cloud-engine + 4.2.0-SNAPSHOT + + cloud-engine-service + war + Apache CloudStack Cloud Engine Service + http://www.cloudstack.org + + + junit + junit + 3.8.1 + test + + + org.apache.cloudstack + cloud-engine-api + ${project.version} + + + org.apache.cloudstack + cloud-engine-schema + ${project.version} + + + org.apache.cloudstack + cloud-engine-components-api + ${project.version} + + + org.apache.cloudstack + cloud-engine-orchestration + ${project.version} + + + org.apache.cloudstack + cloud-engine-storage + ${project.version} + + + org.apache.cloudstack + cloud-engine-network + ${project.version} + + + org.apache.cloudstack + cloud-engine-compute + ${project.version} + + + org.apache.cxf + cxf-bundle-jaxrs + 2.7.0 + + + org.eclipse.jetty + jetty-server + + + + + org.springframework + spring-context + 3.1.2.RELEASE + + + org.springframework + spring-web + 3.1.2.RELEASE + + + + engine + + + org.mortbay.jetty + jetty-maven-plugin + 8.1.7.v20120910 + + 10 + + /engine + + + + 1736 + 60000 + + + + + + + diff --git a/engine/service/src/main/webapp/WEB-INF/beans.xml b/engine/service/src/main/webapp/WEB-INF/beans.xml new file mode 100644 index 000000000..e5bcb8895 --- /dev/null +++ b/engine/service/src/main/webapp/WEB-INF/beans.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + org.apache.cloudstack.framework + + + + + + + + + + + + + + + + + + + + + diff --git a/engine/service/src/main/webapp/WEB-INF/log4j.xml b/engine/service/src/main/webapp/WEB-INF/log4j.xml new file mode 100644 index 000000000..df46461f9 --- /dev/null +++ b/engine/service/src/main/webapp/WEB-INF/log4j.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/engine/service/src/main/webapp/WEB-INF/web.xml b/engine/service/src/main/webapp/WEB-INF/web.xml new file mode 100644 index 000000000..6b8648a5b --- /dev/null +++ b/engine/service/src/main/webapp/WEB-INF/web.xml @@ -0,0 +1,52 @@ + + + + + + contextConfigLocation + WEB-INF/beans.xml + + + + org.springframework.web.context.ContextLoaderListener + + + + org.springframework.web.util.Log4jConfigListener + + + CXFServlet + CXF Servlet + + org.apache.cxf.transport.servlet.CXFServlet + + 1 + + + CXFServlet + /rest/* + + diff --git a/engine/service/src/main/webapp/index.jsp b/engine/service/src/main/webapp/index.jsp new file mode 100644 index 000000000..6b26cc21c --- /dev/null +++ b/engine/service/src/main/webapp/index.jsp @@ -0,0 +1,23 @@ + + + +

Hello World!

+ + diff --git a/engine/storage/backup/pom.xml b/engine/storage/backup/pom.xml new file mode 100644 index 000000000..019e09c72 --- /dev/null +++ b/engine/storage/backup/pom.xml @@ -0,0 +1,50 @@ + + + 4.0.0 + cloud-engine-storage-backup + Apache CloudStack Engine Storage Backup Component + + org.apache.cloudstack + cloud-engine + 4.2.0-SNAPSHOT + ../../pom.xml + + + + org.apache.cloudstack + cloud-engine-storage + ${project.version} + + + mysql + mysql-connector-java + ${cs.mysql.version} + provided + + + org.mockito + mockito-all + 1.9.5 + + + javax.inject + javax.inject + 1 + + + + install + src + test + + diff --git a/engine/storage/backup/src/org/apache/cloudstack/storage/backup/BackupMotionService.java b/engine/storage/backup/src/org/apache/cloudstack/storage/backup/BackupMotionService.java new file mode 100644 index 000000000..cb49027f3 --- /dev/null +++ b/engine/storage/backup/src/org/apache/cloudstack/storage/backup/BackupMotionService.java @@ -0,0 +1,23 @@ +/* + * 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 org.apache.cloudstack.storage.backup; + +public interface BackupMotionService { + boolean copySnapshot(String snapshotUri, String destSnapshotUri); +} diff --git a/engine/storage/backup/src/org/apache/cloudstack/storage/backup/BackupService.java b/engine/storage/backup/src/org/apache/cloudstack/storage/backup/BackupService.java new file mode 100644 index 000000000..67924d2ce --- /dev/null +++ b/engine/storage/backup/src/org/apache/cloudstack/storage/backup/BackupService.java @@ -0,0 +1,26 @@ +/* + * 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 org.apache.cloudstack.storage.backup; + +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; + +public interface BackupService { + public boolean backupSnapshot(SnapshotInfo snapshot, long backupStoreId); + public SnapshotOnBackupStoreInfo getSnapshot(long snapshotId); +} diff --git a/engine/storage/image/pom.xml b/engine/storage/image/pom.xml new file mode 100644 index 000000000..c4cf14ca9 --- /dev/null +++ b/engine/storage/image/pom.xml @@ -0,0 +1,50 @@ + + + 4.0.0 + cloud-engine-storage-image + Apache CloudStack Engine Storage Image Component + + org.apache.cloudstack + cloud-engine + 4.2.0-SNAPSHOT + ../../pom.xml + + + + org.apache.cloudstack + cloud-engine-storage + ${project.version} + + + mysql + mysql-connector-java + ${cs.mysql.version} + provided + + + org.mockito + mockito-all + 1.9.5 + + + javax.inject + javax.inject + 1 + + + + install + src + test + + diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageDataFactoryImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageDataFactoryImpl.java new file mode 100644 index 000000000..616e4789a --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageDataFactoryImpl.java @@ -0,0 +1,93 @@ +/* + * 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 org.apache.cloudstack.storage.image; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager; +import org.apache.cloudstack.storage.image.store.TemplateObject; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.storage.VMTemplateStoragePoolVO; +import com.cloud.storage.VMTemplateVO; +import com.cloud.storage.dao.VMTemplateDao; +import com.cloud.storage.dao.VMTemplatePoolDao; + +@Component +public class ImageDataFactoryImpl implements ImageDataFactory { + private static final Logger s_logger = Logger + .getLogger(ImageDataFactoryImpl.class); + @Inject + VMTemplateDao imageDataDao; + @Inject + ObjectInDataStoreManager objMap; + @Inject + DataStoreManager storeMgr; + @Inject + VMTemplatePoolDao templatePoolDao; + @Override + public TemplateInfo getTemplate(long templateId, DataStore store) { + VMTemplateVO templ = imageDataDao.findById(templateId); + if (store == null) { + TemplateObject tmpl = TemplateObject.getTemplate(templ, null); + return tmpl; + } + boolean found = false; + if (store.getRole() == DataStoreRole.Primary) { + VMTemplateStoragePoolVO templatePoolVO = templatePoolDao.findByPoolTemplate(store.getId(), templateId); + if (templatePoolVO != null) { + found = true; + } + } else { + DataObjectInStore obj = objMap.findObject(templ.getUuid(), DataObjectType.TEMPLATE, store.getUuid(), store.getRole()); + if (obj != null) { + found = true; + } + } + + if (!found) { + s_logger.debug("template " + templateId + " is not in store:" + store.getId() + ", type:" + store.getRole()); + } + + TemplateObject tmpl = TemplateObject.getTemplate(templ, store); + return tmpl; + } + @Override + public TemplateInfo getTemplate(long templateId) { + VMTemplateVO templ = imageDataDao.findById(templateId); + if (templ.getImageDataStoreId() == null) { + return this.getTemplate(templateId, null); + } + DataStore store = this.storeMgr.getDataStore(templ.getImageDataStoreId(), DataStoreRole.Image); + return this.getTemplate(templateId, store); + } + @Override + public TemplateInfo getTemplate(DataObject obj, DataStore store) { + return this.getTemplate(obj.getId(), store); + } +} diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageOrchestrator.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageOrchestrator.java new file mode 100644 index 000000000..e4141f3fa --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageOrchestrator.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.cloudstack.storage.image; + +public interface ImageOrchestrator { + void registerTemplate(long templateId); + + void registerSnapshot(long snapshotId); + + void registerVolume(long volumeId); + + void registerIso(long isoId); +} diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageServiceImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageServiceImpl.java new file mode 100644 index 000000000..5898b1b07 --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/ImageServiceImpl.java @@ -0,0 +1,156 @@ +/* + * 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 org.apache.cloudstack.storage.image; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.ImageService; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateEvent; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.framework.async.AsyncCallFuture; +import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.framework.async.AsyncRpcConext; +import org.apache.cloudstack.storage.datastore.DataObjectManager; +import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager; +import org.apache.cloudstack.storage.image.store.TemplateObject; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.utils.fsm.NoTransitionException; + +@Component +public class ImageServiceImpl implements ImageService { + private static final Logger s_logger = Logger.getLogger(ImageServiceImpl.class); + @Inject + ObjectInDataStoreManager objectInDataStoreMgr; + @Inject + DataObjectManager dataObjectMgr; + + class CreateTemplateContext extends AsyncRpcConext { + final TemplateInfo srcTemplate; + final DataStore store; + final AsyncCallFuture future; + final DataObject templateOnStore; + + public CreateTemplateContext(AsyncCompletionCallback callback, TemplateInfo srcTemplate, + AsyncCallFuture future, + DataStore store, + DataObject templateOnStore + ) { + super(callback); + this.srcTemplate = srcTemplate; + this.future = future; + this.store = store; + this.templateOnStore = templateOnStore; + } + } + + @Override + public AsyncCallFuture createTemplateAsync( + TemplateInfo template, DataStore store) { + TemplateObject to = (TemplateObject) template; + AsyncCallFuture future = new AsyncCallFuture(); + try { + to.stateTransit(TemplateEvent.CreateRequested); + } catch (NoTransitionException e) { + s_logger.debug("Failed to transit state:", e); + CommandResult result = new CommandResult(); + result.setResult(e.toString()); + future.complete(result); + return future; + } + + DataObject templateOnStore = store.create(template); + templateOnStore.processEvent(ObjectInDataStoreStateMachine.Event.CreateOnlyRequested); + + CreateTemplateContext context = new CreateTemplateContext(null, + template, + future, + store, + templateOnStore + ); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setCallback(caller.getTarget().createTemplateCallback(null, null)) + .setContext(context); + store.getDriver().createAsync(templateOnStore, caller); + return future; + } + + protected Void createTemplateCallback(AsyncCallbackDispatcher callback, + CreateTemplateContext context) { + TemplateObject template = (TemplateObject)context.srcTemplate; + AsyncCallFuture future = context.future; + CommandResult result = new CommandResult(); + DataObject templateOnStore = context.templateOnStore; + CreateCmdResult callbackResult = callback.getResult(); + if (callbackResult.isFailed()) { + try { + templateOnStore.processEvent(ObjectInDataStoreStateMachine.Event.OperationFailed); + template.stateTransit(TemplateEvent.OperationFailed); + } catch (NoTransitionException e) { + s_logger.debug("Failed to update template state", e); + } + result.setResult(callbackResult.getResult()); + future.complete(result); + return null; + } + + try { + templateOnStore.processEvent(ObjectInDataStoreStateMachine.Event.OperationSuccessed); + template.stateTransit(TemplateEvent.OperationSucceeded); + } catch (NoTransitionException e) { + s_logger.debug("Failed to transit state", e); + result.setResult(e.toString()); + future.complete(result); + return null; + } + + future.complete(result); + return null; + } + + @Override + public AsyncCallFuture deleteTemplateAsync( + TemplateInfo template) { + // TODO Auto-generated method stub + return null; + } + + @Override + public AsyncCallFuture createTemplateFromSnapshotAsync( + SnapshotInfo snapshot, TemplateInfo template, DataStore store) { + // TODO Auto-generated method stub + return null; + } + + @Override + public AsyncCallFuture createTemplateFromVolumeAsync( + VolumeInfo volume, TemplateInfo template, DataStore store) { + // TODO Auto-generated method stub + return null; + } +} diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/downloader/ImageDownloader.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/downloader/ImageDownloader.java new file mode 100644 index 000000000..af572d49a --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/downloader/ImageDownloader.java @@ -0,0 +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. + */ +package org.apache.cloudstack.storage.image.downloader; + +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; + +public interface ImageDownloader { + public void downloadImage(TemplateInfo template); +} diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/driver/AncientImageDataStoreDriverImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/driver/AncientImageDataStoreDriverImpl.java new file mode 100644 index 000000000..4c16f2fe4 --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/driver/AncientImageDataStoreDriverImpl.java @@ -0,0 +1,254 @@ +/* + * 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 org.apache.cloudstack.storage.image.driver; + +import java.util.List; +import java.util.Set; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.framework.async.AsyncRpcConext; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.apache.cloudstack.storage.image.ImageDataStoreDriver; +import org.apache.log4j.Logger; + +import com.cloud.agent.AgentManager; +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.DeleteSnapshotBackupCommand; +import com.cloud.agent.api.storage.DeleteVolumeCommand; +import com.cloud.agent.api.to.S3TO; +import com.cloud.agent.api.to.SwiftTO; +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.storage.RegisterVolumePayload; +import com.cloud.storage.SnapshotVO; +import com.cloud.storage.Storage.ImageFormat; +import com.cloud.storage.VMTemplateStorageResourceAssoc; +import com.cloud.storage.VMTemplateVO; +import com.cloud.storage.VMTemplateZoneVO; +import com.cloud.storage.VolumeHostVO; +import com.cloud.storage.VolumeVO; +import com.cloud.storage.dao.SnapshotDao; +import com.cloud.storage.dao.VMTemplateDao; +import com.cloud.storage.dao.VMTemplateHostDao; +import com.cloud.storage.dao.VMTemplateZoneDao; +import com.cloud.storage.dao.VolumeDao; +import com.cloud.storage.dao.VolumeHostDao; +import com.cloud.storage.download.DownloadMonitor; +import com.cloud.storage.s3.S3Manager; +import com.cloud.storage.snapshot.SnapshotManager; +import com.cloud.storage.swift.SwiftManager; +import com.cloud.utils.exception.CloudRuntimeException; + +public class AncientImageDataStoreDriverImpl implements ImageDataStoreDriver { + private static final Logger s_logger = Logger + .getLogger(AncientImageDataStoreDriverImpl.class); + @Inject + VMTemplateZoneDao templateZoneDao; + @Inject + VMTemplateDao templateDao; + @Inject DownloadMonitor _downloadMonitor; + @Inject + VMTemplateHostDao _vmTemplateHostDao; + @Inject VolumeDao volumeDao; + @Inject VolumeHostDao volumeHostDao; + @Inject HostDao hostDao; + @Inject SnapshotDao snapshotDao; + @Inject AgentManager agentMgr; + @Inject SnapshotManager snapshotMgr; + @Inject PrimaryDataStoreDao primaryDataStoreDao; + @Inject + private SwiftManager _swiftMgr; + @Inject + private S3Manager _s3Mgr; + @Override + public String grantAccess(DataObject data, EndPoint ep) { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean revokeAccess(DataObject data, EndPoint ep) { + // TODO Auto-generated method stub + return false; + } + + @Override + public Set listObjects(DataStore store) { + // TODO Auto-generated method stub + return null; + } + + class CreateContext extends AsyncRpcConext { + final DataObject data; + public CreateContext(AsyncCompletionCallback callback, DataObject data) { + super(callback); + this.data = data; + } + } + + @Override + public void createAsync(DataObject data, + AsyncCompletionCallback callback) { + if (data.getType() == DataObjectType.TEMPLATE) { + List templateZones = this.templateZoneDao.listByTemplateId(data.getId()); + for (VMTemplateZoneVO templateZone : templateZones) { + VMTemplateVO template = this.templateDao.findById(data.getId()); + _downloadMonitor.downloadTemplateToStorage(template, templateZone.getZoneId()); + } + } else if (data.getType() == DataObjectType.VOLUME) { + VolumeVO vol = this.volumeDao.findById(data.getId()); + VolumeInfo volInfo = (VolumeInfo)data; + RegisterVolumePayload payload = (RegisterVolumePayload)volInfo.getpayload(); + _downloadMonitor.downloadVolumeToStorage(vol, vol.getDataCenterId(), payload.getUrl(), + payload.getChecksum(), ImageFormat.valueOf(payload.getFormat().toUpperCase())); + } + + CreateCmdResult result = new CreateCmdResult(null, null); + callback.complete(result); + } + + private void deleteVolume(DataObject data, AsyncCompletionCallback callback) { + // TODO Auto-generated method stub + VolumeVO vol = volumeDao.findById(data.getId()); + if (s_logger.isDebugEnabled()) { + s_logger.debug("Expunging " + vol); + } + + // Find out if the volume is present on secondary storage + VolumeHostVO volumeHost = volumeHostDao.findByVolumeId(vol.getId()); + if (volumeHost != null) { + if (volumeHost.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOADED) { + HostVO ssHost = hostDao.findById(volumeHost.getHostId()); + DeleteVolumeCommand dtCommand = new DeleteVolumeCommand( + ssHost.getStorageUrl(), volumeHost.getInstallPath()); + Answer answer = agentMgr.sendToSecStorage(ssHost, dtCommand); + if (answer == null || !answer.getResult()) { + s_logger.debug("Failed to delete " + + volumeHost + + " due to " + + ((answer == null) ? "answer is null" : answer + .getDetails())); + return; + } + } else if (volumeHost.getDownloadState() == VMTemplateStorageResourceAssoc.Status.DOWNLOAD_IN_PROGRESS) { + s_logger.debug("Volume: " + vol.getName() + + " is currently being uploaded; cant' delete it."); + throw new CloudRuntimeException( + "Please specify a volume that is not currently being uploaded."); + } + volumeHostDao.remove(volumeHost.getId()); + volumeDao.remove(vol.getId()); + CommandResult result = new CommandResult(); + callback.complete(result); + return; + } + } + + private void deleteTemplate(DataObject data, AsyncCompletionCallback callback) { + + } + + private void deleteSnapshot(DataObject data, AsyncCompletionCallback callback) { + Long snapshotId = data.getId(); + SnapshotVO snapshot = this.snapshotDao.findByIdIncludingRemoved(snapshotId); + CommandResult result = new CommandResult(); + if (snapshot == null) { + s_logger.debug("Destroying snapshot " + snapshotId + " backup failed due to unable to find snapshot "); + result.setResult("Unable to find snapshot: " + snapshotId); + callback.complete(result); + return; + } + + try { + String secondaryStoragePoolUrl = this.snapshotMgr.getSecondaryStorageURL(snapshot); + Long dcId = snapshot.getDataCenterId(); + Long accountId = snapshot.getAccountId(); + Long volumeId = snapshot.getVolumeId(); + + String backupOfSnapshot = snapshot.getBackupSnapshotId(); + if (backupOfSnapshot == null) { + callback.complete(result); + return; + } + SwiftTO swift = _swiftMgr.getSwiftTO(snapshot.getSwiftId()); + S3TO s3 = _s3Mgr.getS3TO(); + VolumeVO volume = volumeDao.findById(volumeId); + StoragePoolVO pool = primaryDataStoreDao.findById(volume.getPoolId()); + DeleteSnapshotBackupCommand cmd = new DeleteSnapshotBackupCommand( + pool, swift, s3, secondaryStoragePoolUrl, dcId, accountId, volumeId, + backupOfSnapshot, false); + Answer answer = agentMgr.sendToSSVM(dcId, cmd); + + if ((answer != null) && answer.getResult()) { + snapshot.setBackupSnapshotId(null); + snapshotDao.update(snapshotId, snapshot); + } else if (answer != null) { + result.setResult(answer.getDetails()); + } + } catch (Exception e) { + s_logger.debug("failed to delete snapshot: " + snapshotId + ": " + e.toString()); + result.setResult(e.toString()); + } + callback.complete(result); + } + + @Override + public void deleteAsync(DataObject data, + AsyncCompletionCallback callback) { + if (data.getType() == DataObjectType.VOLUME) { + deleteVolume(data, callback); + } else if (data.getType() == DataObjectType.TEMPLATE) { + deleteTemplate(data, callback); + } else if (data.getType() == DataObjectType.SNAPSHOT) { + deleteSnapshot(data, callback); + } + } + + @Override + public void copyAsync(DataObject srcdata, DataObject destData, + AsyncCompletionCallback callback) { + // TODO Auto-generated method stub + + } + + @Override + public boolean canCopy(DataObject srcData, DataObject destData) { + // TODO Auto-generated method stub + return false; + } + + @Override + public void resize(DataObject data, + AsyncCompletionCallback callback) { + // TODO Auto-generated method stub + + } + +} diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/driver/DefaultImageDataStoreDriverImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/driver/DefaultImageDataStoreDriverImpl.java new file mode 100644 index 000000000..3d46c73cd --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/driver/DefaultImageDataStoreDriverImpl.java @@ -0,0 +1,126 @@ +/* + * 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 org.apache.cloudstack.storage.image.driver; + +import java.util.Set; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.storage.command.CreateObjectAnswer; +import org.apache.cloudstack.storage.command.CreateObjectCommand; +import org.apache.cloudstack.storage.endpoint.EndPointSelector; +import org.apache.cloudstack.storage.image.ImageDataStoreDriver; + +import com.cloud.storage.dao.VMTemplateDao; + +//http-read-only based image store +public class DefaultImageDataStoreDriverImpl implements ImageDataStoreDriver { + @Inject + EndPointSelector selector; + @Inject + VMTemplateDao imageDataDao; + public DefaultImageDataStoreDriverImpl() { + } + + @Override + public String grantAccess(DataObject data, EndPoint ep) { + return data.getUri(); + } + + @Override + public boolean revokeAccess(DataObject data, EndPoint ep) { + // TODO Auto-generated method stub + return true; + } + + @Override + public Set listObjects(DataStore store) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void createAsync(DataObject data, + AsyncCompletionCallback callback) { + //for default http data store, can create http based template/iso + CreateCmdResult result = new CreateCmdResult("", null); + if (!data.getUri().startsWith("http")) { + result.setResult("can't register an image which is not a http link"); + callback.complete(result); + return; + } + + if (data.getSize() == null && data.getType() == DataObjectType.TEMPLATE) { + //the template size is unknown during registration, need to find out the size of template + EndPoint ep = selector.select(data); + if (ep == null) { + result.setResult("can't find storage client for:" + data.getId() + "," + data.getType()); + callback.complete(result); + return; + } + CreateObjectCommand createCmd = new CreateObjectCommand(data.getUri()); + CreateObjectAnswer answer = (CreateObjectAnswer)ep.sendMessage(createCmd); + if (answer.getResult()) { + //update imagestorevo + + result = new CreateCmdResult(answer.getPath(), answer.getSize()); + } else { + result.setResult(answer.getDetails()); + } + + } + + callback.complete(result); + } + + @Override + public void deleteAsync(DataObject data, + AsyncCompletionCallback callback) { + CommandResult result = new CommandResult(); + callback.complete(result); + } + + @Override + public boolean canCopy(DataObject srcData, DataObject destData) { + // TODO Auto-generated method stub + return false; + } + + @Override + public void copyAsync(DataObject srcdata, DataObject destData, + AsyncCompletionCallback callback) { + // TODO Auto-generated method stub + + } + + @Override + public void resize(DataObject data, + AsyncCompletionCallback callback) { + // TODO Auto-generated method stub + + } +} diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/manager/ImageDataManager.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/manager/ImageDataManager.java new file mode 100644 index 000000000..e1fd46b76 --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/manager/ImageDataManager.java @@ -0,0 +1,30 @@ +/* + * 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 org.apache.cloudstack.storage.image.manager; + +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateEvent; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateState; + +import com.cloud.storage.VMTemplateVO; +import com.cloud.utils.fsm.StateMachine2; + +public interface ImageDataManager { + StateMachine2 getStateMachine(); + +} diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/manager/ImageDataManagerImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/manager/ImageDataManagerImpl.java new file mode 100644 index 000000000..83e988781 --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/manager/ImageDataManagerImpl.java @@ -0,0 +1,50 @@ +/* + * 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 org.apache.cloudstack.storage.image.manager; + +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateEvent; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateState; +import org.springframework.stereotype.Component; + +import com.cloud.storage.VMTemplateVO; +import com.cloud.utils.fsm.StateMachine2; + +@Component +public class ImageDataManagerImpl implements ImageDataManager { + private final StateMachine2 + stateMachine = new StateMachine2(); + + public ImageDataManagerImpl() { + stateMachine.addTransition(TemplateState.Allocated, TemplateEvent.CreateRequested, TemplateState.Creating); + stateMachine.addTransition(TemplateState.Creating, TemplateEvent.CreateRequested, TemplateState.Creating); + stateMachine.addTransition(TemplateState.Creating, TemplateEvent.OperationSucceeded, TemplateState.Ready); + stateMachine.addTransition(TemplateState.Creating, TemplateEvent.OperationFailed, TemplateState.Allocated); + stateMachine.addTransition(TemplateState.Creating, TemplateEvent.DestroyRequested, TemplateState.Destroying); + stateMachine.addTransition(TemplateState.Ready, TemplateEvent.DestroyRequested, TemplateState.Destroying); + stateMachine.addTransition(TemplateState.Allocated, TemplateEvent.DestroyRequested, TemplateState.Destroying); + stateMachine.addTransition(TemplateState.Destroying, TemplateEvent.DestroyRequested, TemplateState.Destroying); + stateMachine.addTransition(TemplateState.Destroying, TemplateEvent.OperationFailed, TemplateState.Destroying); + stateMachine.addTransition(TemplateState.Destroying, TemplateEvent.OperationSucceeded, TemplateState.Destroyed); + } + + @Override + public StateMachine2 getStateMachine() { + return stateMachine; + } +} diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/manager/ImageDataStoreManagerImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/manager/ImageDataStoreManagerImpl.java new file mode 100644 index 000000000..bc546f8d0 --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/manager/ImageDataStoreManagerImpl.java @@ -0,0 +1,94 @@ +/* + * 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 org.apache.cloudstack.storage.image.manager; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.annotation.PostConstruct; +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProviderManager; +import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataStoreProvider; +import org.apache.cloudstack.storage.image.ImageDataStoreDriver; +import org.apache.cloudstack.storage.image.datastore.ImageDataStore; +import org.apache.cloudstack.storage.image.datastore.ImageDataStoreManager; +import org.apache.cloudstack.storage.image.db.ImageDataStoreDao; +import org.apache.cloudstack.storage.image.db.ImageDataStoreVO; +import org.apache.cloudstack.storage.image.store.DefaultImageDataStoreImpl; +import org.springframework.stereotype.Component; + +import com.cloud.storage.dao.VMTemplateDao; + +@Component +public class ImageDataStoreManagerImpl implements ImageDataStoreManager { + @Inject + ImageDataStoreDao dataStoreDao; + @Inject + VMTemplateDao imageDataDao; + @Inject + DataStoreProviderManager providerManager; + Map driverMaps; + + @PostConstruct + public void config() { + driverMaps = new HashMap(); + } + + @Override + public ImageDataStore getImageDataStore(long dataStoreId) { + ImageDataStoreVO dataStore = dataStoreDao.findById(dataStoreId); + String providerName = dataStore.getProviderName(); + ImageDataStoreProvider provider = (ImageDataStoreProvider)providerManager.getDataStoreProvider(providerName); + ImageDataStore imgStore = DefaultImageDataStoreImpl.getDataStore(dataStore, + driverMaps.get(provider.getName()), provider + ); + // TODO Auto-generated method stub + return imgStore; + } + + @Override + public boolean registerDriver(String providerName, ImageDataStoreDriver driver) { + if (driverMaps.containsKey(providerName)) { + return false; + } + driverMaps.put(providerName, driver); + return true; + } + + @Override + public ImageDataStore getImageDataStore(String uuid) { + ImageDataStoreVO dataStore = dataStoreDao.findByUuid(uuid); + return getImageDataStore(dataStore.getId()); + } + + @Override + public List getList() { + List stores = dataStoreDao.listAll(); + List imageStores = new ArrayList(); + for (ImageDataStoreVO store : stores) { + imageStores.add(getImageDataStore(store.getId())); + } + return imageStores; + } + +} diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/store/AncientImageDataStoreProvider.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/AncientImageDataStoreProvider.java new file mode 100644 index 000000000..2715dc7e0 --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/AncientImageDataStoreProvider.java @@ -0,0 +1,101 @@ +/* + * 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 org.apache.cloudstack.storage.image.store; + +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; +import java.util.UUID; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreLifeCycle; +import org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener; +import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataStoreProvider; +import org.apache.cloudstack.engine.subsystem.api.storage.ScopeType; +import org.apache.cloudstack.storage.image.ImageDataStoreDriver; +import org.apache.cloudstack.storage.image.datastore.ImageDataStoreHelper; +import org.apache.cloudstack.storage.image.datastore.ImageDataStoreManager; +import org.apache.cloudstack.storage.image.driver.AncientImageDataStoreDriverImpl; +import org.apache.cloudstack.storage.image.store.lifecycle.DefaultImageDataStoreLifeCycle; +import org.apache.cloudstack.storage.image.store.lifecycle.ImageDataStoreLifeCycle; +import org.springframework.stereotype.Component; + +import com.cloud.utils.component.ComponentContext; + +@Component +public class AncientImageDataStoreProvider implements ImageDataStoreProvider { + + private final String name = "ancient image data store"; + protected ImageDataStoreLifeCycle lifeCycle; + protected ImageDataStoreDriver driver; + @Inject + ImageDataStoreManager storeMgr; + @Inject + ImageDataStoreHelper helper; + + @Override + public DataStoreLifeCycle getDataStoreLifeCycle() { + return lifeCycle; + } + + @Override + public String getName() { + return this.name; + } + + @Override + public boolean configure(Map params) { + lifeCycle = ComponentContext.inject(DefaultImageDataStoreLifeCycle.class); + driver = ComponentContext.inject(AncientImageDataStoreDriverImpl.class); + + storeMgr.registerDriver(this.getName(), driver); + + Map infos = new HashMap(); + String dataStoreName = UUID.nameUUIDFromBytes(this.name.getBytes()).toString(); + infos.put("name", dataStoreName); + infos.put("uuid", dataStoreName); + infos.put("protocol", "http"); + infos.put("scope", ScopeType.GLOBAL); + infos.put("providerName", this.getName()); + DataStoreLifeCycle lifeCycle = this.getDataStoreLifeCycle(); + lifeCycle.initialize(infos); + return true; + } + + @Override + public DataStoreDriver getDataStoreDriver() { + return this.driver; + } + + @Override + public HypervisorHostListener getHostListener() { + return null; + } + + @Override + public Set getTypes() { + Set types = new HashSet(); + types.add(DataStoreProviderType.IMAGE); + return types; + } + +} diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/store/DefaultImageDataStoreImpl.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/DefaultImageDataStoreImpl.java new file mode 100644 index 000000000..6eefc6f43 --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/DefaultImageDataStoreImpl.java @@ -0,0 +1,145 @@ +/* + * 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 org.apache.cloudstack.storage.image.store; + +import java.util.Set; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataStoreProvider; +import org.apache.cloudstack.engine.subsystem.api.storage.Scope; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope; +import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager; +import org.apache.cloudstack.storage.image.ImageDataStoreDriver; +import org.apache.cloudstack.storage.image.datastore.ImageDataStore; +import org.apache.cloudstack.storage.image.db.ImageDataStoreVO; + +import com.cloud.storage.dao.VMTemplateDao; +import com.cloud.utils.component.ComponentContext; +import com.cloud.utils.storage.encoding.EncodingType; + + +public class DefaultImageDataStoreImpl implements ImageDataStore { + @Inject + VMTemplateDao imageDao; + @Inject + private ObjectInDataStoreManager objectInStoreMgr; + protected ImageDataStoreDriver driver; + protected ImageDataStoreVO imageDataStoreVO; + protected ImageDataStoreProvider provider; + boolean needDownloadToCacheStorage = false; + + public DefaultImageDataStoreImpl() { + + } + + protected void configure(ImageDataStoreVO dataStoreVO, ImageDataStoreDriver imageDataStoreDriver, + ImageDataStoreProvider provider) { + this.driver = imageDataStoreDriver; + this.imageDataStoreVO = dataStoreVO; + this.provider = provider; + } + + public static ImageDataStore getDataStore(ImageDataStoreVO dataStoreVO, ImageDataStoreDriver imageDataStoreDriver, + ImageDataStoreProvider provider) { + DefaultImageDataStoreImpl instance = (DefaultImageDataStoreImpl)ComponentContext.inject(DefaultImageDataStoreImpl.class); + instance.configure(dataStoreVO, imageDataStoreDriver, provider); + return instance; + } + + @Override + public Set listTemplates() { + // TODO Auto-generated method stub + return null; + } + + @Override + public DataStoreDriver getDriver() { + // TODO Auto-generated method stub + return this.driver; + } + + @Override + public DataStoreRole getRole() { + // TODO Auto-generated method stub + return DataStoreRole.Image; + } + @Override + public long getId() { + // TODO Auto-generated method stub + return this.imageDataStoreVO.getId(); + } + + @Override + public String getUri() { + return this.imageDataStoreVO.getProtocol() + "://" + "?" + EncodingType.ROLE + "=" + this.getRole(); + } + + @Override + public Scope getScope() { + return new ZoneScope(imageDataStoreVO.getDcId()); + } + + @Override + public TemplateInfo getTemplate(long templateId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public VolumeInfo getVolume(long volumeId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public SnapshotInfo getSnapshot(long snapshotId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean exists(DataObject object) { + return (objectInStoreMgr.findObject(object, + this) != null) ? true : false; + } + + @Override + public String getUuid() { + return this.imageDataStoreVO.getUuid(); + } + + @Override + public DataObject create(DataObject obj) { + DataObject object = objectInStoreMgr.create(obj, this); + return object; + } + + @Override + public boolean delete(DataObject obj) { + // TODO Auto-generated method stub + return false; + } +} diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/store/DefaultImageDataStoreProvider.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/DefaultImageDataStoreProvider.java new file mode 100644 index 000000000..0b5de8588 --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/DefaultImageDataStoreProvider.java @@ -0,0 +1,82 @@ +/* + * 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 org.apache.cloudstack.storage.image.store; + +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreLifeCycle; +import org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener; +import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataStoreProvider; +import org.apache.cloudstack.storage.image.ImageDataStoreDriver; +import org.apache.cloudstack.storage.image.datastore.ImageDataStoreManager; +import org.apache.cloudstack.storage.image.driver.DefaultImageDataStoreDriverImpl; +import org.apache.cloudstack.storage.image.store.lifecycle.DefaultImageDataStoreLifeCycle; +import org.apache.cloudstack.storage.image.store.lifecycle.ImageDataStoreLifeCycle; + +import com.cloud.utils.component.ComponentContext; + +public class DefaultImageDataStoreProvider implements ImageDataStoreProvider { + private final String name = "default image data store"; + protected ImageDataStoreLifeCycle lifeCycle; + protected ImageDataStoreDriver driver; + @Inject + ImageDataStoreManager storeMgr; + long id; + String uuid; + @Override + public DataStoreLifeCycle getDataStoreLifeCycle() { + return lifeCycle; + } + + @Override + public String getName() { + return this.name; + } + + @Override + public boolean configure(Map params) { + lifeCycle = ComponentContext.inject(DefaultImageDataStoreLifeCycle.class); + driver = ComponentContext.inject(DefaultImageDataStoreDriverImpl.class); + + storeMgr.registerDriver(this.getName(), driver); + return true; + } + + @Override + public Set getTypes() { + Set types = new HashSet(); + types.add(DataStoreProviderType.IMAGE); + return types; + } + + @Override + public DataStoreDriver getDataStoreDriver() { + return this.driver; + } + + @Override + public HypervisorHostListener getHostListener() { + return null; + } +} diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/store/TemplateObject.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/TemplateObject.java new file mode 100644 index 000000000..b6c20046c --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/TemplateObject.java @@ -0,0 +1,183 @@ +/* + * 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 org.apache.cloudstack.storage.image.store; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateEvent; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.disktype.DiskFormat; +import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager; +import org.apache.cloudstack.storage.image.manager.ImageDataManager; +import org.apache.log4j.Logger; + +import com.cloud.storage.VMTemplateVO; +import com.cloud.storage.dao.VMTemplateDao; +import com.cloud.storage.dao.VMTemplatePoolDao; +import com.cloud.utils.component.ComponentContext; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.fsm.NoTransitionException; +import com.cloud.utils.storage.encoding.EncodingType; + +public class TemplateObject implements TemplateInfo { + private static final Logger s_logger = Logger + .getLogger(TemplateObject.class); + private VMTemplateVO imageVO; + private DataStore dataStore; + @Inject + ImageDataManager imageMgr; + @Inject + VMTemplateDao imageDao; + @Inject + ObjectInDataStoreManager ojbectInStoreMgr; + @Inject VMTemplatePoolDao templatePoolDao; + + public TemplateObject() { + } + + protected void configure(VMTemplateVO template, DataStore dataStore) { + this.imageVO = template; + this.dataStore = dataStore; + } + + public static TemplateObject getTemplate(VMTemplateVO vo, DataStore store) { + TemplateObject to = ComponentContext.inject(TemplateObject.class); + to.configure(vo, store); + return to; + } + + public void setImageStoreId(long id) { + this.imageVO.setImageDataStoreId(id); + } + + public void setSize(Long size) { + this.imageVO.setSize(size); + } + + public VMTemplateVO getImage() { + return this.imageVO; + } + + @Override + public DataStore getDataStore() { + return this.dataStore; + } + + @Override + public long getId() { + return this.imageVO.getId(); + } + + @Override + public String getUuid() { + return this.imageVO.getUuid(); + } + + @Override + public String getUri() { + VMTemplateVO image = imageDao.findById(this.imageVO.getId()); + if (this.dataStore == null) { + return image.getUrl(); + } else { + DataObjectInStore obj = ojbectInStoreMgr.findObject(this, this.dataStore); + StringBuilder builder = new StringBuilder(); + if (obj.getState() == ObjectInDataStoreStateMachine.State.Ready + || obj.getState() == ObjectInDataStoreStateMachine.State.Copying) { + + builder.append(this.dataStore.getUri()); + builder.append("&" + EncodingType.OBJTYPE + "=" + DataObjectType.TEMPLATE); + builder.append("&" + EncodingType.PATH + "=" + obj.getInstallPath()); + builder.append("&" + EncodingType.SIZE + "=" + image.getSize()); + return builder.toString(); + } else { + builder.append(this.dataStore.getUri()); + builder.append("&" + EncodingType.OBJTYPE + "=" + DataObjectType.TEMPLATE); + builder.append("&" + EncodingType.SIZE + "=" + image.getSize()); + builder.append("&" + EncodingType.PATH + "=" + image.getUrl()); + return builder.toString(); + } + } + } + + @Override + public Long getSize() { + if (this.dataStore == null) { + return this.imageVO.getSize(); + } + + /* + +// If the template that was passed into this allocator is not installed in the storage pool, + // add 3 * (template size on secondary storage) to the running total + VMTemplateHostVO templateHostVO = _storageMgr.findVmTemplateHost(templateForVmCreation.getId(), null); + + if (templateHostVO == null) { + VMTemplateSwiftVO templateSwiftVO = _swiftMgr.findByTmpltId(templateForVmCreation.getId()); + if (templateSwiftVO != null) { + long templateSize = templateSwiftVO.getPhysicalSize(); + if (templateSize == 0) { + templateSize = templateSwiftVO.getSize(); + } + totalAllocatedSize += (templateSize + _extraBytesPerVolume); + } + } else { + long templateSize = templateHostVO.getPhysicalSize(); + if ( templateSize == 0 ){ + templateSize = templateHostVO.getSize(); + } + totalAllocatedSize += (templateSize + _extraBytesPerVolume); + } + + */ + VMTemplateVO image = imageDao.findById(this.imageVO.getId()); + return image.getSize(); + } + + @Override + public DataObjectType getType() { + return DataObjectType.TEMPLATE; + } + + @Override + public DiskFormat getFormat() { + return DiskFormat.valueOf(this.imageVO.getFormat().toString()); + } + + public boolean stateTransit(TemplateEvent e) throws NoTransitionException { + boolean result= imageMgr.getStateMachine().transitTo(this.imageVO, e, null, + imageDao); + this.imageVO = imageDao.findById(this.imageVO.getId()); + return result; + } + + @Override + public void processEvent(Event event) { + try { + ojbectInStoreMgr.update(this, event); + } catch (NoTransitionException e) { + s_logger.debug("failed to update state", e); + throw new CloudRuntimeException("Failed to update state" + e.toString()); + } + } +} diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/store/lifecycle/DefaultImageDataStoreLifeCycle.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/lifecycle/DefaultImageDataStoreLifeCycle.java new file mode 100644 index 000000000..ba29c1a14 --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/lifecycle/DefaultImageDataStoreLifeCycle.java @@ -0,0 +1,107 @@ +// 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 org.apache.cloudstack.storage.image.store.lifecycle; + +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.HostScope; +import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope; +import org.apache.cloudstack.storage.image.datastore.ImageDataStoreHelper; +import org.apache.cloudstack.storage.image.datastore.ImageDataStoreManager; +import org.apache.cloudstack.storage.image.db.ImageDataStoreDao; +import org.apache.cloudstack.storage.image.db.ImageDataStoreVO; + +import com.cloud.agent.api.StoragePoolInfo; + +public class DefaultImageDataStoreLifeCycle implements ImageDataStoreLifeCycle { + @Inject + protected ImageDataStoreDao imageStoreDao; + @Inject + ImageDataStoreHelper imageStoreHelper; + @Inject + ImageDataStoreManager imageStoreMgr; + public DefaultImageDataStoreLifeCycle() { + } + + + @Override + public DataStore initialize(Map dsInfos) { + ImageDataStoreVO ids = imageStoreHelper.createImageDataStore(dsInfos); + return imageStoreMgr.getImageDataStore(ids.getId()); + } + + + @Override + public boolean attachCluster(DataStore store, ClusterScope scope) { + // TODO Auto-generated method stub + return false; + } + + + @Override + public boolean attachHost(DataStore store, HostScope scope, + StoragePoolInfo existingInfo) { + // TODO Auto-generated method stub + return false; + } + + + @Override + public boolean attachZone(DataStore dataStore, ZoneScope scope) { + // TODO Auto-generated method stub + return false; + } + + + @Override + public boolean dettach() { + // TODO Auto-generated method stub + return false; + } + + + @Override + public boolean unmanaged() { + // TODO Auto-generated method stub + return false; + } + + + @Override + public boolean maintain(DataStore store) { + // TODO Auto-generated method stub + return false; + } + + + @Override + public boolean cancelMaintain(DataStore store) { + // TODO Auto-generated method stub + return false; + } + + + @Override + public boolean deleteDataStore(DataStore store) { + // TODO Auto-generated method stub + return false; + } +} diff --git a/engine/storage/image/src/org/apache/cloudstack/storage/image/store/lifecycle/ImageDataStoreLifeCycle.java b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/lifecycle/ImageDataStoreLifeCycle.java new file mode 100644 index 000000000..a36823959 --- /dev/null +++ b/engine/storage/image/src/org/apache/cloudstack/storage/image/store/lifecycle/ImageDataStoreLifeCycle.java @@ -0,0 +1,24 @@ +/* + * 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 org.apache.cloudstack.storage.image.store.lifecycle; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreLifeCycle; + +public interface ImageDataStoreLifeCycle extends DataStoreLifeCycle { +} diff --git a/engine/storage/imagemotion/pom.xml b/engine/storage/imagemotion/pom.xml new file mode 100644 index 000000000..9a7f3e017 --- /dev/null +++ b/engine/storage/imagemotion/pom.xml @@ -0,0 +1,62 @@ + + + 4.0.0 + cloud-engine-storage-imagemotion + Apache CloudStack Engine Storage Image Motion Component + + org.apache.cloudstack + cloud-engine + 4.2.0-SNAPSHOT + ../../pom.xml + + + + org.apache.cloudstack + cloud-engine-storage + ${project.version} + + + org.apache.cloudstack + cloud-engine-storage-volume + ${project.version} + runtime + + + org.apache.cloudstack + cloud-engine-storage-image + ${project.version} + runtime + + + mysql + mysql-connector-java + ${cs.mysql.version} + provided + + + org.mockito + mockito-all + 1.9.5 + + + javax.inject + javax.inject + 1 + + + + install + src + test + + diff --git a/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java b/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java new file mode 100644 index 000000000..a70fd8ab2 --- /dev/null +++ b/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/DefaultImageMotionStrategy.java @@ -0,0 +1,140 @@ +/* + * 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 org.apache.cloudstack.storage.image.motion; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint; +import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.framework.async.AsyncRpcConext; +import org.apache.cloudstack.storage.command.CopyCmd; +import org.apache.cloudstack.storage.command.CopyCmdAnswer; +import org.apache.cloudstack.storage.endpoint.EndPointSelector; +import org.apache.cloudstack.storage.volume.TemplateOnPrimaryDataStoreInfo; + +import com.cloud.agent.api.Answer; + +//At least one of datastore is coming from image store or image cache store + +public class DefaultImageMotionStrategy implements ImageMotionStrategy { + @Inject + EndPointSelector selector; + private class CreateTemplateContext extends AsyncRpcConext { + private final TemplateOnPrimaryDataStoreInfo template; + public CreateTemplateContext(AsyncCompletionCallback callback, TemplateOnPrimaryDataStoreInfo template) { + super(callback); + this.template = template; + } + + public TemplateOnPrimaryDataStoreInfo getTemplate() { + return this.template; + } + + } +/* + @Override + public void copyTemplateAsync(String destUri, String srcUri, EndPoint ep, AsyncCompletionCallback callback) { + + CopyCmd copyCommand = new CopyCmd(destUri, srcUri); + CreateTemplateContext context = new CreateTemplateContext(callback, null); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setCallback(caller.getTarget().copyTemplateCallBack(null, null)) + .setContext(context); + + ep.sendMessageAsync(copyCommand, caller); + } + + public Object copyTemplateCallBack(AsyncCallbackDispatcher callback, CreateTemplateContext context) { + AsyncCompletionCallback parentCall = context.getParentCallback(); + CopyTemplateToPrimaryStorageAnswer answer = (CopyTemplateToPrimaryStorageAnswer)callback.getResult(); + CommandResult result = new CommandResult(); + + if (!answer.getResult()) { + result.setSuccess(answer.getResult()); + result.setResult(answer.getDetails()); + } else { + TemplateOnPrimaryDataStoreInfo templateStore = context.getTemplate(); + templateStore.setPath(answer.getPath()); + result.setSuccess(true); + } + + parentCall.complete(result); + return null; + }*/ + + @Override + public boolean canHandle(DataObject srcData, DataObject destData) { + /* + DataStore destStore = destData.getDataStore(); + DataStore srcStore = srcData.getDataStore(); + if (destStore.getRole() == DataStoreRole.Image || destStore.getRole() == DataStoreRole.ImageCache + || srcStore.getRole() == DataStoreRole.Image + || srcStore.getRole() == DataStoreRole.ImageCache) { + return true; + }*/ + return false; + } + + @Override + public Void copyAsync(DataObject srcData, DataObject destData, + AsyncCompletionCallback callback) { + DataStore destStore = destData.getDataStore(); + DataStore srcStore = srcData.getDataStore(); + EndPoint ep = selector.select(srcData, destData); + CopyCommandResult result = new CopyCommandResult("", null); + if (ep == null) { + result.setResult("can't find end point"); + callback.complete(result); + return null; + } + + String srcUri = srcStore.getDriver().grantAccess(srcData, ep); + String destUri = destStore.getDriver().grantAccess(destData, ep); + CopyCmd cmd = new CopyCmd(srcUri, destUri); + + CreateTemplateContext context = new CreateTemplateContext(callback, null); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setCallback(caller.getTarget().copyAsyncCallback(null, null)) + .setContext(context); + + ep.sendMessageAsync(cmd, caller); + return null; + } + + protected Void copyAsyncCallback(AsyncCallbackDispatcher callback, CreateTemplateContext context) { + AsyncCompletionCallback parentCall = context.getParentCallback(); + Answer answer = (Answer)callback.getResult(); + if (!answer.getResult()) { + CopyCommandResult result = new CopyCommandResult("", null); + result.setResult(answer.getDetails()); + parentCall.complete(result); + } else { + CopyCmdAnswer ans = (CopyCmdAnswer)answer; + CopyCommandResult result = new CopyCommandResult(ans.getPath(), null); + parentCall.complete(result); + } + return null; + + } + +} diff --git a/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/ImageMotionServiceImpl.java b/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/ImageMotionServiceImpl.java new file mode 100644 index 000000000..93ba4a5ad --- /dev/null +++ b/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/ImageMotionServiceImpl.java @@ -0,0 +1,70 @@ +/* + * 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 org.apache.cloudstack.storage.image.motion; + +import java.util.List; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.ImageService; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; + + +public class ImageMotionServiceImpl implements ImageMotionService { + @Inject + List motionStrategies; + @Inject + VolumeService volumeService; + @Inject + ImageService imageService; + + @Override + public boolean copyIso(String isoUri, String destIsoUri) { + // TODO Auto-generated method stub + return false; + } + + + + @Override + public void copyTemplateAsync(TemplateInfo destTemplate, TemplateInfo srcTemplate, AsyncCompletionCallback callback) { + /* ImageMotionStrategy ims = null; + for (ImageMotionStrategy strategy : motionStrategies) { + if (strategy.canHandle(srcTemplate)) { + ims = strategy; + break; + } + } + + if (ims == null) { + throw new CloudRuntimeException("Can't find proper image motion strategy"); + } + + EndPoint ep = ims.getEndPoint(destTemplate, srcTemplate); + String srcUri = srcTemplate.getDataStore().grantAccess(srcTemplate, ep); + String destUri = destTemplate.getDataStore().grantAccess(destTemplate, ep); + + ims.copyTemplateAsync(destUri, srcUri, ep, callback);*/ + } + + +} diff --git a/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/ImageMotionStrategy.java b/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/ImageMotionStrategy.java new file mode 100644 index 000000000..7a476367d --- /dev/null +++ b/engine/storage/imagemotion/src/org/apache/cloudstack/storage/image/motion/ImageMotionStrategy.java @@ -0,0 +1,24 @@ +/* + * 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 org.apache.cloudstack.storage.image.motion; + +import org.apache.cloudstack.storage.motion.DataMotionStrategy; + +public interface ImageMotionStrategy extends DataMotionStrategy { +} diff --git a/engine/storage/integration-test/pom.xml b/engine/storage/integration-test/pom.xml new file mode 100644 index 000000000..1bce37afd --- /dev/null +++ b/engine/storage/integration-test/pom.xml @@ -0,0 +1,147 @@ + + + 4.0.0 + cloud-engine-storage-integration-test + Apache CloudStack Engine Storage integration test Component + + org.apache.cloudstack + cloud-engine + 4.2.0-SNAPSHOT + ../../pom.xml + + + + org.apache.cloudstack + cloud-engine-storage + ${project.version} + test + + + org.apache.cloudstack + cloud-engine-storage-volume + ${project.version} + test + + + org.apache.cloudstack + cloud-engine-storage-snapshot + ${project.version} + test + + + org.apache.cloudstack + cloud-engine-storage-image + ${project.version} + test + + + org.apache.cloudstack + cloud-engine-storage-imagemotion + ${project.version} + test + + + org.apache.cloudstack + cloud-plugin-hypervisor-xen + ${project.version} + test + + + org.apache.httpcomponents + httpclient + 4.2.2 + compile + + + mysql + mysql-connector-java + ${cs.mysql.version} + provided + + + org.mockito + mockito-all + 1.9.5 + + + javax.inject + javax.inject + 1 + + + org.testng + testng + 6.1.1 + test + + + + + install + ${project.basedir}/test + + + ${project.basedir}/test/resource + + + + + maven-compiler-plugin + + + + testCompile + + + + + + maven-antrun-plugin + 1.7 + + + generate-resource + generate-resources + + run + + + + + + + + + + + + + + + maven-surefire-plugin + + true + + + + integration-test + + test + + + + + + + diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/allocator/StorageAllocatorTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/allocator/StorageAllocatorTest.java new file mode 100644 index 000000000..9444fa524 --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/allocator/StorageAllocatorTest.java @@ -0,0 +1,439 @@ +// 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 org.apache.cloudstack.storage.allocator; + +import static org.junit.Assert.fail; + +import java.util.ArrayList; +import java.util.List; +import java.util.UUID; + +import javax.inject.Inject; + +import junit.framework.Assert; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProviderManager; +import org.apache.cloudstack.engine.subsystem.api.storage.ScopeType; +import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailVO; +import org.apache.cloudstack.storage.datastore.db.StoragePoolDetailsDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mockito; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import com.cloud.dc.ClusterVO; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.HostPodVO; +import com.cloud.dc.DataCenter.NetworkType; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.dc.dao.HostPodDao; +import com.cloud.deploy.DataCenterDeployment; +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.org.Cluster.ClusterType; +import com.cloud.org.Managed.ManagedState; +import com.cloud.storage.DiskOfferingVO; +import com.cloud.storage.StorageManager; +import com.cloud.storage.StoragePool; +import com.cloud.storage.StoragePoolStatus; +import com.cloud.storage.Volume; +import com.cloud.storage.VolumeVO; +import com.cloud.storage.Storage.StoragePoolType; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.dao.VolumeDao; +import com.cloud.utils.component.ComponentContext; +import com.cloud.vm.DiskProfile; +import com.cloud.vm.VirtualMachineProfile; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations = "classpath:/storageContext.xml") +public class StorageAllocatorTest { + @Inject + PrimaryDataStoreDao storagePoolDao; + @Inject + StorageManager storageMgr; + @Inject + DiskOfferingDao diskOfferingDao; + @Inject + VolumeDao volumeDao; + @Inject + HostPodDao podDao; + @Inject + ClusterDao clusterDao; + @Inject + DataCenterDao dcDao; + @Inject + StoragePoolDetailsDao poolDetailsDao; + @Inject + DataStoreProviderManager providerMgr; + Long dcId = 1l; + Long podId = 1l; + Long clusterId = 1l; + Long volumeId = null; + Long diskOfferingId = null; + Long storagePoolId = null; + VolumeVO volume = null; + DiskOfferingVO diskOffering = null; + StoragePoolVO storage = null; + + @Before + public void setup() throws Exception { + ComponentContext.initComponentsLifeCycle(); + + } + + protected void createDb() { + DataCenterVO dc = new DataCenterVO(UUID.randomUUID().toString(), "test", "8.8.8.8", null, "10.0.0.1", null, "10.0.0.1/24", + null, null, NetworkType.Basic, null, null, true, true, null, null); + dc = dcDao.persist(dc); + dcId = dc.getId(); + + HostPodVO pod = new HostPodVO(UUID.randomUUID().toString(), dc.getId(), "255.255.255.255", "", 8, "test"); + pod = podDao.persist(pod); + podId = pod.getId(); + + ClusterVO cluster = new ClusterVO(dc.getId(), pod.getId(), "devcloud cluster"); + cluster.setHypervisorType(HypervisorType.XenServer.toString()); + cluster.setClusterType(ClusterType.CloudManaged); + cluster.setManagedState(ManagedState.Managed); + cluster = clusterDao.persist(cluster); + clusterId = cluster.getId(); + + DataStoreProvider provider = providerMgr.getDataStoreProvider("ancient primary data store provider"); + storage = new StoragePoolVO(); + storage.setDataCenterId(dcId); + storage.setPodId(podId); + storage.setPoolType(StoragePoolType.NetworkFilesystem); + storage.setClusterId(clusterId); + storage.setStatus(StoragePoolStatus.Up); + storage.setScope(ScopeType.CLUSTER); + storage.setAvailableBytes(1000); + storage.setCapacityBytes(20000); + storage.setHostAddress(UUID.randomUUID().toString()); + storage.setPath(UUID.randomUUID().toString()); + storage.setStorageProviderName(provider.getName()); + storage = storagePoolDao.persist(storage); + storagePoolId = storage.getId(); + + storageMgr.createCapacityEntry(storage.getId()); + + diskOffering = new DiskOfferingVO(); + diskOffering.setDiskSize(500); + diskOffering.setName("test-disk"); + diskOffering.setSystemUse(false); + diskOffering.setUseLocalStorage(false); + diskOffering.setCustomized(false); + diskOffering.setRecreatable(false); + diskOffering = diskOfferingDao.persist(diskOffering); + diskOfferingId = diskOffering.getId(); + + volume = new VolumeVO(Volume.Type.ROOT, "volume", dcId, 1, 1, diskOffering.getId(), diskOffering.getDiskSize()); + volume = volumeDao.persist(volume); + volumeId = volume.getId(); + } + + + + @Inject + List allocators; + @Test + public void testClusterAllocatorMultiplePools() { + Long newStorageId = null; + try { + createDb(); + + DataStoreProvider provider = providerMgr.getDataStoreProvider("ancient primary data store provider"); + storage = new StoragePoolVO(); + storage.setDataCenterId(dcId); + storage.setPodId(podId); + storage.setPoolType(StoragePoolType.NetworkFilesystem); + storage.setClusterId(clusterId); + storage.setStatus(StoragePoolStatus.Up); + storage.setScope(ScopeType.CLUSTER); + storage.setAvailableBytes(1000); + storage.setCapacityBytes(20000); + storage.setHostAddress(UUID.randomUUID().toString()); + storage.setPath(UUID.randomUUID().toString()); + storage.setStorageProviderName(provider.getName()); + StoragePoolVO newStorage = storagePoolDao.persist(storage); + newStorageId = newStorage.getId(); + + DiskProfile profile = new DiskProfile(volume, diskOffering, HypervisorType.XenServer); + VirtualMachineProfile vmProfile = Mockito.mock(VirtualMachineProfile.class); + Mockito.when(storageMgr.storagePoolHasEnoughSpace( + Mockito.anyListOf(Volume.class), Mockito.any(StoragePool.class))).thenReturn(true); + DeploymentPlan plan = new DataCenterDeployment(dcId, podId, clusterId, null, null, null); + int foundAcct = 0; + for (StoragePoolAllocator allocator : allocators) { + List pools = allocator.allocateToPool(profile, vmProfile, plan, new ExcludeList(), 1); + if (!pools.isEmpty()) { + Assert.assertEquals(pools.size(), 1); + foundAcct++; + } + } + + if (foundAcct > 1 || foundAcct == 0) { + Assert.fail(); + } + } catch (Exception e) { + cleanDb(); + + if (newStorageId != null) { + storagePoolDao.remove(newStorageId); + } + Assert.fail(); + } + } + + @Test + public void testClusterAllocator() { + try { + createDb(); + DiskProfile profile = new DiskProfile(volume, diskOffering, HypervisorType.XenServer); + VirtualMachineProfile vmProfile = Mockito.mock(VirtualMachineProfile.class); + Mockito.when(storageMgr.storagePoolHasEnoughSpace( + Mockito.anyListOf(Volume.class), Mockito.any(StoragePool.class))).thenReturn(true); + DeploymentPlan plan = new DataCenterDeployment(dcId, podId, clusterId, null, null, null); + int foundAcct = 0; + for (StoragePoolAllocator allocator : allocators) { + List pools = allocator.allocateToPool(profile, vmProfile, plan, new ExcludeList(), 1); + if (!pools.isEmpty()) { + Assert.assertEquals(pools.get(0).getId(), storage.getId()); + foundAcct++; + } + } + + if (foundAcct > 1 || foundAcct == 0) { + Assert.fail(); + } + } catch (Exception e) { + cleanDb(); + Assert.fail(); + } + } + + + @Test + public void testClusterAllocatorWithTags() { + try { + createDb(); + StoragePoolDetailVO detailVO = new StoragePoolDetailVO(this.storagePoolId, "high", "true"); + poolDetailsDao.persist(detailVO); + DiskOfferingVO diskOff = this.diskOfferingDao.findById(diskOffering.getId()); + List tags = new ArrayList(); + tags.add("high"); + diskOff.setTagsArray(tags); + diskOfferingDao.update(diskOff.getId(), diskOff); + + DiskProfile profile = new DiskProfile(volume, diskOff, HypervisorType.XenServer); + VirtualMachineProfile vmProfile = Mockito.mock(VirtualMachineProfile.class); + Mockito.when(storageMgr.storagePoolHasEnoughSpace( + Mockito.anyListOf(Volume.class), Mockito.any(StoragePool.class))).thenReturn(true); + DeploymentPlan plan = new DataCenterDeployment(dcId, podId, clusterId, null, null, null); + int foundAcct = 0; + for (StoragePoolAllocator allocator : allocators) { + List pools = allocator.allocateToPool(profile, vmProfile, plan, new ExcludeList(), 1); + if (!pools.isEmpty()) { + Assert.assertEquals(pools.get(0).getId(), storage.getId()); + foundAcct++; + } + } + + if (foundAcct > 1 || foundAcct == 0) { + Assert.fail(); + } + } catch (Exception e) { + cleanDb(); + Assert.fail(); + } + } + + @Test + public void testClusterAllocatorWithWrongTag() { + try { + createDb(); + StoragePoolDetailVO detailVO = new StoragePoolDetailVO(this.storagePoolId, "high", "true"); + poolDetailsDao.persist(detailVO); + DiskOfferingVO diskOff = this.diskOfferingDao.findById(diskOffering.getId()); + List tags = new ArrayList(); + tags.add("low"); + diskOff.setTagsArray(tags); + diskOfferingDao.update(diskOff.getId(), diskOff); + + DiskProfile profile = new DiskProfile(volume, diskOff, HypervisorType.XenServer); + VirtualMachineProfile vmProfile = Mockito.mock(VirtualMachineProfile.class); + Mockito.when(storageMgr.storagePoolHasEnoughSpace( + Mockito.anyListOf(Volume.class), Mockito.any(StoragePool.class))).thenReturn(true); + DeploymentPlan plan = new DataCenterDeployment(dcId, podId, clusterId, null, null, null); + int foundAcct = 0; + for (StoragePoolAllocator allocator : allocators) { + List pools = allocator.allocateToPool(profile, vmProfile, plan, new ExcludeList(), 1); + if (!pools.isEmpty()) { + foundAcct++; + } + } + + if (foundAcct != 0) { + Assert.fail(); + } + } catch (Exception e) { + cleanDb(); + Assert.fail(); + } + } + + @Test + public void testZoneWideStorageAllocator() { + try { + createDb(); + + StoragePoolVO pool = storagePoolDao.findById(storagePoolId); + pool.setScope(ScopeType.ZONE); + storagePoolDao.update(pool.getId(), pool); + + DiskProfile profile = new DiskProfile(volume, diskOffering, HypervisorType.KVM); + VirtualMachineProfile vmProfile = Mockito.mock(VirtualMachineProfile.class); + Mockito.when(vmProfile.getHypervisorType()).thenReturn(HypervisorType.KVM); + Mockito.when(storageMgr.storagePoolHasEnoughSpace( + Mockito.anyListOf(Volume.class), Mockito.any(StoragePool.class))).thenReturn(true); + DeploymentPlan plan = new DataCenterDeployment(dcId, podId, clusterId, null, null, null); + int foundAcct = 0; + for (StoragePoolAllocator allocator : allocators) { + List pools = allocator.allocateToPool(profile, vmProfile, plan, new ExcludeList(), 1); + if (!pools.isEmpty()) { + Assert.assertEquals(pools.get(0).getId(), storage.getId()); + foundAcct++; + } + } + + if (foundAcct > 1 || foundAcct == 0) { + Assert.fail(); + } + } catch (Exception e) { + cleanDb(); + Assert.fail(); + } + } + + @Test + public void testPoolStateIsNotUp() { + try { + createDb(); + + StoragePoolVO pool = storagePoolDao.findById(storagePoolId); + pool.setScope(ScopeType.ZONE); + pool.setStatus(StoragePoolStatus.Maintenance); + storagePoolDao.update(pool.getId(), pool); + + DiskProfile profile = new DiskProfile(volume, diskOffering, HypervisorType.XenServer); + VirtualMachineProfile vmProfile = Mockito.mock(VirtualMachineProfile.class); + Mockito.when(storageMgr.storagePoolHasEnoughSpace( + Mockito.anyListOf(Volume.class), Mockito.any(StoragePool.class))).thenReturn(true); + DeploymentPlan plan = new DataCenterDeployment(dcId, podId, clusterId, null, null, null); + int foundAcct = 0; + for (StoragePoolAllocator allocator : allocators) { + List pools = allocator.allocateToPool(profile, vmProfile, plan, new ExcludeList(), 1); + if (!pools.isEmpty()) { + Assert.assertEquals(pools.get(0).getId(), storage.getId()); + foundAcct++; + } + } + + if (foundAcct == 1) { + Assert.fail(); + } + } catch (Exception e) { + cleanDb(); + Assert.fail(); + } + } + + + + + @Test + public void testLocalStorageAllocator() { + try { + createDb(); + + StoragePoolVO pool = storagePoolDao.findById(storagePoolId); + pool.setScope(ScopeType.HOST); + storagePoolDao.update(pool.getId(), pool); + + DiskOfferingVO diskOff = diskOfferingDao.findById(diskOfferingId); + diskOff.setUseLocalStorage(true); + diskOfferingDao.update(diskOfferingId, diskOff); + + DiskProfile profile = new DiskProfile(volume, diskOff, HypervisorType.XenServer); + VirtualMachineProfile vmProfile = Mockito.mock(VirtualMachineProfile.class); + Mockito.when(storageMgr.storagePoolHasEnoughSpace( + Mockito.anyListOf(Volume.class), Mockito.any(StoragePool.class))).thenReturn(true); + DeploymentPlan plan = new DataCenterDeployment(dcId, podId, clusterId, null, null, null); + int foundAcct = 0; + for (StoragePoolAllocator allocator : allocators) { + List pools = allocator.allocateToPool(profile, vmProfile, plan, new ExcludeList(), 1); + if (!pools.isEmpty()) { + Assert.assertEquals(pools.get(0).getId(), storage.getId()); + foundAcct++; + } + } + + if (foundAcct > 1 || foundAcct == 0) { + Assert.fail(); + } + } catch (Exception e) { + cleanDb(); + Assert.fail(); + } + } + + protected void cleanDb() { + if (volumeId != null) { + volumeDao.remove(volumeId); + volumeId = null; + } + if (diskOfferingId != null) { + diskOfferingDao.remove(diskOfferingId); + diskOfferingId = null; + } + if (storagePoolId != null) { + storagePoolDao.remove(storagePoolId); + storagePoolId = null; + } + if (clusterId != null) { + clusterDao.remove(clusterId); + clusterId = null; + } + if (podId != null) { + podDao.remove(podId); + podId = null; + } + if (dcId != null) { + dcDao.remove(dcId); + dcId = null; + } + } + +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/allocator/StorageAllocatorTestConfiguration.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/allocator/StorageAllocatorTestConfiguration.java new file mode 100644 index 000000000..b815fc134 --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/allocator/StorageAllocatorTestConfiguration.java @@ -0,0 +1,73 @@ +// 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 org.apache.cloudstack.storage.allocator; + +import java.io.IOException; + +import org.apache.cloudstack.storage.allocator.StorageAllocatorTestConfiguration.Library; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDaoImpl; +import org.mockito.Mockito; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.ComponentScan.Filter; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.FilterType; +import org.springframework.core.type.classreading.MetadataReader; +import org.springframework.core.type.classreading.MetadataReaderFactory; +import org.springframework.core.type.filter.TypeFilter; + +import com.cloud.dc.dao.DataCenterDaoImpl; +import com.cloud.domain.dao.DomainDaoImpl; +import com.cloud.host.dao.HostDaoImpl; +import com.cloud.storage.StorageManager; +import com.cloud.storage.dao.StoragePoolDetailsDaoImpl; +import com.cloud.storage.dao.VMTemplateDaoImpl; +import com.cloud.utils.component.SpringComponentScanUtils; +import com.cloud.vm.UserVmManager; + + +@Configuration +@ComponentScan(basePackageClasses={ + StoragePoolDetailsDaoImpl.class, + PrimaryDataStoreDaoImpl.class, + VMTemplateDaoImpl.class, + HostDaoImpl.class, + DomainDaoImpl.class, + DataCenterDaoImpl.class}, + includeFilters={@Filter(value=Library.class, type=FilterType.CUSTOM)}, + useDefaultFilters=false + ) +public class StorageAllocatorTestConfiguration { + @Bean + public UserVmManager UserVmManager() { + return Mockito.mock(UserVmManager.class); + } + @Bean + public StorageManager StorageManager() { + return Mockito.mock(StorageManager.class); + } + + public static class Library implements TypeFilter { + + @Override + public boolean match(MetadataReader mdr, MetadataReaderFactory arg1) throws IOException { + mdr.getClassMetadata().getClassName(); + ComponentScan cs = StorageAllocatorTestConfiguration.class.getAnnotation(ComponentScan.class); + return SpringComponentScanUtils.includedInBasePackageClasses(mdr.getClassMetadata().getClassName(), cs); + } + } +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/AllTests.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/AllTests.java new file mode 100644 index 000000000..dde4484db --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/AllTests.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.cloudstack.storage.test; + +import org.junit.runner.RunWith; +import org.junit.runners.Suite; +import org.junit.runners.Suite.SuiteClasses; + +@RunWith(Suite.class) +@SuiteClasses({ volumeServiceTest.class }) +public class AllTests { + +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/AopTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/AopTest.java new file mode 100644 index 000000000..bde5804e6 --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/AopTest.java @@ -0,0 +1,30 @@ +// 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 org.apache.cloudstack.storage.test; + +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.ElementType.TYPE; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +@Target({TYPE, METHOD}) +@Retention(RUNTIME) +public @interface AopTest { + +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/AopTestAdvice.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/AopTestAdvice.java new file mode 100644 index 000000000..63669c453 --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/AopTestAdvice.java @@ -0,0 +1,34 @@ +// 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 org.apache.cloudstack.storage.test; + +import org.aspectj.lang.ProceedingJoinPoint; + +import com.cloud.utils.db.Transaction; + +public class AopTestAdvice { + public Object AopTestMethod(ProceedingJoinPoint call) throws Throwable { + Transaction txn = Transaction.open(call.getSignature().getName()); + Object ret = null; + try { + ret = call.proceed(); + } finally { + txn.close(); + } + return ret; + } +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java new file mode 100644 index 000000000..a063bdda8 --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/ChildTestConfiguration.java @@ -0,0 +1,230 @@ +// 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 org.apache.cloudstack.storage.test; + +import java.io.IOException; + +import org.apache.cloudstack.acl.APIChecker; +import org.apache.cloudstack.engine.service.api.OrchestrationService; +import org.apache.cloudstack.framework.rpc.RpcProvider; +import org.apache.cloudstack.storage.HostEndpointRpcServer; +import org.apache.cloudstack.storage.endpoint.EndPointSelector; +import org.apache.cloudstack.storage.test.ChildTestConfiguration.Library; +import org.mockito.Mockito; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.context.annotation.ComponentScan.Filter; +import org.springframework.context.annotation.Configuration; +import org.springframework.context.annotation.FilterType; +import org.springframework.core.type.classreading.MetadataReader; +import org.springframework.core.type.classreading.MetadataReaderFactory; +import org.springframework.core.type.filter.TypeFilter; + +import com.cloud.agent.AgentManager; +import com.cloud.alert.AlertManager; +import com.cloud.capacity.dao.CapacityDaoImpl; +import com.cloud.cluster.ClusteredAgentRebalanceService; +import com.cloud.cluster.agentlb.dao.HostTransferMapDaoImpl; +import com.cloud.configuration.dao.ConfigurationDaoImpl; +import com.cloud.dc.ClusterDetailsDaoImpl; +import com.cloud.dc.dao.ClusterDaoImpl; +import com.cloud.dc.dao.DataCenterIpAddressDaoImpl; +import com.cloud.dc.dao.DataCenterLinkLocalIpAddressDaoImpl; +import com.cloud.dc.dao.DataCenterVnetDaoImpl; +import com.cloud.dc.dao.DcDetailsDaoImpl; +import com.cloud.dc.dao.HostPodDaoImpl; +import com.cloud.dc.dao.PodVlanDaoImpl; +import com.cloud.host.dao.HostDaoImpl; +import com.cloud.host.dao.HostDetailsDaoImpl; +import com.cloud.host.dao.HostTagsDaoImpl; +import com.cloud.resource.ResourceManager; +import com.cloud.server.ManagementServer; +import com.cloud.server.auth.UserAuthenticator; +import com.cloud.service.dao.ServiceOfferingDaoImpl; +import com.cloud.storage.OCFS2ManagerImpl; +import com.cloud.storage.StorageManager; +import com.cloud.storage.VolumeManager; +import com.cloud.storage.dao.DiskOfferingDaoImpl; +import com.cloud.storage.dao.SnapshotDaoImpl; +import com.cloud.storage.dao.StoragePoolHostDaoImpl; +import com.cloud.storage.dao.StoragePoolWorkDaoImpl; +import com.cloud.storage.dao.VMTemplateDaoImpl; +import com.cloud.storage.dao.VMTemplateDetailsDaoImpl; +import com.cloud.storage.dao.VMTemplateHostDaoImpl; +import com.cloud.storage.dao.VMTemplatePoolDaoImpl; +import com.cloud.storage.dao.VMTemplateZoneDaoImpl; +import com.cloud.storage.dao.VolumeDaoImpl; +import com.cloud.storage.dao.VolumeHostDaoImpl; +import com.cloud.storage.s3.S3Manager; +import com.cloud.storage.snapshot.SnapshotManager; +import com.cloud.storage.swift.SwiftManager; +import com.cloud.tags.dao.ResourceTagsDaoImpl; +import com.cloud.template.TemplateManager; +import com.cloud.user.dao.UserDaoImpl; +import com.cloud.utils.component.SpringComponentScanUtils; +import com.cloud.vm.VirtualMachineManager; +import com.cloud.vm.dao.ConsoleProxyDaoImpl; +import com.cloud.vm.dao.DomainRouterDao; +import com.cloud.vm.dao.NicDaoImpl; +import com.cloud.vm.dao.SecondaryStorageVmDaoImpl; +import com.cloud.vm.dao.UserVmDaoImpl; +import com.cloud.vm.dao.UserVmDetailsDaoImpl; +import com.cloud.vm.dao.VMInstanceDaoImpl; +import com.cloud.vm.snapshot.dao.VMSnapshotDaoImpl; +@Configuration +@ComponentScan(basePackageClasses={ + NicDaoImpl.class, + VMInstanceDaoImpl.class, + VMTemplateHostDaoImpl.class, + VolumeHostDaoImpl.class, + VolumeDaoImpl.class, + VMTemplatePoolDaoImpl.class, + ResourceTagsDaoImpl.class, + VMTemplateDaoImpl.class, + MockStorageMotionStrategy.class, + ConfigurationDaoImpl.class, + ClusterDaoImpl.class, + HostPodDaoImpl.class, + VMTemplateZoneDaoImpl.class, + VMTemplateDetailsDaoImpl.class, + HostDaoImpl.class, + HostDetailsDaoImpl.class, + HostTagsDaoImpl.class, + HostTransferMapDaoImpl.class, + DataCenterIpAddressDaoImpl.class, + DataCenterLinkLocalIpAddressDaoImpl.class, + DataCenterVnetDaoImpl.class, + PodVlanDaoImpl.class, + DcDetailsDaoImpl.class, + DiskOfferingDaoImpl.class, + StoragePoolHostDaoImpl.class, + UserVmDaoImpl.class, + UserVmDetailsDaoImpl.class, + ServiceOfferingDaoImpl.class, + CapacityDaoImpl.class, + SnapshotDaoImpl.class, + VMSnapshotDaoImpl.class, + OCFS2ManagerImpl.class, + ClusterDetailsDaoImpl.class, + SecondaryStorageVmDaoImpl.class, + + ConsoleProxyDaoImpl.class, + StoragePoolWorkDaoImpl.class, + UserDaoImpl.class + +}, +includeFilters={@Filter(value=Library.class, type=FilterType.CUSTOM)}, +useDefaultFilters=false +) +public class ChildTestConfiguration extends TestConfiguration { + + @Bean + public EndPointSelector selector() { + return Mockito.mock(EndPointSelector.class); + } + + @Bean + public AgentManager agentMgr() { + return new DirectAgentManagerSimpleImpl(); + } + + @Bean + public HostEndpointRpcServer rpcServer() { + return new MockHostEndpointRpcServerDirectCallResource(); + } + + @Bean + public RpcProvider rpcProvider() { + return Mockito.mock(RpcProvider.class); + } + @Bean + public ClusteredAgentRebalanceService _rebalanceService() { + return Mockito.mock(ClusteredAgentRebalanceService.class); + } + @Bean + public UserAuthenticator authenticator() { + return Mockito.mock(UserAuthenticator.class); + } + @Bean + public OrchestrationService orchSrvc() { + return Mockito.mock(OrchestrationService.class); + } + @Bean + public APIChecker apiChecker() { + return Mockito.mock(APIChecker.class); + } + @Bean + public TemplateManager templateMgr() { + return Mockito.mock(TemplateManager.class); + } + + @Bean + public VolumeManager volumeMgr() { + return Mockito.mock(VolumeManager.class); + } + @Bean + public SwiftManager switfMgr() { + return Mockito.mock(SwiftManager.class); + } + @Bean + public ManagementServer server() { + return Mockito.mock(ManagementServer.class); + } + @Bean + public VirtualMachineManager vmMgr() { + return Mockito.mock(VirtualMachineManager.class); + } + + @Bean + public S3Manager s3Mgr() { + return Mockito.mock(S3Manager.class); + } + @Bean + public SnapshotManager snapshotMgr() { + return Mockito.mock(SnapshotManager.class); + } + + @Bean + public ResourceManager resourceMgr() { + return Mockito.mock(ResourceManager.class); + } + @Bean + public DomainRouterDao domainRouterDao() { + return Mockito.mock(DomainRouterDao.class); + } + @Bean + public StorageManager storageMgr() { + return Mockito.mock(StorageManager.class); + } + + @Bean + public AlertManager alertMgr() { + return Mockito.mock(AlertManager.class); + } + + public static class Library implements TypeFilter { + + @Override + public boolean match(MetadataReader mdr, MetadataReaderFactory arg1) throws IOException { + mdr.getClassMetadata().getClassName(); + ComponentScan cs = ChildTestConfiguration.class.getAnnotation(ComponentScan.class); + return SpringComponentScanUtils.includedInBasePackageClasses(mdr.getClassMetadata().getClassName(), cs); + } + + } + +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/CloudStackTestNGBase.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/CloudStackTestNGBase.java new file mode 100644 index 000000000..dc7223c9e --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/CloudStackTestNGBase.java @@ -0,0 +1,104 @@ +// 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 org.apache.cloudstack.storage.test; + +import java.lang.reflect.Method; + +import org.springframework.test.context.testng.AbstractTestNGSpringContextTests; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeMethod; +import org.testng.annotations.Parameters; +import org.testng.annotations.Test; + +import com.cloud.utils.db.DB; +import com.cloud.utils.db.Transaction; + +public class CloudStackTestNGBase extends AbstractTestNGSpringContextTests { + private String hostGateway; + private String hostCidr; + private String hostIp; + private String hostGuid; + private String templateUrl; + private String localStorageUuid; + private String primaryStorageUrl; + private Transaction txn; + + protected void injectMockito() { + + } + + @BeforeMethod(alwaysRun = true) + protected void injectDB(Method testMethod) throws Exception { + txn = Transaction.open(testMethod.getName()); + } + + @Test + protected void injectMockitoTest() { + injectMockito(); + } + + @AfterMethod(alwaysRun = true) + protected void closeDB(Method testMethod) throws Exception { + if (txn != null) { + txn.close(); + } + } + + @BeforeMethod(alwaysRun = true) + @Parameters({"devcloud-host-uuid", "devcloud-host-gateway", "devcloud-host-cidr", + "devcloud-host-ip", "template-url", "devcloud-local-storage-uuid", + "primary-storage-want-to-add"}) + protected void setup(String hostuuid, String gateway, String cidr, + String hostIp, String templateUrl, String localStorageUuid, + String primaryStorage) { + this.hostGuid = hostuuid; + this.hostGateway = gateway; + this.hostCidr = cidr; + this.hostIp = hostIp; + this.templateUrl = templateUrl; + this.localStorageUuid = localStorageUuid; + this.primaryStorageUrl = primaryStorage; + } + + protected String getHostGuid() { + return this.hostGuid; + } + + protected String getHostGateway() { + return this.hostGateway; + } + + protected String getHostCidr() { + return this.hostCidr; + } + + protected String getHostIp() { + return this.hostIp; + } + + protected String getTemplateUrl() { + return this.templateUrl; + } + + protected String getLocalStorageUuid() { + return this.localStorageUuid; + } + + protected String getPrimaryStorageUrl() { + return this.primaryStorageUrl; + } +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentManagerSimpleImpl.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentManagerSimpleImpl.java new file mode 100644 index 000000000..575bc8e2b --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentManagerSimpleImpl.java @@ -0,0 +1,249 @@ +/* + * 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 org.apache.cloudstack.storage.test; + +import java.util.HashMap; +import java.util.Map; + +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import org.apache.log4j.Logger; + +import com.cloud.agent.AgentManager; +import com.cloud.agent.Listener; +import com.cloud.agent.StartupCommandProcessor; +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.Command; +import com.cloud.agent.api.SetupCommand; +import com.cloud.agent.api.StartupCommand; +import com.cloud.agent.manager.AgentAttache; +import com.cloud.agent.manager.Commands; +import com.cloud.exception.AgentUnavailableException; +import com.cloud.exception.ConnectionException; +import com.cloud.exception.OperationTimedoutException; +import com.cloud.host.HostEnvironment; +import com.cloud.host.HostVO; +import com.cloud.host.Status.Event; +import com.cloud.host.dao.HostDao; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.hypervisor.xen.resource.XcpOssResource; +import com.cloud.resource.ServerResource; +import com.cloud.utils.component.ManagerBase; + +public class DirectAgentManagerSimpleImpl extends ManagerBase implements AgentManager { + private static final Logger logger = Logger.getLogger(DirectAgentManagerSimpleImpl.class); + private Map hostResourcesMap = new HashMap(); + @Inject + HostDao hostDao; + @Override + public boolean configure(String name, Map params) throws ConfigurationException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean start() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean stop() { + // TODO Auto-generated method stub + return false; + } + + @Override + public String getName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Answer easySend(Long hostId, Command cmd) { + // TODO Auto-generated method stub + return null; + } + + protected void loadResource(Long hostId) { + HostVO host = hostDao.findById(hostId); + Map params = new HashMap(); + params.put("guid", host.getGuid()); + params.put("ipaddress", host.getPrivateIpAddress()); + params.put("username", "root"); + params.put("password", "password"); + params.put("zone", String.valueOf(host.getDataCenterId())); + params.put("pod", String.valueOf(host.getPodId())); + + ServerResource resource = null; + if (host.getHypervisorType() == HypervisorType.XenServer) { + resource = new XcpOssResource(); + } + + try { + resource.configure(host.getName(), params); + hostResourcesMap.put(hostId, resource); + } catch (ConfigurationException e) { + logger.debug("Failed to load resource:" + e.toString()); + } + HostEnvironment env = new HostEnvironment(); + SetupCommand cmd = new SetupCommand(env); + cmd.setNeedSetup(true); + + resource.executeRequest(cmd); + } + + @Override + public synchronized Answer send(Long hostId, Command cmd) throws AgentUnavailableException, OperationTimedoutException { + ServerResource resource = hostResourcesMap.get(hostId); + if (resource == null) { + loadResource(hostId); + resource = hostResourcesMap.get(hostId); + } + + if (resource == null) { + return null; + } + + Answer answer = resource.executeRequest(cmd); + return answer; + } + + @Override + public Answer[] send(Long hostId, Commands cmds) throws AgentUnavailableException, OperationTimedoutException { + // TODO Auto-generated method stub + return null; + } + + @Override + public Answer[] send(Long hostId, Commands cmds, int timeout) throws AgentUnavailableException, OperationTimedoutException { + // TODO Auto-generated method stub + return null; + } + + @Override + public long send(Long hostId, Commands cmds, Listener listener) throws AgentUnavailableException { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int registerForHostEvents(Listener listener, boolean connections, boolean commands, boolean priority) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public int registerForInitialConnects(StartupCommandProcessor creator, boolean priority) { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void unregisterForHostEvents(int id) { + // TODO Auto-generated method stub + + } + + @Override + public boolean executeUserRequest(long hostId, Event event) throws AgentUnavailableException { + // TODO Auto-generated method stub + return false; + } + + @Override + public Answer sendTo(Long dcId, HypervisorType type, Command cmd) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void sendToSecStorage(HostVO ssHost, Command cmd, Listener listener) throws AgentUnavailableException { + // TODO Auto-generated method stub + + } + + @Override + public Answer sendToSecStorage(HostVO ssHost, Command cmd) { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean tapLoadingAgents(Long hostId, TapAgentsAction action) { + // TODO Auto-generated method stub + return false; + } + + @Override + public AgentAttache handleDirectConnectAgent(HostVO host, StartupCommand[] cmds, ServerResource resource, boolean forRebalance) throws ConnectionException { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean agentStatusTransitTo(HostVO host, Event e, long msId) { + // TODO Auto-generated method stub + return false; + } + + @Override + public AgentAttache findAttache(long hostId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void disconnectWithoutInvestigation(long hostId, Event event) { + // TODO Auto-generated method stub + + } + + @Override + public void pullAgentToMaintenance(long hostId) { + // TODO Auto-generated method stub + + } + + @Override + public void pullAgentOutMaintenance(long hostId) { + // TODO Auto-generated method stub + + } + + @Override + public boolean reconnect(long hostId) { + // TODO Auto-generated method stub + return false; + } + + @Override + public Answer sendToSSVM(Long dcId, Command cmd) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void disconnectWithInvestigation(long hostId, Event event) { + // TODO Auto-generated method stub + + } + +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java new file mode 100644 index 000000000..fc4aea858 --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/DirectAgentTest.java @@ -0,0 +1,154 @@ +/* + * 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 org.apache.cloudstack.storage.test; + +import java.util.UUID; + +import javax.inject.Inject; + +import org.apache.cloudstack.storage.to.ImageDataStoreTO; +import org.apache.cloudstack.storage.to.ImageOnPrimaryDataStoreTO; +import org.apache.cloudstack.storage.to.PrimaryDataStoreTO; +import org.apache.cloudstack.storage.to.TemplateTO; +import org.mockito.Mockito; +import org.springframework.test.context.ContextConfiguration; +import org.testng.annotations.Test; + +import com.cloud.agent.AgentManager; +import com.cloud.agent.api.Command; +import com.cloud.agent.api.ReadyCommand; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.DataCenter.NetworkType; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.HostPodVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.dc.dao.HostPodDao; +import com.cloud.exception.AgentUnavailableException; +import com.cloud.exception.OperationTimedoutException; +import com.cloud.host.Host; +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.org.Cluster.ClusterType; +import com.cloud.org.Managed.ManagedState; +import com.cloud.resource.ResourceState; + +@ContextConfiguration(locations="classpath:/storageContext.xml") +public class DirectAgentTest extends CloudStackTestNGBase { + @Inject + AgentManager agentMgr; + @Inject + HostDao hostDao; + @Inject + HostPodDao podDao; + @Inject + ClusterDao clusterDao; + @Inject + DataCenterDao dcDao; + private long dcId; + private long clusterId; + private long hostId; + + @Test(priority = -1) + public void setUp() { + HostVO host = hostDao.findByGuid(this.getHostGuid()); + if (host != null) { + hostId = host.getId(); + dcId = host.getDataCenterId(); + clusterId = host.getClusterId(); + return; + } + //create data center + DataCenterVO dc = new DataCenterVO(UUID.randomUUID().toString(), "test", "8.8.8.8", null, "10.0.0.1", null, "10.0.0.1/24", + null, null, NetworkType.Basic, null, null, true, true, null, null); + dc = dcDao.persist(dc); + dcId = dc.getId(); + //create pod + + HostPodVO pod = new HostPodVO(UUID.randomUUID().toString(), dc.getId(), this.getHostGateway(), this.getHostCidr(), 8, "test"); + pod = podDao.persist(pod); + //create xen cluster + ClusterVO cluster = new ClusterVO(dc.getId(), pod.getId(), "devcloud cluster"); + cluster.setHypervisorType(HypervisorType.XenServer.toString()); + cluster.setClusterType(ClusterType.CloudManaged); + cluster.setManagedState(ManagedState.Managed); + cluster = clusterDao.persist(cluster); + clusterId = cluster.getId(); + //create xen host + + host = new HostVO(this.getHostGuid()); + host.setName("devcloud xen host"); + host.setType(Host.Type.Routing); + host.setHypervisorType(HypervisorType.XenServer); + host.setPrivateIpAddress(this.getHostIp()); + host.setDataCenterId(dc.getId()); + host.setVersion("6.0.1"); + host.setAvailable(true); + host.setSetup(true); + host.setLastPinged(0); + host.setResourceState(ResourceState.Enabled); + host.setClusterId(cluster.getId()); + + host = hostDao.persist(host); + hostId = host.getId(); + } + + @Test + public void testInitResource() { + ReadyCommand cmd = new ReadyCommand(dcId); + try { + agentMgr.send(hostId, cmd); + } catch (AgentUnavailableException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (OperationTimedoutException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + @Test + public void testDownloadTemplate() { + ImageOnPrimaryDataStoreTO image = Mockito.mock(ImageOnPrimaryDataStoreTO.class); + PrimaryDataStoreTO primaryStore = Mockito.mock(PrimaryDataStoreTO.class); + Mockito.when(primaryStore.getUuid()).thenReturn(this.getLocalStorageUuid()); + Mockito.when(image.getPrimaryDataStore()).thenReturn(primaryStore); + + ImageDataStoreTO imageStore = Mockito.mock(ImageDataStoreTO.class); + Mockito.when(imageStore.getType()).thenReturn("http"); + + TemplateTO template = Mockito.mock(TemplateTO.class); + Mockito.when(template.getPath()).thenReturn(this.getTemplateUrl()); + Mockito.when(template.getImageDataStore()).thenReturn(imageStore); + + Mockito.when(image.getTemplate()).thenReturn(template); + //CopyTemplateToPrimaryStorageCmd cmd = new CopyTemplateToPrimaryStorageCmd(image); + Command cmd = null; + try { + agentMgr.send(hostId, cmd); + } catch (AgentUnavailableException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (OperationTimedoutException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHostEndpointRpcServerDirectCallResource.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHostEndpointRpcServerDirectCallResource.java new file mode 100644 index 000000000..4ec2436b0 --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHostEndpointRpcServerDirectCallResource.java @@ -0,0 +1,70 @@ +/* + * 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 org.apache.cloudstack.storage.test; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; + +import javax.inject.Inject; + +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.storage.HostEndpointRpcServer; +import org.apache.cloudstack.storage.HypervisorHostEndPoint; +import org.apache.log4j.Logger; + +import com.cloud.agent.AgentManager; +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.Command; +import com.cloud.exception.AgentUnavailableException; +import com.cloud.exception.OperationTimedoutException; +import com.cloud.utils.component.ComponentContext; + + +public class MockHostEndpointRpcServerDirectCallResource implements HostEndpointRpcServer { + private static final Logger s_logger = Logger.getLogger(MockHostEndpointRpcServerDirectCallResource.class); + private ScheduledExecutorService executor; + @Inject + AgentManager agentMgr; + public MockHostEndpointRpcServerDirectCallResource() { + executor = Executors.newScheduledThreadPool(10); + } + + public void sendCommandAsync(HypervisorHostEndPoint host, final Command command, final AsyncCompletionCallback callback) { + // new MockRpcCallBack(host.getHostId(), command, callback); + MockRpcCallBack run = ComponentContext.inject(MockRpcCallBack.class); + run.setCallback(callback); + run.setCmd(command); + run.setHostId(host.getId()); + executor.schedule(run, 10, TimeUnit.SECONDS); + } + + @Override + public Answer sendCommand(HypervisorHostEndPoint host, Command command) { + Answer answer; + try { + answer = agentMgr.send(host.getId(), command); + return answer; + } catch (AgentUnavailableException e) { + return null; + } catch (OperationTimedoutException e) { + return null; + } + } +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervisorHostEndPointRpcServer.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervisorHostEndPointRpcServer.java new file mode 100644 index 000000000..8fc161bae --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockHypervisorHostEndPointRpcServer.java @@ -0,0 +1,72 @@ +/* + * 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 org.apache.cloudstack.storage.test; + +import java.util.concurrent.Executors; +import java.util.concurrent.ScheduledExecutorService; +import java.util.concurrent.TimeUnit; + +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.storage.HostEndpointRpcServer; +import org.apache.cloudstack.storage.HypervisorHostEndPoint; + +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.Command; + +public class MockHypervisorHostEndPointRpcServer implements HostEndpointRpcServer { + private ScheduledExecutorService executor; + public MockHypervisorHostEndPointRpcServer() { + executor = Executors.newScheduledThreadPool(10); + } + + protected class MockRpcCallBack implements Runnable { + private final Command cmd; + private final AsyncCompletionCallback callback; + public MockRpcCallBack(Command cmd, final AsyncCompletionCallback callback) { + this.cmd = cmd; + this.callback = callback; + } + @Override + public void run() { + try { + Answer answer = new Answer(cmd, false, "unknown command"); + /*if (cmd instanceof CopyTemplateToPrimaryStorageCmd) { + answer = new CopyTemplateToPrimaryStorageAnswer(cmd, UUID.randomUUID().toString()); + } else if (cmd instanceof CreateVolumeFromBaseImageCommand) { + answer = new CreateVolumeAnswer(cmd, UUID.randomUUID().toString()); + }*/ + + callback.complete(answer); + } catch (Exception e) { + e.printStackTrace(); + } + } + + } + + public void sendCommandAsync(HypervisorHostEndPoint host, final Command command, final AsyncCompletionCallback callback) { + executor.schedule(new MockRpcCallBack(command, callback), 10, TimeUnit.SECONDS); + } + + @Override + public Answer sendCommand(HypervisorHostEndPoint host, Command command) { + // TODO Auto-generated method stub + return null; + } +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockRpcCallBack.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockRpcCallBack.java new file mode 100644 index 000000000..e0ffb4828 --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockRpcCallBack.java @@ -0,0 +1,60 @@ +// 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 org.apache.cloudstack.storage.test; + +import javax.inject.Inject; + +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.log4j.Logger; + +import com.cloud.agent.AgentManager; +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.Command; +import com.cloud.utils.db.DB; + +public class MockRpcCallBack implements Runnable { + private static final Logger s_logger = Logger.getLogger(MockRpcCallBack.class); + @Inject + AgentManager agentMgr; + private Command cmd; + private long hostId; + private AsyncCompletionCallback callback; + + public void setCmd(Command cmd) { + this.cmd = cmd; + } + + public void setHostId(long hostId) { + this.hostId = hostId; + } + + public void setCallback(AsyncCompletionCallback callback) { + this.callback = callback; + } + + @Override + @DB + public void run() { + try { + Answer answer = agentMgr.send(hostId, cmd); + callback.complete(answer); + } catch (Throwable e) { + s_logger.debug("send command failed:", e); + } + } + +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockStorageMotionStrategy.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockStorageMotionStrategy.java new file mode 100644 index 000000000..b619ee924 --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/MockStorageMotionStrategy.java @@ -0,0 +1,42 @@ +/* + * 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 org.apache.cloudstack.storage.test; + +import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.storage.motion.DataMotionStrategy; + +public class MockStorageMotionStrategy implements DataMotionStrategy { + + @Override + public boolean canHandle(DataObject srcData, DataObject destData) { + // TODO Auto-generated method stub + return true; + } + + @Override + public Void copyAsync(DataObject srcData, DataObject destData, + AsyncCompletionCallback callback) { + CopyCommandResult result = new CopyCommandResult("something", null); + callback.complete(result); + return null; + } + +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/StorageFactoryBean.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/StorageFactoryBean.java new file mode 100644 index 000000000..2ac6dac4c --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/StorageFactoryBean.java @@ -0,0 +1,58 @@ +// 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 org.apache.cloudstack.storage.test; + + +import org.mockito.Mockito; +import org.springframework.beans.factory.FactoryBean; + +/** + * A {@link FactoryBean} for creating mocked beans based on Mockito so that they + * can be {@link @Autowired} into Spring test configurations. + * + * @author Mattias Severson, Jayway + * + * @see FactoryBean + * @see org.mockito.Mockito + */ +public class StorageFactoryBean implements FactoryBean { + + private Class classToBeMocked; + + /** + * Creates a Mockito mock instance of the provided class. + * @param classToBeMocked The class to be mocked. + */ + public StorageFactoryBean(Class classToBeMocked) { + this.classToBeMocked = classToBeMocked; + } + + @Override + public T getObject() throws Exception { + return Mockito.mock(classToBeMocked); + } + + @Override + public Class getObjectType() { + return classToBeMocked; + } + + @Override + public boolean isSingleton() { + return true; + } +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/StorageTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/StorageTest.java new file mode 100644 index 000000000..0ee7fe0a4 --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/StorageTest.java @@ -0,0 +1,36 @@ +// 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 org.apache.cloudstack.storage.test; + +import static org.junit.Assert.*; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations="classpath:resource/storageContext.xml") +public class StorageTest { + + @Test + public void test() { + fail("Not yet implemented"); + } + +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TestConfiguration.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TestConfiguration.java new file mode 100644 index 000000000..7cec42a33 --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TestConfiguration.java @@ -0,0 +1,23 @@ +// 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 org.apache.cloudstack.storage.test; + +import org.springframework.context.annotation.Configuration; + +@Configuration +public class TestConfiguration { +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TestHttp.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TestHttp.java new file mode 100644 index 000000000..8b10f7e32 --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TestHttp.java @@ -0,0 +1,90 @@ +/* + * 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 org.apache.cloudstack.storage.test; + +import java.io.BufferedOutputStream; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.io.OutputStream; +import java.nio.channels.FileChannel; + +import junit.framework.Assert; + +import org.apache.commons.httpclient.HttpException; +import org.apache.cxf.helpers.IOUtils; +import org.apache.http.Header; +import org.apache.http.HttpEntity; +import org.apache.http.HttpResponse; +import org.apache.http.client.methods.HttpGet; +import org.apache.http.client.methods.HttpHead; +import org.apache.http.impl.client.DefaultHttpClient; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; +import org.springframework.test.context.testng.AbstractTestNGSpringContextTests; +import org.testng.annotations.Parameters; + +@ContextConfiguration(locations="classpath:/storageContext.xml") +public class TestHttp extends AbstractTestNGSpringContextTests { + @Test + @Parameters("template-url") + public void testHttpclient(String templateUrl) { + HttpHead method = new HttpHead(templateUrl); + DefaultHttpClient client = new DefaultHttpClient(); + + OutputStream output = null; + long length = 0; + try { + HttpResponse response = client.execute(method); + length = Long.parseLong(response.getFirstHeader("Content-Length").getValue()); + System.out.println(response.getFirstHeader("Content-Length").getValue()); + File localFile = new File("/tmp/test"); + if (!localFile.exists()) { + localFile.createNewFile(); + } + + HttpGet getMethod = new HttpGet(templateUrl); + response = client.execute(getMethod); + HttpEntity entity = response.getEntity(); + + output = new BufferedOutputStream(new FileOutputStream(localFile)); + entity.writeTo(output); + } catch (HttpException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } finally { + try { + if (output != null) + output.close(); + } catch (IOException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + File f = new File("/tmp/test"); + Assert.assertEquals(f.length(), length); + } +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TestNG.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TestNG.java new file mode 100644 index 000000000..b3ecd3c22 --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TestNG.java @@ -0,0 +1,35 @@ +// 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 org.apache.cloudstack.storage.test; + +import junit.framework.Assert; + +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.testng.AbstractTestNGSpringContextTests; +import org.springframework.test.context.testng.AbstractTransactionalTestNGSpringContextTests; +import org.testng.annotations.Parameters; +import org.testng.annotations.Test; + +import com.cloud.utils.db.DB; +@ContextConfiguration(locations="classpath:/storageContext.xml") +public class TestNG extends AbstractTestNGSpringContextTests { + @Test + @DB + public void test1() { + Assert.assertEquals("", "192.168.56.2"); + } +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TestNGAop.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TestNGAop.java new file mode 100644 index 000000000..130ecd219 --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/TestNGAop.java @@ -0,0 +1,53 @@ +// 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 org.apache.cloudstack.storage.test; + +import java.lang.reflect.Method; +import java.util.List; + +import org.testng.IMethodInstance; +import org.testng.IMethodInterceptor; +import org.testng.ITestContext; +import org.testng.ITestNGMethod; +import org.testng.internal.ConstructorOrMethod; + +import com.cloud.utils.db.DB; +import com.cloud.utils.db.Transaction; + +public class TestNGAop implements IMethodInterceptor { + + @Override + public List intercept(List methods, + ITestContext context) { + for (IMethodInstance methodIns : methods) { + ITestNGMethod method = methodIns.getMethod(); + ConstructorOrMethod meth = method.getConstructorOrMethod(); + Method m = meth.getMethod(); + if (m != null) { + DB db = m.getAnnotation(DB.class); + if (db != null) { + Transaction txn = Transaction.open(m.getName()); + } + } + } + + + // TODO Auto-generated method stub + return methods; + } + +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/XenEndpoint.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/XenEndpoint.java new file mode 100644 index 000000000..d0709d5be --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/XenEndpoint.java @@ -0,0 +1,21 @@ +// 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 org.apache.cloudstack.storage.test; + +public class XenEndpoint { + +} diff --git a/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java new file mode 100644 index 000000000..35a1790a0 --- /dev/null +++ b/engine/storage/integration-test/test/org/apache/cloudstack/storage/test/volumeServiceTest.java @@ -0,0 +1,471 @@ +/* + * 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 org.apache.cloudstack.storage.test; + +import java.net.URI; +import java.net.URISyntaxException; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.UUID; +import java.util.concurrent.ExecutionException; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope; +import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreLifeCycle; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProviderManager; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint; +import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.ImageService; +import org.apache.cloudstack.engine.subsystem.api.storage.ScopeType; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService.VolumeApiResult; +import org.apache.cloudstack.engine.subsystem.api.storage.type.RootDisk; +import org.apache.cloudstack.framework.async.AsyncCallFuture; +import org.apache.cloudstack.storage.HypervisorHostEndPoint; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.apache.cloudstack.storage.endpoint.EndPointSelector; +import org.apache.cloudstack.storage.volume.db.VolumeDao2; +import org.apache.cloudstack.storage.volume.db.VolumeVO; +import org.mockito.Mockito; +import org.springframework.test.context.ContextConfiguration; +import org.testng.Assert; +import org.testng.annotations.Test; + +import com.cloud.agent.AgentManager; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.DataCenter.NetworkType; +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.HostPodVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.dc.dao.HostPodDao; +import com.cloud.host.Host; +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.org.Cluster.ClusterType; +import com.cloud.org.Managed.ManagedState; +import com.cloud.resource.ResourceState; +import com.cloud.storage.Storage; +import com.cloud.storage.Storage.StoragePoolType; +import com.cloud.storage.Storage.TemplateType; +import com.cloud.storage.VMTemplateVO; +import com.cloud.storage.dao.VMTemplateDao; +import com.cloud.utils.component.ComponentContext; + +@ContextConfiguration(locations={"classpath:/storageContext.xml"}) +public class volumeServiceTest extends CloudStackTestNGBase { + //@Inject + //ImageDataStoreProviderManager imageProviderMgr; + @Inject + ImageService imageService; + @Inject + VolumeService volumeService; + @Inject + VMTemplateDao imageDataDao; + @Inject + VolumeDao2 volumeDao; + @Inject + HostDao hostDao; + @Inject + HostPodDao podDao; + @Inject + ClusterDao clusterDao; + @Inject + DataCenterDao dcDao; + @Inject + PrimaryDataStoreDao primaryStoreDao; + @Inject + DataStoreProviderManager dataStoreProviderMgr; + @Inject + AgentManager agentMgr; + @Inject + EndPointSelector selector; + @Inject + ImageDataFactory imageDataFactory; + @Inject + VolumeDataFactory volumeFactory; + Long dcId; + Long clusterId; + Long podId; + HostVO host; + String primaryName = "my primary data store"; + DataStore primaryStore; + + @Test(priority = -1) + public void setUp() { + ComponentContext.initComponentsLifeCycle(); + /* try { + dataStoreProviderMgr.configure(null, new HashMap()); + } catch (ConfigurationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + }*/ + host = hostDao.findByGuid(this.getHostGuid()); + if (host != null) { + dcId = host.getDataCenterId(); + clusterId = host.getClusterId(); + podId = host.getPodId(); + return; + } + //create data center + DataCenterVO dc = new DataCenterVO(UUID.randomUUID().toString(), "test", "8.8.8.8", null, "10.0.0.1", null, "10.0.0.1/24", + null, null, NetworkType.Basic, null, null, true, true, null, null); + dc = dcDao.persist(dc); + dcId = dc.getId(); + //create pod + + HostPodVO pod = new HostPodVO(UUID.randomUUID().toString(), dc.getId(), this.getHostGateway(), this.getHostCidr(), 8, "test"); + pod = podDao.persist(pod); + podId = pod.getId(); + //create xen cluster + ClusterVO cluster = new ClusterVO(dc.getId(), pod.getId(), "devcloud cluster"); + cluster.setHypervisorType(HypervisorType.XenServer.toString()); + cluster.setClusterType(ClusterType.CloudManaged); + cluster.setManagedState(ManagedState.Managed); + cluster = clusterDao.persist(cluster); + clusterId = cluster.getId(); + //create xen host + + host = new HostVO(this.getHostGuid()); + host.setName("devcloud xen host"); + host.setType(Host.Type.Routing); + host.setPrivateIpAddress(this.getHostIp()); + host.setDataCenterId(dc.getId()); + host.setVersion("6.0.1"); + host.setAvailable(true); + host.setSetup(true); + host.setPodId(podId); + host.setLastPinged(0); + host.setResourceState(ResourceState.Enabled); + host.setHypervisorType(HypervisorType.XenServer); + host.setClusterId(cluster.getId()); + + host = hostDao.persist(host); + + //primaryStore = createPrimaryDataStore(); + + //CreateVolumeAnswer createVolumeFromImageAnswer = new CreateVolumeAnswer(UUID.randomUUID().toString()); + + /*try { + Mockito.when(agentMgr.send(Mockito.anyLong(), Mockito.any(CreateVolumeFromBaseImageCommand.class))).thenReturn(createVolumeFromImageAnswer); + } catch (AgentUnavailableException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (OperationTimedoutException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + }*/ + + + //Mockito.when(primaryStoreDao.findById(Mockito.anyLong())).thenReturn(primaryStore); + } + + @Override + protected void injectMockito() { + if (host == null) { + return; + } + List results = new ArrayList(); + results.add(host); + Mockito.when(hostDao.listAll()).thenReturn(results); + Mockito.when(hostDao.findById(Mockito.anyLong())).thenReturn(host); + Mockito.when(hostDao.findHypervisorHostInCluster(Mockito.anyLong())).thenReturn(results); + List eps = new ArrayList(); + eps.add(HypervisorHostEndPoint.getHypervisorHostEndPoint(host.getId(), + host.getPrivateIpAddress())); + Mockito.when(selector.selectAll(Mockito.any(DataStore.class))).thenReturn(eps); + Mockito.when(selector.select(Mockito.any(DataObject.class))).thenReturn(eps.get(0)); + Mockito.when(selector.select(Mockito.any(DataObject.class), Mockito.any(DataObject.class))).thenReturn(eps.get(0)); + } + + private VMTemplateVO createImageData() { + VMTemplateVO image = new VMTemplateVO(); + image.setTemplateType(TemplateType.USER); + image.setUrl(this.getTemplateUrl()); + image.setUniqueName(UUID.randomUUID().toString()); + image.setName(UUID.randomUUID().toString()); + image.setPublicTemplate(true); + image.setFeatured(true); + image.setRequiresHvm(true); + image.setBits(64); + image.setFormat(Storage.ImageFormat.VHD); + image.setEnablePassword(true); + image.setEnableSshKey(true); + image.setGuestOSId(1); + image.setBootable(true); + image.setPrepopulate(true); + image.setCrossZones(true); + image.setExtractable(true); + + //image.setImageDataStoreId(storeId); + image = imageDataDao.persist(image); + + return image; + } + + private TemplateInfo createTemplate() { + try { + DataStore store = createImageStore(); + VMTemplateVO image = createImageData(); + TemplateInfo template = imageDataFactory.getTemplate(image.getId(), store); + AsyncCallFuture future = imageService.createTemplateAsync(template, store); + future.get(); + template = imageDataFactory.getTemplate(image.getId(), store); + /*imageProviderMgr.configure("image Provider", new HashMap()); + VMTemplateVO image = createImageData(); + ImageDataStoreProvider defaultProvider = imageProviderMgr.getProvider("DefaultProvider"); + ImageDataStoreLifeCycle lifeCycle = defaultProvider.getLifeCycle(); + ImageDataStore store = lifeCycle.registerDataStore("defaultHttpStore", new HashMap()); + imageService.registerTemplate(image.getId(), store.getImageDataStoreId()); + TemplateEntity te = imageService.getTemplateEntity(image.getId()); + return te;*/ + return template; + } catch (Exception e) { + Assert.fail("failed", e); + return null; + } + } + + //@Test + public void createTemplateTest() { + createTemplate(); + } + + @Test + public void testCreatePrimaryStorage() { + DataStoreProvider provider = dataStoreProviderMgr.getDataStoreProvider("default primary data store provider"); + Map params = new HashMap(); + URI uri = null; + try { + uri = new URI(this.getPrimaryStorageUrl()); + } catch (URISyntaxException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + params.put("url", this.getPrimaryStorageUrl()); + params.put("server", uri.getHost()); + params.put("path", uri.getPath()); + params.put("protocol", StoragePoolType.NetworkFilesystem); + params.put("dcId", dcId.toString()); + params.put("clusterId", clusterId.toString()); + params.put("name", this.primaryName); + params.put("port", "1"); + params.put("roles", DataStoreRole.Primary.toString()); + params.put("uuid", UUID.nameUUIDFromBytes(this.getPrimaryStorageUrl().getBytes()).toString()); + params.put("providerName", String.valueOf(provider.getName())); + + DataStoreLifeCycle lifeCycle = provider.getDataStoreLifeCycle(); + this.primaryStore = lifeCycle.initialize(params); + ClusterScope scope = new ClusterScope(clusterId, podId, dcId); + lifeCycle.attachCluster(this.primaryStore, scope); + } + + private DataStore createImageStore() { + DataStoreProvider provider = dataStoreProviderMgr.getDataStoreProvider("default image data store"); + Map params = new HashMap(); + String name = UUID.randomUUID().toString(); + params.put("name", name); + params.put("uuid", name); + params.put("protocol", "http"); + params.put("scope", ScopeType.GLOBAL.toString()); + params.put("providerName", name); + DataStoreLifeCycle lifeCycle = provider.getDataStoreLifeCycle(); + DataStore store = lifeCycle.initialize(params); + return store; + } + //@Test + public void testcreateImageStore() { + createImageStore(); + } + + + public DataStore createPrimaryDataStore() { + try { + DataStoreProvider provider = dataStoreProviderMgr.getDataStoreProvider("default primary data store provider"); + Map params = new HashMap(); + URI uri = new URI(this.getPrimaryStorageUrl()); + params.put("url", this.getPrimaryStorageUrl()); + params.put("server", uri.getHost()); + params.put("path", uri.getPath()); + params.put("protocol", Storage.StoragePoolType.NetworkFilesystem); + params.put("dcId", dcId.toString()); + params.put("clusterId", clusterId.toString()); + params.put("name", this.primaryName); + params.put("port", "1"); + params.put("roles", DataStoreRole.Primary.toString()); + params.put("uuid", UUID.nameUUIDFromBytes(this.getPrimaryStorageUrl().getBytes()).toString()); + params.put("providerName", String.valueOf(provider.getName())); + + DataStoreLifeCycle lifeCycle = provider.getDataStoreLifeCycle(); + DataStore store = lifeCycle.initialize(params); + ClusterScope scope = new ClusterScope(clusterId, podId, dcId); + lifeCycle.attachCluster(store, scope); + + /* + PrimaryDataStoreProvider provider = primaryDataStoreProviderMgr.getDataStoreProvider("default primary data store provider"); + primaryDataStoreProviderMgr.configure("primary data store mgr", new HashMap()); + + List ds = primaryStoreDao.findPoolByName(this.primaryName); + if (ds.size() >= 1) { + PrimaryDataStoreVO store = ds.get(0); + if (store.getRemoved() == null) { + return provider.getDataStore(store.getId()); + } + } + + + Map params = new HashMap(); + params.put("url", this.getPrimaryStorageUrl()); + params.put("dcId", dcId.toString()); + params.put("clusterId", clusterId.toString()); + params.put("name", this.primaryName); + PrimaryDataStoreInfo primaryDataStoreInfo = provider.registerDataStore(params); + PrimaryDataStoreLifeCycle lc = primaryDataStoreInfo.getLifeCycle(); + ClusterScope scope = new ClusterScope(clusterId, podId, dcId); + lc.attachCluster(scope); + return primaryDataStoreInfo; + */ + return store; + } catch (Exception e) { + return null; + } + } + + private VolumeVO createVolume(Long templateId, long dataStoreId) { + VolumeVO volume = new VolumeVO(1000, new RootDisk().toString(), UUID.randomUUID().toString(), templateId); + volume.setPoolId(dataStoreId); + volume = volumeDao.persist(volume); + return volume; + } + + @Test(priority=2) + public void createVolumeFromTemplate() { + DataStore primaryStore = this.primaryStore; + TemplateInfo te = createTemplate(); + VolumeVO volume = createVolume(te.getId(), primaryStore.getId()); + VolumeInfo vol = volumeFactory.getVolume(volume.getId(), primaryStore); + //ve.createVolumeFromTemplate(primaryStore.getId(), new VHD(), te); + AsyncCallFuture future = volumeService.createVolumeFromTemplateAsync(vol, primaryStore.getId(), te); + try { + future.get(); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (ExecutionException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + //@Test(priority=3) + public void createDataDisk() { + DataStore primaryStore = this.primaryStore; + VolumeVO volume = createVolume(null, primaryStore.getId()); + VolumeInfo vol = volumeFactory.getVolume(volume.getId(), primaryStore); + AsyncCallFuture future = volumeService.createVolumeAsync(vol, primaryStore); + try { + future.get(); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (ExecutionException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + //@Test(priority=3) + public void createAndDeleteDataDisk() { + DataStore primaryStore = this.primaryStore; + VolumeVO volume = createVolume(null, primaryStore.getId()); + VolumeInfo vol = volumeFactory.getVolume(volume.getId(), primaryStore); + AsyncCallFuture future = volumeService.createVolumeAsync(vol, primaryStore); + try { + future.get(); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (ExecutionException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + //delete the volume + vol = volumeFactory.getVolume(volume.getId(), primaryStore); + future = volumeService.expungeVolumeAsync(vol); + try { + future.get(); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (ExecutionException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + //@Test(priority=3) + public void tearDown() { + List ds = primaryStoreDao.findPoolByName(this.primaryName); + for (int i = 0; i < ds.size(); i++) { + StoragePoolVO store = ds.get(i); + store.setUuid(null); + primaryStoreDao.remove(ds.get(i).getId()); + primaryStoreDao.expunge(ds.get(i).getId()); + } + } + + //@Test + //@Test + public void test1() { + /*System.out.println(VolumeTypeHelper.getType("Root")); + System.out.println(VolumeDiskTypeHelper.getDiskType("vmdk")); + System.out.println(ImageFormatHelper.getFormat("ova")); + AssertJUnit.assertFalse(new VMDK().equals(new VHD())); + VMDK vmdk = new VMDK(); + AssertJUnit.assertTrue(vmdk.equals(vmdk)); + VMDK newvmdk = new VMDK(); + AssertJUnit.assertTrue(vmdk.equals(newvmdk)); + + ImageFormat ova = new OVA(); + ImageFormat iso = new ISO(); + AssertJUnit.assertTrue(ova.equals(new OVA())); + AssertJUnit.assertFalse(ova.equals(iso)); + AssertJUnit.assertTrue(ImageFormatHelper.getFormat("test").equals(new Unknown())); + + VolumeDiskType qcow2 = new QCOW2(); + ImageFormat qcow2format = new org.apache.cloudstack.storage.image.format.QCOW2(); + AssertJUnit.assertFalse(qcow2.equals(qcow2format)); +*/ + } + +} diff --git a/engine/storage/integration-test/test/resource/StorageAllocatorTestContext.xml b/engine/storage/integration-test/test/resource/StorageAllocatorTestContext.xml new file mode 100644 index 000000000..1f5aa585f --- /dev/null +++ b/engine/storage/integration-test/test/resource/StorageAllocatorTestContext.xml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/engine/storage/integration-test/test/resource/component.xml b/engine/storage/integration-test/test/resource/component.xml new file mode 100644 index 000000000..5ba87e8eb --- /dev/null +++ b/engine/storage/integration-test/test/resource/component.xml @@ -0,0 +1,201 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/engine/storage/integration-test/test/resource/storageContext.xml b/engine/storage/integration-test/test/resource/storageContext.xml new file mode 100644 index 000000000..7c5382d49 --- /dev/null +++ b/engine/storage/integration-test/test/resource/storageContext.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/engine/storage/integration-test/test/resource/testng.xml b/engine/storage/integration-test/test/resource/testng.xml new file mode 100644 index 000000000..db32c247d --- /dev/null +++ b/engine/storage/integration-test/test/resource/testng.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/engine/storage/pom.xml b/engine/storage/pom.xml new file mode 100644 index 000000000..270fe47c7 --- /dev/null +++ b/engine/storage/pom.xml @@ -0,0 +1,74 @@ + + + 4.0.0 + cloud-engine-storage + Apache CloudStack Engine Storage Component + + org.apache.cloudstack + cloud-engine + 4.2.0-SNAPSHOT + ../pom.xml + + + + org.apache.cloudstack + cloud-api + ${project.version} + + + org.apache.cloudstack + cloud-core + ${project.version} + + + org.apache.cloudstack + cloud-server + ${project.version} + + + org.apache.cloudstack + cloud-engine-components-api + ${project.version} + + + org.apache.cloudstack + cloud-framework-ipc + ${project.version} + + + org.apache.cloudstack + cloud-engine-api + ${project.version} + + + mysql + mysql-connector-java + ${cs.mysql.version} + provided + + + org.mockito + mockito-all + 1.9.5 + + + javax.inject + javax.inject + 1 + + + + install + src + + diff --git a/engine/storage/snapshot/pom.xml b/engine/storage/snapshot/pom.xml new file mode 100644 index 000000000..211cdac57 --- /dev/null +++ b/engine/storage/snapshot/pom.xml @@ -0,0 +1,54 @@ + + + 4.0.0 + cloud-engine-storage-snapshot + Apache CloudStack Engine Storage Snapshot Component + + org.apache.cloudstack + cloud-engine + 4.2.0-SNAPSHOT + ../../pom.xml + + + + org.apache.cloudstack + cloud-engine-storage + ${project.version} + + + mysql + mysql-connector-java + ${cs.mysql.version} + provided + + + org.mockito + mockito-all + 1.9.5 + + + javax.inject + javax.inject + 1 + + + + install + ${project.basedir}/test + + + ${project.basedir}/test/resource + + + + diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotDataFactoryImpl.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotDataFactoryImpl.java new file mode 100644 index 000000000..fa7772a97 --- /dev/null +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotDataFactoryImpl.java @@ -0,0 +1,84 @@ +/* + * 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 org.apache.cloudstack.storage.snapshot; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager; +import org.springframework.stereotype.Component; + +import com.cloud.storage.Snapshot; +import com.cloud.storage.SnapshotVO; +import com.cloud.storage.dao.SnapshotDao; +import com.cloud.utils.exception.CloudRuntimeException; + +@Component +public class SnapshotDataFactoryImpl implements SnapshotDataFactory { + @Inject + SnapshotDao snapshotDao; + @Inject + ObjectInDataStoreManager objMap; + @Inject + DataStoreManager storeMgr; + @Inject + VolumeDataFactory volumeFactory; + @Override + public SnapshotInfo getSnapshot(long snapshotId, DataStore store) { + SnapshotVO snapshot = snapshotDao.findByIdIncludingRemoved(snapshotId); + DataObjectInStore obj = objMap.findObject(snapshot.getUuid(), DataObjectType.SNAPSHOT, store.getUuid(), store.getRole()); + if (obj == null) { + return null; + } + SnapshotObject so = SnapshotObject.getSnapshotObject(snapshot, store); + return so; + } + @Override + public SnapshotInfo getSnapshot(long snapshotId) { + SnapshotVO snapshot = snapshotDao.findByIdIncludingRemoved(snapshotId); + SnapshotObject so = null; + if (snapshot.getState() == Snapshot.State.BackedUp) { + DataStore store = objMap.findStore(snapshot.getUuid(), DataObjectType.SNAPSHOT, DataStoreRole.Image); + so = SnapshotObject.getSnapshotObject(snapshot, store); + } else { + VolumeInfo volume = this.volumeFactory.getVolume(snapshot.getVolumeId()); + so = SnapshotObject.getSnapshotObject(snapshot, volume.getDataStore()); + } + return so; + } + + @Override + public SnapshotInfo getSnapshot(DataObject obj, DataStore store) { + SnapshotVO snapshot = snapshotDao.findByIdIncludingRemoved(obj.getId()); + if (snapshot == null) { + throw new CloudRuntimeException("Can't find snapshot: " + obj.getId()); + } + SnapshotObject so = SnapshotObject.getSnapshotObject(snapshot, store); + return so; + } +} diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java new file mode 100644 index 000000000..37238b721 --- /dev/null +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotObject.java @@ -0,0 +1,223 @@ +/* + * 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 org.apache.cloudstack.storage.snapshot; + +import java.util.Date; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.disktype.DiskFormat; +import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager; +import org.apache.log4j.Logger; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.storage.Snapshot; +import com.cloud.storage.SnapshotVO; +import com.cloud.storage.dao.SnapshotDao; +import com.cloud.storage.dao.VolumeDao; +import com.cloud.utils.component.ComponentContext; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.fsm.NoTransitionException; + +public class SnapshotObject implements SnapshotInfo { + private static final Logger s_logger = Logger.getLogger(SnapshotObject.class); + private SnapshotVO snapshot; + private DataStore store; + @Inject + protected SnapshotDao snapshotDao; + @Inject + protected VolumeDao volumeDao; + @Inject protected VolumeDataFactory volFactory; + @Inject protected SnapshotStateMachineManager stateMachineMgr; + @Inject + ObjectInDataStoreManager ojbectInStoreMgr; + public SnapshotObject() { + + } + + protected void configure(SnapshotVO snapshot, DataStore store) { + this.snapshot = snapshot; + this.store = store; + } + + public static SnapshotObject getSnapshotObject(SnapshotVO snapshot, DataStore store) { + SnapshotObject snapObj = ComponentContext.inject(SnapshotObject.class); + snapObj.configure(snapshot, store); + return snapObj; + } + + public DataStore getStore() { + return this.store; + } + + @Override + public SnapshotInfo getParent() { + // TODO Auto-generated method stub + return null; + } + + @Override + public SnapshotInfo getChild() { + // TODO Auto-generated method stub + return null; + } + + @Override + public VolumeInfo getBaseVolume() { + return volFactory.getVolume(this.snapshot.getVolumeId()); + } + + @Override + public long getId() { + return this.snapshot.getId(); + } + + @Override + public String getUri() { + return this.snapshot.getUuid(); + } + + @Override + public DataStore getDataStore() { + return this.store; + } + + @Override + public Long getSize() { + return this.snapshot.getSize(); + } + + @Override + public DataObjectType getType() { + return DataObjectType.SNAPSHOT; + } + + @Override + public DiskFormat getFormat() { + return null; + } + + @Override + public String getUuid() { + return this.snapshot.getUuid(); + } + + @Override + public void processEvent( + ObjectInDataStoreStateMachine.Event event) { + try { + ojbectInStoreMgr.update(this, event); + } catch (Exception e) { + s_logger.debug("Failed to update state:" + e.toString()); + throw new CloudRuntimeException("Failed to update state: " + e.toString()); + } + } + + @Override + public long getAccountId() { + return this.snapshot.getAccountId(); + } + + @Override + public long getVolumeId() { + return this.snapshot.getVolumeId(); + } + + @Override + public String getPath() { + return this.snapshot.getPath(); + } + + public void setPath(String path) { + this.snapshot.setPath(path); + } + + @Override + public String getName() { + return this.snapshot.getName(); + } + + @Override + public Date getCreated() { + return this.snapshot.getCreated(); + } + + @Override + public Type getRecurringType() { + return this.snapshot.getRecurringType(); + } + + @Override + public State getState() { + return this.snapshot.getState(); + } + + @Override + public HypervisorType getHypervisorType() { + return this.snapshot.getHypervisorType(); + } + + @Override + public boolean isRecursive() { + return this.snapshot.isRecursive(); + } + + @Override + public short getsnapshotType() { + return this.snapshot.getsnapshotType(); + } + + @Override + public long getDomainId() { + return this.snapshot.getDomainId(); + } + + public void setPrevSnapshotId(Long id) { + this.snapshot.setPrevSnapshotId(id); + } + + @Override + public Long getDataCenterId() { + return this.snapshot.getDataCenterId(); + } + + public void processEvent(Snapshot.Event event) + throws NoTransitionException { + stateMachineMgr.processEvent(this.snapshot, event); + } + + @Override + public Long getPrevSnapshotId() { + return this.snapshot.getPrevSnapshotId(); + } + + public void setBackupSnapshotId(String id) { + this.snapshot.setBackupSnapshotId(id); + } + + public String getBackupSnapshotId() { + return this.snapshot.getBackupSnapshotId(); + } +} diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java new file mode 100644 index 000000000..1b64fd0ca --- /dev/null +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotServiceImpl.java @@ -0,0 +1,56 @@ +// 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 org.apache.cloudstack.storage.snapshot; + +import org.apache.cloudstack.engine.cloud.entity.api.SnapshotEntity; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; +import org.springframework.stereotype.Component; + +@Component +public class SnapshotServiceImpl implements SnapshotService { + + public SnapshotServiceImpl() { + + } + + @Override + public SnapshotEntity getSnapshotEntity(long snapshotId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean takeSnapshot(SnapshotInfo snapshot) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean revertSnapshot(SnapshotInfo snapshot) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean deleteSnapshot(SnapshotInfo snapshot) { + // TODO Auto-generated method stub + return false; + } + + + +} diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotStateMachineManager.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotStateMachineManager.java new file mode 100644 index 000000000..c6057704c --- /dev/null +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotStateMachineManager.java @@ -0,0 +1,26 @@ +// 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 org.apache.cloudstack.storage.snapshot; + +import com.cloud.storage.Snapshot.Event; +import com.cloud.storage.SnapshotVO; +import com.cloud.utils.fsm.NoTransitionException; + +public interface SnapshotStateMachineManager { + public void processEvent(SnapshotVO snapshot, Event event) throws NoTransitionException; +} diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotStateMachineManagerImpl.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotStateMachineManagerImpl.java new file mode 100644 index 000000000..aa1cf684d --- /dev/null +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/SnapshotStateMachineManagerImpl.java @@ -0,0 +1,54 @@ +// 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 org.apache.cloudstack.storage.snapshot; + +import javax.inject.Inject; + +import org.springframework.stereotype.Component; + +import com.cloud.storage.Snapshot; +import com.cloud.storage.Snapshot.Event; +import com.cloud.storage.Snapshot.State; +import com.cloud.storage.SnapshotVO; +import com.cloud.storage.dao.SnapshotDao; +import com.cloud.storage.listener.SnapshotStateListener; +import com.cloud.utils.fsm.NoTransitionException; +import com.cloud.utils.fsm.StateMachine2; + +@Component +public class SnapshotStateMachineManagerImpl implements +SnapshotStateMachineManager { + private StateMachine2 stateMachine = new StateMachine2(); + @Inject + protected SnapshotDao snapshotDao; + public SnapshotStateMachineManagerImpl() { + stateMachine.addTransition(Snapshot.State.Allocated, Event.CreateRequested, Snapshot.State.Creating); + stateMachine.addTransition(Snapshot.State.Creating, Event.OperationSucceeded, Snapshot.State.CreatedOnPrimary); + stateMachine.addTransition(Snapshot.State.Creating, Event.OperationNotPerformed, Snapshot.State.BackedUp); + stateMachine.addTransition(Snapshot.State.Creating, Event.OperationFailed, Snapshot.State.Error); + stateMachine.addTransition(Snapshot.State.CreatedOnPrimary, Event.BackupToSecondary, Snapshot.State.BackingUp); + stateMachine.addTransition(Snapshot.State.BackingUp, Event.OperationSucceeded, Snapshot.State.BackedUp); + stateMachine.addTransition(Snapshot.State.BackingUp, Event.OperationFailed, Snapshot.State.CreatedOnPrimary); + + stateMachine.registerListener(new SnapshotStateListener()); + } + + public void processEvent(SnapshotVO snapshot, Event event) throws NoTransitionException { + stateMachine.transitTo(snapshot, event, null, snapshotDao); + } +} diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/db/SnapshotDao2.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/db/SnapshotDao2.java new file mode 100644 index 000000000..d531ede0a --- /dev/null +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/db/SnapshotDao2.java @@ -0,0 +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. + */ +package org.apache.cloudstack.storage.snapshot.db; + +import com.cloud.utils.db.GenericDao; + +public interface SnapshotDao2 extends GenericDao { + +} diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/db/SnapshotDao2Impl.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/db/SnapshotDao2Impl.java new file mode 100644 index 000000000..74cec5e76 --- /dev/null +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/db/SnapshotDao2Impl.java @@ -0,0 +1,28 @@ +/* + * 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 org.apache.cloudstack.storage.snapshot.db; + +import org.springframework.stereotype.Component; + +import com.cloud.utils.db.GenericDaoBase; + +@Component +public class SnapshotDao2Impl extends GenericDaoBase implements SnapshotDao2 { + +} diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/db/SnapshotVO.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/db/SnapshotVO.java new file mode 100644 index 000000000..b05b80362 --- /dev/null +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/db/SnapshotVO.java @@ -0,0 +1,296 @@ +// 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 org.apache.cloudstack.storage.snapshot.db; + +import java.util.Date; +import java.util.UUID; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.storage.Snapshot.State; +import com.cloud.storage.Snapshot.Type; +import com.cloud.utils.db.GenericDao; +import com.google.gson.annotations.Expose; + +@Entity +@Table(name="snapshots") +public class SnapshotVO { + @Id + @GeneratedValue(strategy=GenerationType.IDENTITY) + @Column(name="id") + private final long id = -1; + + @Column(name="data_center_id") + long dataCenterId; + + @Column(name="account_id") + long accountId; + + @Column(name="domain_id") + long domainId; + + @Column(name="volume_id") + Long volumeId; + + @Column(name="disk_offering_id") + Long diskOfferingId; + + @Expose + @Column(name="path") + String path; + + @Expose + @Column(name="name") + String name; + + @Expose + @Column(name="status", updatable = true, nullable=false) + @Enumerated(value=EnumType.STRING) + private State status; + + @Column(name="snapshot_type") + short snapshotType; + + @Column(name="type_description") + String typeDescription; + + @Column(name="size") + long size; + + @Column(name=GenericDao.CREATED_COLUMN) + Date created; + + @Column(name=GenericDao.REMOVED_COLUMN) + Date removed; + + @Column(name="backup_snap_id") + String backupSnapshotId; + + @Column(name="swift_id") + Long swiftId; + + @Column(name="s3_id") + Long s3Id; + + @Column(name="sechost_id") + Long secHostId; + + @Column(name="prev_snap_id") + long prevSnapshotId; + + @Column(name="hypervisor_type") + @Enumerated(value=EnumType.STRING) + HypervisorType hypervisorType; + + @Expose + @Column(name="version") + String version; + + @Column(name="uuid") + String uuid; + + public SnapshotVO() { + this.uuid = UUID.randomUUID().toString(); + } + + public SnapshotVO(long dcId, long accountId, long domainId, Long volumeId, Long diskOfferingId, String path, String name, short snapshotType, String typeDescription, long size, HypervisorType hypervisorType ) { + this.dataCenterId = dcId; + this.accountId = accountId; + this.domainId = domainId; + this.volumeId = volumeId; + this.diskOfferingId = diskOfferingId; + this.path = path; + this.name = name; + this.snapshotType = snapshotType; + this.typeDescription = typeDescription; + this.size = size; + this.status = State.Creating; + this.prevSnapshotId = 0; + this.hypervisorType = hypervisorType; + this.version = "2.2"; + this.uuid = UUID.randomUUID().toString(); + } + + public long getId() { + return id; + } + + public long getDataCenterId() { + return dataCenterId; + } + + + public long getAccountId() { + return accountId; + } + + + public long getDomainId() { + return domainId; + } + + public long getVolumeId() { + return volumeId; + } + + public long getDiskOfferingId() { + return diskOfferingId; + } + + public void setVolumeId(Long volumeId) { + this.volumeId = volumeId; + } + + public String getPath() { + return path; + } + + public void setPath(String path) { + this.path = path; + } + + public String getName() { + return name; + } + + public short getsnapshotType() { + return snapshotType; + } + + public Type getType() { + if (snapshotType < 0 || snapshotType >= Type.values().length) { + return null; + } + return Type.values()[snapshotType]; + } + + public Long getSwiftId() { + return swiftId; + } + + public void setSwiftId(Long swiftId) { + this.swiftId = swiftId; + } + + public Long getSecHostId() { + return secHostId; + } + + public void setSecHostId(Long secHostId) { + this.secHostId = secHostId; + } + + public HypervisorType getHypervisorType() { + return hypervisorType; + } + + public void setSnapshotType(short snapshotType) { + this.snapshotType = snapshotType; + } + + public boolean isRecursive(){ + if ( snapshotType >= Type.HOURLY.ordinal() && snapshotType <= Type.MONTHLY.ordinal() ) { + return true; + } + return false; + } + + public long getSize() { + return size; + } + + public String getTypeDescription() { + return typeDescription; + } + public void setTypeDescription(String typeDescription) { + this.typeDescription = typeDescription; + } + + public String getVersion() { + return version; + } + + public void setVersion(String version) { + this.version = version; + } + + public Date getCreated() { + return created; + } + + public Date getRemoved() { + return removed; + } + + public State getStatus() { + return status; + } + + public void setStatus(State status) { + this.status = status; + } + + public String getBackupSnapshotId(){ + return backupSnapshotId; + } + + public long getPrevSnapshotId(){ + return prevSnapshotId; + } + + public void setBackupSnapshotId(String backUpSnapshotId){ + this.backupSnapshotId = backUpSnapshotId; + } + + public void setPrevSnapshotId(long prevSnapshotId){ + this.prevSnapshotId = prevSnapshotId; + } + + public static Type getSnapshotType(String snapshotType) { + for ( Type type : Type.values()) { + if ( type.equals(snapshotType)) { + return type; + } + } + return null; + } + + public String getUuid() { + return this.uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public Long getS3Id() { + return s3Id; + } + + public void setS3Id(Long s3Id) { + this.s3Id = s3Id; + } + +} diff --git a/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/strategy/AncientSnapshotStrategy.java b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/strategy/AncientSnapshotStrategy.java new file mode 100644 index 000000000..9e666d215 --- /dev/null +++ b/engine/storage/snapshot/src/org/apache/cloudstack/storage/snapshot/strategy/AncientSnapshotStrategy.java @@ -0,0 +1,608 @@ +// 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 org.apache.cloudstack.storage.snapshot.strategy; + +import java.util.List; +import java.util.concurrent.ExecutionException; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotStrategy; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope; +import org.apache.cloudstack.framework.async.AsyncCallFuture; +import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.framework.async.AsyncRpcConext; +import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.motion.DataMotionService; +import org.apache.cloudstack.storage.snapshot.SnapshotObject; +import org.apache.cloudstack.storage.snapshot.SnapshotStateMachineManager; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.BackupSnapshotAnswer; +import com.cloud.agent.api.DeleteSnapshotBackupCommand; +import com.cloud.agent.api.to.S3TO; +import com.cloud.agent.api.to.SwiftTO; +import com.cloud.configuration.Resource.ResourceType; +import com.cloud.configuration.dao.ConfigurationDao; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.event.EventTypes; +import com.cloud.event.UsageEventUtils; +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.host.HostVO; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.resource.ResourceManager; +import com.cloud.storage.Snapshot; +import com.cloud.storage.SnapshotVO; +import com.cloud.storage.StoragePool; +import com.cloud.storage.VolumeManager; +import com.cloud.storage.VolumeVO; +import com.cloud.storage.dao.SnapshotDao; +import com.cloud.storage.dao.VolumeDao; +import com.cloud.storage.s3.S3Manager; +import com.cloud.storage.snapshot.SnapshotManager; +import com.cloud.storage.swift.SwiftManager; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.Transaction; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.fsm.NoTransitionException; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.VirtualMachine.State; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.snapshot.VMSnapshot; +import com.cloud.vm.snapshot.VMSnapshotVO; +import com.cloud.vm.snapshot.dao.VMSnapshotDao; + +@Component +public class AncientSnapshotStrategy implements SnapshotStrategy { + private static final Logger s_logger = Logger.getLogger(AncientSnapshotStrategy.class); + @Inject + protected VolumeDao _volsDao; + @Inject + protected UserVmDao _vmDao; + @Inject + protected PrimaryDataStoreDao _storagePoolDao; + @Inject + protected ClusterDao _clusterDao; + @Inject + protected SnapshotDao snapshotDao; + @Inject + private ResourceManager _resourceMgr; + @Inject + protected SnapshotDao _snapshotDao; + @Inject + protected SnapshotManager snapshotMgr; + @Inject + protected VolumeManager volumeMgr; + @Inject + private ConfigurationDao _configDao; + @Inject + protected SnapshotStateMachineManager stateMachineManager; + @Inject + private VolumeDao volumeDao; + @Inject + SnapshotDataFactory snapshotfactory; + @Inject + DataStoreManager dataStoreMgr; + @Inject + DataMotionService motionSrv; + @Inject + ObjectInDataStoreManager objInStoreMgr; + @Inject + VMSnapshotDao _vmSnapshotDao; + + + @Override + public boolean canHandle(SnapshotInfo snapshot) { + return true; + } + + static private class CreateSnapshotContext extends AsyncRpcConext { + final VolumeInfo volume; + final SnapshotInfo snapshot; + final AsyncCallFuture future; + public CreateSnapshotContext(AsyncCompletionCallback callback, VolumeInfo volume, + SnapshotInfo snapshot, + AsyncCallFuture future) { + super(callback); + this.volume = volume; + this.snapshot = snapshot; + this.future = future; + } + } + + static private class DeleteSnapshotContext extends AsyncRpcConext { + final SnapshotInfo snapshot; + final AsyncCallFuture future; + public DeleteSnapshotContext(AsyncCompletionCallback callback, SnapshotInfo snapshot, + AsyncCallFuture future) { + super(callback); + this.snapshot = snapshot; + this.future = future; + } + + } + + static private class CopySnapshotContext extends AsyncRpcConext { + final SnapshotInfo srcSnapshot; + final SnapshotInfo destSnapshot; + final AsyncCallFuture future; + public CopySnapshotContext(AsyncCompletionCallback callback, + SnapshotInfo srcSnapshot, + SnapshotInfo destSnapshot, + AsyncCallFuture future) { + super(callback); + this.srcSnapshot = srcSnapshot; + this.destSnapshot = destSnapshot; + this.future = future; + } + + } + + protected Void createSnapshotAsyncCallback(AsyncCallbackDispatcher callback, + CreateSnapshotContext context) { + CreateCmdResult result = callback.getResult(); + SnapshotObject snapshot = (SnapshotObject)context.snapshot; + VolumeInfo volume = context.volume; + AsyncCallFuture future = context.future; + SnapshotResult snapResult = new SnapshotResult(snapshot); + if (result.isFailed()) { + s_logger.debug("create snapshot " + context.snapshot.getName() + " failed: " + result.getResult()); + try { + snapshot.processEvent(Snapshot.Event.OperationFailed); + } catch (NoTransitionException nte) { + s_logger.debug("Failed to update snapshot state due to " + nte.getMessage()); + } + + + snapResult.setResult(result.getResult()); + future.complete(snapResult); + return null; + } + + try { + SnapshotVO preSnapshotVO = this.snapshotMgr.getParentSnapshot(volume, snapshot); + String preSnapshotPath = null; + if (preSnapshotVO != null) { + preSnapshotPath = preSnapshotVO.getPath(); + } + SnapshotVO snapshotVO = this.snapshotDao.findById(snapshot.getId()); + // The snapshot was successfully created + if (preSnapshotPath != null && preSnapshotPath.equals(result.getPath())) { + // empty snapshot + s_logger.debug("CreateSnapshot: this is empty snapshot "); + + snapshotVO.setPath(preSnapshotPath); + snapshotVO.setBackupSnapshotId(preSnapshotVO.getBackupSnapshotId()); + snapshotVO.setSwiftId(preSnapshotVO.getSwiftId()); + snapshotVO.setPrevSnapshotId(preSnapshotVO.getId()); + snapshotVO.setSecHostId(preSnapshotVO.getSecHostId()); + snapshot.processEvent(Snapshot.Event.OperationNotPerformed); + } else { + long preSnapshotId = 0; + + if (preSnapshotVO != null && preSnapshotVO.getBackupSnapshotId() != null) { + preSnapshotId = preSnapshotVO.getId(); + int _deltaSnapshotMax = NumbersUtil.parseInt(_configDao.getValue("snapshot.delta.max"), SnapshotManager.DELTAMAX); + int deltaSnap = _deltaSnapshotMax; + + int i; + for (i = 1; i < deltaSnap; i++) { + String prevBackupUuid = preSnapshotVO.getBackupSnapshotId(); + // previous snapshot doesn't have backup, create a full snapshot + if (prevBackupUuid == null) { + preSnapshotId = 0; + break; + } + long preSSId = preSnapshotVO.getPrevSnapshotId(); + if (preSSId == 0) { + break; + } + preSnapshotVO = _snapshotDao.findByIdIncludingRemoved(preSSId); + } + if (i >= deltaSnap) { + preSnapshotId = 0; + } + } + + //If the volume is moved around, backup a full snapshot to secondary storage + if (volume.getLastPoolId() != null && !volume.getLastPoolId().equals(volume.getPoolId())) { + preSnapshotId = 0; + //TODO: fix this hack + VolumeVO volumeVO = this.volumeDao.findById(volume.getId()); + volumeVO.setLastPoolId(volume.getPoolId()); + this.volumeDao.update(volume.getId(), volumeVO); + } + + snapshot.setPath(result.getPath()); + snapshot.setPrevSnapshotId(preSnapshotId); + + snapshot.processEvent(Snapshot.Event.OperationSucceeded); + snapResult = new SnapshotResult(this.snapshotfactory.getSnapshot(snapshot.getId())); + } + } catch (Exception e) { + s_logger.debug("Failed to create snapshot: ", e); + snapResult.setResult(e.toString()); + try { + snapshot.processEvent(Snapshot.Event.OperationFailed); + } catch (NoTransitionException e1) { + s_logger.debug("Failed to change snapshot state: " + e1.toString()); + } + } + + future.complete(snapResult); + return null; + } + + class SnapshotResult extends CommandResult { + SnapshotInfo snashot; + public SnapshotResult(SnapshotInfo snapshot) { + this.snashot = snapshot; + } + } + + protected SnapshotInfo createSnapshotOnPrimary(VolumeInfo volume, Long snapshotId) { + SnapshotObject snapshot = (SnapshotObject)this.snapshotfactory.getSnapshot(snapshotId); + if (snapshot == null) { + throw new CloudRuntimeException("Can not find snapshot " + snapshotId); + } + + try { + snapshot.processEvent(Snapshot.Event.CreateRequested); + } catch (NoTransitionException nte) { + s_logger.debug("Failed to update snapshot state due to " + nte.getMessage()); + throw new CloudRuntimeException("Failed to update snapshot state due to " + nte.getMessage()); + } + + AsyncCallFuture future = new AsyncCallFuture(); + try { + CreateSnapshotContext context = new CreateSnapshotContext( + null, volume, snapshot, future); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher + .create(this); + caller.setCallback( + caller.getTarget().createSnapshotAsyncCallback(null, null)) + .setContext(context); + PrimaryDataStoreDriver primaryStore = (PrimaryDataStoreDriver)volume.getDataStore().getDriver(); + primaryStore.takeSnapshot(snapshot, caller); + } catch (Exception e) { + s_logger.debug("Failed to take snapshot: " + snapshot.getId(), e); + try { + snapshot.processEvent(Snapshot.Event.OperationFailed); + } catch (NoTransitionException e1) { + s_logger.debug("Failed to change state for event: OperationFailed" , e); + } + throw new CloudRuntimeException("Failed to take snapshot" + snapshot.getId()); + } + + SnapshotResult result; + + try { + result = future.get(); + if (result.isFailed()) { + s_logger.debug("Failed to create snapshot:" + result.getResult()); + throw new CloudRuntimeException(result.getResult()); + } + return result.snashot; + } catch (InterruptedException e) { + s_logger.debug("Failed to create snapshot", e); + throw new CloudRuntimeException("Failed to create snapshot", e); + } catch (ExecutionException e) { + s_logger.debug("Failed to create snapshot", e); + throw new CloudRuntimeException("Failed to create snapshot", e); + } + + } + + private boolean hostSupportSnapsthot(HostVO host) { + if (host.getHypervisorType() != HypervisorType.KVM) { + return true; + } + // Determine host capabilities + String caps = host.getCapabilities(); + + if (caps != null) { + String[] tokens = caps.split(","); + for (String token : tokens) { + if (token.contains("snapshot")) { + return true; + } + } + } + return false; + } + + protected boolean supportedByHypervisor(VolumeInfo volume) { + if (volume.getHypervisorType().equals(HypervisorType.KVM)) { + StoragePool storagePool = (StoragePool)volume.getDataStore(); + ClusterVO cluster = _clusterDao.findById(storagePool.getClusterId()); + List hosts = _resourceMgr.listAllHostsInCluster(cluster.getId()); + if (hosts != null && !hosts.isEmpty()) { + HostVO host = hosts.get(0); + if (!hostSupportSnapsthot(host)) { + throw new CloudRuntimeException("KVM Snapshot is not supported on cluster: " + host.getId()); + } + } + } + + // if volume is attached to a vm in destroyed or expunging state; disallow + if (volume.getInstanceId() != null) { + UserVmVO userVm = _vmDao.findById(volume.getInstanceId()); + if (userVm != null) { + if (userVm.getState().equals(State.Destroyed) || userVm.getState().equals(State.Expunging)) { + throw new CloudRuntimeException("Creating snapshot failed due to volume:" + volume.getId() + " is associated with vm:" + userVm.getInstanceName() + " is in " + + userVm.getState().toString() + " state"); + } + + if(userVm.getHypervisorType() == HypervisorType.VMware || userVm.getHypervisorType() == HypervisorType.KVM) { + List activeSnapshots = _snapshotDao.listByInstanceId(volume.getInstanceId(), Snapshot.State.Creating, Snapshot.State.CreatedOnPrimary, Snapshot.State.BackingUp); + if(activeSnapshots.size() > 1) + throw new CloudRuntimeException("There is other active snapshot tasks on the instance to which the volume is attached, please try again later"); + } + + List activeVMSnapshots = _vmSnapshotDao.listByInstanceId(userVm.getId(), + VMSnapshot.State.Creating, VMSnapshot.State.Reverting, VMSnapshot.State.Expunging); + if (activeVMSnapshots.size() > 0) { + throw new CloudRuntimeException( + "There is other active vm snapshot tasks on the instance to which the volume is attached, please try again later"); + } + } + } + + return true; + } + + @Override + public SnapshotInfo takeSnapshot(VolumeInfo volume, Long snapshotId) { + + supportedByHypervisor(volume); + + SnapshotInfo snapshot = createSnapshotOnPrimary(volume, snapshotId); + return snapshot; + } + + @Override + public SnapshotInfo backupSnapshot(SnapshotInfo snapshot) { + SnapshotObject snapObj = (SnapshotObject)snapshot; + AsyncCallFuture future = new AsyncCallFuture(); + SnapshotResult result = new SnapshotResult(snapshot); + try { + + snapObj.processEvent(Snapshot.Event.BackupToSecondary); + + ZoneScope scope = new ZoneScope(snapshot.getDataCenterId()); + List stores = this.dataStoreMgr.getImageStores(scope); + if (stores.size() != 1) { + throw new CloudRuntimeException("find out more than one image stores"); + } + + DataStore imageStore = stores.get(0); + SnapshotInfo snapshotOnImageStore = (SnapshotInfo)imageStore.create(snapshot); + + snapshotOnImageStore.processEvent(Event.CreateOnlyRequested); + CopySnapshotContext context = new CopySnapshotContext(null, snapshot, + snapshotOnImageStore, future); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher + .create(this); + caller.setCallback( + caller.getTarget().copySnapshotAsyncCallback(null, null)) + .setContext(context); + this.motionSrv.copyAsync(snapshot, snapshotOnImageStore, caller); + } catch (Exception e) { + s_logger.debug("Failed to copy snapshot", e); + result.setResult("Failed to copy snapshot:" +e.toString()); + try { + snapObj.processEvent(Snapshot.Event.OperationFailed); + } catch (NoTransitionException e1) { + s_logger.debug("Failed to change state: " + e1.toString()); + } + future.complete(result); + } + + try { + SnapshotResult res = future.get(); + SnapshotInfo destSnapshot = res.snashot; + return destSnapshot; + } catch (InterruptedException e) { + s_logger.debug("failed copy snapshot", e); + throw new CloudRuntimeException("Failed to copy snapshot" , e); + } catch (ExecutionException e) { + s_logger.debug("Failed to copy snapshot", e); + throw new CloudRuntimeException("Failed to copy snapshot" , e); + } + + } + + protected Void copySnapshotAsyncCallback(AsyncCallbackDispatcher callback, + CopySnapshotContext context) { + CopyCommandResult result = callback.getResult(); + SnapshotInfo destSnapshot = context.destSnapshot; + SnapshotObject srcSnapshot = (SnapshotObject)context.srcSnapshot; + AsyncCallFuture future = context.future; + SnapshotResult snapResult = new SnapshotResult(destSnapshot); + if (result.isFailed()) { + snapResult.setResult(result.getResult()); + future.complete(snapResult); + return null; + } + + try { + BackupSnapshotAnswer answer = (BackupSnapshotAnswer)result.getAnswer(); + + DataObjectInStore dataInStore = objInStoreMgr.findObject(destSnapshot, destSnapshot.getDataStore()); + dataInStore.setInstallPath(answer.getBackupSnapshotName()); + objInStoreMgr.update(destSnapshot, Event.OperationSuccessed); + + srcSnapshot.processEvent(Snapshot.Event.OperationSucceeded); + snapResult = new SnapshotResult(this.snapshotfactory.getSnapshot(destSnapshot.getId())); + future.complete(snapResult); + } catch (Exception e) { + s_logger.debug("Failed to update snapshot state", e); + snapResult.setResult(e.toString()); + future.complete(snapResult); + } + return null; + } + + @DB + protected boolean destroySnapshotBackUp(SnapshotVO snapshot) { + DataStore store = objInStoreMgr.findStore(snapshot.getUuid(), DataObjectType.SNAPSHOT, DataStoreRole.Image); + if (store == null) { + s_logger.debug("Can't find snapshot" + snapshot.getId() + " backed up into image store"); + return false; + } + + try { + SnapshotInfo snapshotInfo = this.snapshotfactory.getSnapshot(snapshot.getId(), store); + snapshotInfo.processEvent(ObjectInDataStoreStateMachine.Event.DestroyRequested); + + AsyncCallFuture future = new AsyncCallFuture(); + DeleteSnapshotContext context = new DeleteSnapshotContext(null, + snapshotInfo, future); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher + .create(this); + caller.setCallback( + caller.getTarget().deleteSnapshotCallback(null, null)) + .setContext(context); + + store.getDriver().deleteAsync(snapshotInfo, caller); + + SnapshotResult result = future.get(); + if (result.isFailed()) { + s_logger.debug("Failed to delete snapsoht: " + result.getResult()); + } + return result.isSuccess(); + } catch (Exception e) { + s_logger.debug("Failed to delete snapshot", e); + return false; + } + } + + protected Void deleteSnapshotCallback(AsyncCallbackDispatcher callback, + DeleteSnapshotContext context) { + CommandResult result = callback.getResult(); + AsyncCallFuture future = context.future; + SnapshotInfo snapshot = context.snapshot; + if (result.isFailed()) { + s_logger.debug("delete snapshot failed" + result.getResult()); + snapshot.processEvent(ObjectInDataStoreStateMachine.Event.OperationFailed); + SnapshotResult res = new SnapshotResult(context.snapshot); + future.complete(res); + return null; + } + snapshot.processEvent(ObjectInDataStoreStateMachine.Event.OperationSuccessed); + SnapshotResult res = new SnapshotResult(context.snapshot); + future.complete(res); + return null; + } + + @Override + public boolean deleteSnapshot(SnapshotInfo snapInfo) { + Long snapshotId = snapInfo.getId(); + SnapshotObject snapshot = (SnapshotObject)snapInfo; + + if (!Snapshot.State.BackedUp.equals(snapshot.getState())) { + throw new InvalidParameterValueException("Can't delete snapshotshot " + snapshotId + " due to it is not in BackedUp Status"); + } + + if (s_logger.isDebugEnabled()) { + s_logger.debug("Calling deleteSnapshot for snapshotId: " + snapshotId); + } + SnapshotVO lastSnapshot = null; + if (snapshot.getBackupSnapshotId() != null) { + List snaps = _snapshotDao.listByBackupUuid(snapshot.getVolumeId(), snapshot.getBackupSnapshotId()); + if (snaps != null && snaps.size() > 1) { + snapshot.setBackupSnapshotId(null); + SnapshotVO snapshotVO = this._snapshotDao.findById(snapshotId); + _snapshotDao.update(snapshot.getId(), snapshotVO); + } + } + + _snapshotDao.remove(snapshotId); + + long lastId = snapshotId; + boolean destroy = false; + while (true) { + lastSnapshot = _snapshotDao.findNextSnapshot(lastId); + if (lastSnapshot == null) { + // if all snapshots after this snapshot in this chain are removed, remove those snapshots. + destroy = true; + break; + } + if (lastSnapshot.getRemoved() == null) { + // if there is one child not removed, then can not remove back up snapshot. + break; + } + lastId = lastSnapshot.getId(); + } + if (destroy) { + lastSnapshot = _snapshotDao.findByIdIncludingRemoved(lastId); + while (lastSnapshot.getRemoved() != null) { + String BackupSnapshotId = lastSnapshot.getBackupSnapshotId(); + if (BackupSnapshotId != null) { + List snaps = _snapshotDao.listByBackupUuid(lastSnapshot.getVolumeId(), BackupSnapshotId); + if (snaps != null && snaps.size() > 1) { + lastSnapshot.setBackupSnapshotId(null); + _snapshotDao.update(lastSnapshot.getId(), lastSnapshot); + } else { + if (destroySnapshotBackUp(lastSnapshot)) { + + } else { + s_logger.debug("Destroying snapshot backup failed " + lastSnapshot); + break; + } + } + } + lastId = lastSnapshot.getPrevSnapshotId(); + if (lastId == 0) { + break; + } + lastSnapshot = _snapshotDao.findByIdIncludingRemoved(lastId); + } + } + return true; + + } + + @Override + public boolean revertSnapshot(SnapshotInfo snapshot) { + // TODO Auto-generated method stub + return false; + } + +} diff --git a/engine/storage/snapshot/test/resource/SnapshotManagerTestContext.xml b/engine/storage/snapshot/test/resource/SnapshotManagerTestContext.xml new file mode 100644 index 000000000..d99c2e2db --- /dev/null +++ b/engine/storage/snapshot/test/resource/SnapshotManagerTestContext.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/engine/storage/snapshot/test/src/SnapshotDataFactoryTest.java b/engine/storage/snapshot/test/src/SnapshotDataFactoryTest.java new file mode 100644 index 000000000..e722ab55c --- /dev/null +++ b/engine/storage/snapshot/test/src/SnapshotDataFactoryTest.java @@ -0,0 +1,50 @@ +/* + * 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 src; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotDataFactory; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import com.cloud.utils.component.ComponentContext; + +import junit.framework.TestCase; + +//@RunWith(SpringJUnit4ClassRunner.class) +//@ContextConfiguration(locations = "classpath:/SnapshotManagerTestContext.xml") +public class SnapshotDataFactoryTest extends TestCase { + //@Inject SnapshotDataFactory snapshotFactory; + + @Before + public void setup() throws Exception { + //ComponentContext.initComponentsLifeCycle(); + + } + + @Test + public void testGestSnapshot() { + //snapshotFactory.getSnapshot(snapshotId); + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/BaseType.java b/engine/storage/src/org/apache/cloudstack/storage/BaseType.java new file mode 100644 index 000000000..a5b45e17f --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/BaseType.java @@ -0,0 +1,40 @@ +/* + * 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 org.apache.cloudstack.storage; + +public abstract class BaseType { + public boolean equals(Object that) { + if (this == that) { + return true; + } + if (that instanceof String) { + if (this.toString().equalsIgnoreCase((String) that)) { + return true; + } + } else if (that instanceof BaseType) { + BaseType th = (BaseType) that; + if (this.toString().equalsIgnoreCase(th.toString())) { + return true; + } + } else { + return false; + } + return false; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/EndPoint.java b/engine/storage/src/org/apache/cloudstack/storage/EndPoint.java new file mode 100644 index 000000000..b248758bc --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/EndPoint.java @@ -0,0 +1,16 @@ +// 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. diff --git a/engine/storage/src/org/apache/cloudstack/storage/HostEndpointRpcServer.java b/engine/storage/src/org/apache/cloudstack/storage/HostEndpointRpcServer.java new file mode 100644 index 000000000..a316223b2 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/HostEndpointRpcServer.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.cloudstack.storage; + +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; + +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.Command; + +public interface HostEndpointRpcServer { + void sendCommandAsync(HypervisorHostEndPoint ep, final Command command, final AsyncCompletionCallback callback); + Answer sendCommand(HypervisorHostEndPoint ep, final Command command); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPoint.java b/engine/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPoint.java new file mode 100644 index 000000000..6c49b1a0e --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPoint.java @@ -0,0 +1,75 @@ +/* + * 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 org.apache.cloudstack.storage; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.log4j.Logger; + +import com.cloud.agent.AgentManager; +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.Command; +import com.cloud.exception.AgentUnavailableException; +import com.cloud.exception.OperationTimedoutException; +import com.cloud.utils.component.ComponentContext; + +public class HypervisorHostEndPoint implements EndPoint { + private static final Logger s_logger = Logger.getLogger(HypervisorHostEndPoint.class); + private long hostId; + private String hostAddress; + @Inject + AgentManager agentMgr; + @Inject + HostEndpointRpcServer rpcServer; + + protected HypervisorHostEndPoint() { + + } + + private void configure(long hostId, String hostAddress) { + this.hostId = hostId; + this.hostAddress = hostAddress; + } + + public static HypervisorHostEndPoint getHypervisorHostEndPoint(long hostId, String hostAddress) { + HypervisorHostEndPoint ep = ComponentContext.inject(HypervisorHostEndPoint.class); + ep.configure(hostId, hostAddress); + return ep; + } + + public String getHostAddr() { + return this.hostAddress; + } + + public long getId() { + return this.hostId; + } + + @Override + public Answer sendMessage(Command cmd) { + return rpcServer.sendCommand(this, cmd); + } + + @Override + public void sendMessageAsync(Command cmd, AsyncCompletionCallback callback) { + rpcServer.sendCommandAsync(this, cmd, callback); + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPointRpcServer.java b/engine/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPointRpcServer.java new file mode 100644 index 000000000..bc217769d --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/HypervisorHostEndPointRpcServer.java @@ -0,0 +1,119 @@ +/* + * 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 org.apache.cloudstack.storage; + +import javax.annotation.PostConstruct; +import javax.inject.Inject; + +import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.framework.async.AsyncRpcConext; +import org.apache.cloudstack.framework.rpc.RpcCallbackListener; +import org.apache.cloudstack.framework.rpc.RpcException; +import org.apache.cloudstack.framework.rpc.RpcProvider; +import org.apache.cloudstack.framework.rpc.RpcServiceDispatcher; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.Command; +import com.cloud.utils.exception.CloudRuntimeException; + +@Component +public class HypervisorHostEndPointRpcServer implements HostEndpointRpcServer { + private static final Logger s_logger = Logger.getLogger(HypervisorHostEndPointRpcServer.class); + + @Inject + private RpcProvider rpcProvider; + + public HypervisorHostEndPointRpcServer() { + } + + public HypervisorHostEndPointRpcServer(RpcProvider rpcProvider) { + rpcProvider = rpcProvider; + rpcProvider.registerRpcServiceEndpoint(RpcServiceDispatcher.getDispatcher(this)); + } + + @PostConstruct + public void Initialize() { + rpcProvider.registerRpcServiceEndpoint(RpcServiceDispatcher.getDispatcher(this)); + } + + @Override + public void sendCommandAsync(HypervisorHostEndPoint host, final Command command, final AsyncCompletionCallback callback) { + rpcProvider.newCall(host.getHostAddr()).addCallbackListener(new RpcCallbackListener() { + @Override + public void onSuccess(Answer result) { + callback.complete(result); + } + + @Override + public void onFailure(RpcException e) { + Answer answer = new Answer(command, false, e.toString()); + callback.complete(answer); + } + }).apply(); + } + + private class SendCommandContext extends AsyncRpcConext { + private T answer; + + public SendCommandContext(AsyncCompletionCallback callback) { + super(callback); + } + + public void setAnswer(T answer) { + this.answer = answer; + } + + public T getAnswer() { + return this.answer; + } + + } + + @Override + public Answer sendCommand(HypervisorHostEndPoint host, Command command) { + SendCommandContext context = new SendCommandContext(null); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setCallback(caller.getTarget().sendCommandCallback(null, null)) + .setContext(context); + + this.sendCommandAsync(host, command, caller); + + synchronized (context) { + try { + context.wait(); + } catch (InterruptedException e) { + s_logger.debug(e.toString()); + throw new CloudRuntimeException("wait on context is interrupted", e); + } + } + + return context.getAnswer(); + } + + protected Object sendCommandCallback(AsyncCallbackDispatcher callback, SendCommandContext context) { + context.setAnswer((Answer)callback.getResult()); + synchronized(context) { + context.notify(); + } + return null; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java new file mode 100755 index 000000000..3a66b859b --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/AbstractStoragePoolAllocator.java @@ -0,0 +1,192 @@ +// 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 org.apache.cloudstack.storage.allocator; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Random; + +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.log4j.Logger; + +import com.cloud.configuration.dao.ConfigurationDao; +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; +import com.cloud.storage.DiskOfferingVO; +import com.cloud.storage.Storage.StoragePoolType; +import com.cloud.storage.StorageManager; +import com.cloud.storage.StoragePool; +import com.cloud.storage.Volume; +import com.cloud.storage.Volume.Type; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.dao.VolumeDao; +import com.cloud.user.Account; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.component.AdapterBase; +import com.cloud.vm.DiskProfile; +import com.cloud.vm.VirtualMachine; +import com.cloud.vm.VirtualMachineProfile; + +public abstract class AbstractStoragePoolAllocator extends AdapterBase implements StoragePoolAllocator { + private static final Logger s_logger = Logger.getLogger(AbstractStoragePoolAllocator.class); + @Inject StorageManager storageMgr; + protected @Inject PrimaryDataStoreDao _storagePoolDao; + @Inject VolumeDao _volumeDao; + @Inject ConfigurationDao _configDao; + @Inject ClusterDao _clusterDao; + protected @Inject DataStoreManager dataStoreMgr; + protected BigDecimal _storageOverprovisioningFactor = new BigDecimal(1); + long _extraBytesPerVolume = 0; + Random _rand; + boolean _dontMatter; + protected String _allocationAlgorithm = "random"; + @Inject + DiskOfferingDao _diskOfferingDao; + + @Override + public boolean configure(String name, Map params) throws ConfigurationException { + super.configure(name, params); + + Map configs = _configDao.getConfiguration(null, params); + + String globalStorageOverprovisioningFactor = configs.get("storage.overprovisioning.factor"); + _storageOverprovisioningFactor = new BigDecimal(NumbersUtil.parseFloat(globalStorageOverprovisioningFactor, 2.0f)); + + _extraBytesPerVolume = 0; + + _rand = new Random(System.currentTimeMillis()); + + _dontMatter = Boolean.parseBoolean(configs.get("storage.overwrite.provisioning")); + + String allocationAlgorithm = configs.get("vm.allocation.algorithm"); + if (allocationAlgorithm != null) { + _allocationAlgorithm = allocationAlgorithm; + } + + return true; + } + + protected abstract List select(DiskProfile dskCh, VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid, int returnUpTo); + + @Override + public + List allocateToPool(DiskProfile dskCh, VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid, int returnUpTo) { + List pools = select(dskCh, vmProfile, plan, avoid, returnUpTo); + return reOrder(pools, vmProfile, plan); + } + + protected List reorderPoolsByNumberOfVolumes(DeploymentPlan plan, List pools, Account account) { + if(account == null){ + return pools; + } + long dcId = plan.getDataCenterId(); + Long podId = plan.getPodId(); + Long clusterId = plan.getClusterId(); + + List poolIdsByVolCount = _volumeDao.listPoolIdsByVolumeCount(dcId, podId, clusterId, account.getAccountId()); + if (s_logger.isDebugEnabled()) { + s_logger.debug("List of pools in ascending order of number of volumes for account id: "+ account.getAccountId() + " is: "+ poolIdsByVolCount); + } + + //now filter the given list of Pools by this ordered list + Map poolMap = new HashMap(); + for (StoragePool pool : pools) { + poolMap.put(pool.getId(), pool); + } + List matchingPoolIds = new ArrayList(poolMap.keySet()); + + poolIdsByVolCount.retainAll(matchingPoolIds); + + List reorderedPools = new ArrayList(); + for(Long id: poolIdsByVolCount){ + reorderedPools.add(poolMap.get(id)); + } + + return reorderedPools; + } + + protected List reOrder(List pools, + VirtualMachineProfile vmProfile, + DeploymentPlan plan) { + Account account = null; + if(vmProfile.getVirtualMachine() != null){ + account = vmProfile.getOwner(); + } + + if(_allocationAlgorithm.equals("random") || _allocationAlgorithm.equals("userconcentratedpod_random") || (account == null)) { + // Shuffle this so that we don't check the pools in the same order. + Collections.shuffle(pools); + }else if(_allocationAlgorithm.equals("userdispersing")){ + pools = reorderPoolsByNumberOfVolumes(plan, pools, account); + } + return pools; + } + + protected boolean filter(ExcludeList avoid, StoragePool pool, DiskProfile dskCh, + DeploymentPlan plan) { + + if (s_logger.isDebugEnabled()) { + s_logger.debug("Checking if storage pool is suitable, name: " + pool.getName()+ " ,poolId: "+ pool.getId()); + } + if (avoid.shouldAvoid(pool)) { + if (s_logger.isDebugEnabled()) { + s_logger.debug("StoragePool is in avoid set, skipping this pool"); + } + return false; + } + + if(dskCh.getType().equals(Type.ROOT) && pool.getPoolType().equals(StoragePoolType.Iscsi)){ + if (s_logger.isDebugEnabled()) { + s_logger.debug("Disk needed for ROOT volume, but StoragePoolType is Iscsi, skipping this and trying other available pools"); + } + return false; + } + + DiskOfferingVO diskOffering = _diskOfferingDao.findById(dskCh.getDiskOfferingId()); + if (diskOffering.getSystemUse() && pool.getPoolType() == StoragePoolType.RBD) { + s_logger.debug("Skipping RBD pool " + pool.getName() + " as a suitable pool. RBD is not supported for System VM's"); + return false; + } + + + Long clusterId = pool.getClusterId(); + ClusterVO cluster = _clusterDao.findById(clusterId); + if (!(cluster.getHypervisorType() == dskCh.getHypervisorType())) { + if (s_logger.isDebugEnabled()) { + s_logger.debug("StoragePool's Cluster does not have required hypervisorType, skipping this pool"); + } + return false; + } + + // check capacity + Volume volume = _volumeDao.findById(dskCh.getVolumeId()); + List requestVolumes = new ArrayList(); + requestVolumes.add(volume); + return storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool); + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java new file mode 100644 index 000000000..0dd55d1d3 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/ClusterScopeStoragePoolAllocator.java @@ -0,0 +1,106 @@ +// 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 org.apache.cloudstack.storage.allocator; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +import javax.ejb.Local; +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; +import com.cloud.offering.ServiceOffering; +import com.cloud.storage.StoragePool; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.vm.DiskProfile; +import com.cloud.vm.VirtualMachine; +import com.cloud.vm.VirtualMachineProfile; + +@Component +@Local(value=StoragePoolAllocator.class) +public class ClusterScopeStoragePoolAllocator extends AbstractStoragePoolAllocator { + private static final Logger s_logger = Logger.getLogger(ClusterScopeStoragePoolAllocator.class); + protected String _allocationAlgorithm = "random"; + + @Inject + DiskOfferingDao _diskOfferingDao; + + @Override + protected List select(DiskProfile dskCh, VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid, int returnUpTo) { + + s_logger.debug("ClusterScopeStoragePoolAllocator looking for storage pool"); + List suitablePools = new ArrayList(); + + long dcId = plan.getDataCenterId(); + Long podId = plan.getPodId(); + Long clusterId = plan.getClusterId(); + + if(dskCh.getTags() != null && dskCh.getTags().length != 0){ + s_logger.debug("Looking for pools in dc: " + dcId + " pod:" + podId + " cluster:" + clusterId + " having tags:" + Arrays.toString(dskCh.getTags())); + }else{ + s_logger.debug("Looking for pools in dc: " + dcId + " pod:" + podId + " cluster:" + clusterId); + } + + List pools = _storagePoolDao.findPoolsByTags(dcId, podId, clusterId, dskCh.getTags()); + if (pools.size() == 0) { + if (s_logger.isDebugEnabled()) { + String storageType = dskCh.useLocalStorage() ? ServiceOffering.StorageType.local.toString() : ServiceOffering.StorageType.shared.toString(); + s_logger.debug("No storage pools available for " + storageType + " volume allocation, returning"); + } + return suitablePools; + } + + for (StoragePoolVO pool: pools) { + if(suitablePools.size() == returnUpTo){ + break; + } + StoragePool pol = (StoragePool)this.dataStoreMgr.getPrimaryDataStore(pool.getId()); + if (filter(avoid, pol, dskCh, plan)) { + suitablePools.add(pol); + } + } + + if (s_logger.isDebugEnabled()) { + s_logger.debug("FirstFitStoragePoolAllocator returning "+suitablePools.size() +" suitable storage pools"); + } + + return suitablePools; + } + + @Override + public boolean configure(String name, Map params) throws ConfigurationException { + super.configure(name, params); + + if (_configDao != null) { + Map configs = _configDao.getConfiguration(params); + String allocationAlgorithm = configs.get("vm.allocation.algorithm"); + if (allocationAlgorithm != null) { + _allocationAlgorithm = allocationAlgorithm; + } + } + return true; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/GarbageCollectingStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/GarbageCollectingStoragePoolAllocator.java new file mode 100644 index 000000000..02032ee4f --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/GarbageCollectingStoragePoolAllocator.java @@ -0,0 +1,91 @@ +// 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 org.apache.cloudstack.storage.allocator; + +import java.util.List; +import java.util.Map; + +import javax.ejb.Local; +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator; +import org.apache.log4j.Logger; + +import com.cloud.configuration.dao.ConfigurationDao; +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; +import com.cloud.storage.StorageManager; +import com.cloud.storage.StoragePool; +import com.cloud.utils.component.ComponentContext; +import com.cloud.vm.DiskProfile; +import com.cloud.vm.VirtualMachine; +import com.cloud.vm.VirtualMachineProfile; + +@Local(value=StoragePoolAllocator.class) +public class GarbageCollectingStoragePoolAllocator extends AbstractStoragePoolAllocator { + private static final Logger s_logger = Logger.getLogger(GarbageCollectingStoragePoolAllocator.class); + + StoragePoolAllocator _firstFitStoragePoolAllocator; + StoragePoolAllocator _localStoragePoolAllocator; + @Inject StorageManager storageMgr; + @Inject ConfigurationDao _configDao; + boolean _storagePoolCleanupEnabled; + + @Override + public List select(DiskProfile dskCh, VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid, int returnUpTo) { + s_logger.debug("GarbageCollectingStoragePoolAllocator looking for storage pool"); + if (!_storagePoolCleanupEnabled) { + s_logger.debug("Storage pool cleanup is not enabled, so GarbageCollectingStoragePoolAllocator is being skipped."); + return null; + } + + // Clean up all storage pools + storageMgr.cleanupStorage(false); + // Determine what allocator to use + StoragePoolAllocator allocator; + if (dskCh.useLocalStorage()) { + allocator = _localStoragePoolAllocator; + } else { + allocator = _firstFitStoragePoolAllocator; + } + + // Try to find a storage pool after cleanup + ExcludeList myAvoids = new ExcludeList(avoid.getDataCentersToAvoid(), avoid.getPodsToAvoid(), avoid.getClustersToAvoid(), avoid.getHostsToAvoid(), avoid.getPoolsToAvoid()); + + return allocator.allocateToPool(dskCh, vmProfile, plan, myAvoids, returnUpTo); + } + + @Override + public boolean configure(String name, Map params) throws ConfigurationException { + super.configure(name, params); + + _firstFitStoragePoolAllocator = ComponentContext.inject(ClusterScopeStoragePoolAllocator.class); + _firstFitStoragePoolAllocator.configure("GCFirstFitStoragePoolAllocator", params); + _localStoragePoolAllocator = ComponentContext.inject(LocalStoragePoolAllocator.class); + _localStoragePoolAllocator.configure("GCLocalStoragePoolAllocator", params); + + String storagePoolCleanupEnabled = _configDao.getValue("storage.pool.cleanup.enabled"); + _storagePoolCleanupEnabled = (storagePoolCleanupEnabled == null) ? true : Boolean.parseBoolean(storagePoolCleanupEnabled); + + return true; + } + + public GarbageCollectingStoragePoolAllocator() { + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java new file mode 100644 index 000000000..7447d988a --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/LocalStoragePoolAllocator.java @@ -0,0 +1,127 @@ +// 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 org.apache.cloudstack.storage.allocator; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; + +import javax.ejb.Local; +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.capacity.dao.CapacityDao; +import com.cloud.configuration.dao.ConfigurationDao; +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; +import com.cloud.service.dao.ServiceOfferingDao; +import com.cloud.storage.StoragePool; +import com.cloud.storage.StoragePoolHostVO; +import com.cloud.storage.Volume; +import com.cloud.storage.dao.StoragePoolHostDao; +import com.cloud.utils.NumbersUtil; +import com.cloud.vm.DiskProfile; +import com.cloud.vm.VirtualMachine; +import com.cloud.vm.VirtualMachineProfile; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.dao.VMInstanceDao; + +@Component +@Local(value = StoragePoolAllocator.class) +public class LocalStoragePoolAllocator extends AbstractStoragePoolAllocator { + private static final Logger s_logger = Logger.getLogger(LocalStoragePoolAllocator.class); + + @Inject + StoragePoolHostDao _poolHostDao; + @Inject + VMInstanceDao _vmInstanceDao; + @Inject + UserVmDao _vmDao; + @Inject + ServiceOfferingDao _offeringDao; + @Inject + CapacityDao _capacityDao; + @Inject + ConfigurationDao _configDao; + + @Override + protected List select(DiskProfile dskCh, VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid, int returnUpTo) { + + List suitablePools = new ArrayList(); + + s_logger.debug("LocalStoragePoolAllocator trying to find storage pool to fit the vm"); + + if (!dskCh.useLocalStorage()) { + return suitablePools; + } + + // data disk and host identified from deploying vm (attach volume case) + if (dskCh.getType() == Volume.Type.DATADISK && plan.getHostId() != null) { + List hostPools = _poolHostDao.listByHostId(plan.getHostId()); + for (StoragePoolHostVO hostPool: hostPools) { + StoragePoolVO pool = _storagePoolDao.findById(hostPool.getPoolId()); + if (pool != null && pool.isLocal()) { + StoragePool pol = (StoragePool)this.dataStoreMgr.getPrimaryDataStore(pool.getId()); + if (filter(avoid, pol, dskCh, plan)) { + s_logger.debug("Found suitable local storage pool " + pool.getId() + ", adding to list"); + suitablePools.add(pol); + } + } + + if (suitablePools.size() == returnUpTo) { + break; + } + } + } else { + List availablePools = _storagePoolDao.findLocalStoragePoolsByTags(plan.getDataCenterId(), plan.getPodId(), plan.getClusterId(), dskCh.getTags()); + for (StoragePoolVO pool : availablePools) { + if (suitablePools.size() == returnUpTo) { + break; + } + StoragePool pol = (StoragePool)this.dataStoreMgr.getPrimaryDataStore(pool.getId()); + if (filter(avoid, pol, dskCh, plan)) { + suitablePools.add(pol); + } + } + } + + if (s_logger.isDebugEnabled()) { + s_logger.debug("LocalStoragePoolAllocator returning " + suitablePools.size() + " suitable storage pools"); + } + + return suitablePools; + } + + @Override + public boolean configure(String name, Map params) throws ConfigurationException { + super.configure(name, params); + + _storageOverprovisioningFactor = new BigDecimal(1); + _extraBytesPerVolume = NumbersUtil.parseLong((String) params.get("extra.bytes.per.volume"), 50 * 1024L * 1024L); + + return true; + } + + public LocalStoragePoolAllocator() { + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/UseLocalForRootAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/UseLocalForRootAllocator.java new file mode 100644 index 000000000..4663b12e9 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/UseLocalForRootAllocator.java @@ -0,0 +1,61 @@ +// 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 org.apache.cloudstack.storage.allocator; + +import java.util.List; +import java.util.Map; + +import javax.ejb.Local; +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import org.apache.cloudstack.engine.subsystem.api.storage.StoragePoolAllocator; + +import com.cloud.dc.DataCenterVO; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; +import com.cloud.storage.StoragePool; +import com.cloud.vm.DiskProfile; +import com.cloud.vm.VirtualMachine; +import com.cloud.vm.VirtualMachineProfile; + +@Local(value=StoragePoolAllocator.class) +public class UseLocalForRootAllocator extends LocalStoragePoolAllocator implements StoragePoolAllocator { + + @Inject + DataCenterDao _dcDao; + + @Override + public List allocateToPool(DiskProfile dskCh, VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid, int returnUpTo) { + DataCenterVO dc = _dcDao.findById(plan.getDataCenterId()); + if (!dc.isLocalStorageEnabled()) { + return null; + } + + return super.allocateToPool(dskCh, vmProfile, plan, avoid, returnUpTo); + } + + @Override + public boolean configure(String name, Map params) throws ConfigurationException { + super.configure(name, params); + return true; + } + + protected UseLocalForRootAllocator() { + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java new file mode 100644 index 000000000..1d3cd819d --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/allocator/ZoneWideStoragePoolAllocator.java @@ -0,0 +1,81 @@ +// 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 org.apache.cloudstack.storage.allocator; + +import java.util.ArrayList; +import java.util.List; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.storage.StoragePool; +import com.cloud.storage.Volume; +import com.cloud.vm.DiskProfile; +import com.cloud.vm.VirtualMachine; +import com.cloud.vm.VirtualMachineProfile; + +@Component +public class ZoneWideStoragePoolAllocator extends AbstractStoragePoolAllocator { + private static final Logger s_logger = Logger.getLogger(ZoneWideStoragePoolAllocator.class); + @Inject PrimaryDataStoreDao _storagePoolDao; + @Inject DataStoreManager dataStoreMgr; + + @Override + protected boolean filter(ExcludeList avoid, StoragePool pool, DiskProfile dskCh, + DeploymentPlan plan) { + Volume volume = _volumeDao.findById(dskCh.getVolumeId()); + List requestVolumes = new ArrayList(); + requestVolumes.add(volume); + return storageMgr.storagePoolHasEnoughSpace(requestVolumes, pool); + } + + @Override + protected List select(DiskProfile dskCh, + VirtualMachineProfile vmProfile, + DeploymentPlan plan, ExcludeList avoid, int returnUpTo) { + s_logger.debug("ZoneWideStoragePoolAllocator to find storage pool"); + List suitablePools = new ArrayList(); + HypervisorType hypervisor = dskCh.getHypervisorType(); + if (hypervisor != null) { + if (hypervisor != HypervisorType.KVM) { + s_logger.debug("Only kvm supports zone wide storage"); + return suitablePools; + } + } + + List storagePools = _storagePoolDao.findZoneWideStoragePoolsByTags(plan.getDataCenterId(), dskCh.getTags()); + + for (StoragePoolVO storage : storagePools) { + if (suitablePools.size() == returnUpTo) { + break; + } + StoragePool pol = (StoragePool)this.dataStoreMgr.getPrimaryDataStore(storage.getId()); + if (filter(avoid, pol, dskCh, plan)) { + suitablePools.add(pol); + } + } + return suitablePools; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/backup/SnapshotOnBackupStoreInfo.java b/engine/storage/src/org/apache/cloudstack/storage/backup/SnapshotOnBackupStoreInfo.java new file mode 100644 index 000000000..5f5ce2f4a --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/backup/SnapshotOnBackupStoreInfo.java @@ -0,0 +1,24 @@ +// 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 org.apache.cloudstack.storage.backup; + +import org.apache.cloudstack.storage.backup.datastore.BackupStoreInfo; + +public interface SnapshotOnBackupStoreInfo { + public String getName(); + public BackupStoreInfo getBackupStore(); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/backup/datastore/BackupStoreInfo.java b/engine/storage/src/org/apache/cloudstack/storage/backup/datastore/BackupStoreInfo.java new file mode 100644 index 000000000..ca1454af5 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/backup/datastore/BackupStoreInfo.java @@ -0,0 +1,24 @@ +// 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 org.apache.cloudstack.storage.backup.datastore; + +import org.apache.cloudstack.storage.backup.SnapshotOnBackupStoreInfo; + +public interface BackupStoreInfo { + public SnapshotOnBackupStoreInfo getSnapshot(long snapshotId); + public boolean deleteSnapshot(SnapshotOnBackupStoreInfo snapshot); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/command/AttachPrimaryDataStoreAnswer.java b/engine/storage/src/org/apache/cloudstack/storage/command/AttachPrimaryDataStoreAnswer.java new file mode 100644 index 000000000..cd1503008 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/command/AttachPrimaryDataStoreAnswer.java @@ -0,0 +1,55 @@ +/* + * 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 org.apache.cloudstack.storage.command; + +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.Command; + +public class AttachPrimaryDataStoreAnswer extends Answer { + private String uuid; + private long capacity; + private long avail; + public AttachPrimaryDataStoreAnswer(Command cmd) { + super(cmd); + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getUuid() { + return this.uuid; + } + + public void setCapacity(long capacity) { + this.capacity = capacity; + } + + public long getCapacity() { + return this.capacity; + } + + public void setAvailable(long avail) { + this.avail = avail; + } + + public long getAvailable() { + return this.avail; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/command/AttachPrimaryDataStoreCmd.java b/engine/storage/src/org/apache/cloudstack/storage/command/AttachPrimaryDataStoreCmd.java new file mode 100644 index 000000000..8aaca94ae --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/command/AttachPrimaryDataStoreCmd.java @@ -0,0 +1,38 @@ +/* + * 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 org.apache.cloudstack.storage.command; + +import com.cloud.agent.api.Command; + +public class AttachPrimaryDataStoreCmd extends Command implements StorageSubSystemCommand { + private final String dataStore; + public AttachPrimaryDataStoreCmd(String uri) { + this.dataStore = uri; + } + + public String getDataStore() { + return this.dataStore; + } + + @Override + public boolean executeInSequence() { + // TODO Auto-generated method stub + return false; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/command/CopyCmd.java b/engine/storage/src/org/apache/cloudstack/storage/command/CopyCmd.java new file mode 100644 index 000000000..10478ef24 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/command/CopyCmd.java @@ -0,0 +1,45 @@ +// 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 org.apache.cloudstack.storage.command; + +import com.cloud.agent.api.Command; + +public class CopyCmd extends Command implements StorageSubSystemCommand { + private String srcUri; + private String destUri; + + public CopyCmd(String srcUri, String destUri) { + super(); + this.srcUri = srcUri; + this.destUri = destUri; + } + + public String getDestUri() { + return this.destUri; + } + + public String getSrcUri() { + return this.srcUri; + } + + @Override + public boolean executeInSequence() { + // TODO Auto-generated method stub + return false; + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/command/CopyCmdAnswer.java b/engine/storage/src/org/apache/cloudstack/storage/command/CopyCmdAnswer.java new file mode 100644 index 000000000..53e082e69 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/command/CopyCmdAnswer.java @@ -0,0 +1,33 @@ +// 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 org.apache.cloudstack.storage.command; + +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.Command; + +public class CopyCmdAnswer extends Answer { + private final String path; + + public CopyCmdAnswer(Command cmd, String path) { + super(cmd); + this.path = path; + } + + public String getPath() { + return this.path; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/command/CopyTemplateToPrimaryStorageAnswer.java b/engine/storage/src/org/apache/cloudstack/storage/command/CopyTemplateToPrimaryStorageAnswer.java new file mode 100644 index 000000000..b248758bc --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/command/CopyTemplateToPrimaryStorageAnswer.java @@ -0,0 +1,16 @@ +// 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. diff --git a/engine/storage/src/org/apache/cloudstack/storage/command/CreateObjectAnswer.java b/engine/storage/src/org/apache/cloudstack/storage/command/CreateObjectAnswer.java new file mode 100644 index 000000000..43540de2b --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/command/CreateObjectAnswer.java @@ -0,0 +1,48 @@ +/* + * 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 org.apache.cloudstack.storage.command; + +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.Command; + +public class CreateObjectAnswer extends Answer { + private String path; + private Long size; + protected CreateObjectAnswer() { + super(); + } + + public CreateObjectAnswer(Command cmd, String path, Long size) { + super(cmd); + this.path = path; + this.size = size; + } + + public CreateObjectAnswer(Command cmd, boolean status, String result) { + super(cmd, status, result); + } + + public String getPath() { + return this.path; + } + + public Long getSize() { + return this.size; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/command/CreateObjectCommand.java b/engine/storage/src/org/apache/cloudstack/storage/command/CreateObjectCommand.java new file mode 100644 index 000000000..86d3bd424 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/command/CreateObjectCommand.java @@ -0,0 +1,45 @@ +/* + * 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 org.apache.cloudstack.storage.command; + +import com.cloud.agent.api.Command; + +public class CreateObjectCommand extends Command implements StorageSubSystemCommand { + protected String objectUri; + + public CreateObjectCommand(String objectUri) { + super(); + this.objectUri = objectUri; + } + + protected CreateObjectCommand() { + super(); + } + + @Override + public boolean executeInSequence() { + // TODO Auto-generated method stub + return false; + } + + public String getObjectUri() { + return this.objectUri; + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/command/CreatePrimaryDataStoreCmd.java b/engine/storage/src/org/apache/cloudstack/storage/command/CreatePrimaryDataStoreCmd.java new file mode 100644 index 000000000..0e5095084 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/command/CreatePrimaryDataStoreCmd.java @@ -0,0 +1,37 @@ +// 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 org.apache.cloudstack.storage.command; + +import com.cloud.agent.api.Command; + +public class CreatePrimaryDataStoreCmd extends Command implements StorageSubSystemCommand { + private final String dataStore; + public CreatePrimaryDataStoreCmd(String uri) { + this.dataStore = uri; + } + + public String getDataStore() { + return this.dataStore; + } + + @Override + public boolean executeInSequence() { + // TODO Auto-generated method stub + return false; + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java b/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java new file mode 100644 index 000000000..1734bc409 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/command/CreateVolumeFromBaseImageCommand.java @@ -0,0 +1,49 @@ +/* + * 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 org.apache.cloudstack.storage.command; + +import org.apache.cloudstack.storage.to.ImageOnPrimaryDataStoreTO; +import org.apache.cloudstack.storage.to.VolumeTO; + +import com.cloud.agent.api.Command; + +public class CreateVolumeFromBaseImageCommand extends Command implements StorageSubSystemCommand { + private final VolumeTO volume; + private final ImageOnPrimaryDataStoreTO image; + + public CreateVolumeFromBaseImageCommand(VolumeTO volume, String image) { + this.volume = volume; + this.image = null; + } + + public VolumeTO getVolume() { + return this.volume; + } + + public ImageOnPrimaryDataStoreTO getImage() { + return this.image; + } + + @Override + public boolean executeInSequence() { + // TODO Auto-generated method stub + return false; + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/command/DeleteCommand.java b/engine/storage/src/org/apache/cloudstack/storage/command/DeleteCommand.java new file mode 100644 index 000000000..5d948d193 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/command/DeleteCommand.java @@ -0,0 +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. + */ +package org.apache.cloudstack.storage.command; + +import org.apache.cloudstack.storage.to.VolumeTO; + +import com.cloud.agent.api.Command; + +public class DeleteCommand extends Command implements StorageSubSystemCommand { + private String uri; + public DeleteCommand(String uri) { + this.uri = uri; + } + + protected DeleteCommand() { + + } + @Override + public boolean executeInSequence() { + // TODO Auto-generated method stub + return false; + } + + public String getUri() { + return this.uri; + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/command/StorageSubSystemCommand.java b/engine/storage/src/org/apache/cloudstack/storage/command/StorageSubSystemCommand.java new file mode 100644 index 000000000..d14161ae4 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/command/StorageSubSystemCommand.java @@ -0,0 +1,23 @@ +/* + * 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 org.apache.cloudstack.storage.command; + +public interface StorageSubSystemCommand { + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManager.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManager.java new file mode 100644 index 000000000..20bf0545d --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManager.java @@ -0,0 +1,37 @@ +/* + * 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 org.apache.cloudstack.storage.datastore; + +import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; + +public interface DataObjectManager { + public void createAsync(DataObject data, DataStore store, AsyncCompletionCallback callback, boolean noCopy); + /* + * Only create internal state, without actually send down create command. + * It's up to device driver decides whether to create object before copying + */ + public DataObject createInternalStateOnly(DataObject data, DataStore store); + public void update(DataObject data, String path, Long size); + public void copyAsync(DataObject srcData, DataObject destData, AsyncCompletionCallback callback); + public void deleteAsync(DataObject data, AsyncCompletionCallback callback); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java new file mode 100644 index 000000000..9d1afbeac --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataObjectManagerImpl.java @@ -0,0 +1,372 @@ +/* + * 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 org.apache.cloudstack.storage.datastore; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event; +import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.framework.async.AsyncRpcConext; +import org.apache.cloudstack.storage.motion.DataMotionService; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.fsm.NoTransitionException; + +@Component +public class DataObjectManagerImpl implements DataObjectManager { + private static final Logger s_logger = Logger + .getLogger(DataObjectManagerImpl.class); + @Inject + ObjectInDataStoreManager objectInDataStoreMgr; + @Inject + DataMotionService motionSrv; + protected long waitingTime = 1800; // half an hour + protected long waitingRetries = 10; + + protected DataObject waitingForCreated(DataObject dataObj, + DataStore dataStore) { + long retries = this.waitingRetries; + DataObjectInStore obj = null; + do { + try { + Thread.sleep(waitingTime); + } catch (InterruptedException e) { + s_logger.debug("sleep interrupted", e); + throw new CloudRuntimeException("sleep interrupted", e); + } + + obj = objectInDataStoreMgr.findObject(dataObj, + dataStore); + if (obj == null) { + s_logger.debug("can't find object in db, maybe it's cleaned up already, exit waiting"); + break; + } + if (obj.getState() == ObjectInDataStoreStateMachine.State.Ready) { + break; + } + retries--; + } while (retries > 0); + + if (obj == null || retries <= 0) { + s_logger.debug("waiting too long for template downloading, marked it as failed"); + throw new CloudRuntimeException( + "waiting too long for template downloading, marked it as failed"); + } + return objectInDataStoreMgr.get(dataObj, dataStore); + } + class CreateContext extends AsyncRpcConext { + final DataObject objInStrore; + + public CreateContext(AsyncCompletionCallback callback, + DataObject objInStore) { + super(callback); + this.objInStrore = objInStore; + } + + } + + @Override + public void createAsync(DataObject data, DataStore store, + AsyncCompletionCallback callback, boolean noCopy) { + DataObjectInStore obj = objectInDataStoreMgr.findObject( + data, store); + DataObject objInStore = null; + boolean freshNewTemplate = false; + if (obj == null) { + try { + objInStore = objectInDataStoreMgr.create( + data, store); + freshNewTemplate = true; + } catch (Throwable e) { + obj = objectInDataStoreMgr.findObject(data, + store); + if (obj == null) { + CreateCmdResult result = new CreateCmdResult( + null, null); + result.setSuccess(false); + result.setResult(e.toString()); + callback.complete(result); + return; + } + } + } + + if (!freshNewTemplate + && obj.getState() != ObjectInDataStoreStateMachine.State.Ready) { + try { + objInStore = waitingForCreated( + data, store); + } catch (Exception e) { + CreateCmdResult result = new CreateCmdResult(null, null); + result.setSuccess(false); + result.setResult(e.toString()); + callback.complete(result); + return; + } + + CreateCmdResult result = new CreateCmdResult( + null, null); + callback.complete(result); + return; + } + + try { + ObjectInDataStoreStateMachine.Event event = null; + if (noCopy) { + event = ObjectInDataStoreStateMachine.Event.CreateOnlyRequested; + } else { + event = ObjectInDataStoreStateMachine.Event.CreateRequested; + } + objectInDataStoreMgr.update(objInStore, + event); + } catch (NoTransitionException e) { + try { + objectInDataStoreMgr.update(objInStore, + ObjectInDataStoreStateMachine.Event.OperationFailed); + } catch (NoTransitionException e1) { + s_logger.debug("state transation failed", e1); + } + CreateCmdResult result = new CreateCmdResult(null, null); + result.setSuccess(false); + result.setResult(e.toString()); + callback.complete(result); + return; + } + + CreateContext context = new CreateContext( + callback, objInStore); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher + .create(this); + caller.setCallback( + caller.getTarget().createAsynCallback(null, null)) + .setContext(context); + + store.getDriver().createAsync(objInStore, caller); + return; + } + + protected Void createAsynCallback(AsyncCallbackDispatcher callback, + CreateContext context) { + CreateCmdResult result = callback.getResult(); + DataObject objInStrore = context.objInStrore; + CreateCmdResult upResult = new CreateCmdResult( + null, null); + if (result.isFailed()) { + upResult.setResult(result.getResult()); + context.getParentCallback().complete(upResult); + return null; + } + + try { + objectInDataStoreMgr.update(objInStrore, + ObjectInDataStoreStateMachine.Event.OperationSuccessed); + } catch (NoTransitionException e) { + try { + objectInDataStoreMgr.update(objInStrore, + ObjectInDataStoreStateMachine.Event.OperationFailed); + } catch (NoTransitionException e1) { + s_logger.debug("failed to change state", e1); + } + + upResult.setResult(e.toString()); + context.getParentCallback().complete(upResult); + return null; + } + + context.getParentCallback().complete(result); + return null; + } + + class CopyContext extends AsyncRpcConext { + DataObject destObj; + DataObject srcObj; + + public CopyContext(AsyncCompletionCallback callback, + DataObject srcObj, + DataObject destObj) { + super(callback); + this.srcObj = srcObj; + this.destObj = destObj; + } + } + + @Override + public void copyAsync(DataObject srcData, DataObject destData, + AsyncCompletionCallback callback) { + try { + objectInDataStoreMgr.update(destData, + ObjectInDataStoreStateMachine.Event.CopyingRequested); + } catch (NoTransitionException e) { + s_logger.debug("failed to change state", e); + try { + objectInDataStoreMgr.update(destData, + ObjectInDataStoreStateMachine.Event.OperationFailed); + } catch (NoTransitionException e1) { + + } + CreateCmdResult res = new CreateCmdResult(null, null); + res.setResult("Failed to change state: " + e.toString()); + callback.complete(res); + } + + CopyContext anotherCall = new CopyContext( + callback, srcData, destData); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher + .create(this); + caller.setCallback(caller.getTarget().copyCallback(null, null)) + .setContext(anotherCall); + + motionSrv.copyAsync(srcData, destData, caller); + } + + protected Void copyCallback( + AsyncCallbackDispatcher callback, + CopyContext context) { + CopyCommandResult result = callback.getResult(); + DataObject destObj = context.destObj; + + if (result.isFailed()) { + try { + objectInDataStoreMgr.update(destObj, Event.OperationFailed); + } catch (NoTransitionException e) { + s_logger.debug("Failed to update copying state", e); + } + CreateCmdResult res = new CreateCmdResult( + null, null); + res.setResult(result.getResult()); + context.getParentCallback().complete(res); + } + + try { + objectInDataStoreMgr.update(destObj, + ObjectInDataStoreStateMachine.Event.OperationSuccessed); + } catch (NoTransitionException e) { + s_logger.debug("Failed to update copying state: ", e); + try { + objectInDataStoreMgr.update(destObj, + ObjectInDataStoreStateMachine.Event.OperationFailed); + } catch (NoTransitionException e1) { + } + CreateCmdResult res = new CreateCmdResult( + null, null); + res.setResult("Failed to update copying state: " + e.toString()); + context.getParentCallback().complete(res); + } + CreateCmdResult res = new CreateCmdResult( + result.getPath(), null); + context.getParentCallback().complete(res); + return null; + } + + + class DeleteContext extends AsyncRpcConext { + private final DataObject obj; + public DeleteContext(AsyncCompletionCallback callback, DataObject obj) { + super(callback); + this.obj = obj; + } + + } + @Override + public void deleteAsync(DataObject data, + AsyncCompletionCallback callback) { + try { + objectInDataStoreMgr.update(data, Event.DestroyRequested); + } catch (NoTransitionException e) { + s_logger.debug("destroy failed", e); + CreateCmdResult res = new CreateCmdResult( + null, null); + callback.complete(res); + } + + DeleteContext context = new DeleteContext( + callback, data); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher + .create(this); + caller.setCallback( + caller.getTarget().deleteAsynCallback(null, null)) + .setContext(context); + + data.getDataStore().getDriver().deleteAsync(data, caller); + return; + } + + protected Void deleteAsynCallback(AsyncCallbackDispatcher callback, + DeleteContext context) { + DataObject destObj = context.obj; + + CommandResult res = callback.getResult(); + if (res.isFailed()) { + try { + objectInDataStoreMgr.update(destObj, Event.OperationFailed); + } catch (NoTransitionException e) { + s_logger.debug("delete failed", e); + } + + } else { + try { + objectInDataStoreMgr.update(destObj, Event.OperationSuccessed); + } catch (NoTransitionException e) { + s_logger.debug("delete failed", e); + } + } + + context.getParentCallback().complete(res); + return null; + } + + @Override + public DataObject createInternalStateOnly(DataObject data, DataStore store) { + DataObjectInStore obj = objectInDataStoreMgr.findObject( + data, store); + DataObject objInStore = null; + if (obj == null) { + objInStore = objectInDataStoreMgr.create( + data, store); + } + try { + ObjectInDataStoreStateMachine.Event event = null; + event = ObjectInDataStoreStateMachine.Event.CreateRequested; + objectInDataStoreMgr.update(objInStore, + event); + + objectInDataStoreMgr.update(objInStore, ObjectInDataStoreStateMachine.Event.OperationSuccessed); + } catch (NoTransitionException e) { + s_logger.debug("Failed to update state", e); + throw new CloudRuntimeException("Failed to update state", e); + } + + return objInStore; + } + + @Override + public void update(DataObject data, String path, Long size) { + throw new CloudRuntimeException("not implemented"); + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStore.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStore.java new file mode 100644 index 000000000..b248758bc --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStore.java @@ -0,0 +1,16 @@ +// 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. diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java new file mode 100644 index 000000000..a2fd08d1e --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/DataStoreManagerImpl.java @@ -0,0 +1,74 @@ +/* + * 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 org.apache.cloudstack.storage.datastore; + +import java.util.List; +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.Scope; +import org.apache.cloudstack.storage.image.datastore.ImageDataStoreManager; +import org.springframework.stereotype.Component; + +import com.cloud.utils.exception.CloudRuntimeException; + +@Component +public class DataStoreManagerImpl implements DataStoreManager { + @Inject + PrimaryDataStoreProviderManager primaryStorMgr; + @Inject + ImageDataStoreManager imageDataStoreMgr; + + @Override + public DataStore getDataStore(long storeId, DataStoreRole role) { + if (role == DataStoreRole.Primary) { + return primaryStorMgr.getPrimaryDataStore(storeId); + } else if (role == DataStoreRole.Image) { + return imageDataStoreMgr.getImageDataStore(storeId); + } + throw new CloudRuntimeException("un recognized type" + role); + } + @Override + public DataStore registerDataStore(Map params, + String providerUuid) { + return null; + } + @Override + public DataStore getDataStore(String uuid, DataStoreRole role) { + if (role == DataStoreRole.Primary) { + return primaryStorMgr.getPrimaryDataStore(uuid); + } else if (role == DataStoreRole.Image) { + return imageDataStoreMgr.getImageDataStore(uuid); + } + throw new CloudRuntimeException("un recognized type" + role); + } + @Override + public List getImageStores(Scope scope) { + return imageDataStoreMgr.getList(); + } + @Override + public DataStore getPrimaryDataStore(long storeId) { + return primaryStorMgr.getPrimaryDataStore(storeId); + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManager.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManager.java new file mode 100644 index 000000000..d170f5c70 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManager.java @@ -0,0 +1,36 @@ +// 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 org.apache.cloudstack.storage.datastore; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event; + +import com.cloud.utils.fsm.NoTransitionException; + +public interface ObjectInDataStoreManager { + public DataObject create(DataObject template, DataStore dataStore); + public DataObject get(DataObject dataObj, DataStore store); + public boolean update(DataObject vo, Event event) throws NoTransitionException; + DataObjectInStore findObject(String uuid, DataObjectType type, + String dataStoreUuid, DataStoreRole role); + DataObjectInStore findObject(DataObject obj, DataStore store); + DataStore findStore(String objUuid, DataObjectType type, DataStoreRole role); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java new file mode 100644 index 000000000..87ba1d216 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/ObjectInDataStoreManagerImpl.java @@ -0,0 +1,215 @@ +// 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 org.apache.cloudstack.storage.datastore; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.State; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory; +import org.apache.cloudstack.storage.db.ObjectInDataStoreDao; +import org.apache.cloudstack.storage.db.ObjectInDataStoreVO; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.storage.VMTemplateStoragePoolVO; +import com.cloud.storage.dao.VMTemplateHostDao; +import com.cloud.storage.dao.VMTemplatePoolDao; +import com.cloud.storage.dao.VolumeHostDao; +import com.cloud.utils.db.SearchCriteria.Op; +import com.cloud.utils.db.SearchCriteria2; +import com.cloud.utils.db.SearchCriteriaService; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.fsm.NoTransitionException; +import com.cloud.utils.fsm.StateMachine2; + +@Component +public class ObjectInDataStoreManagerImpl implements ObjectInDataStoreManager { + private static final Logger s_logger = Logger + .getLogger(ObjectInDataStoreManagerImpl.class); + @Inject + ImageDataFactory imageFactory; + @Inject + DataStoreManager storeMgr; + @Inject + VolumeDataFactory volumeFactory; + @Inject + ObjectInDataStoreDao objectDataStoreDao; + @Inject + VolumeHostDao volumeHostDao; + @Inject + VMTemplateHostDao templateHostDao; + @Inject + VMTemplatePoolDao templatePoolDao; + @Inject + SnapshotDataFactory snapshotFactory; + protected StateMachine2 stateMachines; + + public ObjectInDataStoreManagerImpl() { + stateMachines = new StateMachine2(); + stateMachines.addTransition(State.Allocated, Event.CreateRequested, + State.Creating); + stateMachines.addTransition(State.Creating, Event.OperationSuccessed, + State.Created); + stateMachines.addTransition(State.Creating, Event.OperationFailed, + State.Failed); + stateMachines.addTransition(State.Failed, Event.CreateRequested, + State.Creating); + stateMachines.addTransition(State.Ready, Event.DestroyRequested, + State.Destroying); + stateMachines.addTransition(State.Destroying, Event.OperationSuccessed, + State.Destroyed); + stateMachines.addTransition(State.Destroying, Event.OperationFailed, + State.Destroying); + stateMachines.addTransition(State.Destroying, Event.DestroyRequested, + State.Destroying); + stateMachines.addTransition(State.Created, Event.CopyingRequested, + State.Copying); + stateMachines.addTransition(State.Copying, Event.OperationFailed, + State.Created); + stateMachines.addTransition(State.Copying, Event.OperationSuccessed, + State.Ready); + stateMachines.addTransition(State.Allocated, Event.CreateOnlyRequested, + State.Creating2); + stateMachines.addTransition(State.Creating2, Event.OperationFailed, + State.Allocated); + stateMachines.addTransition(State.Creating2, Event.OperationSuccessed, + State.Ready); + } + + @Override + public DataObject create(DataObject obj, DataStore dataStore) { + if (obj.getType() == DataObjectType.TEMPLATE && dataStore.getRole() == DataStoreRole.Primary) { + VMTemplateStoragePoolVO vo = new VMTemplateStoragePoolVO(dataStore.getId(), obj.getId()); + vo = templatePoolDao.persist(vo); + } else { + ObjectInDataStoreVO vo = new ObjectInDataStoreVO(); + vo.setDataStoreRole(dataStore.getRole()); + vo.setDataStoreUuid(dataStore.getUuid()); + vo.setObjectType(obj.getType()); + vo.setObjectUuid(obj.getUuid()); + vo = objectDataStoreDao.persist(vo); + } + + if (obj.getType() == DataObjectType.TEMPLATE) { + return imageFactory.getTemplate(obj, dataStore); + } else if (obj.getType() == DataObjectType.VOLUME) { + return volumeFactory.getVolume(obj, dataStore); + } else if (obj.getType() == DataObjectType.SNAPSHOT) { + return snapshotFactory.getSnapshot(obj, dataStore); + } + throw new CloudRuntimeException("unknown type"); + } + + @Override + public boolean update(DataObject data, Event event) + throws NoTransitionException { + DataObjectInStore obj = this.findObject(data, data.getDataStore()); + if (obj == null) { + throw new CloudRuntimeException( + "can't find mapping in ObjectInDataStore table for: " + + data); + } + + if (data.getType() == DataObjectType.TEMPLATE && data.getDataStore().getRole() == DataStoreRole.Primary) { + try { + this.stateMachines.transitTo(obj, event, null, + templatePoolDao); + } catch (NoTransitionException e) { + if (event == Event.CreateOnlyRequested || event == Event.OperationSuccessed) { + s_logger.debug("allow muliple create requests"); + } else { + throw e; + } + } + } else { + this.stateMachines.transitTo(obj, event, null, objectDataStoreDao); + } + return true; + } + + @Override + public DataObject get(DataObject dataObj, DataStore store) { + if (dataObj.getType() == DataObjectType.TEMPLATE) { + return imageFactory.getTemplate(dataObj, store); + } else if (dataObj.getType() == DataObjectType.VOLUME) { + return volumeFactory.getVolume(dataObj, store); + } + throw new CloudRuntimeException("unknown type"); + } + + @Override + public DataObjectInStore findObject(DataObject obj, DataStore store) { + DataObjectInStore vo = null; + SearchCriteriaService sc = SearchCriteria2.create(ObjectInDataStoreVO.class); + + if (store.getRole() == DataStoreRole.Image) { + sc.addAnd(sc.getEntity().getDataStoreUuid(), Op.EQ, store.getUuid()); + sc.addAnd(sc.getEntity().getDataStoreRole(), Op.EQ, store.getRole()); + sc.addAnd(sc.getEntity().getObjectUuid(), Op.EQ, obj.getUuid()); + sc.addAnd(sc.getEntity().getObjectType(), Op.EQ, obj.getType()); + vo = sc.find(); + } else if (obj.getType() == DataObjectType.TEMPLATE && store.getRole() == DataStoreRole.Primary) { + vo = templatePoolDao.findByPoolTemplate(store.getId(), obj.getId()); + } else { + s_logger.debug("unknown type: " + obj.getType() + " " + store.getRole()); + throw new CloudRuntimeException("unknown type"); + } + return vo; + } + + @Override + public DataObjectInStore findObject(String uuid, DataObjectType type, + String dataStoreUuid, DataStoreRole role) { + DataObjectInStore vo = null; + SearchCriteriaService sc = SearchCriteria2.create(ObjectInDataStoreVO.class); + + if (role == DataStoreRole.Image) { + sc.addAnd(sc.getEntity().getDataStoreUuid(), Op.EQ, dataStoreUuid); + sc.addAnd(sc.getEntity().getDataStoreRole(), Op.EQ, role); + sc.addAnd(sc.getEntity().getObjectUuid(), Op.EQ, uuid); + sc.addAnd(sc.getEntity().getObjectType(), Op.EQ, type); + vo = sc.find(); + } + return vo; + } + + @Override + public DataStore findStore(String objUuid, DataObjectType type, DataStoreRole role) { + DataStore store = null; + if (role == DataStoreRole.Image) { + SearchCriteriaService sc = SearchCriteria2.create(ObjectInDataStoreVO.class); + sc.addAnd(sc.getEntity().getDataStoreRole(), Op.EQ, role); + sc.addAnd(sc.getEntity().getObjectUuid(), Op.EQ, objUuid); + sc.addAnd(sc.getEntity().getObjectType(), Op.EQ, type); + ObjectInDataStoreVO vo = sc.find(); + if (vo != null) { + store = this.storeMgr.getDataStore(vo.getDataStoreUuid(), vo.getDataStoreRole()); + } + } + return store; + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/PrimaryDataStore.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/PrimaryDataStore.java new file mode 100644 index 000000000..fdaaace49 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/PrimaryDataStore.java @@ -0,0 +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. + */ +package org.apache.cloudstack.storage.datastore; + +import java.util.List; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.disktype.DiskFormat; + +public interface PrimaryDataStore extends DataStore, PrimaryDataStoreInfo { + VolumeInfo getVolume(long id); + + List getVolumes(); + + boolean exists(DataObject data); + + TemplateInfo getTemplate(long templateId); + + SnapshotInfo getSnapshot(long snapshotId); + + + DiskFormat getDefaultDiskType(); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreEntityImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreEntityImpl.java new file mode 100644 index 000000000..2dc3e255b --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreEntityImpl.java @@ -0,0 +1,257 @@ +/* + * 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 org.apache.cloudstack.storage.datastore; + +import java.lang.reflect.Method; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.cloudstack.engine.datacenter.entity.api.StorageEntity; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo; + +import com.cloud.storage.Storage.StoragePoolType; +import com.cloud.storage.StoragePoolStatus; + +public class PrimaryDataStoreEntityImpl implements StorageEntity { + private PrimaryDataStoreInfo dataStore; + + public PrimaryDataStoreEntityImpl(PrimaryDataStoreInfo dataStore) { + this.dataStore = dataStore; + } + + @Override + public boolean enable() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean disable() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean deactivate() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean reactivate() { + // TODO Auto-generated method stub + return false; + } + + @Override + public String getUuid() { + return this.dataStore.getUuid(); + } + + @Override + public long getId() { + return this.dataStore.getId(); + } + + @Override + public String getCurrentState() { + return null; + } + + @Override + public String getDesiredState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Date getCreatedTime() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Date getLastUpdatedTime() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getOwner() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Map getDetails() { + // TODO Auto-generated method stub + return null; + } + + + @Override + public void addDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public void delDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public void updateDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public List getApplicableActions() { + // TODO Auto-generated method stub + return null; + } + + @Override + public State getState() { + //return this.dataStore.getManagedState(); + return null; + } + + @Override + public String getName() { + return this.dataStore.getName(); + } + + @Override + public StoragePoolType getPoolType() { + return null; + } + + @Override + public Date getCreated() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Date getUpdateTime() { + // TODO Auto-generated method stub + return null; + } + + @Override + public long getDataCenterId() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public long getCapacityBytes() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public long getAvailableBytes() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public Long getClusterId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getHostAddress() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getPath() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getUserInfo() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isShared() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isLocal() { + // TODO Auto-generated method stub + return false; + } + + @Override + public StoragePoolStatus getStatus() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getPort() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public Long getPodId() { + // TODO Auto-generated method stub + return null; + } + + + public String getStorageType() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void persist() { + // TODO Auto-generated method stub + + } + + @Override + public boolean isInMaintenance() { + // TODO Auto-generated method stub + return false; + } + + @Override + public String getStorageProviderName() { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreProviderManager.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreProviderManager.java new file mode 100644 index 000000000..b3ed0aaab --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/PrimaryDataStoreProviderManager.java @@ -0,0 +1,31 @@ +/* + * 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 org.apache.cloudstack.storage.datastore; + +import org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver; + + +public interface PrimaryDataStoreProviderManager { + public PrimaryDataStore getPrimaryDataStore(long dataStoreId); + public PrimaryDataStore getPrimaryDataStore(String uuid); + + boolean registerDriver(String providerName, PrimaryDataStoreDriver driver); + boolean registerHostListener(String providerName, HypervisorHostListener listener); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/TemplateInDataStore.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/TemplateInDataStore.java new file mode 100644 index 000000000..b248758bc --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/TemplateInDataStore.java @@ -0,0 +1,16 @@ +// 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. diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/protocol/DataStoreProtocol.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/protocol/DataStoreProtocol.java new file mode 100644 index 000000000..b0a7d50c5 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/protocol/DataStoreProtocol.java @@ -0,0 +1,32 @@ +// 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 org.apache.cloudstack.storage.datastore.protocol; + +public enum DataStoreProtocol { + NFS("nfs"), + ISCSI("iscsi"); + + private String name; + DataStoreProtocol(String name) { + this.name = name; + } + + @Override + public String toString() { + return this.name; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/datastore/provider/DataStoreProviderManagerImpl.java b/engine/storage/src/org/apache/cloudstack/storage/datastore/provider/DataStoreProviderManagerImpl.java new file mode 100644 index 000000000..40a65dcf0 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/datastore/provider/DataStoreProviderManagerImpl.java @@ -0,0 +1,148 @@ +/* + * 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 org.apache.cloudstack.storage.datastore.provider; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import org.apache.cloudstack.api.response.StorageProviderResponse; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider.DataStoreProviderType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProviderManager; +import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataStoreProvider; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreProvider; +import org.apache.cloudstack.storage.datastore.PrimaryDataStoreProviderManager; +import org.apache.cloudstack.storage.datastore.db.DataStoreProviderDao; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.exception.InvalidParameterValueException; +import com.cloud.utils.component.ManagerBase; + +@Component +public class DataStoreProviderManagerImpl extends ManagerBase implements DataStoreProviderManager { + private static final Logger s_logger = Logger + .getLogger(DataStoreProviderManagerImpl.class); + @Inject + List providers; + @Inject + DataStoreProviderDao providerDao; + protected Map providerMap = new HashMap(); + @Inject + PrimaryDataStoreProviderManager primaryDataStoreProviderMgr; + @Override + public DataStoreProvider getDataStoreProvider(String name) { + return providerMap.get(name); + } + + @Override + public List getDataStoreProviders() { + // TODO Auto-generated method stub + return null; + } + + public List getPrimaryDataStoreProviders() { + List providers = new ArrayList(); + for (DataStoreProvider provider : providerMap.values()) { + if (provider instanceof PrimaryDataStoreProvider) { + StorageProviderResponse response = new StorageProviderResponse(); + response.setName(provider.getName()); + response.setType(DataStoreProvider.DataStoreProviderType.PRIMARY.toString()); + providers.add(response); + } + } + return providers; + } + + public List getImageDataStoreProviders() { + List providers = new ArrayList(); + for (DataStoreProvider provider : providerMap.values()) { + if (provider instanceof ImageDataStoreProvider) { + StorageProviderResponse response = new StorageProviderResponse(); + response.setName(provider.getName()); + response.setType(DataStoreProvider.DataStoreProviderType.IMAGE.toString()); + providers.add(response); + } + } + return providers; + } + + @Override + public boolean configure(String name, Map params) + throws ConfigurationException { + Map copyParams = new HashMap(params); + + for (DataStoreProvider provider : providers) { + String providerName = provider.getName(); + if (providerMap.get(providerName) != null) { + s_logger.debug("Failed to register data store provider, provider name: " + providerName + " is not unique"); + return false; + } + + s_logger.debug("registering data store provider:" + provider.getName()); + + providerMap.put(providerName, provider); + try { + boolean registrationResult = provider.configure(copyParams); + if (!registrationResult) { + providerMap.remove(providerName); + s_logger.debug("Failed to register data store provider: " + providerName); + return false; + } + + Set types = provider.getTypes(); + if (types.contains(DataStoreProviderType.PRIMARY)) { + primaryDataStoreProviderMgr.registerDriver(provider.getName(), (PrimaryDataStoreDriver)provider.getDataStoreDriver()); + primaryDataStoreProviderMgr.registerHostListener(provider.getName(), provider.getHostListener()); + } + } catch(Exception e) { + s_logger.debug("configure provider failed", e); + providerMap.remove(providerName); + } + } + + return true; + } + + @Override + public DataStoreProvider getDefaultPrimaryDataStoreProvider() { + return this.getDataStoreProvider("ancient primary data store provider"); + } + + @Override + public List getDataStoreProviders(String type) { + if (type == null) { + throw new InvalidParameterValueException("Invalid parameter, need to specify type: either primary or image"); + } + if (type.equalsIgnoreCase(DataStoreProvider.DataStoreProviderType.PRIMARY.toString())) { + return this.getPrimaryDataStoreProviders(); + } else if (type.equalsIgnoreCase(DataStoreProvider.DataStoreProviderType.IMAGE.toString())) { + return this.getImageDataStoreProviders(); + } else { + throw new InvalidParameterValueException("Invalid parameter: " + type); + } + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/db/ObjectInDataStoreDao.java b/engine/storage/src/org/apache/cloudstack/storage/db/ObjectInDataStoreDao.java new file mode 100644 index 000000000..fb7dec0fa --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/db/ObjectInDataStoreDao.java @@ -0,0 +1,27 @@ +// 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 org.apache.cloudstack.storage.db; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; + +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.fsm.StateDao; + +public interface ObjectInDataStoreDao extends GenericDao, StateDao { + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/db/ObjectInDataStoreDaoImpl.java b/engine/storage/src/org/apache/cloudstack/storage/db/ObjectInDataStoreDaoImpl.java new file mode 100644 index 000000000..9965d60b2 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/db/ObjectInDataStoreDaoImpl.java @@ -0,0 +1,87 @@ +// 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 org.apache.cloudstack.storage.db; +import java.util.Date; +import java.util.Map; + +import javax.naming.ConfigurationException; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.State; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.SearchCriteria.Op; +import com.cloud.utils.db.UpdateBuilder; + +@Component +public class ObjectInDataStoreDaoImpl extends GenericDaoBase implements ObjectInDataStoreDao { + private static final Logger s_logger = Logger.getLogger(ObjectInDataStoreDaoImpl.class); + private SearchBuilder updateStateSearch; + @Override + public boolean configure(String name, Map params) throws ConfigurationException { + super.configure(name, params); + + updateStateSearch = this.createSearchBuilder(); + updateStateSearch.and("id", updateStateSearch.entity().getId(), Op.EQ); + updateStateSearch.and("state", updateStateSearch.entity().getState(), Op.EQ); + updateStateSearch.and("updatedCount", updateStateSearch.entity().getUpdatedCount(), Op.EQ); + updateStateSearch.done(); + return true; + } + @Override + public boolean updateState(State currentState, Event event, + State nextState, DataObjectInStore dataObj, Object data) { + ObjectInDataStoreVO vo = (ObjectInDataStoreVO)dataObj; + Long oldUpdated = vo.getUpdatedCount(); + Date oldUpdatedTime = vo.getUpdated(); + + + SearchCriteria sc = updateStateSearch.create(); + sc.setParameters("id", vo.getId()); + sc.setParameters("state", currentState); + sc.setParameters("updatedCount", vo.getUpdatedCount()); + + vo.incrUpdatedCount(); + + UpdateBuilder builder = getUpdateBuilder(vo); + builder.set(vo, "state", nextState); + builder.set(vo, "updated", new Date()); + + int rows = update((ObjectInDataStoreVO) vo, sc); + if (rows == 0 && s_logger.isDebugEnabled()) { + ObjectInDataStoreVO dbVol = findByIdIncludingRemoved(vo.getId()); + if (dbVol != null) { + StringBuilder str = new StringBuilder("Unable to update ").append(vo.toString()); + str.append(": DB Data={id=").append(dbVol.getId()).append("; state=").append(dbVol.getState()).append("; updatecount=").append(dbVol.getUpdatedCount()).append(";updatedTime=") + .append(dbVol.getUpdated()); + str.append(": New Data={id=").append(vo.getId()).append("; state=").append(nextState).append("; event=").append(event).append("; updatecount=").append(vo.getUpdatedCount()) + .append("; updatedTime=").append(vo.getUpdated()); + str.append(": stale Data={id=").append(vo.getId()).append("; state=").append(currentState).append("; event=").append(event).append("; updatecount=").append(oldUpdated) + .append("; updatedTime=").append(oldUpdatedTime); + } else { + s_logger.debug("Unable to update objectIndatastore: id=" + vo.getId() + ", as there is no such object exists in the database anymore"); + } + } + return rows > 0; + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/db/ObjectInDataStoreVO.java b/engine/storage/src/org/apache/cloudstack/storage/db/ObjectInDataStoreVO.java new file mode 100644 index 000000000..0fbcbb1f9 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/db/ObjectInDataStoreVO.java @@ -0,0 +1,192 @@ +// 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 org.apache.cloudstack.storage.db; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; + +import com.cloud.storage.Storage; +import com.cloud.storage.VMTemplateStorageResourceAssoc.Status; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.fsm.StateObject; + +@Entity +@Table(name = "object_datastore_ref") +public class ObjectInDataStoreVO implements StateObject, DataObjectInStore { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + long id; + + @Column(name = "datastore_uuid") + private String dataStoreUuid; + + @Column(name = "datastore_role") + @Enumerated(EnumType.STRING) + private DataStoreRole dataStoreRole; + + @Column(name = "object_uuid") + String objectUuid; + + @Column(name = "object_type") + @Enumerated(EnumType.STRING) + DataObjectType objectType; + + @Column(name = GenericDaoBase.CREATED_COLUMN) + Date created = null; + + @Column(name = "last_updated") + @Temporal(value = TemporalType.TIMESTAMP) + Date lastUpdated = null; + + @Column(name = "download_pct") + int downloadPercent; + + @Column(name = "download_state") + @Enumerated(EnumType.STRING) + Status downloadState; + + @Column(name = "local_path") + String localDownloadPath; + + @Column (name="url") + private String downloadUrl; + + @Column(name="format") + private Storage.ImageFormat format; + + @Column(name="checksum") + private String checksum; + + @Column(name = "error_str") + String errorString; + + @Column(name = "job_id") + String jobId; + + @Column(name = "install_path") + String installPath; + + @Column(name = "size") + Long size; + + @Column(name = "state") + @Enumerated(EnumType.STRING) + ObjectInDataStoreStateMachine.State state; + + @Column(name="update_count", updatable = true, nullable=false) + protected long updatedCount; + + @Column(name = "updated") + @Temporal(value = TemporalType.TIMESTAMP) + Date updated; + + public ObjectInDataStoreVO() { + this.state = ObjectInDataStoreStateMachine.State.Allocated; + } + + public long getId() { + return this.id; + } + + public String getDataStoreUuid() { + return this.dataStoreUuid; + } + + public void setDataStoreUuid(String uuid) { + this.dataStoreUuid = uuid; + } + + public DataStoreRole getDataStoreRole() { + return this.dataStoreRole; + } + + public void setDataStoreRole(DataStoreRole role) { + this.dataStoreRole = role; + } + + public String getObjectUuid() { + return this.objectUuid; + } + + public void setObjectUuid(String uuid) { + this.objectUuid = uuid; + } + + public DataObjectType getObjectType() { + return this.objectType; + } + + public void setObjectType(DataObjectType type) { + this.objectType = type; + } + + @Override + public ObjectInDataStoreStateMachine.State getState() { + return this.state; + } + + public void setInstallPath(String path) { + this.installPath = path; + } + + public String getInstallPath() { + return this.installPath; + } + + public void setSize(Long size) { + this.size = size; + } + + public Long getSize() { + return this.size; + } + + public long getUpdatedCount() { + return this.updatedCount; + } + + public void incrUpdatedCount() { + this.updatedCount++; + } + + public void decrUpdatedCount() { + this.updatedCount--; + } + + public Date getUpdated() { + return updated; + } + + public void setUpdated(Date updated) { + this.updated = updated; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java b/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java new file mode 100644 index 000000000..c385abe96 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/endpoint/DefaultEndPointSelector.java @@ -0,0 +1,200 @@ +/* + * 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 org.apache.cloudstack.storage.endpoint; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.List; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint; +import org.apache.cloudstack.engine.subsystem.api.storage.Scope; +import org.apache.cloudstack.engine.subsystem.api.storage.ScopeType; +import org.apache.cloudstack.engine.subsystem.api.storage.disktype.DiskFormat; +import org.apache.cloudstack.storage.HypervisorHostEndPoint; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.host.HostVO; +import com.cloud.host.Status; +import com.cloud.host.dao.HostDao; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.SearchCriteria2; +import com.cloud.utils.db.SearchCriteriaService; +import com.cloud.utils.db.Transaction; +import com.cloud.utils.db.SearchCriteria.Op; +import com.cloud.utils.exception.CloudRuntimeException; + +@Component +public class DefaultEndPointSelector implements EndPointSelector { + private static final Logger s_logger = Logger + .getLogger(DefaultEndPointSelector.class); + @Inject + HostDao hostDao; + private String findOneHostInaScope = "select id from host where " + + " status == 'Up' and hypervisor_type != 'VMware' and type in ('Routing', 'SecondaryStorageVM') "; + private String findOneHostOnPrimaryStorage = "select id from host where" + + "status == 'Up' and type == 'Routing' "; + + protected boolean moveBetweenPrimaryImage(DataStore srcStore, + DataStore destStore) { + DataStoreRole srcRole = srcStore.getRole(); + DataStoreRole destRole = destStore.getRole(); + if ((srcRole == DataStoreRole.Primary && destRole.isImageStore()) + || (srcRole.isImageStore() && destRole == DataStoreRole.Primary)) { + return true; + } else { + return false; + } + } + + @DB + protected EndPoint findEndPointInScope(Scope scope, String sqlBase) { + StringBuilder sbuilder = new StringBuilder(); + sbuilder.append(sqlBase); + + if (scope.getScopeType() == ScopeType.HOST) { + sbuilder.append(" and id = "); + sbuilder.append(scope.getScopeId()); + } else if (scope.getScopeType() == ScopeType.CLUSTER) { + sbuilder.append(" and cluster_id = "); + sbuilder.append(scope.getScopeId()); + } else if (scope.getScopeType() == ScopeType.ZONE) { + sbuilder.append(" and data_center_id = "); + sbuilder.append(scope.getScopeId()); + } +//TODO: order by rand() is slow if there are lot of hosts + sbuilder.append(" ORDER by rand() limit 1"); + String sql = sbuilder.toString(); + PreparedStatement pstmt = null; + ResultSet rs = null; + HostVO host = null; + Transaction txn = Transaction.currentTxn(); + + try { + pstmt = txn.prepareStatement(sql); + rs = pstmt.executeQuery(); + while (rs.next()) { + long id = rs.getLong(1); + host = hostDao.findById(id); + } + } catch (SQLException e) { + s_logger.warn("can't find endpoint", e); + } finally { + try { + if (rs != null) { + rs.close(); + } + if (pstmt != null) { + pstmt.close(); + } + } catch (SQLException e) { + } + } + + if (host == null) { + return null; + } + + return HypervisorHostEndPoint.getHypervisorHostEndPoint(host.getId(), + host.getPrivateIpAddress()); + } + + protected EndPoint findEndPointForImageMove(DataStore srcStore, + DataStore destStore) { + // find any xen/kvm host in the scope + Scope srcScope = srcStore.getScope(); + Scope destScope = destStore.getScope(); + Scope selectedScope = null; + // assumption, at least one of scope should be zone, find the least + // scope + if (srcScope.getScopeType() != ScopeType.ZONE) { + selectedScope = srcScope; + } else if (destScope.getScopeType() != ScopeType.ZONE) { + selectedScope = destScope; + } else { + // if both are zone scope + selectedScope = srcScope; + } + return findEndPointInScope(selectedScope, findOneHostInaScope); + } + + @Override + public EndPoint select(DataObject srcData, DataObject destData) { + DataStore srcStore = srcData.getDataStore(); + DataStore destStore = destData.getDataStore(); + if (srcData.getFormat() == DiskFormat.VMDK + || destData.getFormat() == DiskFormat.VMDK) { + // If any of data is for vmware, data moving should go to ssvm + + } else if (moveBetweenPrimaryImage(srcStore, destStore)) { + return findEndPointForImageMove(srcStore, destStore); + } + // TODO Auto-generated method stub + return null; + } + + protected EndPoint findEndpointForPrimaryStorage(DataStore store) { + return findEndPointInScope(store.getScope(), findOneHostOnPrimaryStorage); + } + + @Override + public EndPoint select(DataObject object) { + DataStore store = object.getDataStore(); + if (store.getRole() == DataStoreRole.Primary) { + return findEndpointForPrimaryStorage(store); + } else if (store.getRole() == DataStoreRole.Image) { + //in case there is no ssvm, directly send down command hypervisor host + //TODO: add code to handle in case ssvm is there + return findEndpointForPrimaryStorage(store); + }else { + throw new CloudRuntimeException("not implemented yet"); + } + + } + + @Override + public List selectAll(DataStore store) { + List endPoints = new ArrayList(); + if (store.getScope().getScopeType() == ScopeType.HOST) { + HostVO host = hostDao.findById(store.getScope().getScopeId()); + endPoints.add(HypervisorHostEndPoint.getHypervisorHostEndPoint(host.getId(), + host.getPrivateIpAddress())); + } else if (store.getScope().getScopeType() == ScopeType.CLUSTER) { + SearchCriteriaService sc = SearchCriteria2.create(HostVO.class); + sc.addAnd(sc.getEntity().getClusterId(), Op.EQ, store.getScope().getScopeId()); + sc.addAnd(sc.getEntity().getStatus(), Op.EQ, Status.Up); + List hosts = sc.find(); + for (HostVO host : hosts) { + endPoints.add(HypervisorHostEndPoint.getHypervisorHostEndPoint(host.getId(), + host.getPrivateIpAddress())); + } + + } else { + throw new CloudRuntimeException("shouldn't use it for other scope"); + } + return endPoints; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/endpoint/EndPointSelector.java b/engine/storage/src/org/apache/cloudstack/storage/endpoint/EndPointSelector.java new file mode 100644 index 000000000..6910eb6a4 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/endpoint/EndPointSelector.java @@ -0,0 +1,40 @@ +/* + * 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 org.apache.cloudstack.storage.endpoint; + +import java.util.List; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint; + +public interface EndPointSelector { + public EndPoint select(DataObject srcData, DataObject destData); + + /** + * @param object + * @return + */ + EndPoint select(DataObject object); + /** + * @param store + * @return + */ + List selectAll(DataStore store); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/ImageDataStoreDriver.java b/engine/storage/src/org/apache/cloudstack/storage/image/ImageDataStoreDriver.java new file mode 100644 index 000000000..d352d9721 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/ImageDataStoreDriver.java @@ -0,0 +1,24 @@ +/* + * 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 org.apache.cloudstack.storage.image; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver; + +public interface ImageDataStoreDriver extends DataStoreDriver { +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java new file mode 100644 index 000000000..4d162bbdd --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/TemplateEntityImpl.java @@ -0,0 +1,279 @@ +/* + * 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 org.apache.cloudstack.storage.image; + +import java.lang.reflect.Method; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.cloudstack.engine.cloud.entity.api.TemplateEntity; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.storage.image.datastore.ImageDataStoreInfo; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.storage.Storage.ImageFormat; +import com.cloud.storage.Storage.TemplateType; + +public class TemplateEntityImpl implements TemplateEntity { + protected TemplateInfo templateInfo; + + public TemplateEntityImpl(TemplateInfo templateInfo) { + this.templateInfo = templateInfo; + } + + public ImageDataStoreInfo getImageDataStore() { + return (ImageDataStoreInfo)templateInfo.getDataStore(); + } + + public long getImageDataStoreId() { + return getImageDataStore().getImageDataStoreId(); + } + + public TemplateInfo getTemplateInfo() { + return this.templateInfo; + } + + @Override + public String getUuid() { + return this.templateInfo.getUuid(); + } + + @Override + public long getId() { + return this.templateInfo.getId(); + } + + public String getExternalId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getCurrentState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getDesiredState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Date getCreatedTime() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Date getLastUpdatedTime() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getOwner() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Map getDetails() { + // TODO Auto-generated method stub + return null; + } + + + @Override + public void addDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public void delDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public void updateDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public List getApplicableActions() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isFeatured() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isPublicTemplate() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isExtractable() { + // TODO Auto-generated method stub + return false; + } + + @Override + public String getName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public ImageFormat getFormat() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isRequiresHvm() { + // TODO Auto-generated method stub + return false; + } + + @Override + public String getDisplayText() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean getEnablePassword() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean getEnableSshKey() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isCrossZones() { + // TODO Auto-generated method stub + return false; + } + + @Override + public Date getCreated() { + // TODO Auto-generated method stub + return null; + } + + @Override + public long getGuestOSId() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public boolean isBootable() { + // TODO Auto-generated method stub + return false; + } + + @Override + public TemplateType getTemplateType() { + // TODO Auto-generated method stub + return null; + } + + @Override + public HypervisorType getHypervisorType() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getBits() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public String getUniqueName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getUrl() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getChecksum() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Long getSourceTemplateId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getTemplateTag() { + // TODO Auto-generated method stub + return null; + } + + @Override + public long getAccountId() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public long getDomainId() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public long getPhysicalSize() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public long getVirtualSize() { + // TODO Auto-generated method stub + return 0; + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageDataStore.java b/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageDataStore.java new file mode 100644 index 000000000..ed2274e3d --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageDataStore.java @@ -0,0 +1,35 @@ +/* + * 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 org.apache.cloudstack.storage.image.datastore; + +import java.util.Set; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; + +public interface ImageDataStore extends DataStore { + TemplateInfo getTemplate(long templateId); + VolumeInfo getVolume(long volumeId); + SnapshotInfo getSnapshot(long snapshotId); + boolean exists(DataObject object); + Set listTemplates(); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageDataStoreHelper.java b/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageDataStoreHelper.java new file mode 100644 index 000000000..3f1632cf1 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageDataStoreHelper.java @@ -0,0 +1,60 @@ +/* + * 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 org.apache.cloudstack.storage.image.datastore; + +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.ScopeType; +import org.apache.cloudstack.storage.image.db.ImageDataStoreDao; +import org.apache.cloudstack.storage.image.db.ImageDataStoreVO; +import org.springframework.stereotype.Component; + +import com.cloud.utils.exception.CloudRuntimeException; + +@Component +public class ImageDataStoreHelper { + @Inject + ImageDataStoreDao imageStoreDao; + public ImageDataStoreVO createImageDataStore(Map params) { + ImageDataStoreVO store = imageStoreDao.findByName((String)params.get("name")); + if (store != null) { + return store; + } + store = new ImageDataStoreVO(); + store.setName((String)params.get("name")); + store.setProtocol((String)params.get("protocol")); + store.setProviderName((String)params.get("providerName")); + store.setScope((ScopeType)params.get("scope")); + store.setUuid((String)params.get("uuid")); + store = imageStoreDao.persist(store); + return store; + } + + public boolean deleteImageDataStore(long id) { + ImageDataStoreVO store = imageStoreDao.findById(id); + if (store == null) { + throw new CloudRuntimeException("can't find image store:" + id); + } + + imageStoreDao.remove(id); + return true; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageDataStoreInfo.java b/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageDataStoreInfo.java new file mode 100644 index 000000000..b6b9a2a55 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageDataStoreInfo.java @@ -0,0 +1,26 @@ +/* + * 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 org.apache.cloudstack.storage.image.datastore; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; + +public interface ImageDataStoreInfo extends DataStore { + public long getImageDataStoreId(); + public String getType(); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageDataStoreManager.java b/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageDataStoreManager.java new file mode 100644 index 000000000..b6d84cdce --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/datastore/ImageDataStoreManager.java @@ -0,0 +1,31 @@ +/* + * 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 org.apache.cloudstack.storage.image.datastore; + +import java.util.List; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.storage.image.ImageDataStoreDriver; + +public interface ImageDataStoreManager { + ImageDataStore getImageDataStore(long dataStoreId); + ImageDataStore getImageDataStore(String uuid); + List getList(); + boolean registerDriver(String uuid, ImageDataStoreDriver driver); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDaoStoreDaoImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDaoStoreDaoImpl.java new file mode 100644 index 000000000..3f3e9ca95 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDaoStoreDaoImpl.java @@ -0,0 +1,38 @@ +/* + * 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 org.apache.cloudstack.storage.image.db; + +import org.springframework.stereotype.Component; + +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchCriteria2; +import com.cloud.utils.db.SearchCriteriaService; +import com.cloud.utils.db.SearchCriteria.Op; + +@Component +public class ImageDaoStoreDaoImpl extends GenericDaoBase implements ImageDataStoreDao { + + @Override + public ImageDataStoreVO findByName(String name) { + SearchCriteriaService sc = SearchCriteria2.create(ImageDataStoreVO.class); + sc.addAnd(sc.getEntity().getName(), Op.EQ, name); + return sc.find(); + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreDao.java b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreDao.java new file mode 100644 index 000000000..d7358be91 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreDao.java @@ -0,0 +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. + */ +package org.apache.cloudstack.storage.image.db; + +import com.cloud.utils.db.GenericDao; + +public interface ImageDataStoreDao extends GenericDao { + public ImageDataStoreVO findByName(String name); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreProviderDao.java b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreProviderDao.java new file mode 100644 index 000000000..1b13b7ae4 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreProviderDao.java @@ -0,0 +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. + */ +package org.apache.cloudstack.storage.image.db; + +import com.cloud.utils.db.GenericDao; + +public interface ImageDataStoreProviderDao extends GenericDao { + public ImageDataStoreProviderVO findByName(String name); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreProviderDaoImpl.java b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreProviderDaoImpl.java new file mode 100644 index 000000000..0e19dbec1 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreProviderDaoImpl.java @@ -0,0 +1,40 @@ +/* + * 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 org.apache.cloudstack.storage.image.db; + +import org.springframework.stereotype.Component; + +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchCriteria2; +import com.cloud.utils.db.SearchCriteriaService; +import com.cloud.utils.db.SearchCriteria.Op; + +@Component +public class ImageDataStoreProviderDaoImpl extends GenericDaoBase implements ImageDataStoreProviderDao { + + public ImageDataStoreProviderDaoImpl() { + } + + @Override + public ImageDataStoreProviderVO findByName(String name) { + SearchCriteriaService service = SearchCriteria2.create(ImageDataStoreProviderVO.class); + service.addAnd(service.getEntity().getName(), Op.EQ, name); + return service.find(); + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreProviderVO.java b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreProviderVO.java new file mode 100644 index 000000000..5cc5b8ddc --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreProviderVO.java @@ -0,0 +1,49 @@ +/* + * 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 org.apache.cloudstack.storage.image.db; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.TableGenerator; + +@Entity +@Table(name = "image_data_store_provider") +public class ImageDataStoreProviderVO { + @Id + @TableGenerator(name = "image_data_store_provider_sq", table = "sequence", pkColumnName = "name", valueColumnName = "value", pkColumnValue = "image_data_store_provider_seq", allocationSize = 1) + @Column(name = "id", nullable = false) + private long id; + + @Column(name = "name", nullable = false) + private String name; + + public long getId() { + return this.id; + } + + public String getName() { + return this.name; + } + + public void setName(String name) { + this.name = name; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreVO.java b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreVO.java new file mode 100644 index 000000000..4cb402a12 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/db/ImageDataStoreVO.java @@ -0,0 +1,110 @@ +/* + * 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 org.apache.cloudstack.storage.image.db; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.TableGenerator; + +import org.apache.cloudstack.engine.subsystem.api.storage.ScopeType; + +@Entity +@Table(name = "image_data_store") +public class ImageDataStoreVO { + @Id + @TableGenerator(name = "image_data_store_sq", table = "sequence", pkColumnName = "name", valueColumnName = "value", pkColumnValue = "image_data_store_seq", allocationSize = 1) + @Column(name = "id", nullable = false) + private long id; + + @Column(name = "name", nullable = false) + private String name; + + @Column(name = "uuid", nullable = false) + private String uuid; + + @Column(name = "protocol", nullable = false) + private String protocol; + + @Column(name = "image_provider_name", nullable = false) + private String providerName; + + @Column(name = "data_center_id") + private long dcId; + + @Column(name = "scope") + @Enumerated(value = EnumType.STRING) + private ScopeType scope; + + + public long getId() { + return this.id; + } + + public String getName() { + return this.name; + } + + public String getProviderName() { + return this.providerName; + } + + public void setName(String name) { + this.name = name; + } + + public void setProviderName(String provider) { + this.providerName = provider; + } + + public void setProtocol(String protocol) { + this.protocol = protocol; + } + + public String getProtocol() { + return this.protocol; + } + + public void setDcId(long dcId) { + this.dcId = dcId; + } + + public long getDcId() { + return this.dcId; + } + + public ScopeType getScope() { + return this.scope; + } + + public void setScope(ScopeType scope) { + this.scope = scope; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public String getUuid() { + return this.uuid; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/format/BAREMETAL.java b/engine/storage/src/org/apache/cloudstack/storage/image/format/BAREMETAL.java new file mode 100644 index 000000000..72e683be1 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/format/BAREMETAL.java @@ -0,0 +1,32 @@ +/* + * 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 org.apache.cloudstack.storage.image.format; + +import org.apache.cloudstack.storage.BaseType; +import org.springframework.stereotype.Component; + +@Component +public class BAREMETAL extends BaseType implements ImageFormat { + private final String type = "BAREMETAL"; + + @Override + public String toString() { + return type; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/format/ISO.java b/engine/storage/src/org/apache/cloudstack/storage/image/format/ISO.java new file mode 100644 index 000000000..2f01a2761 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/format/ISO.java @@ -0,0 +1,32 @@ +/* + * 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 org.apache.cloudstack.storage.image.format; + +import org.apache.cloudstack.storage.BaseType; +import org.springframework.stereotype.Component; + +@Component +public class ISO extends BaseType implements ImageFormat { + private final String type = "ISO"; + + @Override + public String toString() { + return type; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/format/ImageFormat.java b/engine/storage/src/org/apache/cloudstack/storage/image/format/ImageFormat.java new file mode 100644 index 000000000..f02694a71 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/format/ImageFormat.java @@ -0,0 +1,23 @@ +/* + * 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 org.apache.cloudstack.storage.image.format; + +public interface ImageFormat { + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/format/ImageFormatHelper.java b/engine/storage/src/org/apache/cloudstack/storage/image/format/ImageFormatHelper.java new file mode 100644 index 000000000..9523d24c1 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/format/ImageFormatHelper.java @@ -0,0 +1,45 @@ +/* + * 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 org.apache.cloudstack.storage.image.format; + +import java.util.List; + +import javax.inject.Inject; + +import org.springframework.stereotype.Component; + +@Component +public class ImageFormatHelper { + private static List formats; + private static final ImageFormat defaultFormat = new Unknown(); + + @Inject + public void setFormats(List formats) { + ImageFormatHelper.formats = formats; + } + + public static ImageFormat getFormat(String format) { + for (ImageFormat fm : formats) { + if (fm.equals(format)) { + return fm; + } + } + return ImageFormatHelper.defaultFormat; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/format/OVA.java b/engine/storage/src/org/apache/cloudstack/storage/image/format/OVA.java new file mode 100644 index 000000000..77a355a0c --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/format/OVA.java @@ -0,0 +1,32 @@ +/* + * 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 org.apache.cloudstack.storage.image.format; + +import org.apache.cloudstack.storage.BaseType; +import org.springframework.stereotype.Component; + +@Component +public class OVA extends BaseType implements ImageFormat { + private final String type = "OVA"; + + @Override + public String toString() { + return type; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/format/QCOW2.java b/engine/storage/src/org/apache/cloudstack/storage/image/format/QCOW2.java new file mode 100644 index 000000000..d51052b89 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/format/QCOW2.java @@ -0,0 +1,32 @@ +/* + * 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 org.apache.cloudstack.storage.image.format; + +import org.apache.cloudstack.storage.BaseType; +import org.springframework.stereotype.Component; + +@Component("imageformat_qcow2") +public class QCOW2 extends BaseType implements ImageFormat { + private final String type = "QCOW2"; + + @Override + public String toString() { + return type; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/format/Unknown.java b/engine/storage/src/org/apache/cloudstack/storage/image/format/Unknown.java new file mode 100644 index 000000000..992654e08 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/format/Unknown.java @@ -0,0 +1,32 @@ +/* + * 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 org.apache.cloudstack.storage.image.format; + +import org.apache.cloudstack.storage.BaseType; +import org.springframework.stereotype.Component; + +@Component +public class Unknown extends BaseType implements ImageFormat { + private final String type = "Unknown"; + + @Override + public String toString() { + return type; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/format/VHD.java b/engine/storage/src/org/apache/cloudstack/storage/image/format/VHD.java new file mode 100644 index 000000000..89cd42431 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/format/VHD.java @@ -0,0 +1,32 @@ +/* + * 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 org.apache.cloudstack.storage.image.format; + +import org.apache.cloudstack.storage.BaseType; +import org.springframework.stereotype.Component; + +@Component("image_format_vhd") +public class VHD extends BaseType implements ImageFormat { + private final String type = "VHD"; + + @Override + public String toString() { + return type; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/image/motion/ImageMotionService.java b/engine/storage/src/org/apache/cloudstack/storage/image/motion/ImageMotionService.java new file mode 100644 index 000000000..908d6d52c --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/image/motion/ImageMotionService.java @@ -0,0 +1,30 @@ +/* + * 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 org.apache.cloudstack.storage.image.motion; + +import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.storage.db.ObjectInDataStoreVO; +import org.apache.cloudstack.storage.volume.TemplateOnPrimaryDataStoreInfo; + +public interface ImageMotionService { + void copyTemplateAsync(TemplateInfo destTemplate, TemplateInfo srcTemplate, AsyncCompletionCallback callback); + boolean copyIso(String isoUri, String destIsoUri); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java b/engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java new file mode 100644 index 000000000..3602bb16b --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/motion/AncientDataMotionStrategy.java @@ -0,0 +1,725 @@ +/* + * 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 org.apache.cloudstack.storage.motion; + +import java.util.Date; +import java.util.List; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.BackupSnapshotAnswer; +import com.cloud.agent.api.BackupSnapshotCommand; +import com.cloud.agent.api.Command; +import com.cloud.agent.api.CreatePrivateTemplateFromSnapshotCommand; +import com.cloud.agent.api.CreatePrivateTemplateFromVolumeCommand; +import com.cloud.agent.api.CreateVolumeFromSnapshotAnswer; +import com.cloud.agent.api.CreateVolumeFromSnapshotCommand; +import com.cloud.agent.api.UpgradeSnapshotCommand; +import com.cloud.agent.api.storage.CopyVolumeAnswer; +import com.cloud.agent.api.storage.CopyVolumeCommand; +import com.cloud.agent.api.storage.CreateAnswer; +import com.cloud.agent.api.storage.CreateCommand; +import com.cloud.agent.api.storage.CreatePrivateTemplateAnswer; +import com.cloud.agent.api.to.S3TO; +import com.cloud.agent.api.to.StorageFilerTO; +import com.cloud.agent.api.to.SwiftTO; +import com.cloud.configuration.Config; +import com.cloud.configuration.dao.ConfigurationDao; +import com.cloud.exception.StorageUnavailableException; +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.storage.DiskOfferingVO; +import com.cloud.storage.SnapshotVO; +import com.cloud.storage.Storage.ImageFormat; +import com.cloud.storage.StorageManager; +import com.cloud.storage.StoragePool; +import com.cloud.storage.VMTemplateHostVO; +import com.cloud.storage.VMTemplateStoragePoolVO; +import com.cloud.storage.VMTemplateStorageResourceAssoc.Status; +import com.cloud.storage.VMTemplateVO; +import com.cloud.storage.VolumeHostVO; +import com.cloud.storage.VolumeManager; +import com.cloud.storage.VolumeVO; +import com.cloud.storage.dao.DiskOfferingDao; +import com.cloud.storage.dao.SnapshotDao; +import com.cloud.storage.dao.VMTemplateDao; +import com.cloud.storage.dao.VMTemplateHostDao; +import com.cloud.storage.dao.VMTemplatePoolDao; +import com.cloud.storage.dao.VolumeDao; +import com.cloud.storage.dao.VolumeHostDao; +import com.cloud.storage.s3.S3Manager; +import com.cloud.storage.snapshot.SnapshotManager; +import com.cloud.storage.swift.SwiftManager; +import com.cloud.template.TemplateManager; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.Transaction; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.vm.DiskProfile; + +@Component +public class AncientDataMotionStrategy implements DataMotionStrategy { + private static final Logger s_logger = Logger + .getLogger(AncientDataMotionStrategy.class); + @Inject + TemplateManager templateMgr; + @Inject + VolumeHostDao volumeHostDao; + @Inject + HostDao hostDao; + @Inject + ConfigurationDao configDao; + @Inject + StorageManager storageMgr; + @Inject + VolumeDao volDao; + @Inject + VMTemplateDao templateDao; + @Inject + SnapshotManager snapshotMgr; + @Inject + SnapshotDao snapshotDao; + @Inject + PrimaryDataStoreDao primaryDataStoreDao; + @Inject + DataStoreManager dataStoreMgr; + @Inject + VMTemplateHostDao templateHostDao; + @Inject DiskOfferingDao diskOfferingDao; + @Inject VMTemplatePoolDao templatePoolDao; + @Inject + VolumeManager volumeMgr; + @Inject + private SwiftManager _swiftMgr; + @Inject + private S3Manager _s3Mgr; + + @Override + public boolean canHandle(DataObject srcData, DataObject destData) { + // TODO Auto-generated method stub + return true; + } + + @DB + protected Answer copyVolumeFromImage(DataObject srcData, DataObject destData) { + String value = configDao.getValue(Config.RecreateSystemVmEnabled.key()); + int _copyvolumewait = NumbersUtil.parseInt(value, + Integer.parseInt(Config.CopyVolumeWait.getDefaultValue())); + + VolumeHostVO volumeHostVO = volumeHostDao.findByVolumeId(srcData + .getId()); + HostVO secStorage = hostDao.findById(volumeHostVO.getHostId()); + String secondaryStorageURL = secStorage.getStorageUrl(); + String[] volumePath = volumeHostVO.getInstallPath().split("/"); + String volumeUUID = volumePath[volumePath.length - 1].split("\\.")[0]; + StoragePool destPool = (StoragePool) destData.getDataStore(); + CopyVolumeCommand cvCmd = new CopyVolumeCommand(srcData.getId(), + volumeUUID, destPool, secondaryStorageURL, false, + _copyvolumewait); + CopyVolumeAnswer cvAnswer = null; + String errMsg = null; + try { + cvAnswer = (CopyVolumeAnswer) this.storageMgr.sendToPool(destPool, + cvCmd); + } catch (StorageUnavailableException e1) { + s_logger.debug("Failed to copy volume " + srcData.getId() + " to " + + destData.getId(), e1); + errMsg = e1.toString(); + } + + if (cvAnswer == null || !cvAnswer.getResult()) { + errMsg = cvAnswer.getDetails(); + } + + VolumeVO vol = this.volDao.findById(destData.getId()); + Transaction txn = Transaction.currentTxn(); + txn.start(); + vol.setPath(cvAnswer.getVolumePath()); + vol.setFolder(destPool.getPath()); + vol.setPodId(destPool.getPodId()); + vol.setPoolId(destPool.getId()); + vol.setPodId(destPool.getPodId()); + + this.volDao.update(vol.getId(), vol); + volumeHostDao.remove(volumeHostVO.getId()); + txn.commit(); + return cvAnswer; + } + + private Answer copyTemplate(DataObject srcData, DataObject destData) { + VMTemplateVO template = this.templateDao.findById(srcData.getId()); + templateMgr.prepareTemplateForCreate(template, + (StoragePool) destData.getDataStore()); + return null; + } + + protected Answer copyFromSnapshot(DataObject snapObj, DataObject volObj) { + SnapshotVO snapshot = this.snapshotDao.findById(snapObj.getId()); + StoragePool pool = (StoragePool) volObj.getDataStore(); + String vdiUUID = null; + Long snapshotId = snapshot.getId(); + Long volumeId = snapshot.getVolumeId(); + Long dcId = snapshot.getDataCenterId(); + String secondaryStoragePoolUrl = this.snapshotMgr + .getSecondaryStorageURL(snapshot); + long accountId = snapshot.getAccountId(); + + String backedUpSnapshotUuid = snapshot.getBackupSnapshotId(); + snapshot = snapshotDao.findById(snapshotId); + if (snapshot.getVersion().trim().equals("2.1")) { + VolumeVO volume = this.volDao.findByIdIncludingRemoved(volumeId); + if (volume == null) { + throw new CloudRuntimeException("failed to upgrade snapshot " + + snapshotId + " due to unable to find orignal volume:" + + volumeId + ", try it later "); + } + if (volume.getTemplateId() == null) { + snapshotDao.updateSnapshotVersion(volumeId, "2.1", "2.2"); + } else { + VMTemplateVO template = templateDao + .findByIdIncludingRemoved(volume.getTemplateId()); + if (template == null) { + throw new CloudRuntimeException( + "failed to upgrade snapshot " + + snapshotId + + " due to unalbe to find orignal template :" + + volume.getTemplateId() + + ", try it later "); + } + Long templateId = template.getId(); + Long tmpltAccountId = template.getAccountId(); + if (!snapshotDao.lockInLockTable(snapshotId.toString(), 10)) { + throw new CloudRuntimeException( + "failed to upgrade snapshot " + + snapshotId + + " due to this snapshot is being used, try it later "); + } + UpgradeSnapshotCommand cmd = new UpgradeSnapshotCommand(null, + secondaryStoragePoolUrl, dcId, accountId, volumeId, + templateId, tmpltAccountId, null, + snapshot.getBackupSnapshotId(), snapshot.getName(), + "2.1"); + Answer answer = null; + try { + answer = this.storageMgr.sendToPool(pool, cmd); + } catch (StorageUnavailableException e) { + } finally { + snapshotDao.unlockFromLockTable(snapshotId.toString()); + } + if ((answer != null) && answer.getResult()) { + snapshotDao.updateSnapshotVersion(volumeId, "2.1", "2.2"); + } else { + throw new CloudRuntimeException("Unable to upgrade snapshot from 2.1 to 2.2 for " + + snapshot.getId()); + } + } + } + String basicErrMsg = "Failed to create volume from " + + snapshot.getName() + " on pool " + pool; + + try { + if (snapshot.getSwiftId() != null && snapshot.getSwiftId() != 0) { + snapshotMgr.downloadSnapshotsFromSwift(snapshot); + } else if (snapshot.getS3Id() != null && snapshot.getS3Id() != 0) { + snapshotMgr.downloadSnapshotsFromS3(snapshot); + } + String value = configDao + .getValue(Config.CreateVolumeFromSnapshotWait.toString()); + int _createVolumeFromSnapshotWait = NumbersUtil.parseInt(value, + Integer.parseInt(Config.CreateVolumeFromSnapshotWait + .getDefaultValue())); + CreateVolumeFromSnapshotCommand createVolumeFromSnapshotCommand = new CreateVolumeFromSnapshotCommand( + pool, secondaryStoragePoolUrl, dcId, accountId, volumeId, + backedUpSnapshotUuid, snapshot.getName(), + _createVolumeFromSnapshotWait); + CreateVolumeFromSnapshotAnswer answer; + if (!snapshotDao.lockInLockTable(snapshotId.toString(), 10)) { + throw new CloudRuntimeException("failed to create volume from " + + snapshotId + + " due to this snapshot is being used, try it later "); + } + answer = (CreateVolumeFromSnapshotAnswer) this.storageMgr + .sendToPool(pool, createVolumeFromSnapshotCommand); + if (answer != null && answer.getResult()) { + vdiUUID = answer.getVdi(); + VolumeVO vol = this.volDao.findById(volObj.getId()); + vol.setPath(vdiUUID); + this.volDao.update(vol.getId(), vol); + return null; + } else { + s_logger.error(basicErrMsg + " due to " + + ((answer == null) ? "null" : answer.getDetails())); + throw new CloudRuntimeException(basicErrMsg); + } + } catch (StorageUnavailableException e) { + s_logger.error(basicErrMsg, e); + throw new CloudRuntimeException(basicErrMsg); + } finally { + if (snapshot.getSwiftId() != null) { + snapshotMgr.deleteSnapshotsDirForVolume( + secondaryStoragePoolUrl, dcId, accountId, volumeId); + } + } + } + + protected Answer cloneVolume(DataObject template, DataObject volume) { + VolumeInfo volInfo = (VolumeInfo)volume; + DiskOfferingVO offering = diskOfferingDao.findById(volInfo.getDiskOfferingId()); + VMTemplateStoragePoolVO tmpltStoredOn = templatePoolDao.findByPoolTemplate(template.getDataStore().getId(), template.getId()); + + DiskProfile diskProfile = new DiskProfile(volInfo, offering, + null); + CreateCommand cmd = new CreateCommand(diskProfile, + tmpltStoredOn.getLocalDownloadPath(), + new StorageFilerTO((StoragePool)template.getDataStore())); + Answer answer = null; + StoragePool pool = (StoragePool)volume.getDataStore(); + String errMsg = null; + try { + answer = storageMgr.sendToPool(pool, null, cmd); + } catch (StorageUnavailableException e) { + s_logger.debug("Failed to send to storage pool", e); + throw new CloudRuntimeException("Failed to send to storage pool", e); + } + + if (answer.getResult()) { + VolumeVO vol = this.volDao.findById(volume.getId()); + CreateAnswer createAnswer = (CreateAnswer) answer; + vol.setFolder(pool.getPath()); + vol.setPath(createAnswer.getVolume().getPath()); + vol.setSize(createAnswer.getVolume().getSize()); + vol.setPoolType(pool.getPoolType()); + vol.setPoolId(pool.getId()); + vol.setPodId(pool.getPodId()); + this.volDao.update(vol.getId(), vol); + + } else { + if (tmpltStoredOn != null + && (answer instanceof CreateAnswer) + && ((CreateAnswer) answer) + .templateReloadRequested()) { + if (!templateMgr + .resetTemplateDownloadStateOnPool(tmpltStoredOn + .getId())) { + + } + } + errMsg = answer.getDetails(); + } + + return answer; + } + + protected Answer copyVolumeBetweenPools(DataObject srcData, DataObject destData) { + VolumeInfo volume = (VolumeInfo)srcData; + VolumeInfo destVolume = (VolumeInfo)destData; + String secondaryStorageURL = this.templateMgr.getSecondaryStorageURL(volume + .getDataCenterId()); + StoragePool srcPool = (StoragePool)this.dataStoreMgr.getDataStore(volume + .getPoolId(), DataStoreRole.Primary); + + StoragePool destPool = (StoragePool)this.dataStoreMgr.getDataStore(destVolume.getPoolId(), DataStoreRole.Primary); + + String value = this.configDao.getValue(Config.CopyVolumeWait.toString()); + int _copyvolumewait = NumbersUtil.parseInt(value, + Integer.parseInt(Config.CopyVolumeWait.getDefaultValue())); + CopyVolumeCommand cvCmd = new CopyVolumeCommand(volume.getId(), + volume.getPath(), srcPool, secondaryStorageURL, true, + _copyvolumewait); + CopyVolumeAnswer cvAnswer; + try { + cvAnswer = (CopyVolumeAnswer) this.storageMgr.sendToPool(srcPool, cvCmd); + } catch (StorageUnavailableException e1) { + throw new CloudRuntimeException( + "Failed to copy the volume from the source primary storage pool to secondary storage.", + e1); + } + + if (cvAnswer == null || !cvAnswer.getResult()) { + throw new CloudRuntimeException( + "Failed to copy the volume from the source primary storage pool to secondary storage."); + } + + String secondaryStorageVolumePath = cvAnswer.getVolumePath(); + + cvCmd = new CopyVolumeCommand(volume.getId(), + secondaryStorageVolumePath, destPool, + secondaryStorageURL, false, _copyvolumewait); + try { + cvAnswer = (CopyVolumeAnswer) this.storageMgr.sendToPool(destPool, cvCmd); + } catch (StorageUnavailableException e1) { + throw new CloudRuntimeException( + "Failed to copy the volume from secondary storage to the destination primary storage pool."); + } + + if (cvAnswer == null || !cvAnswer.getResult()) { + throw new CloudRuntimeException( + "Failed to copy the volume from secondary storage to the destination primary storage pool."); + } + + VolumeVO destVol = this.volDao.findById(destVolume.getId()); + destVol.setPath(cvAnswer.getVolumePath()); + this.volDao.update(destVol.getId(), destVol); + return cvAnswer; + } + + @Override + public Void copyAsync(DataObject srcData, DataObject destData, + AsyncCompletionCallback callback) { + Answer answer = null; + String errMsg = null; + try { + if (destData.getType() == DataObjectType.VOLUME + && srcData.getType() == DataObjectType.VOLUME && srcData.getDataStore().getRole() == DataStoreRole.Image) { + answer = copyVolumeFromImage(srcData, destData); + } else if (destData.getType() == DataObjectType.TEMPLATE + && srcData.getType() == DataObjectType.TEMPLATE) { + answer = copyTemplate(srcData, destData); + } else if (srcData.getType() == DataObjectType.SNAPSHOT + && destData.getType() == DataObjectType.VOLUME) { + answer = copyFromSnapshot(srcData, destData); + } else if (srcData.getType() == DataObjectType.SNAPSHOT + && destData.getType() == DataObjectType.TEMPLATE) { + answer = createTemplateFromSnashot(srcData, destData); + } else if (srcData.getType() == DataObjectType.VOLUME + && destData.getType() == DataObjectType.TEMPLATE) { + answer = createTemplateFromVolume(srcData, destData); + } else if (srcData.getType() == DataObjectType.TEMPLATE + && destData.getType() == DataObjectType.VOLUME) { + answer = cloneVolume(srcData, destData); + } else if (destData.getType() == DataObjectType.VOLUME + && srcData.getType() == DataObjectType.VOLUME && srcData.getDataStore().getRole() == DataStoreRole.Primary) { + answer = copyVolumeBetweenPools(srcData, destData); + } else if (srcData.getType() == DataObjectType.SNAPSHOT && + destData.getType() == DataObjectType.SNAPSHOT) { + answer = copySnapshot(srcData, destData); + } + } catch (Exception e) { + s_logger.debug("copy failed", e); + errMsg = e.toString(); + } + CopyCommandResult result = new CopyCommandResult(null, answer); + result.setResult(errMsg); + callback.complete(result); + + return null; + } + + @DB + protected Answer createTemplateFromSnashot(DataObject srcData, + DataObject destData) { + long snapshotId = srcData.getId(); + SnapshotVO snapshot = snapshotDao.findById(snapshotId); + if (snapshot == null) { + throw new CloudRuntimeException("Unable to find Snapshot for Id " + + srcData.getId()); + } + Long zoneId = snapshot.getDataCenterId(); + HostVO secondaryStorageHost = this.templateMgr + .getSecondaryStorageHost(zoneId); + String secondaryStorageURL = snapshotMgr + .getSecondaryStorageURL(snapshot); + VMTemplateVO template = this.templateDao.findById(destData.getId()); + String name = template.getName(); + String backupSnapshotUUID = snapshot.getBackupSnapshotId(); + if (backupSnapshotUUID == null) { + throw new CloudRuntimeException( + "Unable to create private template from snapshot " + + snapshotId + + " due to there is no backupSnapshotUUID for this snapshot"); + } + + Long dcId = snapshot.getDataCenterId(); + Long accountId = snapshot.getAccountId(); + Long volumeId = snapshot.getVolumeId(); + + String origTemplateInstallPath = null; + List pools = this.storageMgr + .ListByDataCenterHypervisor(zoneId, + snapshot.getHypervisorType()); + if (pools == null || pools.size() == 0) { + throw new CloudRuntimeException( + "Unable to find storage pools in zone " + zoneId); + } + StoragePoolVO poolvo = pools.get(0); + StoragePool pool = (StoragePool) this.dataStoreMgr.getDataStore( + poolvo.getId(), DataStoreRole.Primary); + if (snapshot.getVersion() != null + && snapshot.getVersion().equalsIgnoreCase("2.1")) { + VolumeVO volume = this.volDao.findByIdIncludingRemoved(volumeId); + if (volume == null) { + throw new CloudRuntimeException("failed to upgrade snapshot " + + snapshotId + " due to unable to find orignal volume:" + + volumeId + ", try it later "); + } + if (volume.getTemplateId() == null) { + snapshotDao.updateSnapshotVersion(volumeId, "2.1", "2.2"); + } else { + template = templateDao.findByIdIncludingRemoved(volume + .getTemplateId()); + if (template == null) { + throw new CloudRuntimeException( + "failed to upgrade snapshot " + + snapshotId + + " due to unalbe to find orignal template :" + + volume.getTemplateId() + + ", try it later "); + } + Long origTemplateId = template.getId(); + Long origTmpltAccountId = template.getAccountId(); + if (!this.volDao.lockInLockTable(volumeId.toString(), 10)) { + throw new CloudRuntimeException( + "failed to upgrade snapshot " + snapshotId + + " due to volume:" + volumeId + + " is being used, try it later "); + } + UpgradeSnapshotCommand cmd = new UpgradeSnapshotCommand(null, + secondaryStorageURL, dcId, accountId, volumeId, + origTemplateId, origTmpltAccountId, null, + snapshot.getBackupSnapshotId(), snapshot.getName(), + "2.1"); + if (!this.volDao.lockInLockTable(volumeId.toString(), 10)) { + throw new CloudRuntimeException( + "Creating template failed due to volume:" + + volumeId + + " is being used, try it later "); + } + Answer answer = null; + try { + answer = this.storageMgr.sendToPool(pool, cmd); + cmd = null; + } catch (StorageUnavailableException e) { + } finally { + this.volDao.unlockFromLockTable(volumeId.toString()); + } + if ((answer != null) && answer.getResult()) { + snapshotDao.updateSnapshotVersion(volumeId, "2.1", "2.2"); + } else { + throw new CloudRuntimeException( + "Unable to upgrade snapshot"); + } + } + } + if (snapshot.getSwiftId() != null && snapshot.getSwiftId() != 0) { + snapshotMgr.downloadSnapshotsFromSwift(snapshot); + } + String value = configDao + .getValue(Config.CreatePrivateTemplateFromSnapshotWait + .toString()); + int _createprivatetemplatefromsnapshotwait = NumbersUtil.parseInt( + value, Integer + .parseInt(Config.CreatePrivateTemplateFromSnapshotWait + .getDefaultValue())); + + CreatePrivateTemplateFromSnapshotCommand cmd = new CreatePrivateTemplateFromSnapshotCommand( + pool, secondaryStorageURL, dcId, accountId, + snapshot.getVolumeId(), backupSnapshotUUID, snapshot.getName(), + origTemplateInstallPath, template.getId(), name, + _createprivatetemplatefromsnapshotwait); + + return sendCommand(cmd, pool, template.getId(), dcId, + secondaryStorageHost.getId()); + } + + @DB + protected Answer sendCommand(Command cmd, StoragePool pool, + long templateId, long zoneId, long hostId) { + + CreatePrivateTemplateAnswer answer = null; + try { + answer = (CreatePrivateTemplateAnswer) this.storageMgr.sendToPool( + pool, cmd); + } catch (StorageUnavailableException e) { + throw new CloudRuntimeException( + "Failed to execute CreatePrivateTemplateFromSnapshotCommand", + e); + } + + if (answer == null || !answer.getResult()) { + return answer; + } + + VMTemplateVO privateTemplate = templateDao.findById(templateId); + String answerUniqueName = answer.getUniqueName(); + if (answerUniqueName != null) { + privateTemplate.setUniqueName(answerUniqueName); + } + ImageFormat format = answer.getImageFormat(); + if (format != null) { + privateTemplate.setFormat(format); + } else { + // This never occurs. + // Specify RAW format makes it unusable for snapshots. + privateTemplate.setFormat(ImageFormat.RAW); + } + + String checkSum = this.templateMgr + .getChecksum(hostId, answer.getPath()); + + Transaction txn = Transaction.currentTxn(); + + txn.start(); + + privateTemplate.setChecksum(checkSum); + templateDao.update(privateTemplate.getId(), privateTemplate); + + // add template zone ref for this template + templateDao.addTemplateToZone(privateTemplate, zoneId); + VMTemplateHostVO templateHostVO = new VMTemplateHostVO(hostId, + privateTemplate.getId()); + templateHostVO.setDownloadPercent(100); + templateHostVO.setDownloadState(Status.DOWNLOADED); + templateHostVO.setInstallPath(answer.getPath()); + templateHostVO.setLastUpdated(new Date()); + templateHostVO.setSize(answer.getVirtualSize()); + templateHostVO.setPhysicalSize(answer.getphysicalSize()); + templateHostDao.persist(templateHostVO); + txn.close(); + return answer; + } + + private Answer createTemplateFromVolume(DataObject srcObj, + DataObject destObj) { + long volumeId = srcObj.getId(); + VolumeVO volume = this.volDao.findById(volumeId); + if (volume == null) { + throw new CloudRuntimeException("Unable to find volume for Id " + + volumeId); + } + long accountId = volume.getAccountId(); + + String vmName = this.volumeMgr.getVmNameOnVolume(volume); + Long zoneId = volume.getDataCenterId(); + HostVO secondaryStorageHost = this.templateMgr + .getSecondaryStorageHost(zoneId); + if (secondaryStorageHost == null) { + throw new CloudRuntimeException( + "Can not find the secondary storage for zoneId " + zoneId); + } + String secondaryStorageURL = secondaryStorageHost.getStorageUrl(); + VMTemplateVO template = this.templateDao.findById(destObj.getId()); + StoragePool pool = (StoragePool) this.dataStoreMgr.getDataStore( + volume.getPoolId(), DataStoreRole.Primary); + String value = configDao + .getValue(Config.CreatePrivateTemplateFromVolumeWait.toString()); + int _createprivatetemplatefromvolumewait = NumbersUtil.parseInt(value, + Integer.parseInt(Config.CreatePrivateTemplateFromVolumeWait + .getDefaultValue())); + + CreatePrivateTemplateFromVolumeCommand cmd = new CreatePrivateTemplateFromVolumeCommand( + pool, secondaryStorageURL, destObj.getId(), accountId, + template.getName(), template.getUniqueName(), volume.getPath(), + vmName, _createprivatetemplatefromvolumewait); + + return sendCommand(cmd, pool, template.getId(), zoneId, + secondaryStorageHost.getId()); + } + + private HostVO getSecHost(long volumeId, long dcId) { + Long id = snapshotDao.getSecHostId(volumeId); + if ( id != null) { + return hostDao.findById(id); + } + return this.templateMgr.getSecondaryStorageHost(dcId); + } + + protected Answer copySnapshot(DataObject srcObject, DataObject destObject) { + SnapshotInfo srcSnapshot = (SnapshotInfo)srcObject; + VolumeInfo baseVolume = srcSnapshot.getBaseVolume(); + Long dcId = baseVolume.getDataCenterId(); + Long accountId = baseVolume.getAccountId(); + + HostVO secHost = getSecHost(baseVolume.getId(), baseVolume.getDataCenterId()); + Long secHostId = secHost.getId(); + String secondaryStoragePoolUrl = secHost.getStorageUrl(); + String snapshotUuid = srcSnapshot.getPath(); + // In order to verify that the snapshot is not empty, + // we check if the parent of the snapshot is not the same as the parent of the previous snapshot. + // We pass the uuid of the previous snapshot to the plugin to verify this. + SnapshotVO prevSnapshot = null; + String prevSnapshotUuid = null; + String prevBackupUuid = null; + + + SwiftTO swift = _swiftMgr.getSwiftTO(); + S3TO s3 = _s3Mgr.getS3TO(); + + long prevSnapshotId = srcSnapshot.getPrevSnapshotId(); + if (prevSnapshotId > 0) { + prevSnapshot = snapshotDao.findByIdIncludingRemoved(prevSnapshotId); + if ( prevSnapshot.getBackupSnapshotId() != null && swift == null) { + if (prevSnapshot.getVersion() != null && prevSnapshot.getVersion().equals("2.2")) { + prevBackupUuid = prevSnapshot.getBackupSnapshotId(); + prevSnapshotUuid = prevSnapshot.getPath(); + } + } else if ((prevSnapshot.getSwiftId() != null && swift != null) + || (prevSnapshot.getS3Id() != null && s3 != null)) { + prevBackupUuid = prevSnapshot.getBackupSnapshotId(); + prevSnapshotUuid = prevSnapshot.getPath(); + } + } + boolean isVolumeInactive = this.volumeMgr.volumeInactive(baseVolume); + String vmName = this.volumeMgr.getVmNameOnVolume(baseVolume); + StoragePool srcPool = (StoragePool)dataStoreMgr.getPrimaryDataStore(baseVolume.getPoolId()); + String value = configDao.getValue(Config.BackupSnapshotWait.toString()); + int _backupsnapshotwait = NumbersUtil.parseInt(value, Integer.parseInt(Config.BackupSnapshotWait.getDefaultValue())); + BackupSnapshotCommand backupSnapshotCommand = new BackupSnapshotCommand(secondaryStoragePoolUrl, dcId, accountId, baseVolume.getId(), srcSnapshot.getId(), secHostId, baseVolume.getPath(), srcPool, snapshotUuid, + srcSnapshot.getName(), prevSnapshotUuid, prevBackupUuid, isVolumeInactive, vmName, _backupsnapshotwait); + + if ( swift != null ) { + backupSnapshotCommand.setSwift(swift); + } else if (s3 != null) { + backupSnapshotCommand.setS3(s3); + } + BackupSnapshotAnswer answer = (BackupSnapshotAnswer) this.snapshotMgr.sendToPool(baseVolume, backupSnapshotCommand); + if (answer != null && answer.getResult()) { + SnapshotVO snapshotVO = this.snapshotDao.findById(srcSnapshot.getId()); + if (backupSnapshotCommand.getSwift() != null ) { + snapshotVO.setSwiftId(swift.getId()); + snapshotVO.setBackupSnapshotId(answer.getBackupSnapshotName()); + } else if (backupSnapshotCommand.getS3() != null) { + snapshotVO.setS3Id(s3.getId()); + snapshotVO.setBackupSnapshotId(answer.getBackupSnapshotName()); + } else { + snapshotVO.setSecHostId(secHost.getId()); + snapshotVO.setBackupSnapshotId(answer.getBackupSnapshotName()); + } + if (answer.isFull()) { + snapshotVO.setPrevSnapshotId(0L); + } + this.snapshotDao.update(srcSnapshot.getId(), snapshotVO); + } + return answer; + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/motion/DataMotionDriver.java b/engine/storage/src/org/apache/cloudstack/storage/motion/DataMotionDriver.java new file mode 100644 index 000000000..3a59b2123 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/motion/DataMotionDriver.java @@ -0,0 +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. + */ +package org.apache.cloudstack.storage.motion; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; + +public interface DataMotionDriver { + public void copy(DataObject srcObj, DataObject destObj); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/motion/DataMotionService.java b/engine/storage/src/org/apache/cloudstack/storage/motion/DataMotionService.java new file mode 100644 index 000000000..db36f6492 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/motion/DataMotionService.java @@ -0,0 +1,28 @@ +/* + * 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 org.apache.cloudstack.storage.motion; + +import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; + +public interface DataMotionService { + public void copyAsync(DataObject srcData, DataObject destData, + AsyncCompletionCallback callback); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/motion/DataMotionServiceImpl.java b/engine/storage/src/org/apache/cloudstack/storage/motion/DataMotionServiceImpl.java new file mode 100644 index 000000000..343140fb9 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/motion/DataMotionServiceImpl.java @@ -0,0 +1,61 @@ +/* + * 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 org.apache.cloudstack.storage.motion; + +import java.util.List; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.springframework.stereotype.Component; + +import com.cloud.utils.exception.CloudRuntimeException; + +@Component +public class DataMotionServiceImpl implements DataMotionService { + @Inject + List strategies; + + @Override + public void copyAsync(DataObject srcData, DataObject destData, + AsyncCompletionCallback callback) { + + if (srcData.getDataStore().getDriver().canCopy(srcData, destData)) { + srcData.getDataStore().getDriver() + .copyAsync(srcData, destData, callback); + return; + } else if (destData.getDataStore().getDriver() + .canCopy(srcData, destData)) { + destData.getDataStore().getDriver() + .copyAsync(srcData, destData, callback); + return; + } + + for (DataMotionStrategy strategy : strategies) { + if (strategy.canHandle(srcData, destData)) { + strategy.copyAsync(srcData, destData, callback); + return; + } + } + throw new CloudRuntimeException("can't find strategy to move data"); + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/motion/DataMotionStrategy.java b/engine/storage/src/org/apache/cloudstack/storage/motion/DataMotionStrategy.java new file mode 100644 index 000000000..ba40c6dcb --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/motion/DataMotionStrategy.java @@ -0,0 +1,30 @@ +/* + * 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 org.apache.cloudstack.storage.motion; + +import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; + +public interface DataMotionStrategy { + public boolean canHandle(DataObject srcData, DataObject destData); + + public Void copyAsync(DataObject srcData, DataObject destData, + AsyncCompletionCallback callback); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/snapshot/SnapshotEntityImpl.java b/engine/storage/src/org/apache/cloudstack/storage/snapshot/SnapshotEntityImpl.java new file mode 100644 index 000000000..0a91186aa --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/snapshot/SnapshotEntityImpl.java @@ -0,0 +1,192 @@ +// 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 org.apache.cloudstack.storage.snapshot; + +import java.lang.reflect.Method; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.cloudstack.engine.cloud.entity.api.SnapshotEntity; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; + +public class SnapshotEntityImpl implements SnapshotEntity { + + @Override + public String getUuid() { + // TODO Auto-generated method stub + return null; + } + + @Override + public long getId() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public String getCurrentState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getDesiredState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Date getCreatedTime() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Date getLastUpdatedTime() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getOwner() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List getApplicableActions() { + // TODO Auto-generated method stub + return null; + } + + @Override + public long getAccountId() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public long getVolumeId() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public String getPath() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Date getCreated() { + // TODO Auto-generated method stub + return null; + } + + @Override + public HypervisorType getHypervisorType() { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean isRecursive() { + // TODO Auto-generated method stub + return false; + } + + @Override + public short getsnapshotType() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public long getDomainId() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public String reserveForBackup(int expiration) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void backup(String reservationToken) { + // TODO Auto-generated method stub + + } + + @Override + public void restore(String vm) { + // TODO Auto-generated method stub + + } + + @Override + public void destroy() { + // TODO Auto-generated method stub + + } + + @Override + public Map getDetails() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void addDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public void delDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public void updateDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public State getState() { + // TODO Auto-generated method stub + return null; + } + + @Override + public Type getRecurringType() { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/snapshot/SnapshotService.java b/engine/storage/src/org/apache/cloudstack/storage/snapshot/SnapshotService.java new file mode 100644 index 000000000..f3e5c4aea --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/snapshot/SnapshotService.java @@ -0,0 +1,27 @@ +// 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 org.apache.cloudstack.storage.snapshot; + +import org.apache.cloudstack.engine.cloud.entity.api.SnapshotEntity; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; + +public interface SnapshotService { + public SnapshotEntity getSnapshotEntity(long snapshotId); + public boolean takeSnapshot(SnapshotInfo snapshot); + public boolean revertSnapshot(SnapshotInfo snapshot); + public boolean deleteSnapshot(SnapshotInfo snapshot); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/to/ImageDataStoreTO.java b/engine/storage/src/org/apache/cloudstack/storage/to/ImageDataStoreTO.java new file mode 100644 index 000000000..b1de88f0e --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/to/ImageDataStoreTO.java @@ -0,0 +1,36 @@ +// 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 org.apache.cloudstack.storage.to; + +import org.apache.cloudstack.storage.image.datastore.ImageDataStoreInfo; + +public class ImageDataStoreTO { + private final String type; + private final String uri; + public ImageDataStoreTO(ImageDataStoreInfo dataStore) { + this.type = dataStore.getType(); + this.uri = dataStore.getUri(); + } + + public String getType() { + return this.type; + } + + public String getUri() { + return this.uri; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimaryDataStoreTO.java b/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimaryDataStoreTO.java new file mode 100644 index 000000000..a9a3cc43c --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/to/ImageOnPrimaryDataStoreTO.java @@ -0,0 +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. + */ +package org.apache.cloudstack.storage.to; + +import org.apache.cloudstack.storage.volume.TemplateOnPrimaryDataStoreInfo; + +public class ImageOnPrimaryDataStoreTO { + private final String pathOnPrimaryDataStore; + private PrimaryDataStoreTO dataStore; + private final TemplateTO template; + public ImageOnPrimaryDataStoreTO(TemplateOnPrimaryDataStoreInfo template) { + this.pathOnPrimaryDataStore = template.getPath(); + //this.dataStore = template.getPrimaryDataStore().getDataStoreTO(); + this.template = new TemplateTO(template.getTemplate()); + } + + public String getPathOnPrimaryDataStore() { + return this.pathOnPrimaryDataStore; + } + + public PrimaryDataStoreTO getPrimaryDataStore() { + return this.dataStore; + } + + public TemplateTO getTemplate() { + return this.template; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/to/NfsPrimaryDataStoreTO.java b/engine/storage/src/org/apache/cloudstack/storage/to/NfsPrimaryDataStoreTO.java new file mode 100644 index 000000000..96fb6bb24 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/to/NfsPrimaryDataStoreTO.java @@ -0,0 +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. +package org.apache.cloudstack.storage.to; + +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo; + +public class NfsPrimaryDataStoreTO extends PrimaryDataStoreTO { + private String server; + private String path; + + public NfsPrimaryDataStoreTO(PrimaryDataStoreInfo dataStore) { + super(dataStore); + } + + public void setServer(String server) { + this.server = server; + } + + public String getServer() { + return this.server; + } + + public void setPath(String path) { + this.path = path; + } + + public String getPath() { + return this.path; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/to/PrimaryDataStoreTO.java b/engine/storage/src/org/apache/cloudstack/storage/to/PrimaryDataStoreTO.java new file mode 100644 index 000000000..aa47e8f49 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/to/PrimaryDataStoreTO.java @@ -0,0 +1,48 @@ +// 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 org.apache.cloudstack.storage.to; + +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo; + +public class PrimaryDataStoreTO { + private final String uuid; + private final String name; + private String type; + private final long id; + public PrimaryDataStoreTO(PrimaryDataStoreInfo dataStore) { + this.uuid = dataStore.getUuid(); + this.name = dataStore.getName(); + // this.type = dataStore.getType(); + this.id = dataStore.getId(); + } + + public long getId() { + return this.id; + } + + public String getUuid() { + return this.uuid; + } + + public String getName() { + return this.name; + } + + public String getType() { + return this.type; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/to/TemplateTO.java b/engine/storage/src/org/apache/cloudstack/storage/to/TemplateTO.java new file mode 100644 index 000000000..bc55ea8c3 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/to/TemplateTO.java @@ -0,0 +1,51 @@ +// 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 org.apache.cloudstack.storage.to; + +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.disktype.DiskFormat; +import org.apache.cloudstack.storage.image.datastore.ImageDataStoreInfo; + +public class TemplateTO { + private final String path; + private final String uuid; + private DiskFormat diskType; + private final ImageDataStoreTO imageDataStore; + + public TemplateTO(TemplateInfo template) { + this.path = null; + this.uuid = template.getUuid(); + //this.diskType = template.getDiskType(); + this.imageDataStore = new ImageDataStoreTO((ImageDataStoreInfo)template.getDataStore()); + } + + public String getPath() { + return this.path; + } + + public String getUuid() { + return this.uuid; + } + + public DiskFormat getDiskType() { + return this.diskType; + } + + public ImageDataStoreTO getImageDataStore() { + return this.imageDataStore; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/to/VolumeTO.java b/engine/storage/src/org/apache/cloudstack/storage/to/VolumeTO.java new file mode 100644 index 000000000..c65b65258 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/to/VolumeTO.java @@ -0,0 +1,77 @@ +// 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 org.apache.cloudstack.storage.to; + +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.disktype.DiskFormat; +import org.apache.cloudstack.engine.subsystem.api.storage.type.VolumeType; + +public class VolumeTO { + private final String uuid; + private final String path; + private VolumeType volumeType; + private DiskFormat diskType; + private PrimaryDataStoreTO dataStore; + private String name; + private final long size; + public VolumeTO(VolumeInfo volume) { + this.uuid = volume.getUuid(); + this.path = volume.getUri(); + //this.volumeType = volume.getType(); + //this.diskType = volume.getDiskType(); + if (volume.getDataStore() != null) { + this.dataStore = new PrimaryDataStoreTO((PrimaryDataStoreInfo)volume.getDataStore()); + } else { + this.dataStore = null; + } + //this.name = volume.getName(); + this.size = volume.getSize(); + } + + public String getUuid() { + return this.uuid; + } + + public String getPath() { + return this.path; + } + + public VolumeType getVolumeType() { + return this.volumeType; + } + + public DiskFormat getDiskType() { + return this.diskType; + } + + public PrimaryDataStoreTO getDataStore() { + return this.dataStore; + } + + public void setDataStore(PrimaryDataStoreTO dataStore) { + this.dataStore = dataStore; + } + + public String getName() { + return this.name; + } + + public long getSize() { + return this.size; + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/TemplateOnPrimaryDataStoreInfo.java b/engine/storage/src/org/apache/cloudstack/storage/volume/TemplateOnPrimaryDataStoreInfo.java new file mode 100644 index 000000000..b8d0857d4 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/volume/TemplateOnPrimaryDataStoreInfo.java @@ -0,0 +1,32 @@ +/* + * 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 org.apache.cloudstack.storage.volume; + +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.storage.datastore.PrimaryDataStore; + +public interface TemplateOnPrimaryDataStoreInfo { + public String getPath(); + + public void setPath(String path); + + public PrimaryDataStore getPrimaryDataStore(); + + public TemplateInfo getTemplate(); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeEvent.java b/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeEvent.java new file mode 100644 index 000000000..663584b9d --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/volume/VolumeEvent.java @@ -0,0 +1,23 @@ +/* + * 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 org.apache.cloudstack.storage.volume; + +public enum VolumeEvent { + CreateRequested, CopyRequested, CopySucceeded, CopyFailed, OperationFailed, OperationSucceeded, OperationRetry, UploadRequested, MigrationRequested, SnapshotRequested, DestroyRequested, ExpungingRequested; +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java b/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java new file mode 100644 index 000000000..5f8daf42b --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/volume/datastore/PrimaryDataStoreHelper.java @@ -0,0 +1,198 @@ +/* + * 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 org.apache.cloudstack.storage.volume.datastore; + +import java.util.List; +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.HostScope; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreParameters; +import org.apache.cloudstack.engine.subsystem.api.storage.ScopeType; +import org.apache.cloudstack.storage.command.AttachPrimaryDataStoreCmd; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.DeleteStoragePoolCommand; +import com.cloud.agent.api.StoragePoolInfo; +import com.cloud.alert.AlertManager; +import com.cloud.capacity.Capacity; +import com.cloud.capacity.CapacityVO; +import com.cloud.capacity.dao.CapacityDao; +import com.cloud.storage.StorageManager; +import com.cloud.storage.StoragePool; +import com.cloud.storage.StoragePoolHostVO; +import com.cloud.storage.StoragePoolStatus; +import com.cloud.storage.dao.StoragePoolHostDao; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.Transaction; +import com.cloud.utils.exception.CloudRuntimeException; + +@Component +public class PrimaryDataStoreHelper { + private static final Logger s_logger = Logger + .getLogger(PrimaryDataStoreHelper.class); + @Inject + private PrimaryDataStoreDao dataStoreDao; + @Inject + DataStoreManager dataStoreMgr; + @Inject + StorageManager storageMgr; + @Inject + protected CapacityDao _capacityDao; + @Inject + protected StoragePoolHostDao storagePoolHostDao; + public DataStore createPrimaryDataStore(PrimaryDataStoreParameters params) { + StoragePoolVO dataStoreVO = dataStoreDao.findPoolByUUID(params.getUuid()); + if (dataStoreVO != null) { + throw new CloudRuntimeException("duplicate uuid: " + params.getUuid()); + } + + dataStoreVO = new StoragePoolVO(); + dataStoreVO.setStorageProviderName(params.getProviderName()); + dataStoreVO.setHostAddress(params.getHost()); + dataStoreVO.setPath(params.getPath()); + dataStoreVO.setPoolType(params.getType()); + dataStoreVO.setPort(params.getPort()); + dataStoreVO.setName(params.getName()); + dataStoreVO.setUuid(params.getUuid()); + dataStoreVO.setDataCenterId(params.getZoneId()); + dataStoreVO.setPodId(params.getPodId()); + dataStoreVO.setClusterId(params.getClusterId()); + dataStoreVO.setStatus(StoragePoolStatus.Initialized); + dataStoreVO.setUserInfo(params.getUserInfo()); + + Map details = params.getDetails(); + String tags = params.getTags(); + if (tags != null) { + String[] tokens = tags.split(","); + + for (String tag : tokens) { + tag = tag.trim(); + if (tag.length() == 0) { + continue; + } + details.put(tag, "true"); + } + } + + dataStoreVO = dataStoreDao.persist(dataStoreVO, details); + + return dataStoreMgr.getDataStore(dataStoreVO.getId(), DataStoreRole.Primary); + } + + public DataStore attachHost(DataStore store, HostScope scope, StoragePoolInfo existingInfo) { + StoragePoolHostVO poolHost = storagePoolHostDao.findByPoolHost(store.getId(), scope.getScopeId()); + if (poolHost == null) { + poolHost = new StoragePoolHostVO(store.getId(), scope.getScopeId(), existingInfo.getLocalPath()); + storagePoolHostDao.persist(poolHost); + } + + StoragePoolVO pool = this.dataStoreDao.findById(store.getId()); + pool.setScope(scope.getScopeType()); + pool.setAvailableBytes(existingInfo.getAvailableBytes()); + pool.setCapacityBytes(existingInfo.getCapacityBytes()); + pool.setStatus(StoragePoolStatus.Up); + this.dataStoreDao.update(pool.getId(), pool); + this.storageMgr.createCapacityEntry(pool, Capacity.CAPACITY_TYPE_LOCAL_STORAGE, pool.getCapacityBytes() - pool.getAvailableBytes()); + return dataStoreMgr.getDataStore(pool.getId(), DataStoreRole.Primary); + } + + public DataStore attachCluster(DataStore store) { + StoragePoolVO pool = this.dataStoreDao.findById(store.getId()); + + storageMgr.createCapacityEntry(pool.getId()); + + pool.setScope(ScopeType.CLUSTER); + pool.setStatus(StoragePoolStatus.Up); + this.dataStoreDao.update(pool.getId(), pool); + return dataStoreMgr.getDataStore(store.getId(), DataStoreRole.Primary); + } + + public DataStore attachZone(DataStore store) { + StoragePoolVO pool = this.dataStoreDao.findById(store.getId()); + pool.setScope(ScopeType.ZONE); + pool.setStatus(StoragePoolStatus.Up); + this.dataStoreDao.update(pool.getId(), pool); + return dataStoreMgr.getDataStore(store.getId(), DataStoreRole.Primary); + } + + public boolean maintain(DataStore store) { + StoragePoolVO pool = this.dataStoreDao.findById(store.getId()); + pool.setStatus(StoragePoolStatus.Maintenance); + this.dataStoreDao.update(pool.getId(), pool); + return true; + } + + public boolean cancelMaintain(DataStore store) { + StoragePoolVO pool = this.dataStoreDao.findById(store.getId()); + pool.setStatus(StoragePoolStatus.Up); + dataStoreDao.update(store.getId(), pool); + return true; + } + + + protected boolean deletePoolStats(Long poolId) { + CapacityVO capacity1 = _capacityDao.findByHostIdType(poolId, + CapacityVO.CAPACITY_TYPE_STORAGE); + CapacityVO capacity2 = _capacityDao.findByHostIdType(poolId, + CapacityVO.CAPACITY_TYPE_STORAGE_ALLOCATED); + if (capacity1 != null) { + _capacityDao.remove(capacity1.getId()); + } + + if (capacity2 != null) { + _capacityDao.remove(capacity2.getId()); + } + + return true; + } + + public boolean deletePrimaryDataStore(DataStore store) { + List hostPoolRecords = this.storagePoolHostDao + .listByPoolId(store.getId()); + StoragePoolVO poolVO = this.dataStoreDao.findById(store.getId()); + Transaction txn = Transaction.currentTxn(); + txn.start(); + for (StoragePoolHostVO host : hostPoolRecords) { + storagePoolHostDao.deleteStoragePoolHostDetails( + host.getHostId(), host.getPoolId()); + } + poolVO.setUuid(null); + this.dataStoreDao.update(poolVO.getId(), poolVO); + dataStoreDao.remove(poolVO.getId()); + deletePoolStats(poolVO.getId()); + // Delete op_host_capacity entries + this._capacityDao.removeBy(Capacity.CAPACITY_TYPE_STORAGE_ALLOCATED, + null, null, null, poolVO.getId()); + txn.commit(); + + s_logger.debug("Storage pool id=" + poolVO.getId() + + " is removed successfully"); + return true; + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/db/TemplatePrimaryDataStoreDao.java b/engine/storage/src/org/apache/cloudstack/storage/volume/db/TemplatePrimaryDataStoreDao.java new file mode 100644 index 000000000..63cdb16c5 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/volume/db/TemplatePrimaryDataStoreDao.java @@ -0,0 +1,29 @@ +/* + * 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 org.apache.cloudstack.storage.volume.db; + +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; + +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.fsm.StateDao; + +public interface TemplatePrimaryDataStoreDao extends GenericDao, StateDao { + public TemplatePrimaryDataStoreVO findByTemplateIdAndPoolId(long templateId, long poolId); + public TemplatePrimaryDataStoreVO findByTemplateIdAndPoolIdAndReady(long templateId, long poolId); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/db/TemplatePrimaryDataStoreDaoImpl.java b/engine/storage/src/org/apache/cloudstack/storage/volume/db/TemplatePrimaryDataStoreDaoImpl.java new file mode 100644 index 000000000..ad5615022 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/volume/db/TemplatePrimaryDataStoreDaoImpl.java @@ -0,0 +1,96 @@ +/* + * 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 org.apache.cloudstack.storage.volume.db; + +import java.util.Date; + +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.State; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchCriteria.Op; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.SearchCriteria2; +import com.cloud.utils.db.SearchCriteriaService; +import com.cloud.utils.db.UpdateBuilder; + +@Component +public class TemplatePrimaryDataStoreDaoImpl extends GenericDaoBase implements TemplatePrimaryDataStoreDao { + private static final Logger s_logger = Logger.getLogger(TemplatePrimaryDataStoreDaoImpl.class); + protected final SearchBuilder updateSearchBuilder; + public TemplatePrimaryDataStoreDaoImpl() { + updateSearchBuilder = createSearchBuilder(); + updateSearchBuilder.and("id", updateSearchBuilder.entity().getId(), Op.EQ); + updateSearchBuilder.and("state", updateSearchBuilder.entity().getState(), Op.EQ); + updateSearchBuilder.and("updatedCount", updateSearchBuilder.entity().getUpdatedCount(), Op.EQ); + updateSearchBuilder.done(); + } + @Override + public TemplatePrimaryDataStoreVO findByTemplateIdAndPoolId(long templateId, long poolId) { + SearchCriteriaService sc = SearchCriteria2.create(TemplatePrimaryDataStoreVO.class); + sc.addAnd(sc.getEntity().getTemplateId(), Op.EQ, templateId); + sc.addAnd(sc.getEntity().getPoolId(), Op.EQ, poolId); + return sc.find(); + } + + @Override + public TemplatePrimaryDataStoreVO findByTemplateIdAndPoolIdAndReady(long templateId, long poolId) { + SearchCriteriaService sc = SearchCriteria2.create(TemplatePrimaryDataStoreVO.class); + sc.addAnd(sc.getEntity().getTemplateId(), Op.EQ, templateId); + sc.addAnd(sc.getEntity().getPoolId(), Op.EQ, poolId); + sc.addAnd(sc.getEntity().getState(), Op.EQ, ObjectInDataStoreStateMachine.State.Ready); + return sc.find(); + } + + @Override + public boolean updateState(State currentState, Event event, State nextState, TemplatePrimaryDataStoreVO vo, Object data) { + Long oldUpdated = vo.getUpdatedCount(); + Date oldUpdatedTime = vo.getLastUpdated(); + + SearchCriteria sc = updateSearchBuilder.create(); + sc.setParameters("id", vo.getId()); + sc.setParameters("state", currentState); + sc.setParameters("updatedCount", vo.getUpdatedCount()); + + vo.incrUpdatedCount(); + + UpdateBuilder builder = getUpdateBuilder(vo); + builder.set(vo, "state", nextState); + builder.set(vo, "lastUpdated", new Date()); + + int rows = update((TemplatePrimaryDataStoreVO)vo, sc); + if (rows == 0 && s_logger.isDebugEnabled()) { + TemplatePrimaryDataStoreVO template = findByIdIncludingRemoved(vo.getId()); + if (template != null) { + StringBuilder str = new StringBuilder("Unable to update ").append(vo.toString()); + str.append(": DB Data={id=").append(template.getId()).append("; state=").append(template.getState()).append("; updatecount=").append(template.getUpdatedCount()).append(";updatedTime=").append(template.getLastUpdated()); + str.append(": New Data={id=").append(vo.getId()).append("; state=").append(nextState).append("; event=").append(event).append("; updatecount=").append(vo.getUpdatedCount()).append("; updatedTime=").append(vo.getLastUpdated()); + str.append(": stale Data={id=").append(vo.getId()).append("; state=").append(currentState).append("; event=").append(event).append("; updatecount=").append(oldUpdated).append("; updatedTime=").append(oldUpdatedTime); + } else { + s_logger.debug("Unable to update template: id=" + vo.getId() + ", as there is no such template exists in the database anymore"); + } + } + return rows > 0; + } + +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/db/TemplatePrimaryDataStoreVO.java b/engine/storage/src/org/apache/cloudstack/storage/volume/db/TemplatePrimaryDataStoreVO.java new file mode 100644 index 000000000..48a9f334a --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/volume/db/TemplatePrimaryDataStoreVO.java @@ -0,0 +1,255 @@ +/* + * 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 org.apache.cloudstack.storage.volume.db; + +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import com.cloud.storage.VMTemplateStorageResourceAssoc.Status; + +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; + +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.fsm.StateObject; + +@Entity +@Table(name = "template_spool_ref") +public class TemplatePrimaryDataStoreVO implements StateObject { + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + long id; + + @Column(name = "pool_id") + private long poolId; + + @Column(name = "template_id") + long templateId; + + @Column(name = GenericDaoBase.CREATED_COLUMN) + Date created = null; + + @Column(name = "last_updated") + @Temporal(value = TemporalType.TIMESTAMP) + Date lastUpdated = null; + + @Column(name = "download_pct") + int downloadPercent; + + @Column(name = "download_state") + @Enumerated(EnumType.STRING) + Status downloadState; + + @Column(name = "local_path") + String localDownloadPath; + + @Column(name = "error_str") + String errorString; + + @Column(name = "job_id") + String jobId; + + @Column(name = "install_path") + String installPath; + + @Column(name = "template_size") + long templateSize; + + @Column(name = "marked_for_gc") + boolean markedForGC; + + @Column(name = "state") + @Enumerated(EnumType.STRING) + ObjectInDataStoreStateMachine.State state; + + @Column(name="update_count", updatable = true, nullable=false) + protected long updatedCount; + + public long getUpdatedCount() { + return this.updatedCount; + } + + public void incrUpdatedCount() { + this.updatedCount++; + } + + public void decrUpdatedCount() { + this.updatedCount--; + } + + public String getInstallPath() { + return installPath; + } + + public long getTemplateSize() { + return templateSize; + } + + public long getPoolId() { + return poolId; + } + + public void setpoolId(long poolId) { + this.poolId = poolId; + } + + public long getTemplateId() { + return templateId; + } + + public void setTemplateId(long templateId) { + this.templateId = templateId; + } + + public int getDownloadPercent() { + return downloadPercent; + } + + public void setDownloadPercent(int downloadPercent) { + this.downloadPercent = downloadPercent; + } + + public void setDownloadState(Status downloadState) { + this.downloadState = downloadState; + } + + public long getId() { + return id; + } + + public Date getCreated() { + return created; + } + + public Date getLastUpdated() { + return lastUpdated; + } + + public void setLastUpdated(Date date) { + lastUpdated = date; + } + + public void setInstallPath(String installPath) { + this.installPath = installPath; + } + + public Status getDownloadState() { + return downloadState; + } + + public TemplatePrimaryDataStoreVO(long poolId, long templateId) { + super(); + this.poolId = poolId; + this.templateId = templateId; + this.downloadState = Status.NOT_DOWNLOADED; + this.state = ObjectInDataStoreStateMachine.State.Allocated; + this.markedForGC = false; + } + + public TemplatePrimaryDataStoreVO(long poolId, long templateId, Date lastUpdated, int downloadPercent, Status downloadState, String localDownloadPath, String errorString, String jobId, + String installPath, long templateSize) { + super(); + this.poolId = poolId; + this.templateId = templateId; + this.lastUpdated = lastUpdated; + this.downloadPercent = downloadPercent; + this.downloadState = downloadState; + this.localDownloadPath = localDownloadPath; + this.errorString = errorString; + this.jobId = jobId; + this.installPath = installPath; + this.templateSize = templateSize; + } + + protected TemplatePrimaryDataStoreVO() { + + } + + public void setLocalDownloadPath(String localPath) { + this.localDownloadPath = localPath; + } + + public String getLocalDownloadPath() { + return localDownloadPath; + } + + public void setErrorString(String errorString) { + this.errorString = errorString; + } + + public String getErrorString() { + return errorString; + } + + public void setJobId(String jobId) { + this.jobId = jobId; + } + + public String getJobId() { + return jobId; + } + + public void setTemplateSize(long templateSize) { + this.templateSize = templateSize; + } + + public boolean getMarkedForGC() { + return markedForGC; + } + + public void setMarkedForGC(boolean markedForGC) { + this.markedForGC = markedForGC; + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof TemplatePrimaryDataStoreVO) { + TemplatePrimaryDataStoreVO other = (TemplatePrimaryDataStoreVO) obj; + return (this.templateId == other.getTemplateId() && this.poolId == other.getPoolId()); + } + return false; + } + + @Override + public int hashCode() { + Long tid = new Long(templateId); + Long hid = new Long(poolId); + return tid.hashCode() + hid.hashCode(); + } + + @Override + public String toString() { + return new StringBuilder("TmplPool[").append(id).append("-").append(templateId).append("-").append("poolId").append("-").append(installPath).append("]").toString(); + } + + @Override + public ObjectInDataStoreStateMachine.State getState() { + return this.state; + } + +} \ No newline at end of file diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/db/VolumeDao2.java b/engine/storage/src/org/apache/cloudstack/storage/volume/db/VolumeDao2.java new file mode 100644 index 000000000..b0c8fad3b --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/volume/db/VolumeDao2.java @@ -0,0 +1,82 @@ +// 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 org.apache.cloudstack.storage.volume.db; + +import java.util.List; + +import org.apache.cloudstack.engine.subsystem.api.storage.type.VolumeType; +import org.apache.cloudstack.storage.volume.VolumeEvent; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.storage.Storage.ImageFormat; +import com.cloud.storage.Volume; +import com.cloud.utils.Pair; +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.fsm.StateDao; + +public interface VolumeDao2 extends GenericDao, StateDao { + + List findDetachedByAccount(long accountId); + + List findByAccount(long accountId); + + Pair getCountAndTotalByPool(long poolId); + + Pair getNonDestroyedCountAndTotalByPool(long poolId); + + List findByInstance(long id); + + List findByInstanceAndType(long id, VolumeType vType); + + List findByInstanceIdDestroyed(long vmId); + + List findByAccountAndPod(long accountId, long podId); + + List findByTemplateAndZone(long templateId, long zoneId); + + void deleteVolumesByInstance(long instanceId); + + void attachVolume(long volumeId, long vmId, long deviceId); + + void detachVolume(long volumeId); + + boolean isAnyVolumeActivelyUsingTemplateOnPool(long templateId, long poolId); + + List findCreatedByInstance(long id); + + List findByPoolId(long poolId); + + List findByInstanceAndDeviceId(long instanceId, long deviceId); + + List findUsableVolumesForInstance(long instanceId); + + Long countAllocatedVolumesForAccount(long accountId); + + HypervisorType getHypervisorType(long volumeId); + + List listVolumesToBeDestroyed(); + + ImageFormat getImageFormat(Long volumeId); + + List findReadyRootVolumesByInstance(long instanceId); + + List listPoolIdsByVolumeCount(long dcId, Long podId, Long clusterId, long accountId); + + VolumeVO allocVolume(long size, VolumeType type, String volName, Long templateId); + + VolumeVO findByVolumeIdAndPoolId(long volumeId, long poolId); +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/db/VolumeDao2Impl.java b/engine/storage/src/org/apache/cloudstack/storage/volume/db/VolumeDao2Impl.java new file mode 100644 index 000000000..d8497e2f3 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/volume/db/VolumeDao2Impl.java @@ -0,0 +1,440 @@ +// 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 org.apache.cloudstack.storage.volume.db; + +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.ejb.Local; +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.type.RootDisk; +import org.apache.cloudstack.engine.subsystem.api.storage.type.VolumeType; +import org.apache.cloudstack.storage.volume.VolumeEvent; + +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.server.ResourceTag.TaggedResourceType; +import com.cloud.storage.Storage.ImageFormat; +import com.cloud.storage.Volume; +import com.cloud.tags.dao.ResourceTagDao; +import com.cloud.tags.dao.ResourceTagsDaoImpl; +import com.cloud.utils.Pair; + +import com.cloud.utils.db.DB; +import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.GenericSearchBuilder; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; +import com.cloud.utils.db.SearchCriteria.Func; +import com.cloud.utils.db.SearchCriteria.Op; +import com.cloud.utils.db.SearchCriteria2; +import com.cloud.utils.db.SearchCriteriaService; +import com.cloud.utils.db.Transaction; +import com.cloud.utils.db.UpdateBuilder; +import com.cloud.utils.exception.CloudRuntimeException; + +@Local(value = VolumeDao2.class) +@Component +public class VolumeDao2Impl extends GenericDaoBase implements VolumeDao2 { + private static final Logger s_logger = Logger.getLogger(VolumeDao2Impl.class); + protected final SearchBuilder DetachedAccountIdSearch; + protected final SearchBuilder TemplateZoneSearch; + protected final GenericSearchBuilder TotalSizeByPoolSearch; + protected final GenericSearchBuilder ActiveTemplateSearch; + protected final SearchBuilder InstanceStatesSearch; + protected final SearchBuilder AllFieldsSearch; + protected GenericSearchBuilder CountByAccount; + @Inject ResourceTagDao _tagsDao = null; + protected static final String SELECT_VM_SQL = "SELECT DISTINCT instance_id from volumes v where v.host_id = ? and v.mirror_state = ?"; + protected static final String SELECT_HYPERTYPE_FROM_VOLUME = "SELECT c.hypervisor_type from volumes v, storage_pool s, cluster c where v.pool_id = s.id and s.cluster_id = c.id and v.id = ?"; + + private static final String ORDER_POOLS_NUMBER_OF_VOLUMES_FOR_ACCOUNT = "SELECT pool.id, SUM(IF(vol.state='Ready' AND vol.account_id = ?, 1, 0)) FROM `cloud`.`storage_pool` pool LEFT JOIN `cloud`.`volumes` vol ON pool.id = vol.pool_id WHERE pool.data_center_id = ? " + + " AND pool.pod_id = ? AND pool.cluster_id = ? " + " GROUP BY pool.id ORDER BY 2 ASC "; + + @Override + public List findDetachedByAccount(long accountId) { + SearchCriteria sc = DetachedAccountIdSearch.create(); + sc.setParameters("accountId", accountId); + sc.setParameters("destroyed", Volume.State.Destroy); + return listBy(sc); + } + + @Override + public List findByAccount(long accountId) { + SearchCriteria sc = AllFieldsSearch.create(); + sc.setParameters("accountId", accountId); + sc.setParameters("state", Volume.State.Ready); + return listBy(sc); + } + + @Override + public List findByInstance(long id) { + SearchCriteria sc = AllFieldsSearch.create(); + sc.setParameters("instanceId", id); + return listBy(sc); + } + + @Override + public List findByInstanceAndDeviceId(long instanceId, long deviceId) { + SearchCriteria sc = AllFieldsSearch.create(); + sc.setParameters("instanceId", instanceId); + sc.setParameters("deviceId", deviceId); + return listBy(sc); + } + + @Override + public List findByPoolId(long poolId) { + SearchCriteria sc = AllFieldsSearch.create(); + sc.setParameters("poolId", poolId); + sc.setParameters("notDestroyed", Volume.State.Destroy); + sc.setParameters("vType", new RootDisk().toString()); + return listBy(sc); + } + + @Override + public List findCreatedByInstance(long id) { + SearchCriteria sc = AllFieldsSearch.create(); + sc.setParameters("instanceId", id); + sc.setParameters("state", Volume.State.Ready); + return listBy(sc); + } + + @Override + public List findUsableVolumesForInstance(long instanceId) { + SearchCriteria sc = InstanceStatesSearch.create(); + sc.setParameters("instance", instanceId); + sc.setParameters("states", Volume.State.Creating, Volume.State.Ready, Volume.State.Allocated); + + return listBy(sc); + } + + @Override + public List findByInstanceAndType(long id, VolumeType vType) { + SearchCriteria sc = AllFieldsSearch.create(); + sc.setParameters("instanceId", id); + sc.setParameters("vType", vType.toString()); + return listBy(sc); + } + + @Override + public List findByInstanceIdDestroyed(long vmId) { + SearchCriteria sc = AllFieldsSearch.create(); + sc.setParameters("instanceId", vmId); + sc.setParameters("destroyed", Volume.State.Destroy); + return listBy(sc); + } + + @Override + public List findReadyRootVolumesByInstance(long instanceId) { + SearchCriteria sc = AllFieldsSearch.create(); + sc.setParameters("instanceId", instanceId); + sc.setParameters("state", Volume.State.Ready); + sc.setParameters("vType", new RootDisk().toString()); + return listBy(sc); + } + + @Override + public List findByAccountAndPod(long accountId, long podId) { + SearchCriteria sc = AllFieldsSearch.create(); + sc.setParameters("accountId", accountId); + sc.setParameters("pod", podId); + sc.setParameters("state", Volume.State.Ready); + + return listIncludingRemovedBy(sc); + } + + @Override + public List findByTemplateAndZone(long templateId, long zoneId) { + SearchCriteria sc = TemplateZoneSearch.create(); + sc.setParameters("template", templateId); + sc.setParameters("zone", zoneId); + + return listIncludingRemovedBy(sc); + } + + @Override + public boolean isAnyVolumeActivelyUsingTemplateOnPool(long templateId, long poolId) { + SearchCriteria sc = ActiveTemplateSearch.create(); + sc.setParameters("template", templateId); + sc.setParameters("pool", poolId); + + List results = customSearchIncludingRemoved(sc, null); + assert results.size() > 0 : "How can this return a size of " + results.size(); + + return results.get(0) > 0; + } + + @Override + public void deleteVolumesByInstance(long instanceId) { + SearchCriteria sc = AllFieldsSearch.create(); + sc.setParameters("instanceId", instanceId); + expunge(sc); + } + + @Override + public void attachVolume(long volumeId, long vmId, long deviceId) { + VolumeVO volume = createForUpdate(volumeId); + volume.setInstanceId(vmId); + volume.setDeviceId(deviceId); + volume.setUpdated(new Date()); + volume.setAttached(new Date()); + update(volumeId, volume); + } + + @Override + public void detachVolume(long volumeId) { + VolumeVO volume = createForUpdate(volumeId); + volume.setInstanceId(null); + volume.setDeviceId(null); + volume.setUpdated(new Date()); + volume.setAttached(null); + update(volumeId, volume); + } + + @Override + @DB + public HypervisorType getHypervisorType(long volumeId) { + /* lookup from cluster of pool */ + Transaction txn = Transaction.currentTxn(); + PreparedStatement pstmt = null; + + try { + String sql = SELECT_HYPERTYPE_FROM_VOLUME; + pstmt = txn.prepareAutoCloseStatement(sql); + pstmt.setLong(1, volumeId); + ResultSet rs = pstmt.executeQuery(); + if (rs.next()) { + return HypervisorType.getType(rs.getString(1)); + } + return HypervisorType.None; + } catch (SQLException e) { + throw new CloudRuntimeException("DB Exception on: " + SELECT_HYPERTYPE_FROM_VOLUME, e); + } catch (Throwable e) { + throw new CloudRuntimeException("Caught: " + SELECT_HYPERTYPE_FROM_VOLUME, e); + } + } + + @Override + public ImageFormat getImageFormat(Long volumeId) { + HypervisorType type = getHypervisorType(volumeId); + if (type.equals(HypervisorType.KVM)) { + return ImageFormat.QCOW2; + } else if (type.equals(HypervisorType.XenServer)) { + return ImageFormat.VHD; + } else if (type.equals(HypervisorType.VMware)) { + return ImageFormat.OVA; + } else { + s_logger.warn("Do not support hypervisor " + type.toString()); + return null; + } + } + + protected VolumeDao2Impl() { + AllFieldsSearch = createSearchBuilder(); + AllFieldsSearch.and("state", AllFieldsSearch.entity().getState(), Op.EQ); + AllFieldsSearch.and("accountId", AllFieldsSearch.entity().getAccountId(), Op.EQ); + AllFieldsSearch.and("pod", AllFieldsSearch.entity().getPodId(), Op.EQ); + AllFieldsSearch.and("instanceId", AllFieldsSearch.entity().getInstanceId(), Op.EQ); + AllFieldsSearch.and("deviceId", AllFieldsSearch.entity().getDeviceId(), Op.EQ); + AllFieldsSearch.and("poolId", AllFieldsSearch.entity().getPoolId(), Op.EQ); + AllFieldsSearch.and("vType", AllFieldsSearch.entity().getVolumeType(), Op.EQ); + AllFieldsSearch.and("id", AllFieldsSearch.entity().getId(), Op.EQ); + AllFieldsSearch.and("destroyed", AllFieldsSearch.entity().getState(), Op.EQ); + AllFieldsSearch.and("notDestroyed", AllFieldsSearch.entity().getState(), Op.NEQ); + AllFieldsSearch.and("updatedCount", AllFieldsSearch.entity().getUpdatedCount(), Op.EQ); + AllFieldsSearch.done(); + + DetachedAccountIdSearch = createSearchBuilder(); + DetachedAccountIdSearch.and("accountId", DetachedAccountIdSearch.entity().getAccountId(), Op.EQ); + DetachedAccountIdSearch.and("destroyed", DetachedAccountIdSearch.entity().getState(), Op.NEQ); + DetachedAccountIdSearch.and("instanceId", DetachedAccountIdSearch.entity().getInstanceId(), Op.NULL); + DetachedAccountIdSearch.done(); + + TemplateZoneSearch = createSearchBuilder(); + TemplateZoneSearch.and("template", TemplateZoneSearch.entity().getTemplateId(), Op.EQ); + TemplateZoneSearch.and("zone", TemplateZoneSearch.entity().getDataCenterId(), Op.EQ); + TemplateZoneSearch.done(); + + TotalSizeByPoolSearch = createSearchBuilder(SumCount.class); + TotalSizeByPoolSearch.select("sum", Func.SUM, TotalSizeByPoolSearch.entity().getSize()); + TotalSizeByPoolSearch.select("count", Func.COUNT, (Object[]) null); + TotalSizeByPoolSearch.and("poolId", TotalSizeByPoolSearch.entity().getPoolId(), Op.EQ); + TotalSizeByPoolSearch.and("removed", TotalSizeByPoolSearch.entity().getRemoved(), Op.NULL); + TotalSizeByPoolSearch.and("state", TotalSizeByPoolSearch.entity().getState(), Op.NEQ); + TotalSizeByPoolSearch.done(); + + ActiveTemplateSearch = createSearchBuilder(Long.class); + ActiveTemplateSearch.and("pool", ActiveTemplateSearch.entity().getPoolId(), Op.EQ); + ActiveTemplateSearch.and("template", ActiveTemplateSearch.entity().getTemplateId(), Op.EQ); + ActiveTemplateSearch.and("removed", ActiveTemplateSearch.entity().getRemoved(), Op.NULL); + ActiveTemplateSearch.select(null, Func.COUNT, null); + ActiveTemplateSearch.done(); + + InstanceStatesSearch = createSearchBuilder(); + InstanceStatesSearch.and("instance", InstanceStatesSearch.entity().getInstanceId(), Op.EQ); + InstanceStatesSearch.and("states", InstanceStatesSearch.entity().getState(), Op.IN); + InstanceStatesSearch.done(); + + CountByAccount = createSearchBuilder(Long.class); + CountByAccount.select(null, Func.COUNT, null); + CountByAccount.and("account", CountByAccount.entity().getAccountId(), SearchCriteria.Op.EQ); + CountByAccount.and("state", CountByAccount.entity().getState(), SearchCriteria.Op.NIN); + CountByAccount.done(); + } + + @Override + @DB(txn = false) + public Pair getCountAndTotalByPool(long poolId) { + SearchCriteria sc = TotalSizeByPoolSearch.create(); + sc.setParameters("poolId", poolId); + List results = customSearch(sc, null); + SumCount sumCount = results.get(0); + return new Pair(sumCount.count, sumCount.sum); + } + + @Override + public Long countAllocatedVolumesForAccount(long accountId) { + SearchCriteria sc = CountByAccount.create(); + sc.setParameters("account", accountId); + sc.setParameters("state", Volume.State.Destroy); + return customSearch(sc, null).get(0); + } + + public static class SumCount { + public long sum; + public long count; + + public SumCount() { + } + } + + @Override + public List listVolumesToBeDestroyed() { + SearchCriteria sc = AllFieldsSearch.create(); + sc.setParameters("state", Volume.State.Destroy); + + return listBy(sc); + } + + @Override + public boolean updateState(Volume.State currentState, Volume.Event event, Volume.State nextState, VolumeVO vo, Object data) { + + Long oldUpdated = vo.getUpdatedCount(); + Date oldUpdatedTime = vo.getUpdated(); + + SearchCriteria sc = AllFieldsSearch.create(); + sc.setParameters("id", vo.getId()); + sc.setParameters("state", currentState); + sc.setParameters("updatedCount", vo.getUpdatedCount()); + + vo.incrUpdatedCount(); + + UpdateBuilder builder = getUpdateBuilder(vo); + builder.set(vo, "state", nextState); + builder.set(vo, "updated", new Date()); + + int rows = update((VolumeVO) vo, sc); + if (rows == 0 && s_logger.isDebugEnabled()) { + VolumeVO dbVol = findByIdIncludingRemoved(vo.getId()); + if (dbVol != null) { + StringBuilder str = new StringBuilder("Unable to update ").append(vo.toString()); + str.append(": DB Data={id=").append(dbVol.getId()).append("; state=").append(dbVol.getState()).append("; updatecount=").append(dbVol.getUpdatedCount()).append(";updatedTime=") + .append(dbVol.getUpdated()); + str.append(": New Data={id=").append(vo.getId()).append("; state=").append(nextState).append("; event=").append(event).append("; updatecount=").append(vo.getUpdatedCount()) + .append("; updatedTime=").append(vo.getUpdated()); + str.append(": stale Data={id=").append(vo.getId()).append("; state=").append(currentState).append("; event=").append(event).append("; updatecount=").append(oldUpdated) + .append("; updatedTime=").append(oldUpdatedTime); + } else { + s_logger.debug("Unable to update volume: id=" + vo.getId() + ", as there is no such volume exists in the database anymore"); + } + } + return rows > 0; + } + + @Override + public List listPoolIdsByVolumeCount(long dcId, Long podId, Long clusterId, long accountId) { + Transaction txn = Transaction.currentTxn(); + PreparedStatement pstmt = null; + List result = new ArrayList(); + try { + String sql = ORDER_POOLS_NUMBER_OF_VOLUMES_FOR_ACCOUNT; + pstmt = txn.prepareAutoCloseStatement(sql); + pstmt.setLong(1, accountId); + pstmt.setLong(2, dcId); + pstmt.setLong(3, podId); + pstmt.setLong(4, clusterId); + + ResultSet rs = pstmt.executeQuery(); + while (rs.next()) { + result.add(rs.getLong(1)); + } + return result; + } catch (SQLException e) { + throw new CloudRuntimeException("DB Exception on: " + ORDER_POOLS_NUMBER_OF_VOLUMES_FOR_ACCOUNT, e); + } catch (Throwable e) { + throw new CloudRuntimeException("Caught: " + ORDER_POOLS_NUMBER_OF_VOLUMES_FOR_ACCOUNT, e); + } + } + + @Override + @DB(txn = false) + public Pair getNonDestroyedCountAndTotalByPool(long poolId) { + SearchCriteria sc = TotalSizeByPoolSearch.create(); + sc.setParameters("poolId", poolId); + sc.setParameters("state", Volume.State.Destroy); + List results = customSearch(sc, null); + SumCount sumCount = results.get(0); + return new Pair(sumCount.count, sumCount.sum); + } + + @Override + @DB + public boolean remove(Long id) { + Transaction txn = Transaction.currentTxn(); + txn.start(); + VolumeVO entry = findById(id); + if (entry != null) { + _tagsDao.removeByIdAndType(id, TaggedResourceType.Volume); + } + boolean result = super.remove(id); + txn.commit(); + return result; + } + + @Override + @DB + public VolumeVO allocVolume(long size, VolumeType type, String volName, Long templateId) { + VolumeVO vol = new VolumeVO(size, type.toString(), volName, templateId); + vol = this.persist(vol); + return vol; + } + + @Override + public VolumeVO findByVolumeIdAndPoolId(long volumeId, long poolId) { + SearchCriteriaService sc = SearchCriteria2.create(VolumeVO.class); + sc.addAnd(sc.getEntity().getId(), Op.EQ, volumeId); + sc.addAnd(sc.getEntity().getPoolId(), Op.EQ, poolId); + return sc.find(); + } +} diff --git a/engine/storage/src/org/apache/cloudstack/storage/volume/db/VolumeVO.java b/engine/storage/src/org/apache/cloudstack/storage/volume/db/VolumeVO.java new file mode 100644 index 000000000..da8234e35 --- /dev/null +++ b/engine/storage/src/org/apache/cloudstack/storage/volume/db/VolumeVO.java @@ -0,0 +1,416 @@ +//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 org.apache.cloudstack.storage.volume.db; + +import java.util.Date; +import java.util.UUID; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; +import javax.persistence.Id; +import javax.persistence.Table; +import javax.persistence.TableGenerator; +import javax.persistence.Temporal; +import javax.persistence.TemporalType; + +import org.apache.cloudstack.api.Identity; +import org.apache.cloudstack.engine.subsystem.api.storage.disktype.DiskFormat; + +import com.cloud.storage.Storage.StoragePoolType; +import com.cloud.storage.Volume; +import com.cloud.utils.NumbersUtil; +import com.cloud.utils.db.GenericDao; +import com.cloud.utils.fsm.StateObject; + +@Entity +@Table(name = "volumes") +public class VolumeVO implements Identity, StateObject { + @Id + @TableGenerator(name = "volume_sq", table = "sequence", pkColumnName = "name", valueColumnName = "value", pkColumnValue = "volume_seq", allocationSize = 1) + @GeneratedValue(strategy = GenerationType.TABLE) + @Column(name = "id") + long id; + + @Column(name = "name") + String name; + + @Column(name = "pool_id") + Long poolId; + + @Column(name = "last_pool_id") + Long lastPoolId; + + @Column(name = "account_id") + long accountId; + + @Column(name = "domain_id") + long domainId; + + @Column(name = "instance_id") + Long instanceId = null; + + @Column(name = "device_id") + Long deviceId = null; + + @Column(name = "size") + long size; + + @Column(name = "folder") + String folder; + + @Column(name = "path") + String path; + + @Column(name = "pod_id") + Long podId; + + @Column(name = "created") + Date created; + + @Column(name = "attached") + @Temporal(value = TemporalType.TIMESTAMP) + Date attached; + + @Column(name = "data_center_id") + long dataCenterId; + + @Column(name = "host_ip") + String hostip; + + @Column(name = "disk_offering_id") + long diskOfferingId; + + @Column(name = "template_id") + Long templateId; + + @Column(name = "first_snapshot_backup_uuid") + String firstSnapshotBackupUuid; + + @Column(name = "volume_type") + String volumeType = "UNKNOWN"; + + @Column(name = "pool_type") + @Enumerated(EnumType.STRING) + StoragePoolType poolType; + + @Column(name = "disk_type") + DiskFormat diskType; + + @Column(name = GenericDao.REMOVED_COLUMN) + Date removed; + + @Column(name = "updated") + @Temporal(value = TemporalType.TIMESTAMP) + Date updated; + + @Column(name = "update_count", updatable = true, nullable = false) + protected long updatedCount; // This field should be updated everytime the + // state is updated. There's no set method in + // the vo object because it is done with in the + // dao code. + + @Column(name = "recreatable") + boolean recreatable; + + @Column(name = "state") + @Enumerated(value = EnumType.STRING) + private Volume.State state; + + @Column(name = "chain_info") + String chainInfo; + + @Column(name = "uuid") + String uuid; + + // Real Constructor + public VolumeVO(long size, String type, String name, Long templateId) { + this.volumeType = type; + this.size = size; + this.name = name; + this.templateId = templateId; + this.uuid = UUID.randomUUID().toString(); + this.state = Volume.State.Allocated; + } + + // Copy Constructor + public VolumeVO(VolumeVO that) { + this(that.getSize(), that.getVolumeType(), that.getName(), that.getTemplateId()); + this.recreatable = that.isRecreatable(); + this.state = that.getState(); + this.size = that.getSize(); + this.diskOfferingId = that.getDiskOfferingId(); + this.poolId = that.getPoolId(); + this.attached = that.getAttached(); + this.chainInfo = that.getChainInfo(); + this.templateId = that.getTemplateId(); + this.deviceId = that.getDeviceId(); + this.uuid = UUID.randomUUID().toString(); + } + + public long getUpdatedCount() { + return this.updatedCount; + } + + public void incrUpdatedCount() { + this.updatedCount++; + } + + public void decrUpdatedCount() { + this.updatedCount--; + } + + public boolean isRecreatable() { + return recreatable; + } + + public void setRecreatable(boolean recreatable) { + this.recreatable = recreatable; + } + + public long getId() { + return id; + } + + public Long getPodId() { + return podId; + } + + public long getDataCenterId() { + return dataCenterId; + } + + public String getName() { + return name; + } + + public long getAccountId() { + return accountId; + } + + public void setPoolType(StoragePoolType poolType) { + this.poolType = poolType; + } + + public StoragePoolType getPoolType() { + return poolType; + } + + public long getDomainId() { + return domainId; + } + + public String getFolder() { + return folder; + } + + public String getPath() { + return path; + } + + protected VolumeVO() { + } + + public long getSize() { + return size; + } + + public void setSize(long size) { + this.size = size; + } + + public Long getInstanceId() { + return instanceId; + } + + public Long getDeviceId() { + return deviceId; + } + + public void setDeviceId(Long deviceId) { + this.deviceId = deviceId; + } + + public String getVolumeType() { + return volumeType; + } + + public void setName(String name) { + this.name = name; + } + + public void setFolder(String folder) { + this.folder = folder; + } + + public void setAccountId(long accountId) { + this.accountId = accountId; + } + + public void setDomainId(long domainId) { + this.domainId = domainId; + } + + public void setInstanceId(Long instanceId) { + this.instanceId = instanceId; + } + + public void setPath(String path) { + this.path = path; + } + + public String getHostIp() { + return hostip; + } + + public void setHostIp(String hostip) { + this.hostip = hostip; + } + + public void setPodId(Long podId) { + this.podId = podId; + } + + public void setDataCenterId(long dataCenterId) { + this.dataCenterId = dataCenterId; + } + + public void setVolumeType(String type) { + volumeType = type; + } + + public Date getCreated() { + return created; + } + + public Date getRemoved() { + return removed; + } + + public void setRemoved(Date removed) { + this.removed = removed; + } + + public long getDiskOfferingId() { + return diskOfferingId; + } + + public void setDiskOfferingId(long diskOfferingId) { + this.diskOfferingId = diskOfferingId; + } + + public Long getTemplateId() { + return templateId; + } + + public void setTemplateId(Long templateId) { + this.templateId = templateId; + } + + public String getFirstSnapshotBackupUuid() { + return firstSnapshotBackupUuid; + } + + public void setFirstSnapshotBackupUuid(String firstSnapshotBackupUuid) { + this.firstSnapshotBackupUuid = firstSnapshotBackupUuid; + } + + public Long getPoolId() { + return poolId; + } + + public void setPoolId(Long poolId) { + this.poolId = poolId; + } + + public Date getUpdated() { + return updated; + } + + @Override + public Volume.State getState() { + return state; + } + + public void setUpdated(Date updated) { + this.updated = updated; + } + + @Override + public String toString() { + return new StringBuilder("Vol[").append(id).append("|vm=").append(instanceId).append("|").append(volumeType).append("]").toString(); + } + + public Date getAttached() { + return this.attached; + } + + public void setAttached(Date attached) { + this.attached = attached; + } + + public String getChainInfo() { + return this.chainInfo; + } + + public void setChainInfo(String chainInfo) { + this.chainInfo = chainInfo; + } + + public Long getLastPoolId() { + return this.lastPoolId; + } + + public void setLastPoolId(Long poolId) { + this.lastPoolId = poolId; + } + + @Override + public int hashCode() { + return NumbersUtil.hash(id); + } + + @Override + public boolean equals(Object obj) { + if (obj instanceof VolumeVO) { + return id == ((VolumeVO) obj).id; + } else { + return false; + } + } + + @Override + public String getUuid() { + return this.uuid; + } + + public void setUuid(String uuid) { + this.uuid = uuid; + } + + public DiskFormat getDiskType() { + return diskType; + } + + public void setDiskType(DiskFormat type) { + diskType = type; + } +} diff --git a/engine/storage/storage.ucls b/engine/storage/storage.ucls new file mode 100644 index 000000000..23a7b21fe --- /dev/null +++ b/engine/storage/storage.ucls @@ -0,0 +1,365 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/engine/storage/volume/pom.xml b/engine/storage/volume/pom.xml new file mode 100644 index 000000000..19357ab11 --- /dev/null +++ b/engine/storage/volume/pom.xml @@ -0,0 +1,66 @@ + + + 4.0.0 + cloud-engine-storage-volume + Apache CloudStack Engine Storage Volume Component + + org.apache.cloudstack + cloud-engine + 4.2.0-SNAPSHOT + ../../pom.xml + + + + org.apache.cloudstack + cloud-engine-storage + ${project.version} + + + mysql + mysql-connector-java + ${cs.mysql.version} + provided + + + org.mockito + mockito-all + 1.9.5 + + + javax.inject + javax.inject + 1 + + + + install + src + test + + + maven-surefire-plugin + + true + + + + integration-test + + test + + + + + + + diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/DefaultPrimaryDataStore.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/DefaultPrimaryDataStore.java new file mode 100644 index 000000000..31e6908e2 --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/DefaultPrimaryDataStore.java @@ -0,0 +1,343 @@ +// 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 org.apache.cloudstack.storage.datastore; + +import java.io.File; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreDriver; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.HostScope; +import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle; +import org.apache.cloudstack.engine.subsystem.api.storage.Scope; +import org.apache.cloudstack.engine.subsystem.api.storage.ScopeType; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope; +import org.apache.cloudstack.engine.subsystem.api.storage.disktype.DiskFormat; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.apache.cloudstack.storage.volume.VolumeObject; +import org.apache.log4j.Logger; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.storage.Storage.StoragePoolType; +import com.cloud.storage.StoragePoolHostVO; +import com.cloud.storage.StoragePoolStatus; +import com.cloud.storage.VMTemplateStoragePoolVO; +import com.cloud.storage.VolumeVO; +import com.cloud.storage.dao.StoragePoolHostDao; +import com.cloud.storage.dao.VMTemplatePoolDao; +import com.cloud.storage.dao.VolumeDao; +import com.cloud.utils.component.ComponentContext; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.storage.encoding.EncodingType; + +public class DefaultPrimaryDataStore implements PrimaryDataStore { + private static final Logger s_logger = Logger + .getLogger(DefaultPrimaryDataStore.class); + protected PrimaryDataStoreDriver driver; + protected StoragePoolVO pdsv; + @Inject + protected PrimaryDataStoreDao dataStoreDao; + protected PrimaryDataStoreLifeCycle lifeCycle; + @Inject + private ObjectInDataStoreManager objectInStoreMgr; + @Inject + ImageDataFactory imageDataFactory; + @Inject + SnapshotDataFactory snapshotFactory; + protected DataStoreProvider provider; + @Inject + VMTemplatePoolDao templatePoolDao; + @Inject + StoragePoolHostDao poolHostDao; + + private VolumeDao volumeDao; + + public DefaultPrimaryDataStore() { + + } + + public void configure(StoragePoolVO pdsv, + PrimaryDataStoreDriver driver, DataStoreProvider provider) { + this.pdsv = pdsv; + this.driver = driver; + this.provider = provider; + } + + public static DefaultPrimaryDataStore createDataStore( + StoragePoolVO pdsv, PrimaryDataStoreDriver driver, + DataStoreProvider provider) { + DefaultPrimaryDataStore dataStore = (DefaultPrimaryDataStore)ComponentContext.inject(DefaultPrimaryDataStore.class); + dataStore.configure(pdsv, driver, provider); + return dataStore; + } + + @Override + public VolumeInfo getVolume(long id) { + VolumeVO volumeVO = volumeDao.findById(id); + VolumeObject vol = VolumeObject.getVolumeObject(this, volumeVO); + return vol; + } + + @Override + public List getVolumes() { + List volumes = volumeDao.findByPoolId(this.getId()); + List volumeInfos = new ArrayList(); + for (VolumeVO volume : volumes) { + volumeInfos.add(VolumeObject.getVolumeObject(this, volume)); + } + return volumeInfos; + } + + @Override + public DataStoreDriver getDriver() { + return this.driver; + } + + @Override + public DataStoreRole getRole() { + return DataStoreRole.Primary; + } + + @Override + public long getId() { + return this.pdsv.getId(); + } + + @Override + public String getUri() { + String path = this.pdsv.getPath(); + path.replaceFirst("/*", ""); + StringBuilder builder = new StringBuilder(); + builder.append(this.pdsv.getPoolType()); + builder.append("://"); + builder.append(this.pdsv.getHostAddress()); + builder.append(File.separator); + builder.append(this.pdsv.getPath()); + builder.append(File.separator); + builder.append("?" + EncodingType.ROLE + "=" + this.getRole()); + builder.append("&" + EncodingType.STOREUUID + "=" + this.pdsv.getUuid()); + return builder.toString(); + } + + @Override + public Scope getScope() { + StoragePoolVO vo = dataStoreDao.findById(this.pdsv.getId()); + if (vo.getScope() == ScopeType.CLUSTER) { + return new ClusterScope(vo.getClusterId(), vo.getPodId(), + vo.getDataCenterId()); + } else if (vo.getScope() == ScopeType.ZONE) { + return new ZoneScope(vo.getDataCenterId()); + } else if (vo.getScope() == ScopeType.HOST) { + List poolHosts = poolHostDao.listByPoolId(vo.getId()); + if (poolHosts.size() > 0) { + return new HostScope(poolHosts.get(0).getHostId()); + } + s_logger.debug("can't find a local storage in pool host table: " + vo.getId()); + } + return null; + } + + @Override + public boolean isHypervisorSupported(HypervisorType hypervisor) { + // TODO Auto-generated method stub + return true; + } + + @Override + public boolean isLocalStorageSupported() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isVolumeDiskTypeSupported(DiskFormat diskType) { + // TODO Auto-generated method stub + return false; + } + + + @Override + public String getUuid() { + return this.pdsv.getUuid(); + } + + @Override + public String getName() { + // TODO Auto-generated method stub + return null; + } + + @Override + public PrimaryDataStoreLifeCycle getLifeCycle() { + return this.lifeCycle; + } + + @Override + public boolean exists(DataObject data) { + return (objectInStoreMgr.findObject(data, data.getDataStore()) != null) ? true : false; + } + + @Override + public TemplateInfo getTemplate(long templateId) { + VMTemplateStoragePoolVO template = templatePoolDao.findByPoolTemplate(this.getId(), templateId); + if (template == null || template.getState() != ObjectInDataStoreStateMachine.State.Ready) { + return null; + } + return imageDataFactory.getTemplate(templateId, this); + } + + @Override + public SnapshotInfo getSnapshot(long snapshotId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public DiskFormat getDefaultDiskType() { + // TODO Auto-generated method stub + return null; + } + + @Override + public DataObject create(DataObject obj) { + //create template on primary storage + if (obj.getType() == DataObjectType.TEMPLATE) { + VMTemplateStoragePoolVO templateStoragePoolRef = templatePoolDao.findByPoolTemplate(this.getId(), obj.getId()); + if (templateStoragePoolRef == null) { + try { + templateStoragePoolRef = new VMTemplateStoragePoolVO(this.getId(), obj.getId()); + templateStoragePoolRef = templatePoolDao.persist(templateStoragePoolRef); + } catch (Throwable t) { + templateStoragePoolRef = templatePoolDao.findByPoolTemplate(this.getId(), obj.getId()); + if (templateStoragePoolRef == null) { + throw new CloudRuntimeException("Failed to create template storage pool entry"); + } + } + } + + } + + return objectInStoreMgr.get(obj, this); + } + + @Override + public boolean delete(DataObject obj) { + // TODO Auto-generated method stub + return false; + } + + @Override + public long getDataCenterId() { + return this.pdsv.getDataCenterId(); + } + + @Override + public String getPath() { + return this.pdsv.getPath(); + } + + @Override + public StoragePoolType getPoolType() { + return this.pdsv.getPoolType(); + } + + @Override + public Date getCreated() { + return this.pdsv.getCreated(); + } + + @Override + public Date getUpdateTime() { + return this.pdsv.getUpdateTime(); + } + + @Override + public long getCapacityBytes() { + return this.pdsv.getCapacityBytes(); + } + + @Override + public long getAvailableBytes() { + return this.pdsv.getAvailableBytes(); + } + + @Override + public Long getClusterId() { + return this.pdsv.getClusterId(); + } + + @Override + public String getHostAddress() { + return this.pdsv.getHostAddress(); + } + + @Override + public String getUserInfo() { + return this.pdsv.getUserInfo(); + } + + @Override + public boolean isShared() { + return this.pdsv.getScope() == ScopeType.HOST ? false : true; + } + + @Override + public boolean isLocal() { + return !this.isShared(); + } + + @Override + public StoragePoolStatus getStatus() { + return this.pdsv.getStatus(); + } + + @Override + public int getPort() { + return this.pdsv.getPort(); + } + + @Override + public Long getPodId() { + return this.pdsv.getPodId(); + } + + @Override + public boolean isInMaintenance() { + return this.getStatus() == StoragePoolStatus.Maintenance ? true : false; + } + + @Override + public String getStorageProviderName() { + return this.pdsv.getStorageProviderName(); + } +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java new file mode 100644 index 000000000..e5ee742f5 --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/DefaultPrimaryDataStoreDriverImpl.java @@ -0,0 +1,249 @@ +// 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 org.apache.cloudstack.storage.datastore.driver; + +import java.net.URISyntaxException; +import java.util.Set; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; +import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.framework.async.AsyncRpcConext; +import org.apache.cloudstack.storage.command.CreateObjectAnswer; +import org.apache.cloudstack.storage.command.CreateObjectCommand; +import org.apache.cloudstack.storage.command.DeleteCommand; +import org.apache.cloudstack.storage.datastore.DataObjectManager; +import org.apache.cloudstack.storage.endpoint.EndPointSelector; +import org.apache.log4j.Logger; + +import com.cloud.agent.api.Answer; +import com.cloud.storage.dao.StoragePoolHostDao; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.storage.encoding.DecodedDataObject; +import com.cloud.utils.storage.encoding.Decoder; + + +public class DefaultPrimaryDataStoreDriverImpl implements PrimaryDataStoreDriver { + private static final Logger s_logger = Logger.getLogger(DefaultPrimaryDataStoreDriverImpl.class); + @Inject + EndPointSelector selector; + @Inject + StoragePoolHostDao storeHostDao; + @Inject + DataObjectManager dataObjMgr; + public DefaultPrimaryDataStoreDriverImpl() { + + } + + private class CreateVolumeContext extends AsyncRpcConext { + private final DataObject volume; + /** + * @param callback + */ + public CreateVolumeContext(AsyncCompletionCallback callback, DataObject volume) { + super(callback); + this.volume = volume; + } + + public DataObject getVolume() { + return this.volume; + } + + } + + public Void createAsyncCallback(AsyncCallbackDispatcher callback, CreateVolumeContext context) { + CreateCmdResult result = null; + CreateObjectAnswer volAnswer = (CreateObjectAnswer) callback.getResult(); + if (volAnswer.getResult()) { + result = new CreateCmdResult(volAnswer.getPath(), volAnswer.getSize()); + } else { + result = new CreateCmdResult("", null); + result.setResult(volAnswer.getDetails()); + } + + context.getParentCallback().complete(result); + return null; + } + + @Override + public void deleteAsync(DataObject vo, AsyncCompletionCallback callback) { + DeleteCommand cmd = new DeleteCommand(vo.getUri()); + + EndPoint ep = selector.select(vo); + AsyncRpcConext context = new AsyncRpcConext(callback); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setCallback(caller.getTarget().deleteCallback(null, null)) + .setContext(context); + ep.sendMessageAsync(cmd, caller); + } + + public Void deleteCallback(AsyncCallbackDispatcher callback, AsyncRpcConext context) { + CommandResult result = new CommandResult(); + Answer answer = callback.getResult(); + if (!answer.getResult()) { + result.setResult(answer.getDetails()); + } + context.getParentCallback().complete(result); + return null; + } + /* + private class CreateVolumeFromBaseImageContext extends AsyncRpcConext { + private final VolumeObject volume; + + public CreateVolumeFromBaseImageContext(AsyncCompletionCallback callback, VolumeObject volume) { + super(callback); + this.volume = volume; + } + + public VolumeObject getVolume() { + return this.volume; + } + + } + + @Override + public void createVolumeFromBaseImageAsync(VolumeObject volume, TemplateInfo template, AsyncCompletionCallback callback) { + VolumeTO vol = this.dataStore.getVolumeTO(volume); + List endPoints = this.dataStore.getEndPoints(); + EndPoint ep = endPoints.get(0); + String templateUri = template.getDataStore().grantAccess(template, ep); + CreateVolumeFromBaseImageCommand cmd = new CreateVolumeFromBaseImageCommand(vol, templateUri); + + CreateVolumeFromBaseImageContext context = new CreateVolumeFromBaseImageContext(callback, volume); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setContext(context) + .setCallback(caller.getTarget().createVolumeFromBaseImageAsyncCallback(null, null)); + + ep.sendMessageAsync(cmd, caller); + }*/ + /* + public Object createVolumeFromBaseImageAsyncCallback(AsyncCallbackDispatcher callback, CreateVolumeFromBaseImageContext context) { + CreateVolumeAnswer answer = (CreateVolumeAnswer)callback.getResult(); + CommandResult result = new CommandResult(); + if (answer == null || answer.getDetails() != null) { + result.setSuccess(false); + if (answer != null) { + result.setResult(answer.getDetails()); + } + } else { + result.setSuccess(true); + VolumeObject volume = context.getVolume(); + volume.setPath(answer.getVolumeUuid()); + } + AsyncCompletionCallback parentCall = context.getParentCallback(); + parentCall.complete(result); + return null; + }*/ + + @Override + public void createAsync(DataObject vol, + AsyncCompletionCallback callback) { + EndPoint ep = selector.select(vol); + CreateObjectCommand createCmd = new CreateObjectCommand(vol.getUri()); + + CreateVolumeContext context = new CreateVolumeContext(callback, vol); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setContext(context) + .setCallback(caller.getTarget().createAsyncCallback(null, null)); + + ep.sendMessageAsync(createCmd, caller); + } + + @Override + public String grantAccess(DataObject object, EndPoint ep) { + //StoragePoolHostVO poolHost = storeHostDao.findByPoolHost(object.getDataStore().getId(), ep.getId()); + + String uri = object.getUri(); + try { + DecodedDataObject obj = Decoder.decode(uri); + if (obj.getPath() == null) { + //create an obj + EndPoint newEp = selector.select(object); + CreateObjectCommand createCmd = new CreateObjectCommand(uri); + CreateObjectAnswer answer = (CreateObjectAnswer)ep.sendMessage(createCmd); + if (answer.getResult()) { + dataObjMgr.update(object, answer.getPath(), answer.getSize()); + } else { + s_logger.debug("failed to create object" + answer.getDetails()); + throw new CloudRuntimeException("failed to create object" + answer.getDetails()); + } + } + + return object.getUri(); + } catch (URISyntaxException e) { + throw new CloudRuntimeException("uri parsed error", e); + } + } + + @Override + public boolean revokeAccess(DataObject vol, EndPoint ep) { + // TODO Auto-generated method stub + return false; + } + + @Override + public Set listObjects(DataStore store) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void revertSnapshot(SnapshotInfo snapshot, + AsyncCompletionCallback callback) { + // TODO Auto-generated method stub + + } + + + + @Override + public boolean canCopy(DataObject srcData, DataObject destData) { + // TODO Auto-generated method stub + return false; + } + + @Override + public void copyAsync(DataObject srcdata, DataObject destData, + AsyncCompletionCallback callback) { + // TODO Auto-generated method stub + + } + + @Override + public void resize(DataObject data, + AsyncCompletionCallback callback) { + // TODO Auto-generated method stub + + } + + @Override + public void takeSnapshot(SnapshotInfo snapshot, + AsyncCompletionCallback callback) { + // TODO Auto-generated method stub + + } + +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/PrimaryDataStoreDriver.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/PrimaryDataStoreDriver.java new file mode 100644 index 000000000..b248758bc --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/driver/PrimaryDataStoreDriver.java @@ -0,0 +1,16 @@ +// 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. diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/lifecycle/DefaultPrimaryDataStoreLifeCycleImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/lifecycle/DefaultPrimaryDataStoreLifeCycleImpl.java new file mode 100644 index 000000000..fea02e8d1 --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/lifecycle/DefaultPrimaryDataStoreLifeCycleImpl.java @@ -0,0 +1,147 @@ +/* + * 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 org.apache.cloudstack.storage.datastore.lifecycle; + +import java.util.List; +import java.util.Map; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.ClusterScope; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.EndPoint; +import org.apache.cloudstack.engine.subsystem.api.storage.HostScope; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreLifeCycle; +import org.apache.cloudstack.engine.subsystem.api.storage.ZoneScope; +import org.apache.cloudstack.storage.command.AttachPrimaryDataStoreCmd; +import org.apache.cloudstack.storage.command.CreatePrimaryDataStoreCmd; +import org.apache.cloudstack.storage.datastore.PrimaryDataStoreProviderManager; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.apache.cloudstack.storage.endpoint.EndPointSelector; +import org.apache.cloudstack.storage.volume.datastore.PrimaryDataStoreHelper; + +import com.cloud.agent.api.StoragePoolInfo; +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDao; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.storage.StoragePoolStatus; + +public class DefaultPrimaryDataStoreLifeCycleImpl implements PrimaryDataStoreLifeCycle { + @Inject + EndPointSelector selector; + @Inject + PrimaryDataStoreDao dataStoreDao; + @Inject + HostDao hostDao; + @Inject + PrimaryDataStoreHelper primaryStoreHelper; + @Inject + PrimaryDataStoreProviderManager providerMgr; + public DefaultPrimaryDataStoreLifeCycleImpl() { + } + + @Override + public DataStore initialize(Map dsInfos) { + + DataStore store = primaryStoreHelper.createPrimaryDataStore(null); + return providerMgr.getPrimaryDataStore(store.getId()); + } + + protected void attachCluster(DataStore store) { + //send down AttachPrimaryDataStoreCmd command to all the hosts in the cluster + List endPoints = selector.selectAll(store); + CreatePrimaryDataStoreCmd createCmd = new CreatePrimaryDataStoreCmd(store.getUri()); + EndPoint ep = endPoints.get(0); + HostVO host = hostDao.findById(ep.getId()); + if (host.getHypervisorType() == HypervisorType.XenServer) { + ep.sendMessage(createCmd); + } + + endPoints.get(0).sendMessage(createCmd); + AttachPrimaryDataStoreCmd cmd = new AttachPrimaryDataStoreCmd(store.getUri()); + for (EndPoint endp : endPoints) { + endp.sendMessage(cmd); + } + } + + @Override + public boolean attachCluster(DataStore dataStore, ClusterScope scope) { + StoragePoolVO dataStoreVO = dataStoreDao.findById(dataStore.getId()); + dataStoreVO.setDataCenterId(scope.getZoneId()); + dataStoreVO.setPodId(scope.getPodId()); + dataStoreVO.setClusterId(scope.getScopeId()); + dataStoreVO.setStatus(StoragePoolStatus.Attaching); + dataStoreVO.setScope(scope.getScopeType()); + dataStoreDao.update(dataStoreVO.getId(), dataStoreVO); + + + attachCluster(dataStore); + + dataStoreVO = dataStoreDao.findById(dataStore.getId()); + dataStoreVO.setStatus(StoragePoolStatus.Up); + dataStoreDao.update(dataStoreVO.getId(), dataStoreVO); + + return true; + } + + @Override + public boolean dettach() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean unmanaged() { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean attachZone(DataStore dataStore, ZoneScope scope) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean attachHost(DataStore store, HostScope scope, + StoragePoolInfo existingInfo) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean maintain(DataStore store) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean cancelMaintain(DataStore store) { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean deleteDataStore(DataStore store) { + // TODO Auto-generated method stub + return false; + } + +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/DefaultPrimaryDataStoreProviderManagerImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/DefaultPrimaryDataStoreProviderManagerImpl.java new file mode 100644 index 000000000..e38c3b306 --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/DefaultPrimaryDataStoreProviderManagerImpl.java @@ -0,0 +1,85 @@ +/* + * 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 org.apache.cloudstack.storage.datastore.manager; + +import java.util.HashMap; +import java.util.Map; + +import javax.annotation.PostConstruct; +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProviderManager; +import org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver; +import org.apache.cloudstack.storage.datastore.DefaultPrimaryDataStore; +import org.apache.cloudstack.storage.datastore.PrimaryDataStore; +import org.apache.cloudstack.storage.datastore.PrimaryDataStoreProviderManager; +import org.apache.cloudstack.storage.datastore.db.DataStoreProviderDao; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.springframework.stereotype.Component; + +import com.cloud.storage.StorageManager; + +@Component +public class DefaultPrimaryDataStoreProviderManagerImpl implements PrimaryDataStoreProviderManager { + @Inject + DataStoreProviderDao dataStoreProviderDao; + @Inject + DataStoreProviderManager providerManager; + @Inject + PrimaryDataStoreDao dataStoreDao; + Map driverMaps; + @Inject StorageManager storageMgr; + + @PostConstruct + public void config() { + driverMaps = new HashMap(); + } + + @Override + public PrimaryDataStore getPrimaryDataStore(long dataStoreId) { + StoragePoolVO dataStoreVO = dataStoreDao.findById(dataStoreId); + String providerName = dataStoreVO.getStorageProviderName(); + DataStoreProvider provider = providerManager.getDataStoreProvider(providerName); + DefaultPrimaryDataStore dataStore = DefaultPrimaryDataStore.createDataStore(dataStoreVO, driverMaps.get(provider.getName()), provider); + return dataStore; + } + + @Override + public boolean registerDriver(String providerName, PrimaryDataStoreDriver driver) { + if (driverMaps.get(providerName) != null) { + return false; + } + driverMaps.put(providerName, driver); + return true; + } + + @Override + public PrimaryDataStore getPrimaryDataStore(String uuid) { + StoragePoolVO dataStoreVO = dataStoreDao.findByUuid(uuid); + return getPrimaryDataStore(dataStoreVO.getId()); + } + + @Override + public boolean registerHostListener(String providerName, HypervisorHostListener listener) { + return storageMgr.registerHostListener(providerName, listener); + } +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/data model.ucls b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/data model.ucls new file mode 100644 index 000000000..8d7a69695 --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/manager/data model.ucls @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java new file mode 100644 index 000000000..f2cb1c45c --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultHostListener.java @@ -0,0 +1,90 @@ +/* + * 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 org.apache.cloudstack.storage.datastore.provider; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener; +import org.apache.cloudstack.storage.datastore.db.PrimaryDataStoreDao; +import org.apache.cloudstack.storage.datastore.db.StoragePoolVO; +import org.apache.log4j.Logger; + +import com.cloud.agent.AgentManager; +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.ModifyStoragePoolAnswer; +import com.cloud.agent.api.ModifyStoragePoolCommand; +import com.cloud.alert.AlertManager; +import com.cloud.storage.StoragePool; +import com.cloud.storage.StoragePoolHostVO; +import com.cloud.storage.dao.StoragePoolHostDao; +import com.cloud.utils.exception.CloudRuntimeException; + +public class DefaultHostListener implements HypervisorHostListener { + private static final Logger s_logger = Logger + .getLogger(DefaultHostListener.class); + @Inject AgentManager agentMgr; + @Inject DataStoreManager dataStoreMgr; + @Inject AlertManager alertMgr; + @Inject StoragePoolHostDao storagePoolHostDao; + @Inject PrimaryDataStoreDao primaryStoreDao; + @Override + public boolean hostConnect(long hostId, long poolId) { + StoragePool pool = (StoragePool)this.dataStoreMgr.getDataStore(poolId, DataStoreRole.Primary); + ModifyStoragePoolCommand cmd = new ModifyStoragePoolCommand(true, pool); + final Answer answer = agentMgr.easySend(hostId, cmd); + + if (answer == null) { + throw new CloudRuntimeException("Unable to get an answer to the modify storage pool command" + pool.getId()); + } + + if (!answer.getResult()) { + String msg = "Add host failed due to ModifyStoragePoolCommand failed" + answer.getDetails(); + alertMgr.sendAlert(AlertManager.ALERT_TYPE_HOST, pool.getDataCenterId(), pool.getPodId(), msg, msg); + throw new CloudRuntimeException("Unable establish connection from storage head to storage pool " + pool.getId() + " due to " + answer.getDetails() + pool.getId()); + } + + assert (answer instanceof ModifyStoragePoolAnswer) : "Well, now why won't you actually return the ModifyStoragePoolAnswer when it's ModifyStoragePoolCommand? Pool=" + pool.getId() + "Host=" + hostId; + ModifyStoragePoolAnswer mspAnswer = (ModifyStoragePoolAnswer) answer; + + StoragePoolHostVO poolHost = storagePoolHostDao.findByPoolHost(pool.getId(), hostId); + if (poolHost == null) { + poolHost = new StoragePoolHostVO(pool.getId(), hostId, mspAnswer.getPoolInfo().getLocalPath().replaceAll("//", "/")); + storagePoolHostDao.persist(poolHost); + } else { + poolHost.setLocalPath(mspAnswer.getPoolInfo().getLocalPath().replaceAll("//", "/")); + } + + StoragePoolVO poolVO = this.primaryStoreDao.findById(poolId); + poolVO.setAvailableBytes(mspAnswer.getPoolInfo().getAvailableBytes()); + poolVO.setCapacityBytes(mspAnswer.getPoolInfo().getCapacityBytes()); + primaryStoreDao.update(pool.getId(), poolVO); + + s_logger.info("Connection established between " + pool + " host + " + hostId); + return true; + } + + @Override + public boolean hostDisconnected(long hostId, long poolId) { + // TODO Auto-generated method stub + return false; + } + +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.java new file mode 100644 index 000000000..8c674dc04 --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/DefaultPrimaryDatastoreProviderImpl.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 org.apache.cloudstack.storage.datastore.provider; + +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreLifeCycle; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider; +import org.apache.cloudstack.engine.subsystem.api.storage.HypervisorHostListener; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreDriver; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreProvider; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreProvider.DataStoreProviderType; +import org.apache.cloudstack.storage.datastore.PrimaryDataStoreProviderManager; +import org.apache.cloudstack.storage.datastore.driver.DefaultPrimaryDataStoreDriverImpl; +import org.apache.cloudstack.storage.datastore.lifecycle.DefaultPrimaryDataStoreLifeCycleImpl; + +import com.cloud.utils.component.ComponentContext; + + +public class DefaultPrimaryDatastoreProviderImpl implements PrimaryDataStoreProvider { + private final String providerName = "default primary data store provider"; + protected PrimaryDataStoreDriver driver; + protected HypervisorHostListener listener; + @Inject + PrimaryDataStoreProviderManager storeMgr; + + protected DataStoreLifeCycle lifecycle; + protected String uuid; + protected long id; + @Override + public String getName() { + return providerName; + } + + @Override + public DataStoreLifeCycle getDataStoreLifeCycle() { + return this.lifecycle; + } + + @Override + public boolean configure(Map params) { + lifecycle = ComponentContext.inject(DefaultPrimaryDataStoreLifeCycleImpl.class); + driver = ComponentContext.inject(DefaultPrimaryDataStoreDriverImpl.class); + listener = ComponentContext.inject(DefaultHostListener.class); + return true; + } + + @Override + public PrimaryDataStoreDriver getDataStoreDriver() { + return this.driver; + } + + @Override + public HypervisorHostListener getHostListener() { + return this.listener; + } + + @Override + public Set getTypes() { + Set types = new HashSet(); + types.add(DataStoreProviderType.PRIMARY); + return types; + } + +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/PrimaryDataStoreProviderManager.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/PrimaryDataStoreProviderManager.java new file mode 100644 index 000000000..b248758bc --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/provider/PrimaryDataStoreProviderManager.java @@ -0,0 +1,16 @@ +// 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. diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/type/DataStoreType.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/type/DataStoreType.java new file mode 100644 index 000000000..8f3fe8ca8 --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/type/DataStoreType.java @@ -0,0 +1,23 @@ +/* + * 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 org.apache.cloudstack.storage.datastore.type; + +public interface DataStoreType { + +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/type/ISCSI.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/type/ISCSI.java new file mode 100644 index 000000000..9b80bccd8 --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/type/ISCSI.java @@ -0,0 +1,32 @@ +/* + * 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 org.apache.cloudstack.storage.datastore.type; + +import org.apache.cloudstack.storage.BaseType; +import org.springframework.stereotype.Component; + +@Component +public class ISCSI extends BaseType implements DataStoreType { + private final String type = "iscsi"; + + @Override + public String toString() { + return type; + } +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/type/NetworkFileSystem.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/type/NetworkFileSystem.java new file mode 100644 index 000000000..f8801545c --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/type/NetworkFileSystem.java @@ -0,0 +1,32 @@ +/* + * 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 org.apache.cloudstack.storage.datastore.type; + +import org.apache.cloudstack.storage.BaseType; +import org.springframework.stereotype.Component; + +@Component +public class NetworkFileSystem extends BaseType implements DataStoreType { + private final String type = "nfs"; + + @Override + public String toString() { + return type; + } +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/type/SharedMount.java b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/type/SharedMount.java new file mode 100644 index 000000000..addf90193 --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/datastore/type/SharedMount.java @@ -0,0 +1,30 @@ +/* + * 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 org.apache.cloudstack.storage.datastore.type; + +import org.apache.cloudstack.storage.BaseType; + +public class SharedMount extends BaseType implements DataStoreType { + private final String type = "SharedMountPoint"; + + @Override + public String toString() { + return type; + } +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategy.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategy.java new file mode 100644 index 000000000..99b34cbcf --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategy.java @@ -0,0 +1,28 @@ +/* + * 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 org.apache.cloudstack.storage.volume; + +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.storage.datastore.PrimaryDataStore; +import org.apache.cloudstack.storage.volume.VolumeServiceImpl.CreateBaseImageResult; + +public interface TemplateInstallStrategy { + public Void installAsync(TemplateInfo template, PrimaryDataStore store, AsyncCompletionCallback callback); +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java new file mode 100644 index 000000000..e09961913 --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/TemplateInstallStrategyImpl.java @@ -0,0 +1,289 @@ +/* + * 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 org.apache.cloudstack.storage.volume; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.ImageDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager; +import org.apache.cloudstack.storage.datastore.PrimaryDataStore; +import org.apache.cloudstack.storage.motion.DataMotionService; +import org.apache.cloudstack.storage.volume.VolumeServiceImpl.CreateBaseImageResult; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +@Component +public class TemplateInstallStrategyImpl implements TemplateInstallStrategy { + private static final Logger s_logger = Logger + .getLogger(TemplateInstallStrategyImpl.class); + @Inject + ObjectInDataStoreManager objectInDataStoreMgr; + @Inject + DataMotionService motionSrv; + @Inject + ImageDataFactory imageFactory; + protected long waitingTime = 1800; // half an hour + protected long waitingRetries = 10; +/* + protected TemplateInfo waitingForTemplateDownload(TemplateInfo template, + PrimaryDataStore dataStore) { + long retries = this.waitingRetries; + ObjectInDataStoreVO obj = null; + do { + try { + Thread.sleep(waitingTime); + } catch (InterruptedException e) { + s_logger.debug("sleep interrupted", e); + throw new CloudRuntimeException("sleep interrupted", e); + } + + obj = objectInDataStoreMgr.findObject(template.getId(), + template.getType(), dataStore.getId(), dataStore.getRole()); + if (obj == null) { + s_logger.debug("can't find object in db, maybe it's cleaned up already, exit waiting"); + break; + } + if (obj.getState() == ObjectInDataStoreStateMachine.State.Ready) { + break; + } + retries--; + } while (retries > 0); + + if (obj == null || retries <= 0) { + s_logger.debug("waiting too long for template downloading, marked it as failed"); + throw new CloudRuntimeException( + "waiting too long for template downloading, marked it as failed"); + } + return imageFactory.getTemplate(template.getId(), dataStore); + } + + class InstallContext extends AsyncRpcConext { + final TemplateInfo destTemplate; + final TemplateInfo srcTemplate; + + public InstallContext(AsyncCompletionCallback callback, + TemplateInfo destTemplate, TemplateInfo srcTemplate) { + super(callback); + this.destTemplate = destTemplate; + this.srcTemplate = srcTemplate; + } + + } + + @Override + public Void installAsync(TemplateInfo template, PrimaryDataStore store, + AsyncCompletionCallback callback) { + ObjectInDataStoreVO obj = objectInDataStoreMgr.findObject( + template.getId(), template.getType(), store.getId(), + store.getRole()); + TemplateInfo templateOnPrimaryStoreObj = null; + boolean freshNewTemplate = false; + if (obj == null) { + try { + templateOnPrimaryStoreObj = objectInDataStoreMgr.create( + template, store); + freshNewTemplate = true; + } catch (Throwable e) { + obj = objectInDataStoreMgr.findObject(template.getId(), + template.getType(), store.getId(), store.getRole()); + if (obj == null) { + CreateBaseImageResult result = new CreateBaseImageResult( + null); + result.setSuccess(false); + result.setResult(e.toString()); + callback.complete(result); + return null; + } + } + } + + if (!freshNewTemplate + && obj.getState() != ObjectInDataStoreStateMachine.State.Ready) { + try { + templateOnPrimaryStoreObj = waitingForTemplateDownload( + template, store); + } catch (Exception e) { + CreateBaseImageResult result = new CreateBaseImageResult(null); + result.setSuccess(false); + result.setResult(e.toString()); + callback.complete(result); + return null; + } + + CreateBaseImageResult result = new CreateBaseImageResult( + templateOnPrimaryStoreObj); + callback.complete(result); + return null; + } + + try { + objectInDataStoreMgr.update(templateOnPrimaryStoreObj, + ObjectInDataStoreStateMachine.Event.CreateRequested); + } catch (NoTransitionException e) { + try { + objectInDataStoreMgr.update(templateOnPrimaryStoreObj, + ObjectInDataStoreStateMachine.Event.OperationFailed); + } catch (NoTransitionException e1) { + s_logger.debug("state transation failed", e1); + } + CreateBaseImageResult result = new CreateBaseImageResult(null); + result.setSuccess(false); + result.setResult(e.toString()); + callback.complete(result); + return null; + } + + InstallContext context = new InstallContext( + callback, templateOnPrimaryStoreObj, template); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher + .create(this); + caller.setCallback( + caller.getTarget().installTemplateCallback(null, null)) + .setContext(context); + + store.getDriver().createAsync(templateOnPrimaryStoreObj, caller); + return null; + } + + class CopyTemplateContext extends AsyncRpcConext { + TemplateInfo template; + + public CopyTemplateContext(AsyncCompletionCallback callback, + TemplateInfo template) { + super(callback); + this.template = template; + } + } + + protected Void installTemplateCallback( + AsyncCallbackDispatcher callback, + InstallContext context) { + CreateCmdResult result = callback.getResult(); + TemplateInfo templateOnPrimaryStoreObj = context.destTemplate; + CreateBaseImageResult upResult = new CreateBaseImageResult( + templateOnPrimaryStoreObj); + if (result.isFailed()) { + upResult.setResult(result.getResult()); + context.getParentCallback().complete(upResult); + return null; + } + + ObjectInDataStoreVO obj = objectInDataStoreMgr.findObject( + templateOnPrimaryStoreObj.getId(), templateOnPrimaryStoreObj + .getType(), templateOnPrimaryStoreObj.getDataStore() + .getId(), templateOnPrimaryStoreObj.getDataStore() + .getRole()); + + obj.setInstallPath(result.getPath()); + obj.setSize(result.getSize()); + try { + objectInDataStoreMgr.update(obj, + ObjectInDataStoreStateMachine.Event.OperationSuccessed); + } catch (NoTransitionException e) { + try { + objectInDataStoreMgr.update(obj, + ObjectInDataStoreStateMachine.Event.OperationFailed); + } catch (NoTransitionException e1) { + s_logger.debug("failed to change state", e1); + } + + upResult.setResult(e.toString()); + context.getParentCallback().complete(upResult); + return null; + } + + moveTemplate(context.srcTemplate, templateOnPrimaryStoreObj, obj, + context.getParentCallback()); + return null; + } + + protected void moveTemplate(TemplateInfo srcTemplate, + TemplateInfo destTemplate, ObjectInDataStoreVO obj, + AsyncCompletionCallback callback) { + // move template into primary storage + try { + objectInDataStoreMgr.update(destTemplate, + ObjectInDataStoreStateMachine.Event.CopyingRequested); + } catch (NoTransitionException e) { + s_logger.debug("failed to change state", e); + try { + objectInDataStoreMgr.update(destTemplate, + ObjectInDataStoreStateMachine.Event.OperationFailed); + } catch (NoTransitionException e1) { + + } + CreateBaseImageResult res = new CreateBaseImageResult(destTemplate); + res.setResult("Failed to change state: " + e.toString()); + callback.complete(res); + } + + CopyTemplateContext anotherCall = new CopyTemplateContext( + callback, destTemplate); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher + .create(this); + caller.setCallback(caller.getTarget().copyTemplateCallback(null, null)) + .setContext(anotherCall); + + motionSrv.copyAsync(srcTemplate, destTemplate, caller); + } + + protected Void copyTemplateCallback( + AsyncCallbackDispatcher callback, + CopyTemplateContext context) { + CopyCommandResult result = callback.getResult(); + TemplateInfo templateOnPrimaryStoreObj = context.template; + if (result.isFailed()) { + CreateBaseImageResult res = new CreateBaseImageResult( + templateOnPrimaryStoreObj); + res.setResult(result.getResult()); + context.getParentCallback().complete(res); + } + DataObjectInStore obj = objectInDataStoreMgr.findObject( + templateOnPrimaryStoreObj, templateOnPrimaryStoreObj.getDataStore()); + + + CreateBaseImageResult res = new CreateBaseImageResult( + templateOnPrimaryStoreObj); + try { + objectInDataStoreMgr.update(obj, + ObjectInDataStoreStateMachine.Event.OperationSuccessed); + } catch (NoTransitionException e) { + s_logger.debug("Failed to update copying state: ", e); + try { + objectInDataStoreMgr.update(templateOnPrimaryStoreObj, + ObjectInDataStoreStateMachine.Event.OperationFailed); + } catch (NoTransitionException e1) { + } + + res.setResult("Failed to update copying state: " + e.toString()); + context.getParentCallback().complete(res); + } + context.getParentCallback().complete(res); + return null; + }*/ + @Override + public Void installAsync(TemplateInfo template, PrimaryDataStore store, + AsyncCompletionCallback callback) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeDataFactoryImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeDataFactoryImpl.java new file mode 100644 index 000000000..e0ecd165d --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeDataFactoryImpl.java @@ -0,0 +1,74 @@ +/* + * 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 org.apache.cloudstack.storage.volume; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreManager; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager; +import org.springframework.stereotype.Component; + +import com.cloud.storage.VolumeVO; +import com.cloud.storage.dao.VolumeDao; + +@Component +public class VolumeDataFactoryImpl implements VolumeDataFactory { + @Inject + VolumeDao volumeDao; + @Inject + ObjectInDataStoreManager objMap; + @Inject + DataStoreManager storeMgr; + @Override + public VolumeInfo getVolume(long volumeId, DataStore store) { + VolumeVO volumeVO = volumeDao.findById(volumeId); + + VolumeObject vol = VolumeObject.getVolumeObject(store, volumeVO); + + return vol; + } + + @Override + public VolumeInfo getVolume(long volumeId) { + VolumeVO volumeVO = volumeDao.findById(volumeId); + VolumeObject vol = null; + if (volumeVO.getPoolId() == null) { + DataStore store = objMap.findStore(volumeVO.getUuid(), DataObjectType.VOLUME, DataStoreRole.Image); + vol = VolumeObject.getVolumeObject(store, volumeVO); + } else { + DataStore store = this.storeMgr.getDataStore(volumeVO.getPoolId(), DataStoreRole.Primary); + vol = VolumeObject.getVolumeObject(store, volumeVO); + } + return vol; + } + + @Override + public VolumeInfo getVolume(DataObject volume, DataStore store) { + VolumeInfo vol = (VolumeObject)getVolume(volume.getId(), store); + vol.addPayload(((VolumeInfo)volume).getpayload()); + return vol; + } + +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeEntityImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeEntityImpl.java new file mode 100644 index 000000000..d3e8c543b --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeEntityImpl.java @@ -0,0 +1,204 @@ +/* + * 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 org.apache.cloudstack.storage.volume; + +import java.lang.reflect.Method; +import java.util.Date; +import java.util.List; +import java.util.Map; + +import org.apache.cloudstack.engine.cloud.entity.api.SnapshotEntity; +import org.apache.cloudstack.engine.cloud.entity.api.VolumeEntity; +import org.apache.cloudstack.engine.datacenter.entity.api.StorageEntity; +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService.VolumeApiResult; +import org.apache.cloudstack.engine.subsystem.api.storage.disktype.DiskFormat; +import org.apache.cloudstack.engine.subsystem.api.storage.type.VolumeType; +import org.apache.cloudstack.storage.datastore.PrimaryDataStoreEntityImpl; + +public class VolumeEntityImpl implements VolumeEntity { + private VolumeInfo volumeInfo; + private final VolumeService vs; + private VolumeApiResult result; + + public VolumeEntityImpl() { + this.vs = null; + } + + public VolumeEntityImpl(VolumeInfo volumeObject, VolumeService vs) { + this.volumeInfo = volumeObject; + this.vs = vs; + } + + public VolumeInfo getVolumeInfo() { + return volumeInfo; + } + + @Override + public String getUuid() { + return volumeInfo.getUuid(); + } + + @Override + public long getId() { + return volumeInfo.getId(); + } + + public String getExternalId() { + // TODO Auto-generated method stub + return null; + } + + @Override + public String getCurrentState() { + return null; + } + + @Override + public String getDesiredState() { + return null; + } + + @Override + public Date getCreatedTime() { + return null; + } + + @Override + public Date getLastUpdatedTime() { + return null; + } + + @Override + public String getOwner() { + return null; + } + + + @Override + public List getApplicableActions() { + // TODO Auto-generated method stub + return null; + } + + @Override + public SnapshotEntity takeSnapshotOf(boolean full) { + // TODO Auto-generated method stub + return null; + } + + @Override + public String reserveForMigration(long expirationTime) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void migrate(String reservationToken) { + // TODO Auto-generated method stub + + } + + @Override + public VolumeEntity setupForCopy() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void copy(VolumeEntity dest) { + // TODO Auto-generated method stub + + } + + @Override + public void attachTo(String vm, long deviceId) { + // TODO Auto-generated method stub + + } + + @Override + public void detachFrom() { + // TODO Auto-generated method stub + + } + + + @Override + public long getSize() { + return volumeInfo.getSize(); + } + + @Override + public DiskFormat getDiskType() { + return null; + } + + @Override + public VolumeType getType() { + return null; + } + + @Override + public StorageEntity getDataStore() { + return new PrimaryDataStoreEntityImpl((PrimaryDataStoreInfo) volumeInfo.getDataStore()); + } + + @Override + public void destroy() { + /*AsyncCallFuture future = vs.deleteVolumeAsync(volumeInfo); + try { + result = future.get(); + if (!result.isSuccess()) { + throw new CloudRuntimeException("Failed to create volume:" + result.getResult()); + } + } catch (InterruptedException e) { + throw new CloudRuntimeException("wait to delete volume info failed", e); + } catch (ExecutionException e) { + throw new CloudRuntimeException("wait to delete volume failed", e); + }*/ + } + + @Override + public Map getDetails() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void addDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public void delDetail(String name, String value) { + // TODO Auto-generated method stub + + } + + @Override + public void updateDetail(String name, String value) { + // TODO Auto-generated method stub + + } + +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeMotionService.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeMotionService.java new file mode 100644 index 000000000..9349e6b11 --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeMotionService.java @@ -0,0 +1,23 @@ +/* + * 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 org.apache.cloudstack.storage.volume; + +public interface VolumeMotionService { + boolean copyVolume(String volumeUri, String destVolumeUri); +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java new file mode 100644 index 000000000..ceadb2539 --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeObject.java @@ -0,0 +1,330 @@ +// 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 org.apache.cloudstack.storage.volume; + +import java.util.Date; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectInStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObjectType; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStoreRole; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.disktype.DiskFormat; +import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager; +import org.apache.log4j.Logger; + +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.storage.Volume; +import com.cloud.storage.VolumeVO; +import com.cloud.storage.dao.VolumeDao; +import com.cloud.utils.component.ComponentContext; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.utils.fsm.NoTransitionException; +import com.cloud.utils.fsm.StateMachine2; +import com.cloud.utils.storage.encoding.EncodingType; + +public class VolumeObject implements VolumeInfo { + private static final Logger s_logger = Logger.getLogger(VolumeObject.class); + protected VolumeVO volumeVO; + private StateMachine2 _volStateMachine; + protected DataStore dataStore; + @Inject + VolumeDao volumeDao; + @Inject + ObjectInDataStoreManager ojbectInStoreMgr; + private Object payload; + + public VolumeObject() { + _volStateMachine = Volume.State.getStateMachine(); + } + + protected void configure(DataStore dataStore, VolumeVO volumeVO) { + this.volumeVO = volumeVO; + this.dataStore = dataStore; + } + + public static VolumeObject getVolumeObject(DataStore dataStore, VolumeVO volumeVO) { + VolumeObject vo = ComponentContext.inject(VolumeObject.class); + vo.configure(dataStore, volumeVO); + return vo; + } + + @Override + public String getUuid() { + return volumeVO.getUuid(); + } + + public void setPath(String uuid) { + volumeVO.setPath(uuid); + } + + public void setSize(Long size) { + volumeVO.setSize(size); + } + + public Volume.State getState() { + return volumeVO.getState(); + } + + @Override + public DataStore getDataStore() { + return dataStore; + } + + @Override + public Long getSize() { + return volumeVO.getSize(); + } + + public long getVolumeId() { + return volumeVO.getId(); + } + public boolean stateTransit(Volume.Event event) { + boolean result = false; + try { + result = _volStateMachine.transitTo(volumeVO, event, null, volumeDao); + volumeVO = volumeDao.findById(volumeVO.getId()); + } catch (NoTransitionException e) { + String errorMessage = "Failed to transit volume: " + this.getVolumeId() + ", due to: " + e.toString(); + s_logger.debug(errorMessage); + throw new CloudRuntimeException(errorMessage); + } + return result; + } + + public void update() { + volumeDao.update(volumeVO.getId(), volumeVO); + volumeVO = volumeDao.findById(volumeVO.getId()); + } + + @Override + public long getId() { + return this.volumeVO.getId(); + } + + @Override + public boolean isAttachedVM() { + return (this.volumeVO.getInstanceId() == null) ? false : true; + } + + @Override + public String getUri() { + if (this.dataStore == null) { + throw new CloudRuntimeException("datastore must be set before using this object"); + } + DataObjectInStore obj = ojbectInStoreMgr.findObject(this.volumeVO.getUuid(), DataObjectType.VOLUME, this.dataStore.getUuid(), this.dataStore.getRole()); + if (obj.getState() != ObjectInDataStoreStateMachine.State.Ready) { + return this.dataStore.getUri() + + "&" + EncodingType.OBJTYPE + "=" + DataObjectType.VOLUME + + "&" + EncodingType.SIZE + "=" + this.volumeVO.getSize() + + "&" + EncodingType.NAME + "=" + this.volumeVO.getName(); + } else { + return this.dataStore.getUri() + + "&" + EncodingType.OBJTYPE + "=" + DataObjectType.VOLUME + + "&" + EncodingType.PATH + "=" + obj.getInstallPath(); + } + } + + @Override + public DataObjectType getType() { + return DataObjectType.VOLUME; + } + + @Override + public DiskFormat getFormat() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void processEvent( + ObjectInDataStoreStateMachine.Event event) { + if (this.dataStore == null) { + return; + } + try { + Volume.Event volEvent = null; + if (this.dataStore.getRole() == DataStoreRole.Image) { + ojbectInStoreMgr.update(this, event); + if (event == ObjectInDataStoreStateMachine.Event.CreateRequested) { + volEvent = Volume.Event.UploadRequested; + } else if (event == ObjectInDataStoreStateMachine.Event.OperationSuccessed) { + volEvent = Volume.Event.CopySucceeded; + } else if (event == ObjectInDataStoreStateMachine.Event.OperationFailed) { + volEvent = Volume.Event.CopyFailed; + } + } else { + if (event == ObjectInDataStoreStateMachine.Event.CreateRequested || + event == ObjectInDataStoreStateMachine.Event.CreateOnlyRequested) { + volEvent = Volume.Event.CreateRequested; + } else if (event == ObjectInDataStoreStateMachine.Event.CopyingRequested) { + volEvent = Volume.Event.CopyRequested; + } + } + + if (event == ObjectInDataStoreStateMachine.Event.DestroyRequested) { + volEvent = Volume.Event.DestroyRequested; + } else if (event == ObjectInDataStoreStateMachine.Event.ExpungeRequested) { + volEvent = Volume.Event.ExpungingRequested; + } else if (event == ObjectInDataStoreStateMachine.Event.OperationSuccessed) { + volEvent = Volume.Event.OperationSucceeded; + } else if (event == ObjectInDataStoreStateMachine.Event.OperationFailed) { + volEvent = Volume.Event.OperationFailed; + } else if (event == ObjectInDataStoreStateMachine.Event.ResizeRequested) { + volEvent = Volume.Event.ResizeRequested; + } + this.stateTransit(volEvent); + } catch (Exception e) { + s_logger.debug("Failed to update state", e); + throw new CloudRuntimeException("Failed to update state:" + e.toString()); + } + + } + + @Override + public String getName() { + return this.volumeVO.getName(); + } + + @Override + public Long getInstanceId() { + return this.volumeVO.getInstanceId(); + } + + @Override + public String getFolder() { + return this.volumeVO.getFolder(); + } + + @Override + public String getPath() { + return this.volumeVO.getPath(); + } + + @Override + public Long getPodId() { + return this.volumeVO.getPodId(); + } + + @Override + public long getDataCenterId() { + return this.volumeVO.getDataCenterId(); + } + + @Override + public Type getVolumeType() { + return this.volumeVO.getVolumeType(); + } + + @Override + public Long getPoolId() { + return this.volumeVO.getPoolId(); + } + + @Override + public Date getAttached() { + return this.volumeVO.getAttached(); + } + + @Override + public Long getDeviceId() { + return this.volumeVO.getDeviceId(); + } + + @Override + public Date getCreated() { + return this.volumeVO.getCreated(); + } + + @Override + public long getDiskOfferingId() { + return this.volumeVO.getDiskOfferingId(); + } + + @Override + public String getChainInfo() { + return this.volumeVO.getChainInfo(); + } + + @Override + public boolean isRecreatable() { + return this.volumeVO.isRecreatable(); + } + + @Override + public long getUpdatedCount() { + return this.volumeVO.getUpdatedCount(); + } + + @Override + public void incrUpdatedCount() { + this.volumeVO.incrUpdatedCount(); + } + + @Override + public Date getUpdated() { + return this.volumeVO.getUpdated(); + } + + @Override + public String getReservationId() { + return this.volumeVO.getReservationId(); + } + + @Override + public void setReservationId(String reserv) { + this.volumeVO.setReservationId(reserv); + } + + @Override + public long getAccountId() { + return this.volumeVO.getAccountId(); + } + + @Override + public long getDomainId() { + return this.volumeVO.getDomainId(); + } + + @Override + public Long getTemplateId() { + return this.volumeVO.getTemplateId(); + } + + @Override + public void addPayload(Object data) { + this.payload = data; + } + + @Override + public Object getpayload() { + return this.payload; + } + + @Override + public HypervisorType getHypervisorType() { + return this.volumeDao.getHypervisorType(this.volumeVO.getId()); + } + + @Override + public Long getLastPoolId() { + return this.volumeVO.getLastPoolId(); + } +} diff --git a/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java new file mode 100644 index 000000000..32e7d274f --- /dev/null +++ b/engine/storage/volume/src/org/apache/cloudstack/storage/volume/VolumeServiceImpl.java @@ -0,0 +1,649 @@ +/* + * 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 org.apache.cloudstack.storage.volume; + +import javax.inject.Inject; + +import org.apache.cloudstack.engine.cloud.entity.api.VolumeEntity; +import org.apache.cloudstack.engine.subsystem.api.storage.CommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.CopyCommandResult; +import org.apache.cloudstack.engine.subsystem.api.storage.CreateCmdResult; +import org.apache.cloudstack.engine.subsystem.api.storage.DataObject; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine.Event; +import org.apache.cloudstack.engine.subsystem.api.storage.SnapshotInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeDataFactory; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.VolumeService; +import org.apache.cloudstack.framework.async.AsyncCallFuture; +import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.framework.async.AsyncRpcConext; +import org.apache.cloudstack.storage.datastore.DataObjectManager; +import org.apache.cloudstack.storage.datastore.ObjectInDataStoreManager; +import org.apache.cloudstack.storage.datastore.PrimaryDataStore; +import org.apache.cloudstack.storage.datastore.PrimaryDataStoreProviderManager; +import org.apache.cloudstack.storage.motion.DataMotionService; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.storage.StoragePool; +import com.cloud.storage.Volume; +import com.cloud.storage.Volume.Type; +import com.cloud.storage.VolumeVO; +import com.cloud.storage.dao.VolumeDao; +import com.cloud.storage.snapshot.SnapshotManager; +import com.cloud.utils.db.DB; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.vm.VirtualMachine; +import com.cloud.vm.dao.VMInstanceDao; + +@Component +public class VolumeServiceImpl implements VolumeService { + private static final Logger s_logger = Logger + .getLogger(VolumeServiceImpl.class); + @Inject + VolumeDao volDao; + @Inject + PrimaryDataStoreProviderManager dataStoreMgr; + @Inject + ObjectInDataStoreManager objectInDataStoreMgr; + @Inject + DataObjectManager dataObjectMgr; + @Inject + DataMotionService motionSrv; + @Inject + TemplateInstallStrategy templateInstallStrategy; + @Inject + VolumeDataFactory volFactory; + @Inject SnapshotManager snapshotMgr; + @Inject VMInstanceDao vmDao; + + public VolumeServiceImpl() { + } + + private class CreateVolumeContext extends AsyncRpcConext { + + private DataObject volume; + private AsyncCallFuture future; + /** + * @param callback + */ + public CreateVolumeContext(AsyncCompletionCallback callback, DataObject volume, AsyncCallFuture future) { + super(callback); + this.volume = volume; + this.future = future; + } + + public DataObject getVolume() { + return this.volume; + } + + public AsyncCallFuture getFuture() { + return this.future; + } + + } + + @Override + public AsyncCallFuture createVolumeAsync(VolumeInfo volume, DataStore dataStore) { + AsyncCallFuture future = new AsyncCallFuture(); + DataObject volumeOnStore = dataStore.create(volume); + volumeOnStore.processEvent(Event.CreateOnlyRequested); + + CreateVolumeContext context = new CreateVolumeContext(null, volumeOnStore, future); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setCallback(caller.getTarget().createVolumeCallback(null, null)) + .setContext(context); + + dataStore.getDriver().createAsync(volumeOnStore, caller); + return future; + } + + protected Void createVolumeCallback(AsyncCallbackDispatcher callback, CreateVolumeContext context) { + CreateCmdResult result = callback.getResult(); + DataObject vo = context.getVolume(); + String errMsg = null; + if (result.isSuccess()) { + vo.processEvent(Event.OperationSuccessed); + } else { + vo.processEvent(Event.OperationFailed); + errMsg = result.getResult(); + } + VolumeApiResult volResult = new VolumeApiResult((VolumeObject)vo); + if (errMsg != null) { + volResult.setResult(errMsg); + } + context.getFuture().complete(volResult); + return null; + } + + private class DeleteVolumeContext extends AsyncRpcConext { + private final VolumeObject volume; + private AsyncCallFuture future; + /** + * @param callback + */ + public DeleteVolumeContext(AsyncCompletionCallback callback, VolumeObject volume, AsyncCallFuture future) { + super(callback); + this.volume = volume; + this.future = future; + } + + public VolumeObject getVolume() { + return this.volume; + } + + public AsyncCallFuture getFuture() { + return this.future; + } + } + + @DB + @Override + public AsyncCallFuture expungeVolumeAsync(VolumeInfo volume) { + AsyncCallFuture future = new AsyncCallFuture(); + VolumeApiResult result = new VolumeApiResult(volume); + if (volume.getDataStore() == null) { + this.volDao.remove(volume.getId()); + future.complete(result); + return future; + } + + String vmName = null; + VolumeVO vol = this.volDao.findById(volume.getId()); + if (vol.getVolumeType() == Type.ROOT && vol.getInstanceId() != null) { + VirtualMachine vm = vmDao.findByIdIncludingRemoved(vol + .getInstanceId()); + if (vm != null) { + vmName = vm.getInstanceName(); + } + } + + String volumePath = vol.getPath(); + Long poolId = vol.getPoolId(); + if (poolId == null || volumePath == null || volumePath.trim().isEmpty()) { + if (s_logger.isDebugEnabled()) { + s_logger.debug("Marking volume that was never created as destroyed: " + + vol); + } + this.volDao.remove(vol.getId()); + future.complete(result); + return future; + } + VolumeObject vo = (VolumeObject)volume; + + volume.processEvent(Event.ExpungeRequested); + + + DeleteVolumeContext context = new DeleteVolumeContext(null, vo, future); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setCallback(caller.getTarget().deleteVolumeCallback(null, null)) + .setContext(context); + + volume.getDataStore().getDriver().deleteAsync(volume, caller); + return future; + } + + public Void deleteVolumeCallback(AsyncCallbackDispatcher callback, DeleteVolumeContext context) { + CommandResult result = callback.getResult(); + VolumeObject vo = context.getVolume(); + VolumeApiResult apiResult = new VolumeApiResult(vo); + if (result.isSuccess()) { + vo.processEvent(Event.OperationSuccessed); + volDao.remove(vo.getId()); + } else { + vo.processEvent(Event.OperationFailed); + apiResult.setResult(result.getResult()); + } + context.getFuture().complete(apiResult); + return null; + } + + @Override + public boolean cloneVolume(long volumeId, long baseVolId) { + // TODO Auto-generated method stub + return false; + } + + @Override + public VolumeEntity getVolumeEntity(long volumeId) { + VolumeVO vo = volDao.findById(volumeId); + if (vo == null) { + return null; + } + + if (vo.getPoolId() == null) { + return new VolumeEntityImpl(VolumeObject.getVolumeObject(null, vo), this); + } else { + PrimaryDataStore dataStore = dataStoreMgr.getPrimaryDataStore(vo.getPoolId()); + return new VolumeEntityImpl(dataStore.getVolume(volumeId), this); + } + } + + class CreateBaseImageContext extends AsyncRpcConext { + private final VolumeInfo volume; + private final PrimaryDataStore dataStore; + private final TemplateInfo srcTemplate; + private final AsyncCallFuture future; + final DataObject destObj; + public CreateBaseImageContext(AsyncCompletionCallback callback, VolumeInfo volume, PrimaryDataStore datastore, + TemplateInfo srcTemplate, + AsyncCallFuture future, DataObject destObj) { + super(callback); + this.volume = volume; + this.dataStore = datastore; + this.future = future; + this.srcTemplate = srcTemplate; + this.destObj = destObj; + } + + public VolumeInfo getVolume() { + return this.volume; + } + + public PrimaryDataStore getDataStore() { + return this.dataStore; + } + + public TemplateInfo getSrcTemplate() { + return this.srcTemplate; + } + + public AsyncCallFuture getFuture() { + return this.future; + } + + } + + static class CreateBaseImageResult extends CommandResult { + final TemplateInfo template; + public CreateBaseImageResult(TemplateInfo template) { + super(); + this.template = template; + } + } + + @DB + protected void createBaseImageAsync(VolumeInfo volume, PrimaryDataStore dataStore, TemplateInfo template, AsyncCallFuture future) { + + DataObject templateOnPrimaryStoreObj = dataStore.create(template); + CreateBaseImageContext context = new CreateBaseImageContext(null, volume, + dataStore, + template, + future, templateOnPrimaryStoreObj); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setCallback(caller.getTarget().copyBaseImageCallback(null, null)) + .setContext(context); + + templateOnPrimaryStoreObj.processEvent(Event.CreateOnlyRequested); + + try { + motionSrv.copyAsync(template, templateOnPrimaryStoreObj, caller); + } catch (Exception e) { + s_logger.debug("failed to create template on storage", e); + templateOnPrimaryStoreObj.processEvent(Event.OperationFailed); + VolumeApiResult result = new VolumeApiResult(volume); + result.setResult(e.toString()); + caller.complete(result); + } + return; + } + + @DB + protected Void copyBaseImageCallback(AsyncCallbackDispatcher callback, CreateBaseImageContext context) { + CopyCommandResult result = callback.getResult(); + VolumeApiResult res = new VolumeApiResult(context.getVolume()); + + AsyncCallFuture future = context.getFuture(); + DataObject templateOnPrimaryStoreObj = context.destObj; + if (!result.isSuccess()) { + templateOnPrimaryStoreObj.processEvent(Event.OperationFailed); + res.setResult(result.getResult()); + future.complete(res); + return null; + } + + templateOnPrimaryStoreObj.processEvent(Event.OperationSuccessed); + createVolumeFromBaseImageAsync(context.volume, templateOnPrimaryStoreObj, context.dataStore, future); + return null; + } + + private class CreateVolumeFromBaseImageContext extends AsyncRpcConext { + private final VolumeObject vo; + private final AsyncCallFuture future; + private final DataStore primaryStore; + private final DataObject templateOnStore; + public CreateVolumeFromBaseImageContext(AsyncCompletionCallback callback, VolumeObject vo, + DataStore primaryStore, + DataObject templateOnStore, + AsyncCallFuture future) { + super(callback); + this.vo = vo; + this.future = future; + this.primaryStore = primaryStore; + this.templateOnStore = templateOnStore; + } + + + public AsyncCallFuture getFuture() { + return this.future; + } + } + + @DB + protected void createVolumeFromBaseImageAsync(VolumeInfo volume, DataObject templateOnPrimaryStore, PrimaryDataStore pd, AsyncCallFuture future) { + VolumeObject vo = (VolumeObject)volume; + CreateVolumeFromBaseImageContext context = new CreateVolumeFromBaseImageContext(null, vo, pd, templateOnPrimaryStore, future); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setCallback(caller.getTarget().copyBaseImageCallBack(null, null)) + .setContext(context); + + DataObject volumeOnPrimaryStorage = pd.create(volume); + volume.processEvent(Event.CreateOnlyRequested); + + motionSrv.copyAsync(context.templateOnStore, volumeOnPrimaryStorage, caller); + return; + } + + @DB + public Void copyBaseImageCallBack(AsyncCallbackDispatcher callback, CreateVolumeFromBaseImageContext context) { + VolumeObject vo = context.vo; + CopyCommandResult result = callback.getResult(); + VolumeApiResult volResult = new VolumeApiResult(vo); + + if (result.isSuccess()) { + if (result.getPath() != null) { + vo.setPath(result.getPath()); + } + vo.processEvent(Event.OperationSuccessed); + } else { + vo.processEvent(Event.OperationFailed); + volResult.setResult(result.getResult()); + } + + AsyncCallFuture future = context.getFuture(); + future.complete(volResult); + return null; + } + + @DB + @Override + public AsyncCallFuture createVolumeFromTemplateAsync(VolumeInfo volume, long dataStoreId, TemplateInfo template) { + PrimaryDataStore pd = dataStoreMgr.getPrimaryDataStore(dataStoreId); + TemplateInfo templateOnPrimaryStore = pd.getTemplate(template.getId()); + AsyncCallFuture future = new AsyncCallFuture(); + VolumeApiResult result = new VolumeApiResult(volume); + + if (templateOnPrimaryStore == null) { + createBaseImageAsync(volume, pd, template, future); + return future; + } + + createVolumeFromBaseImageAsync(volume, templateOnPrimaryStore, pd, future); + return future; + } + + @Override + @DB + public boolean destroyVolume(long volumeId) + throws ConcurrentOperationException { + + VolumeInfo vol = this.volFactory.getVolume(volumeId); + vol.processEvent(Event.DestroyRequested); + this.snapshotMgr.deletePoliciesForVolume(volumeId); + + vol.processEvent(Event.OperationSuccessed); + + return true; + } + + @Override + public AsyncCallFuture createVolumeFromSnapshot( + VolumeInfo volume, DataStore store, SnapshotInfo snapshot) { + AsyncCallFuture future = new AsyncCallFuture(); + + try { + DataObject volumeOnStore = store.create(volume); + volume.processEvent(Event.CreateOnlyRequested); + CreateVolumeFromBaseImageContext context = new CreateVolumeFromBaseImageContext(null, + (VolumeObject)volume, store, volumeOnStore, future); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setCallback(caller.getTarget().createVolumeFromSnapshotCallback(null, null)) + .setContext(context); + this.motionSrv.copyAsync(snapshot, volumeOnStore, caller); + } catch (Exception e) { + s_logger.debug("create volume from snapshot failed", e); + VolumeApiResult result = new VolumeApiResult(volume); + result.setResult(e.toString()); + future.complete(result); + } + + return future; + } + + protected Void createVolumeFromSnapshotCallback(AsyncCallbackDispatcher callback, + CreateVolumeFromBaseImageContext context) { + CopyCommandResult result = callback.getResult(); + VolumeInfo volume = context.vo; + VolumeApiResult apiResult = new VolumeApiResult(volume); + Event event = null; + if (result.isFailed()) { + apiResult.setResult(result.getResult()); + event = Event.OperationFailed; + } else { + event = Event.OperationSuccessed; + } + + try { + volume.processEvent(event); + } catch (Exception e) { + s_logger.debug("create volume from snapshot failed", e); + apiResult.setResult(e.toString()); + } + + AsyncCallFuture future = context.future; + future.complete(apiResult); + return null; + } + + protected VolumeVO duplicateVolumeOnAnotherStorage(Volume volume, StoragePool pool) { + Long lastPoolId = volume.getPoolId(); + VolumeVO newVol = new VolumeVO(volume); + newVol.setPoolId(pool.getId()); + newVol.setFolder(pool.getPath()); + newVol.setPodId(pool.getPodId()); + newVol.setPoolId(pool.getId()); + newVol.setLastPoolId(lastPoolId); + newVol.setPodId(pool.getPodId()); + return this.volDao.persist(newVol); + } + + + private class CopyVolumeContext extends AsyncRpcConext { + final VolumeInfo srcVolume; + final VolumeInfo destVolume; + final DataStore destStore; + final AsyncCallFuture future; + /** + * @param callback + */ + public CopyVolumeContext(AsyncCompletionCallback callback, AsyncCallFuture future, VolumeInfo srcVolume, VolumeInfo destVolume, + DataStore destStore) { + super(callback); + this.srcVolume = srcVolume; + this.destVolume = destVolume; + this.destStore = destStore; + this.future = future; + } + + } + @Override + public AsyncCallFuture copyVolume(VolumeInfo srcVolume, + DataStore destStore) { + AsyncCallFuture future = new AsyncCallFuture(); + VolumeApiResult res = new VolumeApiResult(srcVolume); + try { + if (!this.snapshotMgr.canOperateOnVolume(srcVolume)) { + s_logger.debug( + "There are snapshots creating on this volume, can not move this volume"); + + res.setResult("There are snapshots creating on this volume, can not move this volume"); + future.complete(res); + return future; + } + + VolumeVO destVol = duplicateVolumeOnAnotherStorage(srcVolume, (StoragePool)destStore); + VolumeInfo destVolume = this.volFactory.getVolume(destVol.getId(), destStore); + destVolume.processEvent(Event.CreateOnlyRequested); + srcVolume.processEvent(Event.CopyingRequested); + + CopyVolumeContext context = new CopyVolumeContext(null, future, srcVolume, + destVolume, + destStore); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setCallback(caller.getTarget().copyVolumeCallBack(null, null)) + .setContext(context); + this.motionSrv.copyAsync(srcVolume, destVolume, caller); + } catch (Exception e) { + s_logger.debug("Failed to copy volume", e); + res.setResult(e.toString()); + future.complete(res); + } + return future; + } + + protected Void copyVolumeCallBack(AsyncCallbackDispatcher callback, CopyVolumeContext context) { + VolumeInfo srcVolume = context.srcVolume; + VolumeInfo destVolume = context.destVolume; + CopyCommandResult result = callback.getResult(); + AsyncCallFuture future = context.future; + VolumeApiResult res = new VolumeApiResult(destVolume); + try { + if (result.isFailed()) { + res.setResult(result.getResult()); + destVolume.processEvent(Event.OperationFailed); + srcVolume.processEvent(Event.OperationFailed); + AsyncCallFuture destroyFuture = this.expungeVolumeAsync(destVolume); + destroyFuture.get(); + future.complete(res); + return null; + } + srcVolume.processEvent(Event.OperationSuccessed); + destVolume.processEvent(Event.OperationSuccessed); + AsyncCallFuture destroyFuture = this.expungeVolumeAsync(srcVolume); + destroyFuture.get(); + future.complete(res); + return null; + } catch (Exception e) { + s_logger.debug("Failed to process copy volume callback",e); + res.setResult(e.toString()); + future.complete(res); + } + + return null; + } + + @Override + public AsyncCallFuture registerVolume(VolumeInfo volume, DataStore store) { + + AsyncCallFuture future = new AsyncCallFuture(); + VolumeObject vo = (VolumeObject) volume; + + CreateVolumeContext context = new CreateVolumeContext(null, vo, future); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setCallback(caller.getTarget().registerVolumeCallback(null, null)) + .setContext(context); + + dataObjectMgr.createAsync(volume, store, caller, true); + return future; + } + + protected Void registerVolumeCallback(AsyncCallbackDispatcher callback, CreateVolumeContext context) { + CreateCmdResult result = callback.getResult(); + VolumeObject vo = (VolumeObject)context.volume; + /*if (result.isFailed()) { + vo.stateTransit(Volume.Event.OperationFailed); + } else { + vo.stateTransit(Volume.Event.OperationSucceeded); + }*/ + VolumeApiResult res = new VolumeApiResult(vo); + context.future.complete(res); + return null; + } + + + @Override + public AsyncCallFuture resize(VolumeInfo volume) { + AsyncCallFuture future = new AsyncCallFuture(); + VolumeApiResult result = new VolumeApiResult(volume); + try { + volume.processEvent(Event.ResizeRequested); + } catch (Exception e) { + s_logger.debug("Failed to change state to resize", e); + result.setResult(e.toString()); + future.complete(result); + return future; + } + CreateVolumeContext context = new CreateVolumeContext(null, volume, future); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setCallback(caller.getTarget().registerVolumeCallback(null, null)) + .setContext(context); + volume.getDataStore().getDriver().resize(volume, caller); + return future; + } + + protected Void resizeVolumeCallback(AsyncCallbackDispatcher callback, CreateVolumeContext context) { + CreateCmdResult result = callback.getResult(); + AsyncCallFuture future = context.future; + VolumeInfo volume = (VolumeInfo)context.volume; + + if (result.isFailed()) { + try { + volume.processEvent(Event.OperationFailed); + } catch (Exception e) { + s_logger.debug("Failed to change state", e); + } + VolumeApiResult res = new VolumeApiResult(volume); + res.setResult(result.getResult()); + future.complete(res); + return null; + } + + try { + volume.processEvent(Event.OperationSuccessed); + } catch(Exception e) { + s_logger.debug("Failed to change state", e); + VolumeApiResult res = new VolumeApiResult(volume); + res.setResult(result.getResult()); + future.complete(res); + return null; + } + + VolumeApiResult res = new VolumeApiResult(volume); + future.complete(res); + + return null; + } + + + +} diff --git a/engine/storage/volume/test/org/apache/cloudstack/storage/volume/test/ConfiguratorTest.java b/engine/storage/volume/test/org/apache/cloudstack/storage/volume/test/ConfiguratorTest.java new file mode 100644 index 000000000..122c3532a --- /dev/null +++ b/engine/storage/volume/test/org/apache/cloudstack/storage/volume/test/ConfiguratorTest.java @@ -0,0 +1,94 @@ +/* + * 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 org.apache.cloudstack.storage.volume.test; + +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.inject.Inject; +import javax.naming.ConfigurationException; + +import org.apache.cloudstack.engine.subsystem.api.storage.PrimaryDataStoreProvider; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.Mockito; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +import com.cloud.dc.ClusterVO; +import com.cloud.dc.dao.ClusterDao; +import com.cloud.hypervisor.Hypervisor.HypervisorType; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations="classpath:/testContext.xml") +public class ConfiguratorTest { + + @Inject + List providers; + + @Inject + ClusterDao clusterDao; + @Before + public void setup() { + /* ClusterVO cluster = new ClusterVO(); + cluster.setHypervisorType(HypervisorType.XenServer.toString()); + Mockito.when(clusterDao.findById(Mockito.anyLong())).thenReturn(cluster); + try { + providerMgr.configure("manager", null); + } catch (ConfigurationException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + }*/ + } + @Test + public void testLoadConfigurator() { + /*for (PrimaryDataStoreConfigurator configurator : configurators) { + System.out.println(configurator.getClass().getName()); + }*/ + } + + @Test + public void testProvider() { + for (PrimaryDataStoreProvider provider : providers) { + if (provider.getName().startsWith("default")) { + assertTrue(true); + } + } + } + + @Test + public void getProvider() { + // assertNotNull(providerMgr.getDataStoreProvider("default primary data store provider")); + } + + @Test + public void createDataStore() { + /*PrimaryDataStoreProvider provider = providerMgr.getDataStoreProvider("default primary data store provider"); + Map params = new HashMap(); + params.put("url", "nfs://localhost/mnt"); + params.put("clusterId", "1"); + params.put("name", "nfsprimary"); + assertNotNull(provider.registerDataStore(params));*/ + } +} diff --git a/engine/storage/volume/test/org/apache/cloudstack/storage/volume/test/Server.java b/engine/storage/volume/test/org/apache/cloudstack/storage/volume/test/Server.java new file mode 100644 index 000000000..f19d68e8e --- /dev/null +++ b/engine/storage/volume/test/org/apache/cloudstack/storage/volume/test/Server.java @@ -0,0 +1,40 @@ +/* + * 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 org.apache.cloudstack.storage.volume.test; + +import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher; + +public class Server { + Server1 svr; + public Server() { + svr = new Server1(); + } + void foo() { + // svr.foo1("foo", new AsyncCallbackDispatcher(this).setOperationName("callback").setContextParam("name", "foo")); + } + + void foocallback(AsyncCallbackDispatcher callback) { + /* + System.out.println(callback.getContextParam("name")); + String result = callback.getResult(); + System.out.println(result); + */ + } + +} diff --git a/engine/storage/volume/test/org/apache/cloudstack/storage/volume/test/Server1.java b/engine/storage/volume/test/org/apache/cloudstack/storage/volume/test/Server1.java new file mode 100644 index 000000000..bf56e6e4b --- /dev/null +++ b/engine/storage/volume/test/org/apache/cloudstack/storage/volume/test/Server1.java @@ -0,0 +1,27 @@ +/* + * 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 org.apache.cloudstack.storage.volume.test; + +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; + +public class Server1 { + public void foo1(String name, AsyncCompletionCallback callback) { + callback.complete("success"); + } +} diff --git a/engine/storage/volume/test/org/apache/cloudstack/storage/volume/test/TestConfiguration.java b/engine/storage/volume/test/org/apache/cloudstack/storage/volume/test/TestConfiguration.java new file mode 100644 index 000000000..1d3202f12 --- /dev/null +++ b/engine/storage/volume/test/org/apache/cloudstack/storage/volume/test/TestConfiguration.java @@ -0,0 +1,41 @@ +/* + * 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 org.apache.cloudstack.storage.volume.test; + +import org.apache.cloudstack.storage.image.motion.ImageMotionService; + +import org.mockito.Mockito; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; + +import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.dao.ClusterDaoImpl; + +@Configuration +public class TestConfiguration { + @Bean + public ImageMotionService imageMotion() { + return Mockito.mock(ImageMotionService.class); + } + + @Bean + public ClusterDao clusterDao() { + return Mockito.mock(ClusterDaoImpl.class); + } +} \ No newline at end of file diff --git a/engine/storage/volume/test/org/apache/cloudstack/storage/volume/test/TestInProcessAsync.java b/engine/storage/volume/test/org/apache/cloudstack/storage/volume/test/TestInProcessAsync.java new file mode 100644 index 000000000..674187179 --- /dev/null +++ b/engine/storage/volume/test/org/apache/cloudstack/storage/volume/test/TestInProcessAsync.java @@ -0,0 +1,40 @@ +/* + * 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 org.apache.cloudstack.storage.volume.test; + +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations="classpath:/resource/testContext.xml") +public class TestInProcessAsync { + Server svr; + @Before + public void setup() { + svr = new Server(); + } + + @Test + public void testRpc() { + svr.foo(); + } +} diff --git a/engine/storage/volume/test/resource/testContext.xml b/engine/storage/volume/test/resource/testContext.xml new file mode 100644 index 000000000..67f242273 --- /dev/null +++ b/engine/storage/volume/test/resource/testContext.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + org.apache.cloudstack.framework + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/framework/api/pom.xml b/framework/api/pom.xml new file mode 100644 index 000000000..5260ebc4b --- /dev/null +++ b/framework/api/pom.xml @@ -0,0 +1,42 @@ + + + 4.0.0 + cloud-framework-api + + org.apache.cloudstack + cloudstack-framework + 4.2.0-SNAPSHOT + ../pom.xml + + + + + org.apache.cloudstack + cloud-utils + 4.2.0-SNAPSHOT + + + + + + install + src + ${project.basedir}/test + + + ${project.basedir}/test/resources + + + + diff --git a/framework/api/src/org/apache/cloudstack/framework/async/AsyncCallFuture.java b/framework/api/src/org/apache/cloudstack/framework/async/AsyncCallFuture.java new file mode 100644 index 000000000..57489ffea --- /dev/null +++ b/framework/api/src/org/apache/cloudstack/framework/async/AsyncCallFuture.java @@ -0,0 +1,84 @@ +/* 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 org.apache.cloudstack.framework.async; + +import java.util.concurrent.ExecutionException; +import java.util.concurrent.Future; +import java.util.concurrent.TimeUnit; +import java.util.concurrent.TimeoutException; + +public class AsyncCallFuture implements Future, AsyncCompletionCallback { + + Object _completed = new Object(); + boolean _done = false; + T _resultObject; // we will store a copy of the result object + + public AsyncCallFuture() { + } + + @Override + public boolean cancel(boolean mayInterruptIfRunning) { + // TODO we don't support cancel yet + return false; + } + + @Override + public T get() throws InterruptedException, ExecutionException { + synchronized(_completed) { + if(!_done) + _completed.wait(); + } + + return _resultObject; + } + + @Override + public T get(long timeout, TimeUnit timeUnit) throws InterruptedException, + ExecutionException, TimeoutException { + + TimeUnit milliSecondsUnit = TimeUnit.MILLISECONDS; + + synchronized(_completed) { + if(!_done) + _completed.wait(milliSecondsUnit.convert(timeout, timeUnit)); + } + + return _resultObject; + } + + @Override + public boolean isCancelled() { + // TODO we don't support cancel yet + return false; + } + + @Override + public boolean isDone() { + return _done; + } + + @Override + public void complete(T resultObject) { + _resultObject = resultObject; + synchronized(_completed) { + _done = true; + _completed.notifyAll(); + } + } +} + diff --git a/framework/api/src/org/apache/cloudstack/framework/async/AsyncCompletionCallback.java b/framework/api/src/org/apache/cloudstack/framework/async/AsyncCompletionCallback.java new file mode 100644 index 000000000..7cdf5fed4 --- /dev/null +++ b/framework/api/src/org/apache/cloudstack/framework/async/AsyncCompletionCallback.java @@ -0,0 +1,23 @@ +/* + * 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 org.apache.cloudstack.framework.async; + +public interface AsyncCompletionCallback { + void complete(T resultObject); +} diff --git a/framework/events/pom.xml b/framework/events/pom.xml index ef812e5a0..7c788c35b 100644 --- a/framework/events/pom.xml +++ b/framework/events/pom.xml @@ -20,11 +20,11 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 cloud-framework-events - Apache CloudStack Event Notification Framework + Apache CloudStack Framework - Event Notification org.apache.cloudstack cloudstack-framework - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT ../pom.xml diff --git a/framework/events/src/org/apache/cloudstack/framework/events/EventBus.java b/framework/events/src/org/apache/cloudstack/framework/events/EventBus.java index c16ee6f96..b83e3b28a 100644 --- a/framework/events/src/org/apache/cloudstack/framework/events/EventBus.java +++ b/framework/events/src/org/apache/cloudstack/framework/events/EventBus.java @@ -19,15 +19,13 @@ package org.apache.cloudstack.framework.events; -import com.cloud.utils.component.Adapter; - import java.util.UUID; /** * Interface to publish and subscribe to CloudStack events * */ -public interface EventBus extends Adapter{ +public interface EventBus { /** * publish an event on to the event bus diff --git a/framework/events/src/org/apache/cloudstack/framework/events/EventSubscriber.java b/framework/events/src/org/apache/cloudstack/framework/events/EventSubscriber.java index b1c30c215..511ebff17 100644 --- a/framework/events/src/org/apache/cloudstack/framework/events/EventSubscriber.java +++ b/framework/events/src/org/apache/cloudstack/framework/events/EventSubscriber.java @@ -1,21 +1,19 @@ -/* - * 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/LICENSE2.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. - */ +// 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 org.apache.cloudstack.framework.events; diff --git a/framework/ipc/pom.xml b/framework/ipc/pom.xml new file mode 100644 index 000000000..b7f4fcc78 --- /dev/null +++ b/framework/ipc/pom.xml @@ -0,0 +1,49 @@ + + + 4.0.0 + cloud-framework-ipc + Apache CloudStack Framework - IPC + + org.apache.cloudstack + cloudstack-framework + 4.2.0-SNAPSHOT + ../pom.xml + + + + + org.apache.cloudstack + cloud-core + 4.2.0-SNAPSHOT + + + + org.apache.cloudstack + cloud-utils + 4.2.0-SNAPSHOT + + + + + + install + src + ${project.basedir}/test + + + ${project.basedir}/test/resources + + + + diff --git a/framework/ipc/src/org/apache/cloudstack/framework/async/AsyncCallbackDispatcher.java b/framework/ipc/src/org/apache/cloudstack/framework/async/AsyncCallbackDispatcher.java new file mode 100644 index 000000000..26f46da37 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/async/AsyncCallbackDispatcher.java @@ -0,0 +1,136 @@ +/* + * 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 org.apache.cloudstack.framework.async; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import net.sf.cglib.proxy.CallbackFilter; +import net.sf.cglib.proxy.Callback; +import net.sf.cglib.proxy.Enhancer; +import net.sf.cglib.proxy.MethodInterceptor; +import net.sf.cglib.proxy.MethodProxy; + +@SuppressWarnings("rawtypes") +public class AsyncCallbackDispatcher implements AsyncCompletionCallback { + private Method _callbackMethod; + private T _targetObject; + private Object _contextObject; + private Object _resultObject; + private AsyncCallbackDriver _driver = new InplaceAsyncCallbackDriver(); + + private AsyncCallbackDispatcher(T target) { + assert(target != null); + _targetObject = target; + } + + public AsyncCallbackDispatcher attachDriver(AsyncCallbackDriver driver) { + assert(driver != null); + _driver = driver; + + return this; + } + + public Method getCallbackMethod() { + return _callbackMethod; + } + + @SuppressWarnings("unchecked") + public T getTarget() { + Enhancer en = new Enhancer(); + en.setSuperclass(_targetObject.getClass()); + en.setCallbacks(new Callback[]{new MethodInterceptor() { + @Override + public Object intercept(Object arg0, Method arg1, Object[] arg2, + MethodProxy arg3) throws Throwable { + _callbackMethod = arg1; + _callbackMethod.setAccessible(true); + return null; + } + }, + new MethodInterceptor() { + @Override + public Object intercept(Object arg0, Method arg1, Object[] arg2, + MethodProxy arg3) throws Throwable { + return null; + } + } + }); + en.setCallbackFilter(new CallbackFilter() { + public int accept(Method method) { + if (method.getParameterTypes().length == 0 && method.getName().equals("finalize")) { + return 1; + } + return 0; + }} + ); + return (T)en.create(); + } + + public AsyncCallbackDispatcher setCallback(Object useless) { + return this; + } + + public AsyncCallbackDispatcher setContext(Object context) { + _contextObject = context; + return this; + } + + @SuppressWarnings("unchecked") + public

P getContext() { + return (P)_contextObject; + } + + public void complete(Object resultObject) { + _resultObject = resultObject; + _driver.performCompletionCallback(this); + } + + @SuppressWarnings("unchecked") + public R getResult() { + return (R)_resultObject; + } + + // for internal use + Object getTargetObject() { + return _targetObject; + } + + public static AsyncCallbackDispatcher create(P target) { + return new AsyncCallbackDispatcher(target); + } + + public static boolean dispatch(Object target, AsyncCallbackDispatcher callback) { + assert(callback != null); + assert(target != null); + + try { + callback.getCallbackMethod().invoke(target, callback, callback.getContext()); + } catch (IllegalArgumentException e) { + throw new RuntimeException("IllegalArgumentException when invoking RPC callback for command: " + callback.getCallbackMethod().getName()); + } catch (IllegalAccessException e) { + throw new RuntimeException("IllegalAccessException when invoking RPC callback for command: " + callback.getCallbackMethod().getName()); + } catch (InvocationTargetException e) { + throw new RuntimeException("InvocationTargetException when invoking RPC callback for command: " + callback.getCallbackMethod().getName(), e); + } + + return true; + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/async/AsyncCallbackDriver.java b/framework/ipc/src/org/apache/cloudstack/framework/async/AsyncCallbackDriver.java new file mode 100644 index 000000000..d14f1a7a5 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/async/AsyncCallbackDriver.java @@ -0,0 +1,24 @@ +/* + * 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 org.apache.cloudstack.framework.async; + + +public interface AsyncCallbackDriver { + public void performCompletionCallback(AsyncCallbackDispatcher dispatcher); +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/async/AsyncRpcConext.java b/framework/ipc/src/org/apache/cloudstack/framework/async/AsyncRpcConext.java new file mode 100644 index 000000000..102364c93 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/async/AsyncRpcConext.java @@ -0,0 +1,30 @@ +/* + * 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 org.apache.cloudstack.framework.async; + +public class AsyncRpcConext { + protected final AsyncCompletionCallback parentCallBack; + public AsyncRpcConext(AsyncCompletionCallback callback) { + this.parentCallBack = callback; + } + + public AsyncCompletionCallback getParentCallback() { + return this.parentCallBack; + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/async/InplaceAsyncCallbackDriver.java b/framework/ipc/src/org/apache/cloudstack/framework/async/InplaceAsyncCallbackDriver.java new file mode 100644 index 000000000..ece9121f2 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/async/InplaceAsyncCallbackDriver.java @@ -0,0 +1,28 @@ +/* + * 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 org.apache.cloudstack.framework.async; + + +public class InplaceAsyncCallbackDriver implements AsyncCallbackDriver { + + @Override + public void performCompletionCallback(AsyncCallbackDispatcher callback) { + AsyncCallbackDispatcher.dispatch(callback.getTargetObject(), callback); + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/async/Void.java b/framework/ipc/src/org/apache/cloudstack/framework/async/Void.java new file mode 100644 index 000000000..b4c6d4a17 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/async/Void.java @@ -0,0 +1,27 @@ +/* + * 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 org.apache.cloudstack.framework.async; + +/** + * This is place-holder class to help AsyncMethod to indicate void return value + * public void AsyncMethod(Object realParam, AsyncCompletionCallback callback) { + * + */ +public class Void { +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/client/ClientEventBus.java b/framework/ipc/src/org/apache/cloudstack/framework/client/ClientEventBus.java new file mode 100644 index 000000000..7930bf2fe --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/client/ClientEventBus.java @@ -0,0 +1,31 @@ +/* + * 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 org.apache.cloudstack.framework.client; + +import org.apache.cloudstack.framework.eventbus.EventBusBase; +import org.apache.cloudstack.framework.transport.TransportMultiplexier; + +public class ClientEventBus extends EventBusBase implements TransportMultiplexier { + + @Override + public void onTransportMessage(String senderEndpointAddress, + String targetEndpointAddress, String multiplexer, String message) { + // TODO Auto-generated method stub + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportConnection.java b/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportConnection.java new file mode 100644 index 000000000..34cd5efeb --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportConnection.java @@ -0,0 +1,81 @@ +/* + * 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 org.apache.cloudstack.framework.client; + +import java.util.ArrayList; +import java.util.List; + +import org.apache.cloudstack.framework.transport.TransportAddress; +import org.apache.cloudstack.framework.transport.TransportAttachResponsePdu; +import org.apache.cloudstack.framework.transport.TransportConnectResponsePdu; +import org.apache.cloudstack.framework.transport.TransportPdu; + +public class ClientTransportConnection { + enum State { + Idle, + Connecting, + Open, + Closing + } + + private ClientTransportProvider _provider; + + // TODO, use state machine + private State _state = State.Idle; + + private TransportAddress _connectionTpAddress; + private List _outputQueue = new ArrayList(); + + public ClientTransportConnection(ClientTransportProvider provider) { + _provider = provider; + } + + public void connect(String serverAddress, int serverPort) { + boolean doConnect = false; + synchronized(this) { + if(_state == State.Idle) { + setState(State.Connecting); + doConnect = true; + } + } + + if(doConnect) { + // ??? + } + } + + public void handleConnectResponsePdu(TransportConnectResponsePdu pdu) { + // TODO assume it is always succeeds + _connectionTpAddress = TransportAddress.fromAddressString(pdu.getDestAddress()); + + // ??? + } + + public void handleAttachResponsePdu(TransportAttachResponsePdu pdu) { + // ??? + } + + private void setState(State state) { + synchronized(this) { + if(_state != state) { + _state = state; + } + } + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportEndpoint.java b/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportEndpoint.java new file mode 100644 index 000000000..37fe5af41 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportEndpoint.java @@ -0,0 +1,40 @@ +/* + * 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 org.apache.cloudstack.framework.client; + +import org.apache.cloudstack.framework.transport.TransportEndpoint; + +public class ClientTransportEndpoint implements TransportEndpoint { + + @Override + public void onAttachConfirm(boolean bSuccess, String endpointAddress) { + // TODO Auto-generated method stub + } + + @Override + public void onDetachIndication(String endpointAddress) { + } + + @Override + public void onTransportMessage(String senderEndpointAddress, + String targetEndpointAddress, String multiplexer, String message) { + // TODO Auto-generated method stub + + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportEndpointSite.java b/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportEndpointSite.java new file mode 100644 index 000000000..d75c5b663 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportEndpointSite.java @@ -0,0 +1,47 @@ +/* + * 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 org.apache.cloudstack.framework.client; + +import org.apache.cloudstack.framework.transport.TransportEndpoint; +import org.apache.cloudstack.framework.transport.TransportEndpointSite; +import org.apache.cloudstack.framework.transport.TransportProvider; + +public class ClientTransportEndpointSite extends TransportEndpointSite { + private String _predefinedAddress; + private int _providerKey; + + public ClientTransportEndpointSite(TransportProvider provider, TransportEndpoint endpoint, String predefinedAddress, int providerKey) { + super(provider, endpoint); + + _predefinedAddress = predefinedAddress; + _providerKey = providerKey; + } + + public String getPredefinedAddress() { + return _predefinedAddress; + } + + public int getProviderKey() { + return _providerKey; + } + + public void setProviderKey(int providerKey) { + _providerKey = providerKey; + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportProvider.java b/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportProvider.java new file mode 100644 index 000000000..bd93824ea --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/client/ClientTransportProvider.java @@ -0,0 +1,140 @@ +/* + * 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 org.apache.cloudstack.framework.client; + +import java.util.HashMap; +import java.util.Map; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import org.apache.cloudstack.framework.serializer.MessageSerializer; +import org.apache.cloudstack.framework.transport.TransportEndpoint; +import org.apache.cloudstack.framework.transport.TransportEndpointSite; +import org.apache.cloudstack.framework.transport.TransportProvider; + +import com.cloud.utils.concurrency.NamedThreadFactory; + +public class ClientTransportProvider implements TransportProvider { + public static final int DEFAULT_WORKER_POOL_SIZE = 5; + + private Map _endpointSites = new HashMap(); + private Map _attachedMap = new HashMap(); + + private MessageSerializer _messageSerializer; + + private ClientTransportConnection _connection; + private String _serverAddress; + private int _serverPort; + + private int _poolSize = DEFAULT_WORKER_POOL_SIZE; + private ExecutorService _executor; + + private int _nextProviderKey = 1; + + public ClientTransportProvider() { + } + + public ClientTransportProvider setPoolSize(int poolSize) { + _poolSize = poolSize; + return this; + } + + public void initialize(String serverAddress, int serverPort) { + _serverAddress = serverAddress; + _serverPort = serverPort; + + _executor = Executors.newFixedThreadPool(_poolSize, new NamedThreadFactory("Transport-Worker")); + _connection = new ClientTransportConnection(this); + + _executor.execute(new Runnable() { + + @Override + public void run() { + try { + _connection.connect(_serverAddress, _serverPort); + } catch(Throwable e) { + } + } + }); + } + + @Override + public TransportEndpointSite attach(TransportEndpoint endpoint, String predefinedAddress) { + + ClientTransportEndpointSite endpointSite; + synchronized(this) { + endpointSite = getEndpointSite(endpoint); + if(endpointSite != null) { + // already attached + return endpointSite; + } + + endpointSite = new ClientTransportEndpointSite(this, endpoint, predefinedAddress, getNextProviderKey()); + _endpointSites.put(endpointSite.getProviderKey(), endpointSite); + } + + return endpointSite; + } + + @Override + public boolean detach(TransportEndpoint endpoint) { + // TODO Auto-generated method stub + + return false; + } + + @Override + public void setMessageSerializer(MessageSerializer messageSerializer) { + assert(messageSerializer != null); + _messageSerializer = messageSerializer; + } + + @Override + public MessageSerializer getMessageSerializer() { + return _messageSerializer; + } + + @Override + public void requestSiteOutput(TransportEndpointSite site) { + // ??? + } + + @Override + public void sendMessage(String soureEndpointAddress, String targetEndpointAddress, + String multiplexier, String message) { + // TODO + } + + private ClientTransportEndpointSite getEndpointSite(TransportEndpoint endpoint) { + synchronized(this) { + for(ClientTransportEndpointSite endpointSite : _endpointSites.values()) { + if(endpointSite.getEndpoint() == endpoint) + return endpointSite; + } + } + + return null; + } + + public int getNextProviderKey() { + synchronized(this) { + return _nextProviderKey++; + } + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/eventbus/EventBus.java b/framework/ipc/src/org/apache/cloudstack/framework/eventbus/EventBus.java new file mode 100644 index 000000000..200715c39 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/eventbus/EventBus.java @@ -0,0 +1,32 @@ +/* + * 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 org.apache.cloudstack.framework.eventbus; + +import org.apache.cloudstack.framework.serializer.MessageSerializer; + +public interface EventBus { + void setMessageSerializer(MessageSerializer messageSerializer); + MessageSerializer getMessageSerializer(); + + void subscribe(String subject, Subscriber subscriber); + void unsubscribe(String subject, Subscriber subscriber); + + void publish(String senderAddress, String subject, PublishScope scope, Object args); +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/eventbus/EventBusBase.java b/framework/ipc/src/org/apache/cloudstack/framework/eventbus/EventBusBase.java new file mode 100644 index 000000000..30a847f0f --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/eventbus/EventBusBase.java @@ -0,0 +1,308 @@ +/* + * 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 org.apache.cloudstack.framework.eventbus; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.cloudstack.framework.serializer.MessageSerializer; + +public class EventBusBase implements EventBus { + + private Gate _gate; + private List _pendingActions; + + private SubscriptionNode _subscriberRoot; + private MessageSerializer _messageSerializer; + + public EventBusBase() { + _gate = new Gate(); + _pendingActions = new ArrayList(); + + _subscriberRoot = new SubscriptionNode("/", null); + } + + @Override + public void setMessageSerializer(MessageSerializer messageSerializer) { + _messageSerializer = messageSerializer; + } + + @Override + public MessageSerializer getMessageSerializer() { + return _messageSerializer; + } + + @Override + public void subscribe(String subject, Subscriber subscriber) { + assert(subject != null); + assert(subscriber != null); + if(_gate.enter()) { + SubscriptionNode current = locate(subject, null, true); + assert(current != null); + current.addSubscriber(subscriber); + _gate.leave(); + } else { + synchronized(_pendingActions) { + _pendingActions.add(new ActionRecord(ActionType.Subscribe, subject, subscriber)); + } + } + } + + @Override + public void unsubscribe(String subject, Subscriber subscriber) { + if(_gate.enter()) { + SubscriptionNode current = locate(subject, null, false); + if(current != null) + current.removeSubscriber(subscriber); + + _gate.leave(); + } else { + synchronized(_pendingActions) { + _pendingActions.add(new ActionRecord(ActionType.Unsubscribe, subject, subscriber)); + } + } + } + + @Override + public void publish(String senderAddress, String subject, PublishScope scope, + Object args) { + + if(_gate.enter(true)) { + + List chainFromTop = new ArrayList(); + SubscriptionNode current = locate(subject, chainFromTop, false); + + if(current != null) + current.notifySubscribers(senderAddress, subject, args); + + Collections.reverse(chainFromTop); + for(SubscriptionNode node : chainFromTop) + node.notifySubscribers(senderAddress, subject, args); + + _gate.leave(); + } + } + + private void onGateOpen() { + synchronized(_pendingActions) { + ActionRecord record = null; + if(_pendingActions.size() > 0) { + while((record = _pendingActions.remove(0)) != null) { + switch(record.getType()) { + case Subscribe : + { + SubscriptionNode current = locate(record.getSubject(), null, true); + assert(current != null); + current.addSubscriber(record.getSubscriber()); + } + break; + + case Unsubscribe : + { + SubscriptionNode current = locate(record.getSubject(), null, false); + if(current != null) + current.removeSubscriber(record.getSubscriber()); + } + break; + + default : + assert(false); + break; + + } + } + } + } + } + + + private SubscriptionNode locate(String subject, List chainFromTop, + boolean createPath) { + + assert(subject != null); + + String[] subjectPathTokens = subject.split("\\."); + return locate(subjectPathTokens, _subscriberRoot, chainFromTop, createPath); + } + + private static SubscriptionNode locate(String[] subjectPathTokens, + SubscriptionNode current, List chainFromTop, boolean createPath) { + + assert(current != null); + assert(subjectPathTokens != null); + assert(subjectPathTokens.length > 0); + + if(chainFromTop != null) + chainFromTop.add(current); + + SubscriptionNode next = current.getChild(subjectPathTokens[0]); + if(next == null) { + if(createPath) { + next = new SubscriptionNode(subjectPathTokens[0], null); + current.addChild(subjectPathTokens[0], next); + } else { + return null; + } + } + + if(subjectPathTokens.length > 1) { + return locate((String[])Arrays.copyOfRange(subjectPathTokens, 1, subjectPathTokens.length), + next, chainFromTop, createPath); + } else { + return next; + } + } + + + // + // Support inner classes + // + private static enum ActionType { + Subscribe, + Unsubscribe + } + + private static class ActionRecord { + private ActionType _type; + private String _subject; + private Subscriber _subscriber; + + public ActionRecord(ActionType type, String subject, Subscriber subscriber) { + _type = type; + _subject = subject; + _subscriber = subscriber; + } + + public ActionType getType() { + return _type; + } + + public String getSubject() { + return _subject; + } + + public Subscriber getSubscriber() { + return _subscriber; + } + } + + private class Gate { + private int _reentranceCount; + private Thread _gateOwner; + + public Gate() { + _reentranceCount = 0; + _gateOwner = null; + } + + public boolean enter() { + return enter(false); + } + + public boolean enter(boolean wait) { + while(true) { + synchronized(this) { + if(_reentranceCount == 0) { + assert(_gateOwner == null); + + _reentranceCount++; + _gateOwner = Thread.currentThread(); + return true; + } else { + if(wait) { + try { + wait(); + } catch (InterruptedException e) { + } + } else { + break; + } + } + } + } + + return false; + } + + public void leave() { + synchronized(this) { + if(_reentranceCount > 0) { + assert(_gateOwner == Thread.currentThread()); + + onGateOpen(); + _reentranceCount--; + assert(_reentranceCount == 0); + _gateOwner = null; + + notifyAll(); + } + } + } + } + + private static class SubscriptionNode { + @SuppressWarnings("unused") + private String _nodeKey; + private List _subscribers; + private Map _children; + + public SubscriptionNode(String nodeKey, Subscriber subscriber) { + assert(nodeKey != null); + _nodeKey = nodeKey; + _subscribers = new ArrayList(); + + if(subscriber != null) + _subscribers.add(subscriber); + + _children = new HashMap(); + } + + @SuppressWarnings("unused") + public List getSubscriber() { + return _subscribers; + } + + public void addSubscriber(Subscriber subscriber) { + _subscribers.add(subscriber); + } + + public void removeSubscriber(Subscriber subscriber) { + _subscribers.remove(subscriber); + } + + public SubscriptionNode getChild(String key) { + return _children.get(key); + } + + public void addChild(String key, SubscriptionNode childNode) { + _children.put(key, childNode); + } + + public void notifySubscribers(String senderAddress, String subject, Object args) { + for(Subscriber subscriber : _subscribers) { + subscriber.onPublishEvent(senderAddress, subject, args); + } + } + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/eventbus/EventBusEndpoint.java b/framework/ipc/src/org/apache/cloudstack/framework/eventbus/EventBusEndpoint.java new file mode 100644 index 000000000..19a9b03da --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/eventbus/EventBusEndpoint.java @@ -0,0 +1,61 @@ +/* + * 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 org.apache.cloudstack.framework.eventbus; + + +public class EventBusEndpoint { + private EventBus _eventBus; + private String _sender; + private PublishScope _scope; + + public EventBusEndpoint(EventBus eventBus, String sender, PublishScope scope) { + _eventBus = eventBus; + _sender = sender; + _scope = scope; + } + + public EventBusEndpoint setEventBus(EventBus eventBus) { + _eventBus = eventBus; + return this; + } + + public EventBusEndpoint setScope(PublishScope scope) { + _scope = scope; + return this; + } + + public PublishScope getScope() { + return _scope; + } + + public EventBusEndpoint setSender(String sender) { + _sender = sender; + return this; + } + + public String getSender() { + return _sender; + } + + public void Publish(String subject, Object args) { + assert(_eventBus != null); + _eventBus.publish(_sender, subject, _scope, args); + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/eventbus/EventDispatcher.java b/framework/ipc/src/org/apache/cloudstack/framework/eventbus/EventDispatcher.java new file mode 100644 index 000000000..336a994a6 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/eventbus/EventDispatcher.java @@ -0,0 +1,104 @@ +/* + * 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 org.apache.cloudstack.framework.eventbus; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; + + +public class EventDispatcher implements Subscriber { + private static Map, Method> s_handlerCache = new HashMap, Method>(); + + private static Map s_targetMap = new HashMap(); + private Object _targetObject; + + public EventDispatcher(Object targetObject) { + _targetObject = targetObject; + } + + @Override + public void onPublishEvent(String senderAddress, String subject, Object args) { + dispatch(_targetObject, subject, senderAddress, args); + } + + public static EventDispatcher getDispatcher(Object targetObject) { + EventDispatcher dispatcher; + synchronized(s_targetMap) { + dispatcher = s_targetMap.get(targetObject); + if(dispatcher == null) { + dispatcher = new EventDispatcher(targetObject); + s_targetMap.put(targetObject, dispatcher); + } + } + return dispatcher; + } + + public static void removeDispatcher(Object targetObject) { + synchronized(s_targetMap) { + s_targetMap.remove(targetObject); + } + } + + public static boolean dispatch(Object target, String subject, String senderAddress, Object args) { + assert(subject != null); + assert(target != null); + + Method handler = resolveHandler(target.getClass(), subject); + if(handler == null) + return false; + + try { + handler.invoke(target, subject, senderAddress, args); + } catch (IllegalArgumentException e) { + throw new RuntimeException("IllegalArgumentException when invoking event handler for subject: " + subject); + } catch (IllegalAccessException e) { + throw new RuntimeException("IllegalAccessException when invoking event handler for subject: " + subject); + } catch (InvocationTargetException e) { + throw new RuntimeException("InvocationTargetException when invoking event handler for subject: " + subject); + } + + return true; + } + + public static Method resolveHandler(Class handlerClz, String subject) { + synchronized(s_handlerCache) { + Method handler = s_handlerCache.get(handlerClz); + if(handler != null) + return handler; + + for(Method method : handlerClz.getMethods()) { + EventHandler annotation = method.getAnnotation(EventHandler.class); + if(annotation != null) { + if(match(annotation.topic(), subject)) { + s_handlerCache.put(handlerClz, method); + return method; + } + } + } + } + + return null; + } + + private static boolean match(String expression, String param) { + return param.matches(expression); + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/eventbus/EventHandler.java b/framework/ipc/src/org/apache/cloudstack/framework/eventbus/EventHandler.java new file mode 100644 index 000000000..1ed3a00b9 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/eventbus/EventHandler.java @@ -0,0 +1,30 @@ +/* + * 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 org.apache.cloudstack.framework.eventbus; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface EventHandler { + public String topic(); +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/eventbus/PublishScope.java b/framework/ipc/src/org/apache/cloudstack/framework/eventbus/PublishScope.java new file mode 100644 index 000000000..539a242a5 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/eventbus/PublishScope.java @@ -0,0 +1,24 @@ +/* + * 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 org.apache.cloudstack.framework.eventbus; + +public enum PublishScope { + LOCAL, GLOBAL +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/eventbus/Subscriber.java b/framework/ipc/src/org/apache/cloudstack/framework/eventbus/Subscriber.java new file mode 100644 index 000000000..28b86de05 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/eventbus/Subscriber.java @@ -0,0 +1,24 @@ +/* + * 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 org.apache.cloudstack.framework.eventbus; + +public interface Subscriber { + void onPublishEvent(String senderAddress, String subject, Object args); +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcCallRequestPdu.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcCallRequestPdu.java new file mode 100644 index 000000000..b85316e81 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcCallRequestPdu.java @@ -0,0 +1,68 @@ +/* + * 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 org.apache.cloudstack.framework.rpc; + +import org.apache.cloudstack.framework.serializer.OnwireName; + +@OnwireName(name="RpcRequest") +public class RpcCallRequestPdu { + + private long requestTag; + private long requestStartTick; + + private String command; + private String serializedCommandArg; + + public RpcCallRequestPdu() { + requestTag = 0; + requestStartTick = System.currentTimeMillis(); + } + + public long getRequestTag() { + return requestTag; + } + + public void setRequestTag(long requestTag) { + this.requestTag = requestTag; + } + + public long getRequestStartTick() { + return requestStartTick; + } + + public void setRequestStartTick(long requestStartTick) { + this.requestStartTick = requestStartTick; + } + + public String getCommand() { + return command; + } + + public void setCommand(String command) { + this.command = command; + } + + public String getSerializedCommandArg() { + return serializedCommandArg; + } + + public void setSerializedCommandArg(String serializedCommandArg) { + this.serializedCommandArg = serializedCommandArg; + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcCallResponsePdu.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcCallResponsePdu.java new file mode 100644 index 000000000..f6cd0a0f2 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcCallResponsePdu.java @@ -0,0 +1,80 @@ +/* + * 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 org.apache.cloudstack.framework.rpc; + +import org.apache.cloudstack.framework.serializer.OnwireName; + +@OnwireName(name="RpcResponse") +public class RpcCallResponsePdu { + public static final int RESULT_SUCCESSFUL = 0; + public static final int RESULT_HANDLER_NOT_EXIST = 1; + public static final int RESULT_HANDLER_EXCEPTION = 2; + + private long requestTag; + private long requestStartTick; + + private int result; + private String command; + private String serializedResult; + + public RpcCallResponsePdu() { + requestTag = 0; + requestStartTick = 0; + } + + public long getRequestTag() { + return requestTag; + } + + public void setRequestTag(long requestTag) { + this.requestTag = requestTag; + } + + public long getRequestStartTick() { + return requestStartTick; + } + + public void setRequestStartTick(long requestStartTick) { + this.requestStartTick = requestStartTick; + } + + public int getResult() { + return result; + } + + public void setResult(int result) { + this.result = result; + } + + public String getCommand() { + return command; + } + + public void setCommand(String command) { + this.command = command; + } + + public String getSerializedResult() { + return serializedResult; + } + + public void setSerializedResult(String serializedResult) { + this.serializedResult = serializedResult; + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcCallbackDispatcher.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcCallbackDispatcher.java new file mode 100644 index 000000000..828a772b7 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcCallbackDispatcher.java @@ -0,0 +1,74 @@ +/* + * 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 org.apache.cloudstack.framework.rpc; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; + +import net.sf.cglib.proxy.Enhancer; +import net.sf.cglib.proxy.MethodInterceptor; +import net.sf.cglib.proxy.MethodProxy; + +public class RpcCallbackDispatcher { + private Method _callbackMethod; + private T _targetObject; + + private RpcCallbackDispatcher(T target) { + _targetObject = target; + } + + @SuppressWarnings("unchecked") + public T getTarget() { + return (T)Enhancer.create(_targetObject.getClass(), new MethodInterceptor() { + @Override + public Object intercept(Object arg0, Method arg1, Object[] arg2, + MethodProxy arg3) throws Throwable { + _callbackMethod = arg1; + return null; + } + }); + } + + public RpcCallbackDispatcher setCallback(Object useless) { + return this; + } + + public static

RpcCallbackDispatcher

create(P target) { + return new RpcCallbackDispatcher

(target); + } + + public boolean dispatch(RpcClientCall clientCall) { + assert(clientCall != null); + + if(_callbackMethod == null) + return false; + + try { + _callbackMethod.invoke(_targetObject, clientCall, clientCall.getContext()); + } catch (IllegalArgumentException e) { + throw new RpcException("IllegalArgumentException when invoking RPC callback for command: " + clientCall.getCommand()); + } catch (IllegalAccessException e) { + throw new RpcException("IllegalAccessException when invoking RPC callback for command: " + clientCall.getCommand()); + } catch (InvocationTargetException e) { + throw new RpcException("InvocationTargetException when invoking RPC callback for command: " + clientCall.getCommand()); + } + + return true; + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcCallbackListener.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcCallbackListener.java new file mode 100644 index 000000000..0ab94ac2f --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcCallbackListener.java @@ -0,0 +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. + */ +package org.apache.cloudstack.framework.rpc; + + +public interface RpcCallbackListener { + void onSuccess(T result); + void onFailure(RpcException e); +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcClientCall.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcClientCall.java new file mode 100644 index 000000000..0e7516f2f --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcClientCall.java @@ -0,0 +1,47 @@ +/* + * 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 org.apache.cloudstack.framework.rpc; + + +public interface RpcClientCall { + final static int DEFAULT_RPC_TIMEOUT = 10000; + + String getCommand(); + RpcClientCall setCommand(String cmd); + RpcClientCall setTimeout(int timeoutMilliseconds); + + RpcClientCall setCommandArg(Object arg); + Object getCommandArg(); + + RpcClientCall setContext(Object param); + T getContext(); + + RpcClientCall addCallbackListener(RpcCallbackListener listener); + RpcClientCall setCallbackDispatcher(RpcCallbackDispatcher dispatcher); + + RpcClientCall setOneway(); + + RpcClientCall apply(); + void cancel(); + + /** + * @return the result object, it may also throw RpcException to indicate RPC failures + */ + T get(); +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcClientCallImpl.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcClientCallImpl.java new file mode 100644 index 000000000..cd427a40b --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcClientCallImpl.java @@ -0,0 +1,234 @@ +/* + * 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 org.apache.cloudstack.framework.rpc; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class RpcClientCallImpl implements RpcClientCall { + + private String _command; + private Object _commandArg; + + private int _timeoutMilliseconds = DEFAULT_RPC_TIMEOUT; + private Object _contextObject; + private boolean _oneway = false; + + @SuppressWarnings("rawtypes") + private List _callbackListeners = new ArrayList(); + + @SuppressWarnings("rawtypes") + private RpcCallbackDispatcher _callbackDispatcher; + + private RpcProvider _rpcProvider; + private long _startTickInMs; + private long _callTag; + private String _sourceAddress; + private String _targetAddress; + + private Object _responseLock = new Object(); + private boolean _responseDone = false;; + private Object _responseResult; + + public RpcClientCallImpl(RpcProvider rpcProvider) { + assert(rpcProvider != null); + _rpcProvider = rpcProvider; + } + + @Override + public String getCommand() { + return _command; + } + + @Override + public RpcClientCall setCommand(String cmd) { + _command = cmd; + return this; + } + + @Override + public RpcClientCall setTimeout(int timeoutMilliseconds) { + _timeoutMilliseconds = timeoutMilliseconds; + return this; + } + + @Override + public RpcClientCall setCommandArg(Object arg) { + _commandArg = arg; + return this; + } + + @Override + public Object getCommandArg() { + return _commandArg; + } + + @Override + public RpcClientCall setContext(Object param) { + _contextObject = param; + return this; + } + + @SuppressWarnings("unchecked") + @Override + public T getContext() { + return (T)_contextObject; + } + + @Override + public RpcClientCall addCallbackListener(RpcCallbackListener listener) { + assert(listener != null); + _callbackListeners.add(listener); + return this; + } + + @Override + public RpcClientCall setCallbackDispatcher(RpcCallbackDispatcher dispatcher) { + _callbackDispatcher = dispatcher; + return this; + } + + @Override + public RpcClientCall setOneway() { + _oneway = true; + return this; + } + + public String getSourceAddress() { + return _sourceAddress; + } + + public void setSourceAddress(String sourceAddress) { + _sourceAddress = sourceAddress; + } + + public String getTargetAddress() { + return _targetAddress; + } + + public void setTargetAddress(String targetAddress) { + _targetAddress = targetAddress; + } + + public long getCallTag() { + return _callTag; + } + + public void setCallTag(long callTag) { + _callTag = callTag; + } + + @Override + public RpcClientCall apply() { + // sanity check + assert(_sourceAddress != null); + assert(_targetAddress != null); + + if(!_oneway) + _rpcProvider.registerCall(this); + + RpcCallRequestPdu pdu = new RpcCallRequestPdu(); + pdu.setCommand(getCommand()); + if(_commandArg != null) + pdu.setSerializedCommandArg(_rpcProvider.getMessageSerializer().serializeTo(_commandArg.getClass(), _commandArg)); + pdu.setRequestTag(this.getCallTag()); + + _rpcProvider.sendRpcPdu(getSourceAddress(), getTargetAddress(), + _rpcProvider.getMessageSerializer().serializeTo(RpcCallRequestPdu.class, pdu)); + + return this; + } + + @Override + public void cancel() { + _rpcProvider.cancelCall(this); + } + + @Override + public T get() { + if(!_oneway) { + synchronized(_responseLock) { + if(!_responseDone) { + long timeToWait = _timeoutMilliseconds - (System.currentTimeMillis() - _startTickInMs); + if(timeToWait < 0) + timeToWait = 0; + + try { + _responseLock.wait(timeToWait); + } catch (InterruptedException e) { + throw new RpcTimeoutException("RPC call timed out"); + } + } + + assert(_responseDone); + + if(_responseResult == null) + return null; + + if(_responseResult instanceof RpcException) + throw (RpcException)_responseResult; + + assert(_rpcProvider.getMessageSerializer() != null); + assert(_responseResult instanceof String); + return _rpcProvider.getMessageSerializer().serializeFrom((String)_responseResult); + } + } + return null; + } + + @SuppressWarnings("unchecked") + public void complete(String result) { + _responseResult = result; + + synchronized(_responseLock) { + _responseDone = true; + _responseLock.notifyAll(); + } + + if(_callbackListeners.size() > 0) { + assert(_rpcProvider.getMessageSerializer() != null); + Object resultObject = _rpcProvider.getMessageSerializer().serializeFrom(result); + for(@SuppressWarnings("rawtypes") RpcCallbackListener listener: _callbackListeners) + listener.onSuccess(resultObject); + } else { + if(_callbackDispatcher != null) + _callbackDispatcher.dispatch(this); + } + } + + public void complete(RpcException e) { + _responseResult = e; + + synchronized(_responseLock) { + _responseDone = true; + + _responseLock.notifyAll(); + } + + if(_callbackListeners.size() > 0) { + for(@SuppressWarnings("rawtypes") RpcCallbackListener listener: _callbackListeners) + listener.onFailure(e); + } else { + if(_callbackDispatcher != null) + _callbackDispatcher.dispatch(this); + } + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcException.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcException.java new file mode 100644 index 000000000..618e6ab24 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcException.java @@ -0,0 +1,35 @@ +/* + * 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 org.apache.cloudstack.framework.rpc; + +public class RpcException extends RuntimeException { + private static final long serialVersionUID = -3164514701087423787L; + + public RpcException() { + super(); + } + + public RpcException(String message) { + super(message); + } + + public RpcException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcIOException.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcIOException.java new file mode 100644 index 000000000..8479e3855 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcIOException.java @@ -0,0 +1,37 @@ +/* + * 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 org.apache.cloudstack.framework.rpc; + + +public class RpcIOException extends RpcException { + + private static final long serialVersionUID = -6108039302920641533L; + + public RpcIOException() { + super(); + } + + public RpcIOException(String message) { + super(message); + } + + public RpcIOException(String message, Throwable cause) { + super(message, cause); + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcProvider.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcProvider.java new file mode 100644 index 000000000..fb4f04bad --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcProvider.java @@ -0,0 +1,46 @@ +/* + * 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 org.apache.cloudstack.framework.rpc; + +import org.apache.cloudstack.framework.serializer.MessageSerializer; +import org.apache.cloudstack.framework.transport.TransportAddressMapper; +import org.apache.cloudstack.framework.transport.TransportMultiplexier; + +public interface RpcProvider extends TransportMultiplexier { + final static String RPC_MULTIPLEXIER = "rpc"; + + void setMessageSerializer(MessageSerializer messageSerializer); + MessageSerializer getMessageSerializer(); + boolean initialize(); + + void registerRpcServiceEndpoint(RpcServiceEndpoint rpcEndpoint); + void unregisteRpcServiceEndpoint(RpcServiceEndpoint rpcEndpoint); + + RpcClientCall newCall(); + RpcClientCall newCall(String targetAddress); + RpcClientCall newCall(TransportAddressMapper targetAddress); + + // + // low-level public API + // + void registerCall(RpcClientCall call); + void cancelCall(RpcClientCall call); + + void sendRpcPdu(String sourceAddress, String targetAddress, String serializedPdu); +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcProviderImpl.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcProviderImpl.java new file mode 100644 index 000000000..a68a65e91 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcProviderImpl.java @@ -0,0 +1,250 @@ +/* + * 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 org.apache.cloudstack.framework.rpc; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import org.apache.cloudstack.framework.serializer.MessageSerializer; +import org.apache.cloudstack.framework.transport.TransportAddress; +import org.apache.cloudstack.framework.transport.TransportAddressMapper; +import org.apache.cloudstack.framework.transport.TransportEndpoint; +import org.apache.cloudstack.framework.transport.TransportEndpointSite; +import org.apache.cloudstack.framework.transport.TransportProvider; + +public class RpcProviderImpl implements RpcProvider { + public static final String RPC_MULTIPLEXIER = "rpc"; + + private TransportProvider _transportProvider; + private String _transportAddress; + private RpcTransportEndpoint _transportEndpoint = new RpcTransportEndpoint(); // transport attachment at RPC layer + + private MessageSerializer _messageSerializer; + private List _serviceEndpoints = new ArrayList(); + private Map _outstandingCalls = new HashMap(); + + private long _nextCallTag = System.currentTimeMillis(); + + public RpcProviderImpl() { + } + + public RpcProviderImpl(TransportProvider transportProvider) { + _transportProvider = transportProvider; + } + + public TransportProvider getTransportProvider() { + return _transportProvider; + } + + public void setTransportProvider(TransportProvider transportProvider) { + _transportProvider = transportProvider; + } + + @Override + public void onTransportMessage(String senderEndpointAddress, + String targetEndpointAddress, String multiplexer, String message) { + assert(_messageSerializer != null); + + Object pdu = _messageSerializer.serializeFrom(message); + if(pdu instanceof RpcCallRequestPdu) { + handleCallRequestPdu(senderEndpointAddress, targetEndpointAddress, (RpcCallRequestPdu)pdu); + } else if(pdu instanceof RpcCallResponsePdu) { + handleCallResponsePdu(senderEndpointAddress, targetEndpointAddress, (RpcCallResponsePdu)pdu); + } else { + assert(false); + } + } + + @Override + public void setMessageSerializer(MessageSerializer messageSerializer) { + assert(messageSerializer != null); + _messageSerializer = messageSerializer; + } + + @Override + public MessageSerializer getMessageSerializer() { + return _messageSerializer; + } + + @Override + public boolean initialize() { + assert(_transportProvider != null); + if(_transportProvider == null) + return false; + + TransportEndpointSite endpointSite = _transportProvider.attach(_transportEndpoint, "RpcProvider"); + endpointSite.registerMultiplexier(RPC_MULTIPLEXIER, this); + return true; + } + + @Override + public void registerRpcServiceEndpoint(RpcServiceEndpoint rpcEndpoint) { + synchronized(_serviceEndpoints) { + _serviceEndpoints.add(rpcEndpoint); + } + } + + @Override + public void unregisteRpcServiceEndpoint(RpcServiceEndpoint rpcEndpoint) { + synchronized(_serviceEndpoints) { + _serviceEndpoints.remove(rpcEndpoint); + } + } + + @Override + public RpcClientCall newCall() { + return newCall(TransportAddress.getLocalPredefinedTransportAddress("RpcProvider").toString()); + } + + @Override + public RpcClientCall newCall(String targetAddress) { + + long callTag = getNextCallTag(); + RpcClientCallImpl call = new RpcClientCallImpl(this); + call.setSourceAddress(_transportAddress); + call.setTargetAddress(targetAddress); + call.setCallTag(callTag); + + return call; + } + + @Override + public RpcClientCall newCall(TransportAddressMapper targetAddress) { + return newCall(targetAddress.getAddress()); + } + + @Override + public void registerCall(RpcClientCall call) { + assert(call != null); + synchronized(this) { + _outstandingCalls.put(((RpcClientCallImpl)call).getCallTag(), call); + } + } + + @Override + public void cancelCall(RpcClientCall call) { + synchronized(this) { + _outstandingCalls.remove(((RpcClientCallImpl)call).getCallTag()); + } + + ((RpcClientCallImpl)call).complete(new RpcException("Call is cancelled")); + } + + @Override + public void sendRpcPdu(String sourceAddress, String targetAddress, String serializedPdu) { + assert(_transportProvider != null); + _transportProvider.sendMessage(sourceAddress, targetAddress, RpcProvider.RPC_MULTIPLEXIER, serializedPdu); + } + + protected synchronized long getNextCallTag() { + long tag = _nextCallTag++; + if(tag == 0) + tag++; + + return tag; + } + + private void handleCallRequestPdu(String sourceAddress, String targetAddress, RpcCallRequestPdu pdu) { + try { + RpcServerCall call = new RpcServerCallImpl(this, sourceAddress, targetAddress, pdu); + + // TODO, we are trying to avoid locking when calling into callbacks + // this should be optimized later + List endpoints = new ArrayList(); + synchronized(_serviceEndpoints) { + endpoints.addAll(_serviceEndpoints); + } + + for(RpcServiceEndpoint endpoint : endpoints) { + if(endpoint.onCallReceive(call)) + return; + } + + RpcCallResponsePdu responsePdu = new RpcCallResponsePdu(); + responsePdu.setCommand(pdu.getCommand()); + responsePdu.setRequestStartTick(pdu.getRequestStartTick()); + responsePdu.setRequestTag(pdu.getRequestTag()); + responsePdu.setResult(RpcCallResponsePdu.RESULT_HANDLER_NOT_EXIST); + sendRpcPdu(targetAddress, sourceAddress, _messageSerializer.serializeTo(RpcCallResponsePdu.class, responsePdu)); + + } catch (Throwable e) { + + RpcCallResponsePdu responsePdu = new RpcCallResponsePdu(); + responsePdu.setCommand(pdu.getCommand()); + responsePdu.setRequestStartTick(pdu.getRequestStartTick()); + responsePdu.setRequestTag(pdu.getRequestTag()); + responsePdu.setResult(RpcCallResponsePdu.RESULT_HANDLER_EXCEPTION); + + sendRpcPdu(targetAddress, sourceAddress, _messageSerializer.serializeTo(RpcCallResponsePdu.class, responsePdu)); + } + } + + private void handleCallResponsePdu(String sourceAddress, String targetAddress, RpcCallResponsePdu pdu) { + RpcClientCallImpl call = null; + + synchronized(this) { + call = (RpcClientCallImpl)_outstandingCalls.remove(pdu.getRequestTag()); + } + + if(call != null) { + switch(pdu.getResult()) { + case RpcCallResponsePdu.RESULT_SUCCESSFUL : + call.complete(pdu.getSerializedResult()); + break; + + case RpcCallResponsePdu.RESULT_HANDLER_NOT_EXIST : + call.complete(new RpcException("Handler does not exist")); + break; + + case RpcCallResponsePdu.RESULT_HANDLER_EXCEPTION : + call.complete(new RpcException("Exception in handler")); + break; + + default : + assert(false); + break; + } + } + } + + private class RpcTransportEndpoint implements TransportEndpoint { + + @Override + public void onTransportMessage(String senderEndpointAddress, + String targetEndpointAddress, String multiplexer, String message) { + + // we won't handle generic transport message toward RPC transport endpoint + } + + @Override + public void onAttachConfirm(boolean bSuccess, String endpointAddress) { + if(bSuccess) + _transportAddress = endpointAddress; + + } + + @Override + public void onDetachIndication(String endpointAddress) { + if(_transportAddress != null && _transportAddress.equals(endpointAddress)) + _transportAddress = null; + } + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcServerCall.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcServerCall.java new file mode 100644 index 000000000..a102503e1 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcServerCall.java @@ -0,0 +1,27 @@ +/* + * 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 org.apache.cloudstack.framework.rpc; + +public interface RpcServerCall { + String getCommand(); + T getCommandArgument(); + + // for receiver to response call + void completeCall(Object returnObject); +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcServerCallImpl.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcServerCallImpl.java new file mode 100644 index 000000000..d1ac7a99d --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcServerCallImpl.java @@ -0,0 +1,72 @@ +/* + * 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 org.apache.cloudstack.framework.rpc; + + +public class RpcServerCallImpl implements RpcServerCall { + + private RpcProvider _rpcProvider; + private String _sourceAddress; + private String _targetAddress; + + private RpcCallRequestPdu _requestPdu; + + public RpcServerCallImpl(RpcProvider provider, String sourceAddress, String targetAddress, + RpcCallRequestPdu requestPdu) { + + _rpcProvider = provider; + _sourceAddress = sourceAddress; + _targetAddress = targetAddress; + _requestPdu = requestPdu; + } + + @Override + public String getCommand() { + assert(_requestPdu != null); + return _requestPdu.getCommand(); + } + + @Override + public T getCommandArgument() { + if(_requestPdu.getSerializedCommandArg() == null) + return null; + + assert(_rpcProvider.getMessageSerializer() != null); + return _rpcProvider.getMessageSerializer().serializeFrom(_requestPdu.getSerializedCommandArg()); + } + + @Override + public void completeCall(Object returnObject) { + assert(_sourceAddress != null); + assert(_targetAddress != null); + + RpcCallResponsePdu pdu = new RpcCallResponsePdu(); + pdu.setCommand(_requestPdu.getCommand()); + pdu.setRequestTag(_requestPdu.getRequestTag()); + pdu.setRequestStartTick(_requestPdu.getRequestStartTick()); + pdu.setRequestStartTick(RpcCallResponsePdu.RESULT_SUCCESSFUL); + if(returnObject != null) { + assert(_rpcProvider.getMessageSerializer() != null); + pdu.setSerializedResult(_rpcProvider.getMessageSerializer().serializeTo(returnObject.getClass(), returnObject)); + } + + _rpcProvider.sendRpcPdu(_targetAddress, _sourceAddress, + _rpcProvider.getMessageSerializer().serializeTo(RpcCallResponsePdu.class, pdu)); + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcServiceDispatcher.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcServiceDispatcher.java new file mode 100644 index 000000000..c0d1566ba --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcServiceDispatcher.java @@ -0,0 +1,118 @@ +/* + * 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 org.apache.cloudstack.framework.rpc; + +import java.lang.reflect.InvocationTargetException; +import java.lang.reflect.Method; +import java.util.HashMap; +import java.util.Map; + + +public class RpcServiceDispatcher implements RpcServiceEndpoint { + + private static Map, Map> s_handlerCache = new HashMap, Map>(); + + private static Map s_targetMap = new HashMap(); + private Object _targetObject; + + public RpcServiceDispatcher(Object targetObject) { + _targetObject = targetObject; + } + + public static RpcServiceDispatcher getDispatcher(Object targetObject) { + RpcServiceDispatcher dispatcher; + synchronized(s_targetMap) { + dispatcher = s_targetMap.get(targetObject); + if(dispatcher == null) { + dispatcher = new RpcServiceDispatcher(targetObject); + s_targetMap.put(targetObject, dispatcher); + } + } + return dispatcher; + } + + public static void removeDispatcher(Object targetObject) { + synchronized(s_targetMap) { + s_targetMap.remove(targetObject); + } + } + + public static boolean dispatch(Object target, RpcServerCall serviceCall) { + assert(serviceCall != null); + assert(target != null); + + Method handler = resolveHandler(target.getClass(), serviceCall.getCommand()); + if(handler == null) + return false; + + try { + handler.invoke(target, serviceCall); + } catch (IllegalArgumentException e) { + throw new RpcException("IllegalArgumentException when invoking RPC service command: " + serviceCall.getCommand()); + } catch (IllegalAccessException e) { + throw new RpcException("IllegalAccessException when invoking RPC service command: " + serviceCall.getCommand()); + } catch (InvocationTargetException e) { + throw new RpcException("InvocationTargetException when invoking RPC service command: " + serviceCall.getCommand()); + } + + return true; + } + + public static Method resolveHandler(Class handlerClz, String command) { + synchronized(s_handlerCache) { + Map handlerMap = getAndSetHandlerMap(handlerClz); + + Method handler = handlerMap.get(command); + if(handler != null) + return handler; + + for(Method method : handlerClz.getDeclaredMethods()) { + RpcServiceHandler annotation = method.getAnnotation(RpcServiceHandler.class); + if(annotation != null) { + if(annotation.command().equals(command)) { + method.setAccessible(true); + handlerMap.put(command, method); + return method; + } + } + } + } + + return null; + } + + private static Map getAndSetHandlerMap(Class handlerClz) { + Map handlerMap; + synchronized(s_handlerCache) { + handlerMap = s_handlerCache.get(handlerClz); + + if(handlerMap == null) { + handlerMap = new HashMap(); + s_handlerCache.put(handlerClz, handlerMap); + } + } + + return handlerMap; + } + + @Override + public boolean onCallReceive(RpcServerCall call) { + return dispatch(_targetObject, call); + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcServiceEndpoint.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcServiceEndpoint.java new file mode 100644 index 000000000..31dc0831c --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcServiceEndpoint.java @@ -0,0 +1,31 @@ +/* + * 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 org.apache.cloudstack.framework.rpc; + + +public interface RpcServiceEndpoint { + /* + * @return + * true call has been handled + * false can not find the call handler + * @throws + * RpcException, exception when + */ + boolean onCallReceive(RpcServerCall call); +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcServiceHandler.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcServiceHandler.java new file mode 100644 index 000000000..6a77f9308 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcServiceHandler.java @@ -0,0 +1,30 @@ +/* + * 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 org.apache.cloudstack.framework.rpc; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface RpcServiceHandler { + String command(); +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcTimeoutException.java b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcTimeoutException.java new file mode 100644 index 000000000..5c876c7fb --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/rpc/RpcTimeoutException.java @@ -0,0 +1,33 @@ +/* + * 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 org.apache.cloudstack.framework.rpc; + + +public class RpcTimeoutException extends RpcException { + + private static final long serialVersionUID = -3618654987984665833L; + + public RpcTimeoutException() { + super(); + } + + public RpcTimeoutException(String message) { + super(message); + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/serializer/JsonMessageSerializer.java b/framework/ipc/src/org/apache/cloudstack/framework/serializer/JsonMessageSerializer.java new file mode 100644 index 000000000..2fcab54fd --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/serializer/JsonMessageSerializer.java @@ -0,0 +1,87 @@ +/* + * 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 org.apache.cloudstack.framework.serializer; + + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +public class JsonMessageSerializer implements MessageSerializer { + + // this will be injected from external to allow installation of + // type adapters needed by upper layer applications + private Gson _gson; + + private OnwireClassRegistry _clzRegistry; + + public JsonMessageSerializer() { + GsonBuilder gsonBuilder = new GsonBuilder(); + gsonBuilder.setVersion(1.5); + _gson = gsonBuilder.create(); + } + + public Gson getGson() { + return _gson; + } + + public void setGson(Gson gson) { + _gson = gson; + } + + public OnwireClassRegistry getOnwireClassRegistry() { + return _clzRegistry; + } + + public void setOnwireClassRegistry(OnwireClassRegistry clzRegistry) { + _clzRegistry = clzRegistry; + } + + @Override + public String serializeTo(Class clz, T object) { + assert(clz != null); + assert(object != null); + + StringBuffer sbuf = new StringBuffer(); + + OnwireName onwire = clz.getAnnotation(OnwireName.class); + if(onwire == null) + throw new RuntimeException("Class " + clz.getCanonicalName() + " is not declared to be onwire"); + + sbuf.append(onwire.name()).append("|"); + sbuf.append(_gson.toJson(object)); + + return sbuf.toString(); + } + + @SuppressWarnings("unchecked") + @Override + public T serializeFrom(String message) { + assert(message != null); + int contentStartPos = message.indexOf('|'); + if(contentStartPos < 0) + throw new RuntimeException("Invalid on-wire message format"); + + String onwireName = message.substring(0, contentStartPos); + Class clz = _clzRegistry.getOnwireClass(onwireName); + if(clz == null) + throw new RuntimeException("Onwire class is not registered. name: " + onwireName); + + return (T)_gson.fromJson(message.substring(contentStartPos + 1), clz); + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/serializer/MessageSerializer.java b/framework/ipc/src/org/apache/cloudstack/framework/serializer/MessageSerializer.java new file mode 100644 index 000000000..65d818e9c --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/serializer/MessageSerializer.java @@ -0,0 +1,24 @@ +/* + * 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 org.apache.cloudstack.framework.serializer; + +public interface MessageSerializer { + String serializeTo(Class clz, T object); + T serializeFrom(String message); +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/serializer/OnwireClassRegistry.java b/framework/ipc/src/org/apache/cloudstack/framework/serializer/OnwireClassRegistry.java new file mode 100644 index 000000000..ac9c6bc56 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/serializer/OnwireClassRegistry.java @@ -0,0 +1,180 @@ +/* + * 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 org.apache.cloudstack.framework.serializer; + +import java.io.File; +import java.io.FileInputStream; +import java.io.IOException; +import java.net.URL; +import java.util.ArrayList; +import java.util.Enumeration; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.jar.JarEntry; +import java.util.jar.JarInputStream; + + +// +// Finding classes in a given package code is taken and modified from +// Credit: http://internna.blogspot.com/2007/11/java-5-retrieving-all-classes-from.html +// +public class OnwireClassRegistry { + + private List packages = new ArrayList(); + private Map> registry = new HashMap>(); + + public OnwireClassRegistry() { + registry.put("Object", Object.class); + } + + public OnwireClassRegistry(String packageName) { + addPackage(packageName); + } + + public OnwireClassRegistry(List packages) { + packages.addAll(packages); + } + + public List getPackages() { + return packages; + } + + public void setPackages(List packages) { + this.packages = packages; + } + + public void addPackage(String packageName) { + packages.add(packageName); + } + + public void scan() { + Set> classes = new HashSet>(); + for(String pkg : packages) { + classes.addAll(getClasses(pkg)); + } + + for(Class clz : classes) { + OnwireName onwire = clz.getAnnotation(OnwireName.class); + if(onwire != null) { + assert(onwire.name() != null); + + registry.put(onwire.name(), clz); + } + } + } + + public Class getOnwireClass(String onwireName) { + return registry.get(onwireName); + } + + static Set> getClasses(String packageName) { + ClassLoader loader = Thread.currentThread().getContextClassLoader(); + return getClasses(loader, packageName); + } + + // + // Following helper methods can be put in a separated helper class, + // will do that later + // + static Set> getClasses(ClassLoader loader, String packageName) { + Set> classes = new HashSet>(); + String path = packageName.replace('.', '/'); + try { + Enumeration resources = loader.getResources(path); + if (resources != null) { + while (resources.hasMoreElements()) { + String filePath = resources.nextElement().getFile(); + // WINDOWS HACK + if(filePath.indexOf("%20") > 0) + filePath = filePath.replaceAll("%20", " "); + if (filePath != null) { + if ((filePath.indexOf("!") > 0) && (filePath.indexOf(".jar") > 0)) { + String jarPath = filePath.substring(0, filePath.indexOf("!")) + .substring(filePath.indexOf(":") + 1); + // WINDOWS HACK + if (jarPath.indexOf(":") >= 0) jarPath = jarPath.substring(1); + classes.addAll(getFromJARFile(jarPath, path)); + } else { + classes.addAll(getFromDirectory(new File(filePath), packageName)); + } + } + } + } + } catch(IOException e) { + } catch(ClassNotFoundException e) { + } + return classes; + } + + static Set> getFromDirectory(File directory, String packageName) throws ClassNotFoundException { + Set> classes = new HashSet>(); + if (directory.exists()) { + for (String file : directory.list()) { + if (file.endsWith(".class")) { + String name = packageName + '.' + stripFilenameExtension(file); + try { + Class clazz = Class.forName(name); + classes.add(clazz); + } catch(ClassNotFoundException e) { + } catch(Exception e) { + } + } else { + File f = new File(directory.getPath() + "/" + file); + if(f.isDirectory()) { + classes.addAll(getFromDirectory(f, packageName + "." + file)); + } + } + } + } + return classes; + } + + static Set> getFromJARFile(String jar, String packageName) throws IOException, ClassNotFoundException { + Set> classes = new HashSet>(); + JarInputStream jarFile = new JarInputStream(new FileInputStream(jar)); + JarEntry jarEntry; + do { + jarEntry = jarFile.getNextJarEntry(); + if (jarEntry != null) { + String className = jarEntry.getName(); + if (className.endsWith(".class")) { + className = stripFilenameExtension(className); + if (className.startsWith(packageName)) { + try { + Class clz = Class.forName(className.replace('/', '.')); + classes.add(clz); + } catch(ClassNotFoundException e) { + } catch(NoClassDefFoundError e) { + } + } + } + } + } while (jarEntry != null); + + return classes; + } + + static String stripFilenameExtension(String file) { + return file.substring(0, file.lastIndexOf('.')); + } +} + diff --git a/framework/ipc/src/org/apache/cloudstack/framework/serializer/OnwireName.java b/framework/ipc/src/org/apache/cloudstack/framework/serializer/OnwireName.java new file mode 100644 index 000000000..ac195d0ef --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/serializer/OnwireName.java @@ -0,0 +1,31 @@ +/* + * 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 org.apache.cloudstack.framework.serializer; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.TYPE) +public @interface OnwireName { + String name(); +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/server/ServerEventBus.java b/framework/ipc/src/org/apache/cloudstack/framework/server/ServerEventBus.java new file mode 100644 index 000000000..11bc428a4 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/server/ServerEventBus.java @@ -0,0 +1,31 @@ +/* + * 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 org.apache.cloudstack.framework.server; + +import org.apache.cloudstack.framework.eventbus.EventBusBase; +import org.apache.cloudstack.framework.transport.TransportMultiplexier; + +public class ServerEventBus extends EventBusBase implements TransportMultiplexier { + + @Override + public void onTransportMessage(String senderEndpointAddress, + String targetEndpointAddress, String multiplexer, String message) { + // TODO Auto-generated method stub + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/server/ServerTransportProvider.java b/framework/ipc/src/org/apache/cloudstack/framework/server/ServerTransportProvider.java new file mode 100644 index 000000000..b19a7c926 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/server/ServerTransportProvider.java @@ -0,0 +1,190 @@ +/* + * 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 org.apache.cloudstack.framework.server; + +import java.util.HashMap; +import java.util.Map; +import java.util.Random; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; + +import org.apache.cloudstack.framework.serializer.MessageSerializer; +import org.apache.cloudstack.framework.transport.TransportAddress; +import org.apache.cloudstack.framework.transport.TransportDataPdu; +import org.apache.cloudstack.framework.transport.TransportEndpoint; +import org.apache.cloudstack.framework.transport.TransportEndpointSite; +import org.apache.cloudstack.framework.transport.TransportPdu; +import org.apache.cloudstack.framework.transport.TransportProvider; +import org.apache.log4j.Logger; + +import com.cloud.utils.concurrency.NamedThreadFactory; + +public class ServerTransportProvider implements TransportProvider { + private static final Logger s_logger = Logger.getLogger(ServerTransportProvider.class); + + public static final int DEFAULT_WORKER_POOL_SIZE = 5; + + private String _nodeId; + + private Map _endpointMap = new HashMap(); + private int _poolSize = DEFAULT_WORKER_POOL_SIZE; + private ExecutorService _executor; + + private int _nextEndpointId = new Random().nextInt(); + + private MessageSerializer _messageSerializer; + + public ServerTransportProvider() { + } + + public String getNodeId() { + return _nodeId; + } + + public ServerTransportProvider setNodeId(String nodeId) { + _nodeId = nodeId; + return this; + } + + public int getWorkerPoolSize() { + return _poolSize; + } + + public ServerTransportProvider setWorkerPoolSize(int poolSize) { + assert(poolSize > 0); + + _poolSize = poolSize; + return this; + } + + @Override + public void setMessageSerializer(MessageSerializer messageSerializer) { + assert(messageSerializer != null); + _messageSerializer = messageSerializer; + } + + @Override + public MessageSerializer getMessageSerializer() { + return _messageSerializer; + } + + public void initialize() { + _executor = Executors.newFixedThreadPool(_poolSize, new NamedThreadFactory("Transport-Worker")); + } + + @Override + public TransportEndpointSite attach(TransportEndpoint endpoint, String predefinedAddress) { + + TransportAddress transportAddress; + String endpointId; + if(predefinedAddress != null && !predefinedAddress.isEmpty()) { + endpointId = predefinedAddress; + transportAddress = new TransportAddress(_nodeId, TransportAddress.LOCAL_SERVICE_CONNECTION, endpointId, 0); + } else { + endpointId = String.valueOf(getNextEndpointId()); + transportAddress = new TransportAddress(_nodeId, TransportAddress.LOCAL_SERVICE_CONNECTION, endpointId); + } + + TransportEndpointSite endpointSite; + synchronized(this) { + endpointSite = _endpointMap.get(endpointId); + if(endpointSite != null) { + // already attached + return endpointSite; + } + endpointSite = new TransportEndpointSite(this, endpoint, transportAddress); + _endpointMap.put(endpointId, endpointSite); + } + + endpoint.onAttachConfirm(true, transportAddress.toString()); + return endpointSite; + } + + @Override + public boolean detach(TransportEndpoint endpoint) { + synchronized(this) { + for(Map.Entry entry : _endpointMap.entrySet()) { + if(entry.getValue().getEndpoint() == endpoint) { + _endpointMap.remove(entry.getKey()); + return true; + } + } + } + + return false; + } + + @Override + public void requestSiteOutput(final TransportEndpointSite site) { + _executor.execute(new Runnable() { + + @Override + public void run() { + try { + site.processOutput(); + site.ackOutputProcessSignal(); + } catch(Throwable e) { + s_logger.error("Unhandled exception", e); + } + } + }); + } + + @Override + public void sendMessage(String sourceEndpointAddress, String targetEndpointAddress, + String multiplexier, String message) { + + TransportDataPdu pdu = new TransportDataPdu(); + pdu.setSourceAddress(sourceEndpointAddress); + pdu.setDestAddress(targetEndpointAddress); + pdu.setMultiplexier(multiplexier); + pdu.setContent(message); + + dispatchPdu(pdu); + } + + private void dispatchPdu(TransportPdu pdu) { + + TransportAddress transportAddress = TransportAddress.fromAddressString(pdu.getDestAddress()); + + if(isLocalAddress(transportAddress)) { + TransportEndpointSite endpointSite = null; + synchronized(this) { + endpointSite = _endpointMap.get(transportAddress.getEndpointId()); + } + + if(endpointSite != null) + endpointSite.addOutputPdu(pdu); + } else { + // do cross-node forwarding + // ??? + } + } + + private boolean isLocalAddress(TransportAddress address) { + if(address.getNodeId().equals(_nodeId) || address.getNodeId().equals(TransportAddress.LOCAL_SERVICE_NODE)) + return true; + + return false; + } + + private synchronized int getNextEndpointId() { + return _nextEndpointId++; + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportAddress.java b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportAddress.java new file mode 100644 index 000000000..e3cf9684e --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportAddress.java @@ -0,0 +1,139 @@ +/* + * 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 org.apache.cloudstack.framework.transport; + +import java.util.Random; + +public class TransportAddress { + public final static String LOCAL_SERVICE_NODE = ""; + public final static int LOCAL_SERVICE_CONNECTION = 0; + + private String _nodeId = LOCAL_SERVICE_NODE; + private int _connectionId = LOCAL_SERVICE_CONNECTION; + private String _endpointId; + private int _magic; + + public TransportAddress(String nodeId, int connectionId, String endpointId) { + assert(nodeId != null); + assert(endpointId != null); + assert(nodeId.indexOf(".") < 0); + assert(endpointId.indexOf(".") < 0); + + _nodeId = nodeId; + _connectionId = connectionId; + _endpointId = endpointId; + _magic = new Random().nextInt(); + } + + public TransportAddress(String nodeId, int connectionId, String endpointId, int magic) { + assert(nodeId != null); + assert(endpointId != null); + assert(nodeId.indexOf(".") < 0); + assert(endpointId.indexOf(".") < 0); + + _nodeId = nodeId; + _connectionId = connectionId; + _endpointId = endpointId; + _magic = magic; + } + + public String getNodeId() { + return _nodeId; + } + + public TransportAddress setNodeId(String nodeId) { + _nodeId = nodeId; + return this; + } + + public int getConnectionId() { + return _connectionId; + } + + public void setConnectionId(int connectionId) { + _connectionId = connectionId; + } + + public String getEndpointId() { + return _endpointId; + } + + public TransportAddress setEndpointId(String endpointId) { + _endpointId = endpointId; + return this; + } + + public static TransportAddress fromAddressString(String addressString) { + if(addressString == null || addressString.isEmpty()) + return null; + + String tokens[] = addressString.split("\\."); + if(tokens.length != 4) + return null; + + return new TransportAddress(tokens[0], Integer.parseInt(tokens[1]), tokens[2], Integer.parseInt(tokens[3])); + } + + public static TransportAddress getLocalPredefinedTransportAddress(String predefinedIdentifier) { + return new TransportAddress(LOCAL_SERVICE_NODE, LOCAL_SERVICE_CONNECTION, predefinedIdentifier, 0); + } + + @Override + public int hashCode() { + int hashCode = _magic; + hashCode = (hashCode << 3) ^ _nodeId.hashCode(); + hashCode = (hashCode << 3) ^ _connectionId; + hashCode = (hashCode << 3) ^ _endpointId.hashCode(); + + return hashCode; + } + + @Override + public boolean equals(Object other) { + if(other == null) + return false; + + if(!(other instanceof TransportAddress)) + return false; + + if(this == other) + return true; + + return _nodeId.equals(((TransportAddress)other)._nodeId) && + _connectionId == (((TransportAddress)other)._connectionId) && + _endpointId.equals(((TransportAddress)other)._endpointId) && + _magic == ((TransportAddress)other)._magic; + } + + @Override + public String toString() { + StringBuffer sb = new StringBuffer(); + if(_nodeId != null) + sb.append(_nodeId); + sb.append("."); + sb.append(_connectionId); + sb.append("."); + sb.append(_endpointId); + sb.append("."); + sb.append(_magic); + + return sb.toString(); + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportAddressMapper.java b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportAddressMapper.java new file mode 100644 index 000000000..6edb78807 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportAddressMapper.java @@ -0,0 +1,23 @@ +/* + * 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 org.apache.cloudstack.framework.transport; + +public interface TransportAddressMapper { + String getAddress(); +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportAttachRequestPdu.java b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportAttachRequestPdu.java new file mode 100644 index 000000000..736ae2987 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportAttachRequestPdu.java @@ -0,0 +1,34 @@ +/* + * 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 org.apache.cloudstack.framework.transport; + +public class TransportAttachRequestPdu extends TransportPdu { + private int _endpointProviderKey; + + public TransportAttachRequestPdu() { + } + + public int getEndpointProviderKey() { + return _endpointProviderKey; + } + + public void setEndpointProviderKey(int endpointProviderKey) { + _endpointProviderKey = endpointProviderKey; + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportAttachResponsePdu.java b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportAttachResponsePdu.java new file mode 100644 index 000000000..b2d15c6a2 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportAttachResponsePdu.java @@ -0,0 +1,43 @@ +/* + * 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 org.apache.cloudstack.framework.transport; + +public class TransportAttachResponsePdu extends TransportPdu { + private int _statusCode; + private int _endpointProviderKey; + + public TransportAttachResponsePdu() { + } + + public int getStatusCode() { + return _statusCode; + } + + public void setStatusCode(int statusCode) { + _statusCode = statusCode; + } + + public int getEndpointProviderKey() { + return _endpointProviderKey; + } + + public void setEndpointProviderKey(int endpointProviderKey) { + _endpointProviderKey = endpointProviderKey; + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportConnectRequestPdu.java b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportConnectRequestPdu.java new file mode 100644 index 000000000..5b50e2487 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportConnectRequestPdu.java @@ -0,0 +1,46 @@ +/* + * 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 org.apache.cloudstack.framework.transport; + +import org.apache.cloudstack.framework.serializer.OnwireName; + +@OnwireName(name="TransportConnectRequestPdu") +public class TransportConnectRequestPdu extends TransportPdu { + String _authIdentity; + String _authCredential; + + public TransportConnectRequestPdu() { + } + + public String getAuthIdentity() { + return _authIdentity; + } + + public void setAuthIdentity(String authIdentity) { + _authIdentity = authIdentity; + } + + public String getAuthCredential() { + return _authCredential; + } + + public void setAuthCredential(String authCredential) { + _authCredential = authCredential; + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportConnectResponsePdu.java b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportConnectResponsePdu.java new file mode 100644 index 000000000..8015ad92d --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportConnectResponsePdu.java @@ -0,0 +1,37 @@ +/* + * 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 org.apache.cloudstack.framework.transport; + +import org.apache.cloudstack.framework.serializer.OnwireName; + +@OnwireName(name="TransportConnectRequestPdu") +public class TransportConnectResponsePdu extends TransportPdu { + private int _statusCode; + + public TransportConnectResponsePdu() { + } + + public int getStatusCode() { + return _statusCode; + } + + public void setStatusCode(int statusCode) { + _statusCode = statusCode; + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportDataPdu.java b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportDataPdu.java new file mode 100644 index 000000000..ac9e06ddc --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportDataPdu.java @@ -0,0 +1,47 @@ +/* + * 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 org.apache.cloudstack.framework.transport; + +import org.apache.cloudstack.framework.serializer.OnwireName; + +@OnwireName(name="TransportDataPdu") +public class TransportDataPdu extends TransportPdu { + + private String _multiplexier; + private String _content; + + public TransportDataPdu() { + } + + public String getMultiplexier() { + return _multiplexier; + } + + public void setMultiplexier(String multiplexier) { + _multiplexier = multiplexier; + } + + public String getContent() { + return _content; + } + + public void setContent(String content) { + _content = content; + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportEndpoint.java b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportEndpoint.java new file mode 100644 index 000000000..7767c35ca --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportEndpoint.java @@ -0,0 +1,24 @@ +/* + * 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 org.apache.cloudstack.framework.transport; + +public interface TransportEndpoint extends TransportMultiplexier { + void onAttachConfirm(boolean bSuccess, String endpointAddress); + void onDetachIndication(String endpointAddress); +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportEndpointSite.java b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportEndpointSite.java new file mode 100644 index 000000000..eb55190c1 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportEndpointSite.java @@ -0,0 +1,144 @@ +/* + * 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 org.apache.cloudstack.framework.transport; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class TransportEndpointSite { + private TransportProvider _provider; + private TransportEndpoint _endpoint; + private TransportAddress _address; + + private List _outputQueue = new ArrayList(); + private Map _multiplexierMap = new HashMap(); + + private int _outstandingSignalRequests; + + public TransportEndpointSite(TransportProvider provider, TransportEndpoint endpoint, TransportAddress address) { + assert(provider != null); + assert(endpoint != null); + assert(address != null); + + _provider = provider; + _endpoint = endpoint; + _address = address; + + _outstandingSignalRequests = 0; + } + + public TransportEndpointSite(TransportProvider provider, TransportEndpoint endpoint) { + assert(provider != null); + assert(endpoint != null); + + _provider = provider; + _endpoint = endpoint; + + _outstandingSignalRequests = 0; + } + + public TransportEndpoint getEndpoint() { + return _endpoint; + } + + public TransportAddress getAddress() { + return _address; + } + + public void setAddress(TransportAddress address) { + _address = address; + } + + public void registerMultiplexier(String name, TransportMultiplexier multiplexier) { + assert(name != null); + assert(multiplexier != null); + assert(_multiplexierMap.get(name) == null); + + _multiplexierMap.put(name, multiplexier); + } + + public void unregisterMultiplexier(String name) { + assert(name != null); + _multiplexierMap.remove(name); + } + + public void addOutputPdu(TransportPdu pdu) { + synchronized(this) { + _outputQueue.add(pdu); + } + + signalOutputProcessRequest(); + } + + public TransportPdu getNextOutputPdu() { + synchronized(this) { + if(_outputQueue.size() > 0) + return _outputQueue.remove(0); + } + + return null; + } + + public void processOutput() { + TransportPdu pdu; + TransportEndpoint endpoint = getEndpoint(); + + if(endpoint != null) { + while((pdu = getNextOutputPdu()) != null) { + if(pdu instanceof TransportDataPdu) { + String multiplexierName = ((TransportDataPdu) pdu).getMultiplexier(); + TransportMultiplexier multiplexier = getRoutedMultiplexier(multiplexierName); + assert(multiplexier != null); + multiplexier.onTransportMessage(pdu.getSourceAddress(), pdu.getDestAddress(), + multiplexierName, ((TransportDataPdu) pdu).getContent()); + } + } + } + } + + private TransportMultiplexier getRoutedMultiplexier(String multiplexierName) { + TransportMultiplexier multiplexier = _multiplexierMap.get(multiplexierName); + if(multiplexier == null) + multiplexier = _endpoint; + + return multiplexier; + } + + private void signalOutputProcessRequest() { + boolean proceed = false; + synchronized(this) { + if(_outstandingSignalRequests == 0) { + _outstandingSignalRequests++; + proceed = true; + } + } + + if(proceed) + _provider.requestSiteOutput(this); + } + + public void ackOutputProcessSignal() { + synchronized(this) { + assert(_outstandingSignalRequests == 1); + _outstandingSignalRequests--; + } + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportMultiplexier.java b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportMultiplexier.java new file mode 100644 index 000000000..b10192976 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportMultiplexier.java @@ -0,0 +1,24 @@ +/* + * 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 org.apache.cloudstack.framework.transport; + +public interface TransportMultiplexier { + public void onTransportMessage(String senderEndpointAddress, String targetEndpointAddress, + String multiplexer, String message); +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportPdu.java b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportPdu.java new file mode 100644 index 000000000..74238a457 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportPdu.java @@ -0,0 +1,40 @@ +/* + * 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 org.apache.cloudstack.framework.transport; + +public class TransportPdu { + protected String _sourceAddress; + protected String _destAddress; + + public TransportPdu() { + } + + public String getSourceAddress() { return _sourceAddress; } + public void setSourceAddress(String sourceAddress) { + _sourceAddress = sourceAddress; + } + + public String getDestAddress() { + return _destAddress; + } + + public void setDestAddress(String destAddress) { + _destAddress = destAddress; + } +} diff --git a/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportProvider.java b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportProvider.java new file mode 100644 index 000000000..128381159 --- /dev/null +++ b/framework/ipc/src/org/apache/cloudstack/framework/transport/TransportProvider.java @@ -0,0 +1,34 @@ +/* + * 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 org.apache.cloudstack.framework.transport; + +import org.apache.cloudstack.framework.serializer.MessageSerializer; + +public interface TransportProvider { + void setMessageSerializer(MessageSerializer messageSerializer); + MessageSerializer getMessageSerializer(); + + TransportEndpointSite attach(TransportEndpoint endpoint, String predefinedAddress); + boolean detach(TransportEndpoint endpoint); + + void requestSiteOutput(TransportEndpointSite site); + + void sendMessage(String soureEndpointAddress, String targetEndpointAddress, + String multiplexier, String message); +} diff --git a/framework/ipc/test/org/apache/cloudstack/framework/codestyle/AsyncSampleCallee.java b/framework/ipc/test/org/apache/cloudstack/framework/codestyle/AsyncSampleCallee.java new file mode 100644 index 000000000..8833da2d3 --- /dev/null +++ b/framework/ipc/test/org/apache/cloudstack/framework/codestyle/AsyncSampleCallee.java @@ -0,0 +1,40 @@ +/* + * 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 org.apache.cloudstack.framework.codestyle; + +import org.apache.cloudstack.framework.async.AsyncCallFuture; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; + +public class AsyncSampleCallee { + AsyncSampleCallee _driver; + + public AsyncCallFuture createVolume(Object realParam) { + + String result = realParam.toString(); + AsyncCallFuture call = new AsyncCallFuture(); + + call.complete(result); + return call; + } + + public void createVolumeAsync(String param, AsyncCompletionCallback callback) { + callback.complete(param); + } +} + diff --git a/framework/ipc/test/org/apache/cloudstack/framework/codestyle/AsyncSampleEventDrivenStyleCaller.java b/framework/ipc/test/org/apache/cloudstack/framework/codestyle/AsyncSampleEventDrivenStyleCaller.java new file mode 100644 index 000000000..db3958803 --- /dev/null +++ b/framework/ipc/test/org/apache/cloudstack/framework/codestyle/AsyncSampleEventDrivenStyleCaller.java @@ -0,0 +1,118 @@ +/* + * 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 org.apache.cloudstack.framework.codestyle; + +import java.util.concurrent.ExecutionException; + +import org.apache.cloudstack.framework.async.AsyncCallFuture; +import org.apache.cloudstack.framework.async.AsyncCallbackDispatcher; +import org.apache.cloudstack.framework.async.AsyncCallbackDriver; +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; +import org.apache.cloudstack.framework.async.AsyncRpcConext; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration(locations="classpath:/SampleManagementServerAppContext.xml") +public class AsyncSampleEventDrivenStyleCaller { + private AsyncSampleCallee _ds; + AsyncCallbackDriver _callbackDriver; + @Before + public void setup() { + _ds = new AsyncSampleCallee(); + } + @SuppressWarnings("unchecked") + @Test + public void MethodThatWillCallAsyncMethod() { + String vol = new String("Hello"); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + AsyncCallFuture future = _ds.createVolume(vol); + try { + String result = future.get(); + Assert.assertEquals(result, vol); + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } catch (ExecutionException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + + private class TestContext extends AsyncRpcConext { + private boolean finished; + private String result; + /** + * @param callback + */ + public TestContext(AsyncCompletionCallback callback) { + super(callback); + this.finished = false; + } + + public void setResult(String result) { + this.result = result; + synchronized (this) { + this.finished = true; + this.notify(); + } + } + + public String getResult() { + synchronized (this) { + if (!this.finished) { + try { + this.wait(); + + } catch (InterruptedException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } + return this.result; + } + } + + } + @Test + public void installCallback() { + TestContext context = new TestContext(null); + AsyncCallbackDispatcher caller = AsyncCallbackDispatcher.create(this); + caller.setCallback(caller.getTarget().HandleVolumeCreateAsyncCallback(null, null)) + .setContext(context); + String test = "test"; + _ds.createVolumeAsync(test, caller); + Assert.assertEquals(test, context.getResult()); + } + + protected Void HandleVolumeCreateAsyncCallback(AsyncCallbackDispatcher callback, TestContext context) { + String resultVol = callback.getResult(); + context.setResult(resultVol); + return null; + } + + public static void main(String[] args) { + AsyncSampleEventDrivenStyleCaller caller = new AsyncSampleEventDrivenStyleCaller(); + caller.MethodThatWillCallAsyncMethod(); + } +} diff --git a/framework/ipc/test/org/apache/cloudstack/framework/codestyle/AsyncSampleListenerStyleCaller.java b/framework/ipc/test/org/apache/cloudstack/framework/codestyle/AsyncSampleListenerStyleCaller.java new file mode 100644 index 000000000..4a84f06a5 --- /dev/null +++ b/framework/ipc/test/org/apache/cloudstack/framework/codestyle/AsyncSampleListenerStyleCaller.java @@ -0,0 +1,38 @@ +/* + * 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 org.apache.cloudstack.framework.codestyle; + +import org.apache.cloudstack.framework.async.AsyncCompletionCallback; + +public class AsyncSampleListenerStyleCaller { + AsyncSampleCallee _ds; + + public void MethodThatWillCallAsyncMethod() { + String vol = new String(); + + /* _ds.createVolume(vol, + new AsyncCompletionCallback() { + @Override + public void complete(String resultObject) { + // TODO Auto-generated method stub + + } + });*/ + } +} diff --git a/framework/ipc/test/org/apache/cloudstack/framework/codestyle/ClientOnlyEventDrivenStyle.java b/framework/ipc/test/org/apache/cloudstack/framework/codestyle/ClientOnlyEventDrivenStyle.java new file mode 100644 index 000000000..b9ab85a58 --- /dev/null +++ b/framework/ipc/test/org/apache/cloudstack/framework/codestyle/ClientOnlyEventDrivenStyle.java @@ -0,0 +1,54 @@ +/* + * 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 org.apache.cloudstack.framework.codestyle; + +import org.apache.cloudstack.framework.rpc.RpcCallbackDispatcher; +import org.apache.cloudstack.framework.rpc.RpcClientCall; +import org.apache.cloudstack.framework.rpc.RpcException; +import org.apache.cloudstack.framework.rpc.RpcIOException; +import org.apache.cloudstack.framework.rpc.RpcProvider; +import org.apache.cloudstack.framework.rpc.RpcTimeoutException; + +public class ClientOnlyEventDrivenStyle { + RpcProvider _rpcProvider; + + public void AsyncCallRpcService() { + String cmd = new String(); + RpcCallbackDispatcher callbackDispatcher = RpcCallbackDispatcher.create(this); + callbackDispatcher.setCallback(callbackDispatcher.getTarget().OnAsyncCallRpcServiceCallback(null, null)); + _rpcProvider.newCall("host-2").setCommand("TestCommand").setCommandArg(cmd).setTimeout(10000) + .setCallbackDispatcher(callbackDispatcher) + .setContext("Context Object") // save context object for callback handler + .apply(); + } + + public Void OnAsyncCallRpcServiceCallback(RpcClientCall call, String context) { + try { + String answer = call.get(); + + } catch(RpcTimeoutException e) { + + } catch(RpcIOException e) { + + } catch(RpcException e) { + } + + return null; + } +} diff --git a/framework/ipc/test/org/apache/cloudstack/framework/codestyle/ClientOnlyListenerStyle.java b/framework/ipc/test/org/apache/cloudstack/framework/codestyle/ClientOnlyListenerStyle.java new file mode 100644 index 000000000..2d795554c --- /dev/null +++ b/framework/ipc/test/org/apache/cloudstack/framework/codestyle/ClientOnlyListenerStyle.java @@ -0,0 +1,59 @@ +/* + * 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 org.apache.cloudstack.framework.codestyle; + +import org.apache.cloudstack.framework.rpc.RpcCallbackListener; +import org.apache.cloudstack.framework.rpc.RpcClientCall; +import org.apache.cloudstack.framework.rpc.RpcException; +import org.apache.cloudstack.framework.rpc.RpcIOException; +import org.apache.cloudstack.framework.rpc.RpcProvider; +import org.apache.cloudstack.framework.rpc.RpcTimeoutException; + +public class ClientOnlyListenerStyle { + + RpcProvider _rpcProvider; + + public void AsyncCallRpcService() { + String cmd = new String(); + _rpcProvider.newCall("host-2").setCommand("TestCommand").setCommandArg(cmd).setTimeout(10000) + .addCallbackListener(new RpcCallbackListener() { + @Override + public void onSuccess(String result) { + } + + @Override + public void onFailure(RpcException e) { + } + }).apply(); + } + + public void SyncCallRpcService() { + String cmd = new String(); + RpcClientCall call = _rpcProvider.newCall("host-2").setCommand("TestCommand").setCommandArg(cmd).setTimeout(10000).apply(); + + try { + String answer = call.get(); + } catch (RpcTimeoutException e) { + + } catch (RpcIOException e) { + + } catch (RpcException e) { + } + } +} diff --git a/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagementServer.java b/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagementServer.java new file mode 100644 index 000000000..2a168ac7c --- /dev/null +++ b/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagementServer.java @@ -0,0 +1,34 @@ +/* + * 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 org.apache.cloudstack.framework.sampleserver; + +import org.springframework.stereotype.Component; + +@Component +public class SampleManagementServer { + + public void mainLoop() { + while(true) { + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + } + } + } +} diff --git a/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagementServerApp.java b/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagementServerApp.java new file mode 100644 index 000000000..a9479f309 --- /dev/null +++ b/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagementServerApp.java @@ -0,0 +1,56 @@ +/* + * 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 org.apache.cloudstack.framework.sampleserver; + +import java.io.File; +import java.net.URISyntaxException; +import java.net.URL; + +import org.apache.log4j.xml.DOMConfigurator; +import org.springframework.context.ApplicationContext; +import org.springframework.context.support.ClassPathXmlApplicationContext; + +public class SampleManagementServerApp { + + private static void setupLog4j() { + URL configUrl = System.class.getResource("/resources/log4j-cloud.xml"); + if(configUrl != null) { + System.out.println("Configure log4j using log4j-cloud.xml"); + + try { + File file = new File(configUrl.toURI()); + + System.out.println("Log4j configuration from : " + file.getAbsolutePath()); + DOMConfigurator.configureAndWatch(file.getAbsolutePath(), 10000); + } catch (URISyntaxException e) { + System.out.println("Unable to convert log4j configuration Url to URI"); + } + } else { + System.out.println("Configure log4j with default properties"); + } + } + + public static void main(String args[]) { + setupLog4j(); + + ApplicationContext context = new ClassPathXmlApplicationContext("/resources/SampleManagementServerAppContext.xml"); + SampleManagementServer server = context.getBean(SampleManagementServer.class); + server.mainLoop(); + } +} diff --git a/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagerComponent.java b/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagerComponent.java new file mode 100644 index 000000000..7b0a2eca1 --- /dev/null +++ b/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagerComponent.java @@ -0,0 +1,98 @@ +/* + * 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 org.apache.cloudstack.framework.sampleserver; + +import java.util.Timer; +import java.util.TimerTask; + +import javax.annotation.PostConstruct; +import javax.inject.Inject; + +import org.apache.cloudstack.framework.eventbus.EventBus; +import org.apache.cloudstack.framework.eventbus.EventDispatcher; +import org.apache.cloudstack.framework.eventbus.EventHandler; +import org.apache.cloudstack.framework.rpc.RpcCallbackListener; +import org.apache.cloudstack.framework.rpc.RpcException; +import org.apache.cloudstack.framework.rpc.RpcProvider; +import org.apache.cloudstack.framework.rpc.RpcServerCall; +import org.apache.cloudstack.framework.rpc.RpcServiceDispatcher; +import org.apache.cloudstack.framework.rpc.RpcServiceHandler; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +@Component +public class SampleManagerComponent { + private static final Logger s_logger = Logger.getLogger(SampleManagerComponent.class); + + @Inject + private EventBus _eventBus; + + @Inject + private RpcProvider _rpcProvider; + + private Timer _timer = new Timer(); + + public SampleManagerComponent() { + } + + @PostConstruct + public void init() { + _rpcProvider.registerRpcServiceEndpoint( + RpcServiceDispatcher.getDispatcher(this)); + + // subscribe to all network events (for example) + _eventBus.subscribe("network", + EventDispatcher.getDispatcher(this)); + + _timer.schedule(new TimerTask() { + public void run() { + testRpc(); + } + }, 3000); + } + + @RpcServiceHandler(command="NetworkPrepare") + void onStartCommand(RpcServerCall call) { + call.completeCall("NetworkPrepare completed"); + } + + @EventHandler(topic="network.prepare") + void onPrepareNetwork(String sender, String topic, Object args) { + } + + void testRpc() { + SampleStoragePrepareCommand cmd = new SampleStoragePrepareCommand(); + cmd.setStoragePool("Pool1"); + cmd.setVolumeId("vol1"); + + _rpcProvider.newCall() + .setCommand("StoragePrepare").setCommandArg(cmd).setTimeout(10000) + .addCallbackListener(new RpcCallbackListener() { + @Override + public void onSuccess(SampleStoragePrepareAnswer result) { + s_logger.info("StoragePrepare return result: " + result.getResult()); + } + + @Override + public void onFailure(RpcException e) { + s_logger.info("StoragePrepare failed"); + } + }).apply(); + } +} diff --git a/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagerComponent2.java b/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagerComponent2.java new file mode 100644 index 000000000..dc482c035 --- /dev/null +++ b/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleManagerComponent2.java @@ -0,0 +1,76 @@ +/* + * 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 org.apache.cloudstack.framework.sampleserver; + +import javax.annotation.PostConstruct; +import javax.inject.Inject; + +import org.apache.cloudstack.framework.eventbus.EventBus; +import org.apache.cloudstack.framework.eventbus.EventDispatcher; +import org.apache.cloudstack.framework.eventbus.EventHandler; +import org.apache.cloudstack.framework.rpc.RpcProvider; +import org.apache.cloudstack.framework.rpc.RpcServerCall; +import org.apache.cloudstack.framework.rpc.RpcServiceDispatcher; +import org.apache.cloudstack.framework.rpc.RpcServiceHandler; +import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; + +@Component +public class SampleManagerComponent2 { + private static final Logger s_logger = Logger.getLogger(SampleManagerComponent2.class); + + @Inject + private EventBus _eventBus; + + @Inject + private RpcProvider _rpcProvider; + + public SampleManagerComponent2() { + } + + @PostConstruct + public void init() { + _rpcProvider.registerRpcServiceEndpoint( + RpcServiceDispatcher.getDispatcher(this)); + + // subscribe to all network events (for example) + _eventBus.subscribe("storage", + EventDispatcher.getDispatcher(this)); + } + + @RpcServiceHandler(command="StoragePrepare") + void onStartCommand(RpcServerCall call) { + s_logger.info("Reevieved StoragePrpare call"); + SampleStoragePrepareCommand cmd = call.getCommandArgument(); + + s_logger.info("StoragePrepare command arg. pool: " + cmd.getStoragePool() + ", vol: " + cmd.getVolumeId()); + SampleStoragePrepareAnswer answer = new SampleStoragePrepareAnswer(); + answer.setResult("Successfully executed StoragePrepare command"); + + call.completeCall(answer); + } + + @EventHandler(topic="storage.prepare") + void onPrepareNetwork(String sender, String topic, Object args) { + } + + void test() { + + } +} diff --git a/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleStoragePrepareAnswer.java b/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleStoragePrepareAnswer.java new file mode 100644 index 000000000..19a39e136 --- /dev/null +++ b/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleStoragePrepareAnswer.java @@ -0,0 +1,37 @@ +/* + * 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 org.apache.cloudstack.framework.sampleserver; + +import org.apache.cloudstack.framework.serializer.OnwireName; + +@OnwireName(name="SampleStoragePrepareAnswer") +public class SampleStoragePrepareAnswer { + String result; + + public SampleStoragePrepareAnswer() { + } + + public String getResult() { + return result; + } + + public void setResult(String result) { + this.result = result; + } +} diff --git a/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleStoragePrepareCommand.java b/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleStoragePrepareCommand.java new file mode 100644 index 000000000..841352215 --- /dev/null +++ b/framework/ipc/test/org/apache/cloudstack/framework/sampleserver/SampleStoragePrepareCommand.java @@ -0,0 +1,47 @@ +/* + * 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 org.apache.cloudstack.framework.sampleserver; + +import org.apache.cloudstack.framework.serializer.OnwireName; + +@OnwireName(name="SampleStoragePrepareCommand") +public class SampleStoragePrepareCommand { + + String storagePool; + String volumeId; + + public SampleStoragePrepareCommand() { + } + + public String getStoragePool() { + return storagePool; + } + + public void setStoragePool(String storagePool) { + this.storagePool = storagePool; + } + + public String getVolumeId() { + return volumeId; + } + + public void setVolumeId(String volumeId) { + this.volumeId = volumeId; + } +} diff --git a/framework/ipc/test/resources/SampleManagementServerAppContext.xml b/framework/ipc/test/resources/SampleManagementServerAppContext.xml new file mode 100644 index 000000000..4b1ff3e65 --- /dev/null +++ b/framework/ipc/test/resources/SampleManagementServerAppContext.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + org.apache.cloudstack.framework + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/ipc/test/resources/log4j-cloud.xml b/framework/ipc/test/resources/log4j-cloud.xml new file mode 100644 index 000000000..e9b1918b6 --- /dev/null +++ b/framework/ipc/test/resources/log4j-cloud.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/framework/jobs/pom.xml b/framework/jobs/pom.xml new file mode 100644 index 000000000..56490216f --- /dev/null +++ b/framework/jobs/pom.xml @@ -0,0 +1,29 @@ + + + 4.0.0 + org.apache.cloudstack + cloud-framework-jobs + 4.0.0-SNAPSHOT + + org.quartz-scheduler + quartz + 2.1.6 + + diff --git a/framework/jobs/src/org/apache/cloudstack/framework/job/Job.java b/framework/jobs/src/org/apache/cloudstack/framework/job/Job.java new file mode 100755 index 000000000..62ed72fe8 --- /dev/null +++ b/framework/jobs/src/org/apache/cloudstack/framework/job/Job.java @@ -0,0 +1,32 @@ +/* + * 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 org.apache.cloudstack.framework.job; + +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Retention(RetentionPolicy.RUNTIME) +@Target(ElementType.METHOD) +public @interface Job { + + + +} diff --git a/framework/jobs/src/org/apache/cloudstack/framework/job/JobInterceptor.java b/framework/jobs/src/org/apache/cloudstack/framework/job/JobInterceptor.java new file mode 100755 index 000000000..d81077d6d --- /dev/null +++ b/framework/jobs/src/org/apache/cloudstack/framework/job/JobInterceptor.java @@ -0,0 +1,23 @@ +/* + * 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 org.apache.cloudstack.framework.job; + +public class JobInterceptor { + +} diff --git a/framework/pom.xml b/framework/pom.xml index 81e091605..4633dab2b 100644 --- a/framework/pom.xml +++ b/framework/pom.xml @@ -19,17 +19,20 @@ 4.0.0 cloudstack-framework - Apache CloudStack framework POM + Apache CloudStack Framework pom org.apache.cloudstack cloudstack - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT install + ipc + rest events + api diff --git a/framework/rest/pom.xml b/framework/rest/pom.xml new file mode 100644 index 000000000..ab8840596 --- /dev/null +++ b/framework/rest/pom.xml @@ -0,0 +1,81 @@ + + + 4.0.0 + + org.apache.cloudstack + cloudstack-framework + 4.2.0-SNAPSHOT + ../pom.xml + + cloud-framework-rest + Apache CloudStack Framework - REST + + install + src + test + + + + com.fasterxml.jackson.module + jackson-module-jaxb-annotations + 2.1.1 + + + com.fasterxml.jackson.core + jackson-annotations + 2.1.1 + + + com.fasterxml.jackson.core + jackson-core + 2.1.1 + + + com.fasterxml.jackson.core + jackson-databind + 2.1.1 + + + com.fasterxml.jackson.jaxrs + jackson-jaxrs-json-provider + 2.1.1 + + + org.apache.cxf + cxf-bundle-jaxrs + 2.7.0 + + + org.eclipse.jetty + jetty-server + + + org.apache.geronimo.specs + geronimo-servlet_3.0_spec + + + com.sun.xml.bind + jaxb-impl + + + + + diff --git a/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationIntrospector.java b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationIntrospector.java new file mode 100644 index 000000000..6a26a6c59 --- /dev/null +++ b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationIntrospector.java @@ -0,0 +1,60 @@ +/* + * 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 org.apache.cloudstack.framework.ws.jackson; + +import java.lang.reflect.AnnotatedElement; +import java.util.List; + +import com.fasterxml.jackson.core.Version; +import com.fasterxml.jackson.databind.introspect.Annotated; +import com.fasterxml.jackson.databind.introspect.NopAnnotationIntrospector; + + +/** + * Adds introspectors for the annotations added specifically for CloudStack + * Web Services. + * + */ +public class CSJacksonAnnotationIntrospector extends NopAnnotationIntrospector { + + private static final long serialVersionUID = 5532727887216652602L; + + @Override + public Version version() { + return new Version(1, 7, 0, "abc", "org.apache.cloudstack", "cloudstack-framework-rest"); + } + + @Override + public Object findSerializer(Annotated a) { + AnnotatedElement ae = a.getAnnotated(); + Url an = ae.getAnnotation(Url.class); + if (an == null) { + return null; + } + + if (an.type() == String.class) { + return new UriSerializer(an); + } else if (an.type() == List.class){ + return new UrisSerializer(an); + } + + throw new UnsupportedOperationException("Unsupported type " + an.type()); + + } +} diff --git a/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationModule.java b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationModule.java new file mode 100644 index 000000000..d274b858c --- /dev/null +++ b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationModule.java @@ -0,0 +1,47 @@ +/* + * 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 org.apache.cloudstack.framework.ws.jackson; + + +import com.fasterxml.jackson.core.Version; +import com.fasterxml.jackson.databind.Module; + + +/** + * This module extends SimpleModle so that our annotations can be processed. + * + */ +public class CSJacksonAnnotationModule extends Module { + + @Override + public String getModuleName() { + return "CloudStackSupplementalModule"; + } + + @Override + public void setupModule(SetupContext ctx) { + ctx.appendAnnotationIntrospector(new CSJacksonAnnotationIntrospector()); + } + + @Override + public Version version() { + return new Version(1, 0, 0, "", "org.apache.cloudstack", "cloudstack-framework-rest"); + } + +} diff --git a/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/UriSerializer.java b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/UriSerializer.java new file mode 100644 index 000000000..079514964 --- /dev/null +++ b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/UriSerializer.java @@ -0,0 +1,58 @@ +/* + * 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 org.apache.cloudstack.framework.ws.jackson; + +import java.io.IOException; + +import javax.ws.rs.core.UriBuilder; + +import org.apache.cxf.jaxrs.impl.tl.ThreadLocalUriInfo; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + +public class UriSerializer extends JsonSerializer { + + Url _annotation; + + public UriSerializer(Url annotation) { + _annotation = annotation; + } + + protected UriSerializer() { + } + + @Override + public void serialize(String id, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + jgen.writeStartObject(); + jgen.writeStringField("id", id); + jgen.writeFieldName("uri"); + jgen.writeString(buildUri(_annotation.clazz(), _annotation.method(), id)); + jgen.writeEndObject(); + } + + protected String buildUri(Class clazz, String method, String id) { + ThreadLocalUriInfo uriInfo = new ThreadLocalUriInfo(); + UriBuilder ub = uriInfo.getAbsolutePathBuilder().path(clazz, method); + ub.build(id); + return ub.toString(); + } +} diff --git a/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/UrisSerializer.java b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/UrisSerializer.java new file mode 100644 index 000000000..6ab3ced3c --- /dev/null +++ b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/UrisSerializer.java @@ -0,0 +1,71 @@ +/* + * 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 org.apache.cloudstack.framework.ws.jackson; + +import java.io.IOException; +import java.util.Iterator; +import java.util.List; + +import javax.ws.rs.core.UriBuilder; + +import org.apache.cxf.jaxrs.impl.tl.ThreadLocalUriInfo; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + + +/** + * Serializer for a list of ids. + * + */ +public class UrisSerializer extends JsonSerializer> { + Url _annotation; + + public UrisSerializer(Url annotation) { + _annotation = annotation; + } + + protected UrisSerializer() { + } + + @Override + public void serialize(List lst, JsonGenerator jgen, SerializerProvider provider) throws IOException, JsonProcessingException { + Iterator it = lst.iterator(); + jgen.writeStartObject(); + while (it.hasNext()) { + Object id = it.next(); + jgen.writeStartObject(); + jgen.writeFieldName("id"); + jgen.writeObject(id); + jgen.writeFieldName("uri"); + jgen.writeString(buildUri(_annotation.clazz(), _annotation.method(), id)); + jgen.writeEndObject(); + } + jgen.writeEndObject(); + } + + protected String buildUri(Class clazz, String method, Object id) { + ThreadLocalUriInfo uriInfo = new ThreadLocalUriInfo(); + UriBuilder ub = uriInfo.getAbsolutePathBuilder().path(clazz, method); + ub.build(id); + return ub.toString(); + } +} diff --git a/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/Url.java b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/Url.java new file mode 100644 index 000000000..9f9537c1c --- /dev/null +++ b/framework/rest/src/org/apache/cloudstack/framework/ws/jackson/Url.java @@ -0,0 +1,53 @@ +/* + * 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 org.apache.cloudstack.framework.ws.jackson; + +import static java.lang.annotation.ElementType.FIELD; +import static java.lang.annotation.ElementType.METHOD; +import static java.lang.annotation.RetentionPolicy.RUNTIME; + +import java.lang.annotation.Retention; +import java.lang.annotation.Target; + +/** + * Url can be placed onto a method to construct an URL from the returned + * results. + * + * This annotation is supplemental to JAX-RS 2.0's annotations. JAX-RS 2.0 + * annotations do not include a way to construct an URL. Of + * course, this only works with how CloudStack works. + * + */ +@Target({FIELD, METHOD}) +@Retention(RUNTIME) +public @interface Url { + /** + * @return the class that the path should belong to. + */ + Class clazz() default Object.class; + + /** + * @return the name of the method that the path should call back to. + */ + String method(); + + String name() default ""; + + Class type() default String.class; +} diff --git a/framework/rest/test/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationTest.java b/framework/rest/test/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationTest.java new file mode 100644 index 000000000..75e390464 --- /dev/null +++ b/framework/rest/test/org/apache/cloudstack/framework/ws/jackson/CSJacksonAnnotationTest.java @@ -0,0 +1,118 @@ +// 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 org.apache.cloudstack.framework.ws.jackson; + +import java.io.IOException; +import java.io.StringWriter; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; + +import org.junit.Before; +import org.junit.Ignore; +import org.junit.Test; + +import com.fasterxml.jackson.core.JsonGenerationException; +import com.fasterxml.jackson.databind.JsonMappingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule; +import com.fasterxml.jackson.module.jaxb.JaxbAnnotationModule.Priority; + +public class CSJacksonAnnotationTest { + + @Before + public void setUp() throws Exception { + } + + @Test @Ignore + public void test() { + ObjectMapper mapper = new ObjectMapper(); + JaxbAnnotationModule jaxbModule = new JaxbAnnotationModule(); + jaxbModule.setPriority(Priority.SECONDARY); + mapper.registerModule(jaxbModule); + mapper.registerModule(new CSJacksonAnnotationModule()); + + StringWriter writer = new StringWriter(); + + TestVO vo = new TestVO(1000, "name"); + vo.names = new ArrayList(); + vo.names.add("name1"); + vo.names.add("name2"); + vo.values = new HashMap(); + vo.values.put("key1", 1000l); + vo.values.put("key2", 2000l); + vo.vo2.name = "testvoname2"; + vo.pods="abcde"; + + try { + mapper.writeValue(writer, vo); + } catch (JsonGenerationException e) { + e.printStackTrace(); + } catch (JsonMappingException e) { + e.printStackTrace(); + } catch (IOException e) { + e.printStackTrace(); + } + + System.out.print(writer.getBuffer().toString()); + + } + + @XmlRootElement(name="xml-test2") + public class Test2VO { + public String name; + } + + @XmlRootElement(name="abc") + public class TestVO { + public int id; + + public Map values; + + public String name; + + + public List names; + + public String pods; + + + @XmlElement(name="test2") + public Test2VO vo2 = new Test2VO(); + + public TestVO(int id, String name) { + this.id = id; + this.name = name; + } + + @Url(clazz=TestVO.class, method="getName") + public String getName() { + return name; + } + + @Url(clazz=TestVO.class, method="getNames", type=List.class) + public List getNames() { + return names; + } + + } + +} diff --git a/m2-settings.xml b/m2-settings.xml new file mode 100644 index 000000000..9f6c934e2 --- /dev/null +++ b/m2-settings.xml @@ -0,0 +1,59 @@ + + + + + + admin + central + + + admin + snapshots + + + + + + + + false + + repo1 + repo1 + http://repo1.maven.org/maven2 + + + + false + + central + libs-release + http://cs.ibuildthecloud.com/artifactory/libs-release + + + artifactory + + + + artifactory + + + diff --git a/packaging/centos63/cloud-agent.rc b/packaging/centos63/cloud-agent.rc index 505118fcb..b37848829 100755 --- a/packaging/centos63/cloud-agent.rc +++ b/packaging/centos63/cloud-agent.rc @@ -24,14 +24,15 @@ . /etc/rc.d/init.d/functions -whatami=cloud-agent +whatami=cloudstack-agent # set environment variables SHORTNAME="$whatami" PIDFILE=/var/run/"$whatami".pid LOCKFILE=/var/lock/subsys/"$SHORTNAME" -LOGFILE=/var/log/cloud/agent/agent.log +LOGDIR=/var/log/cloudstack/agent +LOGFILE=${LOGDIR}/agent.log PROGNAME="Cloud Agent" CLASS="com.cloud.agent.AgentShell" JSVC=`which jsvc 2>/dev/null`; @@ -46,7 +47,7 @@ unset OPTIONS [ -r /etc/sysconfig/"$SHORTNAME" ] && source /etc/sysconfig/"$SHORTNAME" # The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in $DEFAULT) -JDK_DIRS="/usr/lib/jvm/jre /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-sun /usr/lib/jvm/java-1.5.0-sun /usr/lib/j2sdk1.5-sun /usr/lib/j2sdk1.5-ibm" +JDK_DIRS="/usr/lib/jvm/jre /usr/lib/jvm/java-7-openjdk /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-7-openjdk-amd64 /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-sun" for jdir in $JDK_DIRS; do if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then @@ -55,67 +56,65 @@ for jdir in $JDK_DIRS; do done export JAVA_HOME -SCP="" -DCP="" -ACP=`ls /usr/share/cloud/java/* | tr '\n' ':'` -JCP="/usr/share/java/jna.jar:/usr/share/java/commons-daemon.jar" +ACP=`ls /usr/share/cloudstack-agent/lib/*.jar | tr '\n' ':' | sed s'/.$//'` +PCP=`ls /usr/share/cloudstack-agent/plugins/*.jar 2>/dev/null | tr '\n' ':' | sed s'/.$//'` # We need to append the JSVC daemon JAR to the classpath # AgentShell implements the JSVC daemon methods -export CLASSPATH="$SCP:$DCP:$ACP:$JCP:/etc/cloud/agent:/usr/lib64/cloud/agent" +# We also need JNA in the classpath (from the distribution) for the Libvirt Java bindings +export CLASSPATH="/usr/share/java/commons-daemon.jar:/usr/share/java/jna.jar:$ACP:$PCP:/etc/cloudstack/agent:/usr/share/cloudstack-common/scripts" start() { - echo -n $"Starting $PROGNAME: " - if hostname --fqdn >/dev/null 2>&1 ; then - $JSVC -cp "$CLASSPATH" -pidfile "$PIDFILE" $CLASS - RETVAL=$? - echo - else - failure - echo - echo The host name does not resolve properly to an IP address. Cannot start "$PROGNAME". > /dev/stderr - RETVAL=9 - fi - [ $RETVAL = 0 ] && touch ${LOCKFILE} - return $RETVAL + echo -n $"Starting $PROGNAME: " + if hostname --fqdn >/dev/null 2>&1 ; then + $JSVC -cp "$CLASSPATH" -pidfile "$PIDFILE" \ + -errfile $LOGDIR/cloudstack-agent.err -outfile $LOGDIR/cloudstack-agent.out $CLASS + RETVAL=$? + echo + else + failure + echo + echo The host name does not resolve properly to an IP address. Cannot start "$PROGNAME". > /dev/stderr + RETVAL=9 + fi + [ $RETVAL = 0 ] && touch ${LOCKFILE} + return $RETVAL } stop() { - echo -n $"Stopping $PROGNAME: " - $JSVC -pidfile "$PIDFILE" -stop $CLASS - RETVAL=$? - echo - [ $RETVAL = 0 ] && rm -f ${LOCKFILE} ${PIDFILE} + echo -n $"Stopping $PROGNAME: " + $JSVC -pidfile "$PIDFILE" -stop $CLASS + RETVAL=$? + echo + [ $RETVAL = 0 ] && rm -f ${LOCKFILE} ${PIDFILE} } - -# See how we were called. case "$1" in - start) - start - ;; - stop) - stop - ;; - status) + start) + start + ;; + stop) + stop + ;; + status) status -p ${PIDFILE} $SHORTNAME - RETVAL=$? - ;; - restart) - stop - sleep 3 - start - ;; - condrestart) - if status -p ${PIDFILE} $SHORTNAME >&/dev/null; then - stop - sleep 3 - start - fi - ;; - *) - echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}" - RETVAL=3 + RETVAL=$? + ;; + restart) + stop + sleep 3 + start + ;; + condrestart) + if status -p ${PIDFILE} $SHORTNAME >&/dev/null; then + stop + sleep 3 + start + fi + ;; + *) + echo $"Usage: $whatami {start|stop|restart|condrestart|status|help}" + RETVAL=3 esac exit $RETVAL diff --git a/packaging/centos63/cloud-ipallocator.rc b/packaging/centos63/cloud-ipallocator.rc index ffeffa342..08cf9c88a 100755 --- a/packaging/centos63/cloud-ipallocator.rc +++ b/packaging/centos63/cloud-ipallocator.rc @@ -30,7 +30,7 @@ whatami=cloud-external-ipallocator SHORTNAME="$whatami" PIDFILE=/var/run/"$whatami".pid LOCKFILE=/var/lock/subsys/"$SHORTNAME" -LOGFILE=/var/log/cloud/ipallocator/ipallocator.log +LOGFILE=/var/log/cloudstack/ipallocator/ipallocator.log PROGNAME="External IPAllocator" unset OPTIONS diff --git a/packaging/centos63/cloud-management.rc b/packaging/centos63/cloud-management.rc index 48c2ab44a..6fd435b55 100755 --- a/packaging/centos63/cloud-management.rc +++ b/packaging/centos63/cloud-management.rc @@ -46,8 +46,8 @@ NAME="$(basename $0)" stop() { SHUTDOWN_WAIT="30" count="0" - if [ -f /var/run/cloud-management.pid ]; then - pid=`cat /var/run/cloud-management.pid` + if [ -f /var/run/${NAME}.pid ]; then + pid=`cat /var/run/${NAME}.pid` kill $pid &>/dev/null until [ "$(ps --pid $pid | grep -c $pid)" -eq "0" ] || \ [ "$count" -gt "$SHUTDOWN_WAIT" ] @@ -78,8 +78,8 @@ set_ulimit() { handle_pid_file() { if [ "$1" -ne 0 ] ; then - echo "The pid file locates at /var/run/cloud-management.pid and lock file at /var/lock/subsys/cloud-management. - Starting cloud-management will take care of them or you can manually clean up." + echo "The pid file locates at /var/run/${NAME}.pid and lock file at /var/lock/subsys/${NAME}. + Starting ${NAME} will take care of them or you can manually clean up." fi } diff --git a/packaging/centos63/cloud-management.sysconfig b/packaging/centos63/cloud-management.sysconfig index 15df8cdab..cbc8b8b36 100644 --- a/packaging/centos63/cloud-management.sysconfig +++ b/packaging/centos63/cloud-management.sysconfig @@ -18,6 +18,6 @@ # This file is loaded in /etc/init.d/vmopsmanagement # ATM we only do two things here: -dummy=1 ; export TOMCAT_CFG=/etc/cloud/management/tomcat6.conf ; . /etc/cloud/management/tomcat6.conf +dummy=1 ; export TOMCAT_CFG=/etc/cloudstack/management/tomcat6.conf ; . /etc/cloudstack/management/tomcat6.conf #-------------------------- diff --git a/packaging/centos63/cloud-usage.rc b/packaging/centos63/cloud-usage.rc index 9aa01ea2b..a9b604788 100755 --- a/packaging/centos63/cloud-usage.rc +++ b/packaging/centos63/cloud-usage.rc @@ -32,10 +32,11 @@ . /etc/rc.d/init.d/functions -SHORTNAME="cloud-usage" +SHORTNAME="cloudstack-usage" PIDFILE=/var/run/"$SHORTNAME".pid LOCKFILE=/var/lock/subsys/"$SHORTNAME" -LOGFILE=/var/log/cloud/usage/usage.log +LOGDIR=/var/log/cloudstack/usage +LOGFILE=${LOGDIR}/usage.log PROGNAME="CloudStack Usage Monitor" CLASS="com.cloud.usage.UsageServer" PROG="jsvc" @@ -57,12 +58,12 @@ export JAVA_HOME SCP="" DCP="" -UCP=`ls /usr/share/cloud/usage/java/* | tr '\n' ':'` +UCP=`ls /usr/share/cloudstack-usage/cloud-usage-*.jar`":"`ls /usr/share/cloudstack-usage/lib/*.jar | tr '\n' ':'` JCP="/usr/share/java/commons-daemon.jar" # We need to append the JSVC daemon JAR to the classpath # AgentShell implements the JSVC daemon methods -export CLASSPATH="$SCP:$DCP:$UCP:$JCP:/etc/sysconfig +export CLASSPATH="$SCP:$DCP:$UCP:$JCP:/etc/cloudstack/usage" start() { if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then @@ -79,7 +80,8 @@ start() { echo -n "Starting $PROGNAME" "$SHORTNAME" - if daemon --pidfile $PIDFILE $DAEMON -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" -errfile SYSLOG -Dpid=$$ $CLASS + if daemon --pidfile $PIDFILE $DAEMON -cp "$CLASSPATH" -pidfile "$PIDFILE" -user "$USER" \ + -errfile $LOGDIR/cloudstack-usage.err -outfile $LOGDIR/cloudstack-usage.out -Dpid=$$ $CLASS RETVAL=$? then rc=0 diff --git a/packaging/centos63/cloud.spec b/packaging/centos63/cloud.spec index 50e1d11ef..a7cc20e8a 100644 --- a/packaging/centos63/cloud.spec +++ b/packaging/centos63/cloud.spec @@ -21,7 +21,7 @@ # DISABLE the post-percentinstall java repacking and line number stripping # we need to find a way to just disable the java repacking and line number stripping, but not the autodeps -Name: cloud +Name: cloudstack Summary: CloudStack IaaS Platform #http://fedoraproject.org/wiki/PackageNamingGuidelines#Pre-Release_packages %if "%{?_prerelease}" != "" @@ -33,8 +33,8 @@ Release: %{_rel}%{dist} %endif Version: %{_ver} License: ASL 2.0 -Vendor: Apache CloudStack -Packager: Apache CloudStack +Vendor: Apache CloudStack +Packager: Apache CloudStack Group: System Environment/Libraries # FIXME do groups for every single one of the subpackages Source0: %{name}-%{_maventag}.tgz @@ -54,7 +54,7 @@ BuildRequires: MySQL-python CloudStack is a highly-scalable elastic, open source, intelligent IaaS cloud implementation. -%package management-server +%package management Summary: CloudStack management server UI Requires: tomcat6 Requires: java >= 1.6.0 @@ -78,42 +78,51 @@ Requires: mkisofs Requires: MySQL-python Requires: python-paramiko Requires: ipmitool -Requires: %{name}-setup = %{_ver} +Requires: %{name}-common = %{_ver} +Requires: %{name}-awsapi = %{_ver} +Obsoletes: cloud-client < 4.1.0 +Obsoletes: cloud-client-ui < 4.1.0 +Obsoletes: cloud-daemonize < 4.1.0 +Obsoletes: cloud-server < 4.1.0 +Obsoletes: cloud-test < 4.1.0 +Provides: cloud-client Group: System Environment/Libraries -%description management-server +%description management The CloudStack management server is the central point of coordination, management, and intelligence in CloudStack. -%package setup -Summary: CloudStack database setup scripts -Requires: java >= 1.6.0 -Requires: python -Requires: MySQL-python -Requires: %{name}-python = %{_ver} -Group: System Environment/Libraries -%description setup -The scripts and commands used to setup and configure the database - -%package python -Summary: CloudStack Python library -# FIXME nuke the archdependency +%package common +Summary: Apache CloudStack common files and scripts Requires: python -Group: System Environment/Libraries -%description python -The CloudStack Python library contains a few Python modules that the -CloudStack uses. +Obsoletes: cloud-test < 4.1.0 +Obsoletes: cloud-scripts < 4.1.0 +Obsoletes: cloud-utils < 4.1.0 +Obsoletes: cloud-core < 4.1.0 +Obsoletes: cloud-deps < 4.1.0 +Obsoletes: cloud-python < 4.1.0 +Obsoletes: cloud-setup < 4.1.0 +Obsoletes: cloud-cli < 4.1.0 +Group: System Environment/Libraries +%description common +The Apache CloudStack files shared between agent and management server %package agent Summary: CloudStack Agent for KVM hypervisors Requires: java >= 1.6.0 -Requires: %{name}-python = %{_ver} +Requires: jna >= 3.2.4 +Requires: %{name}-common = %{_ver} Requires: libvirt Requires: bridge-utils Requires: ebtables +Requires: ipset Requires: jsvc -Requires: jna Requires: jakarta-commons-daemon Requires: jakarta-commons-daemon-jsvc +Requires: perl +Provides: cloud-agent +Obsoletes: cloud-agent < 4.1.0 +Obsoletes: cloud-agent-libs < 4.1.0 +Obsoletes: cloud-test < 4.1.0 Group: System Environment/Libraries %description agent The CloudStack agent for KVM hypervisors @@ -124,9 +133,26 @@ Requires: java >= 1.6.0 Requires: jsvc Requires: jakarta-commons-daemon Requires: jakarta-commons-daemon-jsvc +Obsoletes: cloud-usage < 4.1.0 +Provides: cloud-usage %description usage The CloudStack usage calculation service +%package cli +Summary: Apache CloudStack CLI +Provides: python-cloudmonkey +Provides: python-marvin +%description cli +Apache CloudStack command line interface + +%package awsapi +Summary: Apache CloudStack AWS API compatibility wrapper +Requires: %{name}-management = %{_ver} +Obsoletes: cloud-aws-api < 4.1.0 +Provides: cloud-aws-api +%description awsapi +Apache Cloudstack AWS API compatibility wrapper + %prep echo Doing CloudStack build @@ -134,199 +160,409 @@ echo Doing CloudStack build %build -# this fixes the /usr/com bug on centos5 -%define _localstatedir /var -%define _sharedstatedir /var/lib cp packaging/centos63/replace.properties build/replace.properties echo VERSION=%{_maventag} >> build/replace.properties echo PACKAGE=%{name} >> build/replace.properties -mvn package -Dsystemvm + +if [ "%{_ossnoss}" == "NONOSS" -o "%{_ossnoss}" == "nonoss" ] ; then + echo "Executing mvn packaging for NONOSS ..." + mvn -Pawsapi,systemvm -Dnonoss package +else + echo "Executing mvn packaging for OSS ..." + mvn -Pawsapi package -Dsystemvm +fi %install [ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT} +# Common directories mkdir -p ${RPM_BUILD_ROOT}%{_bindir} -mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}/setup -mkdir -p ${RPM_BUILD_ROOT}/usr/share/%{name}/management/ -ln -sf /usr/share/tomcat6/bin ${RPM_BUILD_ROOT}/usr/share/%{name}/management/bin -ln -sf /etc/cloud/management ${RPM_BUILD_ROOT}/usr/share/%{name}/management/conf -ln -sf /usr/share/tomcat6/lib ${RPM_BUILD_ROOT}/usr/share/%{name}/management/lib -ln -sf /var/log/cloud/management ${RPM_BUILD_ROOT}/usr/share/%{name}/management/logs -ln -sf /var/cache/cloud/management/temp ${RPM_BUILD_ROOT}/usr/share/%{name}/management/temp -ln -sf /var/cache/cloud/management/work ${RPM_BUILD_ROOT}/usr/share/%{name}/management/work -mkdir -p ${RPM_BUILD_ROOT}/usr/share/%{name}/management/webapps/client -mkdir -p ${RPM_BUILD_ROOT}/var/log/%{name}/management -mkdir -p ${RPM_BUILD_ROOT}/var/log/%{name}/agent -mkdir -p ${RPM_BUILD_ROOT}/var/log/%{name}/awsapi -mkdir -p ${RPM_BUILD_ROOT}/var/log/%{name}/ipallocator -mkdir -p ${RPM_BUILD_ROOT}/var/cache/%{name}/management/work -mkdir -p ${RPM_BUILD_ROOT}/var/cache/%{name}/management/temp -mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{name}/mnt -mkdir -p ${RPM_BUILD_ROOT}/var/lib/%{name}/management -mkdir -p ${RPM_BUILD_ROOT}/etc/%{name}/management -mkdir -p ${RPM_BUILD_ROOT}/etc/%{name}/management/Catalina/localhost/client -mkdir -p ${RPM_BUILD_ROOT}/etc/rc.d/init.d -mkdir -p ${RPM_BUILD_ROOT}/etc/sysconfig -mkdir -p ${RPM_BUILD_ROOT}/etc/%{name}/management/Catalina/localhost/client - -install -D client/target/utilities/bin/* ${RPM_BUILD_ROOT}%{_bindir} -install -D console-proxy/dist/systemvm.iso ${RPM_BUILD_ROOT}/usr/share/%{name}/management/webapps/client/WEB-INF/classes/vms/systemvm.iso -install -D console-proxy/dist/systemvm.zip ${RPM_BUILD_ROOT}/usr/share/%{name}/management/webapps/client/WEB-INF/classes/vms/systemvm.zip - -cp -r client/target/utilities/scripts/db/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}/setup -cp -r client/target/cloud-client-ui-4.1.0-SNAPSHOT/* ${RPM_BUILD_ROOT}/usr/share/%{name}/management/webapps/client +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/agent +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/awsapi +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/ipallocator +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/cache/%{name}/management/work +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/cache/%{name}/management/temp +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/%{name}/mnt +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/%{name}/management +mkdir -p ${RPM_BUILD_ROOT}%{_initrddir} +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig + +# Common +mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/scripts +mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/vms +mkdir -p ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/ +cp -r scripts/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/scripts +install -D services/console-proxy/server/dist/systemvm.iso ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/vms/systemvm.iso +install -D services/console-proxy/server/dist/systemvm.zip ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/vms/systemvm.zip +install python/lib/cloud_utils.py ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/cloud_utils.py +cp -r python/lib/cloudutils ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/ +python -m py_compile ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/cloud_utils.py +python -m compileall ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/cloudutils + +# Management +mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/ +mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client +mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/setup +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/management +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/awsapi +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management + +# Specific for tomcat +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina/localhost/client +ln -sf /usr/share/tomcat6/bin ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/bin +ln -sf /etc/%{name}/management ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/conf +ln -sf /usr/share/tomcat6/lib ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/lib +ln -sf /var/log/%{name}/management ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/logs +ln -sf /var/cache/%{name}/management/temp ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/temp +ln -sf /var/cache/%{name}/management/work ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/work + +install -D client/target/utilities/bin/cloud-migrate-databases ${RPM_BUILD_ROOT}%{_bindir}/%{name}-migrate-databases +install -D client/target/utilities/bin/cloud-set-guest-password ${RPM_BUILD_ROOT}%{_bindir}/%{name}-set-guest-password +install -D client/target/utilities/bin/cloud-set-guest-sshkey ${RPM_BUILD_ROOT}%{_bindir}/%{name}-set-guest-sshkey +install -D client/target/utilities/bin/cloud-setup-databases ${RPM_BUILD_ROOT}%{_bindir}/%{name}-setup-databases +install -D client/target/utilities/bin/cloud-setup-encryption ${RPM_BUILD_ROOT}%{_bindir}/%{name}-setup-encryption +install -D client/target/utilities/bin/cloud-setup-management ${RPM_BUILD_ROOT}%{_bindir}/%{name}-setup-management +install -D client/target/utilities/bin/cloud-sysvmadm ${RPM_BUILD_ROOT}%{_bindir}/%{name}-sysvmadm +install -D client/target/utilities/bin/cloud-update-xenserver-licenses ${RPM_BUILD_ROOT}%{_bindir}/%{name}-update-xenserver-licenses + +cp -r client/target/utilities/scripts/db/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/setup +cp -r client/target/cloud-client-ui-%{_maventag}/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client + +# Don't package the scripts in the management webapp +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/scripts +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/vms for name in db.properties log4j-cloud.xml tomcat6-nonssl.conf tomcat6-ssl.conf server-ssl.xml server-nonssl.xml \ - catalina.policy catalina.properties db-enc.properties classpath.conf tomcat-users.xml web.xml ; do - mv ${RPM_BUILD_ROOT}/usr/share/%{name}/management/webapps/client/WEB-INF/classes/$name \ - ${RPM_BUILD_ROOT}/etc/%{name}/management/$name + catalina.policy catalina.properties classpath.conf tomcat-users.xml web.xml environment.properties ; do + mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/$name \ + ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/$name done -mv ${RPM_BUILD_ROOT}/usr/share/%{name}/management/webapps/client/WEB-INF/classes/context.xml \ - ${RPM_BUILD_ROOT}/etc/%{name}/management/Catalina/localhost/client - -mkdir -p ${RPM_BUILD_ROOT}/usr/lib/python2.6/site-packages/ -cp -r python/lib/cloudutils ${RPM_BUILD_ROOT}/usr/lib/python2.6/site-packages/ -cp -r cloud-cli/cloudtool ${RPM_BUILD_ROOT}/usr/lib/python2.6/site-packages/ -install python/lib/cloud_utils.py ${RPM_BUILD_ROOT}/usr/lib/python2.6/site-packages/cloud_utils.py -install cloud-cli/cloudapis/cloud.py ${RPM_BUILD_ROOT}/usr/lib/python2.6/site-packages/cloudapis.py -install python/bindir/cloud-external-ipallocator.py ${RPM_BUILD_ROOT}%{_bindir}/ -install -D client/target/pythonlibs/jasypt-1.9.0.jar ${RPM_BUILD_ROOT}%{_javadir}/jasypt-1.9.0.jar -install -D client/target/pythonlibs/jasypt-1.8.jar ${RPM_BUILD_ROOT}%{_javadir}/jasypt-1.8.jar - -install -D packaging/centos63/cloud-ipallocator.rc ${RPM_BUILD_ROOT}/etc/rc.d/init.d/%{name}-ipallocator -install -D packaging/centos63/cloud-management.rc ${RPM_BUILD_ROOT}/etc/rc.d/init.d/%{name}-management -install -D packaging/centos63/cloud-management.sysconfig ${RPM_BUILD_ROOT}/etc/sysconfig/%{name}-management + +ln -s %{_sysconfdir}/%{name}/management/log4j-cloud.xml \ + ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/log4j-cloud.xml + +mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-management/webapps/client/WEB-INF/classes/context.xml \ + ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina/localhost/client + +install python/bindir/cloud-external-ipallocator.py ${RPM_BUILD_ROOT}%{_bindir}/%{name}-external-ipallocator.py +install -D client/target/pythonlibs/jasypt-1.9.0.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-common/lib/jasypt-1.9.0.jar + +install -D packaging/centos63/cloud-ipallocator.rc ${RPM_BUILD_ROOT}%{_initrddir}/%{name}-ipallocator +install -D packaging/centos63/cloud-management.rc ${RPM_BUILD_ROOT}%{_initrddir}/%{name}-management +install -D packaging/centos63/cloud-management.sysconfig ${RPM_BUILD_ROOT}%{_sysconfdir}/sysconfig/%{name}-management chmod 770 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina chmod 770 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina/localhost chmod 770 ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/Catalina/localhost/client -chmod 770 ${RPM_BUILD_ROOT}%{_sharedstatedir}/%{name}/mnt -chmod 770 ${RPM_BUILD_ROOT}%{_sharedstatedir}/%{name}/management +chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/%{name}/mnt +chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/%{name}/management chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/cache/%{name}/management/work chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/cache/%{name}/management/temp chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/management chmod 770 ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/agent -chmod -R ugo+x ${RPM_BUILD_ROOT}/usr/share/%{name}/management/webapps/client/WEB-INF/classes/scripts # KVM Agent -mkdir -p ${RPM_BUILD_ROOT}/etc/cloud/agent -mkdir -p ${RPM_BUILD_ROOT}/var/log/cloud/agent -install -D packaging/centos63/cloud-agent.rc ${RPM_BUILD_ROOT}/etc/init.d/%{name}-agent -install -D agent/target/transformed/agent.properties ${RPM_BUILD_ROOT}/etc/cloud/agent/agent.properties -install -D agent/target/transformed/environment.properties ${RPM_BUILD_ROOT}/etc/cloud/agent/environment.properties -install -D agent/target/transformed/log4j-cloud.xml ${RPM_BUILD_ROOT}/etc/cloud/agent/log4j-cloud.xml -install -D agent/target/transformed/cloud-setup-agent ${RPM_BUILD_ROOT}/usr/bin/cloud-setup-agent -install -D agent/target/transformed/cloud-ssh ${RPM_BUILD_ROOT}/usr/bin/cloud-ssh -install -D plugins/hypervisors/kvm/target/%{name}-plugin-hypervisor-kvm-%{_maventag}.jar ${RPM_BUILD_ROOT}/usr/share/cloud/java/%{name}-plugin-hypervisor-kvm-%{_maventag}.jar -cp plugins/hypervisors/kvm/target/dependencies/* ${RPM_BUILD_ROOT}/usr/share/cloud/java -mkdir -p ${RPM_BUILD_ROOT}/usr/share/cloud/scripts -cp -r scripts/* ${RPM_BUILD_ROOT}/usr/share/cloud/scripts +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/agent +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/agent +mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/lib +mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/plugins +install -D packaging/centos63/cloud-agent.rc ${RPM_BUILD_ROOT}%{_sysconfdir}/init.d/%{name}-agent +install -D agent/target/transformed/agent.properties ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/agent/agent.properties +install -D agent/target/transformed/environment.properties ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/agent/environment.properties +install -D agent/target/transformed/log4j-cloud.xml ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/agent/log4j-cloud.xml +install -D agent/target/transformed/cloud-setup-agent ${RPM_BUILD_ROOT}%{_bindir}/%{name}-setup-agent +install -D agent/target/transformed/cloud-ssh ${RPM_BUILD_ROOT}%{_bindir}/%{name}-ssh +install -D plugins/hypervisors/kvm/target/cloud-plugin-hypervisor-kvm-%{_maventag}.jar ${RPM_BUILD_ROOT}%{_datadir}/%name-agent/lib/cloud-plugin-hypervisor-kvm-%{_maventag}.jar +cp plugins/hypervisors/kvm/target/dependencies/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-agent/lib # Usage server -install -D usage/target/%{name}-usage-%{_maventag}.jar ${RPM_BUILD_ROOT}/usr/share/cloud/usage/java/%{name}-usage-%{_maventag}.jar -cp usage/target/dependencies/* ${RPM_BUILD_ROOT}/usr/share/cloud/usage/java -install -D packaging/centos63/cloud-usage.rc ${RPM_BUILD_ROOT}/etc/init.d/%{name}-usage -mkdir -p ${RPM_BUILD_ROOT}/var/log/cloud/usage/ +mkdir -p ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/usage +mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-usage/lib +install -D usage/target/cloud-usage-%{_maventag}.jar ${RPM_BUILD_ROOT}%{_datadir}/%{name}-usage/cloud-usage-%{_maventag}.jar +install -D usage/target/transformed/db.properties ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/usage/db.properties +install -D usage/target/transformed/log4j-cloud_usage.xml ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/usage/log4j-cloud.xml +cp usage/target/dependencies/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-usage/lib/ +install -D packaging/centos63/cloud-usage.rc ${RPM_BUILD_ROOT}/%{_sysconfdir}/init.d/%{name}-usage +mkdir -p ${RPM_BUILD_ROOT}%{_localstatedir}/log/%{name}/usage/ + +# CLI +cp -r cloud-cli/cloudtool ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/ +install cloud-cli/cloudapis/cloud.py ${RPM_BUILD_ROOT}%{_libdir}/python2.6/site-packages/cloudapis.py + +# AWS API +mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi +mkdir -p ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/setup +cp -r awsapi/target/cloud-awsapi-%{_maventag}/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi +install -D awsapi-setup/setup/cloud-setup-bridge ${RPM_BUILD_ROOT}%{_bindir}/cloudstack-setup-bridge +install -D awsapi-setup/setup/cloudstack-aws-api-register ${RPM_BUILD_ROOT}%{_bindir}/cloudstack-aws-api-register +cp -r awsapi-setup/db/mysql/* ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/setup + +for name in applicationContext.xml cloud-bridge.properties commons-logging.properties crypto.properties xes.keystore ec2-service.properties ; do + mv ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/$name \ + ${RPM_BUILD_ROOT}%{_sysconfdir}/%{name}/management/$name +done + +#Don't package the below for AWS API +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/db.properties +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/LICENSE.txt +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/log4j.properties +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/log4j-vmops.xml +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/META-INF +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/NOTICE.txt +rm -rf ${RPM_BUILD_ROOT}%{_datadir}/%{name}-bridge/webapps/awsapi/WEB-INF/classes/services.xml + +#License files from whisker +install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-management-%{version}/NOTICE +install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-management-%{version}/LICENSE +install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-common-%{version}/NOTICE +install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-common-%{version}/LICENSE +install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-agent-%{version}/NOTICE +install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-agent-%{version}/LICENSE +install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-usage-%{version}/NOTICE +install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-usage-%{version}/LICENSE +install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-awsapi-%{version}/NOTICE +install -D tools/whisker/NOTICE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-awsapi-%{version}/LICENSE +install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-cli-%{version}/NOTICE +install -D tools/whisker/LICENSE ${RPM_BUILD_ROOT}%{_defaultdocdir}/%{name}-cli-%{version}/LICENSE %clean [ ${RPM_BUILD_ROOT} != "/" ] && rm -rf ${RPM_BUILD_ROOT} +%pre awsapi +id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \ + -r -s /bin/sh -d %{_localstatedir}/cloudstack/management cloud|| true -%preun management-server -/sbin/service %{name}-management stop || true +%preun management +/sbin/service cloudstack-management stop || true if [ "$1" == "0" ] ; then - /sbin/chkconfig --del %{name}-management > /dev/null 2>&1 || true - /sbin/service %{name}-management stop > /dev/null 2>&1 || true + /sbin/chkconfig --del cloudstack-management > /dev/null 2>&1 || true + /sbin/service cloudstack-management stop > /dev/null 2>&1 || true fi -%pre management-server -id %{name} > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \ - -r -s /bin/sh -d %{_sharedstatedir}/%{name}/management %{name}|| true +%pre management +id cloud > /dev/null 2>&1 || /usr/sbin/useradd -M -c "CloudStack unprivileged user" \ + -r -s /bin/sh -d %{_localstatedir}/cloudstack/management cloud|| true # set max file descriptors for cloud user to 4096 sed -i /"cloud hard nofile"/d /etc/security/limits.conf sed -i /"cloud soft nofile"/d /etc/security/limits.conf echo "cloud hard nofile 4096" >> /etc/security/limits.conf echo "cloud soft nofile 4096" >> /etc/security/limits.conf -rm -rf %{_localstatedir}/cache/%{name} +rm -rf %{_localstatedir}/cache/cloud # user harcoded here, also hardcoded on wscript -%post management-server +# save old configs if they exist (for upgrade). Otherwise we may lose them +# when the old packages are erased. There are a lot of properties files here. +if [ -d "%{_sysconfdir}/cloud" ] ; then + mv %{_sysconfdir}/cloud %{_sysconfdir}/cloud.rpmsave +fi + +%post management if [ "$1" == "1" ] ; then - /sbin/chkconfig --add %{name}-management > /dev/null 2>&1 || true - /sbin/chkconfig --level 345 %{name}-management on > /dev/null 2>&1 || true + /sbin/chkconfig --add cloudstack-management > /dev/null 2>&1 || true + /sbin/chkconfig --level 345 cloudstack-management on > /dev/null 2>&1 || true fi -if [ ! -f %{_datadir}/%{name}/management/webapps/client/WEB-INF/classes/scripts/scripts/vm/hypervisor/xenserver/vhd-util ] ; then +if [ -d "%{_datadir}/%{name}-management" ] ; then + ln -s %{_datadir}/%{name}-bridge/webapps %{_datadir}/%{name}-management/webapps7080 +fi + +if [ ! -f %{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/vhd-util ] ; then echo Please download vhd-util from http://download.cloud.com.s3.amazonaws.com/tools/vhd-util and put it in - echo %{_datadir}/%{name}/management/webapps/client/WEB-INF/classes/scripts/vm/hypervisor/xenserver/ + echo %{_datadir}/cloudstack-common/scripts/vm/hypervisor/xenserver/ fi +# change cloud user's home to 4.1+ version if needed. Would do this via 'usermod', but it +# requires that cloud user not be in use, so RPM could not be installed while management is running +if getent passwd cloud | grep -q /var/lib/cloud; then + sed -i 's/\/var\/lib\/cloud\/management/\/var\/cloudstack\/management/g' /etc/passwd +fi + +# if saved configs from upgrade exist, copy them over +if [ -f "%{_sysconfdir}/cloud.rpmsave/management/db.properties" ]; then + mv %{_sysconfdir}/%{name}/management/db.properties %{_sysconfdir}/%{name}/management/db.properties.rpmnew + cp -p %{_sysconfdir}/cloud.rpmsave/management/db.properties %{_sysconfdir}/%{name}/management + cp -p %{_sysconfdir}/cloud.rpmsave/management/key %{_sysconfdir}/%{name}/management + # make sure we only do this on the first install of this RPM, don't want to overwrite on a reinstall + mv %{_sysconfdir}/cloud.rpmsave/management/db.properties %{_sysconfdir}/cloud.rpmsave/management/db.properties.rpmsave +fi + +# Choose server.xml and tomcat.conf links based on old config, if exists +serverxml=%{_sysconfdir}/%{name}/management/server.xml +oldserverxml=%{_sysconfdir}/cloud.rpmsave/management/server.xml +if [ -L $oldserverxml ] ; then + if stat -c %N $oldserverxml | grep -q server-nonssl ; then + if [ -L $serverxml ]; then rm -f $serverxml; fi + ln -s %{_sysconfdir}/%{name}/management/server-nonssl.xml $serverxml + elif stat -c %N $oldserverxml| grep -q server-ssl ; then + if [ -L $serverxml ]; then rm -f $serverxml; fi + ln -s %{_sysconfdir}/%{name}/management/server-ssl.xml $serverxml + fi +fi + +tomcatconf=%{_sysconfdir}/%{name}/management/tomcat6.conf +oldtomcatconf=%{_sysconfdir}/cloud.rpmsave/management/tomcat6.conf +if [ -L $oldtomcatconf ] ; then + if stat -c %N $oldtomcatconf | grep -q tomcat6-nonssl ; then + if [ -L $tomcatconf ]; then rm -f $tomcatconf; fi + ln -s %{_sysconfdir}/%{name}/management/tomcat6-nonssl.conf $tomcatconf + elif stat -c %N $oldtomcatconf| grep -q tomcat6-ssl ; then + if [ -L $tomcatconf ]; then rm -f $tomcatconf; fi + ln -s %{_sysconfdir}/%{name}/management/tomcat6-ssl.conf $tomcatconf + fi +fi + +%preun agent +/sbin/service cloudstack-agent stop || true +if [ "$1" == "0" ] ; then + /sbin/chkconfig --del cloudstack-agent > /dev/null 2>&1 || true + /sbin/service cloudstack-agent stop > /dev/null 2>&1 || true +fi + +%pre agent + +# save old configs if they exist (for upgrade). Otherwise we may lose them +# when the old packages are erased. There are a lot of properties files here. +if [ -d "%{_sysconfdir}/cloud" ] ; then + mv %{_sysconfdir}/cloud %{_sysconfdir}/cloud.rpmsave +fi + +%post agent +if [ "$1" == "1" ] ; then + /sbin/chkconfig --add cloudstack-agent > /dev/null 2>&1 || true + /sbin/chkconfig --level 345 cloudstack-agent on > /dev/null 2>&1 || true +fi + +# if saved configs from upgrade exist, copy them over +if [ -f "%{_sysconfdir}/cloud.rpmsave/agent/agent.properties" ]; then + mv %{_sysconfdir}/%{name}/agent/agent.properties %{_sysconfdir}/%{name}/agent/agent.properties.rpmnew + cp -p %{_sysconfdir}/cloud.rpmsave/agent/agent.properties %{_sysconfdir}/%{name}/agent + # make sure we only do this on the first install of this RPM, don't want to overwrite on a reinstall + mv %{_sysconfdir}/cloud.rpmsave/agent/agent.properties %{_sysconfdir}/cloud.rpmsave/agent/agent.properties.rpmsave +fi + +%post usage +if [ -f "%{_sysconfdir}/%{name}/management/db.properties" ]; then + echo Replacing db.properties with management server db.properties + rm -f %{_sysconfdir}/%{name}/usage/db.properties + ln -s %{_sysconfdir}/%{name}/management/db.properties %{_sysconfdir}/%{name}/usage/db.properties +fi + +#%post awsapi +#if [ -d "%{_datadir}/%{name}-management" ] ; then +# ln -s %{_datadir}/%{name}-bridge/webapps %{_datadir}/%{name}-management/webapps7080 +#fi + #No default permission as the permission setup is complex -%files management-server +%files management %defattr(-,root,root,-) -%doc LICENSE -%doc NOTICE -%dir %attr(0770,root,%{name}) %{_sysconfdir}/%{name}/management/Catalina -%dir %attr(0770,root,%{name}) %{_sysconfdir}/%{name}/management/Catalina/localhost -%dir %attr(0770,root,%{name}) %{_sysconfdir}/%{name}/management/Catalina/localhost/client -%dir %{_datadir}/%{name}/management -%dir %attr(0770,root,%{name}) %{_sharedstatedir}/%{name}/mnt -%dir %attr(0770,%{name},%{name}) %{_sharedstatedir}/%{name}/management -%dir %attr(0770,root,%{name}) %{_localstatedir}/cache/%{name}/management -%dir %attr(0770,root,%{name}) %{_localstatedir}/cache/%{name}/management/work -%dir %attr(0770,root,%{name}) %{_localstatedir}/cache/%{name}/management/temp -%dir %attr(0770,root,%{name}) %{_localstatedir}/log/%{name}/management -%dir %attr(0770,root,%{name}) %{_localstatedir}/log/%{name}/agent +%dir %attr(0770,root,cloud) %{_sysconfdir}/%{name}/management/Catalina +%dir %attr(0770,root,cloud) %{_sysconfdir}/%{name}/management/Catalina/localhost +%dir %attr(0770,root,cloud) %{_sysconfdir}/%{name}/management/Catalina/localhost/client +%dir %{_datadir}/%{name}-management +%dir %attr(0770,root,cloud) %{_localstatedir}/%{name}/mnt +%dir %attr(0770,cloud,cloud) %{_localstatedir}/%{name}/management +%dir %attr(0770,root,cloud) %{_localstatedir}/cache/%{name}/management +%dir %attr(0770,root,cloud) %{_localstatedir}/cache/%{name}/management/work +%dir %attr(0770,root,cloud) %{_localstatedir}/cache/%{name}/management/temp +%dir %attr(0770,root,cloud) %{_localstatedir}/log/%{name}/management +%dir %attr(0770,root,cloud) %{_localstatedir}/log/%{name}/agent +%dir %attr(0770,root,cloud) %{_localstatedir}/log/%{name}/awsapi %config(noreplace) %{_sysconfdir}/sysconfig/%{name}-management -%config(noreplace) %{_sysconfdir}/%{name}/management -%config(noreplace) %attr(0640,root,%{name}) %{_sysconfdir}/%{name}/management/db.properties -%config(noreplace) %{_sysconfdir}/%{name}/management/log4j-%{name}.xml +%config(noreplace) %attr(0640,root,cloud) %{_sysconfdir}/%{name}/management/db.properties +%config(noreplace) %{_sysconfdir}/%{name}/management/log4j-cloud.xml %config(noreplace) %{_sysconfdir}/%{name}/management/tomcat6-nonssl.conf %config(noreplace) %{_sysconfdir}/%{name}/management/tomcat6-ssl.conf +%config(noreplace) %{_sysconfdir}/%{name}/management/Catalina/localhost/client/context.xml +%config(noreplace) %{_sysconfdir}/%{name}/management/catalina.policy +%config(noreplace) %{_sysconfdir}/%{name}/management/catalina.properties +%config(noreplace) %{_sysconfdir}/%{name}/management/classpath.conf +%config(noreplace) %{_sysconfdir}/%{name}/management/server-nonssl.xml +%config(noreplace) %{_sysconfdir}/%{name}/management/server-ssl.xml +%config(noreplace) %{_sysconfdir}/%{name}/management/tomcat-users.xml +%config(noreplace) %{_sysconfdir}/%{name}/management/web.xml +%config(noreplace) %{_sysconfdir}/%{name}/management/environment.properties +%config(noreplace) %{_sysconfdir}/%{name}/management/applicationContext.xml +%config(noreplace) %{_sysconfdir}/%{name}/management/cloud-bridge.properties +%config(noreplace) %{_sysconfdir}/%{name}/management/commons-logging.properties +%config(noreplace) %{_sysconfdir}/%{name}/management/ec2-service.properties +%config(noreplace) %{_sysconfdir}/%{name}/management/crypto.properties +%config(noreplace) %{_sysconfdir}/%{name}/management/xes.keystore %attr(0755,root,root) %{_initrddir}/%{name}-management %attr(0755,root,root) %{_bindir}/%{name}-setup-management %attr(0755,root,root) %{_bindir}/%{name}-update-xenserver-licenses -%{_datadir}/%{name}/management/* - -%files setup +%{_datadir}/%{name}-management/webapps +%dir %{_datadir}/%{name}-management/bin +%dir %{_datadir}/%{name}-management/conf +%dir %{_datadir}/%{name}-management/lib +%dir %{_datadir}/%{name}-management/logs +%dir %{_datadir}/%{name}-management/temp +%dir %{_datadir}/%{name}-management/work %attr(0755,root,root) %{_bindir}/%{name}-setup-databases %attr(0755,root,root) %{_bindir}/%{name}-migrate-databases %attr(0755,root,root) %{_bindir}/%{name}-set-guest-password %attr(0755,root,root) %{_bindir}/%{name}-set-guest-sshkey %attr(0755,root,root) %{_bindir}/%{name}-sysvmadm %attr(0755,root,root) %{_bindir}/%{name}-setup-encryption -%dir %{_datadir}/%{name}/setup -%{_datadir}/%{name}/setup/*.sql -%{_datadir}/%{name}/setup/db/*.sql -%{_datadir}/%{name}/setup/*.sh -%{_datadir}/%{name}/setup/server-setup.xml -%{_javadir}/jasypt-1.9.0.jar -%{_javadir}/jasypt-1.8.jar -%doc LICENSE -%doc NOTICE - -%files python -%defattr(0644,root,root,0755) -%{_prefix}/lib*/python*/site-packages/%{name}* -%attr(0755,root,root) %{_bindir}/cloud-external-ipallocator.py -%attr(0755,root,root) %{_initrddir}/cloud-ipallocator +%{_datadir}/%{name}-management/setup/*.sql +%{_datadir}/%{name}-management/setup/db/*.sql +%{_datadir}/%{name}-management/setup/*.sh +%{_datadir}/%{name}-management/setup/server-setup.xml +%attr(0755,root,root) %{_bindir}/%{name}-external-ipallocator.py +%attr(0755,root,root) %{_initrddir}/%{name}-ipallocator %dir %attr(0770,root,root) %{_localstatedir}/log/%{name}/ipallocator -%doc LICENSE -%doc NOTICE +%{_defaultdocdir}/%{name}-management-%{version}/LICENSE +%{_defaultdocdir}/%{name}-management-%{version}/NOTICE %files agent %attr(0755,root,root) %{_bindir}/%{name}-setup-agent %attr(0755,root,root) %{_bindir}/%{name}-ssh -%attr(0755,root,root) %{_sysconfdir}/init.d/cloud-agent -%config(noreplace) %{_sysconfdir}/cloud/agent -%dir /var/log/cloud/agent -%attr(0644,root,root) /usr/share/cloud/java/*.jar -%attr(0755,root,root) /usr/share/cloud/scripts +%attr(0755,root,root) %{_sysconfdir}/init.d/%{name}-agent +%config(noreplace) %{_sysconfdir}/%{name}/agent +%dir %{_localstatedir}/log/%{name}/agent +%attr(0644,root,root) %{_datadir}/%{name}-agent/lib/*.jar +%dir %{_datadir}/%{name}-agent/plugins +%{_defaultdocdir}/%{name}-agent-%{version}/LICENSE +%{_defaultdocdir}/%{name}-agent-%{version}/NOTICE + +%files common +%dir %attr(0755,root,root) %{_libdir}/python2.6/site-packages/cloudutils +%dir %attr(0755,root,root) %{_datadir}/%{name}-common/vms +%attr(0755,root,root) %{_datadir}/%{name}-common/scripts +%attr(0644, root, root) %{_datadir}/%{name}-common/vms/systemvm.iso +%attr(0644, root, root) %{_datadir}/%{name}-common/vms/systemvm.zip +%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloud_utils.py +%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloud_utils.pyc +%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudutils/* +%attr(0644, root, root) %{_datadir}/%{name}-common/lib/jasypt-1.9.0.jar +%{_defaultdocdir}/%{name}-common-%{version}/LICENSE +%{_defaultdocdir}/%{name}-common-%{version}/NOTICE %files usage -%attr(0755,root,root) %{_sysconfdir}/init.d/cloud-usage -%attr(0644,root,root) /usr/share/cloud/usage/java/*.jar -%dir /var/log/cloud/usage +%attr(0755,root,root) %{_sysconfdir}/init.d/%{name}-usage +%attr(0644,root,root) %{_datadir}/%{name}-usage/*.jar +%attr(0644,root,root) %{_datadir}/%{name}-usage/lib/*.jar +%dir %attr(0770,root,cloud) %{_localstatedir}/log/%{name}/usage +%attr(0644,root,root) %{_sysconfdir}/%{name}/usage/db.properties +%attr(0644,root,root) %{_sysconfdir}/%{name}/usage/log4j-cloud.xml +%{_defaultdocdir}/%{name}-usage-%{version}/LICENSE +%{_defaultdocdir}/%{name}-usage-%{version}/NOTICE + +%files cli +%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudapis.py +%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudtool/__init__.py +%attr(0644,root,root) %{_libdir}/python2.6/site-packages/cloudtool/utils.py +%{_defaultdocdir}/%{name}-cli-%{version}/LICENSE +%{_defaultdocdir}/%{name}-cli-%{version}/NOTICE + +%files awsapi +%defattr(0644,cloud,cloud,0755) +%{_datadir}/%{name}-bridge/webapps/awsapi +%attr(0644,root,root) %{_datadir}/%{name}-bridge/setup/* +%attr(0755,root,root) %{_bindir}/cloudstack-aws-api-register +%attr(0755,root,root) %{_bindir}/cloudstack-setup-bridge +%{_defaultdocdir}/%{name}-awsapi-%{version}/LICENSE +%{_defaultdocdir}/%{name}-awsapi-%{version}/NOTICE + %changelog * Fri Oct 03 2012 Hugo Trippaers 4.1.0 diff --git a/packaging/centos63/cloudstack-agent.te b/packaging/centos63/cloudstack-agent.te new file mode 100644 index 000000000..4259e173a --- /dev/null +++ b/packaging/centos63/cloudstack-agent.te @@ -0,0 +1,33 @@ +# 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. + +module cloudstack-agent 1.0; + +require { + type nfs_t; + type system_conf_t; + type mount_t; + type qemu_t; + class file unlink; + class filesystem getattr; +} + +#============= mount_t ============== +allow mount_t system_conf_t:file unlink; + +#============= qemu_t ============== +allow qemu_t nfs_t:filesystem getattr; diff --git a/packaging/centos63/package.sh b/packaging/centos63/package.sh old mode 100644 new mode 100755 index 83c0e5eda..d9d5b1c81 --- a/packaging/centos63/package.sh +++ b/packaging/centos63/package.sh @@ -16,12 +16,59 @@ # specific language governing permissions and limitations # under the License. +function usage() { + echo "" + echo "usage: ./package.sh [-p|--pack] [-h|--help] [ARGS]" + echo "" + echo "The commonly used Arguments are:" + echo "oss|OSS To package OSS specific" + echo "nonoss|NONOSS To package NONOSS specific" + echo "" + echo "Examples: ./package.sh -p|--pack oss|OSS" + echo " ./package.sh -p|--pack nonoss|NONOSS" + echo " ./package.sh (Default OSS)" + exit 1 +} + +function defaultPackaging() { CWD=`pwd` RPMDIR=$CWD/../../dist/rpmbuild +PACK_PROJECT=cloudstack + +VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep '^[0-9]\.'` +if echo $VERSION | grep SNAPSHOT ; then + REALVER=`echo $VERSION | cut -d '-' -f 1` + DEFVER="-D_ver $REALVER" + DEFPRE="-D_prerelease 1" + DEFREL="-D_rel SNAPSHOT" +else + DEFVER="-D_ver $REALVER" + DEFPRE= + DEFREL= +fi + +mkdir -p $RPMDIR/SPECS +mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION + +(cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x ) +(cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION) + +cp cloud.spec $RPMDIR/SPECS + +(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE") +exit +} + +function packaging() { + +CWD=`pwd` +RPMDIR=$CWD/../../dist/rpmbuild +PACK_PROJECT=cloudstack +DEFOSSNOSS="-D_ossnoss $packageval" -VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep -v '^\['` +VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version) | grep '^[0-9]\.'` if echo $VERSION | grep SNAPSHOT ; then REALVER=`echo $VERSION | cut -d '-' -f 1` DEFVER="-D_ver $REALVER" @@ -34,12 +81,73 @@ else fi mkdir -p $RPMDIR/SPECS -mkdir -p $RPMDIR/SOURCES/cloud-$VERSION +mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -(cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/cloud-$VERSION -x ) -(cd $RPMDIR/SOURCES/; tar -czf cloud-$VERSION.tgz cloud-$VERSION) +(cd ../../; tar -c --exclude .git --exclude dist . | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION -x ) +(cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION) cp cloud.spec $RPMDIR/SPECS -(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE" ) +(cd $RPMDIR; rpmbuild -ba SPECS/cloud.spec "-D_topdir $RPMDIR" "$DEFVER" "$DEFREL" "$DEFPRE" "$DEFOSSNOSS") + +exit +} + + +if [ $# -lt 1 ] ; then + + defaultPackaging + +elif [ $# -gt 0 ] ; then + + SHORTOPTS="hp:" + LONGOPTS="help,pack:" + + ARGS=$(getopt -s bash -u -a --options $SHORTOPTS --longoptions $LONGOPTS --name $0 -- "$@" ) + eval set -- "$ARGS" + + while [ $# -gt 0 ] ; do + case "$1" in + -h | --help) + usage + exit 0 + ;; + -p | --pack) + echo "Doing CloudStack Packaging ....." + packageval=$2 + if [ "$packageval" == "oss" -o "$packageval" == "OSS" ] ; then + defaultPackaging + elif [ "$packageval" == "nonoss" -o "$packageval" == "NONOSS" ] ; then + packaging + else + echo "Error: Incorrect value provided in package.sh script, Please see help ./package.sh --help|-h for more details." + exit 1 + fi + ;; + -) + echo "Unrecognized option..." + usage + exit 1 + ;; + --) + echo "Unrecognized option..." + usage + exit 1 + ;; + -*) + echo "Unrecognized option..." + usage + exit 1 + ;; + *) + shift + break + ;; + esac + done + +else + echo "Incorrect choice. Nothing to do." >&2 + echo "Please, execute ./package.sh --help for more help" +fi diff --git a/packaging/centos63/replace.properties b/packaging/centos63/replace.properties index e6efc7627..834585495 100644 --- a/packaging/centos63/replace.properties +++ b/packaging/centos63/replace.properties @@ -21,41 +21,40 @@ DBROOTPW= MSLOG=vmops.log APISERVERLOG=api.log DBHOST=localhost -MSMNTDIR=/mnt COMPONENTS-SPEC=components-premium.xml AWSAPILOG=awsapi.log REMOTEHOST=localhost AGENTCLASSPATH= -AGENTLOG=/var/log/cloud/agent/agent.log -AGENTLOGDIR=/var/log/cloud/agent/ -AGENTSYSCONFDIR=/etc/cloud/agent -APISERVERLOG=/var/log/cloud/management/apilog.log -AWSAPILOG=/var/log/cloud/awsapi/awsapi.log +AGENTLOG=/var/log/cloudstack/agent/agent.log +AGENTLOGDIR=/var/log/cloudstack/agent/ +AGENTSYSCONFDIR=/etc/cloudstack/agent +APISERVERLOG=/var/log/cloudstack/management/apilog.log +AWSAPILOG=/var/log/cloudstack/awsapi/awsapi.log BINDIR=/usr/bin -COMMONLIBDIR=/usr/share/java +COMMONLIBDIR=/usr/share/cloudstack-common CONFIGUREVARS= DEPSCLASSPATH= DOCDIR= -IPALOCATORLOG=/var/log/cloud/management/ipallocator.log +IPALOCATORLOG=/var/log/cloudstack/management/ipallocator.log JAVADIR=/usr/share/java LIBEXECDIR=/usr/libexec LOCKDIR=/var/lock MSCLASSPATH= -MSCONF=/etc/cloud/management -MSENVIRON=/usr/share/cloud/management -MSLOG=/var/log/cloud/management/management-server.log -MSLOGDIR=/var/log/cloud/management/ -MSMNTDIR=/var/lib/cloud/mnt +MSCONF=/etc/cloudstack/management +MSENVIRON=/usr/share/cloudstack-management +MSLOG=/var/log/cloudstack/management/management-server.log +MSLOGDIR=/var/log/cloudstack/management/ +MSMNTDIR=/var/cloudstack/mnt MSUSER=cloud PIDDIR=/var/run -PLUGINJAVADIR= -PREMIUMJAVADIR= +PLUGINJAVADIR=/usr/share/cloudstack-management/plugin +PREMIUMJAVADIR=/usr/share/cloudstack-management/premium PYTHONDIR=/usr/lib/python2.6/site-packages/ SERVERSYSCONFDIR=/etc/sysconfig -SETUPDATADIR=/usr/share/cloud/setup +SETUPDATADIR=/usr/share/cloudstack-management/setup SYSCONFDIR=/etc/sysconfig SYSTEMCLASSPATH= SYSTEMJARS= USAGECLASSPATH= -USAGELOG=/var/log/cloud/usage +USAGELOG=/var/log/cloudstack/usage/usage.log USAGESYSCONFDIR=/etc/sysconfig diff --git a/packaging/debian/init/cloud-agent b/packaging/debian/init/cloud-agent new file mode 100755 index 000000000..c87a5c09f --- /dev/null +++ b/packaging/debian/init/cloud-agent @@ -0,0 +1,171 @@ +#!/bin/bash + +### BEGIN INIT INFO +# Provides: cloud agent +# Required-Start: $network $local_fs +# Required-Stop: $network $local_fs +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Start/stop Apache CloudStack Agent +# Description: This scripts Starts/Stops the Apache CloudStack agent +## The CloudStack Agent is a part of the Apache CloudStack project and is used +## for managing KVM-based Hypervisors and performing secondary storage tasks inside +## the Secondary Storage System Virtual Machine. +## JSVC (Java daemonizing) is used for starting and stopping the agent +### END INIT INFO + +# 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. + +. /lib/lsb/init-functions + +SHORTNAME="cloud-agent" +PIDFILE=/var/run/"$SHORTNAME".pid +LOCKFILE=/var/lock/subsys/"$SHORTNAME" +PROGNAME="CloudStack Agent" +CLASS="com.cloud.agent.AgentShell" +PROG="jsvc" +DAEMON="/usr/bin/jsvc" +SHUTDOWN_WAIT="30" + +unset OPTIONS +[ -r /etc/default/"$SHORTNAME" ] && source /etc/default/"$SHORTNAME" + +# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in $DEFAULT) +JDK_DIRS="/usr/lib/jvm/java-7-openjdk-amd64 /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-sun" + +for jdir in $JDK_DIRS; do + if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then + JAVA_HOME="$jdir" + fi +done +export JAVA_HOME + +ACP=`ls /usr/share/cloudstack-agent/lib/*.jar | tr '\n' ':' | sed s'/.$//'` +PCP=`ls /usr/share/cloudstack-agent/plugins/*.jar 2>/dev/null | tr '\n' ':' | sed s'/.$//'` + +# We need to append the JSVC daemon JAR to the classpath +# AgentShell implements the JSVC daemon methods +# We also need JNA in the classpath (from the distribution) for the Libvirt Java bindings +export CLASSPATH="/usr/share/java/commons-daemon.jar:/usr/share/java/jna.jar:$ACP:$PCP:/etc/cloudstack/agent" + +wait_for_network() { + i=1 + while [ $i -lt 10 ] + do + # Under Ubuntu and Debian libvirt by default creates a bridge called virbr0. + # That's why we want more then 3 lines back from brctl, so that there is a manually created bridge + if [ "$(brctl show|wc -l)" -gt 2 ]; then + break + else + sleep 1 + let i=$i+1 + continue + fi + done +} + +start() { + if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then + log_daemon_msg "$PROGNAME apparently already running" + log_end_msg 0 + exit 0 + fi + + log_daemon_msg "Starting $PROGNAME" "$SHORTNAME" + if hostname --fqdn >/dev/null 2>&1 ; then + true + else + log_failure_msg "The host name does not resolve properly to an IP address. Cannot start $PROGNAME" + log_end_msg 1 + exit 1 + fi + + wait_for_network + + if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -pidfile "$PIDFILE" -errfile SYSLOG $CLASS + RETVAL=$? + then + rc=0 + sleep 1 + if ! kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then + log_failure_msg "$PROG failed to start" + rc=1 + fi + else + rc=1 + fi + + if [ $rc -eq 0 ]; then + log_end_msg 0 + else + log_end_msg 1 + rm -f "$PIDFILE" + fi +} + +stop() { + count="0" + + log_daemon_msg "Stopping $PROGNAME" "$SHORTNAME" + killproc -p $PIDFILE $DAEMON + + until [ "$count" -gt "$SHUTDOWN_WAIT" ] + do + agentPid=$(ps aux|grep [j]svc|grep $SHORTNAME) + if [ "$?" -gt "0" ];then + break + fi + sleep 1 + let count="${count}+1" + done + + agentPid=$(ps aux|grep [j]svc|grep $SHORTNAME) + if [ "$?" -eq "0" ]; then + agentPid=$(ps aux|grep [j]svc|awk '{print $2}') + if [ "$agentPid" != "" ]; then + log_warning_msg "$PROG still running, forcing kill" + kill -9 $agentPid + fi + fi + + log_end_msg $? + rm -f "$PIDFILE" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status_of_proc -p "$PIDFILE" "$PROG" "$SHORTNAME" + RETVAL=$? + ;; + restart | force-reload) + stop + sleep 3 + start + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload|status}" + RETVAL=3 +esac + +exit $RETVAL diff --git a/packaging/debian/init/cloud-management b/packaging/debian/init/cloud-management new file mode 100755 index 000000000..1e008312e --- /dev/null +++ b/packaging/debian/init/cloud-management @@ -0,0 +1,243 @@ +#!/bin/sh +# +# /etc/init.d/tomcat6 -- startup script for the Tomcat 6 servlet engine + +# 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. +### BEGIN INIT INFO +# Provides: cloudstack-management +# Required-Start: $local_fs $remote_fs $network +# Required-Stop: $local_fs $remote_fs $network +# Should-Start: $named +# Should-Stop: $named +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start Tomcat (CloudStack). +# Description: Start the Tomcat servlet engine that runs the CloudStack Management Server. +### END INIT INFO + +PATH=/bin:/usr/bin:/sbin:/usr/sbin +NAME=cloudstack-management +DESC="CloudStack-specific Tomcat servlet engine" +DAEMON=/usr/bin/jsvc +CATALINA_HOME=/usr/share/cloudstack-management +DEFAULT=/etc/cloudstack/management/tomcat6.conf +JVM_TMP=/tmp/$NAME-temp + +# We have to explicitly set the HOME variable to the homedir from the user "cloud" +# This is because various scripts run by the management server read the HOME variable +# and fail when this init script is run manually. +HOME=$(echo ~cloud) + +if [ `id -u` -ne 0 ]; then + echo "You need root privileges to run this script" + exit 1 +fi + +# Make sure tomcat is started with system locale +if [ -r /etc/default/locale ]; then + . /etc/default/locale + export LANG +fi + +. /lib/lsb/init-functions +. /etc/default/rcS + + +# The following variables can be overwritten in $DEFAULT + +# Run Tomcat 6 as this user ID +TOMCAT6_USER=tomcat6 + +# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not +# defined in $DEFAULT) +JDK_DIRS="/usr/lib/jvm/java-7-openjdk-amd64 /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-sun" + +# Look for the right JVM to use +for jdir in $JDK_DIRS; do + if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then + JAVA_HOME="$jdir" + fi +done +export JAVA_HOME + +# Directory for per-instance configuration files and webapps +CATALINA_BASE=/usr/share/cloudstack-management + +# Use the Java security manager? (yes/no) +TOMCAT6_SECURITY=no + +# Default Java options +# Set java.awt.headless=true if JAVA_OPTS is not set so the +# Xalan XSL transformer can work without X11 display on JDK 1.4+ +# It also looks like the default heap size of 64M is not enough for most cases +# so the maximum heap size is set to 128M +if [ -z "$JAVA_OPTS" ]; then + JAVA_OPTS="-Djava.awt.headless=true -Xmx128M" +fi + +# End of variables that can be overwritten in $DEFAULT + +# overwrite settings from default file +if [ -f "$DEFAULT" ]; then + . "$DEFAULT" +fi + +if [ ! -f "$CATALINA_HOME/bin/bootstrap.jar" ]; then + log_failure_msg "$NAME is not installed" + exit 1 +fi + +[ -f "$DAEMON" ] || exit 0 + +POLICY_CACHE="$CATALINA_BASE/work/catalina.policy" + +JAVA_OPTS="$JAVA_OPTS -Djava.endorsed.dirs=$CATALINA_HOME/endorsed -Dcatalina.base=$CATALINA_BASE -Dcatalina.home=$CATALINA_HOME -Djava.io.tmpdir=$JVM_TMP" + +# Set the JSP compiler if set in the tomcat6.default file +if [ -n "$JSP_COMPILER" ]; then + JAVA_OPTS="$JAVA_OPTS -Dbuild.compiler=$JSP_COMPILER" +fi + +if [ "$TOMCAT6_SECURITY" = "yes" ]; then + JAVA_OPTS="$JAVA_OPTS -Djava.security.manager -Djava.security.policy=$POLICY_CACHE" +fi + +# Set juli LogManager if logging.properties is provided +if [ -r "$CATALINA_BASE"/conf/logging.properties ]; then + JAVA_OPTS="$JAVA_OPTS "-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager" "-Djava.util.logging.config.file="$CATALINA_BASE/conf/logging.properties" +fi + +# Define other required variables +CATALINA_PID="/var/run/$NAME.pid" +BOOTSTRAP_CLASS=org.apache.catalina.startup.Bootstrap +JSVC_CLASSPATH="/usr/share/java/commons-daemon.jar:$CATALINA_HOME/bin/bootstrap.jar:/etc/cloudstack/management" + +# Look for Java Secure Sockets Extension (JSSE) JARs +if [ -z "${JSSE_HOME}" -a -r "${JAVA_HOME}/jre/lib/jsse.jar" ]; then + JSSE_HOME="${JAVA_HOME}/jre/" +fi +export JSSE_HOME + +case "$1" in + start) + if [ -z "$JAVA_HOME" ]; then + log_failure_msg "no JDK found - please set JAVA_HOME" + exit 1 + fi + + if [ ! -d "$CATALINA_BASE/conf" ]; then + log_failure_msg "invalid CATALINA_BASE: $CATALINA_BASE" + exit 1 + fi + + log_daemon_msg "Starting $DESC" "$NAME" + if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \ + --user $TOMCAT6_USER --startas "$JAVA_HOME/bin/java" \ + >/dev/null; then + + # Regenerate POLICY_CACHE file + umask 022 + echo "// AUTO-GENERATED FILE from /etc/tomcat6/policy.d/" \ + > "$POLICY_CACHE" + echo "" >> "$POLICY_CACHE" + if ls $CATALINA_BASE/conf/policy.d/*.policy > /dev/null 2>&1 ; then + cat $CATALINA_BASE/conf/policy.d/*.policy \ + >> "$POLICY_CACHE" + fi + + # Remove / recreate JVM_TMP directory + rm -rf "$JVM_TMP" + mkdir "$JVM_TMP" || { + log_failure_msg "could not create JVM temporary directory" + exit 1 + } + chown $TOMCAT6_USER "$JVM_TMP" + cd "$JVM_TMP" + + + # fix storage issues on nfs mounts + umask 000 + $DAEMON -user "$TOMCAT6_USER" -cp "$JSVC_CLASSPATH" \ + -outfile SYSLOG -errfile SYSLOG \ + -pidfile "$CATALINA_PID" $JAVA_OPTS "$BOOTSTRAP_CLASS" + + sleep 5 + if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \ + --user $TOMCAT6_USER --startas "$JAVA_HOME/bin/java" \ + >/dev/null; then + log_end_msg 1 + else + log_end_msg 0 + fi + else + log_progress_msg "(already running)" + log_end_msg 0 + fi + ;; + stop) + log_daemon_msg "Stopping $DESC" "$NAME" + if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \ + --user "$TOMCAT6_USER" --startas "$JAVA_HOME/bin/java" \ + >/dev/null; then + log_progress_msg "(not running)" + else + $DAEMON -cp "$JSVC_CLASSPATH" -pidfile "$CATALINA_PID" \ + -stop "$BOOTSTRAP_CLASS" + fi + rm -rf "$JVM_TMP" + log_end_msg 0 + ;; + status) + if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \ + --user $TOMCAT6_USER --startas "$JAVA_HOME/bin/java" \ + >/dev/null; then + + if [ -f "$CATALINA_PID" ]; then + log_success_msg "$DESC is not running, but pid file exists." + exit 1 + else + log_success_msg "$DESC is not running." + exit 3 + fi + else + log_success_msg "$DESC is running with pid `cat $CATALINA_PID`" + fi + ;; + restart|force-reload) + if start-stop-daemon --test --stop --pidfile "$CATALINA_PID" \ + --user $TOMCAT6_USER --startas "$JAVA_HOME/bin/java" \ + >/dev/null; then + $0 stop + sleep 1 + fi + $0 start + ;; + try-restart) + if start-stop-daemon --test --start --pidfile "$CATALINA_PID" \ + --user $TOMCAT6_USER --startas "$JAVA_HOME/bin/java" \ + >/dev/null; then + $0 start + fi + ;; + *) + log_success_msg "Usage: $0 {start|stop|restart|try-restart|force-reload|status}" + exit 1 + ;; +esac + +exit 0 diff --git a/packaging/debian/init/cloud-usage b/packaging/debian/init/cloud-usage new file mode 100755 index 000000000..1cc75cc03 --- /dev/null +++ b/packaging/debian/init/cloud-usage @@ -0,0 +1,127 @@ +#!/bin/bash + +### BEGIN INIT INFO +# Provides: cloudstack usage +# Required-Start: $network $local_fs +# Required-Stop: $network $local_fs +# Default-Start: 3 4 5 +# Default-Stop: 0 1 2 6 +# Short-Description: Start/stop Apache CloudStack Usage Monitor +# Description: This scripts Starts/Stops the Apache CloudStack Usage Monitor +## The CloudStack Usage Monitor is a part of the Apache CloudStack project and is used +## for storing usage statistics from instances. +## JSVC (Java daemonizing) is used for starting and stopping the usage monitor. +### END INIT INFO + +# 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. + +. /lib/lsb/init-functions + +SHORTNAME="cloudstack-usage" +PIDFILE=/var/run/"$SHORTNAME".pid +PROGNAME="CloudStack Usage Monitor" +CLASS="com.cloud.usage.UsageServer" +PROG="jsvc" +DAEMON="/usr/bin/jsvc" + +unset OPTIONS +[ -r /etc/default/"$SHORTNAME" ] && source /etc/default/"$SHORTNAME" + +# The first existing directory is used for JAVA_HOME (if JAVA_HOME is not defined in $DEFAULT) +JDK_DIRS="/usr/lib/jvm/java-7-openjdk-amd64 /usr/lib/jvm/java-7-openjdk-i386 /usr/lib/jvm/java-6-openjdk /usr/lib/jvm/java-6-openjdk-i386 /usr/lib/jvm/java-6-openjdk-amd64 /usr/lib/jvm/java-6-sun" + +for jdir in $JDK_DIRS; do + if [ -r "$jdir/bin/java" -a -z "${JAVA_HOME}" ]; then + JAVA_HOME="$jdir" + fi +done +export JAVA_HOME + +UCP=`ls /usr/share/cloudstack-usage/lib/*.jar | tr '\n' ':' | sed s'/.$//'` +PCP=`ls /usr/share/cloudstack-usage/plugins/*.jar 2>/dev/null | tr '\n' ':' | sed s'/.$//'` + +# We need to append the JSVC daemon JAR to the classpath +# AgentShell implements the JSVC daemon methods +export CLASSPATH="/usr/share/java/commons-daemon.jar:$UCP:$PCP:/etc/cloudstack/usage" + +start() { + if [ -s "$PIDFILE" ] && kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then + log_daemon_msg "$PROGNAME apparently already running" + log_end_msg 0 + exit 0 + fi + + log_daemon_msg "Starting $PROGNAME" "$SHORTNAME" + if hostname --fqdn >/dev/null 2>&1 ; then + true + else + log_failure_msg "The host name does not resolve properly to an IP address. Cannot start $PROGNAME" + log_end_msg 1 + exit 1 + fi + + if start_daemon -p $PIDFILE $DAEMON -cp "$CLASSPATH" -pidfile "$PIDFILE" -outfile SYSLOG -errfile SYSLOG -Dpid=$$ $CLASS + RETVAL=$? + then + rc=0 + sleep 1 + if ! kill -0 $(cat "$PIDFILE") >/dev/null 2>&1; then + log_failure_msg "$PROG failed to start" + rc=1 + fi + else + rc=1 + fi + + if [ $rc -eq 0 ]; then + log_end_msg 0 + else + log_end_msg 1 + rm -f "$PIDFILE" + fi +} + +stop() { + log_daemon_msg "Stopping $PROGNAME" "$SHORTNAME" + killproc -p $PIDFILE $DAEMON + log_end_msg $? + rm -f "$PIDFILE" +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + status) + status_of_proc -p "$PIDFILE" "$PROG" "$SHORTNAME" + RETVAL=$? + ;; + restart | force-reload) + stop + sleep 3 + start + ;; + *) + echo "Usage: $0 {start|stop|restart|force-reload|status}" + RETVAL=3 +esac + +exit $RETVAL diff --git a/packaging/debian/replace.properties b/packaging/debian/replace.properties index 6520f63e6..8c852060c 100644 --- a/packaging/debian/replace.properties +++ b/packaging/debian/replace.properties @@ -26,37 +26,37 @@ COMPONENTS-SPEC=components-premium.xml AWSAPILOG=awsapi.log REMOTEHOST=localhost AGENTCLASSPATH= -AGENTLOG=/var/log/cloud/agent/agent.log -AGENTLOGDIR=/var/log/cloud/agent/ -AGENTSYSCONFDIR=/etc/cloud/agent -APISERVERLOG=/var/log/cloud/management/apilog.log -AWSAPILOG=/var/log/cloud/awsapi/awsapi.log +AGENTLOG=/var/log/cloudstack/agent/agent.log +AGENTLOGDIR=/var/log/cloudstack/agent/ +AGENTSYSCONFDIR=/etc/cloudstack/agent +APISERVERLOG=/var/log/cloudstack/management/apilog.log +AWSAPILOG=/var/log/cloudstack/awsapi/awsapi.log BINDIR=/usr/bin -COMMONLIBDIR=/usr/share/java +COMMONLIBDIR=/usr/share/cloudstack-common CONFIGUREVARS= -DEPSCLASSPATH= +DEPSCLASSPATH=/usr/share/tomcat6/bin/bootstrap.jar:/usr/share/tomcat6/bin/tomcat-juli.jar DOCDIR= -IPALOCATORLOG=/var/log/cloud/management/ipallocator.log -JAVADIR=/usr/share/java +IPALOCATORLOG=/var/log/cloudstack/management/ipallocator.log +JAVADIR=/usr/share/cloudstack-management/webapps/client/WEB-INF/lib LIBEXECDIR=/usr/libexec LOCKDIR=/var/lock MSCLASSPATH= -MSCONF=/etc/cloud/management -MSENVIRON=/usr/share/cloud/management -MSLOG=/var/log/cloud/management/management-server.log -MSLOGDIR=/var/log/cloud/management/ +MSCONF=/etc/cloudstack/management +MSENVIRON=/usr/share/cloudstack-management +MSLOG=/var/log/cloudstack/management/management-server.log +MSLOGDIR=/var/log/cloudstack/management/ MSMNTDIR=/var/lib/cloud/mnt MSUSER=cloud PIDDIR=/var/run PLUGINJAVADIR= PREMIUMJAVADIR= PYTHONDIR=/usr/lib/python2.6/site-packages/ -SERVERSYSCONFDIR=/etc/cloud/server -SETUPDATADIR=/usr/share/cloud/setup +SERVERSYSCONFDIR=/etc/cloudstack/server +SETUPDATADIR=/usr/share/cloudstack-management/setup SYSCONFDIR=/etc SYSTEMCLASSPATH= SYSTEMJARS= USAGECLASSPATH= -USAGELOG=/var/log/cloud/usage -USAGESYSCONFDIR=/etc/cloud/usage -PACKAGE=cloud +USAGELOG=/var/log/cloudstack/usage +USAGESYSCONFDIR=/etc/cloudstack/usage +PACKAGE=cloudstack diff --git a/patches/pom.xml b/patches/pom.xml index a662bcb97..00eec02dd 100644 --- a/patches/pom.xml +++ b/patches/pom.xml @@ -17,7 +17,7 @@ org.apache.cloudstack cloudstack - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT install diff --git a/patches/systemvm/debian/config/etc/init.d/cloud-early-config b/patches/systemvm/debian/config/etc/init.d/cloud-early-config index db2fcc204..3faa1bd0f 100755 --- a/patches/systemvm/debian/config/etc/init.d/cloud-early-config +++ b/patches/systemvm/debian/config/etc/init.d/cloud-early-config @@ -108,14 +108,17 @@ get_boot_params() { sed -i "s/%/ /g" /var/cache/cloud/cmdline ;; kvm) - # KVM needs to mount another disk, to get cmdline - mkdir -p $EXTRA_MOUNT - mount /dev/vdb $EXTRA_MOUNT - cp -f $EXTRA_MOUNT/cmdline /var/cache/cloud/cmdline - cp -f $EXTRA_MOUNT/authorized_keys /var/cache/cloud/authorized_keys - privkey=/var/cache/cloud/authorized_keys - umount $EXTRA_MOUNT - cp -f $privkey /root/.ssh/ && chmod go-rwx /root/.ssh/authorized_keys + while read line; do + if [[ $line == cmdline:* ]]; then + cmd=${line//cmdline:/} + echo $cmd > /var/cache/cloud/cmdline + elif [[ $line == pubkey:* ]]; then + pubkey=${line//pubkey:/} + echo $pubkey > /var/cache/cloud/authorized_keys + echo $pubkey > /root/.ssh/authorized_keys + fi + done < /dev/vport0p1 + chmod go-rwx /root/.ssh/authorized_keys ;; vmware) vmtoolsd --cmd 'machine.id.get' > /var/cache/cloud/cmdline @@ -363,6 +366,18 @@ setup_common() { echo "nameserver $NS2" >> /etc/dnsmasq-resolv.conf echo "nameserver $NS2" >> /etc/resolv.conf fi + + if [ -n "$IP6_NS1" ] + then + echo "nameserver $IP6_NS1" >> /etc/dnsmasq-resolv.conf + echo "nameserver $IP6_NS1" >> /etc/resolv.conf + fi + if [ -n "$IP6_NS2" ] + then + echo "nameserver $IP6_NS2" >> /etc/dnsmasq-resolv.conf + echo "nameserver $IP6_NS2" >> /etc/resolv.conf + fi + if [ -n "$MGMTNET" -a -n "$LOCAL_GW" ] then ip route add $MGMTNET via $LOCAL_GW dev eth1 @@ -371,12 +386,39 @@ setup_common() { ip route delete default if [ "$RROUTER" != "1" ] then - if [ -z "$3" ] + gwdev=$3 + if [ -z "$gwdev" ] + then + gwdev="eth0" + fi + + timer=0 + #default route add fails if we run before interface configured with ip + log_it "checking that $gwdev has IP before setting default route to $GW" + echo "checking that $gwdev has IP before setting default route to $GW" + while true + do + ip=$(ifconfig $gwdev | grep "inet addr:" | awk '{print $2}' | awk -F: '{print $2}') + if [ -z $ip ] then - ip route add default via $GW dev eth0 + sleep 1; + #waiting for the interface to setup with ip + log_it "waiting for $gwdev interface setup with ip" + echo "waiting for $gwdev interface setup with ip" else - ip route add default via $GW dev $3 + ip route add default via $GW dev $gwdev + break fi + + if [ $timer -gt 15 ] + then + log_it "interface $gwdev is not set up with ip... configuring default route failed"; + echo "interface $gwdev is not set up with ip... configuring default route failed" + break + fi + timer=`expr $timer + 1` + done + fi # a hacking way to activate vSwitch under VMware @@ -410,7 +452,6 @@ setup_dnsmasq() { sed -r -i s/^[#]?domain=.*$/domain=$DOMAIN/ /etc/dnsmasq.conf #answer all local domain queries sed -i -e "s/^[#]*local=.*$/local=\/$DOMAIN\//" /etc/dnsmasq.conf - fi if [ -n "$DNS_SEARCH_ORDER" ] @@ -432,6 +473,9 @@ setup_dnsmasq() { if [ $DHCP_RANGE_IP6 ] then sed -i -e "s/^dhcp-range_ip6=.*$/dhcp-range=$DHCP_RANGE_IP6,static/" /etc/dnsmasq.conf + # For nondefault6 tagged host, don't send dns-server information + sed -i /nondefault6/d /etc/dnsmasq.conf + echo "dhcp-option=nondefault6,option6:dns-server" >> /etc/dnsmasq.conf else sed -i -e "s/^dhcp-range_ip6=.*$//" /etc/dnsmasq.conf fi @@ -440,12 +484,36 @@ setup_dnsmasq() { if [ "$RROUTER" == "1" ] then - sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf - echo "dhcp-option=option:router,$GUEST_GW" >> /etc/dnsmasq.conf - sed -i -e "/^[#]*dhcp-option=6.*$/d" /etc/dnsmasq.conf - echo "dhcp-option=6,$GUEST_GW" >> /etc/dnsmasq.conf + DEFAULT_GW=$GUEST_GW + INTERNAL_DNS=$GUEST_GW + else + if [ "$TYPE" == "dhcpsrvr" ] + then + DEFAULT_GW=$GW + else + DEFAULT_GW=$ETH0_IP + fi + INTERNAL_DNS=$ETH0_IP fi - + sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf + [ $DEFAULT_GW ] && echo "dhcp-option=option:router,$DEFAULT_GW" >> /etc/dnsmasq.conf + + [ $ETH0_IP ] && [ $NS1 ] && NS="$NS1," + [ $ETH0_IP ] && [ $NS2 ] && NS="$NS$NS2," + [ $ETH0_IP6 ] && [ $IP6_NS1 ] && NS6="[$IP6_NS1]," + [ $ETH0_IP6 ] && [ $IP6_NS2 ] && NS6="$NS6[$IP6_NS2]," + #for now set up ourself as the dns server as well + sed -i -e "/^[#]*dhcp-option=6,.*$/d" /etc/dnsmasq.conf + sed -i -e "/^[#]*dhcp-option=option6:dns-server,.*$/d" /etc/dnsmasq.conf + if [ "$USE_EXTERNAL_DNS" != "true" ] + then + [ $ETH0_IP ] && NS="$INTERNAL_DNS,$NS" + [ $ETH0_IP6 ] && NS6="[::],$NS6" + fi + NS=${NS%?} + NS6=${NS6%?} + [ $ETH0_IP ] && echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf + [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,$NS6" >> /etc/dnsmasq.conf } setup_sshd(){ @@ -552,9 +620,16 @@ setup_redundant_router() { fi } +setup_aesni() { + if [ `grep aes /proc/cpuinfo | wc -l` -gt 0 ] + then + modprobe aesni_intel + fi +} + setup_router() { log_it "Setting up virtual router system vm" - + oldmd5= [ -f "/etc/udev/rules.d/70-persistent-net.rules" ] && oldmd5=$(md5sum "/etc/udev/rules.d/70-persistent-net.rules" | awk '{print $1}') @@ -602,18 +677,8 @@ setup_router() { fi fi - - + setup_aesni setup_dnsmasq - - NS=$NS1 - [ -n "$NS2" ] && NS=$NS1,$NS2 - if [ "$USE_EXTERNAL_DNS" == "true" ] - then - sed -i -e "/^[#]*dhcp-option=6.*$/d" /etc/dnsmasq.conf - echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf - fi - setup_apache2 $ETH0_IP sed -i /gateway/d /etc/hosts @@ -645,7 +710,7 @@ setup_vpcrouter() { fi cat > /etc/network/interfaces << EOF -auto lo $1 +auto lo eth0 iface lo inet loopback EOF setup_interface "0" $ETH0_IP $ETH0_MASK $GW @@ -715,28 +780,6 @@ setup_dhcpsrvr() { setup_dnsmasq setup_apache2 $ETH0_IP - NS=$NS1 - [ -n "$NS2" ] && NS=$NS1,$NS2 - if [ "$DEFAULTROUTE" != "false" ] - then - sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf - [ $GW ] && echo "dhcp-option=option:router,$GW" >> /etc/dnsmasq.conf - #for now set up ourself as the dns server as well - sed -i -e "/^[#]*dhcp-option=6.*$/d" /etc/dnsmasq.conf - if [ "$USE_EXTERNAL_DNS" == "true" ] - then - echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf - else - [ $ETH0_IP ] && echo "dhcp-option=6,$ETH0_IP,$NS" >> /etc/dnsmasq.conf - [ $ETH0_IP6 ] && echo "dhcp-option=option6:dns-server,[::]" >> /etc/dnsmasq.conf - fi - else - sed -i -e "/^[#]*dhcp-option=option:router.*$/d" /etc/dnsmasq.conf - echo "dhcp-option=option:router" >> /etc/dnsmasq.conf - sed -i -e "/^[#]*dhcp-option=6.*$/d" /etc/dnsmasq.conf - echo "dhcp-option=6,$NS" >> /etc/dnsmasq.conf - fi - sed -i /gateway/d /etc/hosts [ $ETH0_IP ] && echo "$ETH0_IP $NAME" >> /etc/hosts [ $ETH0_IP6 ] && echo "$ETH0_IP6 $NAME" >> /etc/hosts @@ -972,6 +1015,12 @@ for i in $CMDLINE dns2) NS2=$VALUE ;; + ip6dns1) + IP6_NS1=$VALUE + ;; + ip6dns2) + IP6_NS2=$VALUE + ;; domain) DOMAIN=$VALUE ;; diff --git a/patches/systemvm/debian/config/etc/logrotate.d/dnsmasq b/patches/systemvm/debian/config/etc/logrotate.d/dnsmasq index f448420e1..838415d30 100644 --- a/patches/systemvm/debian/config/etc/logrotate.d/dnsmasq +++ b/patches/systemvm/debian/config/etc/logrotate.d/dnsmasq @@ -6,7 +6,7 @@ delaycompress sharedscripts postrotate - [ ! -f /var/run/dnsmasq.pid ] || kill -USR2 `cat /var/run/dnsmasq.pid` + [ ! -f /var/run/dnsmasq/dnsmasq.pid ] || kill -USR2 `cat /var/run/dnsmasq/dnsmasq.pid` endscript create 0640 nobody root } 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 c909cf796..31003454e 100755 --- a/patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh +++ b/patches/systemvm/debian/config/opt/cloud/bin/vpc_guestnw.sh @@ -129,6 +129,18 @@ desetup_passwdsvcs() { } create_guest_network() { + # need to wait for eth device to appear before configuring it + timer=0 + while ! `grep -q $dev /proc/net/dev` ; do + logger -t cloud "$(basename $0):Waiting for interface $dev to appear, $timer seconds" + sleep 1; + if [ $timer -gt 15 ]; then + logger -t cloud "$(basename $0):interface $dev never appeared" + break + fi + timer=$[timer + 1] + done + logger -t cloud " $(basename $0): Create network on interface $dev, gateway $gw, network $ip/$mask " # setup ip configuration sudo ip addr add dev $dev $ip/$mask brd + diff --git a/patches/systemvm/debian/config/opt/cloud/bin/vpc_ipassoc.sh b/patches/systemvm/debian/config/opt/cloud/bin/vpc_ipassoc.sh index 53e739d02..f2f8a4933 100755 --- a/patches/systemvm/debian/config/opt/cloud/bin/vpc_ipassoc.sh +++ b/patches/systemvm/debian/config/opt/cloud/bin/vpc_ipassoc.sh @@ -56,6 +56,18 @@ remove_routing() { } add_an_ip () { + # need to wait for eth device to appear before configuring it + timer=0 + while ! `grep -q $ethDev /proc/net/dev` ; do + logger -t cloud "$(basename $0):Waiting for interface $ethDev to appear, $timer seconds" + sleep 1; + if [ $timer -gt 15 ]; then + logger -t cloud "$(basename $0):interface $ethDev never appeared" + break + fi + timer=$[timer + 1] + done + logger -t cloud "$(basename $0):Adding ip $pubIp on interface $ethDev" sudo ip link show $ethDev | grep "state DOWN" > /dev/null local old_state=$? diff --git a/patches/systemvm/debian/config/root/edithosts.sh b/patches/systemvm/debian/config/root/edithosts.sh index 3cf274276..1f98fbf96 100755 --- a/patches/systemvm/debian/config/root/edithosts.sh +++ b/patches/systemvm/debian/config/root/edithosts.sh @@ -27,7 +27,7 @@ # $6 : comma separated static routes usage() { - printf "Usage: %s: -m -4 -6 -h -d -n -s -u \n" $(basename $0) >&2 + printf "Usage: %s: -m -4 -6 -h -d -n -s -u [-N]\n" $(basename $0) >&2 } mac= @@ -38,8 +38,9 @@ dflt= dns= routes= duid= +nondefault= -while getopts 'm:4:h:d:n:s:6:u:' OPTION +while getopts 'm:4:h:d:n:s:6:u:N' OPTION do case $OPTION in m) mac="$OPTARG" @@ -58,6 +59,8 @@ do ;; s) routes="$OPTARG" ;; + N) nondefault=1 + ;; ?) usage exit 2 ;; @@ -120,7 +123,12 @@ then fi if [ $ipv6 ] then - echo "id:$duid,[$ipv6],$host,infinite" >>$DHCP_HOSTS + if [ $nondefault ] + then + echo "id:$duid,set:nondefault6,[$ipv6],$host,infinite" >>$DHCP_HOSTS + else + echo "id:$duid,[$ipv6],$host,infinite" >>$DHCP_HOSTS + fi fi #delete leases to supplied mac and ip addresses @@ -173,18 +181,13 @@ then tag=$(echo $ipv4 | tr '.' '_') sed -i /$tag/d $DHCP_OPTS - if [ "$dflt" != "0.0.0.0" ] - then - logger -t cloud "$0: setting default router for $ipv4 to $dflt" - echo "$tag,3,$dflt" >> $DHCP_OPTS - else - logger -t cloud "$0: unset default router for $ipv4" - echo "$tag,3," >> $DHCP_OPTS - fi - if [ "$dns" != "" ] + if [ "$dflt" == "0.0.0.0" ] then - logger -t cloud "$0: setting dns server for $ipv4 to $dns" - echo "$tag,6,$dns" >> $DHCP_OPTS + logger -t cloud "$0: unset default router for $ipv4" + logger -t cloud "$0: unset dns server for $ipv4" + echo "$tag,3" >> $DHCP_OPTS + echo "$tag,6" >> $DHCP_OPTS + echo "$tag,15" >> $DHCP_OPTS fi [ "$routes" != "" ] && echo "$tag,121,$routes" >> $DHCP_OPTS #delete entry we just put in because we need a tag @@ -197,7 +200,8 @@ fi pid=$(pidof dnsmasq) if [ "$pid" != "" ] then - service dnsmasq restart + #service dnsmasq restart + kill -HUP $pid else if [ $no_redundant -eq 1 ] then diff --git a/patches/systemvm/debian/config/root/func.sh b/patches/systemvm/debian/config/root/func.sh index 4047a4047..8cc96082c 100644 --- a/patches/systemvm/debian/config/root/func.sh +++ b/patches/systemvm/debian/config/root/func.sh @@ -23,7 +23,8 @@ # $2 timeout seconds getLockFile() { __locked=0 - __LOCKFILE="/tmp/$1-$$.lock" + __TS=`date +%s%N` + __LOCKFILE="/tmp/$__TS-$$-$1.lock" if [ $2 ] then __TIMEOUT=$2 @@ -42,10 +43,14 @@ getLockFile() { psline=`ps u $$` echo $psline > $__LOCKFILE - + if [ ! -e $__LOCKFILE ] + then + return + fi + for i in `seq 1 $(($__TIMEOUT * 10))` do - currlock=`ls -tr /tmp/$1-*.lock | head -n1` + currlock=`ls /tmp/*-$1.lock | head -n1` if [ $currlock -ef $__LOCKFILE ] then __locked=1 @@ -73,7 +78,7 @@ getLockFile() { # $1 lock filename # $2 locked(1) or not(0) releaseLockFile() { - __LOCKFILE="/tmp/$1-$$.lock" + __LOCKFILE="/tmp/*-$$-$1.lock" __locked=$2 if [ "$__locked" == "1" ] then 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 176bce225..931c95901 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 @@ -22,6 +22,8 @@ do while read line do ip=`echo $line|cut -d " " -f 2|cut -d "/" -f 1` - arping -I $i -A $ip -c 2 >> [RROUTER_LOG] 2>&1 + arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 + arping -I $i -A $ip -c 1 >> [RROUTER_LOG] 2>&1 done < /tmp/iplist_$i done < /tmp/iflist +sleep 1 diff --git a/patches/systemvm/debian/config/root/redundant_router/backup.sh.templ b/patches/systemvm/debian/config/root/redundant_router/backup.sh.templ index 03111b557..7a1bd4458 100644 --- a/patches/systemvm/debian/config/root/redundant_router/backup.sh.templ +++ b/patches/systemvm/debian/config/root/redundant_router/backup.sh.templ @@ -28,6 +28,7 @@ fi echo To backup called >> [RROUTER_LOG] [RROUTER_BIN_PATH]/disable_pubip.sh >> [RROUTER_LOG] 2>&1 echo Disable public ip $? >> [RROUTER_LOG] +[RROUTER_BIN_PATH]/services.sh stop >> [RROUTER_LOG] 2>&1 [RROUTER_BIN_PATH]/primary-backup.sh backup >> [RROUTER_LOG] 2>&1 echo Switch conntrackd mode backup $? >> [RROUTER_LOG] echo Status: BACKUP >> [RROUTER_LOG] diff --git a/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ b/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ index 908c0d8f0..7a980bdfb 100755 --- a/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ +++ b/patches/systemvm/debian/config/root/redundant_router/check_heartbeat.sh.templ @@ -22,7 +22,7 @@ then lasttime=$(cat [RROUTER_BIN_PATH]/keepalived.ts2) thistime=$(cat [RROUTER_BIN_PATH]/keepalived.ts) diff=$(($thistime - $lasttime)) - if [ $diff -gt 100 ] + if [ $diff -lt 30] then echo Keepalived process is dead! >> [RROUTER_LOG] service keepalived stop >> [RROUTER_LOG] 2>&1 diff --git a/plugins/acl/static-role-based/pom.xml b/plugins/acl/static-role-based/pom.xml index a2e8d05d4..e40cecb9d 100644 --- a/plugins/acl/static-role-based/pom.xml +++ b/plugins/acl/static-role-based/pom.xml @@ -26,7 +26,7 @@ org.apache.cloudstack cloudstack-plugins - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT ../../pom.xml diff --git a/plugins/acl/static-role-based/src/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java b/plugins/acl/static-role-based/src/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java index 16357846c..d4d73d1f7 100644 --- a/plugins/acl/static-role-based/src/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java +++ b/plugins/acl/static-role-based/src/org/apache/cloudstack/acl/StaticRoleBasedAPIAccessChecker.java @@ -16,27 +16,29 @@ // under the License. package org.apache.cloudstack.acl; -import com.cloud.exception.PermissionDeniedException; -import com.cloud.server.ManagementServer; -import com.cloud.user.Account; -import com.cloud.user.AccountService; -import com.cloud.user.User; -import com.cloud.utils.PropertiesUtil; -import com.cloud.utils.component.AdapterBase; -import com.cloud.utils.component.ComponentLocator; - -import javax.ejb.Local; -import javax.naming.ConfigurationException; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Map; import java.util.Set; +import javax.ejb.Local; +import javax.inject.Inject; +import javax.naming.ConfigurationException; + import org.apache.log4j.Logger; +import com.cloud.exception.PermissionDeniedException; +import com.cloud.user.Account; +import com.cloud.user.AccountService; +import com.cloud.user.User; +import com.cloud.utils.PropertiesUtil; +import com.cloud.utils.component.AdapterBase; +import com.cloud.utils.component.PluggableService; + // This is the default API access checker that grab's the user's account // based on the account type, access is granted -@Local(value = APIChecker.class) +@Local(value=APIChecker.class) public class StaticRoleBasedAPIAccessChecker extends AdapterBase implements APIChecker { protected static final Logger s_logger = Logger.getLogger(StaticRoleBasedAPIAccessChecker.class); @@ -44,23 +46,24 @@ public class StaticRoleBasedAPIAccessChecker extends AdapterBase implements APIC private static Map> s_roleBasedApisMap = new HashMap>(); - private static AccountService s_accountService; + @Inject List _services; + @Inject AccountService _accountService; protected StaticRoleBasedAPIAccessChecker() { super(); - for (RoleType roleType : RoleType.values()) + for (RoleType roleType: RoleType.values()) s_roleBasedApisMap.put(roleType, new HashSet()); } @Override public boolean checkAccess(User user, String commandName) throws PermissionDeniedException { - Account account = s_accountService.getAccount(user.getAccountId()); + Account account = _accountService.getAccount(user.getAccountId()); if (account == null) { throw new PermissionDeniedException("The account id=" + user.getAccountId() + "for user id=" + user.getId() + "is null"); } - RoleType roleType = s_accountService.getRoleType(account); + RoleType roleType = _accountService.getRoleType(account); boolean isAllowed = s_roleBasedApisMap.get(roleType).contains(commandName); if (!isAllowed) { throw new PermissionDeniedException("The API does not exist or is blacklisted. Role type=" + roleType.toString() + " is not allowed to request the api: " + commandName); @@ -72,23 +75,18 @@ public boolean checkAccess(User user, String commandName) public boolean configure(String name, Map params) throws ConfigurationException { super.configure(name, params); - // Read command properties files to build the static map per role. - ComponentLocator locator = ComponentLocator.getLocator(ManagementServer.Name); - s_accountService = locator.getManager(AccountService.class); - processMapping(PropertiesUtil.processConfigFile(new String[] {"commands.properties"})); - return true; } private void processMapping(Map configMap) { - for (Map.Entry entry : configMap.entrySet()) { + for (Map.Entry entry: configMap.entrySet()) { String apiName = entry.getKey(); String roleMask = entry.getValue(); try { short cmdPermissions = Short.parseShort(roleMask); - for (RoleType roleType : RoleType.values()) { + for (RoleType roleType: RoleType.values()) { if ((cmdPermissions & roleType.getValue()) != 0) s_roleBasedApisMap.get(roleType).add(apiName); } diff --git a/plugins/affinity-group-processors/host-anti-affinity/pom.xml b/plugins/affinity-group-processors/host-anti-affinity/pom.xml new file mode 100644 index 000000000..669febd7d --- /dev/null +++ b/plugins/affinity-group-processors/host-anti-affinity/pom.xml @@ -0,0 +1,33 @@ + + + 4.0.0 + cloud-plugin-host-anti-affinity + Apache CloudStack Plugin - Host Anti-Affinity Processor + + org.apache.cloudstack + cloudstack-plugins + 4.2.0-SNAPSHOT + ../../pom.xml + + + install + src + + diff --git a/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java b/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java new file mode 100644 index 000000000..4c2c7f1c1 --- /dev/null +++ b/plugins/affinity-group-processors/host-anti-affinity/src/org/apache/cloudstack/affinity/HostAntiAffinityProcessor.java @@ -0,0 +1,93 @@ +// 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 org.apache.cloudstack.affinity; + +import java.util.List; + +import javax.ejb.Local; +import javax.inject.Inject; + +import org.apache.cloudstack.affinity.dao.AffinityGroupDao; +import org.apache.cloudstack.affinity.dao.AffinityGroupVMMapDao; +import org.apache.log4j.Logger; + +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; +import com.cloud.exception.AffinityConflictException; +import com.cloud.vm.VMInstanceVO; +import com.cloud.vm.VirtualMachine; +import com.cloud.vm.VirtualMachineProfile; +import com.cloud.vm.dao.UserVmDao; +import com.cloud.vm.dao.VMInstanceDao; + +@Local(value = AffinityGroupProcessor.class) +public class HostAntiAffinityProcessor extends AffinityProcessorBase implements AffinityGroupProcessor { + + private static final Logger s_logger = Logger.getLogger(HostAntiAffinityProcessor.class); + @Inject + protected UserVmDao _vmDao; + @Inject + protected VMInstanceDao _vmInstanceDao; + @Inject + protected AffinityGroupDao _affinityGroupDao; + @Inject + protected AffinityGroupVMMapDao _affinityGroupVMMapDao; + + @Override + public void process(VirtualMachineProfile vmProfile, DeploymentPlan plan, + ExcludeList avoid) + throws AffinityConflictException { + VirtualMachine vm = vmProfile.getVirtualMachine(); + List vmGroupMappings = _affinityGroupVMMapDao.findByVmIdType(vm.getId(), getType()); + + for (AffinityGroupVMMapVO vmGroupMapping : vmGroupMappings) { + if (vmGroupMapping != null) { + AffinityGroupVO group = _affinityGroupDao.findById(vmGroupMapping.getAffinityGroupId()); + + if (s_logger.isDebugEnabled()) { + s_logger.debug("Processing affinity group " + group.getName() + " for VM Id: " + vm.getId()); + } + + List groupVMIds = _affinityGroupVMMapDao.listVmIdsByAffinityGroup(group.getId()); + groupVMIds.remove(vm.getId()); + + for (Long groupVMId : groupVMIds) { + VMInstanceVO groupVM = _vmInstanceDao.findById(groupVMId); + if (groupVM != null && !groupVM.isRemoved()) { + if (groupVM.getHostId() != null) { + avoid.addHost(groupVM.getHostId()); + if (s_logger.isDebugEnabled()) { + s_logger.debug("Added host " + groupVM.getHostId() + " to avoid set, since VM " + + groupVM.getId() + " is present on the host"); + } + } else if (VirtualMachine.State.Stopped.equals(groupVM.getState()) + && groupVM.getLastHostId() != null) { + avoid.addHost(groupVM.getLastHostId()); + if (s_logger.isDebugEnabled()) { + s_logger.debug("Added host " + groupVM.getLastHostId() + " to avoid set, since VM " + + groupVM.getId() + " is present on the host, in Stopped state"); + } + + } + } + } + } + } + + } + +} diff --git a/plugins/alert-handlers/snmp-alerts/pom.xml b/plugins/alert-handlers/snmp-alerts/pom.xml new file mode 100644 index 000000000..b5cebf31b --- /dev/null +++ b/plugins/alert-handlers/snmp-alerts/pom.xml @@ -0,0 +1,45 @@ + + + + cloudstack-plugins + org.apache.cloudstack + 4.2.0-SNAPSHOT + ../../pom.xml + + 4.0.0 + Apache CloudStack Plugin - SNMP Alerts + cloud-plugin-snmp-alerts + + + + org.apache.servicemix.bundles + org.apache.servicemix.bundles.snmp4j + 2.1.0_1 + + + log4j + log4j + ${cs.log4j.version} + + + + diff --git a/plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/CsSnmpConstants.java b/plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/CsSnmpConstants.java new file mode 100644 index 000000000..36970a958 --- /dev/null +++ b/plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/CsSnmpConstants.java @@ -0,0 +1,45 @@ +// 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 org.apache.cloudstack.alert.snmp; + +/** + *

+ * IMPORTANT + *

+ * These OIDs are based on CS-ROOT-MIB MIB file. If there is any change in MIB file + * then that should be reflected in this file also * + *

+ * suffix 2 due to conflict with SnmpConstants class of snmp4j + */ +public class CsSnmpConstants { + public static final String CLOUDSTACK = "1.3.6.1.4.1.18060.15"; + + public static final String OBJECTS_PREFIX = CLOUDSTACK + ".1.1."; + + public static final String TRAPS_PREFIX = CLOUDSTACK + ".1.2.0."; + + public static final String DATA_CENTER_ID = OBJECTS_PREFIX + 1; + + public static final String POD_ID = OBJECTS_PREFIX + 2; + + public static final String CLUSTER_ID = OBJECTS_PREFIX + 3; + + public static final String MESSAGE = OBJECTS_PREFIX + 4; + + public static final String GENERATION_TIME = OBJECTS_PREFIX + 5; +} \ No newline at end of file diff --git a/plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpEnhancedPatternLayout.java b/plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpEnhancedPatternLayout.java new file mode 100644 index 000000000..674209156 --- /dev/null +++ b/plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpEnhancedPatternLayout.java @@ -0,0 +1,107 @@ +// 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 org.apache.cloudstack.alert.snmp; + +import org.apache.log4j.EnhancedPatternLayout; +import org.apache.log4j.spi.LoggingEvent; + +import java.util.Date; +import java.util.StringTokenizer; + +public class SnmpEnhancedPatternLayout extends EnhancedPatternLayout { + private String _pairDelimiter = "//"; + private String _keyValueDelimiter = "::"; + + private static final int LENGTH_OF_STRING_MESSAGE_AND_KEY_VALUE_DELIMITER = 9; + private static final int LENGTH_OF_STRING_MESSAGE = 8; + + public String getKeyValueDelimeter() { + return _keyValueDelimiter; + } + + public void setKeyValueDelimiter(String keyValueDelimiter) { + this._keyValueDelimiter = keyValueDelimiter; + } + + public String getPairDelimiter() { + return _pairDelimiter; + } + + public void setPairDelimiter(String pairDelimiter) { + this._pairDelimiter = pairDelimiter; + } + + public SnmpTrapInfo parseEvent(LoggingEvent event) { + SnmpTrapInfo snmpTrapInfo = null; + + final String message = event.getRenderedMessage(); + if (message.contains("alertType") && message.contains("message")) { + snmpTrapInfo = new SnmpTrapInfo(); + final StringTokenizer messageSplitter = new StringTokenizer(message, _pairDelimiter); + while (messageSplitter.hasMoreTokens()) { + final String pairToken = messageSplitter.nextToken(); + final StringTokenizer pairSplitter = new StringTokenizer(pairToken, _keyValueDelimiter); + String keyToken; + String valueToken; + + if (pairSplitter.hasMoreTokens()) { + keyToken = pairSplitter.nextToken().trim(); + } else { + break; + } + + if (pairSplitter.hasMoreTokens()) { + valueToken = pairSplitter.nextToken().trim(); + } else { + break; + } + + if (keyToken.equalsIgnoreCase("alertType") && !valueToken.equalsIgnoreCase("null")) { + snmpTrapInfo.setAlertType(Short.parseShort(valueToken)); + } else if (keyToken.equalsIgnoreCase("dataCenterId") && !valueToken.equalsIgnoreCase("null")) { + snmpTrapInfo.setDataCenterId(Long.parseLong(valueToken)); + } else if (keyToken.equalsIgnoreCase("podId") && !valueToken.equalsIgnoreCase("null")) { + snmpTrapInfo.setPodId(Long.parseLong(valueToken)); + } else if (keyToken.equalsIgnoreCase("clusterId") && !valueToken.equalsIgnoreCase("null")) { + snmpTrapInfo.setClusterId(Long.parseLong(valueToken)); + } else if (keyToken.equalsIgnoreCase("message") && !valueToken.equalsIgnoreCase("null")) { + snmpTrapInfo.setMessage(getSnmpMessage(message)); + } + } + + snmpTrapInfo.setGenerationTime(new Date(event.getTimeStamp())); + } + return snmpTrapInfo; + } + + private String getSnmpMessage(String message) { + int lastIndexOfKeyValueDelimiter = message.lastIndexOf(_keyValueDelimiter); + int lastIndexOfMessageInString = message.lastIndexOf("message"); + + if (lastIndexOfKeyValueDelimiter - lastIndexOfMessageInString <= + LENGTH_OF_STRING_MESSAGE_AND_KEY_VALUE_DELIMITER) { + return message.substring(lastIndexOfKeyValueDelimiter + _keyValueDelimiter.length()).trim(); + } else if (lastIndexOfMessageInString < lastIndexOfKeyValueDelimiter) { + return message.substring( + lastIndexOfMessageInString + _keyValueDelimiter.length() + LENGTH_OF_STRING_MESSAGE).trim(); + } + + return message.substring(message.lastIndexOf("message" + _keyValueDelimiter) + + LENGTH_OF_STRING_MESSAGE_AND_KEY_VALUE_DELIMITER).trim(); + } +} \ No newline at end of file diff --git a/plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpHelper.java b/plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpHelper.java new file mode 100644 index 000000000..4bee94bd9 --- /dev/null +++ b/plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpHelper.java @@ -0,0 +1,106 @@ +// 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 org.apache.cloudstack.alert.snmp; + +import com.cloud.utils.exception.CloudRuntimeException; +import org.snmp4j.CommunityTarget; +import org.snmp4j.PDU; +import org.snmp4j.Snmp; +import org.snmp4j.mp.SnmpConstants; +import org.snmp4j.smi.OID; +import org.snmp4j.smi.OctetString; +import org.snmp4j.smi.UdpAddress; +import org.snmp4j.smi.UnsignedInteger32; +import org.snmp4j.smi.VariableBinding; +import org.snmp4j.transport.DefaultUdpTransportMapping; + +import java.io.IOException; + +public class SnmpHelper { + private Snmp _snmp; + private CommunityTarget _target; + + public SnmpHelper(String address, String community) { + _target = new CommunityTarget(); + _target.setCommunity(new OctetString(community)); + _target.setVersion(SnmpConstants.version2c); + _target.setAddress(new UdpAddress(address)); + try { + _snmp = new Snmp(new DefaultUdpTransportMapping()); + } catch (IOException e) { + _snmp = null; + throw new CloudRuntimeException(" Error in crearting snmp object, " + e.getMessage()); + } + } + + public void sendSnmpTrap(SnmpTrapInfo snmpTrapInfo) { + try { + if (_snmp != null) { + _snmp.send(createPDU(snmpTrapInfo), _target, null, null); + } + } catch (IOException e) { + throw new CloudRuntimeException(" Error in sending SNMP Trap, " + e.getMessage()); + } + } + + private PDU createPDU(SnmpTrapInfo snmpTrapInfo) { + PDU trap = new PDU(); + trap.setType(PDU.TRAP); + + int alertType = snmpTrapInfo.getAlertType() + 1; + if (alertType > 0) { + trap.add(new VariableBinding(SnmpConstants.snmpTrapOID, getOID(CsSnmpConstants.TRAPS_PREFIX + alertType))); + if (snmpTrapInfo.getDataCenterId() != 0) { + trap.add(new VariableBinding(getOID(CsSnmpConstants.DATA_CENTER_ID), + new UnsignedInteger32(snmpTrapInfo.getDataCenterId()))); + } + + if (snmpTrapInfo.getPodId() != 0) { + trap.add(new VariableBinding(getOID(CsSnmpConstants.POD_ID), new UnsignedInteger32(snmpTrapInfo + .getPodId()))); + } + + if (snmpTrapInfo.getClusterId() != 0) { + trap.add(new VariableBinding(getOID(CsSnmpConstants.CLUSTER_ID), new UnsignedInteger32(snmpTrapInfo + .getClusterId()))); + } + + if (snmpTrapInfo.getMessage() != null) { + trap.add(new VariableBinding(getOID(CsSnmpConstants.MESSAGE), new OctetString(snmpTrapInfo.getMessage + ()))); + } else { + throw new CloudRuntimeException(" What is the use of alert without message "); + } + + if (snmpTrapInfo.getGenerationTime() != null) { + trap.add(new VariableBinding(getOID(CsSnmpConstants.GENERATION_TIME), + new OctetString(snmpTrapInfo.getGenerationTime().toString()))); + } else { + trap.add(new VariableBinding(getOID(CsSnmpConstants.GENERATION_TIME))); + } + } else { + throw new CloudRuntimeException(" Invalid alert Type "); + } + + return trap; + } + + private OID getOID(String oidString) { + return new OID(oidString); + } +} \ No newline at end of file diff --git a/plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpTrapAppender.java b/plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpTrapAppender.java new file mode 100644 index 000000000..eaa4a132b --- /dev/null +++ b/plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpTrapAppender.java @@ -0,0 +1,207 @@ +// 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 org.apache.cloudstack.alert.snmp; + +import com.cloud.utils.net.NetUtils; +import org.apache.log4j.AppenderSkeleton; +import org.apache.log4j.spi.ErrorCode; +import org.apache.log4j.spi.LoggingEvent; + +import java.util.ArrayList; +import java.util.List; +import java.util.StringTokenizer; + +public class SnmpTrapAppender extends AppenderSkeleton { + private String _delimiter = ","; + private String _snmpManagerIpAddresses; + private String _snmpManagerPorts; + private String _snmpManagerCommunities; + + private String _oldSnmpManagerIpAddresses = null; + private String _oldSnmpManagerPorts = null; + private String _oldSnmpManagerCommunities = null; + + private List _ipAddresses = null; + private List _communities = null; + private List _ports = null; + + List _snmpHelpers = new ArrayList(); + + @Override + protected void append(LoggingEvent event) { + SnmpEnhancedPatternLayout snmpEnhancedPatternLayout; + + if (getLayout() == null) { + errorHandler.error("No layout set for the Appender named [" + getName() + ']', null, + ErrorCode.MISSING_LAYOUT); + return; + } + + if (getLayout() instanceof SnmpEnhancedPatternLayout) { + snmpEnhancedPatternLayout = (SnmpEnhancedPatternLayout) getLayout(); + } else { + return; + } + + if (!isAsSevereAsThreshold(event.getLevel())) { + return; + } + + SnmpTrapInfo snmpTrapInfo = snmpEnhancedPatternLayout.parseEvent(event); + + if (snmpTrapInfo != null && !_snmpHelpers.isEmpty()) { + for (SnmpHelper helper : _snmpHelpers) { + try { + helper.sendSnmpTrap(snmpTrapInfo); + } catch (Exception e) { + errorHandler.error(e.getMessage()); + } + } + } + } + + void setSnmpHelpers() { + if (_snmpManagerIpAddresses == null || _snmpManagerIpAddresses.trim().isEmpty() || _snmpManagerCommunities == + null || _snmpManagerCommunities.trim().isEmpty() || _snmpManagerPorts == null || + _snmpManagerPorts.trim().isEmpty()) { + reset(); + return; + } + + if (_oldSnmpManagerIpAddresses != null && _oldSnmpManagerIpAddresses.equals(_snmpManagerIpAddresses) && + _oldSnmpManagerCommunities.equals(_snmpManagerCommunities) && + _oldSnmpManagerPorts.equals(_snmpManagerPorts)) { + return; + } + + _oldSnmpManagerIpAddresses = _snmpManagerIpAddresses; + _oldSnmpManagerPorts = _snmpManagerPorts; + _oldSnmpManagerCommunities = _snmpManagerCommunities; + + _ipAddresses = parse(_snmpManagerIpAddresses); + _communities = parse(_snmpManagerCommunities); + _ports = parse(_snmpManagerPorts); + + if (!(_ipAddresses.size() == _communities.size() && _ipAddresses.size() == _ports.size())) { + reset(); + errorHandler.error(" size of ip addresses , communities, " + "and ports list doesn't match, " + + "setting all to null"); + return; + } + + if (!validateIpAddresses() || !validatePorts()) { + reset(); + errorHandler.error(" Invalid format for the IP Addresses or Ports parameter "); + return; + } + + String address; + + for (int i = 0; i < _ipAddresses.size(); i++) { + address = _ipAddresses.get(i) + "/" + _ports.get(i); + try { + _snmpHelpers.add(new SnmpHelper(address, _communities.get(i))); + } catch (Exception e) { + errorHandler.error(e.getMessage()); + } + } + } + + private void reset() { + _ipAddresses = null; + _communities = null; + _ports = null; + _snmpHelpers.clear(); + } + + @Override + public void close() { + if (!closed) closed = true; + } + + @Override + public boolean requiresLayout() { + return true; + } + + private List parse(String str) { + List result = new ArrayList(); + + final StringTokenizer tokenizer = new StringTokenizer(str, _delimiter); + while (tokenizer.hasMoreTokens()) { + result.add(tokenizer.nextToken().trim()); + } + return result; + } + + private boolean validatePorts() { + for (String port : _ports) { + if (!NetUtils.isValidPort(port)) { + return false; + } + } + return true; + } + + private boolean validateIpAddresses() { + for (String ipAddress : _ipAddresses) { + if (ipAddress.trim().equalsIgnoreCase("localhost")) { + continue; + } + if (!NetUtils.isValidIp(ipAddress)) { + return false; + } + } + return true; + } + + public String getSnmpManagerIpAddresses() { + return _snmpManagerIpAddresses; + } + + public void setSnmpManagerIpAddresses(String snmpManagerIpAddresses) { + this._snmpManagerIpAddresses = snmpManagerIpAddresses; + setSnmpHelpers(); + } + + public String getSnmpManagerPorts() { + return _snmpManagerPorts; + } + + public void setSnmpManagerPorts(String snmpManagerPorts) { + this._snmpManagerPorts = snmpManagerPorts; + setSnmpHelpers(); + } + + public String getSnmpManagerCommunities() { + return _snmpManagerCommunities; + } + + public void setSnmpManagerCommunities(String snmpManagerCommunities) { + this._snmpManagerCommunities = snmpManagerCommunities; + setSnmpHelpers(); + } + + public String getDelimiter() { + return _delimiter; + } + + public void setDelimiter(String delimiter) { + this._delimiter = delimiter; + } +} \ No newline at end of file diff --git a/plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpTrapInfo.java b/plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpTrapInfo.java new file mode 100644 index 000000000..71bfee02c --- /dev/null +++ b/plugins/alert-handlers/snmp-alerts/src/org/apache/cloudstack/alert/snmp/SnmpTrapInfo.java @@ -0,0 +1,90 @@ +// 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 org.apache.cloudstack.alert.snmp; + +import java.util.Date; + +public class SnmpTrapInfo { + private String message; + private long podId; + private long dataCenterId; + private long clusterId; + private Date generationTime; + private short alertType; + + public SnmpTrapInfo() { + } + + public SnmpTrapInfo(short alertType, long dataCenterId, long podId, long clusterId, String message, + Date generationTime) { + this.podId = podId; + this.alertType = alertType; + this.clusterId = clusterId; + this.dataCenterId = dataCenterId; + this.generationTime = generationTime; + this.message = message; + } + + public short getAlertType() { + return alertType; + } + + public void setAlertType(short alertType) { + this.alertType = alertType; + } + + public String getMessage() { + return message; + } + + public void setMessage(String message) { + this.message = message; + } + + public long getPodId() { + return podId; + } + + public void setPodId(long podId) { + this.podId = podId; + } + + public long getDataCenterId() { + return dataCenterId; + } + + public void setDataCenterId(long dataCenterId) { + this.dataCenterId = dataCenterId; + } + + public long getClusterId() { + return clusterId; + } + + public void setClusterId(long clusterId) { + this.clusterId = clusterId; + } + + public Date getGenerationTime() { + return generationTime; + } + + public void setGenerationTime(Date generationTime) { + this.generationTime = generationTime; + } +} \ No newline at end of file diff --git a/plugins/alert-handlers/snmp-alerts/test/org/apache/cloudstack/alert/snmp/SnmpEnhancedPatternLayoutTest.java b/plugins/alert-handlers/snmp-alerts/test/org/apache/cloudstack/alert/snmp/SnmpEnhancedPatternLayoutTest.java new file mode 100644 index 000000000..b903a1e18 --- /dev/null +++ b/plugins/alert-handlers/snmp-alerts/test/org/apache/cloudstack/alert/snmp/SnmpEnhancedPatternLayoutTest.java @@ -0,0 +1,90 @@ +// 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 org.apache.cloudstack.alert.snmp; + +import org.apache.log4j.spi.LoggingEvent; +import org.junit.Before; +import org.junit.Test; + +import javax.naming.ConfigurationException; + +import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.assertNotNull; +import static junit.framework.Assert.assertNull; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.when; + +public class SnmpEnhancedPatternLayoutTest { + SnmpEnhancedPatternLayout _snmpEnhancedPatternLayout = new SnmpEnhancedPatternLayout(); + + @Before + public void setUp() throws ConfigurationException { + _snmpEnhancedPatternLayout.setKeyValueDelimiter("::"); + _snmpEnhancedPatternLayout.setPairDelimiter("//"); + } + + @Test + public void parseAlertTest() { + LoggingEvent event = mock(LoggingEvent.class); + setMessage(" alertType:: 14 // dataCenterId:: 1 // podId:: 1 // " + "clusterId:: null // message:: Management" + + " network CIDR is not configured originally. Set it default to 10.102.192.0/22", event); + SnmpTrapInfo info = _snmpEnhancedPatternLayout.parseEvent(event); + commonAssertions(info, "Management network CIDR is not configured originally. Set it default to 10.102.192" + + ".0/22"); + } + + @Test + public void ParseAlertWithPairDelimeterInMessageTest() { + LoggingEvent event = mock(LoggingEvent.class); + setMessage(" alertType:: 14 // dataCenterId:: 1 // podId:: 1 // " + "clusterId:: null // message:: Management" + + " //network CIDR is not configured originally. Set it default to 10.102.192.0/22", event); + SnmpTrapInfo info = _snmpEnhancedPatternLayout.parseEvent(event); + commonAssertions(info, "Management //network CIDR is not configured originally. Set it default to 10.102.192" + + ".0/22"); + } + + @Test + public void ParseAlertWithKeyValueDelimeterInMessageTest() { + LoggingEvent event = mock(LoggingEvent.class); + setMessage(" alertType:: 14 // dataCenterId:: 1 // podId:: 1 // " + "clusterId:: null // message:: Management" + + " ::network CIDR is not configured originally. Set it default to 10.102.192.0/22", event); + SnmpTrapInfo info = _snmpEnhancedPatternLayout.parseEvent(event); + commonAssertions(info, "Management ::network CIDR is not configured originally. Set it default to 10.102.192" + + ".0/22"); + } + + @Test + public void parseRandomTest() { + LoggingEvent event = mock(LoggingEvent.class); + when(event.getRenderedMessage()).thenReturn("Problem clearing email alert"); + assertNull(" Null value was expected ", _snmpEnhancedPatternLayout.parseEvent(event)); + } + + private void commonAssertions(SnmpTrapInfo info, String message) { + assertEquals(" alert type not as expected ", 14, info.getAlertType()); + assertEquals(" data center id not as expected ", 1, info.getDataCenterId()); + assertEquals(" pod id os not as expected ", 1, info.getPodId()); + assertEquals(" cluster id is not as expected ", 0, info.getClusterId()); + assertNotNull(" generation time is set to null", info.getGenerationTime()); + assertEquals(" message is not as expected ", message, info.getMessage()); + } + + private void setMessage(String message, LoggingEvent event) { + when(event.getRenderedMessage()).thenReturn(message); + } +} \ No newline at end of file diff --git a/plugins/alert-handlers/snmp-alerts/test/org/apache/cloudstack/alert/snmp/SnmpTrapAppenderTest.java b/plugins/alert-handlers/snmp-alerts/test/org/apache/cloudstack/alert/snmp/SnmpTrapAppenderTest.java new file mode 100644 index 000000000..2a65d90ac --- /dev/null +++ b/plugins/alert-handlers/snmp-alerts/test/org/apache/cloudstack/alert/snmp/SnmpTrapAppenderTest.java @@ -0,0 +1,86 @@ +// 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 org.apache.cloudstack.alert.snmp; + +import org.apache.log4j.spi.LoggingEvent; +import org.junit.Test; +import org.mockito.Mock; + +import java.util.List; + +import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.assertTrue; +import static org.mockito.Mockito.mock; + +public class SnmpTrapAppenderTest { + SnmpTrapAppender _appender = new SnmpTrapAppender(); + LoggingEvent _event = mock(LoggingEvent.class); + SnmpEnhancedPatternLayout _snmpEnhancedPatternLayout = mock(SnmpEnhancedPatternLayout.class); + @Mock + List snmpHelpers; + + @Test + public void appendTest() { + _appender.setSnmpManagerIpAddresses("10.1.1.1,10.1.1.2"); + _appender.setSnmpManagerPorts("162,164"); + _appender.setSnmpManagerCommunities("public,snmp"); + + _appender.setSnmpHelpers(); + assertEquals(" error snmpHelper list size not as expected ", _appender._snmpHelpers.size(), 2); + } + + @Test + public void InvalidInputTest() { + _appender.setSnmpManagerIpAddresses("10.1.1.1,10.1.1.2"); + _appender.setSnmpManagerPorts("162,164"); + _appender.setSnmpManagerCommunities("public"); + + _appender.setSnmpHelpers(); + assertTrue(" list was expected to be empty", _appender._snmpHelpers.isEmpty()); + } + + @Test + public void InvalidIpInputTest() { + _appender.setSnmpManagerIpAddresses("10.1.1,10.1.1.2"); + _appender.setSnmpManagerPorts("162,164"); + _appender.setSnmpManagerCommunities("public,snmp"); + + _appender.setSnmpHelpers(); + assertTrue(" list was expected to be empty", _appender._snmpHelpers.isEmpty()); + } + + @Test + public void InvalidPortInputTest() { + _appender.setSnmpManagerIpAddresses("10.1.1,10.1.1.2"); + _appender.setSnmpManagerPorts("162,164897489978"); + _appender.setSnmpManagerCommunities("public,snmp"); + + _appender.setSnmpHelpers(); + assertTrue(" list was expected to be empty", _appender._snmpHelpers.isEmpty()); + } + + @Test + public void mismatchListLengthInputTest() { + _appender.setSnmpManagerIpAddresses("10.1.1"); + _appender.setSnmpManagerPorts("162,164"); + _appender.setSnmpManagerCommunities("public,snmp"); + + _appender.setSnmpHelpers(); + assertTrue(" list was expected to be empty", _appender._snmpHelpers.isEmpty()); + } +} \ No newline at end of file diff --git a/plugins/alert-handlers/syslog-alerts/pom.xml b/plugins/alert-handlers/syslog-alerts/pom.xml new file mode 100644 index 000000000..21aa54a7b --- /dev/null +++ b/plugins/alert-handlers/syslog-alerts/pom.xml @@ -0,0 +1,40 @@ + + + + cloudstack-plugins + org.apache.cloudstack + 4.2.0-SNAPSHOT + ../../pom.xml + + 4.0.0 + Apache CloudStack Plugin - Syslog Alerts + cloud-plugin-syslog-alerts + + + + log4j + log4j + ${cs.log4j.version} + + + + \ No newline at end of file diff --git a/plugins/alert-handlers/syslog-alerts/src/org/apache/cloudstack/syslog/AlertsSyslogAppender.java b/plugins/alert-handlers/syslog-alerts/src/org/apache/cloudstack/syslog/AlertsSyslogAppender.java new file mode 100644 index 000000000..09563da22 --- /dev/null +++ b/plugins/alert-handlers/syslog-alerts/src/org/apache/cloudstack/syslog/AlertsSyslogAppender.java @@ -0,0 +1,336 @@ +// 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 org.apache.cloudstack.syslog; + +import com.cloud.utils.net.NetUtils; +import org.apache.log4j.AppenderSkeleton; +import org.apache.log4j.net.SyslogAppender; +import org.apache.log4j.spi.LoggingEvent; + +import java.net.InetAddress; +import java.net.UnknownHostException; +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.StringTokenizer; + +public class AlertsSyslogAppender extends AppenderSkeleton { + String _syslogHosts = null; + String _delimiter = ","; + List _syslogHostsList = null; + List _syslogAppenders = null; + private String _facility; + private String _pairDelimiter = "//"; + private String _keyValueDelimiter = "::"; + private int alertType = -1; + private long dataCenterId = 0; + private long podId = 0; + private long clusterId = 0; + private String sysMessage = null; + public static final int LENGTH_OF_STRING_MESSAGE_AND_KEY_VALUE_DELIMITER = 9; + public static final int LENGTH_OF_STRING_MESSAGE = 8; + public static final String MESSAGE_DELIMITER_STRING = " "; + //add the alertType in this array it its level needs to be set to critical + private static final int[] criticalAlerts = {7, 8, 9, 10, 11, 12, 13, 15, 16, 19, 20}; + private static final Map alertsMap; + + static { + Map aMap = new HashMap(27); + aMap.put(0, "availableMemory"); + aMap.put(1, "availableCpu"); + aMap.put(2, "availableStorage"); + aMap.put(3, "remainingStorageAllocated"); + aMap.put(4, "unallocatedVirtualNetworkpublicIp"); + aMap.put(5, "unallocatedPrivateIp"); + aMap.put(6, "availableSecondaryStorage"); + aMap.put(7, "host"); + aMap.put(8, "userVmState"); + aMap.put(9, "domainRouterVmState "); + aMap.put(10, "consoleProxyVmState"); + aMap.put(11, "routingConnection"); + aMap.put(12, "storageIssueSystemVms"); + aMap.put(13, "usageServerStatus"); + aMap.put(14, "managementNode"); + aMap.put(15, "domainRouterMigrate"); + aMap.put(16, "consoleProxyMigrate"); + aMap.put(17, "userVmMigrate"); + aMap.put(18, "unallocatedVlan"); + aMap.put(19, "ssvmStopped"); + aMap.put(20, "usageServerResult"); + aMap.put(21, "storageDelete"); + aMap.put(22, "updateResourceCount"); + aMap.put(23, "usageSanityResult"); + aMap.put(24, "unallocatedDirectAttachedPublicIp"); + aMap.put(25, "unallocatedLocalStorage"); + aMap.put(26, "resourceLimitExceeded"); + + alertsMap = Collections.unmodifiableMap(aMap); + } + + @Override + protected void append(LoggingEvent event) { + if (!isAsSevereAsThreshold(event.getLevel())) { + return; + } + + if (_syslogAppenders != null && !_syslogAppenders.isEmpty()) { + try { + String logMessage = event.getRenderedMessage(); + if (logMessage.contains("alertType") && logMessage.contains("message")) { + parseMessage(logMessage); + String syslogMessage = createSyslogMessage(); + + LoggingEvent syslogEvent = new LoggingEvent(event.getFQNOfLoggerClass(), event.getLogger(), + event.getLevel(), syslogMessage, null); + + for (SyslogAppender syslogAppender : _syslogAppenders) { + syslogAppender.append(syslogEvent); + } + } + } catch (Exception e) { + errorHandler.error(e.getMessage()); + } + } + } + + @Override + synchronized public void close() { + for (SyslogAppender syslogAppender : _syslogAppenders) { + syslogAppender.close(); + } + } + + @Override + public boolean requiresLayout() { + return true; + } + + void setSyslogAppenders() { + if (_syslogAppenders == null) { + _syslogAppenders = new ArrayList(); + } + + if (_syslogHosts == null || _syslogHosts.trim().isEmpty()) { + reset(); + return; + } + + _syslogHostsList = parseSyslogHosts(_syslogHosts); + + if (!validateIpAddresses()) { + reset(); + errorHandler.error(" Invalid format for the IP Addresses parameter "); + return; + } + + for (String syslogHost : _syslogHostsList) { + _syslogAppenders.add(new SyslogAppender(getLayout(), syslogHost, SyslogAppender.getFacility(_facility))); + } + } + + private List parseSyslogHosts(String syslogHosts) { + List result = new ArrayList(); + + final StringTokenizer tokenizer = new StringTokenizer(syslogHosts, _delimiter); + while (tokenizer.hasMoreTokens()) { + result.add(tokenizer.nextToken().trim()); + } + return result; + } + + private boolean validateIpAddresses() { + for (String ipAddress : _syslogHostsList) { + if (ipAddress.trim().equalsIgnoreCase("localhost")) { + continue; + } + if (!NetUtils.isValidIp(ipAddress)) { + return false; + } + } + return true; + } + + void parseMessage(String logMessage) { + final StringTokenizer messageSplitter = new StringTokenizer(logMessage, _pairDelimiter); + while (messageSplitter.hasMoreTokens()) { + final String pairToken = messageSplitter.nextToken(); + final StringTokenizer pairSplitter = new StringTokenizer(pairToken, _keyValueDelimiter); + String keyToken; + String valueToken; + + if (pairSplitter.hasMoreTokens()) { + keyToken = pairSplitter.nextToken().trim(); + } else { + break; + } + + if (pairSplitter.hasMoreTokens()) { + valueToken = pairSplitter.nextToken().trim(); + } else { + break; + } + + if (keyToken.equalsIgnoreCase("alertType") && !valueToken.equalsIgnoreCase("null")) { + alertType = Short.parseShort(valueToken); + } else if (keyToken.equalsIgnoreCase("dataCenterId") && !valueToken.equalsIgnoreCase("null")) { + dataCenterId = Long.parseLong(valueToken); + } else if (keyToken.equalsIgnoreCase("podId") && !valueToken.equalsIgnoreCase("null")) { + podId = Long.parseLong(valueToken); + } else if (keyToken.equalsIgnoreCase("clusterId") && !valueToken.equalsIgnoreCase("null")) { + clusterId = Long.parseLong(valueToken); + } else if (keyToken.equalsIgnoreCase("message") && !valueToken.equalsIgnoreCase("null")) { + sysMessage = getSyslogMessage(logMessage); + } + } + } + + String createSyslogMessage() { + StringBuilder message = new StringBuilder(); + message.append(severityOfAlert(alertType)).append(MESSAGE_DELIMITER_STRING); + InetAddress ip; + try { + ip = InetAddress.getLocalHost(); + } catch (UnknownHostException e) { + ip = null; + } + + if (ip != null) { + message.append(ip.getHostName()).append(MESSAGE_DELIMITER_STRING); + } else { + message.append("unknown" + MESSAGE_DELIMITER_STRING); + } + + if (alertType >= 0) { + message.append("alertType").append(_keyValueDelimiter).append(" ").append(alertsMap.get(alertType)) + .append(MESSAGE_DELIMITER_STRING); + if (dataCenterId != 0) { + message.append("dataCenterId").append(_keyValueDelimiter).append(" ").append(dataCenterId) + .append(MESSAGE_DELIMITER_STRING); + } + + if (podId != 0) { + message.append("podId").append(_keyValueDelimiter).append(" ").append(podId) + .append(MESSAGE_DELIMITER_STRING); + } + + if (clusterId != 0) { + message.append("clusterId").append(_keyValueDelimiter).append(" ").append(clusterId) + .append(MESSAGE_DELIMITER_STRING); + } + + if (sysMessage != null) { + message.append("message").append(_keyValueDelimiter).append(" ").append(sysMessage); + } else { + errorHandler.error(" What is the use of alert without message "); + } + } else { + errorHandler.error(" Invalid alert Type "); + } + + return message.toString(); + } + + private String getSyslogMessage(String message) { + int lastIndexOfKeyValueDelimiter = message.lastIndexOf(_keyValueDelimiter); + int lastIndexOfMessageInString = message.lastIndexOf("message"); + + if (lastIndexOfKeyValueDelimiter - lastIndexOfMessageInString <= + LENGTH_OF_STRING_MESSAGE_AND_KEY_VALUE_DELIMITER) { + return message.substring(lastIndexOfKeyValueDelimiter + _keyValueDelimiter.length()).trim(); + } else if (lastIndexOfMessageInString < lastIndexOfKeyValueDelimiter) { + return message.substring( + lastIndexOfMessageInString + _keyValueDelimiter.length() + LENGTH_OF_STRING_MESSAGE).trim(); + } + + return message.substring(message.lastIndexOf("message" + _keyValueDelimiter) + + LENGTH_OF_STRING_MESSAGE_AND_KEY_VALUE_DELIMITER).trim(); + } + + private void reset() { + _syslogAppenders.clear(); + } + + public void setFacility(String facility) { + if (facility == null) { + return; + } + + this._facility = facility; + if (_syslogAppenders != null && !_syslogAppenders.isEmpty()) { + for (SyslogAppender syslogAppender : _syslogAppenders) { + syslogAppender.setFacility(facility); + } + } + } + + private String severityOfAlert(int alertType) { + if (isCritical(alertType)) { + return "CRITICAL"; + } else { + return "WARN"; + } + } + + private boolean isCritical(int alertType) { + for (int type : criticalAlerts) { + if (type == alertType) { + return true; + } + } + return false; + } + + public String getFacility() { + return _facility; + } + + public String getSyslogHosts() { + return _syslogHosts; + } + + public void setSyslogHosts(String syslogHosts) { + this._syslogHosts = syslogHosts; + this.setSyslogAppenders(); + } + + public String getDelimiter() { + return _delimiter; + } + + public void setDelimiter(String delimiter) { + this._delimiter = delimiter; + } + + public String getPairDelimiter() { + return _pairDelimiter; + } + + public void setPairDelimiter(String pairDelimiter) { + this._pairDelimiter = pairDelimiter; + } + + public String getKeyValueDelimiter() { + return _keyValueDelimiter; + } + + public void setKeyValueDelimiter(String keyValueDelimiter) { + this._keyValueDelimiter = keyValueDelimiter; + } +} diff --git a/plugins/alert-handlers/syslog-alerts/test/org/apache/cloudstack/syslog/AlertsSyslogAppenderTest.java b/plugins/alert-handlers/syslog-alerts/test/org/apache/cloudstack/syslog/AlertsSyslogAppenderTest.java new file mode 100644 index 000000000..68585ee60 --- /dev/null +++ b/plugins/alert-handlers/syslog-alerts/test/org/apache/cloudstack/syslog/AlertsSyslogAppenderTest.java @@ -0,0 +1,61 @@ +// 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 org.apache.cloudstack.syslog; + +import org.apache.log4j.PatternLayout; +import org.junit.Before; +import org.junit.Test; + +import javax.naming.ConfigurationException; + +import static junit.framework.Assert.assertEquals; +import static junit.framework.Assert.assertTrue; + +public class AlertsSyslogAppenderTest { + AlertsSyslogAppender _appender = new AlertsSyslogAppender(); + + @Before + public void setUp() throws ConfigurationException { + _appender.setLayout(new PatternLayout("%-5p [%c{3}] (%t:%x) %m%n")); + _appender.setFacility("LOCAL6"); + } + + @Test + public void setSyslogAppendersTest() { + _appender.setSyslogHosts("10.1.1.1,10.1.1.2"); + assertEquals(" error Syslog Appenders list size not as expected ", 2, _appender._syslogAppenders.size()); + } + + @Test + public void setSyslogAppendersNegativeTest() { + //setting invalid IP for Syslog Hosts + _appender.setSyslogHosts("10.1.1."); + assertTrue(" list was expected to be empty", _appender._syslogAppenders.isEmpty()); + } + + @Test + public void appendTest() { + String message = "alertType:: 14 // dataCenterId:: 0 // podId:: 0 // clusterId:: null // message:: Management" + + " server node 127.0.0.1 is up"; + _appender.parseMessage(message); + String createdMessage = _appender.createSyslogMessage(); + assertTrue(" message is not as expected ", createdMessage.contains("alertType:: managementNode" + + AlertsSyslogAppender.MESSAGE_DELIMITER_STRING + "message:: Management server node 127.0.0.1 is up")); + assertTrue("severity level not as expected ", createdMessage.contains("WARN")); + } +} \ No newline at end of file diff --git a/plugins/api/discovery/pom.xml b/plugins/api/discovery/pom.xml index 1cfc5c2ea..5d9ad75ea 100644 --- a/plugins/api/discovery/pom.xml +++ b/plugins/api/discovery/pom.xml @@ -26,7 +26,7 @@ org.apache.cloudstack cloudstack-plugins - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT ../../pom.xml diff --git a/plugins/api/discovery/src/org/apache/cloudstack/api/command/user/discovery/ListApisCmd.java b/plugins/api/discovery/src/org/apache/cloudstack/api/command/user/discovery/ListApisCmd.java index 18c3976f3..5de04f01e 100644 --- a/plugins/api/discovery/src/org/apache/cloudstack/api/command/user/discovery/ListApisCmd.java +++ b/plugins/api/discovery/src/org/apache/cloudstack/api/command/user/discovery/ListApisCmd.java @@ -16,28 +16,29 @@ // under the License. package org.apache.cloudstack.api.command.user.discovery; -import com.cloud.user.User; -import com.cloud.user.UserContext; +import javax.inject.Inject; + import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.Parameter; -import org.apache.cloudstack.api.PlugService; import org.apache.cloudstack.api.ServerApiException; +import org.apache.cloudstack.api.response.ApiDiscoveryResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.discovery.ApiDiscoveryService; -import org.apache.cloudstack.api.response.ApiDiscoveryResponse; - import org.apache.log4j.Logger; +import com.cloud.user.User; +import com.cloud.user.UserContext; + @APICommand(name = "listApis", responseObject = ApiDiscoveryResponse.class, description = "lists all available apis on the server, provided by the Api Discovery plugin", since = "4.1.0") public class ListApisCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(ListApisCmd.class.getName()); private static final String s_name = "listapisresponse"; - @PlugService + @Inject ApiDiscoveryService _apiDiscoveryService; @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="API name") diff --git a/plugins/api/discovery/src/org/apache/cloudstack/api/response/ApiDiscoveryResponse.java b/plugins/api/discovery/src/org/apache/cloudstack/api/response/ApiDiscoveryResponse.java index 77484f0f7..ce7eb498b 100644 --- a/plugins/api/discovery/src/org/apache/cloudstack/api/response/ApiDiscoveryResponse.java +++ b/plugins/api/discovery/src/org/apache/cloudstack/api/response/ApiDiscoveryResponse.java @@ -47,6 +47,9 @@ public class ApiDiscoveryResponse extends BaseResponse { @SerializedName(ApiConstants.RESPONSE) @Param(description="api response fields", responseObject = ApiResponseResponse.class) private Set apiResponse; + @SerializedName(ApiConstants.TYPE) @Param(description="response field type") + private String type; + public ApiDiscoveryResponse(){ params = new HashSet(); apiResponse = new HashSet(); @@ -81,6 +84,7 @@ public void setAsync(Boolean isAsync) { this.isAsync = isAsync; } + public boolean getAsync() { return isAsync; } diff --git a/plugins/api/discovery/src/org/apache/cloudstack/api/response/ApiResponseResponse.java b/plugins/api/discovery/src/org/apache/cloudstack/api/response/ApiResponseResponse.java index b96295e12..1433879a6 100644 --- a/plugins/api/discovery/src/org/apache/cloudstack/api/response/ApiResponseResponse.java +++ b/plugins/api/discovery/src/org/apache/cloudstack/api/response/ApiResponseResponse.java @@ -16,11 +16,14 @@ // under the License. package org.apache.cloudstack.api.response; -import org.apache.cloudstack.api.ApiConstants; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; +import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseResponse; +import java.util.HashSet; +import java.util.Set; + public class ApiResponseResponse extends BaseResponse { @SerializedName(ApiConstants.NAME) @Param(description="the name of the api response field") private String name; @@ -31,6 +34,9 @@ public class ApiResponseResponse extends BaseResponse { @SerializedName(ApiConstants.TYPE) @Param(description="response field type") private String type; + @SerializedName(ApiConstants.RESPONSE) @Param(description="api response fields") + private Set apiResponse; + public void setName(String name) { this.name = name; } @@ -42,4 +48,11 @@ public void setDescription(String description) { public void setType(String type) { this.type = type; } + + public void addApiResponse(ApiResponseResponse childApiResponse) { + if(this.apiResponse == null) { + this.apiResponse = new HashSet(); + } + this.apiResponse.add(childApiResponse); + } } diff --git a/plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java b/plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java old mode 100644 new mode 100755 index bfd2719d8..2d7dbd186 --- a/plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java +++ b/plugins/api/discovery/src/org/apache/cloudstack/discovery/ApiDiscoveryServiceImpl.java @@ -20,119 +20,87 @@ import com.cloud.user.User; import com.cloud.utils.ReflectUtil; import com.cloud.utils.StringUtils; -import com.cloud.utils.component.Adapters; -import com.cloud.utils.component.ComponentLocator; +import com.cloud.utils.component.PluggableService; import com.google.gson.annotations.SerializedName; import org.apache.cloudstack.acl.APIChecker; -import org.apache.cloudstack.api.APICommand; -import org.apache.cloudstack.api.BaseCmd; -import org.apache.cloudstack.api.BaseAsyncCmd; -import org.apache.cloudstack.api.BaseAsyncCreateCmd; -import org.apache.cloudstack.api.BaseResponse; -import org.apache.cloudstack.api.Parameter; +import org.apache.cloudstack.api.*; import org.apache.cloudstack.api.command.user.discovery.ListApisCmd; import org.apache.cloudstack.api.response.ApiDiscoveryResponse; import org.apache.cloudstack.api.response.ApiParameterResponse; import org.apache.cloudstack.api.response.ApiResponseResponse; import org.apache.cloudstack.api.response.ListResponse; import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; +import javax.annotation.PostConstruct; import javax.ejb.Local; +import javax.inject.Inject; import java.lang.reflect.Field; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.HashSet; -import java.util.List; -import java.util.Map; -import java.util.Set; +import java.util.*; +@Component @Local(value = ApiDiscoveryService.class) public class ApiDiscoveryServiceImpl implements ApiDiscoveryService { private static final Logger s_logger = Logger.getLogger(ApiDiscoveryServiceImpl.class); - protected static Adapters s_apiAccessCheckers = null; + @Inject protected List _apiAccessCheckers = null; + @Inject protected List _services = null; private static Map s_apiNameDiscoveryResponseMap = null; protected ApiDiscoveryServiceImpl() { super(); + } + + @PostConstruct + void init() { if (s_apiNameDiscoveryResponseMap == null) { long startTime = System.nanoTime(); s_apiNameDiscoveryResponseMap = new HashMap(); - //TODO: Fix and use PluggableService to get the classes - Set> cmdClasses = ReflectUtil.getClassesWithAnnotation(APICommand.class, - new String[]{"org.apache.cloudstack.api", "com.cloud.api"}); + Set> cmdClasses = new HashSet>(); + for(PluggableService service: _services) { + s_logger.debug(String.format("getting api commands of service: %s", service.getClass().getName())); + cmdClasses.addAll(service.getCommands()); + } + cmdClasses.addAll(this.getCommands()); cacheResponseMap(cmdClasses); long endTime = System.nanoTime(); s_logger.info("Api Discovery Service: Annotation, docstrings, api relation graph processed in " + (endTime - startTime) / 1000000.0 + " ms"); } } - protected void cacheResponseMap(Set> cmdClasses) { + protected Map> cacheResponseMap(Set> cmdClasses) { Map> responseApiNameListMap = new HashMap>(); - for (Class cmdClass : cmdClasses) { + for(Class cmdClass: cmdClasses) { APICommand apiCmdAnnotation = cmdClass.getAnnotation(APICommand.class); - if (apiCmdAnnotation == null) + if (apiCmdAnnotation == null) { apiCmdAnnotation = cmdClass.getSuperclass().getAnnotation(APICommand.class); + } if (apiCmdAnnotation == null || !apiCmdAnnotation.includeInApiDoc() - || apiCmdAnnotation.name().isEmpty()) + || apiCmdAnnotation.name().isEmpty()) { continue; + } String apiName = apiCmdAnnotation.name(); + ApiDiscoveryResponse response = getCmdRequestMap(cmdClass, apiCmdAnnotation); + String responseName = apiCmdAnnotation.responseObject().getName(); if (!responseName.contains("SuccessResponse")) { - if (!responseApiNameListMap.containsKey(responseName)) + if (!responseApiNameListMap.containsKey(responseName)) { responseApiNameListMap.put(responseName, new ArrayList()); + } responseApiNameListMap.get(responseName).add(apiName); } - ApiDiscoveryResponse response = new ApiDiscoveryResponse(); - response.setName(apiName); - response.setDescription(apiCmdAnnotation.description()); - if (!apiCmdAnnotation.since().isEmpty()) - response.setSince(apiCmdAnnotation.since()); response.setRelated(responseName); + Field[] responseFields = apiCmdAnnotation.responseObject().getDeclaredFields(); - for (Field responseField : responseFields) { - SerializedName serializedName = responseField.getAnnotation(SerializedName.class); - if (serializedName != null) { - ApiResponseResponse responseResponse = new ApiResponseResponse(); - responseResponse.setName(serializedName.value()); - Param param = responseField.getAnnotation(Param.class); - if (param != null) - responseResponse.setDescription(param.description()); - responseResponse.setType(responseField.getType().getSimpleName().toLowerCase()); - response.addApiResponse(responseResponse); - } + for(Field responseField: responseFields) { + ApiResponseResponse responseResponse = getFieldResponseMap(responseField); + response.addApiResponse(responseResponse); } - Set fields = ReflectUtil.getAllFieldsForClass(cmdClass, - new Class[]{BaseCmd.class, BaseAsyncCmd.class, BaseAsyncCreateCmd.class}); - - boolean isAsync = ReflectUtil.isCmdClassAsync(cmdClass, - new Class[]{BaseAsyncCmd.class, BaseAsyncCreateCmd.class}); - - response.setAsync(isAsync); - - for (Field field : fields) { - Parameter parameterAnnotation = field.getAnnotation(Parameter.class); - if (parameterAnnotation != null - && parameterAnnotation.expose() - && parameterAnnotation.includeInApiDoc()) { - - ApiParameterResponse paramResponse = new ApiParameterResponse(); - paramResponse.setName(parameterAnnotation.name()); - paramResponse.setDescription(parameterAnnotation.description()); - paramResponse.setType(parameterAnnotation.type().toString().toLowerCase()); - paramResponse.setLength(parameterAnnotation.length()); - paramResponse.setRequired(parameterAnnotation.required()); - if (!parameterAnnotation.since().isEmpty()) - paramResponse.setSince(parameterAnnotation.since()); - paramResponse.setRelated(parameterAnnotation.entityType()[0].getName()); - response.addParam(paramResponse); - } - } response.setObjectName("api"); s_apiNameDiscoveryResponseMap.put(apiName, response); } @@ -140,7 +108,7 @@ protected void cacheResponseMap(Set> cmdClasses) { for (String apiName : s_apiNameDiscoveryResponseMap.keySet()) { ApiDiscoveryResponse response = s_apiNameDiscoveryResponseMap.get(apiName); Set processedParams = new HashSet(); - for (ApiParameterResponse param : response.getParams()) { + for (ApiParameterResponse param: response.getParams()) { if (responseApiNameListMap.containsKey(param.getRelated())) { List relatedApis = responseApiNameListMap.get(param.getRelated()); param.setRelated(StringUtils.join(relatedApis, ",")); @@ -160,6 +128,76 @@ protected void cacheResponseMap(Set> cmdClasses) { } s_apiNameDiscoveryResponseMap.put(apiName, response); } + return responseApiNameListMap; + } + + private ApiResponseResponse getFieldResponseMap(Field responseField) { + ApiResponseResponse responseResponse = new ApiResponseResponse(); + SerializedName serializedName = responseField.getAnnotation(SerializedName.class); + Param param = responseField.getAnnotation(Param.class); + if (serializedName != null && param != null) { + responseResponse.setName(serializedName.value()); + responseResponse.setDescription(param.description()); + responseResponse.setType(responseField.getType().getSimpleName().toLowerCase()); + //If response is not of primitive type - we have a nested entity + Class fieldClass = param.responseObject(); + if (fieldClass != null) { + Class superClass = fieldClass.getSuperclass(); + if (superClass != null) { + String superName = superClass.getName(); + if (superName.equals(BaseResponse.class.getName())) { + Field[] fields = fieldClass.getDeclaredFields(); + for (Field field : fields) { + ApiResponseResponse innerResponse = getFieldResponseMap(field); + if (innerResponse != null) { + responseResponse.addApiResponse(innerResponse); + } + } + } + } + } + } + return responseResponse; + } + + private ApiDiscoveryResponse getCmdRequestMap(Class cmdClass, APICommand apiCmdAnnotation) { + String apiName = apiCmdAnnotation.name(); + ApiDiscoveryResponse response = new ApiDiscoveryResponse(); + response.setName(apiName); + response.setDescription(apiCmdAnnotation.description()); + if (!apiCmdAnnotation.since().isEmpty()) { + response.setSince(apiCmdAnnotation.since()); + } + + + Set fields = ReflectUtil.getAllFieldsForClass(cmdClass, + new Class[]{BaseCmd.class, BaseAsyncCmd.class, BaseAsyncCreateCmd.class}); + + boolean isAsync = ReflectUtil.isCmdClassAsync(cmdClass, + new Class[]{BaseAsyncCmd.class, BaseAsyncCreateCmd.class}); + + response.setAsync(isAsync); + + for(Field field: fields) { + Parameter parameterAnnotation = field.getAnnotation(Parameter.class); + if (parameterAnnotation != null + && parameterAnnotation.expose() + && parameterAnnotation.includeInApiDoc()) { + + ApiParameterResponse paramResponse = new ApiParameterResponse(); + paramResponse.setName(parameterAnnotation.name()); + paramResponse.setDescription(parameterAnnotation.description()); + paramResponse.setType(parameterAnnotation.type().toString().toLowerCase()); + paramResponse.setLength(parameterAnnotation.length()); + paramResponse.setRequired(parameterAnnotation.required()); + if (!parameterAnnotation.since().isEmpty()) { + paramResponse.setSince(parameterAnnotation.since()); + } + paramResponse.setRelated(parameterAnnotation.entityType()[0].getName()); + response.addParam(paramResponse); + } + } + return response; } @Override @@ -167,11 +205,6 @@ public ListResponse listApis(User user, String name) { ListResponse response = new ListResponse(); List responseList = new ArrayList(); - if (s_apiAccessCheckers == null) { - ComponentLocator locator = ComponentLocator.getCurrentLocator(); - s_apiAccessCheckers = locator.getAdapters(APIChecker.class); - } - if (user == null) return null; @@ -179,7 +212,7 @@ public ListResponse listApis(User user, String name) { if (!s_apiNameDiscoveryResponseMap.containsKey(name)) return null; - for (APIChecker apiChecker : s_apiAccessCheckers) { + for (APIChecker apiChecker : _apiAccessCheckers) { try { apiChecker.checkAccess(user, name); } catch (Exception ex) { @@ -191,7 +224,7 @@ public ListResponse listApis(User user, String name) { } else { for (String apiName : s_apiNameDiscoveryResponseMap.keySet()) { boolean isAllowed = true; - for (APIChecker apiChecker : s_apiAccessCheckers) { + for (APIChecker apiChecker : _apiAccessCheckers) { try { apiChecker.checkAccess(user, apiName); } catch (Exception ex) { diff --git a/plugins/api/discovery/test/org/apache/cloudstack/discovery/ApiDiscoveryTest.java b/plugins/api/discovery/test/org/apache/cloudstack/discovery/ApiDiscoveryTest.java index a0e2a1391..afff746c8 100644 --- a/plugins/api/discovery/test/org/apache/cloudstack/discovery/ApiDiscoveryTest.java +++ b/plugins/api/discovery/test/org/apache/cloudstack/discovery/ApiDiscoveryTest.java @@ -18,11 +18,11 @@ import com.cloud.user.User; import com.cloud.user.UserVO; -import com.cloud.utils.component.Adapters; import java.util.*; import javax.naming.ConfigurationException; +import com.cloud.utils.component.PluggableService; import org.apache.cloudstack.acl.APIChecker; import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.command.user.discovery.ListApisCmd; @@ -36,9 +36,9 @@ import static org.mockito.Mockito.*; public class ApiDiscoveryTest { - - private static ApiDiscoveryServiceImpl _discoveryService = new ApiDiscoveryServiceImpl(); private static APIChecker _apiChecker = mock(APIChecker.class); + private static PluggableService _pluggableService = mock(PluggableService.class); + private static ApiDiscoveryServiceImpl _discoveryService = new ApiDiscoveryServiceImpl(); private static Class testCmdClass = ListApisCmd.class; private static User testUser; @@ -55,13 +55,18 @@ public static void setUp() throws ConfigurationException { testApiAsync = false; testUser = new UserVO(); + _discoveryService._apiAccessCheckers = (List) mock(List.class); + _discoveryService._services = (List) mock(List.class); + + when(_apiChecker.checkAccess(any(User.class), anyString())).thenReturn(true); + when(_pluggableService.getCommands()).thenReturn(new ArrayList>()); + when(_discoveryService._apiAccessCheckers.iterator()).thenReturn(Arrays.asList(_apiChecker).iterator()); + when(_discoveryService._services.iterator()).thenReturn(Arrays.asList(_pluggableService).iterator()); + Set> cmdClasses = new HashSet>(); cmdClasses.add(ListApisCmd.class); + _discoveryService.init(); _discoveryService.cacheResponseMap(cmdClasses); - _discoveryService.s_apiAccessCheckers = (Adapters) mock(Adapters.class); - - when(_apiChecker.checkAccess(any(User.class), anyString())).thenReturn(true); - when(_discoveryService.s_apiAccessCheckers.iterator()).thenReturn(Arrays.asList(_apiChecker).iterator()); } @Test @@ -78,7 +83,7 @@ public void verifyListSingleApi() throws Exception { @Test public void verifyListApis() throws Exception { ListResponse responses = (ListResponse) _discoveryService.listApis(testUser, null); - assertTrue("No. of response items > 1", responses.getCount() > 1); + assertTrue("No. of response items > 1", responses.getCount() == 1); for (ApiDiscoveryResponse response: responses.getResponses()) { assertFalse("API name is empty", response.getName().isEmpty()); assertFalse("API description is empty", response.getDescription().isEmpty()); diff --git a/plugins/api/rate-limit/pom.xml b/plugins/api/rate-limit/pom.xml index 1f0330916..5645f0b3a 100644 --- a/plugins/api/rate-limit/pom.xml +++ b/plugins/api/rate-limit/pom.xml @@ -23,7 +23,7 @@ org.apache.cloudstack cloudstack-plugins - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT ../../pom.xml diff --git a/plugins/api/rate-limit/src/org/apache/cloudstack/api/command/admin/ratelimit/ResetApiLimitCmd.java b/plugins/api/rate-limit/src/org/apache/cloudstack/api/command/admin/ratelimit/ResetApiLimitCmd.java index 58cab1865..7ec53163c 100644 --- a/plugins/api/rate-limit/src/org/apache/cloudstack/api/command/admin/ratelimit/ResetApiLimitCmd.java +++ b/plugins/api/rate-limit/src/org/apache/cloudstack/api/command/admin/ratelimit/ResetApiLimitCmd.java @@ -22,7 +22,6 @@ import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.Parameter; -import org.apache.cloudstack.api.PlugService; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.AccountResponse; import org.apache.cloudstack.api.response.ApiLimitResponse; @@ -30,18 +29,25 @@ import org.apache.cloudstack.ratelimit.ApiRateLimitService; import org.apache.log4j.Logger; +import com.cloud.configuration.Config; +import com.cloud.configuration.dao.ConfigurationDao; import com.cloud.user.Account; import com.cloud.user.UserContext; +import javax.inject.Inject; + @APICommand(name = "resetApiLimit", responseObject=ApiLimitResponse.class, description="Reset api count") public class ResetApiLimitCmd extends BaseCmd { private static final Logger s_logger = Logger.getLogger(ResetApiLimitCmd.class.getName()); private static final String s_name = "resetapilimitresponse"; - @PlugService + @Inject ApiRateLimitService _apiLimitService; + @Inject + ConfigurationDao _configDao; + ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @@ -88,6 +94,10 @@ public long getEntityOwnerId() { @Override public void execute(){ + boolean apiLimitEnabled = Boolean.parseBoolean(_configDao.getValue(Config.ApiLimitEnabled.key())); + if ( !apiLimitEnabled ){ + throw new ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, "This api is only available when api.throttling.enabled = true."); + } boolean result = _apiLimitService.resetApiLimit(this.accountId); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); diff --git a/plugins/api/rate-limit/src/org/apache/cloudstack/api/command/user/ratelimit/GetApiLimitCmd.java b/plugins/api/rate-limit/src/org/apache/cloudstack/api/command/user/ratelimit/GetApiLimitCmd.java index 2b7b8e6db..ba92e8b60 100644 --- a/plugins/api/rate-limit/src/org/apache/cloudstack/api/command/user/ratelimit/GetApiLimitCmd.java +++ b/plugins/api/rate-limit/src/org/apache/cloudstack/api/command/user/ratelimit/GetApiLimitCmd.java @@ -21,10 +21,10 @@ import org.apache.cloudstack.api.ACL; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; -import org.apache.cloudstack.api.PlugService; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.BaseCmd.CommandType; import org.apache.cloudstack.api.command.admin.ratelimit.ResetApiLimitCmd; @@ -36,6 +36,9 @@ import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.ratelimit.ApiRateLimitService; + +import com.cloud.configuration.Config; +import com.cloud.configuration.dao.ConfigurationDao; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.InsufficientCapacityException; import com.cloud.exception.InvalidParameterValueException; @@ -45,17 +48,19 @@ import com.cloud.user.UserContext; import com.cloud.utils.exception.CloudRuntimeException; +import javax.inject.Inject; + @APICommand(name = "getApiLimit", responseObject=ApiLimitResponse.class, description="Get API limit count for the caller") public class GetApiLimitCmd extends BaseCmd { private static final Logger s_logger = Logger.getLogger(GetApiLimitCmd.class.getName()); private static final String s_name = "getapilimitresponse"; - @PlugService + @Inject ApiRateLimitService _apiLimitService; - - + @Inject + ConfigurationDao _configDao; ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// @@ -78,6 +83,10 @@ public long getEntityOwnerId() { @Override public void execute(){ + boolean apiLimitEnabled = Boolean.parseBoolean(_configDao.getValue(Config.ApiLimitEnabled.key())); + if ( !apiLimitEnabled ){ + throw new ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, "This api is only available when api.throttling.enabled = true."); + } Account caller = UserContext.current().getCaller(); ApiLimitResponse response = _apiLimitService.searchApiLimit(caller); response.setResponseName(getCommandName()); diff --git a/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/ApiRateLimitService.java b/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/ApiRateLimitService.java index c5b715019..ad421b673 100644 --- a/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/ApiRateLimitService.java +++ b/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/ApiRateLimitService.java @@ -22,7 +22,6 @@ /** * Provide API rate limit service - * @author minc * */ public interface ApiRateLimitService extends PluggableService{ @@ -34,4 +33,6 @@ public interface ApiRateLimitService extends PluggableService{ public void setTimeToLive(int timeToLive); public void setMaxAllowed(int max); + + public void setEnabled(boolean enabled); } diff --git a/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/ApiRateLimitServiceImpl.java b/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/ApiRateLimitServiceImpl.java index 303b92da5..7d1b43ae6 100644 --- a/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/ApiRateLimitServiceImpl.java +++ b/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/ApiRateLimitServiceImpl.java @@ -20,6 +20,7 @@ import java.util.List; import java.util.Map; import javax.ejb.Local; +import javax.inject.Inject; import javax.naming.ConfigurationException; import net.sf.ehcache.Cache; @@ -28,22 +29,31 @@ import org.apache.log4j.Logger; import org.apache.cloudstack.acl.APIChecker; +import org.apache.cloudstack.api.ApiConstants.LDAPParams; import org.apache.cloudstack.api.command.admin.ratelimit.ResetApiLimitCmd; import org.apache.cloudstack.api.command.user.ratelimit.GetApiLimitCmd; import org.apache.cloudstack.api.response.ApiLimitResponse; +import com.cloud.configuration.Config; +import com.cloud.configuration.dao.ConfigurationDao; import com.cloud.exception.PermissionDeniedException; import com.cloud.exception.RequestLimitException; import com.cloud.user.Account; import com.cloud.user.AccountService; import com.cloud.user.User; import com.cloud.utils.component.AdapterBase; -import com.cloud.utils.component.Inject; +import org.springframework.stereotype.Component; +@Component @Local(value = APIChecker.class) public class ApiRateLimitServiceImpl extends AdapterBase implements APIChecker, ApiRateLimitService { private static final Logger s_logger = Logger.getLogger(ApiRateLimitServiceImpl.class); + /** + * True if api rate limiting is enabled + */ + private boolean enabled = false; + /** * Fixed time duration where api rate limit is set, in seconds */ @@ -59,31 +69,33 @@ public class ApiRateLimitServiceImpl extends AdapterBase implements APIChecker, @Inject AccountService _accountService; - + @Inject + ConfigurationDao _configDao; @Override public boolean configure(String name, Map params) throws ConfigurationException { super.configure(name, params); if (_store == null) { - // not configured yet, note that since this class is both adapter - // and pluggableService, so this method - // may be invoked twice in ComponentLocator. // get global configured duration and max values - Object duration = params.get("api.throttling.interval"); + String isEnabled = _configDao.getValue(Config.ApiLimitEnabled.key()); + if ( isEnabled != null ){ + enabled = Boolean.parseBoolean(isEnabled); + } + String duration = _configDao.getValue(Config.ApiLimitInterval.key()); if (duration != null) { - timeToLive = Integer.parseInt((String) duration); + timeToLive = Integer.parseInt(duration); } - Object maxReqs = params.get("api.throttling.max"); + String maxReqs = _configDao.getValue(Config.ApiLimitMax.key()); if (maxReqs != null) { - maxAllowed = Integer.parseInt((String) maxReqs); + maxAllowed = Integer.parseInt(maxReqs); } // create limit store EhcacheLimitStore cacheStore = new EhcacheLimitStore(); int maxElements = 10000; - Object cachesize = params.get("api.throttling.cachesize"); + String cachesize = _configDao.getValue(Config.ApiLimitCacheSize.key()); if ( cachesize != null ){ - maxElements = Integer.parseInt((String)cachesize); + maxElements = Integer.parseInt(cachesize); } CacheManager cm = CacheManager.create(); Cache cache = new Cache("api-limit-cache", maxElements, false, false, timeToLive, timeToLive); @@ -95,11 +107,8 @@ public boolean configure(String name, Map params) throws Configu } return true; - } - - @Override public ApiLimitResponse searchApiLimit(Account caller) { ApiLimitResponse response = new ApiLimitResponse(); @@ -139,7 +148,11 @@ public boolean resetApiLimit(Long accountId) { @Override - public boolean checkAccess(User user, String apiCommandName) throws PermissionDeniedException, RequestLimitException { + public boolean checkAccess(User user, String apiCommandName) throws PermissionDeniedException { + // check if api rate limiting is enabled or not + if (!enabled){ + return true; + } Long accountId = user.getAccountId(); Account account = _accountService.getAccount(accountId); if ( _accountService.isRootAdmin(account.getType())){ @@ -192,5 +205,11 @@ public void setMaxAllowed(int max) { } + @Override + public void setEnabled(boolean enabled) { + this.enabled = enabled; + + } + } diff --git a/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/EhcacheLimitStore.java b/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/EhcacheLimitStore.java index 659cf81b0..ee7c528bd 100644 --- a/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/EhcacheLimitStore.java +++ b/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/EhcacheLimitStore.java @@ -23,7 +23,6 @@ /** * A Limit store implementation using Ehcache. - * @author minc * */ public class EhcacheLimitStore implements LimitStore { diff --git a/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/LimitStore.java b/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/LimitStore.java index a5e086b30..373d9652e 100644 --- a/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/LimitStore.java +++ b/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/LimitStore.java @@ -20,7 +20,6 @@ /** * Interface to define how an api limit store should work. - * @author minc * */ public interface LimitStore { diff --git a/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/StoreEntry.java b/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/StoreEntry.java index 76e8a2d92..05a7029dc 100644 --- a/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/StoreEntry.java +++ b/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/StoreEntry.java @@ -18,7 +18,6 @@ /** * Interface for each entry in LimitStore. - * @author minc * */ public interface StoreEntry { diff --git a/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/StoreEntryImpl.java b/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/StoreEntryImpl.java index e8143e523..9f10fe68a 100644 --- a/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/StoreEntryImpl.java +++ b/plugins/api/rate-limit/src/org/apache/cloudstack/ratelimit/StoreEntryImpl.java @@ -20,7 +20,6 @@ /** * Implementation of limit store entry. - * @author minc * */ public class StoreEntryImpl implements StoreEntry { diff --git a/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/ApiRateLimitTest.java b/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/ApiRateLimitTest.java index 502b15cf3..3c6cadfc3 100644 --- a/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/ApiRateLimitTest.java +++ b/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/ApiRateLimitTest.java @@ -29,6 +29,8 @@ import org.junit.BeforeClass; import org.junit.Test; +import com.cloud.configuration.Config; +import com.cloud.configuration.dao.ConfigurationDao; import com.cloud.exception.RequestLimitException; import com.cloud.user.Account; import com.cloud.user.AccountService; @@ -43,12 +45,19 @@ public class ApiRateLimitTest { static ApiRateLimitServiceImpl _limitService = new ApiRateLimitServiceImpl(); static AccountService _accountService = mock(AccountService.class); + static ConfigurationDao _configDao = mock(ConfigurationDao.class); private static long acctIdSeq = 5L; private static Account testAccount; @BeforeClass public static void setUp() throws ConfigurationException { + when(_configDao.getValue(Config.ApiLimitInterval.key())).thenReturn(null); + when(_configDao.getValue(Config.ApiLimitMax.key())).thenReturn(null); + when(_configDao.getValue(Config.ApiLimitCacheSize.key())).thenReturn(null); + when(_configDao.getValue(Config.ApiLimitEnabled.key())).thenReturn("true"); // enable api rate limiting + _limitService._configDao = _configDao; + _limitService.configure("ApiRateLimitTest", Collections. emptyMap()); _limitService._accountService = _accountService; @@ -98,6 +107,8 @@ public void sequentialApiAccess() { + " accesses take less than a second to perform", isUnderLimit(key)); } + + @Test public void canDoReasonableNumberOfApiAccessPerSecond() throws Exception { int allowedRequests = 200; @@ -224,4 +235,26 @@ public void verifySearchCounter() throws Exception { } + @Test + public void disableApiLimit() throws Exception { + try { + int allowedRequests = 200; + _limitService.setMaxAllowed(allowedRequests); + _limitService.setTimeToLive(1); + _limitService.setEnabled(false); + + User key = createFakeUser(); + + for (int i = 0; i < allowedRequests + 1; i++) { + assertTrue("We should allow more than " + allowedRequests + " requests per second when api throttling is disabled.", + isUnderLimit(key)); + } + } finally { + _limitService.setEnabled(true); // enable api throttling to avoid + // impacting other testcases + } + + } + + } diff --git a/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/integration/APITest.java b/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/integration/APITest.java index 7701b1515..e75e852f0 100644 --- a/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/integration/APITest.java +++ b/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/integration/APITest.java @@ -37,8 +37,6 @@ /** * Base class for API Test * - * @author Min Chen - * */ public abstract class APITest { diff --git a/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/integration/LoginResponse.java b/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/integration/LoginResponse.java index 719f39c0a..61a178033 100644 --- a/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/integration/LoginResponse.java +++ b/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/integration/LoginResponse.java @@ -24,8 +24,6 @@ /** * Login Response object * - * @author Min Chen - * */ public class LoginResponse extends BaseResponse { diff --git a/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/integration/RateLimitIntegrationTest.java b/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/integration/RateLimitIntegrationTest.java index 72d354c6c..f9352333d 100644 --- a/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/integration/RateLimitIntegrationTest.java +++ b/plugins/api/rate-limit/test/org/apache/cloudstack/ratelimit/integration/RateLimitIntegrationTest.java @@ -34,9 +34,6 @@ /** * Test fixture to do integration rate limit test. * Currently we commented out this test suite since it requires a real MS and Db running. - * - * @author Min Chen - * */ public class RateLimitIntegrationTest extends APITest { diff --git a/plugins/deployment-planners/user-concentrated-pod/pom.xml b/plugins/deployment-planners/user-concentrated-pod/pom.xml index 788293561..df7c66063 100644 --- a/plugins/deployment-planners/user-concentrated-pod/pom.xml +++ b/plugins/deployment-planners/user-concentrated-pod/pom.xml @@ -23,7 +23,7 @@ org.apache.cloudstack cloudstack-plugins - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT ../../pom.xml diff --git a/plugins/deployment-planners/user-dispersing/pom.xml b/plugins/deployment-planners/user-dispersing/pom.xml index 33f6582e7..0e5dbd58e 100644 --- a/plugins/deployment-planners/user-dispersing/pom.xml +++ b/plugins/deployment-planners/user-dispersing/pom.xml @@ -23,7 +23,7 @@ org.apache.cloudstack cloudstack-plugins - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT ../../pom.xml diff --git a/plugins/event-bus/rabbitmq/pom.xml b/plugins/event-bus/rabbitmq/pom.xml index 6a47983a9..bd4d0977c 100644 --- a/plugins/event-bus/rabbitmq/pom.xml +++ b/plugins/event-bus/rabbitmq/pom.xml @@ -24,7 +24,7 @@ org.apache.cloudstack cloudstack-plugins - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT ../../pom.xml diff --git a/plugins/event-bus/rabbitmq/src/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java b/plugins/event-bus/rabbitmq/src/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java index 3a06c42d2..1c0c6bef6 100644 --- a/plugins/event-bus/rabbitmq/src/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java +++ b/plugins/event-bus/rabbitmq/src/org/apache/cloudstack/mom/rabbitmq/RabbitMQEventBus.java @@ -24,6 +24,7 @@ import org.apache.log4j.Logger; import com.cloud.utils.Ternary; +import com.cloud.utils.component.ManagerBase; import javax.ejb.Local; import javax.naming.ConfigurationException; @@ -36,16 +37,20 @@ import java.util.concurrent.Executors; @Local(value=EventBus.class) -public class RabbitMQEventBus implements EventBus { +public class RabbitMQEventBus extends ManagerBase implements EventBus { // details of AMQP server - private static String _amqpHost; - private static Integer _port; - private static String _username; - private static String _password; + private static String amqpHost; + private static Integer port; + private static String username; + private static String password; // AMQP exchange name where all CloudStack events will be published - private static String _amqpExchangeName; + private static String amqpExchangeName; + + private String name; + + private static Integer retryInterval; // hashmap to book keep the registered subscribers private static ConcurrentHashMap> _subscribers; @@ -57,59 +62,76 @@ public class RabbitMQEventBus implements EventBus { private static boolean _autoAck = true; private ExecutorService executorService; - private String _name; private static DisconnectHandler disconnectHandler; - private static Integer _retryInterval; private static final Logger s_logger = Logger.getLogger(RabbitMQEventBus.class); @Override public boolean configure(String name, Map params) throws ConfigurationException { - _amqpHost = (String) params.get("server"); - if (_amqpHost == null || _amqpHost.isEmpty()) { - throw new ConfigurationException("Unable to get the AMQP server details"); - } + try { + if (amqpHost == null || amqpHost.isEmpty()) { + throw new ConfigurationException("Unable to get the AMQP server details"); + } - _username = (String) params.get("username"); - if (_username == null || _username.isEmpty()) { - throw new ConfigurationException("Unable to get the username details"); - } + if (username == null || username.isEmpty()) { + throw new ConfigurationException("Unable to get the username details"); + } - _password = (String) params.get("password"); - if (_password == null || _password.isEmpty()) { - throw new ConfigurationException("Unable to get the password details"); - } + if (password == null || password.isEmpty()) { + throw new ConfigurationException("Unable to get the password details"); + } - _amqpExchangeName = (String) params.get("exchangename"); - if (_amqpExchangeName == null || _amqpExchangeName.isEmpty()) { - throw new ConfigurationException("Unable to get the _exchange details on the AMQP server"); - } + if (amqpExchangeName == null || amqpExchangeName.isEmpty()) { + throw new ConfigurationException("Unable to get the _exchange details on the AMQP server"); + } - try { - String portStr = (String) params.get("port"); - if (portStr == null || portStr.isEmpty()) { + if (port == null) { throw new ConfigurationException("Unable to get the port details of AMQP server"); } - _port = Integer.parseInt(portStr); - String retryIntervalStr = (String) params.get("retryinterval"); - if (retryIntervalStr == null || retryIntervalStr.isEmpty()) { - // default to 10s to try out reconnect - retryIntervalStr = "10000"; + if (retryInterval == null) { + retryInterval = 10000;// default to 10s to try out reconnect } - _retryInterval = Integer.parseInt(retryIntervalStr); + } catch (NumberFormatException e) { throw new ConfigurationException("Invalid port number/retry interval"); } _subscribers = new ConcurrentHashMap>(); - executorService = Executors.newCachedThreadPool(); disconnectHandler = new DisconnectHandler(); - _name = name; + return true; } + public void setServer(String amqpHost) { + this.amqpHost = amqpHost; + } + + public void setUsername(String username) { + this.username = username; + } + + public void setPassword(String password) { + this.password = password; + } + + public void setPort(Integer port) { + this.port = port; + } + + public void setName(String name) { + this.name = name; + } + + public void setExchange(String exchange) { + this.amqpExchangeName = exchange; + } + + public void setRetryInterval(Integer retryInterval) { + this.retryInterval = retryInterval; + } + /** Call to subscribe to interested set of events * * @param topic defines category and type of the events being subscribed to @@ -140,9 +162,9 @@ public UUID subscribe(EventTopic topic, EventSubscriber subscriber) throws Event Channel channel = createChannel(connection); // create a queue and bind it to the exchange with binding key formed from event topic - createExchange(channel, _amqpExchangeName); + createExchange(channel, amqpExchangeName); channel.queueDeclare(queueName, false, false, false, null); - channel.queueBind(queueName, _amqpExchangeName, bindingKey); + channel.queueBind(queueName, amqpExchangeName, bindingKey); // register a callback handler to receive the events that a subscriber subscribed to channel.basicConsume(queueName, _autoAck, queueName, @@ -215,8 +237,8 @@ public void publish(Event event) throws EventBusException { try { Connection connection = getConnection(); Channel channel = createChannel(connection); - createExchange(channel, _amqpExchangeName); - publishEventToExchange(channel, _amqpExchangeName, routingKey, eventDescription); + createExchange(channel, amqpExchangeName); + publishEventToExchange(channel, amqpExchangeName, routingKey, eventDescription); channel.close(); } catch (AlreadyClosedException e) { closeConnection(); @@ -314,11 +336,11 @@ private synchronized Connection getConnection() throws Exception { private synchronized Connection createConnection() throws Exception { try { ConnectionFactory factory = new ConnectionFactory(); - factory.setUsername(_username); - factory.setPassword(_password); + factory.setUsername(username); + factory.setPassword(password); factory.setVirtualHost("/"); - factory.setHost(_amqpHost); - factory.setPort(_port); + factory.setHost(amqpHost); + factory.setPort(port); Connection connection = factory.newConnection(); connection.addShutdownListener(disconnectHandler); _connection = connection; @@ -480,7 +502,7 @@ public void run() { while (!connected) { try { - Thread.sleep(_retryInterval); + Thread.sleep(retryInterval); } catch (InterruptedException ie) { // ignore timer interrupts } @@ -503,9 +525,9 @@ public void run() { * with binding key formed from event topic */ Channel channel = createChannel(connection); - createExchange(channel, _amqpExchangeName); + createExchange(channel, amqpExchangeName); channel.queueDeclare(subscriberId, false, false, false, null); - channel.queueBind(subscriberId, _amqpExchangeName, bindingKey); + channel.queueBind(subscriberId, amqpExchangeName, bindingKey); // register a callback handler to receive the events that a subscriber subscribed to channel.basicConsume(subscriberId, _autoAck, subscriberId, diff --git a/plugins/file-systems/netapp/pom.xml b/plugins/file-systems/netapp/pom.xml index e1c8866d1..0e6f427da 100644 --- a/plugins/file-systems/netapp/pom.xml +++ b/plugins/file-systems/netapp/pom.xml @@ -23,7 +23,7 @@ org.apache.cloudstack cloudstack-plugins - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT ../../pom.xml diff --git a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/AssociateLunCmd.java b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/AssociateLunCmd.java index 671b9f491..5d9ad078c 100644 --- a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/AssociateLunCmd.java +++ b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/AssociateLunCmd.java @@ -18,6 +18,8 @@ import java.rmi.ServerException; +import javax.inject.Inject; + import org.apache.log4j.Logger; import org.apache.cloudstack.api.ApiConstants; @@ -30,7 +32,7 @@ import com.cloud.netapp.NetappManager; import com.cloud.server.ManagementService; import com.cloud.server.api.response.netapp.AssociateLunCmdResponse; -import com.cloud.utils.component.ComponentLocator; + @APICommand(name = "associateLun", description="Associate a LUN with a guest IQN", responseObject = AssociateLunCmdResponse.class) public class AssociateLunCmd extends BaseCmd { @@ -40,27 +42,27 @@ public class AssociateLunCmd extends BaseCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - + @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, required = true, description="LUN name.") private String lunName; - + @Parameter(name=ApiConstants.IQN, type=CommandType.STRING, required = true, description="Guest IQN to which the LUN associate.") private String guestIqn; - - + + /////////////////////////////////////////////////// /////////////////// Accessors /////////////////////// ///////////////////////////////////////////////////// - - + + public String getLunName() { return lunName; } - + public String getGuestIQN() { return guestIqn; } - + ///////////////////////////////////////////////////// /////////////// API Implementation/////////////////// ///////////////////////////////////////////////////// @@ -69,12 +71,12 @@ public String getGuestIQN() { public String getCommandName() { return s_name; } - + + @Inject NetappManager netappMgr; + @Override public void execute(){ - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - NetappManager netappMgr = locator.getManager(NetappManager.class); - + try { AssociateLunCmdResponse response = new AssociateLunCmdResponse(); String returnVals[] = null; @@ -97,5 +99,5 @@ public long getEntityOwnerId() { // TODO Auto-generated method stub return 0; } - + } diff --git a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/CreateLunCmd.java b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/CreateLunCmd.java index fde0dc337..a0c19833a 100644 --- a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/CreateLunCmd.java +++ b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/CreateLunCmd.java @@ -18,6 +18,8 @@ import java.rmi.ServerException; +import javax.inject.Inject; + import org.apache.log4j.Logger; import org.apache.cloudstack.api.ApiConstants; @@ -34,38 +36,37 @@ import com.cloud.netapp.NetappManager; import com.cloud.server.ManagementService; import com.cloud.server.api.response.netapp.CreateLunCmdResponse; -import com.cloud.utils.component.ComponentLocator; + @APICommand(name = "createLunOnFiler", description="Create a LUN from a pool", responseObject = CreateLunCmdResponse.class) public class CreateLunCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(CreateLunCmd.class.getName()); private static final String s_name = "createlunresponse"; - + ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - + @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, required = true, description="pool name.") private String poolName; - + @Parameter(name=ApiConstants.SIZE, type=CommandType.LONG, required = true, description="LUN size.") private long size; - + public String getPoolName() { return poolName; } - + public long getLunSize() { return size; } + @Inject NetappManager netappMgr; @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException { - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - NetappManager netappMgr = locator.getManager(NetappManager.class); - + try { CreateLunCmdResponse response = new CreateLunCmdResponse(); String returnVals[] = null; @@ -81,7 +82,7 @@ public void execute() throws ResourceUnavailableException, } catch (InvalidParameterValueException e) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.toString()); } - + } @Override @@ -95,5 +96,5 @@ public long getEntityOwnerId() { // TODO Auto-generated method stub return 0; } - + } diff --git a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/CreateVolumeOnFilerCmd.java b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/CreateVolumeOnFilerCmd.java index 5ca187d84..56e944163 100644 --- a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/CreateVolumeOnFilerCmd.java +++ b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/CreateVolumeOnFilerCmd.java @@ -19,6 +19,8 @@ import java.net.UnknownHostException; import java.rmi.ServerException; +import javax.inject.Inject; + import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; @@ -33,7 +35,7 @@ import com.cloud.netapp.NetappManager; import com.cloud.server.ManagementService; import com.cloud.server.api.response.netapp.CreateVolumeOnFilerCmdResponse; -import com.cloud.utils.component.ComponentLocator; + @APICommand(name = "createVolumeOnFiler", description="Create a volume", responseObject = CreateVolumeOnFilerCmdResponse.class) public class CreateVolumeOnFilerCmd extends BaseCmd { @@ -41,67 +43,69 @@ public class CreateVolumeOnFilerCmd extends BaseCmd { @Parameter(name=ApiConstants.IP_ADDRESS, type=CommandType.STRING, required = true, description="ip address.") private String ipAddress; - + @Parameter(name=ApiConstants.AGGREGATE_NAME, type=CommandType.STRING, required = true, description="aggregate name.") private String aggrName; @Parameter(name=ApiConstants.POOL_NAME, type=CommandType.STRING, required = true, description="pool name.") private String poolName; - + @Parameter(name=ApiConstants.VOLUME_NAME, type=CommandType.STRING, required = true, description="volume name.") private String volName; - + @Parameter(name=ApiConstants.SIZE, type=CommandType.INTEGER, required = true, description="volume size.") private Integer volSize; - + @Parameter(name=ApiConstants.SNAPSHOT_POLICY, type=CommandType.STRING, required = false, description="snapshot policy.") private String snapshotPolicy; - + @Parameter(name=ApiConstants.SNAPSHOT_RESERVATION, type=CommandType.INTEGER, required = false, description="snapshot reservation.") private Integer snapshotReservation; - + @Parameter(name=ApiConstants.USERNAME, type=CommandType.STRING, required = true, description="user name.") private String userName; - + @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, required = true, description="password.") private String password; - + public String getIpAddress() { return ipAddress; } - + public String getAggrName() { return aggrName; } - + public String getPoolName() { return poolName; } - + public String volName() { return volName; } - + public Integer getVolSize() { return volSize; } - + public String getSnapshotPolicy() { return snapshotPolicy; } - + public Integer getSnapshotReservation() { return snapshotReservation; } - + public String getUserName() { return userName; } - + public String getPassword() { return password; } + + @Inject NetappManager netappMgr; @Override public void execute() throws ResourceUnavailableException, @@ -110,13 +114,10 @@ public void execute() throws ResourceUnavailableException, //param checks if(snapshotReservation != null && (snapshotReservation<0 || snapshotReservation>100)) throw new InvalidParameterValueException("Invalid snapshot reservation"); - - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - NetappManager netappMgr = locator.getManager(NetappManager.class); - + StringBuilder s = new StringBuilder(getVolSize().toString()); s.append("g"); - + try { netappMgr.createVolumeOnFiler(ipAddress, aggrName, poolName, volName, s.toString(), snapshotPolicy, snapshotReservation, userName, password); CreateVolumeOnFilerCmdResponse response = new CreateVolumeOnFilerCmdResponse(); @@ -129,7 +130,7 @@ public void execute() throws ResourceUnavailableException, } catch (UnknownHostException e) { throw new ServerApiException(ApiErrorCode.PARAM_ERROR, e.toString()); } - + } @Override @@ -143,5 +144,5 @@ public long getEntityOwnerId() { // TODO Auto-generated method stub return 0; } - + } diff --git a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/CreateVolumePoolCmd.java b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/CreateVolumePoolCmd.java index 107f6b058..a83b2c965 100644 --- a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/CreateVolumePoolCmd.java +++ b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/CreateVolumePoolCmd.java @@ -16,6 +16,8 @@ // under the License. package com.cloud.api.commands.netapp; +import javax.inject.Inject; + import org.apache.log4j.Logger; import org.apache.cloudstack.api.ApiConstants; @@ -32,7 +34,7 @@ import com.cloud.netapp.NetappManager; import com.cloud.server.ManagementService; import com.cloud.server.api.response.netapp.CreateVolumePoolCmdResponse; -import com.cloud.utils.component.ComponentLocator; + @APICommand(name = "createPool", description="Create a pool", responseObject = CreateVolumePoolCmdResponse.class) public class CreateVolumePoolCmd extends BaseCmd { @@ -43,22 +45,21 @@ public class CreateVolumePoolCmd extends BaseCmd { private String poolName; @Parameter(name=ApiConstants.ALGORITHM, type=CommandType.STRING, required = true, description="algorithm.") private String algorithm; - + public String getPoolName() { return poolName; } - + public String getAlgorithm() { return algorithm; } + @Inject NetappManager netappMgr; @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException { - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - NetappManager netappMgr = locator.getManager(NetappManager.class); - + try { CreateVolumePoolCmdResponse response = new CreateVolumePoolCmdResponse(); netappMgr.createPool(getPoolName(), getAlgorithm()); @@ -67,7 +68,7 @@ public void execute() throws ResourceUnavailableException, } catch (InvalidParameterValueException e) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.toString()); } - + } @Override @@ -81,5 +82,5 @@ public long getEntityOwnerId() { // TODO Auto-generated method stub return 0; } - + } diff --git a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DeleteVolumePoolCmd.java b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DeleteVolumePoolCmd.java index a70b6d4a0..f17c61ca9 100644 --- a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DeleteVolumePoolCmd.java +++ b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DeleteVolumePoolCmd.java @@ -17,6 +17,8 @@ package com.cloud.api.commands.netapp; +import javax.inject.Inject; + import org.apache.log4j.Logger; import org.apache.cloudstack.api.ApiConstants; @@ -32,24 +34,23 @@ import com.cloud.exception.ResourceInUseException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.netapp.NetappManager; -import com.cloud.server.ManagementService; import com.cloud.server.api.response.netapp.DeleteVolumePoolCmdResponse; -import com.cloud.utils.component.ComponentLocator; + @APICommand(name = "deletePool", description="Delete a pool", responseObject = DeleteVolumePoolCmdResponse.class) public class DeleteVolumePoolCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(DeleteVolumePoolCmd.class.getName()); private static final String s_name = "deletepoolresponse"; - + @Parameter(name=ApiConstants.POOL_NAME, type=CommandType.STRING, required = true, description="pool name.") private String poolName; + + @Inject NetappManager netappMgr; @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException { - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - NetappManager netappMgr = locator.getManager(NetappManager.class); try { netappMgr.deletePool(poolName); DeleteVolumePoolCmdResponse response = new DeleteVolumePoolCmdResponse(); @@ -73,5 +74,5 @@ public long getEntityOwnerId() { // TODO Auto-generated method stub return 0; } - + } diff --git a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DestroyLunCmd.java b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DestroyLunCmd.java index 1b3e6bc84..f08defc01 100644 --- a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DestroyLunCmd.java +++ b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DestroyLunCmd.java @@ -18,6 +18,8 @@ import java.rmi.ServerException; +import javax.inject.Inject; + import org.apache.log4j.Logger; import org.apache.cloudstack.api.ApiConstants; @@ -34,23 +36,22 @@ import com.cloud.netapp.NetappManager; import com.cloud.server.ManagementService; import com.cloud.server.api.response.netapp.DeleteLUNCmdResponse; -import com.cloud.utils.component.ComponentLocator; + @APICommand(name = "destroyLunOnFiler", description="Destroy a LUN", responseObject = DeleteLUNCmdResponse.class) public class DestroyLunCmd extends BaseCmd { - + public static final Logger s_logger = Logger.getLogger(DestroyLunCmd.class.getName()); private static final String s_name = "destroylunresponse"; @Parameter(name=ApiConstants.PATH, type=CommandType.STRING, required = true, description="LUN path.") private String path; + @Inject NetappManager netappMgr; @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException { - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - NetappManager netappMgr = locator.getManager(NetappManager.class); try { netappMgr.destroyLunOnFiler(path); DeleteLUNCmdResponse response = new DeleteLUNCmdResponse(); @@ -74,5 +75,5 @@ public long getEntityOwnerId() { // TODO Auto-generated method stub return 0; } - + } diff --git a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DestroyVolumeOnFilerCmd.java b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DestroyVolumeOnFilerCmd.java index 21e10b014..05413701c 100644 --- a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DestroyVolumeOnFilerCmd.java +++ b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DestroyVolumeOnFilerCmd.java @@ -18,6 +18,8 @@ import java.rmi.ServerException; +import javax.inject.Inject; + import org.apache.cloudstack.api.*; import org.apache.log4j.Logger; @@ -29,31 +31,30 @@ import com.cloud.exception.ResourceInUseException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.netapp.NetappManager; -import com.cloud.server.ManagementService; import com.cloud.server.api.response.netapp.DeleteVolumeOnFilerCmdResponse; -import com.cloud.utils.component.ComponentLocator; + @APICommand(name = "destroyVolumeOnFiler", description="Destroy a Volume", responseObject = DeleteVolumeOnFilerCmdResponse.class) public class DestroyVolumeOnFilerCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(DestroyVolumeOnFilerCmd.class.getName()); private static final String s_name = "destroyvolumeresponse"; - + @Parameter(name=ApiConstants.AGGREGATE_NAME, type=CommandType.STRING, required = true, description="aggregate name.") private String aggrName; - + @Parameter(name=ApiConstants.IP_ADDRESS, type=CommandType.STRING, required = true, description="ip address.") private String ipAddr; - + @Parameter(name=ApiConstants.VOLUME_NAME, type=CommandType.STRING, required = true, description="volume name.") private String volumeName; - - + + @Inject NetappManager netappMgr; + + @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException { - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - NetappManager netappMgr = locator.getManager(NetappManager.class); try { netappMgr.destroyVolumeOnFiler(ipAddr, aggrName, volumeName); DeleteVolumeOnFilerCmdResponse response = new DeleteVolumeOnFilerCmdResponse(); @@ -66,7 +67,7 @@ public void execute() throws ResourceUnavailableException, } catch (ServerException e) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.toString()); } - + } @Override @@ -80,5 +81,5 @@ public long getEntityOwnerId() { // TODO Auto-generated method stub return 0; } - + } \ No newline at end of file diff --git a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DissociateLunCmd.java b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DissociateLunCmd.java index f373c65be..ac6dbf0b5 100644 --- a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DissociateLunCmd.java +++ b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/DissociateLunCmd.java @@ -18,6 +18,8 @@ import java.rmi.ServerException; +import javax.inject.Inject; + import org.apache.cloudstack.api.*; import org.apache.log4j.Logger; @@ -30,7 +32,7 @@ import com.cloud.netapp.NetappManager; import com.cloud.server.ManagementService; import com.cloud.server.api.response.netapp.DissociateLunCmdResponse; -import com.cloud.utils.component.ComponentLocator; + @APICommand(name = "dissociateLun", description="Dissociate a LUN", responseObject = DissociateLunCmdResponse.class) public class DissociateLunCmd extends BaseCmd { @@ -39,16 +41,15 @@ public class DissociateLunCmd extends BaseCmd { @Parameter(name=ApiConstants.PATH, type=CommandType.STRING, required = true, description="LUN path.") private String path; - + @Parameter(name=ApiConstants.IQN, type=CommandType.STRING, required = true, description="Guest IQN.") private String guestIQN; - + + @Inject NetappManager netappMgr; @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException { - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - NetappManager netappMgr = locator.getManager(NetappManager.class); try { netappMgr.disassociateLun(guestIQN, path); DissociateLunCmdResponse response = new DissociateLunCmdResponse(); diff --git a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ListLunsCmd.java b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ListLunsCmd.java index 61b81db90..90bc5f3f4 100644 --- a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ListLunsCmd.java +++ b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ListLunsCmd.java @@ -19,6 +19,8 @@ import java.util.ArrayList; import java.util.List; +import javax.inject.Inject; + import org.apache.log4j.Logger; import org.apache.cloudstack.api.ApiConstants; @@ -37,10 +39,10 @@ import com.cloud.netapp.NetappManager; import com.cloud.server.ManagementService; import com.cloud.server.api.response.netapp.ListLunsCmdResponse; -import com.cloud.utils.component.ComponentLocator; + @APICommand(name = "listLunsOnFiler", description="List LUN", responseObject = ListLunsCmdResponse.class) -public class ListLunsCmd extends BaseCmd +public class ListLunsCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(ListLunsCmd.class.getName()); private static final String s_name = "listlunresponse"; @@ -48,12 +50,11 @@ public class ListLunsCmd extends BaseCmd @Parameter(name=ApiConstants.POOL_NAME, type=CommandType.STRING, required = true, description="pool name.") private String poolName; + @Inject NetappManager netappMgr; @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException { - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - NetappManager netappMgr = locator.getManager(NetappManager.class); try { List lunList = netappMgr.listLunsOnFiler(poolName); ListResponse listResponse = new ListResponse(); @@ -72,7 +73,7 @@ public void execute() throws ResourceUnavailableException, this.setResponseObject(listResponse); } catch (InvalidParameterValueException e) { throw new ServerApiException(ApiErrorCode.PARAM_ERROR, e.toString()); - } + } } @Override diff --git a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ListVolumePoolsCmd.java b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ListVolumePoolsCmd.java index 882cf1b2b..fd9b17d9e 100644 --- a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ListVolumePoolsCmd.java +++ b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ListVolumePoolsCmd.java @@ -19,6 +19,8 @@ import java.util.ArrayList; import java.util.List; +import javax.inject.Inject; + import org.apache.log4j.Logger; import org.apache.cloudstack.api.ApiErrorCode; @@ -35,20 +37,19 @@ import com.cloud.netapp.PoolVO; import com.cloud.server.ManagementService; import com.cloud.server.api.response.netapp.ListVolumePoolsCmdResponse; -import com.cloud.utils.component.ComponentLocator; + @APICommand(name = "listPools", description="List Pool", responseObject = ListVolumePoolsCmdResponse.class) public class ListVolumePoolsCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(ListVolumePoolsCmd.class.getName()); private static final String s_name = "listpoolresponse"; + @Inject NetappManager netappMgr; @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException { - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - NetappManager netappMgr = locator.getManager(NetappManager.class); try { List poolList = netappMgr.listPools(); ListResponse listResponse = new ListResponse(); @@ -66,8 +67,8 @@ public void execute() throws ResourceUnavailableException, this.setResponseObject(listResponse); } catch (InvalidParameterValueException e) { throw new ServerApiException(ApiErrorCode.PARAM_ERROR, e.toString()); - } - + } + } @Override diff --git a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ListVolumesOnFilerCmd.java b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ListVolumesOnFilerCmd.java index 3cc98f43d..ac839ba58 100644 --- a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ListVolumesOnFilerCmd.java +++ b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ListVolumesOnFilerCmd.java @@ -19,6 +19,8 @@ import java.util.ArrayList; import java.util.List; +import javax.inject.Inject; + import org.apache.cloudstack.api.*; import org.apache.log4j.Logger; @@ -33,23 +35,22 @@ import com.cloud.netapp.NetappVolumeVO; import com.cloud.server.ManagementService; import com.cloud.server.api.response.netapp.ListVolumesOnFilerCmdResponse; -import com.cloud.utils.component.ComponentLocator; + @APICommand(name = "listVolumesOnFiler", description="List Volumes", responseObject = ListVolumesOnFilerCmdResponse.class) public class ListVolumesOnFilerCmd extends BaseCmd { public static final Logger s_logger = Logger.getLogger(ListVolumesOnFilerCmd.class.getName()); private static final String s_name = "listvolumesresponse"; - + @Parameter(name=ApiConstants.POOL_NAME, type=CommandType.STRING, required = true, description="pool name.") private String poolName; + + @Inject NetappManager netappMgr; @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException { - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - NetappManager netappMgr = locator.getManager(NetappManager.class); - try { List volumes = netappMgr.listVolumesOnFiler(poolName); ListResponse listResponse = new ListResponse(); @@ -73,7 +74,7 @@ public void execute() throws ResourceUnavailableException, } catch (InvalidParameterValueException e) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.toString()); } - + } @Override diff --git a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ModifyVolumePoolCmd.java b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ModifyVolumePoolCmd.java index 3e32caebe..268345a46 100644 --- a/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ModifyVolumePoolCmd.java +++ b/plugins/file-systems/netapp/src/com/cloud/api/commands/netapp/ModifyVolumePoolCmd.java @@ -17,6 +17,8 @@ package com.cloud.api.commands.netapp; +import javax.inject.Inject; + import org.apache.log4j.Logger; import org.apache.cloudstack.api.ApiConstants; @@ -29,9 +31,8 @@ import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.netapp.NetappManager; -import com.cloud.server.ManagementService; import com.cloud.server.api.response.netapp.ModifyVolumePoolCmdResponse; -import com.cloud.utils.component.ComponentLocator; + @APICommand(name = "modifyPool", description="Modify pool", responseObject = ModifyVolumePoolCmdResponse.class) public class ModifyVolumePoolCmd extends BaseCmd { @@ -43,14 +44,13 @@ public class ModifyVolumePoolCmd extends BaseCmd { @Parameter(name=ApiConstants.ALGORITHM, type=CommandType.STRING, required = true, description="algorithm.") private String algorithm; + + @Inject NetappManager netappMgr; @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException { - ComponentLocator locator = ComponentLocator.getLocator(ManagementService.Name); - NetappManager netappMgr = locator.getManager(NetappManager.class); - netappMgr.modifyPool(poolName, algorithm); ModifyVolumePoolCmdResponse response = new ModifyVolumePoolCmdResponse(); diff --git a/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManager.java b/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManager.java index 7216c50f4..1ee87f1a8 100644 --- a/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManager.java +++ b/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManager.java @@ -24,8 +24,9 @@ import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceInUseException; import com.cloud.utils.component.Manager; +import com.cloud.utils.component.PluggableService; -public interface NetappManager extends Manager { +public interface NetappManager extends Manager, PluggableService { enum AlgorithmType { RoundRobin, LeastFull diff --git a/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManagerImpl.java b/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManagerImpl.java index 1fdd25026..8f7b6d8df 100644 --- a/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManagerImpl.java +++ b/plugins/file-systems/netapp/src/com/cloud/netapp/NetappManagerImpl.java @@ -17,6 +17,7 @@ package com.cloud.netapp; import java.io.IOException; +import java.lang.Override; import java.net.UnknownHostException; import java.rmi.ServerException; import java.util.ArrayList; @@ -27,6 +28,7 @@ import java.util.StringTokenizer; import javax.ejb.Local; +import javax.inject.Inject; import javax.naming.ConfigurationException; import netapp.manage.NaAPIFailedException; @@ -37,25 +39,26 @@ import netapp.manage.NaServer; import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; +import com.cloud.api.commands.netapp.*; import com.cloud.exception.InvalidParameterValueException; import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceInUseException; import com.cloud.netapp.dao.LunDao; import com.cloud.netapp.dao.PoolDao; import com.cloud.netapp.dao.VolumeDao; -import com.cloud.utils.component.Inject; +import com.cloud.utils.component.ManagerBase; import com.cloud.utils.db.DB; import com.cloud.utils.db.Transaction; import com.cloud.utils.exception.CloudRuntimeException; +@Component @Local(value = { NetappManager.class }) -public class NetappManagerImpl implements NetappManager +public class NetappManagerImpl extends ManagerBase implements NetappManager { public enum Algorithm { roundrobin,leastfull } - protected String _name; - public static final Logger s_logger = Logger.getLogger(NetappManagerImpl.class.getName()); @Inject public VolumeDao _volumeDao; @Inject public PoolDao _poolDao; @@ -122,7 +125,25 @@ private NaServer getServer(String serverIp, String userName, String password) th return s; } - + + @Override + public List> getCommands() { + List> cmdList = new ArrayList>(); + cmdList.add(CreateLunCmd.class); + cmdList.add(ListLunsCmd.class); + cmdList.add(DissociateLunCmd.class); + cmdList.add(CreateVolumeOnFilerCmd.class); + cmdList.add(ModifyVolumePoolCmd.class); + cmdList.add(ListVolumesOnFilerCmd.class); + cmdList.add(ListVolumePoolsCmd.class); + cmdList.add(DestroyLunCmd.class); + cmdList.add(CreateVolumePoolCmd.class); + cmdList.add(DeleteVolumePoolCmd.class); + cmdList.add(AssociateLunCmd.class); + cmdList.add(DestroyVolumeOnFilerCmd.class); + return cmdList; + } + @Override public void modifyPool(String poolName, String algorithm) throws InvalidParameterValueException { @@ -1015,26 +1036,9 @@ public String[] associateLun(String guestIqn, String lunName) throws ServerExcep public boolean configure(String name, Map params) throws ConfigurationException { - _name = name; _netappAllocator = new NetappDefaultAllocatorImpl( this ); return true; } - - @Override - public String getName() { - return _name; - } - - @Override - public boolean start() { - return true; - } - - @Override - public boolean stop() { - return true; - } - } diff --git a/plugins/file-systems/netapp/src/com/cloud/netapp/dao/LunDaoImpl.java b/plugins/file-systems/netapp/src/com/cloud/netapp/dao/LunDaoImpl.java index 9cc67b7e8..0218c9928 100644 --- a/plugins/file-systems/netapp/src/com/cloud/netapp/dao/LunDaoImpl.java +++ b/plugins/file-systems/netapp/src/com/cloud/netapp/dao/LunDaoImpl.java @@ -21,6 +21,7 @@ import javax.ejb.Local; import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; import com.cloud.netapp.LunVO; import com.cloud.netapp.NetappVolumeVO; @@ -30,6 +31,7 @@ import com.cloud.utils.db.SearchBuilder; import com.cloud.utils.db.SearchCriteria; +@Component @Local(value={LunDao.class}) public class LunDaoImpl extends GenericDaoBase implements LunDao { private static final Logger s_logger = Logger.getLogger(PoolDaoImpl.class); diff --git a/plugins/file-systems/netapp/src/com/cloud/netapp/dao/PoolDaoImpl.java b/plugins/file-systems/netapp/src/com/cloud/netapp/dao/PoolDaoImpl.java index 3e2364484..a3383c235 100644 --- a/plugins/file-systems/netapp/src/com/cloud/netapp/dao/PoolDaoImpl.java +++ b/plugins/file-systems/netapp/src/com/cloud/netapp/dao/PoolDaoImpl.java @@ -21,12 +21,14 @@ import javax.ejb.Local; import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; import com.cloud.netapp.PoolVO; import com.cloud.utils.db.GenericDaoBase; import com.cloud.utils.db.SearchBuilder; import com.cloud.utils.db.SearchCriteria; +@Component @Local(value={PoolDao.class}) public class PoolDaoImpl extends GenericDaoBase implements PoolDao { private static final Logger s_logger = Logger.getLogger(PoolDaoImpl.class); diff --git a/plugins/file-systems/netapp/src/com/cloud/netapp/dao/VolumeDaoImpl.java b/plugins/file-systems/netapp/src/com/cloud/netapp/dao/VolumeDaoImpl.java index 4a834294b..360c93664 100644 --- a/plugins/file-systems/netapp/src/com/cloud/netapp/dao/VolumeDaoImpl.java +++ b/plugins/file-systems/netapp/src/com/cloud/netapp/dao/VolumeDaoImpl.java @@ -21,6 +21,7 @@ import javax.ejb.Local; import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; import com.cloud.netapp.NetappVolumeVO; import com.cloud.utils.db.Filter; @@ -28,6 +29,7 @@ import com.cloud.utils.db.SearchBuilder; import com.cloud.utils.db.SearchCriteria; +@Component(value = "netappVolumeDaoImpl") @Local(value={VolumeDao.class}) public class VolumeDaoImpl extends GenericDaoBase implements VolumeDao { private static final Logger s_logger = Logger.getLogger(VolumeDaoImpl.class); diff --git a/plugins/host-allocators/random/pom.xml b/plugins/host-allocators/random/pom.xml index ba7e1ae1e..6fc76fe8d 100644 --- a/plugins/host-allocators/random/pom.xml +++ b/plugins/host-allocators/random/pom.xml @@ -23,7 +23,7 @@ org.apache.cloudstack cloudstack-plugins - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT ../../pom.xml diff --git a/plugins/host-allocators/random/src/com/cloud/agent/manager/allocator/impl/RandomAllocator.java b/plugins/host-allocators/random/src/com/cloud/agent/manager/allocator/impl/RandomAllocator.java index 0887ee979..a672efdc7 100755 --- a/plugins/host-allocators/random/src/com/cloud/agent/manager/allocator/impl/RandomAllocator.java +++ b/plugins/host-allocators/random/src/com/cloud/agent/manager/allocator/impl/RandomAllocator.java @@ -22,8 +22,10 @@ import java.util.Map; import javax.ejb.Local; +import javax.inject.Inject; import org.apache.log4j.Logger; +import org.springframework.stereotype.Component; import com.cloud.agent.manager.allocator.HostAllocator; import com.cloud.deploy.DeploymentPlan; @@ -34,55 +36,55 @@ import com.cloud.host.dao.HostDao; import com.cloud.offering.ServiceOffering; import com.cloud.resource.ResourceManager; -import com.cloud.utils.component.ComponentLocator; +import com.cloud.utils.component.AdapterBase; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineProfile; +@Component @Local(value=HostAllocator.class) -public class RandomAllocator implements HostAllocator { +public class RandomAllocator extends AdapterBase implements HostAllocator { private static final Logger s_logger = Logger.getLogger(RandomAllocator.class); - private String _name; - private HostDao _hostDao; - private ResourceManager _resourceMgr; + @Inject private HostDao _hostDao; + @Inject private ResourceManager _resourceMgr; @Override public List allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo) { return allocateTo(vmProfile, plan, type, avoid, returnUpTo, true); } - + @Override public List allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, - ExcludeList avoid, int returnUpTo, boolean considerReservedCapacity) { - - long dcId = plan.getDataCenterId(); - Long podId = plan.getPodId(); - Long clusterId = plan.getClusterId(); - ServiceOffering offering = vmProfile.getServiceOffering(); - - List suitableHosts = new ArrayList(); - + ExcludeList avoid, int returnUpTo, boolean considerReservedCapacity) { + + long dcId = plan.getDataCenterId(); + Long podId = plan.getPodId(); + Long clusterId = plan.getClusterId(); + ServiceOffering offering = vmProfile.getServiceOffering(); + + List suitableHosts = new ArrayList(); + if (type == Host.Type.Storage) { return suitableHosts; } String hostTag = offering.getHostTag(); if(hostTag != null){ - s_logger.debug("Looking for hosts in dc: " + dcId + " pod:" + podId + " cluster:" + clusterId + " having host tag:" + hostTag); + s_logger.debug("Looking for hosts in dc: " + dcId + " pod:" + podId + " cluster:" + clusterId + " having host tag:" + hostTag); }else{ - s_logger.debug("Looking for hosts in dc: " + dcId + " pod:" + podId + " cluster:" + clusterId); + s_logger.debug("Looking for hosts in dc: " + dcId + " pod:" + podId + " cluster:" + clusterId); } // list all computing hosts, regardless of whether they support routing...it's random after all List hosts = new ArrayList(); if(hostTag != null){ - hosts = _hostDao.listByHostTag(type, clusterId, podId, dcId, hostTag); + hosts = _hostDao.listByHostTag(type, clusterId, podId, dcId, hostTag); }else{ - hosts = _resourceMgr.listAllUpAndEnabledHosts(type, clusterId, podId, dcId); + hosts = _resourceMgr.listAllUpAndEnabledHosts(type, clusterId, podId, dcId); } - + s_logger.debug("Random Allocator found " + hosts.size() + " hosts"); - + if (hosts.size() == 0) { return suitableHosts; } @@ -90,12 +92,12 @@ public List allocateTo(VirtualMachineProfile vmP Collections.shuffle(hosts); for (Host host : hosts) { - if(suitableHosts.size() == returnUpTo){ - break; - } - + if(suitableHosts.size() == returnUpTo){ + break; + } + if (!avoid.shouldAvoid(host)) { - suitableHosts.add(host); + suitableHosts.add(host); }else{ if (s_logger.isDebugEnabled()) { s_logger.debug("Host name: " + host.getName() + ", hostId: "+ host.getId() +" is in avoid set, skipping this and trying other available hosts"); @@ -114,33 +116,4 @@ public boolean isVirtualMachineUpgradable(VirtualMachine vm, ServiceOffering off // return true return true; } - - @Override - public boolean configure(String name, Map params) { - ComponentLocator locator = ComponentLocator.getCurrentLocator(); - _hostDao = locator.getDao(HostDao.class); - _resourceMgr = locator.getManager(ResourceManager.class); - if (_hostDao == null) { - s_logger.error("Unable to get host dao."); - return false; - } - _name=name; - - return true; - } - - @Override - public String getName() { - return _name; - } - - @Override - public boolean start() { - return true; - } - - @Override - public boolean stop() { - return true; - } } diff --git a/plugins/hypervisors/baremetal/pom.xml b/plugins/hypervisors/baremetal/pom.xml index 600eedb14..328bd963c 100755 --- a/plugins/hypervisors/baremetal/pom.xml +++ b/plugins/hypervisors/baremetal/pom.xml @@ -21,7 +21,7 @@ org.apache.cloudstack cloudstack-plugins - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT ../../pom.xml cloud-plugin-hypervisor-baremetal diff --git a/plugins/hypervisors/baremetal/resources/security_group_agent/setup.py b/plugins/hypervisors/baremetal/resources/security_group_agent/setup.py index 2de41d265..384e04d6a 100755 --- a/plugins/hypervisors/baremetal/resources/security_group_agent/setup.py +++ b/plugins/hypervisors/baremetal/resources/security_group_agent/setup.py @@ -30,7 +30,7 @@ keywords='security group cloudstack', author='Frank Zhang', author_email='frank.zhang@citrix.com', - url='http://incubator.apache.org/cloudstack/', + url='http://cloudstack.apache.org', license='Apache License 2', packages=find_packages(exclude=['ez_setup', 'examples', 'tests']), include_package_data=True, diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalCmdbDao.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalCmdbDao.java deleted file mode 100755 index 0f20c677f..000000000 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalCmdbDao.java +++ /dev/null @@ -1,25 +0,0 @@ -// 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. -// -// Automatically generated by addcopyright.py at 01/29/2013 -package com.cloud.baremetal.database; - -import com.cloud.utils.db.GenericDao; - -public interface BaremetalCmdbDao extends GenericDao { - -} diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalCmdbDaoImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalCmdbDaoImpl.java deleted file mode 100755 index fcc95efba..000000000 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalCmdbDaoImpl.java +++ /dev/null @@ -1,29 +0,0 @@ -// 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. -// -// Automatically generated by addcopyright.py at 01/29/2013 -package com.cloud.baremetal.database; - -import javax.ejb.Local; - -import com.cloud.utils.db.DB; -import com.cloud.utils.db.GenericDaoBase; -@Local(value = {BaremetalCmdbDao.class}) -@DB(txn = false) -public class BaremetalCmdbDaoImpl extends GenericDaoBase implements BaremetalCmdbDao { - -} diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalCmdbVO.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalCmdbVO.java deleted file mode 100755 index ee3848a5e..000000000 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalCmdbVO.java +++ /dev/null @@ -1,104 +0,0 @@ -// 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. -// -// Automatically generated by addcopyright.py at 01/29/2013 -package com.cloud.baremetal.database; - -import java.util.UUID; - -import javax.persistence.Column; -import javax.persistence.Entity; -import javax.persistence.GeneratedValue; -import javax.persistence.GenerationType; -import javax.persistence.Id; -import javax.persistence.Table; - -@Entity -@Table(name="baremetal_cmdb") -public class BaremetalCmdbVO { - @Id - @GeneratedValue(strategy = GenerationType.IDENTITY) - @Column(name = "id") - private long id; - - @Column(name="uuid") - private String uuid; - - @Column(name="zone_id") - private long zoneId; - - @Column(name="url") - private String url; - - @Column(name="password") - private String password; - - @Column(name="username") - private String username; - - public BaremetalCmdbVO() { - uuid = UUID.randomUUID().toString(); - } - - public long getId() { - return id; - } - - public void setId(long id) { - this.id = id; - } - - public String getUuid() { - return uuid; - } - - public void setUuid(String uuid) { - this.uuid = uuid; - } - - public long getZoneId() { - return zoneId; - } - - public void setZoneId(long zoneId) { - this.zoneId = zoneId; - } - - public String getUrl() { - return url; - } - - public void setUrl(String url) { - this.url = url; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getUsername() { - return username; - } - - public void setUsername(String username) { - this.username = username; - } -} diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalDhcpDaoImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalDhcpDaoImpl.java index 3d9c6deaa..8123ee0f6 100644 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalDhcpDaoImpl.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalDhcpDaoImpl.java @@ -24,6 +24,8 @@ import javax.ejb.Local; import javax.naming.ConfigurationException; +import org.springframework.stereotype.Component; + import com.cloud.utils.db.DB; import com.cloud.utils.db.Filter; import com.cloud.utils.db.GenericDaoBase; @@ -32,6 +34,7 @@ import com.cloud.utils.db.SearchCriteria; import com.cloud.utils.db.SearchCriteria2; +@Component @Local(value=BaremetalDhcpDao.class) @DB(txn=false) public class BaremetalDhcpDaoImpl extends GenericDaoBase implements BaremetalDhcpDao { diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalPxeDaoImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalPxeDaoImpl.java index c47d6b2fa..acd7f136b 100644 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalPxeDaoImpl.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/database/BaremetalPxeDaoImpl.java @@ -24,6 +24,8 @@ import javax.ejb.Local; import javax.naming.ConfigurationException; +import org.springframework.stereotype.Component; + import com.cloud.utils.db.DB; import com.cloud.utils.db.Filter; import com.cloud.utils.db.GenericDaoBase; @@ -32,6 +34,7 @@ import com.cloud.utils.db.SearchCriteria; import com.cloud.utils.db.SearchCriteria2; +@Component @Local(value = {BaremetalPxeDao.class}) @DB(txn = false) public class BaremetalPxeDaoImpl extends GenericDaoBase implements BaremetalPxeDao { diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/AddBaremetalHostCmd.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/AddBaremetalHostCmd.java index 5222d1036..8d459028a 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/AddBaremetalHostCmd.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/AddBaremetalHostCmd.java @@ -14,28 +14,35 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -// +// // Automatically generated by addcopyright.py at 01/29/2013 -package com.cloud.baremetal.manager; - +package com.cloud.baremetal.manager; + +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.command.admin.host.AddHostCmd; - +import org.apache.cloudstack.api.response.HostResponse; +@APICommand(name="addBaremetalHost", description="add a baremetal host", responseObject = HostResponse.class) public class AddBaremetalHostCmd extends AddHostCmd { - - @Parameter(name=ApiConstants.IP_ADDRESS, type=CommandType.STRING, description="ip address intentionally allocated to this host after provisioning") - private String vmIpAddress; - - public AddBaremetalHostCmd() { - this.getFullUrlParams().put(ApiConstants.BAREMETAL_DISCOVER_NAME, BareMetalDiscoverer.class.getName()); - } - - public String getVmIpAddress() { - return vmIpAddress; - } - - public void setVmIpAddress(String vmIpAddress) { - this.vmIpAddress = vmIpAddress; - } -} + + @Parameter(name=ApiConstants.IP_ADDRESS, type=CommandType.STRING, description="ip address intentionally allocated to this host after provisioning") + private String vmIpAddress; + + public AddBaremetalHostCmd() { + } + + @Override + public void execute(){ + this.getFullUrlParams().put(ApiConstants.BAREMETAL_DISCOVER_NAME, BareMetalDiscoverer.class.getName()); + super.execute(); + } + + public String getVmIpAddress() { + return vmIpAddress; + } + + public void setVmIpAddress(String vmIpAddress) { + this.vmIpAddress = vmIpAddress; + } +} diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalDiscoverer.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalDiscoverer.java index 64eeaea17..edb5dea8c 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalDiscoverer.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalDiscoverer.java @@ -30,6 +30,7 @@ import java.util.UUID; import javax.ejb.Local; +import javax.inject.Inject; import javax.naming.ConfigurationException; import org.apache.cloudstack.api.ApiConstants; @@ -57,7 +58,6 @@ import com.cloud.resource.ResourceStateAdapter; import com.cloud.resource.ServerResource; import com.cloud.resource.UnableDeleteHostException; -import com.cloud.utils.component.Inject; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.Script; import com.cloud.utils.script.Script2; @@ -202,7 +202,7 @@ public Map> find(long dcId, Long p if (vmIp != null) { details.put(ApiConstants.IP_ADDRESS, vmIp); } - String isEchoScAgent = _configDao.getValue(Config.EnableBaremetalSecurityGroupAgentEcho.key()); + String isEchoScAgent = _configDao.getValue(Config.EnableBaremetalSecurityGroupAgentEcho.key()); details.put(BaremetalManager.EchoSecurityGroupAgent, isEchoScAgent); resources.put(resource, details); @@ -276,5 +276,13 @@ public DeleteHostAnswer deleteHost(HostVO host, boolean isForced, boolean isForc return new DeleteHostAnswer(true); } + + @Override + protected HashMap buildConfigParams(HostVO host) { + HashMap params = super.buildConfigParams(host); + params.put("hostId", host.getId()); + params.put("ipaddress", host.getPrivateIpAddress()); + return params; + } } diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalGuru.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalGuru.java index b8a0af37f..03ba3fae6 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalGuru.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalGuru.java @@ -26,6 +26,7 @@ import java.util.Map; import javax.ejb.Local; +import javax.inject.Inject; import org.apache.log4j.Logger; @@ -36,7 +37,6 @@ import com.cloud.hypervisor.HypervisorGuruBase; import com.cloud.storage.GuestOSVO; import com.cloud.storage.dao.GuestOSDao; -import com.cloud.utils.component.Inject; import com.cloud.vm.VMInstanceVO; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineProfile; diff --git a/server/src/com/cloud/deploy/BareMetalPlanner.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalPlanner.java similarity index 82% rename from server/src/com/cloud/deploy/BareMetalPlanner.java rename to plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalPlanner.java index 7616a383d..97b2840f4 100755 --- a/server/src/com/cloud/deploy/BareMetalPlanner.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalPlanner.java @@ -14,25 +14,29 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -package com.cloud.deploy; +package com.cloud.baremetal.manager; import java.util.List; import java.util.Map; import javax.ejb.Local; +import javax.inject.Inject; import javax.naming.ConfigurationException; +import com.cloud.dc.*; +import com.cloud.dc.ClusterDetailsDao; import org.apache.log4j.Logger; import com.cloud.capacity.CapacityManager; import com.cloud.configuration.Config; import com.cloud.configuration.dao.ConfigurationDao; -import com.cloud.dc.ClusterVO; -import com.cloud.dc.DataCenter; -import com.cloud.dc.Pod; import com.cloud.dc.dao.ClusterDao; import com.cloud.dc.dao.DataCenterDao; import com.cloud.dc.dao.HostPodDao; +import com.cloud.deploy.DeployDestination; +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; import com.cloud.exception.InsufficientServerCapacityException; import com.cloud.host.Host; import com.cloud.host.HostVO; @@ -42,12 +46,12 @@ import com.cloud.org.Cluster; import com.cloud.resource.ResourceManager; import com.cloud.utils.NumbersUtil; -import com.cloud.utils.component.Inject; +import com.cloud.utils.component.AdapterBase; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineProfile; @Local(value=DeploymentPlanner.class) -public class BareMetalPlanner implements DeploymentPlanner { +public class BareMetalPlanner extends AdapterBase implements DeploymentPlanner { private static final Logger s_logger = Logger.getLogger(BareMetalPlanner.class); @Inject protected DataCenterDao _dcDao; @Inject protected HostPodDao _podDao; @@ -56,17 +60,14 @@ public class BareMetalPlanner implements DeploymentPlanner { @Inject protected ConfigurationDao _configDao; @Inject protected CapacityManager _capacityMgr; @Inject protected ResourceManager _resourceMgr; - String _name; + @Inject protected ClusterDetailsDao _clusterDetailsDao; @Override public DeployDestination plan(VirtualMachineProfile vmProfile, DeploymentPlan plan, ExcludeList avoid) throws InsufficientServerCapacityException { VirtualMachine vm = vmProfile.getVirtualMachine(); - ServiceOffering offering = vmProfile.getServiceOffering(); + ServiceOffering offering = vmProfile.getServiceOffering(); String hostTag = null; - - String opFactor = _configDao.getValue(Config.CPUOverprovisioningFactor.key()); - float cpuOverprovisioningFactor = NumbersUtil.parseFloat(opFactor, 1); - + String haVmTag = (String)vmProfile.getParameter(VirtualMachineProfile.Param.HaTag); if (vm.getLastHostId() != null && haVmTag == null) { @@ -87,7 +88,7 @@ public DeployDestination plan(VirtualMachineProfile vm } } - List clusters = _clusterDao.listByDcHyType(vm.getDataCenterIdToDeployIn(), HypervisorType.BareMetal.toString()); + List clusters = _clusterDao.listByDcHyType(vm.getDataCenterId(), HypervisorType.BareMetal.toString()); int cpu_requested; long ram_requested; HostVO target = null; @@ -122,7 +123,13 @@ public DeployDestination plan(VirtualMachineProfile vm return null; } for (HostVO h : hosts) { - if (_capacityMgr.checkIfHostHasCapacity(h.getId(), cpu_requested, ram_requested, false, cpuOverprovisioningFactor, true)) { + long cluster_id = h.getClusterId(); + ClusterDetailsVO cluster_detail_cpu = _clusterDetailsDao.findDetail(cluster_id,"cpuOvercommitRatio") ; + ClusterDetailsVO cluster_detail_ram = _clusterDetailsDao.findDetail(cluster_id,"memoryOvercommitRatio"); + Float cpuOvercommitRatio = Float.parseFloat(cluster_detail_cpu.getValue()); + Float memoryOvercommitRatio = Float.parseFloat(cluster_detail_ram.getValue()); + + if (_capacityMgr.checkIfHostHasCapacity(h.getId(), cpu_requested, ram_requested, false, cpuOvercommitRatio, memoryOvercommitRatio, true)) { s_logger.debug("Find host " + h.getId() + " has enough capacity"); DataCenter dc = _dcDao.findById(h.getDataCenterId()); Pod pod = _podDao.findById(h.getPodId()); @@ -142,15 +149,9 @@ public boolean canHandle(VirtualMachineProfile vm, Dep @Override public boolean configure(String name, Map params) throws ConfigurationException { - _name = name; return true; } - @Override - public String getName() { - return _name; - } - @Override public boolean start() { return true; diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalTemplateAdapter.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalTemplateAdapter.java index 15e63b9f9..928183ba3 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalTemplateAdapter.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BareMetalTemplateAdapter.java @@ -26,6 +26,7 @@ import java.util.List; import javax.ejb.Local; +import javax.inject.Inject; import org.apache.cloudstack.api.command.user.iso.DeleteIsoCmd; import org.apache.cloudstack.api.command.user.iso.RegisterIsoCmd; @@ -41,15 +42,15 @@ import com.cloud.host.HostVO; import com.cloud.host.dao.HostDao; import com.cloud.resource.ResourceManager; +import com.cloud.storage.TemplateProfile; import com.cloud.storage.VMTemplateHostVO; import com.cloud.storage.VMTemplateStorageResourceAssoc.Status; import com.cloud.storage.VMTemplateVO; import com.cloud.storage.VMTemplateZoneVO; import com.cloud.template.TemplateAdapter; import com.cloud.template.TemplateAdapterBase; -import com.cloud.template.TemplateProfile; import com.cloud.user.Account; -import com.cloud.utils.component.Inject; +import com.cloud.utils.UriUtils; import com.cloud.utils.db.DB; import com.cloud.utils.exception.CloudRuntimeException; @@ -58,6 +59,11 @@ public class BareMetalTemplateAdapter extends TemplateAdapterBase implements Tem private final static Logger s_logger = Logger.getLogger(BareMetalTemplateAdapter.class); @Inject HostDao _hostDao; @Inject ResourceManager _resourceMgr; + + @Override + public String getName() { + return TemplateAdapterType.BareMetal.getName(); + } @Override public TemplateProfile prepare(RegisterTemplateCmd cmd) throws ResourceAllocationException { @@ -77,7 +83,11 @@ public TemplateProfile prepare(RegisterTemplateCmd cmd) throws ResourceAllocatio throw new CloudRuntimeException("Please add PXE server before adding baremetal template in zone " + profile.getZoneId()); } } - + + // Check that the resource limit for secondary storage won't be exceeded + _resourceLimitMgr.checkResourceLimit(_accountMgr.getAccount(cmd.getEntityOwnerId()), + ResourceType.secondary_storage, UriUtils.getRemoteSize(profile.getUrl())); + return profile; } @@ -128,6 +138,8 @@ public VMTemplateVO create(TemplateProfile profile) { } _resourceLimitMgr.incrementResourceCount(profile.getAccountId(), ResourceType.template); + _resourceLimitMgr.incrementResourceCount(profile.getAccountId(), ResourceType.secondary_storage, + UriUtils.getRemoteSize(profile.getUrl())); return template; } @@ -200,8 +212,10 @@ public boolean delete(TemplateProfile profile) { s_logger.debug("Failed to acquire lock when deleting template with ID: " + templateId); success = false; } else if (_tmpltDao.remove(templateId)) { - // Decrement the number of templates - _resourceLimitMgr.decrementResourceCount(accountId, ResourceType.template); + // Decrement the number of templates and total secondary storage space used by the account. + _resourceLimitMgr.decrementResourceCount(accountId, ResourceType.template); + _resourceLimitMgr.recalculateResourceCount(accountId, template.getDomainId(), + ResourceType.secondary_storage.getOrdinal()); } } finally { diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManager.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManager.java index 159905045..60edde3c7 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManager.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManager.java @@ -20,8 +20,9 @@ import com.cloud.network.Network.Provider; import com.cloud.utils.component.Manager; +import com.cloud.utils.component.PluggableService; -public interface BaremetalManager extends Manager { +public interface BaremetalManager extends Manager, PluggableService { public static final String EchoSecurityGroupAgent = "EchoSecurityGroupAgent"; public static final String ExternalBaremetalSystemUrl = "ExternalBaremetalSystemUrl"; public static final String DO_PXE = "doPxe"; diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManagerImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManagerImpl.java index 53888645a..b41d6ca04 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManagerImpl.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalManagerImpl.java @@ -18,9 +18,12 @@ // Automatically generated by addcopyright.py at 01/29/2013 package com.cloud.baremetal.manager; +import java.util.ArrayList; +import java.util.List; import java.util.Map; import javax.ejb.Local; +import javax.inject.Inject; import javax.naming.ConfigurationException; import org.apache.log4j.Logger; @@ -32,7 +35,7 @@ import com.cloud.host.HostVO; import com.cloud.host.dao.HostDao; import com.cloud.hypervisor.Hypervisor.HypervisorType; -import com.cloud.utils.component.Inject; +import com.cloud.utils.component.ManagerBase; import com.cloud.utils.fsm.StateListener; import com.cloud.vm.ReservationContext; import com.cloud.vm.UserVmVO; @@ -46,7 +49,7 @@ import com.cloud.vm.VirtualMachineProfile; @Local(value = {BaremetalManager.class}) -public class BaremetalManagerImpl implements BaremetalManager, StateListener { +public class BaremetalManagerImpl extends ManagerBase implements BaremetalManager, StateListener { private static final Logger s_logger = Logger.getLogger(BaremetalManagerImpl.class); @Inject @@ -109,4 +112,11 @@ public boolean postStateTransitionEvent(State oldState, Event event, State newSt return true; } + + @Override + public List> getCommands() { + List> cmds = new ArrayList>(); + cmds.add(AddBaremetalHostCmd.class); + return cmds; + } } diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalPlannerSelector.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalPlannerSelector.java new file mode 100755 index 000000000..45fbeb782 --- /dev/null +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/manager/BaremetalPlannerSelector.java @@ -0,0 +1,39 @@ +// 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.baremetal.manager; + +import java.util.Map; + +import javax.ejb.Local; +import javax.naming.ConfigurationException; + +import com.cloud.deploy.AbstractDeployPlannerSelector; +import com.cloud.deploy.DeployPlannerSelector; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.vm.UserVmVO; +@Local(value = {DeployPlannerSelector.class}) +public class BaremetalPlannerSelector extends AbstractDeployPlannerSelector{ + + @Override + public String selectPlanner(UserVmVO vm) { + if (vm.getHypervisorType() == HypervisorType.BareMetal) { + return "BareMetalPlanner"; + } + return null; + } + +} diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalDhcpCmd.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalDhcpCmd.java index 6a26fe270..c74983222 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalDhcpCmd.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalDhcpCmd.java @@ -18,13 +18,17 @@ // Automatically generated by addcopyright.py at 01/29/2013 package com.cloud.baremetal.networkservice; +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.BaseCmd.CommandType; +import org.apache.cloudstack.api.response.PhysicalNetworkResponse; +import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.Parameter; -import org.apache.cloudstack.api.PlugService; import org.apache.cloudstack.api.ServerApiException; import org.apache.log4j.Logger; @@ -36,20 +40,20 @@ import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.user.UserContext; - +@APICommand(name="addBaremetalDhcp", description="adds a baremetal dhcp server", responseObject = BaremetalDhcpResponse.class) public class AddBaremetalDhcpCmd extends BaseAsyncCmd { private static final String s_name = "addexternaldhcpresponse"; public static final Logger s_logger = Logger.getLogger(AddBaremetalDhcpCmd.class); - @PlugService BaremetalDhcpManager mgr; + @Inject BaremetalDhcpManager mgr; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.LONG, required=true, description="the Physical Network ID") + @Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.UUID, entityType=PhysicalNetworkResponse.class, required=true, description="the Physical Network ID") private Long physicalNetworkId; - @Parameter(name=ApiConstants.POD_ID, type=CommandType.LONG, required = true, description="Pod Id") + @Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType=PodResponse.class, required = true, description="Pod Id") private Long podId; @Parameter(name=ApiConstants.DHCP_SERVER_TYPE, type=CommandType.STRING, required = true, description="Type of dhcp device") diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalKickStartPxeCmd.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalKickStartPxeCmd.java index 4c3d0b225..8bcc7c13f 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalKickStartPxeCmd.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalKickStartPxeCmd.java @@ -14,23 +14,24 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -// +// // Automatically generated by addcopyright.py at 01/29/2013 -package com.cloud.baremetal.networkservice; - +package com.cloud.baremetal.networkservice; + +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd.CommandType; import org.apache.cloudstack.api.Parameter; - -public class AddBaremetalKickStartPxeCmd extends AddBaremetalPxeCmd { - @Parameter(name=ApiConstants.TFTP_DIR, type=CommandType.STRING, required = true, description="Tftp root directory of PXE server") - private String tftpDir; - - public String getTftpDir() { - return tftpDir; - } - - public void setTftpDir(String tftpDir) { - this.tftpDir = tftpDir; +@APICommand(name="addBaremetalPxeKickStartServer", description="add a baremetal pxe server", responseObject = BaremetalPxeKickStartResponse.class) +public class AddBaremetalKickStartPxeCmd extends AddBaremetalPxeCmd { + @Parameter(name=ApiConstants.TFTP_DIR, type=CommandType.STRING, required = true, description="Tftp root directory of PXE server") + private String tftpDir; + + public String getTftpDir() { + return tftpDir; + } + + public void setTftpDir(String tftpDir) { + this.tftpDir = tftpDir; } -} +} diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxeCmd.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxeCmd.java index a1d72a328..63e11478e 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxeCmd.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxeCmd.java @@ -18,13 +18,17 @@ // Automatically generated by addcopyright.py at 01/29/2013 package com.cloud.baremetal.networkservice; +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseAsyncCmd; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.BaseCmd.CommandType; +import org.apache.cloudstack.api.response.PhysicalNetworkResponse; +import org.apache.cloudstack.api.response.PodResponse; import org.apache.cloudstack.api.Parameter; -import org.apache.cloudstack.api.PlugService; import org.apache.cloudstack.api.ServerApiException; import org.apache.log4j.Logger; @@ -36,19 +40,18 @@ import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.user.UserContext; - public class AddBaremetalPxeCmd extends BaseAsyncCmd { private static final String s_name = "addexternalpxeresponse"; public static final Logger s_logger = Logger.getLogger(AddBaremetalPxeCmd.class); - @PlugService BaremetalPxeManager pxeMgr; + @Inject BaremetalPxeManager pxeMgr; ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.LONG, required=true, description="the Physical Network ID") + @Parameter(name=ApiConstants.PHYSICAL_NETWORK_ID, type=CommandType.UUID, entityType=PhysicalNetworkResponse.class, required=true, description="the Physical Network ID") private Long physicalNetworkId; - @Parameter(name=ApiConstants.POD_ID, type=CommandType.LONG, description="Pod Id") + @Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType=PodResponse.class, description="Pod Id") private Long podId; @Parameter(name=ApiConstants.URL, type=CommandType.STRING, required = true, description="URL of the external pxe device") diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxePingServerCmd.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxePingServerCmd.java index 70796f349..01cafd435 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxePingServerCmd.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/AddBaremetalPxePingServerCmd.java @@ -18,9 +18,11 @@ // Automatically generated by addcopyright.py at 01/29/2013 package com.cloud.baremetal.networkservice; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.Parameter; +@APICommand(name="addBaremetalPxePingServer", description="add a baremetal ping pxe server", responseObject = BaremetalPxePingResponse.class) public class AddBaremetalPxePingServerCmd extends AddBaremetalPxeCmd { @Parameter(name=ApiConstants.PING_STORAGE_SERVER_IP, type=CommandType.STRING, required = true, description="PING storage server ip") diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java index 1f3defb9d..d6b96a818 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPingServiceImpl.java @@ -29,6 +29,7 @@ import java.util.Map; import javax.ejb.Local; +import javax.inject.Inject; import org.apache.log4j.Logger; @@ -48,14 +49,13 @@ import com.cloud.host.HostVO; import com.cloud.host.dao.HostDetailsDao; import com.cloud.network.PhysicalNetworkServiceProvider; -import com.cloud.network.PhysicalNetworkVO; import com.cloud.network.dao.PhysicalNetworkDao; import com.cloud.network.dao.PhysicalNetworkServiceProviderDao; import com.cloud.network.dao.PhysicalNetworkServiceProviderVO; +import com.cloud.network.dao.PhysicalNetworkVO; import com.cloud.resource.ResourceManager; import com.cloud.resource.ServerResource; import com.cloud.uservm.UserVm; -import com.cloud.utils.component.Inject; import com.cloud.utils.db.DB; import com.cloud.utils.db.SearchCriteria.Op; import com.cloud.utils.db.SearchCriteria2; @@ -297,4 +297,10 @@ public List listPxeServers(ListBaremetalPxePingServersCmd } return responses; } + + + @Override + public String getPxeServiceType() { + return BaremetalPxeManager.BaremetalPxeType.PING.toString(); + } } diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPxeServiceBase.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPxeServiceBase.java index 85a9b3cff..cd1ada9f4 100644 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPxeServiceBase.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalPxeServiceBase.java @@ -24,44 +24,23 @@ import java.util.Map; +import javax.inject.Inject; import javax.naming.ConfigurationException; import com.cloud.agent.AgentManager; import com.cloud.dc.dao.DataCenterDao; import com.cloud.dc.dao.HostPodDao; import com.cloud.host.dao.HostDao; -import com.cloud.utils.component.Inject; +import com.cloud.utils.component.ManagerBase; import com.cloud.vm.dao.NicDao; -public abstract class BareMetalPxeServiceBase implements BaremetalPxeService { - protected String _name; +public abstract class BareMetalPxeServiceBase extends ManagerBase implements BaremetalPxeService { @Inject DataCenterDao _dcDao; @Inject HostDao _hostDao; @Inject AgentManager _agentMgr; @Inject HostPodDao _podDao; @Inject NicDao _nicDao; - @Override - public boolean configure(String name, Map params) throws ConfigurationException { - _name = name; - return true; - } - - @Override - public String getName() { - return _name; - } - - @Override - public boolean start() { - return true; - } - - @Override - public boolean stop() { - return true; - } - protected String getPxeServerGuid(String zoneId, String name, String ip) { return zoneId + "-" + name + "-" + ip; } diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalResourceBase.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalResourceBase.java index d615d1d4a..86e41fea0 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalResourceBase.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BareMetalResourceBase.java @@ -67,7 +67,8 @@ import com.cloud.hypervisor.Hypervisor; import com.cloud.resource.ServerResource; import com.cloud.server.ManagementServer; -import com.cloud.utils.component.ComponentLocator; +import com.cloud.utils.component.ComponentContext; +import com.cloud.utils.component.ManagerBase; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.OutputInterpreter; import com.cloud.utils.script.Script; @@ -81,7 +82,7 @@ import edu.emory.mathcs.backport.java.util.concurrent.TimeUnit; @Local(value = ServerResource.class) -public class BareMetalResourceBase implements ServerResource { +public class BareMetalResourceBase extends ManagerBase implements ServerResource { private static final Logger s_logger = Logger.getLogger(BareMetalResourceBase.class); protected HashMap _vms = new HashMap(2); protected String _name; @@ -96,7 +97,7 @@ public class BareMetalResourceBase implements ServerResource { protected String _mac; protected String _username; protected String _password; - protected String _ip; + protected String _ip; protected boolean _isEchoScAgent; protected IAgentControl _agentControl; protected Script2 _pingCommand; @@ -145,7 +146,7 @@ public boolean configure(String name, Map params) throws Configu _mac = (String) params.get(ApiConstants.HOST_MAC); _username = (String) params.get(ApiConstants.USERNAME); _password = (String) params.get(ApiConstants.PASSWORD); - _vmName = (String) params.get("vmName"); + _vmName = (String) params.get("vmName"); String echoScAgent = (String) params.get(BaremetalManager.EchoSecurityGroupAgent); if (_pod == null) { @@ -171,9 +172,9 @@ public boolean configure(String name, Map params) throws Configu if (_uuid == null) { throw new ConfigurationException("Unable to get the uuid"); - } - - if (echoScAgent != null) { + } + + if (echoScAgent != null) { _isEchoScAgent = Boolean.valueOf(echoScAgent); } @@ -307,8 +308,7 @@ protected State getVmState() { protected Map fullSync() { Map states = new HashMap(); if (hostId != null) { - ComponentLocator locator = ComponentLocator.getLocator(ManagementServer.Name); - vmDao = locator.getDao(VMInstanceDao.class); + vmDao = ComponentContext.getComponent(VMInstanceDao.class); final List vms = vmDao.listByHostId(hostId); for (VMInstanceVO vm : vms) { states.put(vm.getInstanceName(), vm.getState()); @@ -416,9 +416,9 @@ protected Answer execute(IpmiBootorResetCommand cmd) { protected CheckNetworkAnswer execute(CheckNetworkCommand cmd) { return new CheckNetworkAnswer(cmd, true, "Success"); } - - protected Answer execute(SecurityGroupRulesCmd cmd) { - SecurityGroupHttpClient hc = new SecurityGroupHttpClient(); + + protected Answer execute(SecurityGroupRulesCmd cmd) { + SecurityGroupHttpClient hc = new SecurityGroupHttpClient(); return hc.call(cmd.getGuestIp(), cmd); } @@ -531,13 +531,13 @@ protected StartAnswer execute(StartCommand cmd) { if (!doScript(_powerOnCommand)) { return new StartAnswer(cmd, "IPMI power on failed"); } - } - - if (_isEchoScAgent) { - SecurityGroupHttpClient hc = new SecurityGroupHttpClient(); - boolean echoRet = hc.echo(vm.getNics()[0].getIp(), TimeUnit.MINUTES.toMillis(30), TimeUnit.MINUTES.toMillis(1)); + } + + if (_isEchoScAgent) { + SecurityGroupHttpClient hc = new SecurityGroupHttpClient(); + boolean echoRet = hc.echo(vm.getNics()[0].getIp(), TimeUnit.MINUTES.toMillis(30), TimeUnit.MINUTES.toMillis(1)); if (!echoRet) { - return new StartAnswer(cmd, String.format("Call security group agent on vm[%s] timeout", vm.getNics()[0].getIp())); + return new StartAnswer(cmd, String.format("Call security group agent on vm[%s] timeout", vm.getNics()[0].getIp())); } } diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java index 5414106e2..6d14e3f1a 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetaNetworkGuru.java @@ -14,13 +14,14 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -// +// // Automatically generated by addcopyright.py at 01/29/2013 -package com.cloud.baremetal.networkservice; - +package com.cloud.baremetal.networkservice; + import java.net.URI; import javax.ejb.Local; +import javax.inject.Inject; import org.apache.cloudstack.api.ApiConstants; import org.apache.log4j.Logger; @@ -40,27 +41,26 @@ import com.cloud.host.HostVO; import com.cloud.host.dao.HostDao; import com.cloud.hypervisor.Hypervisor.HypervisorType; -import com.cloud.network.IPAddressVO; import com.cloud.network.Network; import com.cloud.network.NetworkManager; import com.cloud.network.Networks.AddressFormat; import com.cloud.network.Networks.BroadcastDomainType; import com.cloud.network.addr.PublicIp; import com.cloud.network.dao.IPAddressDao; +import com.cloud.network.dao.IPAddressVO; import com.cloud.network.guru.DirectPodBasedNetworkGuru; import com.cloud.network.guru.NetworkGuru; import com.cloud.offerings.dao.NetworkOfferingDao; -import com.cloud.utils.component.Inject; import com.cloud.utils.db.Transaction; import com.cloud.vm.NicProfile; import com.cloud.vm.ReservationContext; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineProfile; - -@Local(value = { NetworkGuru.class }) -public class BaremetaNetworkGuru extends DirectPodBasedNetworkGuru { - private static final Logger s_logger = Logger.getLogger(BaremetaNetworkGuru.class); - @Inject + +@Local(value = { NetworkGuru.class }) +public class BaremetaNetworkGuru extends DirectPodBasedNetworkGuru { + private static final Logger s_logger = Logger.getLogger(BaremetaNetworkGuru.class); + @Inject private HostDao _hostDao; @Inject DataCenterDao _dcDao; @@ -73,101 +73,101 @@ public class BaremetaNetworkGuru extends DirectPodBasedNetworkGuru { @Inject NetworkOfferingDao _networkOfferingDao; @Inject - PodVlanMapDao _podVlanDao; - - @Override - public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) - throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException { - if (dest.getHost().getHypervisorType() != HypervisorType.BareMetal) { - super.reserve(nic, network, vm, dest, context); - return; - } - + PodVlanMapDao _podVlanDao; + + @Override + public void reserve(NicProfile nic, Network network, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) + throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException { + if (dest.getHost().getHypervisorType() != HypervisorType.BareMetal) { + super.reserve(nic, network, vm, dest, context); + return; + } + HostVO host = _hostDao.findById(dest.getHost().getId()); - _hostDao.loadDetails(host); - String intentIp = host.getDetail(ApiConstants.IP_ADDRESS); - if (intentIp == null) { - super.reserve(nic, network, vm, dest, context); - return; + _hostDao.loadDetails(host); + String intentIp = host.getDetail(ApiConstants.IP_ADDRESS); + if (intentIp == null) { + super.reserve(nic, network, vm, dest, context); + return; + } + + String oldIp = nic.getIp4Address(); + boolean getNewIp = false; + if (oldIp == null) { + getNewIp = true; + } else { + // we need to get a new ip address if we try to deploy a vm in a + // different pod + IPAddressVO ipVO = _ipAddressDao.findByIpAndSourceNetworkId(network.getId(), oldIp); + if (ipVO != null) { + PodVlanMapVO mapVO = _podVlanDao.listPodVlanMapsByVlan(ipVO.getVlanId()); + if (mapVO.getPodId() != dest.getPod().getId()) { + Transaction txn = Transaction.currentTxn(); + txn.start(); + + // release the old ip here + _networkMgr.markIpAsUnavailable(ipVO.getId()); + _ipAddressDao.unassignIpAddress(ipVO.getId()); + + txn.commit(); + + nic.setIp4Address(null); + getNewIp = true; + } + } + } + + if (getNewIp) { + // we don't set reservationStrategy to Create because we need this + // method to be called again for the case when vm fails to deploy in + // Pod1, and we try to redeploy it in Pod2 + getBaremetalIp(nic, dest.getPod(), vm, network, intentIp); + } + + DataCenter dc = _dcDao.findById(network.getDataCenterId()); + nic.setDns1(dc.getDns1()); + nic.setDns2(dc.getDns2()); + + /* + * Pod pod = dest.getPod(); Pair ip = + * _dcDao.allocatePrivateIpAddress(dest.getDataCenter().getId(), + * dest.getPod().getId(), nic.getId(), context.getReservationId(), + * intentIp); if (ip == null) { throw new + * InsufficientAddressCapacityException + * ("Unable to get a management ip address", Pod.class, pod.getId()); } + * + * nic.setIp4Address(ip.first()); + * nic.setMacAddress(NetUtils.long2Mac(NetUtils + * .createSequenceBasedMacAddress(ip.second()))); + * nic.setGateway(pod.getGateway()); nic.setFormat(AddressFormat.Ip4); + * String netmask = NetUtils.getCidrNetmask(pod.getCidrSize()); + * nic.setNetmask(netmask); + * nic.setBroadcastType(BroadcastDomainType.Native); + * nic.setBroadcastUri(null); nic.setIsolationUri(null); + */ + + s_logger.debug("Allocated a nic " + nic + " for " + vm); + } + + private void getBaremetalIp(NicProfile nic, Pod pod, VirtualMachineProfile vm, Network network, String requiredIp) + throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException { + DataCenter dc = _dcDao.findById(pod.getDataCenterId()); + if (nic.getIp4Address() == null) { + s_logger.debug(String.format("Requiring ip address: %s", nic.getIp4Address())); + PublicIp ip = _networkMgr.assignPublicIpAddress(dc.getId(), pod.getId(), vm.getOwner(), VlanType.DirectAttached, network.getId(), requiredIp, false); + nic.setIp4Address(ip.getAddress().toString()); + nic.setFormat(AddressFormat.Ip4); + nic.setGateway(ip.getGateway()); + nic.setNetmask(ip.getNetmask()); + if (ip.getVlanTag() != null && ip.getVlanTag().equalsIgnoreCase(Vlan.UNTAGGED)) { + nic.setIsolationUri(URI.create("ec2://" + Vlan.UNTAGGED)); + nic.setBroadcastUri(URI.create("vlan://" + Vlan.UNTAGGED)); + nic.setBroadcastType(BroadcastDomainType.Native); + } + nic.setReservationId(String.valueOf(ip.getVlanTag())); + nic.setMacAddress(ip.getMacAddress()); } - - String oldIp = nic.getIp4Address(); - boolean getNewIp = false; - if (oldIp == null) { - getNewIp = true; - } else { - // we need to get a new ip address if we try to deploy a vm in a - // different pod - IPAddressVO ipVO = _ipAddressDao.findByIpAndSourceNetworkId(network.getId(), oldIp); - if (ipVO != null) { - PodVlanMapVO mapVO = _podVlanDao.listPodVlanMapsByVlan(ipVO.getVlanId()); - if (mapVO.getPodId() != dest.getPod().getId()) { - Transaction txn = Transaction.currentTxn(); - txn.start(); - - // release the old ip here - _networkMgr.markIpAsUnavailable(ipVO.getId()); - _ipAddressDao.unassignIpAddress(ipVO.getId()); - - txn.commit(); - - nic.setIp4Address(null); - getNewIp = true; - } - } - } - - if (getNewIp) { - // we don't set reservationStrategy to Create because we need this - // method to be called again for the case when vm fails to deploy in - // Pod1, and we try to redeploy it in Pod2 - getBaremetalIp(nic, dest.getPod(), vm, network, intentIp); - } - - DataCenter dc = _dcDao.findById(network.getDataCenterId()); - nic.setDns1(dc.getDns1()); - nic.setDns2(dc.getDns2()); - - /* - * Pod pod = dest.getPod(); Pair ip = - * _dcDao.allocatePrivateIpAddress(dest.getDataCenter().getId(), - * dest.getPod().getId(), nic.getId(), context.getReservationId(), - * intentIp); if (ip == null) { throw new - * InsufficientAddressCapacityException - * ("Unable to get a management ip address", Pod.class, pod.getId()); } - * - * nic.setIp4Address(ip.first()); - * nic.setMacAddress(NetUtils.long2Mac(NetUtils - * .createSequenceBasedMacAddress(ip.second()))); - * nic.setGateway(pod.getGateway()); nic.setFormat(AddressFormat.Ip4); - * String netmask = NetUtils.getCidrNetmask(pod.getCidrSize()); - * nic.setNetmask(netmask); - * nic.setBroadcastType(BroadcastDomainType.Native); - * nic.setBroadcastUri(null); nic.setIsolationUri(null); - */ - - s_logger.debug("Allocated a nic " + nic + " for " + vm); - } - - private void getBaremetalIp(NicProfile nic, Pod pod, VirtualMachineProfile vm, Network network, String requiredIp) - throws InsufficientVirtualNetworkCapcityException, InsufficientAddressCapacityException, ConcurrentOperationException { - DataCenter dc = _dcDao.findById(pod.getDataCenterId()); - if (nic.getIp4Address() == null) { - s_logger.debug(String.format("Requiring ip address: %s", nic.getIp4Address())); - PublicIp ip = _networkMgr.assignPublicIpAddress(dc.getId(), pod.getId(), vm.getOwner(), VlanType.DirectAttached, network.getId(), requiredIp, false); - nic.setIp4Address(ip.getAddress().toString()); - nic.setFormat(AddressFormat.Ip4); - nic.setGateway(ip.getGateway()); - nic.setNetmask(ip.getNetmask()); - if (ip.getVlanTag() != null && ip.getVlanTag().equalsIgnoreCase(Vlan.UNTAGGED)) { - nic.setIsolationUri(URI.create("ec2://" + Vlan.UNTAGGED)); - nic.setBroadcastUri(URI.create("vlan://" + Vlan.UNTAGGED)); - nic.setBroadcastType(BroadcastDomainType.Native); - } - nic.setReservationId(String.valueOf(ip.getVlanTag())); - nic.setMacAddress(ip.getMacAddress()); - } - nic.setDns1(dc.getDns1()); - nic.setDns2(dc.getDns2()); - } -} + nic.setDns1(dc.getDns1()); + nic.setDns2(dc.getDns2()); + } +} diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpElement.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpElement.java index 968aa6df3..b72d1c827 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpElement.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpElement.java @@ -24,6 +24,7 @@ import java.util.Set; import javax.ejb.Local; +import javax.inject.Inject; import javax.naming.ConfigurationException; import org.apache.log4j.Logger; @@ -50,7 +51,6 @@ import com.cloud.network.element.NetworkElement; import com.cloud.offering.NetworkOffering; import com.cloud.utils.component.AdapterBase; -import com.cloud.utils.component.Inject; import com.cloud.utils.db.DB; import com.cloud.utils.db.SearchCriteria.Op; import com.cloud.utils.db.SearchCriteria2; diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java index e20dd0d88..f87bf71ca 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpManagerImpl.java @@ -29,6 +29,7 @@ import java.util.Map; import javax.ejb.Local; +import javax.inject.Inject; import javax.naming.ConfigurationException; import org.apache.log4j.Logger; @@ -53,15 +54,15 @@ import com.cloud.host.dao.HostDao; import com.cloud.network.Network; import com.cloud.network.PhysicalNetworkServiceProvider; -import com.cloud.network.PhysicalNetworkVO; import com.cloud.network.dao.PhysicalNetworkDao; import com.cloud.network.dao.PhysicalNetworkServiceProviderDao; import com.cloud.network.dao.PhysicalNetworkServiceProviderVO; +import com.cloud.network.dao.PhysicalNetworkVO; import com.cloud.resource.ResourceManager; import com.cloud.resource.ResourceStateAdapter; import com.cloud.resource.ServerResource; import com.cloud.resource.UnableDeleteHostException; -import com.cloud.utils.component.Inject; +import com.cloud.utils.component.ManagerBase; import com.cloud.utils.db.DB; import com.cloud.utils.db.SearchCriteria.Op; import com.cloud.utils.db.SearchCriteria2; @@ -76,7 +77,7 @@ import com.cloud.vm.dao.UserVmDao; @Local(value = { BaremetalDhcpManager.class }) -public class BaremetalDhcpManagerImpl implements BaremetalDhcpManager, ResourceStateAdapter { +public class BaremetalDhcpManagerImpl extends ManagerBase implements BaremetalDhcpManager, ResourceStateAdapter { private static final org.apache.log4j.Logger s_logger = Logger.getLogger(BaremetalDhcpManagerImpl.class); protected String _name; @Inject @@ -129,7 +130,7 @@ protected String getDhcpServerGuid(String zoneId, String name, String ip) { @Override public boolean addVirtualMachineIntoNetwork(Network network, NicProfile nic, VirtualMachineProfile profile, DeployDestination dest, ReservationContext context) throws ResourceUnavailableException { - Long zoneId = profile.getVirtualMachine().getDataCenterIdToDeployIn(); + Long zoneId = profile.getVirtualMachine().getDataCenterId(); Long podId = profile.getVirtualMachine().getPodIdToDeployIn(); List hosts = _resourceMgr.listAllUpAndEnabledHosts(Type.BaremetalDhcp, null, podId, zoneId); if (hosts.size() == 0) { @@ -318,6 +319,9 @@ public List listBaremetalDhcps(ListBaremetalDhcpCmd cmd) @Override public List> getCommands() { - return null; + List> cmds = new ArrayList>(); + cmds.add(AddBaremetalDhcpCmd.class); + cmds.add(ListBaremetalDhcpCmd.class); + return cmds; } } diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpResourceBase.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpResourceBase.java index 054141580..4496d5d0e 100644 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpResourceBase.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpResourceBase.java @@ -41,12 +41,13 @@ import com.cloud.agent.api.StartupPxeServerCommand; import com.cloud.host.Host.Type; import com.cloud.resource.ServerResource; +import com.cloud.utils.component.ManagerBase; import com.cloud.utils.script.Script; import com.cloud.utils.ssh.SSHCmdHelper; import com.cloud.vm.VirtualMachine.State; import com.trilead.ssh2.SCPClient; -public class BaremetalDhcpResourceBase implements ServerResource { +public class BaremetalDhcpResourceBase extends ManagerBase implements ServerResource { private static final Logger s_logger = Logger.getLogger(BaremetalDhcpResourceBase.class); String _name; String _guid; diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpResponse.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpResponse.java index 952ac41a7..1875d3947 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpResponse.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalDhcpResponse.java @@ -18,12 +18,16 @@ // Automatically generated by addcopyright.py at 01/29/2013 package com.cloud.baremetal.networkservice; +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseResponse; +import org.apache.cloudstack.api.EntityReference; +import com.cloud.baremetal.database.BaremetalDhcpVO; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; +@EntityReference(value=BaremetalDhcpVO.class) public class BaremetalDhcpResponse extends BaseResponse { @SerializedName(ApiConstants.ID) @Param(description="device id of ") private String id; diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartPxeResource.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartPxeResource.java index 938b3ac1d..7a7a5153e 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartPxeResource.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartPxeResource.java @@ -14,10 +14,10 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -// +// // Automatically generated by addcopyright.py at 01/29/2013 -package com.cloud.baremetal.networkservice; - +package com.cloud.baremetal.networkservice; + import java.util.HashMap; import java.util.List; import java.util.Map; @@ -32,170 +32,171 @@ import com.cloud.agent.api.PingCommand; import com.cloud.agent.api.PingRoutingCommand; import com.cloud.agent.api.routing.VmDataCommand; +import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.Script; import com.cloud.utils.ssh.SSHCmdHelper; import com.cloud.vm.VirtualMachine.State; import com.trilead.ssh2.SCPClient; - -public class BaremetalKickStartPxeResource extends BaremetalPxeResourceBase { - private static final Logger s_logger = Logger.getLogger(BaremetalKickStartPxeResource.class); - private static final String _name = "BaremetalKickStartPxeResource"; - String _tftpDir; - - @Override - public boolean configure(String name, Map params) throws ConfigurationException { - super.configure(name, params); - _tftpDir = (String) params.get(BaremetalPxeService.PXE_PARAM_TFTP_DIR); - if (_tftpDir == null) { - throw new ConfigurationException("No tftp directory specified"); - } - - com.trilead.ssh2.Connection sshConnection = new com.trilead.ssh2.Connection(_ip, 22); - - s_logger.debug(String.format("Trying to connect to kickstart PXE server(IP=%1$s, username=%2$s, password=%3$s", _ip, _username, "******")); - try { - sshConnection.connect(null, 60000, 60000); - if (!sshConnection.authenticateWithPassword(_username, _password)) { - s_logger.debug("SSH Failed to authenticate"); - throw new ConfigurationException(String.format("Cannot connect to kickstart PXE server(IP=%1$s, username=%2$s, password=%3$s", _ip, _username, - "******")); - } - - String cmd = String.format("[ -f /%1$s/pxelinux.0 ]", _tftpDir); - if (!SSHCmdHelper.sshExecuteCmd(sshConnection, cmd)) { - throw new ConfigurationException("Miss files in TFTP directory at " + _tftpDir + " check if pxelinux.0 are here"); - } - - SCPClient scp = new SCPClient(sshConnection); - String prepareScript = "scripts/network/ping/prepare_kickstart_bootfile.py"; - String prepareScriptPath = Script.findScript("", prepareScript); - if (prepareScriptPath == null) { - throw new ConfigurationException("Can not find prepare_kickstart_bootfile.py at " + prepareScriptPath); - } - scp.put(prepareScriptPath, "/usr/bin/", "0755"); - - String cpScript = "scripts/network/ping/prepare_kickstart_kernel_initrd.py"; - String cpScriptPath = Script.findScript("", cpScript); - if (cpScriptPath == null) { - throw new ConfigurationException("Can not find prepare_kickstart_kernel_initrd.py at " + cpScriptPath); - } - scp.put(cpScriptPath, "/usr/bin/", "0755"); - - String userDataScript = "scripts/network/ping/baremetal_user_data.py"; - String userDataScriptPath = Script.findScript("", userDataScript); - if (userDataScriptPath == null) { - throw new ConfigurationException("Can not find baremetal_user_data.py at " + userDataScriptPath); - } - scp.put(userDataScriptPath, "/usr/bin/", "0755"); - - return true; - } catch (Exception e) { - throw new ConfigurationException(e.getMessage()); - } finally { - if (sshConnection != null) { - sshConnection.close(); - } - } + +public class BaremetalKickStartPxeResource extends BaremetalPxeResourceBase { + private static final Logger s_logger = Logger.getLogger(BaremetalKickStartPxeResource.class); + private static final String _name = "BaremetalKickStartPxeResource"; + String _tftpDir; + + @Override + public boolean configure(String name, Map params) throws ConfigurationException { + super.configure(name, params); + _tftpDir = (String) params.get(BaremetalPxeService.PXE_PARAM_TFTP_DIR); + if (_tftpDir == null) { + throw new ConfigurationException("No tftp directory specified"); + } + + com.trilead.ssh2.Connection sshConnection = new com.trilead.ssh2.Connection(_ip, 22); + + s_logger.debug(String.format("Trying to connect to kickstart PXE server(IP=%1$s, username=%2$s, password=%3$s", _ip, _username, "******")); + try { + sshConnection.connect(null, 60000, 60000); + if (!sshConnection.authenticateWithPassword(_username, _password)) { + s_logger.debug("SSH Failed to authenticate"); + throw new ConfigurationException(String.format("Cannot connect to kickstart PXE server(IP=%1$s, username=%2$s, password=%3$s", _ip, _username, + "******")); + } + + String cmd = String.format("[ -f /%1$s/pxelinux.0 ]", _tftpDir); + if (!SSHCmdHelper.sshExecuteCmd(sshConnection, cmd)) { + throw new ConfigurationException("Miss files in TFTP directory at " + _tftpDir + " check if pxelinux.0 are here"); + } + + SCPClient scp = new SCPClient(sshConnection); + String prepareScript = "scripts/network/ping/prepare_kickstart_bootfile.py"; + String prepareScriptPath = Script.findScript("", prepareScript); + if (prepareScriptPath == null) { + throw new ConfigurationException("Can not find prepare_kickstart_bootfile.py at " + prepareScript); + } + scp.put(prepareScriptPath, "/usr/bin/", "0755"); + + String cpScript = "scripts/network/ping/prepare_kickstart_kernel_initrd.py"; + String cpScriptPath = Script.findScript("", cpScript); + if (cpScriptPath == null) { + throw new ConfigurationException("Can not find prepare_kickstart_kernel_initrd.py at " + cpScript); + } + scp.put(cpScriptPath, "/usr/bin/", "0755"); + + String userDataScript = "scripts/network/ping/baremetal_user_data.py"; + String userDataScriptPath = Script.findScript("", userDataScript); + if (userDataScriptPath == null) { + throw new ConfigurationException("Can not find baremetal_user_data.py at " + userDataScript); + } + scp.put(userDataScriptPath, "/usr/bin/", "0755"); + + return true; + } catch (Exception e) { + throw new CloudRuntimeException(e); + } finally { + if (sshConnection != null) { + sshConnection.close(); + } + } } - - @Override - public PingCommand getCurrentStatus(long id) { - com.trilead.ssh2.Connection sshConnection = SSHCmdHelper.acquireAuthorizedConnection(_ip, _username, _password); - if (sshConnection == null) { - return null; - } else { - SSHCmdHelper.releaseSshConnection(sshConnection); - return new PingRoutingCommand(getType(), id, new HashMap()); - } + + @Override + public PingCommand getCurrentStatus(long id) { + com.trilead.ssh2.Connection sshConnection = SSHCmdHelper.acquireAuthorizedConnection(_ip, _username, _password); + if (sshConnection == null) { + return null; + } else { + SSHCmdHelper.releaseSshConnection(sshConnection); + return new PingRoutingCommand(getType(), id, new HashMap()); + } } - - private Answer execute(VmDataCommand cmd) { - com.trilead.ssh2.Connection sshConnection = new com.trilead.ssh2.Connection(_ip, 22); - try { - List vmData = cmd.getVmData(); - StringBuilder sb = new StringBuilder(); - for (String[] data : vmData) { - String folder = data[0]; - String file = data[1]; - String contents = (data[2] == null) ? "none" : data[2]; - sb.append(cmd.getVmIpAddress()); - sb.append(","); - sb.append(folder); - sb.append(","); - sb.append(file); - sb.append(","); - sb.append(contents); - sb.append(";"); - } - String arg = StringUtils.stripEnd(sb.toString(), ";"); - - sshConnection.connect(null, 60000, 60000); - if (!sshConnection.authenticateWithPassword(_username, _password)) { - s_logger.debug("SSH Failed to authenticate"); - throw new ConfigurationException(String.format("Cannot connect to PING PXE server(IP=%1$s, username=%2$s, password=%3$s", _ip, _username, - _password)); - } - - String script = String.format("python /usr/bin/baremetal_user_data.py '%s'", arg); - if (!SSHCmdHelper.sshExecuteCmd(sshConnection, script)) { - return new Answer(cmd, false, "Failed to add user data, command:" + script); - } - - return new Answer(cmd, true, "Success"); - } catch (Exception e){ - s_logger.debug("Prepare for creating baremetal template failed", e); - return new Answer(cmd, false, e.getMessage()); - } finally { - if (sshConnection != null) { - sshConnection.close(); - } - } + + private Answer execute(VmDataCommand cmd) { + com.trilead.ssh2.Connection sshConnection = new com.trilead.ssh2.Connection(_ip, 22); + try { + List vmData = cmd.getVmData(); + StringBuilder sb = new StringBuilder(); + for (String[] data : vmData) { + String folder = data[0]; + String file = data[1]; + String contents = (data[2] == null) ? "none" : data[2]; + sb.append(cmd.getVmIpAddress()); + sb.append(","); + sb.append(folder); + sb.append(","); + sb.append(file); + sb.append(","); + sb.append(contents); + sb.append(";"); + } + String arg = StringUtils.stripEnd(sb.toString(), ";"); + + sshConnection.connect(null, 60000, 60000); + if (!sshConnection.authenticateWithPassword(_username, _password)) { + s_logger.debug("SSH Failed to authenticate"); + throw new ConfigurationException(String.format("Cannot connect to PING PXE server(IP=%1$s, username=%2$s, password=%3$s", _ip, _username, + _password)); + } + + String script = String.format("python /usr/bin/baremetal_user_data.py '%s'", arg); + if (!SSHCmdHelper.sshExecuteCmd(sshConnection, script)) { + return new Answer(cmd, false, "Failed to add user data, command:" + script); + } + + return new Answer(cmd, true, "Success"); + } catch (Exception e){ + s_logger.debug("Prepare for creating baremetal template failed", e); + return new Answer(cmd, false, e.getMessage()); + } finally { + if (sshConnection != null) { + sshConnection.close(); + } + } + } + + @Override + public Answer executeRequest(Command cmd) { + if (cmd instanceof PrepareKickstartPxeServerCommand) { + return execute((PrepareKickstartPxeServerCommand) cmd); + } else if (cmd instanceof VmDataCommand) { + return execute((VmDataCommand)cmd); + } else { + return super.executeRequest(cmd); + } } - - @Override - public Answer executeRequest(Command cmd) { - if (cmd instanceof PrepareKickstartPxeServerCommand) { - return execute((PrepareKickstartPxeServerCommand) cmd); - } else if (cmd instanceof VmDataCommand) { - return execute((VmDataCommand)cmd); - } else { - return super.executeRequest(cmd); - } - } - - private Answer execute(PrepareKickstartPxeServerCommand cmd) { - com.trilead.ssh2.Connection sshConnection = new com.trilead.ssh2.Connection(_ip, 22); - try { - sshConnection.connect(null, 60000, 60000); - if (!sshConnection.authenticateWithPassword(_username, _password)) { - s_logger.debug("SSH Failed to authenticate"); - throw new ConfigurationException(String.format("Cannot connect to PING PXE server(IP=%1$s, username=%2$s, password=%3$s", _ip, _username, - _password)); + + private Answer execute(PrepareKickstartPxeServerCommand cmd) { + com.trilead.ssh2.Connection sshConnection = new com.trilead.ssh2.Connection(_ip, 22); + try { + sshConnection.connect(null, 60000, 60000); + if (!sshConnection.authenticateWithPassword(_username, _password)) { + s_logger.debug("SSH Failed to authenticate"); + throw new ConfigurationException(String.format("Cannot connect to PING PXE server(IP=%1$s, username=%2$s, password=%3$s", _ip, _username, + _password)); } - + String copyTo = String.format("%s/%s", _tftpDir, cmd.getTemplateUuid()); - String script = String.format("python /usr/bin/prepare_kickstart_kernel_initrd.py %s %s", cmd.getRepo(), copyTo); - - if (!SSHCmdHelper.sshExecuteCmd(sshConnection, script)) { - return new Answer(cmd, false, "prepare kickstart at pxe server " + _ip + " failed, command:" + script); - } - - String kernelPath = String.format("%s/vmlinuz", cmd.getTemplateUuid()); - String initrdPath = String.format("%s/initrd.img", cmd.getTemplateUuid()); - script = String.format("python /usr/bin/prepare_kickstart_bootfile.py %s %s %s %s %s %s", _tftpDir, cmd.getMac(), kernelPath, initrdPath, cmd.getKsFile(), cmd.getMac()); - if (!SSHCmdHelper.sshExecuteCmd(sshConnection, script)) { - return new Answer(cmd, false, "prepare kickstart at pxe server " + _ip + " failed, command:" + script); - } - - s_logger.debug("Prepare kickstart PXE server successfully"); - return new Answer(cmd, true, "Success"); - } catch (Exception e){ - s_logger.debug("Prepare for kickstart server failed", e); - return new Answer(cmd, false, e.getMessage()); - } finally { - if (sshConnection != null) { - sshConnection.close(); - } - } - } -} + String script = String.format("python /usr/bin/prepare_kickstart_kernel_initrd.py %s %s %s", cmd.getKernel(), cmd.getInitrd(), copyTo); + + if (!SSHCmdHelper.sshExecuteCmd(sshConnection, script)) { + return new Answer(cmd, false, "prepare kickstart at pxe server " + _ip + " failed, command:" + script); + } + + String kernelPath = String.format("%s/vmlinuz", cmd.getTemplateUuid()); + String initrdPath = String.format("%s/initrd.img", cmd.getTemplateUuid()); + script = String.format("python /usr/bin/prepare_kickstart_bootfile.py %s %s %s %s %s %s", _tftpDir, cmd.getMac(), kernelPath, initrdPath, cmd.getKsFile(), cmd.getMac()); + if (!SSHCmdHelper.sshExecuteCmd(sshConnection, script)) { + return new Answer(cmd, false, "prepare kickstart at pxe server " + _ip + " failed, command:" + script); + } + + s_logger.debug("Prepare kickstart PXE server successfully"); + return new Answer(cmd, true, "Success"); + } catch (Exception e){ + s_logger.debug("Prepare for kickstart server failed", e); + return new Answer(cmd, false, e.getMessage()); + } finally { + if (sshConnection != null) { + sshConnection.close(); + } + } + } +} diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java index 4a2369b1e..49582b078 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalKickStartServiceImpl.java @@ -14,225 +14,255 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -// +// // Automatically generated by addcopyright.py at 01/29/2013 -package com.cloud.baremetal.networkservice; - -import java.net.URI; -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.ejb.Local; - -import org.apache.log4j.Logger; - -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.baremetal.IpmISetBootDevCommand; -import com.cloud.agent.api.baremetal.IpmISetBootDevCommand.BootDev; -import com.cloud.baremetal.database.BaremetalPxeDao; -import com.cloud.baremetal.database.BaremetalPxeVO; -import com.cloud.baremetal.networkservice.BaremetalPxeManager.BaremetalPxeType; -import com.cloud.deploy.DeployDestination; -import com.cloud.host.Host; -import com.cloud.host.HostVO; -import com.cloud.host.dao.HostDetailsDao; -import com.cloud.network.NetworkVO; -import com.cloud.network.PhysicalNetworkServiceProvider; -import com.cloud.network.PhysicalNetworkVO; -import com.cloud.network.dao.NetworkDao; -import com.cloud.network.dao.PhysicalNetworkDao; -import com.cloud.network.dao.PhysicalNetworkServiceProviderDao; -import com.cloud.network.dao.PhysicalNetworkServiceProviderVO; -import com.cloud.resource.ResourceManager; -import com.cloud.resource.ServerResource; -import com.cloud.storage.VMTemplateVO; -import com.cloud.storage.dao.VMTemplateDao; -import com.cloud.uservm.UserVm; -import com.cloud.utils.component.Inject; -import com.cloud.utils.db.DB; -import com.cloud.utils.db.SearchCriteria.Op; -import com.cloud.utils.db.SearchCriteria2; -import com.cloud.utils.db.SearchCriteriaService; -import com.cloud.utils.db.Transaction; -import com.cloud.utils.exception.CloudRuntimeException; -import com.cloud.vm.NicProfile; -import com.cloud.vm.ReservationContext; -import com.cloud.vm.UserVmVO; -import com.cloud.vm.VirtualMachineProfile; - -@Local(value = BaremetalPxeService.class) -public class BaremetalKickStartServiceImpl extends BareMetalPxeServiceBase implements BaremetalPxeService { - private static final Logger s_logger = Logger.getLogger(BaremetalKickStartServiceImpl.class); - @Inject - ResourceManager _resourceMgr; - @Inject - PhysicalNetworkDao _physicalNetworkDao; - @Inject - PhysicalNetworkServiceProviderDao _physicalNetworkServiceProviderDao; - @Inject - HostDetailsDao _hostDetailsDao; - @Inject - BaremetalPxeDao _pxeDao; +package com.cloud.baremetal.networkservice; + +import java.net.URI; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +import javax.ejb.Local; +import javax.inject.Inject; + +import org.apache.log4j.Logger; + +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.baremetal.IpmISetBootDevCommand; +import com.cloud.agent.api.baremetal.IpmISetBootDevCommand.BootDev; +import com.cloud.baremetal.database.BaremetalPxeDao; +import com.cloud.baremetal.database.BaremetalPxeVO; +import com.cloud.baremetal.networkservice.BaremetalPxeManager.BaremetalPxeType; +import com.cloud.deploy.DeployDestination; +import com.cloud.host.Host; +import com.cloud.host.HostVO; +import com.cloud.host.dao.HostDetailsDao; +import com.cloud.network.PhysicalNetworkServiceProvider; +import com.cloud.network.dao.NetworkDao; +import com.cloud.network.dao.NetworkVO; +import com.cloud.network.dao.PhysicalNetworkDao; +import com.cloud.network.dao.PhysicalNetworkServiceProviderDao; +import com.cloud.network.dao.PhysicalNetworkServiceProviderVO; +import com.cloud.network.dao.PhysicalNetworkVO; +import com.cloud.resource.ResourceManager; +import com.cloud.resource.ServerResource; +import com.cloud.storage.VMTemplateVO; +import com.cloud.storage.dao.VMTemplateDao; +import com.cloud.uservm.UserVm; +import com.cloud.utils.db.DB; +import com.cloud.utils.db.SearchCriteria.Op; +import com.cloud.utils.db.SearchCriteria2; +import com.cloud.utils.db.SearchCriteriaService; +import com.cloud.utils.db.Transaction; +import com.cloud.utils.exception.CloudRuntimeException; +import com.cloud.vm.NicProfile; +import com.cloud.vm.ReservationContext; +import com.cloud.vm.UserVmVO; +import com.cloud.vm.VirtualMachineProfile; + +@Local(value = BaremetalPxeService.class) +public class BaremetalKickStartServiceImpl extends BareMetalPxeServiceBase implements BaremetalPxeService { + private static final Logger s_logger = Logger.getLogger(BaremetalKickStartServiceImpl.class); + @Inject + ResourceManager _resourceMgr; + @Inject + PhysicalNetworkDao _physicalNetworkDao; + @Inject + PhysicalNetworkServiceProviderDao _physicalNetworkServiceProviderDao; @Inject - NetworkDao _nwDao; + HostDetailsDao _hostDetailsDao; + @Inject + BaremetalPxeDao _pxeDao; + @Inject + NetworkDao _nwDao; @Inject VMTemplateDao _tmpDao; - - @Override + + @Override public boolean prepare(VirtualMachineProfile profile, NicProfile nic, DeployDestination dest, ReservationContext context) { NetworkVO nwVO = _nwDao.findById(nic.getNetworkId()); - SearchCriteriaService sc = SearchCriteria2.create(BaremetalPxeVO.class); + SearchCriteriaService sc = SearchCriteria2.create(BaremetalPxeVO.class); sc.addAnd(sc.getEntity().getDeviceType(), Op.EQ, BaremetalPxeType.KICK_START.toString()); - sc.addAnd(sc.getEntity().getPhysicalNetworkId(), Op.EQ, nwVO.getPhysicalNetworkId()); - BaremetalPxeVO pxeVo = sc.find(); - if (pxeVo == null) { - throw new CloudRuntimeException("No kickstart PXE server found in pod: " + dest.getPod().getId() + ", you need to add it before starting VM"); + sc.addAnd(sc.getEntity().getPhysicalNetworkId(), Op.EQ, nwVO.getPhysicalNetworkId()); + BaremetalPxeVO pxeVo = sc.find(); + if (pxeVo == null) { + throw new CloudRuntimeException("No kickstart PXE server found in pod: " + dest.getPod().getId() + ", you need to add it before starting VM"); } - VMTemplateVO template = _tmpDao.findById(profile.getTemplateId()); - - try { - String tpl = profile.getTemplate().getUrl(); - assert tpl != null : "How can a null template get here!!!"; - String[] tpls = tpl.split(";"); - assert tpls.length == 2 : "Template is not correctly encoded. " + tpl; - PrepareKickstartPxeServerCommand cmd = new PrepareKickstartPxeServerCommand(); - cmd.setKsFile(tpls[0]); - cmd.setRepo(tpls[1]); + VMTemplateVO template = _tmpDao.findById(profile.getTemplateId()); + + try { + String tpl = profile.getTemplate().getUrl(); + assert tpl != null : "How can a null template get here!!!"; + String[] tpls = tpl.split(";"); + CloudRuntimeException err = new CloudRuntimeException(String.format("template url[%s] is not correctly encoded. it must be in format of ks=http_link_to_kickstartfile;kernel=nfs_path_to_pxe_kernel;initrd=nfs_path_to_pxe_initrd", tpl)); + if (tpls.length != 3) { + throw err; + } + + String ks = null; + String kernel = null; + String initrd = null; + + for (String t : tpls) { + String[] kv = t.split("="); + if (kv.length != 2) { + throw err; + } + if (kv[0].equals("ks")) { + ks = kv[1]; + } else if (kv[0].equals("kernel")) { + kernel = kv[1]; + } else if (kv[0].equals("initrd")) { + initrd = kv[1]; + } else { + throw err; + } + } + + PrepareKickstartPxeServerCommand cmd = new PrepareKickstartPxeServerCommand(); + cmd.setKsFile(ks); + cmd.setInitrd(initrd); + cmd.setKernel(kernel); cmd.setMac(nic.getMacAddress()); - cmd.setTemplateUuid(template.getUuid()); - Answer aws = _agentMgr.send(pxeVo.getHostId(), cmd); - if (!aws.getResult()) { - s_logger.warn("Unable to set host: " + dest.getHost().getId() + " to PXE boot because " + aws.getDetails()); - return aws.getResult(); + cmd.setTemplateUuid(template.getUuid()); + Answer aws = _agentMgr.send(pxeVo.getHostId(), cmd); + if (!aws.getResult()) { + s_logger.warn("Unable to set host: " + dest.getHost().getId() + " to PXE boot because " + aws.getDetails()); + return aws.getResult(); } - - IpmISetBootDevCommand bootCmd = new IpmISetBootDevCommand(BootDev.pxe); - aws = _agentMgr.send(dest.getHost().getId(), bootCmd); - if (!aws.getResult()) { - s_logger.warn("Unable to set host: " + dest.getHost().getId() + " to PXE boot because " + aws.getDetails()); + + IpmISetBootDevCommand bootCmd = new IpmISetBootDevCommand(BootDev.pxe); + aws = _agentMgr.send(dest.getHost().getId(), bootCmd); + if (!aws.getResult()) { + s_logger.warn("Unable to set host: " + dest.getHost().getId() + " to PXE boot because " + aws.getDetails()); } - - return aws.getResult(); - } catch (Exception e) { - s_logger.warn("Cannot prepare PXE server", e); - return false; - } - } - - @Override - public boolean prepareCreateTemplate(Long pxeServerId, UserVm vm, String templateUrl) { - // TODO Auto-generated method stub - return false; - } - + + return aws.getResult(); + } catch (Exception e) { + s_logger.warn("Cannot prepare PXE server", e); + return false; + } + } + + @Override + public boolean prepareCreateTemplate(Long pxeServerId, UserVm vm, String templateUrl) { + // TODO Auto-generated method stub + return false; + } + @Override - @DB - public BaremetalPxeVO addPxeServer(AddBaremetalPxeCmd cmd) { - AddBaremetalKickStartPxeCmd kcmd = (AddBaremetalKickStartPxeCmd)cmd; - PhysicalNetworkVO pNetwork = null; - long zoneId; - - if (cmd.getPhysicalNetworkId() == null || cmd.getUrl() == null || cmd.getUsername() == null || cmd.getPassword() == null) { - throw new IllegalArgumentException("At least one of the required parameters(physical network id, url, username, password) is null"); - } - - pNetwork = _physicalNetworkDao.findById(cmd.getPhysicalNetworkId()); - if (pNetwork == null) { - throw new IllegalArgumentException("Could not find phyical network with ID: " + cmd.getPhysicalNetworkId()); - } - zoneId = pNetwork.getDataCenterId(); - - PhysicalNetworkServiceProviderVO ntwkSvcProvider = _physicalNetworkServiceProviderDao.findByServiceProvider(pNetwork.getId(), BaremetalPxeManager.BAREMETAL_PXE_SERVICE_PROVIDER.getName()); - if (ntwkSvcProvider == null) { - throw new CloudRuntimeException("Network Service Provider: " + BaremetalPxeManager.BAREMETAL_PXE_SERVICE_PROVIDER.getName() + - " is not enabled in the physical network: " + cmd.getPhysicalNetworkId() + "to add this device"); - } else if (ntwkSvcProvider.getState() == PhysicalNetworkServiceProvider.State.Shutdown) { - throw new CloudRuntimeException("Network Service Provider: " + ntwkSvcProvider.getProviderName() + - " is in shutdown state in the physical network: " + cmd.getPhysicalNetworkId() + "to add this device"); - } - - List pxes = _resourceMgr.listAllHostsInOneZoneByType(Host.Type.BaremetalPxe, zoneId); - if (!pxes.isEmpty()) { + @DB + public BaremetalPxeVO addPxeServer(AddBaremetalPxeCmd cmd) { + AddBaremetalKickStartPxeCmd kcmd = (AddBaremetalKickStartPxeCmd)cmd; + PhysicalNetworkVO pNetwork = null; + long zoneId; + + if (cmd.getPhysicalNetworkId() == null || cmd.getUrl() == null || cmd.getUsername() == null || cmd.getPassword() == null) { + throw new IllegalArgumentException("At least one of the required parameters(physical network id, url, username, password) is null"); + } + + pNetwork = _physicalNetworkDao.findById(cmd.getPhysicalNetworkId()); + if (pNetwork == null) { + throw new IllegalArgumentException("Could not find phyical network with ID: " + cmd.getPhysicalNetworkId()); + } + zoneId = pNetwork.getDataCenterId(); + + PhysicalNetworkServiceProviderVO ntwkSvcProvider = _physicalNetworkServiceProviderDao.findByServiceProvider(pNetwork.getId(), BaremetalPxeManager.BAREMETAL_PXE_SERVICE_PROVIDER.getName()); + if (ntwkSvcProvider == null) { + throw new CloudRuntimeException("Network Service Provider: " + BaremetalPxeManager.BAREMETAL_PXE_SERVICE_PROVIDER.getName() + + " is not enabled in the physical network: " + cmd.getPhysicalNetworkId() + "to add this device"); + } else if (ntwkSvcProvider.getState() == PhysicalNetworkServiceProvider.State.Shutdown) { + throw new CloudRuntimeException("Network Service Provider: " + ntwkSvcProvider.getProviderName() + + " is in shutdown state in the physical network: " + cmd.getPhysicalNetworkId() + "to add this device"); + } + + List pxes = _resourceMgr.listAllHostsInOneZoneByType(Host.Type.BaremetalPxe, zoneId); + if (!pxes.isEmpty()) { throw new IllegalArgumentException("Already had a PXE server zone: " + zoneId); - } - - String tftpDir = kcmd.getTftpDir(); - if (tftpDir == null) { - throw new IllegalArgumentException("No TFTP directory specified"); - } - - URI uri; - try { - uri = new URI(cmd.getUrl()); - } catch (Exception e) { - s_logger.debug(e); - throw new IllegalArgumentException(e.getMessage()); - } - String ipAddress = uri.getHost(); - - String guid = getPxeServerGuid(Long.toString(zoneId), BaremetalPxeType.KICK_START.toString(), ipAddress); - - ServerResource resource = null; - Map params = new HashMap(); - params.put(BaremetalPxeService.PXE_PARAM_ZONE, Long.toString(zoneId)); - params.put(BaremetalPxeService.PXE_PARAM_IP, ipAddress); - params.put(BaremetalPxeService.PXE_PARAM_USERNAME, cmd.getUsername()); - params.put(BaremetalPxeService.PXE_PARAM_PASSWORD, cmd.getPassword()); - params.put(BaremetalPxeService.PXE_PARAM_TFTP_DIR, tftpDir); + } + + String tftpDir = kcmd.getTftpDir(); + if (tftpDir == null) { + throw new IllegalArgumentException("No TFTP directory specified"); + } + + URI uri; + try { + uri = new URI(cmd.getUrl()); + } catch (Exception e) { + s_logger.debug(e); + throw new IllegalArgumentException(e.getMessage()); + } + String ipAddress = uri.getHost(); + + String guid = getPxeServerGuid(Long.toString(zoneId), BaremetalPxeType.KICK_START.toString(), ipAddress); + + ServerResource resource = null; + Map params = new HashMap(); + params.put(BaremetalPxeService.PXE_PARAM_ZONE, Long.toString(zoneId)); + params.put(BaremetalPxeService.PXE_PARAM_IP, ipAddress); + params.put(BaremetalPxeService.PXE_PARAM_USERNAME, cmd.getUsername()); + params.put(BaremetalPxeService.PXE_PARAM_PASSWORD, cmd.getPassword()); + params.put(BaremetalPxeService.PXE_PARAM_TFTP_DIR, tftpDir); params.put(BaremetalPxeService.PXE_PARAM_GUID, guid); resource = new BaremetalKickStartPxeResource(); try { - resource.configure("KickStart PXE resource", params); - } catch (Exception e) { - throw new CloudRuntimeException(e.getMessage(), e); + resource.configure("KickStart PXE resource", params); + } catch (Exception e) { + throw new CloudRuntimeException(e.getMessage(), e); } - - Host pxeServer = _resourceMgr.addHost(zoneId, resource, Host.Type.BaremetalPxe, params); - if (pxeServer == null) { - throw new CloudRuntimeException("Cannot add PXE server as a host"); + + Host pxeServer = _resourceMgr.addHost(zoneId, resource, Host.Type.BaremetalPxe, params); + if (pxeServer == null) { + throw new CloudRuntimeException("Cannot add PXE server as a host"); } - - BaremetalPxeVO vo = new BaremetalPxeVO(); - Transaction txn = Transaction.currentTxn(); - vo.setHostId(pxeServer.getId()); - vo.setNetworkServiceProviderId(ntwkSvcProvider.getId()); - vo.setPhysicalNetworkId(kcmd.getPhysicalNetworkId()); - vo.setDeviceType(BaremetalPxeType.KICK_START.toString()); - txn.start(); - _pxeDao.persist(vo); - txn.commit(); - return vo; - } - - @Override - public BaremetalPxeResponse getApiResponse(BaremetalPxeVO vo) { - BaremetalPxeKickStartResponse response = new BaremetalPxeKickStartResponse(); - response.setId(String.valueOf(vo.getId())); - response.setPhysicalNetworkId(String.valueOf(vo.getPhysicalNetworkId())); - response.setPodId(String.valueOf(vo.getPodId())); - Map details = _hostDetailsDao.findDetails(vo.getHostId()); - response.setTftpDir(details.get(BaremetalPxeService.PXE_PARAM_TFTP_DIR)); - return response; - } - - @Override - public List listPxeServers(ListBaremetalPxePingServersCmd cmd) { - SearchCriteriaService sc = SearchCriteria2.create(BaremetalPxeVO.class); - sc.addAnd(sc.getEntity().getDeviceType(), Op.EQ, BaremetalPxeType.KICK_START.toString()); - if (cmd.getPodId() != null) { - sc.addAnd(sc.getEntity().getPodId(), Op.EQ, cmd.getPodId()); - if (cmd.getId() != null) { - sc.addAnd(sc.getEntity().getId(), Op.EQ, cmd.getId()); - } - } - List vos = sc.list(); - List responses = new ArrayList(vos.size()); - for (BaremetalPxeVO vo : vos) { - responses.add(getApiResponse(vo)); - } - return responses; - } - -} + + BaremetalPxeVO vo = new BaremetalPxeVO(); + Transaction txn = Transaction.currentTxn(); + vo.setHostId(pxeServer.getId()); + vo.setNetworkServiceProviderId(ntwkSvcProvider.getId()); + vo.setPhysicalNetworkId(kcmd.getPhysicalNetworkId()); + vo.setDeviceType(BaremetalPxeType.KICK_START.toString()); + txn.start(); + _pxeDao.persist(vo); + txn.commit(); + return vo; + } + + @Override + public BaremetalPxeResponse getApiResponse(BaremetalPxeVO vo) { + BaremetalPxeKickStartResponse response = new BaremetalPxeKickStartResponse(); + response.setId(String.valueOf(vo.getId())); + response.setPhysicalNetworkId(String.valueOf(vo.getPhysicalNetworkId())); + response.setPodId(String.valueOf(vo.getPodId())); + Map details = _hostDetailsDao.findDetails(vo.getHostId()); + response.setTftpDir(details.get(BaremetalPxeService.PXE_PARAM_TFTP_DIR)); + return response; + } + + @Override + public List listPxeServers(ListBaremetalPxePingServersCmd cmd) { + SearchCriteriaService sc = SearchCriteria2.create(BaremetalPxeVO.class); + sc.addAnd(sc.getEntity().getDeviceType(), Op.EQ, BaremetalPxeType.KICK_START.toString()); + if (cmd.getPodId() != null) { + sc.addAnd(sc.getEntity().getPodId(), Op.EQ, cmd.getPodId()); + if (cmd.getId() != null) { + sc.addAnd(sc.getEntity().getId(), Op.EQ, cmd.getId()); + } + } + List vos = sc.list(); + List responses = new ArrayList(vos.size()); + for (BaremetalPxeVO vo : vos) { + responses.add(getApiResponse(vo)); + } + return responses; + } + + @Override + public String getPxeServiceType() { + return BaremetalPxeManager.BaremetalPxeType.KICK_START.toString(); + } + +} diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java index 99b9c4320..7b8d528b4 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeElement.java @@ -23,6 +23,7 @@ import java.util.Set; import javax.ejb.Local; +import javax.inject.Inject; import org.apache.log4j.Logger; @@ -44,7 +45,6 @@ import com.cloud.network.element.NetworkElement; import com.cloud.offering.NetworkOffering; import com.cloud.utils.component.AdapterBase; -import com.cloud.utils.component.Inject; import com.cloud.utils.db.DB; import com.cloud.utils.db.SearchCriteria.Op; import com.cloud.utils.db.SearchCriteria2; @@ -166,13 +166,11 @@ public boolean canEnableIndividualServices() { @Override public boolean destroy(Network network, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException { - // TODO Auto-generated method stub - return false; + return true; } @Override public boolean verifyServicesCombination(Set services) { - // TODO Auto-generated method stub - return false; + return true; } } diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeKickStartResponse.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeKickStartResponse.java index 09c6cc676..116de4407 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeKickStartResponse.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeKickStartResponse.java @@ -14,24 +14,27 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -// +// // Automatically generated by addcopyright.py at 01/29/2013 -package com.cloud.baremetal.networkservice; - +package com.cloud.baremetal.networkservice; + import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.EntityReference; +import com.cloud.baremetal.database.BaremetalPxeVO; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; - -public class BaremetalPxeKickStartResponse extends BaremetalPxeResponse { - @SerializedName(ApiConstants.TFTP_DIR) @Param(description="Tftp root directory of PXE server") - private String tftpDir; - - public String getTftpDir() { - return tftpDir; - } - - public void setTftpDir(String tftpDir) { - this.tftpDir = tftpDir; - } -} + +@EntityReference(value=BaremetalPxeVO.class) +public class BaremetalPxeKickStartResponse extends BaremetalPxeResponse { + @SerializedName(ApiConstants.TFTP_DIR) @Param(description="Tftp root directory of PXE server") + private String tftpDir; + + public String getTftpDir() { + return tftpDir; + } + + public void setTftpDir(String tftpDir) { + this.tftpDir = tftpDir; + } +} diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java index 94010ece5..59a28117c 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeManagerImpl.java @@ -23,10 +23,12 @@ package com.cloud.baremetal.networkservice; +import java.util.ArrayList; import java.util.List; import java.util.Map; import javax.ejb.Local; +import javax.inject.Inject; import javax.naming.ConfigurationException; import org.apache.log4j.Logger; @@ -43,8 +45,8 @@ import com.cloud.host.Host; import com.cloud.host.HostVO; import com.cloud.host.dao.HostDao; -import com.cloud.network.PhysicalNetworkVO; import com.cloud.network.dao.PhysicalNetworkDao; +import com.cloud.network.dao.PhysicalNetworkVO; import com.cloud.resource.ResourceManager; import com.cloud.resource.ResourceStateAdapter; import com.cloud.resource.ServerResource; @@ -52,8 +54,7 @@ import com.cloud.service.dao.ServiceOfferingDao; import com.cloud.uservm.UserVm; import com.cloud.utils.StringUtils; -import com.cloud.utils.component.Adapters; -import com.cloud.utils.component.Inject; +import com.cloud.utils.component.ManagerBase; import com.cloud.utils.db.SearchCriteria.Op; import com.cloud.utils.db.SearchCriteria2; import com.cloud.utils.db.SearchCriteriaService; @@ -67,15 +68,14 @@ import com.cloud.vm.dao.UserVmDao; @Local(value = {BaremetalPxeManager.class}) -public class BaremetalPxeManagerImpl implements BaremetalPxeManager, ResourceStateAdapter { +public class BaremetalPxeManagerImpl extends ManagerBase implements BaremetalPxeManager, ResourceStateAdapter { private static final org.apache.log4j.Logger s_logger = Logger.getLogger(BaremetalPxeManagerImpl.class); protected String _name; @Inject DataCenterDao _dcDao; @Inject HostDao _hostDao; @Inject AgentManager _agentMgr; @Inject ResourceManager _resourceMgr; - @Inject(adapter=BaremetalPxeService.class) - protected Adapters _services; + @Inject List _services; @Inject UserVmDao _vmDao; @Inject ServiceOfferingDao _serviceOfferingDao; @Inject NicDao _nicDao; @@ -106,14 +106,15 @@ public String getName() { } protected BaremetalPxeService getServiceByType(String type) { - BaremetalPxeService _service; - _service = _services.get(type); - if (_service == null) { - throw new CloudRuntimeException("Cannot find PXE service for " + type); + for (BaremetalPxeService service : _services) { + if (service.getPxeServiceType().equals(type)) { + return service; + } } - return _service; + + throw new CloudRuntimeException("Cannot find PXE service for " + type); } - + @Override public boolean prepare(VirtualMachineProfile profile, NicProfile nic, DeployDestination dest, ReservationContext context) { //TODO: select type from template @@ -181,7 +182,7 @@ public boolean addUserData(NicProfile nic, VirtualMachineProfile profile _vmDao.loadDetails(vm); String serviceOffering = _serviceOfferingDao.findByIdIncludingRemoved(vm.getServiceOfferingId()).getDisplayText(); - String zoneName = _dcDao.findById(vm.getDataCenterIdToDeployIn()).getName(); + String zoneName = _dcDao.findById(vm.getDataCenterId()).getName(); NicVO nvo = _nicDao.findById(nic.getId()); VmDataCommand cmd = new VmDataCommand(nvo.getIp4Address(), vm.getInstanceName()); cmd.addVmData("userdata", "user-data", vm.getUserData()); @@ -202,12 +203,12 @@ public boolean addUserData(NicProfile nic, VirtualMachineProfile profile } cmd.addVmData("metadata", "cloud-identifier", cloudIdentifier); - List phys = _phynwDao.listByZone(vm.getDataCenterIdToDeployIn()); + List phys = _phynwDao.listByZone(vm.getDataCenterId()); if (phys.isEmpty()) { - throw new CloudRuntimeException(String.format("Cannot find physical network in zone %s", vm.getDataCenterIdToDeployIn())); + throw new CloudRuntimeException(String.format("Cannot find physical network in zone %s", vm.getDataCenterId())); } if (phys.size() > 1) { - throw new CloudRuntimeException(String.format("Baremetal only supports one physical network in zone, but zone %s has %s physical networks", vm.getDataCenterIdToDeployIn(), phys.size())); + throw new CloudRuntimeException(String.format("Baremetal only supports one physical network in zone, but zone %s has %s physical networks", vm.getDataCenterId(), phys.size())); } PhysicalNetworkVO phy = phys.get(0); @@ -236,7 +237,10 @@ public boolean addUserData(NicProfile nic, VirtualMachineProfile profile @Override public List> getCommands() { - // TODO Auto-generated method stub - return null; + List> cmds = new ArrayList>(); + cmds.add(AddBaremetalKickStartPxeCmd.class); + cmds.add(AddBaremetalPxePingServerCmd.class); + cmds.add(ListBaremetalPxePingServersCmd.class); + return cmds; } } diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxePingResponse.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxePingResponse.java index adbf0530e..81bd25113 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxePingResponse.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxePingResponse.java @@ -19,10 +19,12 @@ package com.cloud.baremetal.networkservice; import org.apache.cloudstack.api.ApiConstants; +import org.apache.cloudstack.api.EntityReference; +import com.cloud.baremetal.database.BaremetalPxeVO; import com.cloud.serializer.Param; import com.google.gson.annotations.SerializedName; - +@EntityReference(value=BaremetalPxeVO.class) public class BaremetalPxePingResponse extends BaremetalPxeResponse { @SerializedName(ApiConstants.PING_STORAGE_SERVER_IP) @Param(description="PING storage server ip") private String pingStorageServerIp; diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeResourceBase.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeResourceBase.java index 34175c8b3..a90a789e9 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeResourceBase.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeResourceBase.java @@ -38,8 +38,9 @@ import com.cloud.agent.api.StartupPxeServerCommand; import com.cloud.host.Host.Type; import com.cloud.resource.ServerResource; +import com.cloud.utils.component.ManagerBase; -public class BaremetalPxeResourceBase implements ServerResource { +public class BaremetalPxeResourceBase extends ManagerBase implements ServerResource { private static final Logger s_logger = Logger.getLogger(BaremetalPxeResourceBase.class); String _name; String _guid; diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java old mode 100644 new mode 100755 index 8504f82a8..9fd560f2b --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalPxeService.java @@ -46,6 +46,8 @@ public interface BaremetalPxeService extends Adapter { List listPxeServers(ListBaremetalPxePingServersCmd cmd); + String getPxeServiceType(); + public static final String PXE_PARAM_TYPE = "type"; public static final String PXE_PARAM_ZONE = "zone"; public static final String PXE_PARAM_POD = "pod"; diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalUserdataElement.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalUserdataElement.java index b5fd6f64d..49c6fd9b9 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalUserdataElement.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/BaremetalUserdataElement.java @@ -14,144 +14,144 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -// +// // Automatically generated by addcopyright.py at 01/29/2013 -package com.cloud.baremetal.networkservice; - +package com.cloud.baremetal.networkservice; + import java.util.HashMap; - -import java.util.List; -import java.util.Map; -import java.util.Set; - -import javax.ejb.Local; - -import com.cloud.baremetal.manager.BaremetalManager; -import com.cloud.dc.DataCenter.NetworkType; -import com.cloud.deploy.DeployDestination; -import com.cloud.exception.ConcurrentOperationException; -import com.cloud.exception.InsufficientCapacityException; -import com.cloud.exception.ResourceUnavailableException; -import com.cloud.hypervisor.Hypervisor.HypervisorType; -import com.cloud.network.Network; -import com.cloud.network.Network.Capability; -import com.cloud.network.Network.GuestType; -import com.cloud.network.Network.Provider; -import com.cloud.network.Network.Service; -import com.cloud.network.Networks.TrafficType; -import com.cloud.network.PhysicalNetworkServiceProvider; -import com.cloud.network.element.IpDeployer; -import com.cloud.network.element.NetworkElement; -import com.cloud.network.element.UserDataServiceProvider; -import com.cloud.offering.NetworkOffering; -import com.cloud.uservm.UserVm; -import com.cloud.utils.component.AdapterBase; -import com.cloud.utils.component.Inject; -import com.cloud.vm.NicProfile; -import com.cloud.vm.ReservationContext; -import com.cloud.vm.VirtualMachine; + +import java.util.List; +import java.util.Map; +import java.util.Set; + +import javax.ejb.Local; +import javax.inject.Inject; + +import com.cloud.baremetal.manager.BaremetalManager; +import com.cloud.dc.DataCenter.NetworkType; +import com.cloud.deploy.DeployDestination; +import com.cloud.exception.ConcurrentOperationException; +import com.cloud.exception.InsufficientCapacityException; +import com.cloud.exception.ResourceUnavailableException; +import com.cloud.hypervisor.Hypervisor.HypervisorType; +import com.cloud.network.Network; +import com.cloud.network.Network.Capability; +import com.cloud.network.Network.GuestType; +import com.cloud.network.Network.Provider; +import com.cloud.network.Network.Service; +import com.cloud.network.Networks.TrafficType; +import com.cloud.network.PhysicalNetworkServiceProvider; +import com.cloud.network.element.IpDeployer; +import com.cloud.network.element.NetworkElement; +import com.cloud.network.element.UserDataServiceProvider; +import com.cloud.offering.NetworkOffering; +import com.cloud.uservm.UserVm; +import com.cloud.utils.component.AdapterBase; +import com.cloud.vm.NicProfile; +import com.cloud.vm.ReservationContext; +import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachineProfile; - -@Local(value = NetworkElement.class) -public class BaremetalUserdataElement extends AdapterBase implements NetworkElement, UserDataServiceProvider { + +@Local(value = NetworkElement.class) +public class BaremetalUserdataElement extends AdapterBase implements NetworkElement, UserDataServiceProvider { private static Map> capabilities; - - @Inject + + @Inject private BaremetalPxeManager pxeMgr; - - static { + + static { capabilities = new HashMap>(); - capabilities.put(Service.UserData, null); + capabilities.put(Service.UserData, null); } - - private boolean canHandle(DeployDestination dest) { - if (dest.getDataCenter().getNetworkType() == NetworkType.Basic && dest.getHost().getHypervisorType() == HypervisorType.BareMetal) { - return true; + + private boolean canHandle(DeployDestination dest) { + if (dest.getDataCenter().getNetworkType() == NetworkType.Basic && dest.getHost().getHypervisorType() == HypervisorType.BareMetal) { + return true; } - return false; + return false; } - - @Override - public boolean addPasswordAndUserdata(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, + + @Override + public boolean addPasswordAndUserdata(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, ReservationContext context) throws ConcurrentOperationException, InsufficientCapacityException, ResourceUnavailableException { - if (!canHandle(dest)) { - return false; + if (!canHandle(dest)) { + return false; } - - if (vm.getType() != VirtualMachine.Type.User) { - return false; + + if (vm.getType() != VirtualMachine.Type.User) { + return false; } - - return pxeMgr.addUserData(nic, (VirtualMachineProfile) vm); - } - - @Override - public boolean savePassword(Network network, NicProfile nic, VirtualMachineProfile vm) throws ResourceUnavailableException { - // TODO Auto-generated method stub - return false; - } - - @Override + + return pxeMgr.addUserData(nic, (VirtualMachineProfile) vm); + } + + @Override + public boolean savePassword(Network network, NicProfile nic, VirtualMachineProfile vm) throws ResourceUnavailableException { + // TODO Auto-generated method stub + return false; + } + + @Override public boolean saveSSHKey(Network network, NicProfile nic, VirtualMachineProfile vm, String SSHPublicKey) throws ResourceUnavailableException { // TODO Auto-generated method stub return false; } @Override - public Map> getCapabilities() { - return capabilities; - } - - @Override - public Provider getProvider() { - return BaremetalPxeManager.BAREMETAL_USERDATA_PROVIDER; - } - - @Override - public boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) - throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, - ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean release(Network network, NicProfile nic, VirtualMachineProfile vm, ReservationContext context) - throws ConcurrentOperationException, ResourceUnavailableException { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean shutdown(Network network, ReservationContext context, boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean isReady(PhysicalNetworkServiceProvider provider) { - return true; - } - - @Override - public boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context) throws ConcurrentOperationException, - ResourceUnavailableException { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean canEnableIndividualServices() { - // TODO Auto-generated method stub - return false; - } - + public Map> getCapabilities() { + return capabilities; + } + + @Override + public Provider getProvider() { + return BaremetalPxeManager.BAREMETAL_USERDATA_PROVIDER; + } + + @Override + public boolean implement(Network network, NetworkOffering offering, DeployDestination dest, ReservationContext context) + throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean prepare(Network network, NicProfile nic, VirtualMachineProfile vm, DeployDestination dest, + ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean release(Network network, NicProfile nic, VirtualMachineProfile vm, ReservationContext context) + throws ConcurrentOperationException, ResourceUnavailableException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean shutdown(Network network, ReservationContext context, boolean cleanup) throws ConcurrentOperationException, ResourceUnavailableException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean isReady(PhysicalNetworkServiceProvider provider) { + return true; + } + + @Override + public boolean shutdownProviderInstances(PhysicalNetworkServiceProvider provider, ReservationContext context) throws ConcurrentOperationException, + ResourceUnavailableException { + // TODO Auto-generated method stub + return false; + } + + @Override + public boolean canEnableIndividualServices() { + // TODO Auto-generated method stub + return true; + } + @Override public boolean saveUserData(Network network, NicProfile nic, VirtualMachineProfile vm) @@ -162,14 +162,12 @@ public boolean saveUserData(Network network, NicProfile nic, VirtualMachineProfi @Override public boolean destroy(Network network, ReservationContext context) throws ConcurrentOperationException, ResourceUnavailableException { - // TODO Auto-generated method stub - return false; - } - - @Override - public boolean verifyServicesCombination(Set services) { - // TODO Auto-generated method stub - return false; - } - -} + return true; + } + + @Override + public boolean verifyServicesCombination(Set services) { + return true; + } + +} diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalDhcpCmd.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalDhcpCmd.java index ba5128b6d..1dc46a8f0 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalDhcpCmd.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalDhcpCmd.java @@ -20,13 +20,15 @@ import java.util.List; +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.BaseCmd.CommandType; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; -import org.apache.cloudstack.api.PlugService; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ListResponse; import org.apache.log4j.Logger; @@ -36,11 +38,11 @@ import com.cloud.exception.NetworkRuleConflictException; import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; - +@APICommand(name="listBaremetalDhcp", description="list baremetal dhcp servers", responseObject = BaremetalDhcpResponse.class) public class ListBaremetalDhcpCmd extends BaseListCmd { private static final Logger s_logger = Logger.getLogger(ListBaremetalDhcpCmd.class); private static final String s_name = "listexternaldhcpresponse"; - @PlugService BaremetalDhcpManager _dhcpMgr; + @Inject BaremetalDhcpManager _dhcpMgr; // /////////////////////////////////////////////////// // ////////////// API parameters ///////////////////// diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalPxePingServersCmd.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalPxePingServersCmd.java index dceb8bfa8..0b418f01d 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalPxePingServersCmd.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/ListBaremetalPxePingServersCmd.java @@ -20,13 +20,15 @@ import java.util.List; +import javax.inject.Inject; + +import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiErrorCode; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.BaseCmd.CommandType; import org.apache.cloudstack.api.BaseListCmd; import org.apache.cloudstack.api.Parameter; -import org.apache.cloudstack.api.PlugService; import org.apache.cloudstack.api.ServerApiException; import org.apache.cloudstack.api.response.ListResponse; import org.apache.log4j.Logger; @@ -36,12 +38,12 @@ import com.cloud.exception.NetworkRuleConflictException; import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; - +@APICommand(name="listBaremetalPxePingServer", description="list baremetal ping pxe server", responseObject = BaremetalPxePingResponse.class) public class ListBaremetalPxePingServersCmd extends BaseListCmd { private static final Logger s_logger = Logger.getLogger(ListBaremetalPxePingServersCmd.class); private static final String s_name = "listpingpxeserverresponse"; - @PlugService + @Inject BaremetalPxeManager _pxeMgr; // /////////////////////////////////////////////////// // ////////////// API parameters ///////////////////// diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/PrepareKickstartPxeServerCommand.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/PrepareKickstartPxeServerCommand.java index 895154750..a98997938 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/PrepareKickstartPxeServerCommand.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/PrepareKickstartPxeServerCommand.java @@ -14,61 +14,70 @@ // KIND, either express or implied. See the License for the // specific language governing permissions and limitations // under the License. -// +// // Automatically generated by addcopyright.py at 01/29/2013 -package com.cloud.baremetal.networkservice; - -import com.cloud.agent.api.Command; - -public class PrepareKickstartPxeServerCommand extends Command { +package com.cloud.baremetal.networkservice; + +import com.cloud.agent.api.Command; + +public class PrepareKickstartPxeServerCommand extends Command { private String ksFile; - private String repo; - private String templateUuid; - private String mac; - private String ksDevice; - - @Override - public boolean executeInSequence() { - return true; - } - - public String getKsFile() { - return ksFile; - } - - public void setKsFile(String ksFile) { - this.ksFile = ksFile; - } - - public String getRepo() { - return repo; - } - - public void setRepo(String repo) { - this.repo = repo; - } - - public String getTemplateUuid() { - return templateUuid; - } - - public void setTemplateUuid(String templateUuid) { - this.templateUuid = templateUuid; - } - - public String getMac() { - return mac; - } - - public void setMac(String mac) { - this.mac = mac; - } - - public String getKsDevice() { - return ksDevice; - } - - public void setKsDevice(String ksDevice) { - this.ksDevice = ksDevice; - } -} + private String templateUuid; + private String mac; + private String ksDevice; + private String kernel; + private String initrd; + + @Override + public boolean executeInSequence() { + return true; + } + + public String getKsFile() { + return ksFile; + } + + public void setKsFile(String ksFile) { + this.ksFile = ksFile; + } + + public String getKernel() { + return kernel; + } + + public void setKernel(String kernel) { + this.kernel = kernel; + } + + public String getInitrd() { + return initrd; + } + + public void setInitrd(String initrd) { + this.initrd = initrd; + } + + public String getTemplateUuid() { + return templateUuid; + } + + public void setTemplateUuid(String templateUuid) { + this.templateUuid = templateUuid; + } + + public String getMac() { + return mac; + } + + public void setMac(String mac) { + this.mac = mac; + } + + public String getKsDevice() { + return ksDevice; + } + + public void setKsDevice(String ksDevice) { + this.ksDevice = ksDevice; + } +} diff --git a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/SecurityGroupHttpClient.java b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/SecurityGroupHttpClient.java index 7ad351c2e..b9c2e8484 100755 --- a/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/SecurityGroupHttpClient.java +++ b/plugins/hypervisors/baremetal/src/com/cloud/baremetal/networkservice/SecurityGroupHttpClient.java @@ -1,38 +1,38 @@ -// 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. -// -// Automatically generated by addcopyright.py at 01/29/2013 -// Apache License, Version 2.0 (the "License"); you may not use this -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -package com.cloud.baremetal.networkservice; - -import com.cloud.agent.api.Answer; -import com.cloud.agent.api.SecurityGroupRulesCmd; - -public class SecurityGroupHttpClient { - - public Answer call(String guestIp, SecurityGroupRulesCmd cmd) { - // TODO Auto-generated method stub - return null; - } - - public boolean echo(String ip, long millis, long millis2) { - // TODO Auto-generated method stub - return false; - } - -} +// 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. +// +// Automatically generated by addcopyright.py at 01/29/2013 +// Apache License, Version 2.0 (the "License"); you may not use this +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +package com.cloud.baremetal.networkservice; + +import com.cloud.agent.api.Answer; +import com.cloud.agent.api.SecurityGroupRulesCmd; + +public class SecurityGroupHttpClient { + + public Answer call(String guestIp, SecurityGroupRulesCmd cmd) { + // TODO Auto-generated method stub + return null; + } + + public boolean echo(String ip, long millis, long millis2) { + // TODO Auto-generated method stub + return false; + } + +} diff --git a/plugins/hypervisors/kvm/pom.xml b/plugins/hypervisors/kvm/pom.xml index 8fc8f7394..613c81766 100644 --- a/plugins/hypervisors/kvm/pom.xml +++ b/plugins/hypervisors/kvm/pom.xml @@ -1,29 +1,22 @@ - - + + 4.0.0 cloud-plugin-hypervisor-kvm Apache CloudStack Plugin - Hypervisor KVM org.apache.cloudstack cloudstack-plugins - 4.1.0-SNAPSHOT + 4.2.0-SNAPSHOT ../../pom.xml @@ -41,77 +34,88 @@ org.libvirt libvirt - 0.4.9 + ${cs.libvirt-java.version} - 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 - + install + src + test + + + org.apache.maven.plugins + maven-dependency-plugin + 2.5.1 + + + copy-dependencies package - copy-resources + copy-dependencies - dist - - - target - - kvm-agent.zip - - - - + ${project.build.directory}/dependencies + runtime + org.apache.maven.plugins - maven-dependency-plugin - 2.5.1 + maven-surefire-plugin + 2.14 + + + **/Qemu*.java + + + + + maven-assembly-plugin + 2.3 + + kvm-agent + false + + agent-descriptor.xml + + - copy-dependencies + make-agent package - copy-dependencies + single + + + + + + maven-resources-plugin + 2.6 + + + copy-resources + + package + + copy-resources - target/dependencies - runtime + dist + + + target + + kvm-agent.zip + + + + diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/DirectVifDriver.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/DirectVifDriver.java new file mode 100644 index 000000000..1946d74a4 --- /dev/null +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/DirectVifDriver.java @@ -0,0 +1,65 @@ +/* + * 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.hypervisor.kvm.resource; + +import com.cloud.agent.api.to.NicTO; +import com.cloud.exception.InternalErrorException; +import com.cloud.network.Networks; +import org.apache.log4j.Logger; +import org.libvirt.LibvirtException; + +import javax.naming.ConfigurationException; +import java.util.Map; + +public class DirectVifDriver extends VifDriverBase { + + private static final Logger s_logger = Logger.getLogger(DirectVifDriver.class); + + /** + * Experimental driver to configure direct networking in libvirt. This should only + * be used on an LXC cluster that does not run any system VMs. + * + * @param nic + * @param guestOsType + * @return + * @throws InternalErrorException + * @throws LibvirtException + */ + public LibvirtVMDef.InterfaceDef plug(NicTO nic, String guestOsType) throws InternalErrorException, + LibvirtException { + LibvirtVMDef.InterfaceDef intf = new LibvirtVMDef.InterfaceDef(); + + if (nic.getType() == Networks.TrafficType.Guest) { + intf.defDirectNet(_libvirtComputingResource.getNetworkDirectDevice(), null, nic.getMac(), getGuestNicModel(guestOsType), + _libvirtComputingResource.getNetworkDirectSourceMode()); + + } else if (nic.getType() == Networks.TrafficType.Public) { + intf.defDirectNet(_libvirtComputingResource.getNetworkDirectDevice(), null, nic.getMac(), getGuestNicModel(guestOsType), + _libvirtComputingResource.getNetworkDirectSourceMode()); + } + + return intf; + } + + public void unplug(LibvirtVMDef.InterfaceDef iface) { + // not needed, libvirt will cleanup + } + +} \ No newline at end of file diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java index af89d9b18..d067b3590 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/KVMHABase.java @@ -23,6 +23,7 @@ import java.util.concurrent.Executors; import java.util.concurrent.Future; +import org.apache.log4j.Logger; import org.libvirt.LibvirtException; import org.libvirt.StoragePool; import org.libvirt.StoragePoolInfo; @@ -33,6 +34,7 @@ import com.cloud.utils.script.Script; public class KVMHABase { + private static final Logger s_logger = Logger.getLogger(KVMHABase.class); private long _timeout = 60000; /* 1 minutes */ protected static String _heartBeatPath; protected long _heartBeatUpdateTimeout = 60000; @@ -124,14 +126,14 @@ protected String getMountPoint(NfsStoragePool storagePool) { } poolName = pool.getName(); } catch (LibvirtException e) { - + s_logger.debug("Ignoring libvirt error.", e); } finally { try { if (pool != null) { pool.free(); } } catch (LibvirtException e) { - + s_logger.debug("Ignoring libvirt error.", e); } } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java index 2ed8478a6..362e0a53e 100755 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtComputingResource.java @@ -25,9 +25,7 @@ import java.io.IOException; import java.io.InputStream; import java.io.InputStreamReader; -import java.lang.reflect.InvocationTargetException; import java.net.InetAddress; -import java.net.URI; import java.net.URISyntaxException; import java.net.URL; import java.net.URLConnection; @@ -43,21 +41,26 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.Properties; -import java.util.regex.Pattern; -import java.util.regex.Matcher; import java.util.Set; +import java.util.HashSet; +import java.util.Properties; import java.util.UUID; import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ExecutionException; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.Future; +import java.util.regex.Matcher; +import java.util.regex.Pattern; import javax.ejb.Local; import javax.naming.ConfigurationException; import org.apache.log4j.Logger; +import org.apache.cloudstack.utils.qemu.QemuImg.PhysicalDiskFormat; +import org.apache.cloudstack.utils.qemu.QemuImg; +import org.apache.cloudstack.utils.qemu.QemuImgFile; +import org.apache.cloudstack.utils.qemu.QemuImgException; import org.libvirt.Connect; import org.libvirt.Domain; import org.libvirt.DomainInfo; @@ -111,6 +114,7 @@ import com.cloud.agent.api.ModifyStoragePoolAnswer; import com.cloud.agent.api.ModifyStoragePoolCommand; import com.cloud.agent.api.NetworkRulesSystemVmCommand; +import com.cloud.agent.api.NetworkRulesVmSecondaryIpCommand; import com.cloud.agent.api.NetworkUsageAnswer; import com.cloud.agent.api.NetworkUsageCommand; import com.cloud.agent.api.PingCommand; @@ -169,13 +173,20 @@ import com.cloud.agent.api.to.StorageFilerTO; import com.cloud.agent.api.to.VirtualMachineTO; import com.cloud.agent.api.to.VolumeTO; +import com.cloud.agent.resource.virtualnetwork.VirtualRoutingResource; +import com.cloud.dc.Vlan; +import com.cloud.exception.InternalErrorException; +import com.cloud.host.Host.Type; +import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.hypervisor.kvm.resource.KVMHABase.NfsStoragePool; +import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.ClockDef; import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.ConsoleDef; import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.CpuTuneDef; import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DevicesDef; import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef; import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.DiskDef.diskProtocol; import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.FeaturesDef; +import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.FilesystemDef; import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.GraphicDef; import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.GuestDef; import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.GuestResourceDef; @@ -183,17 +194,11 @@ import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.InterfaceDef; import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.InterfaceDef.hostNicType; import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.SerialDef; +import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.VirtioSerialDef; import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.TermPolicy; -import com.cloud.hypervisor.kvm.resource.LibvirtVMDef.ClockDef; -import com.cloud.agent.resource.virtualnetwork.VirtualRoutingResource; import com.cloud.hypervisor.kvm.storage.KVMPhysicalDisk; -import com.cloud.hypervisor.kvm.storage.KVMPhysicalDisk.PhysicalDiskFormat; import com.cloud.hypervisor.kvm.storage.KVMStoragePool; import com.cloud.hypervisor.kvm.storage.KVMStoragePoolManager; -import com.cloud.dc.Vlan; -import com.cloud.exception.InternalErrorException; -import com.cloud.host.Host.Type; -import com.cloud.hypervisor.Hypervisor.HypervisorType; import com.cloud.network.Networks.BroadcastDomainType; import com.cloud.network.Networks.IsolationType; import com.cloud.network.Networks.RouterPrivateIpStrategy; @@ -201,6 +206,7 @@ import com.cloud.network.PhysicalNetworkSetupInfo; import com.cloud.resource.ServerResource; import com.cloud.resource.ServerResourceBase; +import com.cloud.storage.JavaStorageLayer; import com.cloud.storage.Storage; import com.cloud.storage.Storage.ImageFormat; import com.cloud.storage.Storage.StoragePoolType; @@ -213,8 +219,8 @@ import com.cloud.storage.template.TemplateLocation; import com.cloud.utils.NumbersUtil; import com.cloud.utils.Pair; +import com.cloud.utils.FileUtil; import com.cloud.utils.PropertiesUtil; -import com.cloud.utils.component.ComponentLocator; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.net.NetUtils; import com.cloud.utils.script.OutputInterpreter; @@ -248,13 +254,13 @@ **/ @Local(value = { ServerResource.class }) public class LibvirtComputingResource extends ServerResourceBase implements - ServerResource { +ServerResource { private static final Logger s_logger = Logger .getLogger(LibvirtComputingResource.class); private String _modifyVlanPath; private String _versionstringpath; - private String _patchdomrPath; + private String _patchViaSocketPath; private String _createvmPath; private String _manageSnapshotPath; private String _resizeVolumePath; @@ -278,7 +284,11 @@ public class LibvirtComputingResource extends ServerResourceBase implements private String _mountPoint = "/mnt"; StorageLayer _storage; private KVMStoragePoolManager _storagePoolMgr; - private VifDriver _vifDriver; + + private VifDriver _defaultVifDriver; + private Map _trafficTypeVifDrivers; + protected static final String DEFAULT_OVS_VIF_DRIVER_CLASS_NAME = "com.cloud.hypervisor.kvm.resource.OvsVifDriver"; + protected static final String DEFAULT_BRIDGE_VIF_DRIVER_CLASS_NAME = "com.cloud.hypervisor.kvm.resource.BridgeVifDriver"; private static final class KeyValueInterpreter extends OutputInterpreter { private final Map map = new HashMap(); @@ -317,9 +327,11 @@ protected String getDefaultScriptsDir() { + " {1}" + " " + " "); - protected String _hypervisorType; + protected HypervisorType _hypervisorType; protected String _hypervisorURI; protected String _hypervisorPath; + protected String _networkDirectSourceMode; + protected String _networkDirectDevice; protected String _sysvmISOPath; protected String _privNwName; protected String _privBridgeName; @@ -332,8 +344,8 @@ protected String getDefaultScriptsDir() { private boolean _can_bridge_firewall; protected String _localStoragePath; protected String _localStorageUUID; - private Map _pifs = new HashMap(); - private Map> hostNetInfo = new HashMap>(); + private final Map _pifs = new HashMap(); + private final Map> hostNetInfo = new HashMap>(); private final Map _vmStats = new ConcurrentHashMap(); protected boolean _disconnected = true; @@ -365,15 +377,11 @@ protected String getDefaultScriptsDir() { private String _pingTestPath; private int _dom0MinMem; - + protected enum BridgeType { NATIVE, OPENVSWITCH } - protected enum defineOps { - UNDEFINE_VM, DEFINE_VM - } - protected BridgeType _bridgeType; private String getEndIpFromStartIp(String startIp, int numIps) { @@ -384,12 +392,13 @@ private String getEndIpFromStartIp(String startIp, int numIps) { tokens[3] = Integer.toString(lastbyte); StringBuilder end = new StringBuilder(15); end.append(tokens[0]).append(".").append(tokens[1]).append(".") - .append(tokens[2]).append(".").append(tokens[3]); + .append(tokens[2]).append(".").append(tokens[3]); return end.toString(); } private Map getDeveloperProperties() throws ConfigurationException { + final File file = PropertiesUtil.findConfigFile("developer.properties"); if (file == null) { throw new ConfigurationException( @@ -445,6 +454,14 @@ protected String getDefaultDomrScriptsDir() { return "scripts/network/domr/kvm"; } + protected String getNetworkDirectSourceMode() { + return _networkDirectSourceMode; + } + + protected String getNetworkDirectDevice() { + return _networkDirectDevice; + } + @Override public boolean configure(String name, Map params) throws ConfigurationException { @@ -453,16 +470,8 @@ public boolean configure(String name, Map params) return false; } - try { - Class clazz = Class - .forName("com.cloud.storage.JavaStorageLayer"); - _storage = (StorageLayer) ComponentLocator.inject(clazz); - _storage.configure("StorageLayer", params); - } catch (ClassNotFoundException e) { - throw new ConfigurationException("Unable to find class " - + "com.cloud.storage.JavaStorageLayer"); - } - + _storage = new JavaStorageLayer(); + _storage.configure("StorageLayer", params); String domrScriptsDir = (String) params.get("domr.scripts.dir"); if (domrScriptsDir == null) { @@ -483,7 +492,7 @@ public boolean configure(String name, Map params) if (storageScriptsDir == null) { storageScriptsDir = getDefaultStorageScriptsDir(); } - + String bridgeType = (String) params.get("network.bridge.type"); if (bridgeType == null) { _bridgeType = BridgeType.NATIVE; @@ -528,10 +537,10 @@ public boolean configure(String name, Map params) throw new ConfigurationException("Unable to find versions.sh"); } - _patchdomrPath = Script.findScript(kvmScriptsDir + "/patch/", - "rundomrpre.sh"); - if (_patchdomrPath == null) { - throw new ConfigurationException("Unable to find rundomrpre.sh"); + _patchViaSocketPath = Script.findScript(kvmScriptsDir + "/patch/", + "patchviasocket.pl"); + if (_patchViaSocketPath == null) { + throw new ConfigurationException("Unable to find patchviasocket.pl"); } _heartBeatPath = Script.findScript(kvmScriptsDir, "kvmheartbeat.sh"); @@ -592,15 +601,19 @@ public boolean configure(String name, Map params) String instance = (String) params.get("instance"); - _hypervisorType = (String) params.get("hypervisor.type"); - if (_hypervisorType == null) { - _hypervisorType = "kvm"; + _hypervisorType = HypervisorType.getType((String) params.get("hypervisor.type")); + if (_hypervisorType == HypervisorType.None) { + _hypervisorType = HypervisorType.KVM; } _hypervisorURI = (String) params.get("hypervisor.uri"); if (_hypervisorURI == null) { - _hypervisorURI = "qemu:///system"; + _hypervisorURI = LibvirtConnection.getHypervisorURI(_hypervisorType.toString()); } + + _networkDirectSourceMode = (String) params.get("network.direct.source.mode"); + _networkDirectDevice = (String) params.get("network.direct.device"); + String startMac = (String) params.get("private.macaddr.start"); if (startMac == null) { startMac = "00:16:3e:77:e2:a0"; @@ -653,6 +666,9 @@ public boolean configure(String name, Map params) if (_localStoragePath == null) { _localStoragePath = "/var/lib/libvirt/images/"; } + + File storagePath = new File(_localStoragePath); + _localStoragePath = storagePath.getAbsolutePath(); _localStorageUUID = (String) params.get("local.storage.uuid"); if (_localStorageUUID == null) { @@ -686,12 +702,14 @@ public boolean configure(String name, Map params) throw new CloudRuntimeException(e.getMessage()); } - /* Does node support HVM guest? If not, exit */ - if (!IsHVMEnabled(conn)) { - throw new ConfigurationException( - "NO HVM support on this machine, please make sure: " - + "1. VT/SVM is supported by your CPU, or is enabled in BIOS. " - + "2. kvm modules are loaded (kvm, kvm_amd|kvm_intel)"); + if (HypervisorType.KVM == _hypervisorType) { + /* Does node support HVM guest? If not, exit */ + if (!IsHVMEnabled(conn)) { + throw new ConfigurationException( + "NO HVM support on this machine, please make sure: " + + "1. VT/SVM is supported by your CPU, or is enabled in BIOS. " + + "2. kvm modules are loaded (kvm, kvm_amd|kvm_intel)"); + } } _hypervisorPath = getHypervisorPath(conn); @@ -699,7 +717,7 @@ public boolean configure(String name, Map params) _hvVersion = conn.getVersion(); _hvVersion = (_hvVersion % 1000000) / 1000; } catch (LibvirtException e) { - + s_logger.trace("Ignoring libvirt error.", e); } String[] info = NetUtils.getNetworkParams(_privateNic); @@ -712,10 +730,7 @@ public boolean configure(String name, Map params) _sysvmISOPath = (String) params.get("systemvm.iso.path"); if (_sysvmISOPath == null) { - String[] isoPaths = { "/usr/lib64/cloud/agent/vms/systemvm.iso", - "/usr/lib/cloud/agent/vms/systemvm.iso", - "/usr/lib64/cloud/common/vms/systemvm.iso", - "/usr/lib/cloud/common/vms/systemvm.iso" }; + String[] isoPaths = {"/usr/share/cloudstack-common/vms/systemvm.iso"}; for (String isoPath : isoPaths) { if (_storage.exists(isoPath)) { _sysvmISOPath = isoPath; @@ -733,7 +748,7 @@ public boolean configure(String name, Map params) break; case NATIVE: default: - getPifs(); + getPifs(); break; } @@ -762,7 +777,7 @@ public boolean configure(String name, Map params) if (_mountPoint == null) { _mountPoint = "/mnt"; } - + value = (String) params.get("vm.migrate.speed"); _migrateSpeed = NumbersUtil.parseInt(value, -1); if (_migrateSpeed == -1) { @@ -774,8 +789,8 @@ public boolean configure(String name, Map params) if (tokens.length == 2) { try { _migrateSpeed = Integer.parseInt(tokens[0]); - } catch (Exception e) { - + } catch (NumberFormatException e) { + s_logger.trace("Ignoring migrateSpeed extraction error.", e); } s_logger.debug("device " + _pifs.get("public") + " has speed: " + String.valueOf(_migrateSpeed)); } @@ -789,36 +804,98 @@ public boolean configure(String name, Map params) bridges.put("private", _privBridgeName); bridges.put("guest", _guestBridgeName); - params.put("libvirt.host.bridges", (Object) bridges); - params.put("libvirt.host.pifs", (Object) _pifs); + params.put("libvirt.host.bridges", bridges); + params.put("libvirt.host.pifs", _pifs); + + params.put("libvirt.computing.resource", this); + + configureVifDrivers(params); + + return true; + } + + protected void configureVifDrivers(Map params) + throws ConfigurationException { + final String LIBVIRT_VIF_DRIVER = "libvirt.vif.driver"; - // Load the vif driver - String vifDriverName = (String) params.get("libvirt.vif.driver"); - if (vifDriverName == null) { + _trafficTypeVifDrivers = new HashMap(); + + // Load the default vif driver + String defaultVifDriverName = (String) params.get(LIBVIRT_VIF_DRIVER); + if (defaultVifDriverName == null) { if (_bridgeType == BridgeType.OPENVSWITCH) { - s_logger.info("No libvirt.vif.driver specififed. Defaults to OvsVifDriver."); - vifDriverName = "com.cloud.hypervisor.kvm.resource.OvsVifDriver"; + s_logger.info("No libvirt.vif.driver specified. Defaults to OvsVifDriver."); + defaultVifDriverName = DEFAULT_OVS_VIF_DRIVER_CLASS_NAME; } else { - s_logger.info("No libvirt.vif.driver specififed. Defaults to BridgeVifDriver."); - vifDriverName = "com.cloud.hypervisor.kvm.resource.BridgeVifDriver"; + s_logger.info("No libvirt.vif.driver specified. Defaults to BridgeVifDriver."); + defaultVifDriverName = DEFAULT_BRIDGE_VIF_DRIVER_CLASS_NAME; + } + } + _defaultVifDriver = getVifDriverClass(defaultVifDriverName, params); + + // Load any per-traffic-type vif drivers + for (Map.Entry entry : params.entrySet()) + { + String k = entry.getKey(); + String vifDriverPrefix = LIBVIRT_VIF_DRIVER + "."; + + if(k.startsWith(vifDriverPrefix)){ + // Get trafficType + String trafficTypeSuffix = k.substring(vifDriverPrefix.length()); + + // Does this suffix match a real traffic type? + TrafficType trafficType = TrafficType.getTrafficType(trafficTypeSuffix); + if(!trafficType.equals(TrafficType.None)){ + // Get vif driver class name + String vifDriverClassName = (String) entry.getValue(); + // if value is null, ignore + if(vifDriverClassName != null){ + // add traffic type to vif driver mapping to Map + _trafficTypeVifDrivers.put(trafficType, + getVifDriverClass(vifDriverClassName, params)); + } + } } } + } - params.put("libvirt.computing.resource", (Object) this); + protected VifDriver getVifDriverClass(String vifDriverClassName, Map params) + throws ConfigurationException { + VifDriver vifDriver; try { - Class clazz = Class.forName(vifDriverName); - _vifDriver = (VifDriver) clazz.newInstance(); - _vifDriver.configure(params); + Class clazz = Class.forName(vifDriverClassName); + vifDriver = (VifDriver) clazz.newInstance(); + vifDriver.configure(params); } catch (ClassNotFoundException e) { throw new ConfigurationException("Unable to find class for libvirt.vif.driver " + e); } catch (InstantiationException e) { throw new ConfigurationException("Unable to instantiate class for libvirt.vif.driver " + e); - } catch (Exception e) { - throw new ConfigurationException("Failed to initialize libvirt.vif.driver " + e); + } catch (IllegalAccessException e) { + throw new ConfigurationException("Unable to instantiate class for libvirt.vif.driver " + e); } + return vifDriver; + } - return true; + protected VifDriver getVifDriver(TrafficType trafficType){ + VifDriver vifDriver = _trafficTypeVifDrivers.get(trafficType); + + if(vifDriver == null){ + vifDriver = _defaultVifDriver; + } + + return vifDriver; + } + + protected List getAllVifDrivers(){ + Set vifDrivers = new HashSet(); + + vifDrivers.add(_defaultVifDriver); + vifDrivers.addAll(_trafficTypeVifDrivers.values()); + + ArrayList vifDriverList = new ArrayList(vifDrivers); + + return vifDriverList; } private void getPifs() { @@ -848,7 +925,7 @@ private void getPifs() { } s_logger.debug("done looking for pifs, no more bridges"); } - + private void getOvsPifs() { String cmdout = Script.runSimpleBashScript("ovs-vsctl list-br | sed '{:q;N;s/\\n/%/g;t q}'"); s_logger.debug("cmdout was " + cmdout); @@ -872,7 +949,7 @@ private void getOvsPifs() { private String getPif(String bridge) { String pif = matchPifFileInDirectory(bridge); - File vlanfile = new File("/proc/net/vlan" + pif); + File vlanfile = new File("/proc/net/vlan/" + pif); if (vlanfile.isFile()) { pif = Script.runSimpleBashScript("grep ^Device\\: /proc/net/vlan/" @@ -940,7 +1017,7 @@ private boolean checkBridgeNetwork(String networkName) { return true; } } - + private boolean checkOvsNetwork(String networkName) { s_logger.debug("Checking if network " + networkName + " exists as openvswitch bridge"); if (networkName == null) { @@ -962,13 +1039,11 @@ private String getVnetId(String vnetId) { return vnetId; } - private void patchSystemVm(String cmdLine, String dataDiskPath, - String vmName) throws InternalErrorException { + private void passCmdLine(String vmName, String cmdLine) + throws InternalErrorException { + final Script command = new Script(_patchViaSocketPath, _timeout, s_logger); String result; - final Script command = new Script(_patchdomrPath, _timeout, s_logger); - command.add("-l", vmName); - command.add("-t", "all"); - command.add("-d", dataDiskPath); + command.add("-n",vmName); command.add("-p", cmdLine.replaceAll(" ", "%")); result = command.execute(); if (result != null) { @@ -989,76 +1064,21 @@ boolean isDirectAttachedNetwork(String type) { } } - protected String startDomain(Connect conn, String vmName, String domainXML) + protected String startVM(Connect conn, String vmName, String domainXML) throws LibvirtException, InternalErrorException { - /* No duplicated vm, we will success, or failed */ - boolean failed = false; - Domain dm = null; try { - dm = conn.domainDefineXML(domainXML); - } catch (final LibvirtException e) { - /* Duplicated defined vm */ - s_logger.warn("Failed to define domain " + vmName + ": " - + e.getMessage()); - failed = true; - } finally { - try { - if (dm != null) { - dm.free(); - } - } catch (final LibvirtException e) { - - } - } - - /* If failed, undefine the vm */ - Domain dmOld = null; - Domain dmNew = null; - try { - if (failed) { - dmOld = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName - .getBytes())); - dmOld.undefine(); - dmNew = conn.domainDefineXML(domainXML); - } + /* + We create a transient domain here. When this method gets + called we receive a full XML specification of the guest, + so no need to define it persistent. + + This also makes sure we never have any old "garbage" defined + in libvirt which might haunt us. + */ + conn.domainCreateXML(domainXML, 0); } catch (final LibvirtException e) { - s_logger.warn("Failed to define domain (second time) " + vmName - + ": " + e.getMessage()); - throw e; - } catch (Exception e) { - s_logger.warn("Failed to define domain (second time) " + vmName - + ": " + e.getMessage()); - throw new InternalErrorException(e.toString()); - } finally { - try { - if (dmOld != null) { - dmOld.free(); - } - if (dmNew != null) { - dmNew.free(); - } - } catch (final LibvirtException e) { - - } - } - - /* Start the VM */ - try { - dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName - .getBytes())); - dm.create(); - } catch (LibvirtException e) { - s_logger.warn("Failed to start domain: " + vmName + ": " - + e.getMessage()); - throw e; - } finally { - try { - if (dm != null) { - dm.free(); - } - } catch (final LibvirtException e) { - - } + s_logger.warn("Failed to start domain " + vmName + ": " + + e.getMessage(), e); } return null; } @@ -1069,33 +1089,12 @@ public boolean stop() { Connect conn = LibvirtConnection.getConnection(); conn.close(); } catch (LibvirtException e) { + s_logger.trace("Ignoring libvirt error.", e); } return true; } - public static void main(String[] args) { - s_logger.addAppender(new org.apache.log4j.ConsoleAppender( - new org.apache.log4j.PatternLayout(), "System.out")); - LibvirtComputingResource test = new LibvirtComputingResource(); - Map params = new HashMap(); - try { - test.configure("test", params); - } catch (ConfigurationException e) { - System.out.println(e.getMessage()); - e.printStackTrace(); - } - String result = null; - // String result = test.startDomainRouter("domr1", - // "/var/lib/images/centos.5-4.x86-64/centos-small.img", 128, "0064", - // "02:00:30:00:01:01", "00:16:3e:77:e2:a1", "02:00:30:00:64:01"); - boolean created = (result == null); - s_logger.info("Domain " + (created ? " " : " not ") + " created"); - - s_logger.info("Rule " + (created ? " " : " not ") + " created"); - test.stop(); - } - @Override public Answer executeRequest(Command cmd) { @@ -1202,6 +1201,8 @@ public Answer executeRequest(Command cmd) { return execute((ResizeVolumeCommand) cmd); } else if (cmd instanceof CheckNetworkCommand) { return execute((CheckNetworkCommand) cmd); + } else if (cmd instanceof NetworkRulesVmSecondaryIpCommand) { + return execute((NetworkRulesVmSecondaryIpCommand) cmd); } else { s_logger.warn("Unsupported command "); return Answer.createUnsupportedCommandAnswer(cmd); @@ -1241,10 +1242,23 @@ private CopyVolumeAnswer execute(CopyVolumeCommand cmd) { StorageFilerTO pool = cmd.getPool(); String secondaryStorageUrl = cmd.getSecondaryStorageURL(); KVMStoragePool secondaryStoragePool = null; + KVMStoragePool primaryPool = null; try { - KVMStoragePool primaryPool = _storagePoolMgr.getStoragePool( - pool.getType(), - pool.getUuid()); + try { + primaryPool = _storagePoolMgr.getStoragePool( + pool.getType(), + pool.getUuid()); + } catch (CloudRuntimeException e) { + if (e.getMessage().contains("not found")) { + primaryPool = _storagePoolMgr.createStoragePool(cmd.getPool().getUuid(), + cmd.getPool().getHost(), cmd.getPool().getPort(), + cmd.getPool().getPath(), cmd.getPool().getUserInfo(), + cmd.getPool().getType()); + } else { + return new CopyVolumeAnswer(cmd, false, e.getMessage(), null, null); + } + } + String volumeName = UUID.randomUUID().toString(); if (copyToSecondary) { @@ -1254,20 +1268,20 @@ private CopyVolumeAnswer execute(CopyVolumeCommand cmd) { String volumeDestPath = "/volumes/" + cmd.getVolumeId() + File.separator; secondaryStoragePool = _storagePoolMgr.getStoragePoolByURI( - secondaryStorageUrl); + secondaryStorageUrl); secondaryStoragePool.createFolder(volumeDestPath); secondaryStoragePool.delete(); secondaryStoragePool = _storagePoolMgr.getStoragePoolByURI( - secondaryStorageUrl - + volumeDestPath); + secondaryStorageUrl + + volumeDestPath); _storagePoolMgr.copyPhysicalDisk(volume, destVolumeName,secondaryStoragePool); return new CopyVolumeAnswer(cmd, true, null, null, volumeName); } else { volumePath = "/volumes/" + cmd.getVolumeId() + File.separator; secondaryStoragePool = _storagePoolMgr.getStoragePoolByURI( - secondaryStorageUrl - + volumePath); + secondaryStorageUrl + + volumePath); KVMPhysicalDisk volume = secondaryStoragePool .getPhysicalDisk(cmd.getVolumePath() + ".qcow2"); _storagePoolMgr.copyPhysicalDisk(volume, volumeName, @@ -1286,7 +1300,7 @@ private CopyVolumeAnswer execute(CopyVolumeCommand cmd) { protected Answer execute(DeleteStoragePoolCommand cmd) { try { _storagePoolMgr.deleteStoragePool(cmd.getPool().getType(), - cmd.getPool().getUuid()); + cmd.getPool().getUuid()); return new Answer(cmd); } catch (CloudRuntimeException e) { return new Answer(cmd, false, e.toString()); @@ -1328,7 +1342,7 @@ protected Answer execute(CreateCommand cmd) { long disksize; try { primaryPool = _storagePoolMgr.getStoragePool(pool.getType(), - pool.getUuid()); + pool.getUuid()); disksize = dskch.getSize(); if (cmd.getTemplateUrl() != null) { @@ -1337,7 +1351,7 @@ protected Answer execute(CreateCommand cmd) { } else { BaseVol = primaryPool.getPhysicalDisk(cmd.getTemplateUrl()); vol = _storagePoolMgr.createDiskFromTemplate(BaseVol, UUID - .randomUUID().toString(), primaryPool); + .randomUUID().toString(), primaryPool); } if (vol == null) { return new Answer(cmd, false, @@ -1410,12 +1424,12 @@ private String getResizeScriptType (KVMStoragePool pool, KVMPhysicalDisk vol) { StoragePoolType poolType = pool.getType(); PhysicalDiskFormat volFormat = vol.getFormat(); - if(pool.getType() == StoragePoolType.CLVM && volFormat == KVMPhysicalDisk.PhysicalDiskFormat.RAW) { + if(pool.getType() == StoragePoolType.CLVM && volFormat == PhysicalDiskFormat.RAW) { return "CLVM"; } else if ((poolType == StoragePoolType.NetworkFilesystem || poolType == StoragePoolType.SharedMountPoint || poolType == StoragePoolType.Filesystem) - && volFormat == KVMPhysicalDisk.PhysicalDiskFormat.QCOW2 ) { + && volFormat == PhysicalDiskFormat.QCOW2 ) { return "QCOW2"; } return null; @@ -1440,6 +1454,8 @@ public Answer execute(ResizeVolumeCommand cmd) { if (type == null) { return new ResizeVolumeAnswer(cmd, false, "Unsupported volume format: pool type '" + pool.getType() + "' and volume format '" + vol.getFormat() + "'"); + } else if (type.equals("QCOW2") && shrinkOk) { + return new ResizeVolumeAnswer(cmd, false, "Unable to shrink volumes of type " + type); } s_logger.debug("got to the stage where we execute the volume resize, params:" @@ -1477,29 +1493,11 @@ public Answer execute(DestroyCommand cmd) { try { KVMStoragePool pool = _storagePoolMgr.getStoragePool( - vol.getPoolType(), - vol.getPoolUuid()); + vol.getPoolType(), + vol.getPoolUuid()); pool.deletePhysicalDisk(vol.getPath()); String vmName = cmd.getVmName(); String poolPath = pool.getLocalPath(); - - /* if vol is a root disk for a system vm, try to remove accompanying patch disk as well - this is a bit tricky since the patchdisk is only a LibvirtComputingResource construct - and not tracked anywhere in cloudstack */ - if (vol.getType() == Volume.Type.ROOT && vmName.matches("^[rsv]-\\d+-.+$")) { - File patchVbd = new File(poolPath + File.separator + vmName + "-patchdisk"); - if(patchVbd.exists()){ - try { - _storagePoolMgr.deleteVbdByPath(vol.getPoolType(),patchVbd.getAbsolutePath()); - } catch(CloudRuntimeException e) { - s_logger.warn("unable to destroy patch disk '" + patchVbd.getAbsolutePath() + - "' while removing root disk for " + vmName + " : " + e); - } - } else { - s_logger.debug("file '" +patchVbd.getAbsolutePath()+ "' not found"); - } - } - return new Answer(cmd, true, "Success"); } catch (CloudRuntimeException e) { s_logger.debug("Failed to delete volume: " + e.toString()); @@ -1533,15 +1531,14 @@ private void VifHotPlug(Connect conn, String vmName, String vlanId, } Domain vm = getDomain(conn, vmName); - vm.attachDevice(_vifDriver.plug(nicTO, "Other PV (32-bit)").toString()); + vm.attachDevice(getVifDriver(nicTO.getType()).plug(nicTO, "Other PV (32-bit)").toString()); } private PlugNicAnswer execute(PlugNicCommand cmd) { - Connect conn; NicTO nic = cmd.getNic(); String vmName = cmd.getVmName(); try { - conn = LibvirtConnection.getConnection(); + Connect conn = LibvirtConnection.getConnectionByVmName(vmName); Domain vm = getDomain(conn, vmName); List pluggedNics = getInterfaces(conn, vmName); Integer nicnum = 0; @@ -1552,9 +1549,13 @@ private PlugNicAnswer execute(PlugNicCommand cmd) { } nicnum++; } - vm.attachDevice(_vifDriver.plug(nic, "Other PV (32-bit)").toString()); + vm.attachDevice(getVifDriver(nic.getType()).plug(nic, "Other PV (32-bit)").toString()); return new PlugNicAnswer(cmd, true, "success"); - } catch (Exception e) { + } catch (LibvirtException e) { + String msg = " Plug Nic failed due to " + e.toString(); + s_logger.warn(msg, e); + return new PlugNicAnswer(cmd, false, msg); + } catch (InternalErrorException e) { String msg = " Plug Nic failed due to " + e.toString(); s_logger.warn(msg, e); return new PlugNicAnswer(cmd, false, msg); @@ -1566,7 +1567,7 @@ private UnPlugNicAnswer execute(UnPlugNicCommand cmd) { NicTO nic = cmd.getNic(); String vmName = cmd.getInstanceName(); try { - conn = LibvirtConnection.getConnection(); + conn = LibvirtConnection.getConnectionByVmName(vmName); Domain vm = getDomain(conn, vmName); List pluggedNics = getInterfaces(conn, vmName); for (InterfaceDef pluggedNic : pluggedNics) { @@ -1576,7 +1577,7 @@ private UnPlugNicAnswer execute(UnPlugNicCommand cmd) { } } return new UnPlugNicAnswer(cmd, true, "success"); - } catch (Exception e) { + } catch (LibvirtException e) { String msg = " Unplug Nic failed due to " + e.toString(); s_logger.warn(msg, e); return new UnPlugNicAnswer(cmd, false, msg); @@ -1604,7 +1605,7 @@ private SetupGuestNetworkAnswer execute(SetupGuestNetworkCommand cmd) { } try { - conn = LibvirtConnection.getConnection(); + conn = LibvirtConnection.getConnectionByVmName(routerName); Domain vm = getDomain(conn, routerName); List pluggedNics = getInterfaces(conn, routerName); InterfaceDef routerNic = null; @@ -1624,13 +1625,13 @@ private SetupGuestNetworkAnswer execute(SetupGuestNetworkCommand cmd) { String dev = "eth" + nic.getDeviceId(); String netmask = NetUtils.getSubNet(routerGIP, nic.getNetmask()); String result = _virtRouterResource.assignGuestNetwork(dev, routerIP, - routerGIP, gateway, cidr, netmask, dns, domainName ); + routerGIP, gateway, cidr, netmask, dns, domainName ); if (result != null) { return new SetupGuestNetworkAnswer(cmd, false, "Creating guest network failed due to " + result); } return new SetupGuestNetworkAnswer(cmd, true, "success"); - } catch (Exception e) { + } catch (LibvirtException e) { String msg = "Creating guest network failed due to " + e.toString(); s_logger.warn(msg, e); return new SetupGuestNetworkAnswer(cmd, false, msg); @@ -1645,7 +1646,7 @@ private SetNetworkACLAnswer execute(SetNetworkACLCommand cmd) { String routerIp = cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP); try { - conn = LibvirtConnection.getConnection(); + conn = LibvirtConnection.getConnectionByVmName(routerName); Domain vm = getDomain(conn, routerName); String [][] rules = cmd.generateFwRules(); String[] aclRules = rules[0]; @@ -1660,7 +1661,7 @@ private SetNetworkACLAnswer execute(SetNetworkACLCommand cmd) { String rule = sb.toString(); String result = _virtRouterResource.assignNetworkACL(routerIp, - dev, nic.getIp(), netmask, rule); + dev, nic.getIp(), netmask, rule); if (result != null) { for (int i=0; i < results.length; i++) { @@ -1670,7 +1671,7 @@ private SetNetworkACLAnswer execute(SetNetworkACLCommand cmd) { } return new SetNetworkACLAnswer(cmd, true, results); - } catch (Exception e) { + } catch (LibvirtException e) { String msg = "SetNetworkACL failed due to " + e.toString(); s_logger.error(msg, e); return new SetNetworkACLAnswer(cmd, false, results); @@ -1684,28 +1685,28 @@ protected SetSourceNatAnswer execute(SetSourceNatCommand cmd) { IpAddressTO pubIP = cmd.getIpAddress(); try { - conn = LibvirtConnection.getConnection(); + conn = LibvirtConnection.getConnectionByVmName(routerName); Domain vm = getDomain(conn, routerName); Integer devNum = 0; String pubVlan = pubIP.getVlanId(); List pluggedNics = getInterfaces(conn, routerName); for (InterfaceDef pluggedNic : pluggedNics) { - String pluggedVlanBr = pluggedNic.getBrName(); - String pluggedVlanId = getVlanIdFromBridge(pluggedVlanBr); - if (pubVlan.equalsIgnoreCase(Vlan.UNTAGGED) - && pluggedVlanBr.equalsIgnoreCase(_publicBridgeName)) { - break; - } else if (pluggedVlanBr.equalsIgnoreCase(_linkLocalBridgeName)){ - /*skip over, no physical bridge device exists*/ - } else if (pluggedVlanId == null) { - /*this should only be true in the case of link local bridge*/ - return new SetSourceNatAnswer(cmd, false, "unable to find the vlan id for bridge "+pluggedVlanBr+ - " when attempting to set up" + pubVlan + " on router " + routerName); - } else if (pluggedVlanId.equals(pubVlan)) { - break; - } - devNum++; + String pluggedVlanBr = pluggedNic.getBrName(); + String pluggedVlanId = getVlanIdFromBridge(pluggedVlanBr); + if (pubVlan.equalsIgnoreCase(Vlan.UNTAGGED) + && pluggedVlanBr.equalsIgnoreCase(_publicBridgeName)) { + break; + } else if (pluggedVlanBr.equalsIgnoreCase(_linkLocalBridgeName)){ + /*skip over, no physical bridge device exists*/ + } else if (pluggedVlanId == null) { + /*this should only be true in the case of link local bridge*/ + return new SetSourceNatAnswer(cmd, false, "unable to find the vlan id for bridge "+pluggedVlanBr+ + " when attempting to set up" + pubVlan + " on router " + routerName); + } else if (pluggedVlanId.equals(pubVlan)) { + break; + } + devNum++; } String dev = "eth" + devNum; @@ -1715,7 +1716,7 @@ protected SetSourceNatAnswer execute(SetSourceNatCommand cmd) { return new SetSourceNatAnswer(cmd, false, "KVM plugin \"vpc_snat\" failed:"+result); } return new SetSourceNatAnswer(cmd, true, "success"); - } catch (Exception e) { + } catch (LibvirtException e) { String msg = "Ip SNAT failure due to " + e.toString(); s_logger.error(msg, e); return new SetSourceNatAnswer(cmd, false, msg); @@ -1730,7 +1731,7 @@ protected IpAssocAnswer execute(IpAssocVpcCommand cmd) { String routerIP = cmd.getAccessDetail(NetworkElementCommand.ROUTER_IP); try { - conn = LibvirtConnection.getConnection(); + conn = LibvirtConnection.getConnectionByVmName(routerName); IpAddressTO[] ips = cmd.getIpAddresses(); Domain vm = getDomain(conn, routerName); Integer devNum = 0; @@ -1742,8 +1743,8 @@ protected IpAssocAnswer execute(IpAssocVpcCommand cmd) { if (pluggedVlan.equalsIgnoreCase(_linkLocalBridgeName)) { vlanToNicNum.put("LinkLocal",devNum); } else if (pluggedVlan.equalsIgnoreCase(_publicBridgeName) - || pluggedVlan.equalsIgnoreCase(_privBridgeName) - || pluggedVlan.equalsIgnoreCase(_guestBridgeName)) { + || pluggedVlan.equalsIgnoreCase(_privBridgeName) + || pluggedVlan.equalsIgnoreCase(_guestBridgeName)) { vlanToNicNum.put(Vlan.UNTAGGED,devNum); } else { vlanToNicNum.put(getVlanIdFromBridge(pluggedVlan),devNum); @@ -1756,11 +1757,14 @@ protected IpAssocAnswer execute(IpAssocVpcCommand cmd) { String netmask = Long.toString(NetUtils.getCidrSize(ip.getVlanNetmask())); String subnet = NetUtils.getSubNet(ip.getPublicIp(), ip.getVlanNetmask()); _virtRouterResource.assignVpcIpToRouter(routerIP, ip.isAdd(), ip.getPublicIp(), - nicName, ip.getVlanGateway(), netmask, subnet); + nicName, ip.getVlanGateway(), netmask, subnet); results[i++] = ip.getPublicIp() + " - success"; } - } catch (Exception e) { + } catch (LibvirtException e) { + s_logger.error("Ip Assoc failure on applying one ip due to exception: ", e); + results[i++] = IpAssocAnswer.errorResult; + } catch (InternalErrorException e) { s_logger.error("Ip Assoc failure on applying one ip due to exception: ", e); results[i++] = IpAssocAnswer.errorResult; } @@ -1775,7 +1779,7 @@ public Answer execute(IpAssocCommand cmd) { String[] results = new String[cmd.getIpAddresses().length]; Connect conn; try { - conn = LibvirtConnection.getConnection(); + conn = LibvirtConnection.getConnectionByVmName(routerName); List nics = getInterfaces(conn, routerName); Map vlanAllocatedToVM = new HashMap(); Integer nicPos = 0; @@ -1783,14 +1787,14 @@ public Answer execute(IpAssocCommand cmd) { if (nic.getBrName().equalsIgnoreCase(_linkLocalBridgeName)) { vlanAllocatedToVM.put("LinkLocal", nicPos); } else { - if (nic.getBrName().equalsIgnoreCase(_publicBridgeName) - || nic.getBrName().equalsIgnoreCase(_privBridgeName) - || nic.getBrName().equalsIgnoreCase(_guestBridgeName)) { - vlanAllocatedToVM.put(Vlan.UNTAGGED, nicPos); - } else { - String vlanId = getVlanIdFromBridge(nic.getBrName()); - vlanAllocatedToVM.put(vlanId, nicPos); - } + if (nic.getBrName().equalsIgnoreCase(_publicBridgeName) + || nic.getBrName().equalsIgnoreCase(_privBridgeName) + || nic.getBrName().equalsIgnoreCase(_guestBridgeName)) { + vlanAllocatedToVM.put(Vlan.UNTAGGED, nicPos); + } else { + String vlanId = getVlanIdFromBridge(nic.getBrName()); + vlanAllocatedToVM.put(vlanId, nicPos); + } } nicPos++; } @@ -1832,7 +1836,7 @@ protected ManageSnapshotAnswer execute(final ManageSnapshotCommand cmd) { String snapshotPath = cmd.getSnapshotPath(); String vmName = cmd.getVmName(); try { - Connect conn = LibvirtConnection.getConnection(); + Connect conn = LibvirtConnection.getConnectionByVmName(vmName); DomainInfo.DomainState state = null; Domain vm = null; if (vmName != null) { @@ -1840,18 +1844,18 @@ protected ManageSnapshotAnswer execute(final ManageSnapshotCommand cmd) { vm = getDomain(conn, cmd.getVmName()); state = vm.getInfo().state; } catch (LibvirtException e) { - + s_logger.trace("Ignoring libvirt error.", e); } } KVMStoragePool primaryPool = _storagePoolMgr.getStoragePool( - cmd.getPool().getType(), - cmd.getPool().getUuid()); + cmd.getPool().getType(), + cmd.getPool().getUuid()); if (primaryPool.getType() == StoragePoolType.RBD) { s_logger.debug("Snapshots are not supported on RBD volumes"); return new ManageSnapshotAnswer(cmd, false, - "Snapshots are not supported on RBD volumes"); + "Snapshots are not supported on RBD volumes"); } KVMPhysicalDisk disk = primaryPool.getPhysicalDisk(cmd @@ -1921,10 +1925,10 @@ protected BackupSnapshotAnswer execute(final BackupSnapshotCommand cmd) { String vmName = cmd.getVmName(); KVMStoragePool secondaryStoragePool = null; try { - Connect conn = LibvirtConnection.getConnection(); + Connect conn = LibvirtConnection.getConnectionByVmName(vmName); secondaryStoragePool = _storagePoolMgr.getStoragePoolByURI( - secondaryStoragePoolUrl); + secondaryStoragePoolUrl); String ssPmountPath = secondaryStoragePool.getLocalPath(); snapshotRelPath = File.separator + "snapshots" + File.separator @@ -1935,8 +1939,8 @@ protected BackupSnapshotAnswer execute(final BackupSnapshotCommand cmd) { + File.separator + dcId + File.separator + accountId + File.separator + volumeId; KVMStoragePool primaryPool = _storagePoolMgr.getStoragePool( - cmd.getPool().getType(), - cmd.getPrimaryStoragePoolNameLabel()); + cmd.getPool().getType(), + cmd.getPrimaryStoragePoolNameLabel()); KVMPhysicalDisk snapshotDisk = primaryPool.getPhysicalDisk(cmd .getVolumePath()); Script command = new Script(_manageSnapshotPath, _cmdsTimeout, @@ -1959,13 +1963,13 @@ protected BackupSnapshotAnswer execute(final BackupSnapshotCommand cmd) { vm = getDomain(conn, cmd.getVmName()); state = vm.getInfo().state; } catch (LibvirtException e) { - + s_logger.trace("Ignoring libvirt error.", e); } } KVMStoragePool primaryStorage = _storagePoolMgr.getStoragePool( - cmd.getPool().getType(), - cmd.getPool().getUuid()); + cmd.getPool().getType(), + cmd.getPool().getUuid()); if (state == DomainInfo.DomainState.VIR_DOMAIN_RUNNING && !primaryStorage.isExternalSnapshot()) { String vmUuid = vm.getUUIDString(); @@ -2049,7 +2053,7 @@ protected Answer execute(DeleteSnapshotsDirCommand cmd) { KVMStoragePool secondaryStoragePool = null; try { secondaryStoragePool = _storagePoolMgr.getStoragePoolByURI(cmd - .getSecondaryStorageUrl()); + .getSecondaryStorageUrl()); String ssPmountPath = secondaryStoragePool.getLocalPath(); String snapshotDestPath = ssPmountPath + File.separator @@ -2080,15 +2084,15 @@ protected CreateVolumeFromSnapshotAnswer execute( int index = snapshotPath.lastIndexOf("/"); snapshotPath = snapshotPath.substring(0, index); KVMStoragePool secondaryPool = _storagePoolMgr.getStoragePoolByURI( - cmd.getSecondaryStorageUrl() - + snapshotPath); + cmd.getSecondaryStorageUrl() + + snapshotPath); KVMPhysicalDisk snapshot = secondaryPool.getPhysicalDisk(cmd .getSnapshotName()); String primaryUuid = cmd.getPrimaryStoragePoolNameLabel(); KVMStoragePool primaryPool = _storagePoolMgr .getStoragePool(cmd.getPool().getType(), - primaryUuid); + primaryUuid); String volUuid = UUID.randomUUID().toString(); KVMPhysicalDisk disk = _storagePoolMgr.copyPhysicalDisk(snapshot, volUuid, primaryPool); @@ -2124,7 +2128,7 @@ protected CreatePrivateTemplateAnswer execute( .getSnapshotName()); secondaryPool = _storagePoolMgr.getStoragePoolByURI( - cmd.getSecondaryStorageUrl()); + cmd.getSecondaryStorageUrl()); String templatePath = secondaryPool.getLocalPath() + File.separator + templateInstallFolder; @@ -2174,8 +2178,8 @@ protected CreatePrivateTemplateAnswer execute( protected GetStorageStatsAnswer execute(final GetStorageStatsCommand cmd) { try { KVMStoragePool sp = _storagePoolMgr.getStoragePool( - cmd.getPooltype(), - cmd.getStorageId()); + cmd.getPooltype(), + cmd.getStorageId()); return new GetStorageStatsAnswer(cmd, sp.getCapacity(), sp.getUsed()); } catch (CloudRuntimeException e) { @@ -2188,18 +2192,31 @@ protected CreatePrivateTemplateAnswer execute( String secondaryStorageURL = cmd.getSecondaryStorageUrl(); KVMStoragePool secondaryStorage = null; + KVMStoragePool primary = null; try { - Connect conn = LibvirtConnection.getConnection(); + Connect conn = LibvirtConnection.getConnectionByVmName(cmd.getVmName()); String templateFolder = cmd.getAccountId() + File.separator + cmd.getTemplateId() + File.separator; String templateInstallFolder = "/template/tmpl/" + templateFolder; secondaryStorage = _storagePoolMgr.getStoragePoolByURI( - secondaryStorageURL); + secondaryStorageURL); + + try { + primary = _storagePoolMgr.getStoragePool( + cmd.getPool().getType(), + cmd.getPrimaryStoragePoolNameLabel()); + } catch (CloudRuntimeException e) { + if (e.getMessage().contains("not found")) { + primary = _storagePoolMgr.createStoragePool(cmd.getPool().getUuid(), + cmd.getPool().getHost(), cmd.getPool().getPort(), + cmd.getPool().getPath(), cmd.getPool().getUserInfo(), + cmd.getPool().getType()); + } else { + return new CreatePrivateTemplateAnswer(cmd, false, e.getMessage()); + } + } - KVMStoragePool primary = _storagePoolMgr.getStoragePool( - cmd.getPool().getType(), - cmd.getPrimaryStoragePoolNameLabel()); KVMPhysicalDisk disk = primary.getPhysicalDisk(cmd.getVolumePath()); String tmpltPath = secondaryStorage.getLocalPath() + File.separator + templateInstallFolder; @@ -2219,14 +2236,25 @@ protected CreatePrivateTemplateAnswer execute( } } else { s_logger.debug("Converting RBD disk " + disk.getPath() + " into template " + cmd.getUniqueName()); - Script.runSimpleBashScript("qemu-img convert" - + " -f raw -O qcow2 " - + KVMPhysicalDisk.RBDStringBuilder(primary.getSourceHost(), - primary.getSourcePort(), - primary.getAuthUserName(), - primary.getAuthSecret(), - disk.getPath()) - + " " + tmpltPath + "/" + cmd.getUniqueName() + ".qcow2"); + + QemuImgFile srcFile = new QemuImgFile(KVMPhysicalDisk.RBDStringBuilder(primary.getSourceHost(), + primary.getSourcePort(), + primary.getAuthUserName(), + primary.getAuthSecret(), + disk.getPath())); + srcFile.setFormat(PhysicalDiskFormat.RAW); + + QemuImgFile destFile = new QemuImgFile(tmpltPath + "/" + cmd.getUniqueName() + ".qcow2"); + destFile.setFormat(PhysicalDiskFormat.QCOW2); + + QemuImg q = new QemuImg(); + try { + q.convert(srcFile, destFile); + } catch (QemuImgException e) { + s_logger.error("Failed to create new template while converting " + + srcFile.getFileName() + " to " + destFile.getFileName() + " the error was: " + e.getMessage()); + } + File templateProp = new File(tmpltPath + "/template.properties"); if (!templateProp.exists()) { templateProp.createNewFile(); @@ -2322,8 +2350,8 @@ protected PrimaryStorageDownloadAnswer execute( /* Copy volume to primary storage */ KVMStoragePool primaryPool = _storagePoolMgr.getStoragePool( - cmd.getPool().getType(), - cmd.getPoolUuid()); + cmd.getPool().getType(), + cmd.getPoolUuid()); KVMPhysicalDisk primaryVol = _storagePoolMgr.copyPhysicalDisk( tmplVol, UUID.randomUUID().toString(), primaryPool); @@ -2364,7 +2392,7 @@ private Answer execute(SecurityGroupRulesCmd cmd) { String vif = null; String brname = null; try { - Connect conn = LibvirtConnection.getConnection(); + Connect conn = LibvirtConnection.getConnectionByVmName(cmd.getVmName()); List nics = getInterfaces(conn, cmd.getVmName()); vif = nics.get(0).getDevName(); brname = nics.get(0).getBrName(); @@ -2375,7 +2403,7 @@ private Answer execute(SecurityGroupRulesCmd cmd) { boolean result = add_network_rules(cmd.getVmName(), Long.toString(cmd.getVmId()), cmd.getGuestIp(), cmd.getSignature(), Long.toString(cmd.getSeqNum()), - cmd.getGuestMac(), cmd.stringifyRules(), vif, brname); + cmd.getGuestMac(), cmd.stringifyRules(), vif, brname, cmd.getSecIpsString()); if (!result) { s_logger.warn("Failed to program network rules for vm " @@ -2398,10 +2426,10 @@ private Answer execute(CleanupNetworkRulesCmd cmd) { protected GetVncPortAnswer execute(GetVncPortCommand cmd) { try { - Connect conn = LibvirtConnection.getConnection(); + Connect conn = LibvirtConnection.getConnectionByVmName(cmd.getName()); Integer vncPort = getVncPort(conn, cmd.getName()); return new GetVncPortAnswer(cmd, _privateIp, 5900 + vncPort); - } catch (Exception e) { + } catch (LibvirtException e) { return new GetVncPortAnswer(cmd, e.toString()); } } @@ -2429,7 +2457,7 @@ private Answer executeProxyLoadScan(final Command cmd, final StringBuffer sb = new StringBuffer(); sb.append("http://").append(proxyManagementIp).append(":" + cmdPort) - .append("/cmd/getstatus"); + .append("/cmd/getstatus"); boolean success = true; try { @@ -2469,7 +2497,7 @@ private Answer executeProxyLoadScan(final Command cmd, private Answer execute(AttachIsoCommand cmd) { try { - Connect conn = LibvirtConnection.getConnection(); + Connect conn = LibvirtConnection.getConnectionByVmName(cmd.getVmName()); attachOrDetachISO(conn, cmd.getVmName(), cmd.getIsoPath(), cmd.isAttach()); } catch (LibvirtException e) { @@ -2485,10 +2513,10 @@ private Answer execute(AttachIsoCommand cmd) { private AttachVolumeAnswer execute(AttachVolumeCommand cmd) { try { - Connect conn = LibvirtConnection.getConnection(); + Connect conn = LibvirtConnection.getConnectionByVmName(cmd.getVmName()); KVMStoragePool primary = _storagePoolMgr.getStoragePool( - cmd.getPooltype(), - cmd.getPoolUuid()); + cmd.getPooltype(), + cmd.getPoolUuid()); KVMPhysicalDisk disk = primary.getPhysicalDisk(cmd.getVolumePath()); attachOrDetachDisk(conn, cmd.getAttach(), cmd.getVmName(), disk, cmd.getDeviceId().intValue()); @@ -2522,16 +2550,13 @@ protected State getVmState(Connect conn, final String vmName) { } catch (final LibvirtException e) { s_logger.warn("Can't get vm state " + vmName + e.getMessage() + "retry:" + retry); - } catch (Exception e) { - s_logger.warn("Can't get vm state " + vmName + e.getMessage() - + "retry:" + retry); } finally { try { if (vms != null) { vms.free(); } - } catch (final LibvirtException e) { - + } catch (final LibvirtException l) { + s_logger.trace("Ignoring libvirt error.", l); } } } @@ -2540,7 +2565,7 @@ protected State getVmState(Connect conn, final String vmName) { private Answer execute(CheckVirtualMachineCommand cmd) { try { - Connect conn = LibvirtConnection.getConnection(); + Connect conn = LibvirtConnection.getConnectionByVmName(cmd.getVmName()); final State state = getVmState(conn, cmd.getVmName()); Integer vncPort = null; if (state == State.Running) { @@ -2560,10 +2585,10 @@ private Answer execute(CheckVirtualMachineCommand cmd) { private Answer execute(PingTestCommand cmd) { String result = null; final String computingHostIp = cmd.getComputingHostIp(); // TODO, split - // the - // command - // into 2 - // types + // the + // command + // into 2 + // types if (computingHostIp != null) { result = doPingTest(computingHostIp); @@ -2609,7 +2634,7 @@ private synchronized Answer execute(MigrateCommand cmd) { Domain destDomain = null; Connect conn = null; try { - conn = LibvirtConnection.getConnection(); + conn = LibvirtConnection.getConnectionByVmName(cmd.getVmName()); ifaces = getInterfaces(conn, vmName); dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName .getBytes())); @@ -2624,9 +2649,6 @@ private synchronized Answer execute(MigrateCommand cmd) { } catch (LibvirtException e) { s_logger.debug("Can't migrate domain: " + e.getMessage()); result = e.getMessage(); - } catch (Exception e) { - s_logger.debug("Can't migrate domain: " + e.getMessage()); - result = e.getMessage(); } finally { try { if (dm != null) { @@ -2639,7 +2661,7 @@ private synchronized Answer execute(MigrateCommand cmd) { destDomain.free(); } } catch (final LibvirtException e) { - + s_logger.trace("Ignoring libvirt error.", e); } } @@ -2650,7 +2672,11 @@ private synchronized Answer execute(MigrateCommand cmd) { } else { destroy_network_rules_for_vm(conn, vmName); for (InterfaceDef iface : ifaces) { - _vifDriver.unplug(iface); + // We don't know which "traffic type" is associated with + // each interface at this point, so inform all vif drivers + for(VifDriver vifDriver : getAllVifDrivers()){ + vifDriver.unplug(iface); + } } cleanupVM(conn, vmName, getVnetId(VirtualMachineName.getVnet(vmName))); @@ -2668,9 +2694,9 @@ private synchronized Answer execute(PrepareForMigrationCommand cmd) { NicTO[] nics = vm.getNics(); try { - Connect conn = LibvirtConnection.getConnection(); + Connect conn = LibvirtConnection.getConnectionByVmName(vm.getName()); for (NicTO nic : nics) { - _vifDriver.plug(nic, null); + getVifDriver(nic.getType()).plug(nic, null); } /* setup disks, e.g for iso */ @@ -2703,7 +2729,7 @@ private Answer execute(GetHostStatsCommand cmd) { final Script cpuScript = new Script("/bin/bash", s_logger); cpuScript.add("-c"); cpuScript - .add("idle=$(top -b -n 1|grep Cpu\\(s\\):|cut -d% -f4|cut -d, -f2);echo $idle"); + .add("idle=$(top -b -n 1|grep Cpu\\(s\\):|cut -d% -f4|cut -d, -f2);echo $idle"); final OutputInterpreter.OneLineParser parser = new OutputInterpreter.OneLineParser(); String result = cpuScript.execute(parser); @@ -2717,7 +2743,7 @@ private Answer execute(GetHostStatsCommand cmd) { final Script memScript = new Script("/bin/bash", s_logger); memScript.add("-c"); memScript - .add("freeMem=$(free|grep cache:|awk '{print $4}');echo $freeMem"); + .add("freeMem=$(free|grep cache:|awk '{print $4}');echo $freeMem"); final OutputInterpreter.OneLineParser Memparser = new OutputInterpreter.OneLineParser(); result = memScript.execute(Memparser); if (result != null) { @@ -2786,17 +2812,74 @@ protected long[] getNetworkStats(String privateIP) { return stats; } + protected String VPCNetworkUsage(final String privateIpAddress, final String publicIp, + final String option, final String vpcCIDR) { + Script getUsage = new Script(_routerProxyPath, s_logger); + getUsage.add("vpc_netusage.sh"); + getUsage.add(privateIpAddress); + getUsage.add("-l", publicIp); + + if (option.equals("get")) { + getUsage.add("-g"); + } else if (option.equals("create")) { + getUsage.add("-c"); + getUsage.add("-v", vpcCIDR); + } else if (option.equals("reset")) { + getUsage.add("-r"); + } else if (option.equals("vpn")) { + getUsage.add("-n"); + } else if (option.equals("remove")) { + getUsage.add("-d"); + } + + final OutputInterpreter.OneLineParser usageParser = new OutputInterpreter.OneLineParser(); + String result = getUsage.execute(usageParser); + if (result != null) { + s_logger.debug("Failed to execute VPCNetworkUsage:" + result); + return null; + } + return usageParser.getLine(); + } + + protected long[] getVPCNetworkStats(String privateIP, String publicIp, String option) { + String result = VPCNetworkUsage(privateIP, publicIp, option, null); + long[] stats = new long[2]; + if (result != null) { + String[] splitResult = result.split(":"); + int i = 0; + while (i < splitResult.length - 1) { + stats[0] += (new Long(splitResult[i++])).longValue(); + stats[1] += (new Long(splitResult[i++])).longValue(); + } + } + return stats; + } + private Answer execute(NetworkUsageCommand cmd) { - if (cmd.getOption() != null && cmd.getOption().equals("create")) { - String result = networkUsage(cmd.getPrivateIP(), "create", null); - NetworkUsageAnswer answer = new NetworkUsageAnswer(cmd, result, 0L, - 0L); + if (cmd.isForVpc()) { + if (cmd.getOption() != null && cmd.getOption().equals("create")) { + String result = VPCNetworkUsage(cmd.getPrivateIP(),cmd.getGatewayIP(), "create", cmd.getVpcCIDR()); + NetworkUsageAnswer answer = new NetworkUsageAnswer(cmd, result, 0L, 0L); + return answer; + } else if (cmd.getOption() != null && (cmd.getOption().equals("get") || cmd.getOption().equals("vpn"))) { + long[] stats = getVPCNetworkStats(cmd.getPrivateIP(), cmd.getGatewayIP(), cmd.getOption()); + NetworkUsageAnswer answer = new NetworkUsageAnswer(cmd, "", stats[0], stats[1]); + return answer; + } else { + String result = VPCNetworkUsage(cmd.getPrivateIP(),cmd.getGatewayIP(), cmd.getOption(), cmd.getVpcCIDR()); + NetworkUsageAnswer answer = new NetworkUsageAnswer(cmd, result, 0L, 0L); + return answer; + } + } else { + if (cmd.getOption() != null && cmd.getOption().equals("create")) { + String result = networkUsage(cmd.getPrivateIP(), "create", null); + NetworkUsageAnswer answer = new NetworkUsageAnswer(cmd, result, 0L, 0L); + return answer; + } + long[] stats = getNetworkStats(cmd.getPrivateIP()); + NetworkUsageAnswer answer = new NetworkUsageAnswer(cmd, "", stats[0], stats[1]); return answer; } - long[] stats = getNetworkStats(cmd.getPrivateIP()); - NetworkUsageAnswer answer = new NetworkUsageAnswer(cmd, "", stats[0], - stats[1]); - return answer; } private Answer execute(RebootCommand cmd) { @@ -2806,14 +2889,14 @@ private Answer execute(RebootCommand cmd) { } try { - Connect conn = LibvirtConnection.getConnection(); + Connect conn = LibvirtConnection.getConnectionByVmName(cmd.getVmName()); final String result = rebootVM(conn, cmd.getVmName()); if (result == null) { Integer vncPort = null; try { vncPort = getVncPort(conn, cmd.getVmName()); - } catch (Exception e) { - + } catch (LibvirtException e) { + s_logger.trace("Ignoring libvirt error.", e); } get_rule_logs_for_vms(); return new RebootAnswer(cmd, null, vncPort); @@ -2844,8 +2927,8 @@ protected GetVmStatsAnswer execute(GetVmStatsCommand cmd) { List vmNames = cmd.getVmNames(); try { HashMap vmStatsNameMap = new HashMap(); - Connect conn = LibvirtConnection.getConnection(); for (String vmName : vmNames) { + Connect conn = LibvirtConnection.getConnectionByVmName(vmName); VmStatsEntry statEntry = getVmStat(conn, vmName); if (statEntry == null) { continue; @@ -2869,13 +2952,13 @@ protected Answer execute(StopCommand cmd) { _vms.put(vmName, State.Stopping); } try { - Connect conn = LibvirtConnection.getConnection(); + Connect conn = LibvirtConnection.getConnectionByVmName(vmName); List disks = getDisks(conn, vmName); List ifaces = getInterfaces(conn, vmName); destroy_network_rules_for_vm(conn, vmName); - String result = stopVM(conn, vmName, defineOps.UNDEFINE_VM); + String result = stopVM(conn, vmName); if (result == null) { for (DiskDef disk : disks) { if (disk.getDeviceType() == DiskDef.deviceType.CDROM @@ -2884,7 +2967,11 @@ protected Answer execute(StopCommand cmd) { } } for (InterfaceDef iface: ifaces) { - _vifDriver.unplug(iface); + // We don't know which "traffic type" is associated with + // each interface at this point, so inform all vif drivers + for(VifDriver vifDriver : getAllVifDrivers()){ + vifDriver.unplug(iface); + } } } @@ -2917,7 +3004,7 @@ protected Answer execute(ModifySshKeysCommand cmd) { script.add("-m","700"); script.add(_SSHKEYSPATH); script.execute(); - + if(!sshKeysDir.exists()) { s_logger.debug("failed to create directory " + _SSHKEYSPATH); } @@ -2995,14 +3082,22 @@ protected void handleVmStartFailure(Connect conn, String vmName, protected LibvirtVMDef createVMFromSpec(VirtualMachineTO vmTO) { LibvirtVMDef vm = new LibvirtVMDef(); - vm.setHvsType(_hypervisorType); vm.setDomainName(vmTO.getName()); vm.setDomUUID(UUID.nameUUIDFromBytes(vmTO.getName().getBytes()) .toString()); vm.setDomDescription(vmTO.getOs()); GuestDef guest = new GuestDef(); - guest.setGuestType(GuestDef.guestType.KVM); + + if (HypervisorType.LXC == _hypervisorType && + VirtualMachine.Type.User == vmTO.getType()) { + // LXC domain is only valid for user VMs. Use KVM for system VMs. + guest.setGuestType(GuestDef.guestType.LXC); + vm.setHvsType(HypervisorType.LXC.toString().toLowerCase()); + } else { + guest.setGuestType(GuestDef.guestType.KVM); + vm.setHvsType(HypervisorType.KVM.toString().toLowerCase()); + } guest.setGuestArch(vmTO.getArch()); guest.setMachineType("pc"); guest.setBootOrder(GuestDef.bootOrder.CDROM); @@ -3011,12 +3106,34 @@ protected LibvirtVMDef createVMFromSpec(VirtualMachineTO vmTO) { vm.addComp(guest); GuestResourceDef grd = new GuestResourceDef(); - grd.setMemorySize(vmTO.getMinRam() / 1024); + + if (vmTO.getMinRam() != vmTO.getMaxRam()){ + grd.setMemBalloning(true); + grd.setCurrentMem((long)vmTO.getMinRam()/1024); + grd.setMemorySize((long)vmTO.getMaxRam()/1024); + } + else{ + grd.setMemorySize(vmTO.getMaxRam() / 1024); + } grd.setVcpuNum(vmTO.getCpus()); vm.addComp(grd); CpuTuneDef ctd = new CpuTuneDef(); - ctd.setShares(vmTO.getCpus() * vmTO.getSpeed()); + /** + A 4.0.X/4.1.X management server doesn't send the correct JSON + command for getMinSpeed, it only sends a 'speed' field. + + So if getMinSpeed() returns null we fall back to getSpeed(). + + This way a >4.1 agent can work communicate a <=4.1 management server + + This change is due to the overcommit feature in 4.2 + */ + if (vmTO.getMinSpeed() != null) { + ctd.setShares(vmTO.getCpus() * vmTO.getMinSpeed()); + } else { + ctd.setShares(vmTO.getCpus() * vmTO.getSpeed()); + } vm.addComp(ctd); FeaturesDef features = new FeaturesDef(); @@ -3041,14 +3158,20 @@ protected LibvirtVMDef createVMFromSpec(VirtualMachineTO vmTO) { DevicesDef devices = new DevicesDef(); devices.setEmulatorPath(_hypervisorPath); + devices.setGuestType(guest.getGuestType()); SerialDef serial = new SerialDef("pty", null, (short) 0); devices.addDevice(serial); + if (vmTO.getType() != VirtualMachine.Type.User) { + VirtioSerialDef vserial = new VirtioSerialDef(vmTO.getName(), null); + devices.addDevice(vserial); + } + ConsoleDef console = new ConsoleDef("pty", null, null, (short) 0); devices.addDevice(console); - GraphicDef grap = new GraphicDef("vnc", (short) 0, true, vmTO.getVncAddr(), null, + GraphicDef grap = new GraphicDef("vnc", (short) 0, true, null, null, null); devices.addDevice(grap); @@ -3081,19 +3204,20 @@ protected synchronized StartAnswer execute(StartCommand cmd) { State state = State.Stopped; Connect conn = null; try { - conn = LibvirtConnection.getConnection(); synchronized (_vms) { _vms.put(vmName, State.Starting); } vm = createVMFromSpec(vmSpec); + conn = LibvirtConnection.getConnectionByType(vm.getHvsType()); + createVbd(conn, vmSpec, vmName, vm); createVifs(vmSpec, vm); s_logger.debug("starting " + vmName + ": " + vm.toString()); - startDomain(conn, vmName, vm.toString()); + startVM(conn, vmName, vm.toString()); NicTO[] nics = vmSpec.getNics(); for (NicTO nic : nics) { @@ -3103,15 +3227,43 @@ protected synchronized StartAnswer execute(StartCommand cmd) { default_network_rules_for_systemvm(conn, vmName); break; } else { - default_network_rules(conn, vmName, nic, vmSpec.getId()); + List nicSecIps = nic.getNicSecIps(); + String secIpsStr; + StringBuilder sb = new StringBuilder(); + if (nicSecIps != null) { + for (String ip : nicSecIps) { + sb.append(ip).append(":"); + } + secIpsStr = sb.toString(); + } else { + secIpsStr = "0:"; + } + default_network_rules(conn, vmName, nic, vmSpec.getId(), secIpsStr); } } } + // pass cmdline info to system vms + if (vmSpec.getType() != VirtualMachine.Type.User) { + passCmdLine(vmName, vmSpec.getBootArgs() ); + } + state = State.Running; return new StartAnswer(cmd); - } catch (Exception e) { - s_logger.warn("Exception ", e); + } catch (LibvirtException e) { + s_logger.warn("LibvirtException ", e); + if (conn != null) { + handleVmStartFailure(conn, vmName, vm); + } + return new StartAnswer(cmd, e.getMessage()); + } catch (InternalErrorException e) { + s_logger.warn("InternalErrorException ", e); + if (conn != null) { + handleVmStartFailure(conn, vmName, vm); + } + return new StartAnswer(cmd, e.getMessage()); + } catch (URISyntaxException e) { + s_logger.warn("URISyntaxException ", e); if (conn != null) { handleVmStartFailure(conn, vmName, vm); } @@ -3135,7 +3287,7 @@ private String getVolumePath(Connect conn, VolumeTO volume) String path = isoPath.substring(0, index); String name = isoPath.substring(index + 1); KVMStoragePool secondaryPool = _storagePoolMgr.getStoragePoolByURI( - path); + path); KVMPhysicalDisk isoVol = secondaryPool.getPhysicalDisk(name); return isoVol.getPath(); } else { @@ -3153,7 +3305,7 @@ public int compare(VolumeTO arg0, VolumeTO arg1) { return arg0.getDeviceId() > arg1.getDeviceId() ? 1 : -1; } }); - + for (VolumeTO volume : disks) { KVMPhysicalDisk physicalDisk = null; KVMStoragePool pool = null; @@ -3163,12 +3315,12 @@ public int compare(VolumeTO arg0, VolumeTO arg1) { String volDir = volPath.substring(0, index); String volName = volPath.substring(index + 1); KVMStoragePool secondaryStorage = _storagePoolMgr. - getStoragePoolByURI(volDir); + getStoragePoolByURI(volDir); physicalDisk = secondaryStorage.getPhysicalDisk(volName); } else if (volume.getType() != Volume.Type.ISO) { pool = _storagePoolMgr.getStoragePool( - volume.getPoolType(), - volume.getPoolUuid()); + volume.getPoolType(), + volume.getPoolUuid()); physicalDisk = pool.getPhysicalDisk(volume.getPath()); } @@ -3194,23 +3346,23 @@ public int compare(VolumeTO arg0, VolumeTO arg1) { For RBD pools we use the secret mechanism in libvirt. We store the secret under the UUID of the pool, that's why we pass the pool's UUID as the authSecret - */ + */ disk.defNetworkBasedDisk(physicalDisk.getPath().replace("rbd:", ""), pool.getSourceHost(), pool.getSourcePort(), - pool.getAuthUserName(), pool.getUuid(), - devId, diskBusType, diskProtocol.RBD); + pool.getAuthUserName(), pool.getUuid(), + devId, diskBusType, diskProtocol.RBD); } else if (pool.getType() == StoragePoolType.CLVM) { disk.defBlockBasedDisk(physicalDisk.getPath(), devId, - diskBusType); + diskBusType); } else { if (volume.getType() == Volume.Type.DATADISK) { - disk.defFileBasedDisk(physicalDisk.getPath(), devId, - DiskDef.diskBus.VIRTIO, - DiskDef.diskFmtType.QCOW2); - } else { - disk.defFileBasedDisk(physicalDisk.getPath(), devId, diskBusType, DiskDef.diskFmtType.QCOW2); - } + disk.defFileBasedDisk(physicalDisk.getPath(), devId, + DiskDef.diskBus.VIRTIO, + DiskDef.diskFmtType.QCOW2); + } else { + disk.defFileBasedDisk(physicalDisk.getPath(), devId, diskBusType, DiskDef.diskFmtType.QCOW2); + } - } + } } @@ -3223,9 +3375,23 @@ public int compare(VolumeTO arg0, VolumeTO arg1) { iso.defISODisk(_sysvmISOPath); vm.getDevices().addDevice(iso); } + } - createPatchVbd(conn, vmName, vm, vmSpec); + // For LXC, find and add the root filesystem + if (HypervisorType.LXC.toString().toLowerCase().equals(vm.getHvsType())) { + for (VolumeTO volume : disks) { + if (volume.getType() == Volume.Type.ROOT) { + KVMStoragePool pool = _storagePoolMgr.getStoragePool( + volume.getPoolType(), + volume.getPoolUuid()); + KVMPhysicalDisk physicalDisk = pool.getPhysicalDisk(volume.getPath()); + FilesystemDef rootFs = new FilesystemDef(physicalDisk.getPath(), "/"); + vm.getDevices().addDevice(rootFs); + break; + } + } } + } private VolumeTO getVolume(VirtualMachineTO vmSpec, Volume.Type type) { @@ -3238,68 +3404,10 @@ private VolumeTO getVolume(VirtualMachineTO vmSpec, Volume.Type type) { return null; } - private void createPatchVbd(Connect conn, String vmName, LibvirtVMDef vm, - VirtualMachineTO vmSpec) throws LibvirtException, - InternalErrorException { - - List disks = vm.getDevices().getDisks(); - DiskDef rootDisk = disks.get(0); - VolumeTO rootVol = getVolume(vmSpec, Volume.Type.ROOT); - String patchName = vmName + "-patchdisk"; - KVMStoragePool pool = _storagePoolMgr.getStoragePool( - rootVol.getPoolType(), - rootVol.getPoolUuid()); - String patchDiskPath = pool.getLocalPath() + "/" + patchName; - - List phyDisks = pool.listPhysicalDisks(); - boolean foundDisk = false; - - for (KVMPhysicalDisk phyDisk : phyDisks) { - if (phyDisk.getPath().equals(patchDiskPath)) { - foundDisk = true; - break; - } - } - - if (!foundDisk) { - s_logger.debug("generating new patch disk for " + vmName + " since none was found"); - KVMPhysicalDisk disk = pool.createPhysicalDisk(patchName, KVMPhysicalDisk.PhysicalDiskFormat.RAW, - 10L * 1024 * 1024); - } else { - s_logger.debug("found existing patch disk at " + patchDiskPath + " using it for " + vmName); - } - - /* Format/create fs on this disk */ - final Script command = new Script(_createvmPath, _timeout, s_logger); - command.add("-f", patchDiskPath); - String result = command.execute(); - if (result != null) { - s_logger.debug("Failed to create data disk: " + result); - throw new InternalErrorException("Failed to create data disk: " - + result); - } - - /* add patch disk */ - DiskDef patchDisk = new DiskDef(); - - if (pool.getType() == StoragePoolType.CLVM) { - patchDisk.defBlockBasedDisk(patchDiskPath, 1, rootDisk.getBusType()); - } else { - patchDisk.defFileBasedDisk(patchDiskPath, 1, rootDisk.getBusType(), - DiskDef.diskFmtType.RAW); - } - - disks.add(patchDisk); - - String bootArgs = vmSpec.getBootArgs(); - - patchSystemVm(bootArgs, patchDiskPath, vmName); - } - private void createVif(LibvirtVMDef vm, NicTO nic) throws InternalErrorException, LibvirtException { vm.getDevices().addDevice( - _vifDriver.plug(nic, vm.getGuestOSType()).toString()); + getVifDriver(nic.getType()).plug(nic, vm.getGuestOSType()).toString()); } protected CheckSshAnswer execute(CheckSshCommand cmd) { @@ -3311,14 +3419,10 @@ protected CheckSshAnswer execute(CheckSshCommand cmd) { s_logger.debug("Ping command port, " + privateIp + ":" + cmdPort); } - try { - String result = _virtRouterResource.connect(privateIp, cmdPort); - if (result != null) { - return new CheckSshAnswer(cmd, "Can not ping System vm " - + vmName + "due to:" + result); - } - } catch (Exception e) { - return new CheckSshAnswer(cmd, e); + String result = _virtRouterResource.connect(privateIp, cmdPort); + if (result != null) { + return new CheckSshAnswer(cmd, "Can not ping System vm " + + vmName + "due to:" + result); } if (s_logger.isDebugEnabled()) { @@ -3360,14 +3464,14 @@ private boolean cleanupDisk(Connect conn, DiskDef disk) { protected synchronized String attachOrDetachISO(Connect conn, String vmName, String isoPath, boolean isAttach) - throws LibvirtException, URISyntaxException, InternalErrorException { + throws LibvirtException, URISyntaxException, InternalErrorException { String isoXml = null; if (isoPath != null && isAttach) { int index = isoPath.lastIndexOf("/"); String path = isoPath.substring(0, index); String name = isoPath.substring(index + 1); KVMStoragePool secondaryPool = _storagePoolMgr.getStoragePoolByURI( - path); + path); KVMPhysicalDisk isoVol = secondaryPool.getPhysicalDisk(name); isoPath = isoVol.getPath(); @@ -3465,14 +3569,12 @@ protected synchronized String attachOrDetachDevice(Connect conn, + e.getMessage()); } throw e; - } catch (Exception e) { - throw new InternalErrorException(e.toString()); } finally { if (dm != null) { try { dm.free(); } catch (LibvirtException l) { - + s_logger.trace("Ignoring libvirt error.", l); } } } @@ -3524,7 +3626,7 @@ public StartupCommand[] initialize() { final StartupRoutingCommand cmd = new StartupRoutingCommand( (Integer) info.get(0), (Long) info.get(1), (Long) info.get(2), - (Long) info.get(4), (String) info.get(3), HypervisorType.KVM, + (Long) info.get(4), (String) info.get(3), _hypervisorType, RouterPrivateIpStrategy.HostLocal); cmd.setStateChanges(changes); fillNetworkInformation(cmd); @@ -3544,7 +3646,7 @@ public StartupCommand[] initialize() { localStoragePool.getUuid(), cmd.getPrivateIpAddress(), _localStoragePath, _localStoragePath, StoragePoolType.Filesystem, localStoragePool.getCapacity(), - localStoragePool.getUsed()); + localStoragePool.getAvailable()); sscmd = new StartupStorageCommand(); sscmd.setPoolInfo(pi); @@ -3552,7 +3654,7 @@ public StartupCommand[] initialize() { sscmd.setDataCenter(_dcId); sscmd.setResourceType(Storage.StorageResourceType.STORAGE_POOL); } catch (CloudRuntimeException e) { - + s_logger.debug("Unable to initialize local storage pool: " + e); } if (sscmd != null) { @@ -3680,7 +3782,7 @@ protected State getRealPowerState(String vm) { Domain dm = null; for (; i < 5; i++) { try { - Connect conn = LibvirtConnection.getConnection(); + Connect conn = LibvirtConnection.getConnectionByVmName(vm); dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vm .getBytes())); DomainInfo.DomainState vps = dm.getInfo().state; @@ -3690,22 +3792,21 @@ protected State getRealPowerState(String vm) { return convertToState(vps); } } catch (final LibvirtException e) { - s_logger.trace(e.getMessage()); - } catch (Exception e) { - s_logger.trace(e.getMessage()); + s_logger.trace("Ignoring libvirt error.", e); } finally { try { if (dm != null) { dm.free(); } - } catch (final LibvirtException e) { - + } catch (final LibvirtException l) { + s_logger.trace("Ignoring libvirt error.", l); } } try { Thread.sleep(1000); } catch (InterruptedException e) { + s_logger.trace("Ignoring InterruptedException.", e); } } return State.Stopped; @@ -3743,7 +3844,7 @@ protected List getAllVmNames(Connect conn) { dm.free(); } } catch (final LibvirtException e) { - + s_logger.trace("Ignoring libvirt error.", e); } } } @@ -3753,17 +3854,31 @@ protected List getAllVmNames(Connect conn) { private HashMap getAllVms() { final HashMap vmStates = new HashMap(); - - String[] vms = null; - int[] ids = null; Connect conn = null; + try { - conn = LibvirtConnection.getConnection(); + conn = LibvirtConnection.getConnectionByType(HypervisorType.LXC.toString()); + vmStates.putAll(getAllVms(conn)); } catch (LibvirtException e) { s_logger.debug("Failed to get connection: " + e.getMessage()); - return vmStates; } + try { + conn = LibvirtConnection.getConnectionByType(HypervisorType.KVM.toString()); + vmStates.putAll(getAllVms(conn)); + } catch (LibvirtException e) { + s_logger.debug("Failed to get connection: " + e.getMessage()); + } + + return vmStates; + } + + private HashMap getAllVms(Connect conn) { + final HashMap vmStates = new HashMap(); + + String[] vms = null; + int[] ids = null; + try { ids = conn.listDomains(); } catch (final LibvirtException e) { @@ -3798,7 +3913,7 @@ private HashMap getAllVms() { dm.free(); } } catch (LibvirtException e) { - + s_logger.trace("Ignoring libvirt error.", e); } } } @@ -3818,15 +3933,13 @@ private HashMap getAllVms() { vmStates.put(vmName, state); } catch (final LibvirtException e) { s_logger.warn("Unable to get vms", e); - } catch (Exception e) { - s_logger.warn("Unable to get vms", e); } finally { try { if (dm != null) { dm.free(); } } catch (LibvirtException e) { - + s_logger.trace("Ignoring libvirt error.", e); } } } @@ -3877,7 +3990,7 @@ protected List getHostInfo() { } } } catch (LibvirtException e) { - + s_logger.trace("Ignoring libvirt error.", e); } if (isSnapshotSupported()) { @@ -3889,9 +4002,9 @@ protected List getHostInfo() { info.add(ram); info.add(cap); long dom0ram = Math.min(ram / 10, 768 * 1024 * 1024L);// save a maximum - // of 10% of - // system ram or - // 768M + // of 10% of + // system ram or + // 768M dom0ram = Math.max(dom0ram, _dom0MinMem); info.add(dom0ram); s_logger.debug("cpus=" + cpus + ", speed=" + speed + ", ram=" + ram @@ -3918,13 +4031,13 @@ protected String rebootVM(Connect conn, String vmName) { .getBytes())); String vmDef = dm.getXMLDesc(0); s_logger.debug(vmDef); - msg = stopVM(conn, vmName, defineOps.UNDEFINE_VM); - msg = startDomain(conn, vmName, vmDef); + msg = stopVM(conn, vmName); + msg = startVM(conn, vmName, vmDef); return null; } catch (LibvirtException e) { s_logger.warn("Failed to create vm", e); msg = e.getMessage(); - } catch (Exception e) { + } catch (InternalErrorException e) { s_logger.warn("Failed to create vm", e); msg = e.getMessage(); } finally { @@ -3933,14 +4046,14 @@ protected String rebootVM(Connect conn, String vmName) { dm.free(); } } catch (LibvirtException e) { - + s_logger.trace("Ignoring libvirt error.", e); } } return msg; } - protected String stopVM(Connect conn, String vmName, defineOps df) { + protected String stopVM(Connect conn, String vmName) { DomainInfo.DomainState state = null; Domain dm = null; @@ -3963,15 +4076,13 @@ protected String stopVM(Connect conn, String vmName, defineOps df) { break; } catch (LibvirtException e) { s_logger.debug("Failed to get vm status:" + e.getMessage()); - } catch (Exception e) { - s_logger.debug("Failed to get vm status:" + e.getMessage()); } finally { try { if (dm != null) { dm.free(); } } catch (LibvirtException l) { - + s_logger.trace("Ignoring libvirt error.", l); } } } @@ -3990,23 +4101,6 @@ protected String stopVM(Connect conn, String vmName, defineOps df) { } } - if (df == defineOps.UNDEFINE_VM) { - try { - dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName - .getBytes())); - dm.undefine(); - } catch (LibvirtException e) { - - } finally { - try { - if (dm != null) { - dm.free(); - } - } catch (LibvirtException l) { - - } - } - } return null; } @@ -4015,26 +4109,43 @@ protected String stopVM(Connect conn, String vmName, boolean force) { try { dm = conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName .getBytes())); + int persist = dm.isPersistent(); if (force) { - if (dm.getInfo().state != DomainInfo.DomainState.VIR_DOMAIN_SHUTOFF) { + if (dm.isActive() == 1) { dm.destroy(); + if (persist == 1) { + dm.undefine(); + } } } else { - if (dm.getInfo().state == DomainInfo.DomainState.VIR_DOMAIN_SHUTOFF) { + if (dm.isActive() == 0) { return null; } dm.shutdown(); int retry = _stopTimeout / 2000; - /* Wait for the domain gets into shutoff state */ - while ((dm.getInfo().state != DomainInfo.DomainState.VIR_DOMAIN_SHUTOFF) - && (retry >= 0)) { - Thread.sleep(2000); - retry--; + /* Wait for the domain gets into shutoff state. When it does + the dm object will no longer work, so we need to catch it. */ + try { + while ( dm.isActive() == 1 && (retry >= 0)) { + Thread.sleep(2000); + retry--; + } + } catch (LibvirtException e) { + String error = e.toString(); + if (error.contains("Domain not found")) { + s_logger.debug("successfully shut down vm " + vmName); + } else { + s_logger.debug("Error in waiting for vm shutdown:" + error); + } } if (retry < 0) { s_logger.warn("Timed out waiting for domain " + vmName + " to shutdown gracefully"); return Script.ERR_TIMEOUT; + } else { + if (persist == 1) { + dm.undefine(); + } } } } catch (LibvirtException e) { @@ -4043,15 +4154,13 @@ protected String stopVM(Connect conn, String vmName, boolean force) { } catch (InterruptedException ie) { s_logger.debug("Interrupted sleep"); return ie.getMessage(); - } catch (Exception e) { - s_logger.debug("Failed to stop VM :" + vmName + " :", e); - return e.getMessage(); } finally { try { if (dm != null) { dm.free(); } } catch (LibvirtException e) { + s_logger.trace("Ignoring libvirt error.", e); } } @@ -4097,7 +4206,7 @@ protected Integer getVncPort(Connect conn, String vmName) dm.free(); } } catch (LibvirtException l) { - + s_logger.trace("Ignoring libvirt error.", l); } } } @@ -4113,7 +4222,7 @@ private boolean IsHVMEnabled(Connect conn) { } } } catch (LibvirtException e) { - + s_logger.trace("Ignoring libvirt error.", e); } return false; } @@ -4138,8 +4247,7 @@ private String getGuestType(Connect conn, String vmName) { parser.parseDomainXML(xmlDesc); return parser.getDescription(); } catch (LibvirtException e) { - return null; - } catch (Exception e) { + s_logger.trace("Ignoring libvirt error.", e); return null; } finally { try { @@ -4147,7 +4255,7 @@ private String getGuestType(Connect conn, String vmName) { dm.free(); } } catch (LibvirtException l) { - + s_logger.trace("Ignoring libvirt error.", l); } } } @@ -4220,9 +4328,11 @@ private String getVnetIdFromBrName(String vnetBrName) { } private void cleanupVMNetworks(Connect conn, List nics) { - for (InterfaceDef nic : nics) { - if (nic.getHostNetType() == hostNicType.VNET) { - cleanupVnet(conn, getVnetIdFromBrName(nic.getBrName())); + if (nics != null) { + for (InterfaceDef nic : nics) { + if (nic.getHostNetType() == hostNicType.VNET) { + cleanupVnet(conn, getVnetIdFromBrName(nic.getBrName())); + } } } } @@ -4245,16 +4355,13 @@ protected List getInterfaces(Connect conn, String vmName) { } catch (LibvirtException e) { s_logger.debug("Failed to get dom xml: " + e.toString()); return new ArrayList(); - } catch (Exception e) { - s_logger.debug("Failed to get dom xml: " + e.toString()); - return new ArrayList(); } finally { try { if (dm != null) { dm.free(); } } catch (LibvirtException e) { - + s_logger.trace("Ignoring libvirt error.", e); } } } @@ -4271,16 +4378,13 @@ protected List getDisks(Connect conn, String vmName) { } catch (LibvirtException e) { s_logger.debug("Failed to get dom xml: " + e.toString()); return new ArrayList(); - } catch (Exception e) { - s_logger.debug("Failed to get dom xml: " + e.toString()); - return new ArrayList(); } finally { try { if (dm != null) { dm.free(); } } catch (LibvirtException e) { - + s_logger.trace("Ignoring libvirt error.", e); } } } @@ -4360,7 +4464,7 @@ private VmStatsEntry getVmStat(Connect conn, String vmName) NodeInfo node = conn.nodeInfo(); utilization = utilization / node.cpus; if(utilization > 0){ - stats.setCPUUtilization(utilization * 100); + stats.setCPUUtilization(utilization * 100); } } @@ -4434,13 +4538,13 @@ protected boolean destroy_network_rules_for_vm(Connect conn, String vmName) { } protected boolean default_network_rules(Connect conn, String vmName, - NicTO nic, Long vmId) { + NicTO nic, Long vmId, String secIpStr) { if (!_can_bridge_firewall) { return false; } List intfs = getInterfaces(conn, vmName); - if (intfs.size() < nic.getDeviceId()) { + if (intfs.size() == 0 || intfs.size() < nic.getDeviceId()) { return false; } @@ -4458,6 +4562,7 @@ protected boolean default_network_rules(Connect conn, String vmName, cmd.add("--vmmac", nic.getMac()); cmd.add("--vif", vif); cmd.add("--brname", brname); + cmd.add("--nicsecips", secIpStr); String result = cmd.execute(); if (result != null) { return false; @@ -4520,7 +4625,7 @@ protected boolean default_network_rules_for_systemvm(Connect conn, private boolean add_network_rules(String vmName, String vmId, String guestIP, String sig, String seq, String mac, String rules, - String vif, String brname) { + String vif, String brname, String secIps) { if (!_can_bridge_firewall) { return false; } @@ -4536,7 +4641,8 @@ private boolean add_network_rules(String vmName, String vmId, cmd.add("--vmmac", mac); cmd.add("--vif", vif); cmd.add("--brname", brname); - if (rules != null) { + cmd.add("--nicsecips", secIps); + if (newRules != null && !newRules.isEmpty()) { cmd.add("--rules", newRules); } String result = cmd.execute(); @@ -4546,6 +4652,25 @@ private boolean add_network_rules(String vmName, String vmId, return true; } + private boolean network_rules_vmSecondaryIp (Connect conn, String vmName, String secIp, String action) { + + if (!_can_bridge_firewall) { + return false; + } + + Script cmd = new Script(_securityGroupPath, _timeout, s_logger); + cmd.add("network_rules_vmSecondaryIp"); + cmd.add("--vmname", vmName); + cmd.add("--nicsecips", secIp); + cmd.add("--action", action); + + String result = cmd.execute(); + if (result != null) { + return false; + } + return true; + } + private boolean cleanup_rules() { if (!_can_bridge_firewall) { return false; @@ -4603,20 +4728,20 @@ private boolean isSnapshotSupported() { private Pair getNicStats(String nicName) { double rx = 0.0; - OutputInterpreter.OneLineParser rxParser = new OutputInterpreter.OneLineParser(); - String result = executeBashScript("cat /sys/class/net/" + nicName - + "/statistics/rx_bytes", rxParser); - if (result == null && rxParser.getLine() != null) { - rx = Double.parseDouble(rxParser.getLine()); + String rxFile = "/sys/class/net/" + nicName + "/statistics/rx_bytes"; + String rxContent = FileUtil.readFileAsString(rxFile); + if (rxContent == null) { + s_logger.warn("Failed to read the rx_bytes for " + nicName + " from " + rxFile); } + rx = Double.parseDouble(rxContent); double tx = 0.0; - OutputInterpreter.OneLineParser txParser = new OutputInterpreter.OneLineParser(); - result = executeBashScript("cat /sys/class/net/" + nicName - + "/statistics/tx_bytes", txParser); - if (result == null && txParser.getLine() != null) { - tx = Double.parseDouble(txParser.getLine()); + String txFile = "/sys/class/net/" + nicName + "/statistics/tx_bytes"; + String txContent = FileUtil.readFileAsString(txFile); + if (txContent == null) { + s_logger.warn("Failed to read the tx_bytes for " + nicName + " from " + txFile); } + tx = Double.parseDouble(txContent); return new Pair(rx, tx); } @@ -4625,8 +4750,21 @@ private Answer execute(NetworkRulesSystemVmCommand cmd) { boolean success = false; Connect conn; try { - conn = LibvirtConnection.getConnection(); + conn = LibvirtConnection.getConnectionByVmName(cmd.getVmName()); success = default_network_rules_for_systemvm(conn, cmd.getVmName()); + } catch (LibvirtException e) { + s_logger.trace("Ignoring libvirt error.", e); + } + + return new Answer(cmd, success, ""); + } + + private Answer execute(NetworkRulesVmSecondaryIpCommand cmd) { + boolean success = false; + Connect conn; + try { + conn = LibvirtConnection.getConnectionByVmName(cmd.getVmName()); + success = network_rules_vmSecondaryIp(conn, cmd.getVmName(), cmd.getVmSecIp(), cmd.getAction()); } catch (LibvirtException e) { // TODO Auto-generated catch block e.printStackTrace(); @@ -4635,4 +4773,34 @@ private Answer execute(NetworkRulesSystemVmCommand cmd) { return new Answer(cmd, success, ""); } + @Override + public void setName(String name) { + // TODO Auto-generated method stub + + } + + @Override + public void setConfigParams(Map params) { + // TODO Auto-generated method stub + + } + + @Override + public Map getConfigParams() { + // TODO Auto-generated method stub + return null; + } + + @Override + public int getRunLevel() { + // TODO Auto-generated method stub + return 0; + } + + @Override + public void setRunLevel(int level) { + // TODO Auto-generated method stub + + } + } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java index 981d34300..2ad16166c 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtConnection.java @@ -16,33 +16,75 @@ // under the License. package com.cloud.hypervisor.kvm.resource; +import com.cloud.hypervisor.Hypervisor; +import com.cloud.hypervisor.Hypervisor.HypervisorType; import org.apache.log4j.Logger; import org.libvirt.Connect; import org.libvirt.LibvirtException; +import java.util.HashMap; +import java.util.Map; +import java.util.UUID; + public class LibvirtConnection { private static final Logger s_logger = Logger .getLogger(LibvirtConnection.class); + static private Map _connections = new HashMap(); + static private Connect _connection; static private String _hypervisorURI; static public Connect getConnection() throws LibvirtException { - if (_connection == null) { - _connection = new Connect(_hypervisorURI, false); + return getConnection(_hypervisorURI); + } + + static public Connect getConnection(String hypervisorURI) throws LibvirtException { + Connect conn = _connections.get(hypervisorURI); + + if (conn == null) { + conn = new Connect(hypervisorURI, false); + _connections.put(hypervisorURI, conn); } else { try { - _connection.getVersion(); + conn.getVersion(); } catch (LibvirtException e) { s_logger.debug("Connection with libvirtd is broken, due to " + e.getMessage()); - _connection = new Connect(_hypervisorURI, false); + conn = new Connect(hypervisorURI, false); + _connections.put(hypervisorURI, conn); } } - return _connection; + return conn; + } + + static public Connect getConnectionByVmName(String vmName) throws LibvirtException { + HypervisorType[] hypervisors = new HypervisorType[] {HypervisorType.KVM, Hypervisor.HypervisorType.LXC}; + + for (HypervisorType hypervisor : hypervisors) { + Connect conn = LibvirtConnection.getConnectionByType(hypervisor.toString()); + if (conn.domainLookupByUUID(UUID.nameUUIDFromBytes(vmName.getBytes())) != null) { + return conn; + } + } + + // return the default connection + return getConnection(); + } + + static public Connect getConnectionByType(String hypervisorType) throws LibvirtException { + return getConnection(getHypervisorURI(hypervisorType)); } static void initialize(String hypervisorURI) { _hypervisorURI = hypervisorURI; } + + static String getHypervisorURI(String hypervisorType) { + if ("LXC".equalsIgnoreCase(hypervisorType)) { + return "lxc:///"; + } else { + return "qemu:///system"; + } + } } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java index b622b6d33..ac4baf122 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtDomainXMLParser.java @@ -25,6 +25,7 @@ import javax.xml.parsers.DocumentBuilderFactory; import javax.xml.parsers.ParserConfigurationException; +import org.apache.cloudstack.utils.qemu.QemuImg.PhysicalDiskFormat; import org.apache.log4j.Logger; import org.w3c.dom.Document; import org.w3c.dom.Element; @@ -110,23 +111,29 @@ public boolean parseDomainXML(String domXML) { String bridge = getAttrValue("source", "bridge", nic); def.defBridgeNet(bridge, dev, mac, nicModel.valueOf(model.toUpperCase())); + } else if (type.equalsIgnoreCase("ethernet")) { + String scriptPath = getAttrValue("script", "path", nic); + def.defEthernet(dev, mac, nicModel.valueOf(model.toUpperCase()), scriptPath); } interfaces.add(def); } Element graphic = (Element) devices .getElementsByTagName("graphics").item(0); - String port = graphic.getAttribute("port"); - if (port != null) { - try { - vncPort = Integer.parseInt(port); - if (vncPort != -1) { - vncPort = vncPort - 5900; - } else { + + if (graphic != null) { + String port = graphic.getAttribute("port"); + if (port != null) { + try { + vncPort = Integer.parseInt(port); + if (vncPort != -1) { + vncPort = vncPort - 5900; + } else { + vncPort = null; + } + } catch (NumberFormatException nfe) { vncPort = null; } - } catch (NumberFormatException nfe) { - vncPort = null; } } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java index d5cd91a95..7f9ceebe7 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtStorageVolumeDef.java @@ -18,7 +18,7 @@ public class LibvirtStorageVolumeDef { public enum volFormat { - RAW("raw"), QCOW2("qcow2"), DIR("dir"); + RAW("raw"), QCOW2("qcow2"), DIR("dir"), TAR("tar"); private String _format; volFormat(String format) { @@ -38,6 +38,10 @@ public static volFormat getFormat(String format) { return RAW; } else if (format.equalsIgnoreCase("qcow2")) { return QCOW2; + } else if (format.equalsIgnoreCase("dir")) { + return DIR; + } else if (format.equalsIgnoreCase("tar")) { + return TAR; } return null; } diff --git a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java index acfd9cf1f..9cddb2e43 100644 --- a/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java +++ b/plugins/hypervisors/kvm/src/com/cloud/hypervisor/kvm/resource/LibvirtVMDef.java @@ -31,7 +31,7 @@ public class LibvirtVMDef { public static class GuestDef { enum guestType { - KVM, XEN, EXE + KVM, XEN, EXE, LXC } enum bootOrder { @@ -62,6 +62,10 @@ public void setGuestType(guestType type) { _type = type; } + public guestType getGuestType() { + return _type; + } + public void setGuestArch(String arch) { _arch = arch; } @@ -106,22 +110,31 @@ public String toString() { } guestDef.append("\n"); return guestDef.toString(); - } else + } else if (_type == guestType.LXC) { + StringBuilder guestDef = new StringBuilder(); + guestDef.append("\n"); + guestDef.append("exe\n"); + guestDef.append("/sbin/init\n"); + guestDef.append("\n"); + return guestDef.toString(); + } else { return null; + } } } public static class GuestResourceDef { private long _mem; - private int _currentMem = -1; + private long _currentMem = -1; private String _memBacking; private int _vcpu = -1; + private boolean _memBalloning= false; public void setMemorySize(long mem) { _mem = mem; } - public void setCurrentMem(int currMem) { + public void setCurrentMem(long currMem) { _currentMem = currMem; } @@ -133,6 +146,10 @@ public void setVcpuNum(int vcpu) { _vcpu = vcpu; } + public void setMemBalloning(boolean turnon){ + _memBalloning = turnon; + } + @Override public String toString() { StringBuilder resBuidler = new StringBuilder(); @@ -145,6 +162,9 @@ public String toString() { resBuidler.append("" + "<" + _memBacking + "/>" + "\n"); } + if (_memBalloning){ + resBuidler.append("\n" + "\n" + "\n"); + } if (_vcpu != -1) { resBuidler.append("" + _vcpu + "\n"); } @@ -271,6 +291,7 @@ public String toString() { public static class DevicesDef { private String _emulator; + private GuestDef.guestType _guestType; private final Map> devices = new HashMap>(); public boolean addDevice(Object device) { @@ -290,6 +311,10 @@ public void setEmulatorPath(String emulator) { _emulator = emulator; } + public void setGuestType(GuestDef.guestType guestType) { + _guestType = guestType; + } + @Override public String toString() { StringBuilder devicesBuilder = new StringBuilder(); @@ -301,6 +326,13 @@ public String toString() { for (List devs : devices.values()) { for (Object dev : devs) { + if (_guestType == GuestDef.guestType.LXC) { + if (dev instanceof GraphicDef || + dev instanceof InputDef || + dev instanceof DiskDef) { + continue; + } + } devicesBuilder.append(dev.toString()); } } @@ -602,7 +634,7 @@ public String toString() { public static class InterfaceDef { enum guestNetType { - BRIDGE("bridge"), NETWORK("network"), USER("user"), ETHERNET( + BRIDGE("bridge"), DIRECT("direct"), NETWORK("network"), USER("user"), ETHERNET( "ethernet"), INTERNAL("internal"); String _type; @@ -640,6 +672,7 @@ enum hostNicType { * internal */ private hostNicType _hostNetType; /* Only used by agent java code */ + private String _netSourceMode; private String _sourceName; private String _networkName; private String _macAddr; @@ -659,6 +692,16 @@ public void defBridgeNet(String brName, String targetBrName, _model = model; } + public void defDirectNet(String sourceName, String targetName, + String macAddr, nicModel model, String sourceMode) { + _netType = guestNetType.DIRECT; + _netSourceMode = sourceMode; + _sourceName = sourceName; + _networkName = targetName; + _macAddr = macAddr; + _model = model; + } + public void defPrivateNet(String networkName, String targetName, String macAddr, nicModel model) { _netType = guestNetType.NETWORK; @@ -668,13 +711,19 @@ public void defPrivateNet(String networkName, String targetName, _model = model; } - public void defEthernet(String targetName, String macAddr, nicModel model) { + public void defEthernet(String targetName, String macAddr, nicModel model, String scriptPath) { _netType = guestNetType.ETHERNET; _networkName = targetName; + _sourceName = targetName; _macAddr = macAddr; _model = model; + _scriptPath = scriptPath; } + public void defEthernet(String targetName, String macAddr, nicModel model) { + defEthernet(targetName, macAddr, model, null); + } + public void setHostNetType(hostNicType hostNetType) { _hostNetType = hostNetType; } @@ -691,6 +740,10 @@ public guestNetType getNetType() { return _netType; } + public String getNetSourceMode() { + return _netSourceMode; + } + public String getDevName() { return _networkName; } @@ -731,6 +784,8 @@ public String toString() { netBuilder.append("\n"); } else if (_netType == guestNetType.NETWORK) { netBuilder.append("\n"); + } else if (_netType == guestNetType.DIRECT) { + netBuilder.append("\n"); } if (_networkName != null) { netBuilder.append("\n"); @@ -741,6 +796,9 @@ public String toString() { if (_model != null) { netBuilder.append("\n"); } + if (_scriptPath != null) { + netBuilder.append(" + +