diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 000000000000..2af9f54edc44 --- /dev/null +++ b/.github/CODEOWNERS @@ -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. + +/plugins/storage/volume/linstor @rp- +/plugins/storage/volume/storpool @slavkap + +.pre-commit-config.yaml @jbampton +/.github/linters/ @jbampton diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yml similarity index 100% rename from .github/ISSUE_TEMPLATE/feature_request.yaml rename to .github/ISSUE_TEMPLATE/feature_request.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000000..88985cbdef1e --- /dev/null +++ b/.github/dependabot.yml @@ -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. + +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "maven" # See documentation for possible values + directory: "/" # Location of package manifests + schedule: + interval: "daily" diff --git a/.github/linters/.yamllint.yml b/.github/linters/.yamllint.yml index 8a72aee0adbe..97b66848696a 100644 --- a/.github/linters/.yamllint.yml +++ b/.github/linters/.yamllint.yml @@ -15,13 +15,14 @@ # specific language governing permissions and limitations # under the License. --- -extends: relaxed +extends: default rules: line-length: max: 400 # Very forgiving for GitHub Actions and infrastructure files indentation: disable # Disable indentation checking for existing files comments: disable # Disable comment formatting checks + braces: disable brackets: disable # Disable bracket spacing checks colons: max-spaces-after: -1 # Allow any number of spaces after colon diff --git a/.github/linters/codespell.txt b/.github/linters/codespell.txt index 27761c70f446..67cbeaa7cbb3 100644 --- a/.github/linters/codespell.txt +++ b/.github/linters/codespell.txt @@ -4,6 +4,7 @@ acount actuall acuiring acumulate +addin addreess addtion adminstrator @@ -12,10 +13,8 @@ afrer afterall againt ags -aktive algoritm allo -alloacate allocted alocation alogrithm @@ -65,6 +64,7 @@ bject boardcast bootstraper bu +callin cant capabilites capablity @@ -73,6 +73,7 @@ carrefully cavaet chaing checkd +checkin childs choosen chould @@ -93,7 +94,6 @@ confg configruation configuable conneciton -connexion constrait constraits containg @@ -101,9 +101,7 @@ contex continuesly contro controler -controles controll -convienient convinience coputer correcponding @@ -158,13 +156,13 @@ differnet differnt direcotry directroy -disale disbale discrepency disover dissapper dissassociated divice +dockin doesn' doesnot doesnt @@ -175,7 +173,6 @@ eanbled earch ect elemnt -eles elments emmited enble @@ -187,22 +184,19 @@ environmnet equivalant erro erronous -everthing everytime excute execept execption +exects execut executeable exeeded exisitng exisits -existin existsing -exitting expcted expection -explaination explicitely faield faild @@ -215,7 +209,6 @@ fillled findout fisrt fo -folowing fowarding frist fro @@ -234,6 +227,7 @@ hanling happend hasing hasnt +havin hda hostanme hould @@ -253,20 +247,14 @@ implmeneted implmentation incase includeing -incosistency indecates -indien infor informations informaton -infrastrcuture ingore -inital initalize initator -initilization inspite -instace instal instnace intefaces @@ -284,12 +272,8 @@ ist klunky lable leve -lief limite -linke listner -lokal -lokales maintainence maintenace maintenence @@ -298,7 +282,6 @@ mambers manaully manuel maxium -mehtod mergable mesage messge @@ -308,7 +291,6 @@ minumum mis modifers mor -mot mulitply multipl multple @@ -322,7 +304,7 @@ nin nodel nome noone -nowe +notin numbe numer occured @@ -390,12 +372,9 @@ remaning remore remvoing renabling -repeatly reponse reqest reqiured -requieres -requried reserv reserverd reseted @@ -414,14 +393,13 @@ retuned returing rever rocessor +roperty runing runnign sate scalled -scipt scirpt scrip -seconadry seconday seesion sepcified @@ -434,12 +412,10 @@ settig sevices shoul shoule -sie signle simplier singature skiping -snaphsot snpashot specied specifed @@ -450,7 +426,6 @@ standy statics stickyness stil -stip storeage strat streched @@ -459,7 +434,6 @@ succesfull successfull suceessful suces -sucessfully suiteable suppots suppport @@ -492,7 +466,6 @@ uncompressible uneccessarily unexepected unexpect -unknow unkonw unkown unneccessary @@ -500,14 +473,12 @@ unparseable unrecoginized unsupport unxpected -updat uptodate usera usign usin utlization vaidate -valiate valule valus varibles @@ -516,8 +487,6 @@ verfying verifing virutal visable -wakup wil wit -wll wth diff --git a/.github/workflows/main-sonar-check.yml b/.github/workflows/main-sonar-check.yml index 70cc3fbe19f3..224ea2cde801 100644 --- a/.github/workflows/main-sonar-check.yml +++ b/.github/workflows/main-sonar-check.yml @@ -44,14 +44,14 @@ jobs: cache: 'maven' - name: Cache SonarCloud packages - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - name: Cache local Maven repository - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: ~/.m2/repository key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml', '*/pom.xml', '*/*/pom.xml', '*/*/*/pom.xml') }} diff --git a/.github/workflows/linter.yml b/.github/workflows/pre-commit.yml similarity index 90% rename from .github/workflows/linter.yml rename to .github/workflows/pre-commit.yml index 6ff997412ff8..11fe5c068814 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/pre-commit.yml @@ -39,11 +39,11 @@ jobs: pip install pre-commit - name: Set PY run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV - - uses: actions/cache@v4 + - uses: actions/cache@v5 with: path: ~/.cache/pre-commit key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} - name: Run pre-commit - run: pre-commit run --all-files + run: pre-commit run --color=always --all-files - name: Run manual pre-commit hooks - run: pre-commit run --all-files --hook-stage manual + run: pre-commit run --color=always --all-files --hook-stage manual diff --git a/.github/workflows/sonar-check.yml b/.github/workflows/sonar-check.yml index 46bfdd7d015c..31fb671cc58f 100644 --- a/.github/workflows/sonar-check.yml +++ b/.github/workflows/sonar-check.yml @@ -46,14 +46,14 @@ jobs: cache: 'maven' - name: Cache SonarCloud packages - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: ~/.sonar/cache key: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar - name: Cache local Maven repository - uses: actions/cache@v4 + uses: actions/cache@v5 with: path: ~/.m2/repository key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml', '*/pom.xml', '*/*/pom.xml', '*/*/*/pom.xml') }} diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml new file mode 100644 index 000000000000..f12fbe93de66 --- /dev/null +++ b/.github/workflows/stale.yml @@ -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. + +name: 'Close stale issues and PRs' +on: + schedule: + - cron: '30 1 * * *' + +jobs: + stale: + runs-on: ubuntu-latest + permissions: + actions: write + issues: write + pull-requests: write + steps: + - uses: actions/stale@v10 + with: + stale-issue-message: 'This issue is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.' + stale-pr-message: 'This PR is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.' + close-issue-message: 'This issue was closed because it has been stale for 120 days with no activity.' + close-pr-message: 'This PR was closed because it has been stale for 120 days with no activity.' + stale-issue-label: 'no-issue-activity' + stale-pr-label: 'no-pr-activity' + days-before-stale: 120 + exempt-issue-labels: 'gsoc,good-first-issue,long-term-plan' + exempt-pr-labels: 'status:ready-for-merge,status:needs-testing,status:on-hold' diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index e1a7db702204..ef0b0c204ebd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -25,6 +25,12 @@ repos: hooks: - id: identity - id: check-hooks-apply + - repo: https://github.com/thlorenz/doctoc.git + rev: v2.2.0 + hooks: + - id: doctoc + name: Add TOC for Markdown files + files: ^CONTRIBUTING\.md$|^INSTALL\.md$|^README\.md$ - repo: https://github.com/oxipng/oxipng rev: v9.1.5 hooks: @@ -41,6 +47,11 @@ repos: - repo: https://github.com/Lucas-C/pre-commit-hooks rev: v1.5.5 hooks: + - id: chmod + name: set file permissions + args: ['644'] + files: \.md$ + stages: [manual] - id: insert-license name: add license for all Markdown files files: \.md$ @@ -51,6 +62,44 @@ repos: - .github/workflows/license-templates/LICENSE.txt - --fuzzy-match-generates-todo exclude: ^(CHANGES|ISSUE_TEMPLATE|PULL_REQUEST_TEMPLATE)\.md$|^ui/docs/(full|smoke)-test-plan\.template\.md$ + - id: insert-license + name: add license for all Shell files + description: automatically adds a licence header to all Shell files that don't have a license header + files: \.sh$ + args: + - --comment-style + - '|#|' + - --license-filepath + - .github/workflows/license-templates/LICENSE.txt + - --fuzzy-match-generates-todo + - id: insert-license + name: add license for all SQL files + files: \.sql$ + args: + - --comment-style + - '|--|' + - --license-filepath + - .github/workflows/license-templates/LICENSE.txt + - --fuzzy-match-generates-todo + - id: insert-license + name: add license for all Vue files + files: \.vue$ + args: + - --comment-style + - '|//|' + - --license-filepath + - .github/workflows/license-templates/LICENSE.txt + - --fuzzy-match-generates-todo + - id: insert-license + name: add license for all YAML files + description: automatically adds a licence header to all YAML files that don't have a license header + files: \.ya?ml$ + args: + - --comment-style + - '|#|' + - --license-filepath + - .github/workflows/license-templates/LICENSE.txt + - --fuzzy-match-generates-todo - repo: https://github.com/pre-commit/pre-commit-hooks rev: v6.0.0 hooks: @@ -84,7 +133,7 @@ repos: ^systemvm/agent/certs/realhostip\.key$| ^test/integration/smoke/test_ssl_offloading\.py$ - id: end-of-file-fixer - exclude: \.vhd$ + exclude: \.vhd$|\.svg$ - id: file-contents-sorter args: [--unique] files: ^\.github/linters/codespell\.txt$ @@ -92,11 +141,11 @@ repos: - id: forbid-submodules - id: mixed-line-ending - id: trailing-whitespace - files: \.(bat|cfg|cs|css|gitignore|header|in|install|java|md|properties|py|rb|rc|sh|sql|te|template|txt|ucls|vue|xml|xsl|yaml|yml)$|^cloud-cli/bindir/cloud-tool$|^debian/changelog$ + files: ^(LICENSE|NOTICE)$|\.(bat|cfg|cs|css|gitignore|header|in|install|java|md|properties|py|rb|rc|sh|sql|te|template|txt|ucls|vue|xml|xsl|yaml|yml)$|^cloud-cli/bindir/cloud-tool$|^debian/changelog$ args: [--markdown-linebreak-ext=md] exclude: ^services/console-proxy/rdpconsole/src/test/doc/freerdp-debug-log\.txt$ - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.4.1 hooks: - id: codespell name: run codespell @@ -117,14 +166,6 @@ repos: args: [--config=.github/linters/.markdown-lint.yml] types: [markdown] files: \.(md|mdown|markdown)$ - - repo: https://github.com/Lucas-C/pre-commit-hooks - rev: v1.5.5 - hooks: - - id: chmod - name: set file permissions - args: ['644'] - files: \.md$ - stages: [manual] - repo: https://github.com/adrienverge/yamllint rev: v1.37.1 hooks: diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 57b7a716cd4a..f0678ed76498 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -21,6 +21,24 @@ ## Summary + + + +- [Summary](#summary) +- [Bug fixes](#bug-fixes) +- [Developing new features](#developing-new-features) +- [PendingReleaseNotes file](#pendingreleasenotes-file) +- [Fork the code](#fork-the-code) +- [Making changes](#making-changes) +- [Rebase `feature_x` to include updates from `upstream/main`](#rebase-feature_x-to-include-updates-from-upstreammain) +- [Make a GitHub Pull Request to contribute your changes](#make-a-github-pull-request-to-contribute-your-changes) +- [Cleaning up after a successful pull request](#cleaning-up-after-a-successful-pull-request) +- [Release Principles](#release-principles) + + + +## Summary + This document covers how to contribute to the ACS project. ACS uses GitHub PRs to manage code contributions. These instructions assume you have a GitHub.com account, so if you don't have one you will have to create one. Your proposed code changes will be published to your own fork of the ACS project, and you will submit a Pull Request for your changes to be added. diff --git a/INSTALL.md b/INSTALL.md index 0619b97f21c1..52f109b0a411 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -26,9 +26,21 @@ or the developer [wiki](https://cwiki.apache.org/confluence/display/CLOUDSTACK/H Apache CloudStack developers use various platforms for development, this guide was tested against a CentOS 7 x86_64 setup. -* [Setting up development environment](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment) for Apache CloudStack. -* [Building](https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+CloudStack) Apache CloudStack. -* [Appliance based development](https://github.com/rhtyd/monkeybox) + + + +- [Setting up Development Environment](#setting-up-development-environment) + - [Using jenv and/or pyenv for Version Management](#using-jenv-andor-pyenv-for-version-management) +- [Getting the Source Code](#getting-the-source-code) +- [Building](#building) +- [To bring up CloudStack UI](#to-bring-up-cloudstack-ui) +- [Building with non-redistributable plugins](#building-with-non-redistributable-plugins) +- [Packaging and Installation](#packaging-and-installation) + - [Debian/Ubuntu](#debianubuntu) + - [RHEL/CentOS](#rhelcentos) +- [Notes](#notes) + + ## Setting up Development Environment diff --git a/LICENSE b/LICENSE index 8be7d8083a5e..e61c431f5fad 100644 --- a/LICENSE +++ b/LICENSE @@ -177,14 +177,14 @@ Copyright (c) 2014 The Apache Software Foundation of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS - + This distribution contains third party resources. Within the console-proxy/js directory licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) - Copyright (c) 2009, John Resig - + Copyright (c) 2009, John Resig + 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 @@ -192,10 +192,10 @@ Within the console-proxy/js directory 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 @@ -203,43 +203,43 @@ 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 + + from John Resig + jquery.js Within the systemvm/debian/etc directory placed in the public domain - by Adiscon GmbH http://www.adiscon.com/ - rsyslog.conf - by Simon Kelley - dnsmasq.conf - vpcdnsmasq.conf + by Adiscon GmbH http://www.adiscon.com/ + rsyslog.conf + by Simon Kelley + dnsmasq.conf + vpcdnsmasq.conf Within the systemvm/debian/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 + from The Apache Software Foundation http://www.apache.org/ + httpd.conf vhost.template Within the systemvm/debian/etc/ssh/ directory licensed under the BSD (2-clause) http://www.opensource.org/licenses/BSD-2-Clause (as follows) - - + + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 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. - + Neither the name of the author nor the names of 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 @@ -250,55 +250,55 @@ Within the systemvm/debian/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 + + from OpenSSH Project http://www.openssh.org/ + sshd_config Within the systemvm/debian/root/redundant_router directory placed in the public domain - by The netfilter.org project http://www.netfilter.org/ - conntrackd.conf.templ + by The netfilter.org project http://www.netfilter.org/ + 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 + from OpenStack, LLC http://www.openstack.org + 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 + from OpenStack, LLC http://www.openstack.org + swift Within the ui/lib directory placed in the public domain - by Eric Meyer http://meyerweb.com/eric/ + by Eric Meyer http://meyerweb.com/eric/ 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 + from Google Inc. http://google.com 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) Copyright (c) 2008 George McGinley Smith - All rights reserved. - + All rights reserved. + Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: - + Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 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. - + Neither the name of the author nor the names of 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 @@ -309,13 +309,13 @@ 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 + + from George McGinley Smith + 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 @@ -323,10 +323,10 @@ Within the ui/lib directory 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 @@ -334,14 +334,14 @@ 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 The Dojo Foundation http://dojofoundation.org/ + + 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) - Copyright (c) 2011, John Resig - + Copyright (c) 2011, John Resig + 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 @@ -349,10 +349,10 @@ Within the ui/lib directory 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 @@ -360,14 +360,14 @@ 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 + + from John Resig + jquery.js licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) Copyright (c) 2014 Jörn Zaefferer - + 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 @@ -375,10 +375,10 @@ Within the ui/lib directory 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 @@ -386,9 +386,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 + + from Jorn Zaefferer + jquery.validate.js licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) @@ -418,8 +418,8 @@ Within the ui/lib directory licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) - Copyright (c) 2010, Sebastian Tschan - + Copyright (c) 2010, Sebastian Tschan + 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 @@ -427,10 +427,10 @@ Within the ui/lib directory 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 @@ -438,14 +438,14 @@ 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 + + from Sebastian Tschan https://blueimp.net + jquery.md5.js licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) - Copyright (c) 2006 Klaus Hartl (stilbuero.de) - + Copyright (c) 2006 Klaus Hartl (stilbuero.de) + 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 @@ -453,10 +453,10 @@ Within the ui/lib directory 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 @@ -464,15 +464,15 @@ 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 + + from Klaus Hartl http://stilbuero.de + jquery.cookies.js Within the ui/lib/flot directory licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) - Released under the MIT license by IOLA, December 2007. - + Released under the MIT license by IOLA, December 2007. + 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 @@ -480,10 +480,10 @@ Within the ui/lib/flot directory 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 @@ -491,24 +491,24 @@ 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 + + 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 licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows) Created by Brian Medendorp, June 2009 - Updated November 2009 with contributions from: btburnett3, Anthony Aragues and Xavi Ivars - + Updated November 2009 with contributions from: btburnett3, Anthony Aragues and Xavi Ivars + 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 @@ -516,10 +516,10 @@ Within the ui/lib/flot directory 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 @@ -527,13 +527,13 @@ 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 + + from Brian Medendorp + jquery.pie.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 @@ -541,10 +541,10 @@ Within the ui/lib/flot directory 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 @@ -552,14 +552,14 @@ 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 + + from Ole Laursen + 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) - - + + 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 @@ -567,10 +567,10 @@ Within the ui/lib/jquery-ui directory 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 @@ -578,17 +578,17 @@ 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 + + from jQuery UI Developers http://jqueryui.com/about + 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) - Copyright (c) 2012 John Resig, Jörn Zaefferer - + Copyright (c) 2012 John Resig, Jörn Zaefferer + 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 @@ -596,10 +596,10 @@ Within the ui/lib/qunit directory 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 @@ -607,20 +607,20 @@ 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 + + from Jorn Zaefferer qunit.css from http://docs.jquery.com/QUnit qunit.js from http://docs.jquery.com/QUnit Within the utils/src/main/java/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/ + from Clinton Begin http://code.google.com/p/mybatis/ ScriptRunner.java from http://code.google.com/p/mybatis/ Within the utils/src/main/java/org/apache/commons/httpclient/contrib/ssl directory licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above) Copyright (c) 2007 The Apache Software Foundation - from The Apache Software Foundation http://www.apache.org/ - EasySSLProtocolSocketFactory.java - EasyX509TrustManager.java + from The Apache Software Foundation http://www.apache.org/ + EasySSLProtocolSocketFactory.java + EasyX509TrustManager.java diff --git a/NOTICE b/NOTICE index b19e4a428530..8666be264b51 100644 --- a/NOTICE +++ b/NOTICE @@ -1,62 +1,62 @@ Apache CloudStack Copyright 2014 The Apache Software Foundation - + This product includes software developed at The Apache Software Foundation (http://www.apache.org/). - - + + This distribution contains third party resources requiring the following notices: - - For + + For jquery.js - + jQuery JavaScript Library v1.3.2 http://jquery.com/ - + Copyright (c) 2009 John Resig Dual licensed under the MIT and GPL licenses. http://docs.jquery.com/License - + Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009) Revision: 6246 - - For + + For jquery.js - + jQuery JavaScript Library v1.6.4 http://jquery.com/ - + Copyright 2011, John Resig Dual licensed under the MIT or GPL Version 2 licenses. http://jquery.org/license - + Includes Sizzle.js http://sizzlejs.com/ Copyright 2011, The Dojo Foundation Released under the MIT, BSD, and GPL Licenses. - + Date: Mon Sep 12 18:54:48 2011 -0400 - - For + + 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. @@ -65,15 +65,15 @@ Copyright 2014 The Apache Software Foundation Distributed under the BSD License See http://pajhome.org.uk/crypt/md5 for more info. - - For + + For jquery.colorhelpers.js - + Plugin for jQuery for working with colors. - + Version 1.1. - + Inspiration from jQuery color animation plugin by John Resig. - + Released under the MIT license by Ole Laursen, October 2009. diff --git a/PRE-COMMIT.md b/PRE_COMMIT.md similarity index 97% rename from PRE-COMMIT.md rename to PRE_COMMIT.md index 9b76929d4223..62dc296c99e4 100644 --- a/PRE-COMMIT.md +++ b/PRE_COMMIT.md @@ -20,7 +20,7 @@ # pre-commit We run [pre-commit](https://pre-commit.com/) with -[GitHub Actions](https://github.com/apache/cloudstack/blob/main/.github/workflows/linter.yml) so installation on your +[GitHub Actions](https://github.com/apache/cloudstack/blob/main/.github/workflows/pre-commit.yml) so installation on your local machine is currently optional. The `pre-commit` [configuration file](https://github.com/apache/cloudstack/blob/main/.pre-commit-config.yaml) diff --git a/README.md b/README.md index a24131958a2c..a5aacb49f6b5 100644 --- a/README.md +++ b/README.md @@ -31,6 +31,24 @@ [![Apache CloudStack](tools/logo/apache_cloudstack.png)](https://cloudstack.apache.org/) + + + +- [Who Uses CloudStack?](#who-uses-cloudstack) +- [Demo](#demo) +- [Getting Started](#getting-started) +- [Getting Source Repository](#getting-source-repository) +- [Documentation](#documentation) +- [News and Events](#news-and-events) +- [Getting Involved and Contributing](#getting-involved-and-contributing) +- [Reporting Security Vulnerabilities](#reporting-security-vulnerabilities) +- [License](#license) +- [Notice of Cryptographic Software](#notice-of-cryptographic-software) +- [Star History](#star-history) +- [Contributors](#contributors) + + + Apache CloudStack is open source software designed to deploy and manage large networks of virtual machines, as a highly available, highly scalable Infrastructure as a Service (IaaS) cloud computing platform. CloudStack is used diff --git a/agent/conf/uefi.properties.in b/agent/conf/uefi.properties.in new file mode 100644 index 000000000000..3c8866f634bc --- /dev/null +++ b/agent/conf/uefi.properties.in @@ -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. + +# Configuration file for UEFI + +guest.nvram.template.legacy=@GUESTNVRAMTEMPLATELEGACY@ +guest.loader.legacy=@GUESTLOADERLEGACY@ +guest.nvram.template.secure=@GUESTNVRAMTEMPLATESECURE@ +guest.loader.secure=@GUESTLOADERSECURE@ +guest.nvram.path=@GUESTNVRAMPATH@ diff --git a/agent/pom.xml b/agent/pom.xml index 0fd7d35823e2..5ab6cfe17c13 100644 --- a/agent/pom.xml +++ b/agent/pom.xml @@ -24,7 +24,7 @@ org.apache.cloudstack cloudstack - 4.22.0.0-SNAPSHOT + 4.23.0.0-SNAPSHOT diff --git a/agent/src/main/java/com/cloud/agent/Agent.java b/agent/src/main/java/com/cloud/agent/Agent.java index 0d63f6690284..275fd41edc34 100644 --- a/agent/src/main/java/com/cloud/agent/Agent.java +++ b/agent/src/main/java/com/cloud/agent/Agent.java @@ -1322,7 +1322,6 @@ public void doTask(final Task task) throws TaskExecutionException { processResponse((Response)request, task.getLink()); } else { //put the requests from mgt server into another thread pool, as the request may take a longer time to finish. Don't block the NIO main thread pool - //processRequest(request, task.getLink()); requestHandler.submit(new AgentRequestHandler(getType(), getLink(), request)); } } catch (final ClassNotFoundException e) { @@ -1332,13 +1331,14 @@ public void doTask(final Task task) throws TaskExecutionException { } } else if (task.getType() == Task.Type.DISCONNECT) { try { - // an issue has been found if reconnect immediately after disconnecting. please refer to https://github.com/apache/cloudstack/issues/8517 + // an issue has been found if reconnect immediately after disconnecting. // wait 5 seconds before reconnecting + logger.debug("Wait for 5 secs before reconnecting, disconnect task - {}", () -> getLinkLog(task.getLink())); Thread.sleep(5000); } catch (InterruptedException e) { } shell.setConnectionTransfer(false); - logger.debug("Executing disconnect task - {}", () -> getLinkLog(task.getLink())); + logger.debug("Executing disconnect task - {} and reconnecting", () -> getLinkLog(task.getLink())); reconnect(task.getLink()); } else if (task.getType() == Task.Type.OTHER) { processOtherTask(task); diff --git a/agent/src/main/java/com/cloud/agent/properties/AgentProperties.java b/agent/src/main/java/com/cloud/agent/properties/AgentProperties.java index 1561f0d5cfbc..3364f9708cf5 100644 --- a/agent/src/main/java/com/cloud/agent/properties/AgentProperties.java +++ b/agent/src/main/java/com/cloud/agent/properties/AgentProperties.java @@ -117,7 +117,7 @@ public class AgentProperties{ /** * Local storage path.
- * This property allows multiple values to be entered in a single String. The differente values must be separated by commas.
+ * This property allows multiple values to be entered in a single String. The different values must be separated by commas.
* Data type: String.
* Default value: /var/lib/libvirt/images/ */ @@ -134,7 +134,7 @@ public class AgentProperties{ /** * MANDATORY: The UUID for the local storage pool.
- * This property allows multiple values to be entered in a single String. The differente values must be separated by commas.
+ * This property allows multiple values to be entered in a single String. The different values must be separated by commas.
* Data type: String.
* Default value: null */ diff --git a/agent/src/main/java/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java b/agent/src/main/java/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java index 26f9d4b3d732..cd9feaf93b4b 100644 --- a/agent/src/main/java/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java +++ b/agent/src/main/java/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java @@ -175,12 +175,12 @@ private Answer executeProxyLoadScan(final Command cmd, final long proxyVmId, fin try { is.close(); } catch (final IOException e) { - logger.warn("Exception when closing , console proxy address : {}", proxyManagementIp); + logger.warn("Exception when closing , console proxy address: {}", proxyManagementIp); success = false; } } } catch (final IOException e) { - logger.warn("Unable to open console proxy command port url, console proxy address : {}", proxyManagementIp); + logger.warn("Unable to open console proxy command port url, console proxy address: {}", proxyManagementIp); success = false; } diff --git a/api/pom.xml b/api/pom.xml index 6270eb2dead6..c80c35593451 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -24,7 +24,7 @@ org.apache.cloudstack cloudstack - 4.22.0.0-SNAPSHOT + 4.23.0.0-SNAPSHOT diff --git a/api/src/main/java/com/cloud/agent/api/storage/OVFHelper.java b/api/src/main/java/com/cloud/agent/api/storage/OVFHelper.java index 6396e3deb723..23167c5c53b0 100644 --- a/api/src/main/java/com/cloud/agent/api/storage/OVFHelper.java +++ b/api/src/main/java/com/cloud/agent/api/storage/OVFHelper.java @@ -119,8 +119,7 @@ protected OVFPropertyTO createOVFPropertyFromNode(Node node, int index, String c boolean password = StringUtils.isNotBlank(passStr) && passStr.equalsIgnoreCase("true"); String label = ovfParser.getChildNodeValue(node, "Label"); String description = ovfParser.getChildNodeValue(node, "Description"); - logger.debug("Creating OVF property index " + index + (category == null ? "" : " for category " + category) - + " with key = " + key); + logger.debug("Creating OVF property index {} {} with key = {}", index, (category == null ? "" : " for category " + category), key); return new OVFPropertyTO(key, type, value, qualifiers, userConfigurable, label, description, password, index, category); } @@ -152,7 +151,7 @@ public List getConfigurableOVFPropertiesFromDocument(Document doc if (child.getNodeName().equalsIgnoreCase("Category") || child.getNodeName().endsWith(":Category")) { lastCategoryFound = child.getTextContent(); - logger.info("Category found " + lastCategoryFound); + logger.info("Category found {}", lastCategoryFound); } else if (child.getNodeName().equalsIgnoreCase("Property") || child.getNodeName().endsWith(":Property")) { OVFPropertyTO prop = createOVFPropertyFromNode(child, propertyIndex, lastCategoryFound); @@ -250,13 +249,13 @@ private List matchHardwareItemsToDiskAndFilesInformation(List extractDisksFromOvfDocumentTree(Document doc) { od._controller = getControllerType(items, od._diskId); vd.add(od); } - if (logger.isTraceEnabled()) { - logger.trace(String.format("found %d disk definitions",vd.size())); - } + logger.trace("Found {} disk definitions", vd.size()); return vd; } @@ -366,9 +363,7 @@ protected List extractFilesFromOvfDocumentTree(File ovfFile, Document d vf.add(of); } } - if (logger.isTraceEnabled()) { - logger.trace(String.format("found %d file definitions in %s",vf.size(), ovfFile.getPath())); - } + logger.trace("Found {} file definitions in {}", vf.size(), ovfFile.getPath()); return vf; } @@ -506,7 +501,7 @@ private void writeDocumentToFile(String newOvfFilePath, Document doc) { outfile.write(writer.toString()); outfile.close(); } catch (IOException | TransformerException e) { - logger.info("Unexpected exception caught while rewriting OVF:" + e.getMessage(), e); + logger.info("Unexpected exception caught while rewriting OVF: {}", e.getMessage(), e); throw new CloudRuntimeException(e); } } @@ -522,9 +517,7 @@ OVFFile getFileDefinitionFromDiskDefinition(String fileRef, List files) public List getNetPrerequisitesFromDocument(Document doc) throws InternalErrorException { if (doc == null) { - if (logger.isTraceEnabled()) { - logger.trace("no document to parse; returning no prerequisite networks"); - } + logger.trace("No document to parse; returning no prerequisite networks"); return Collections.emptyList(); } @@ -540,9 +533,7 @@ public List getNetPrerequisitesFromDocument(Document doc) throws I private void matchNicsToNets(Map nets, Node systemElement) { final DocumentTraversal traversal = (DocumentTraversal) systemElement; final NodeIterator iterator = traversal.createNodeIterator(systemElement, NodeFilter.SHOW_ELEMENT, null, true); - if (logger.isTraceEnabled()) { - logger.trace(String.format("starting out with %d network-prerequisites, parsing hardware",nets.size())); - } + logger.trace("Starting out with {} network-prerequisites, parsing hardware", nets.size()); int nicCount = 0; for (Node n = iterator.nextNode(); n != null; n = iterator.nextNode()) { final Element e = (Element) n; @@ -550,9 +541,7 @@ private void matchNicsToNets(Map nets, Node systemElement) nicCount++; String name = e.getTextContent(); // should be in our nets if(nets.get(name) == null) { - if(logger.isInfoEnabled()) { - logger.info(String.format("found a nic definition without a network definition byname %s, adding it to the list.", name)); - } + logger.info("Found a NIC definition without a Network definition by name {}, adding it to the list.", name); nets.put(name, new OVFNetworkTO()); } OVFNetworkTO thisNet = nets.get(name); @@ -561,9 +550,7 @@ private void matchNicsToNets(Map nets, Node systemElement) } } } - if (logger.isTraceEnabled()) { - logger.trace(String.format("ending up with %d network-prerequisites, parsed %d nics", nets.size(), nicCount)); - } + logger.trace("Ending up with {} network-prerequisites, parsed {} nics", nets.size(), nicCount); } /** @@ -585,7 +572,7 @@ private void fillNicPrerequisites(OVFNetworkTO nic, Node parentNode) { int addressOnParent = Integer.parseInt(addressOnParentStr); nic.setAddressOnParent(addressOnParent); } catch (NumberFormatException e) { - logger.warn("Encountered element of type \"AddressOnParent\", that could not be parse to an integer number: " + addressOnParentStr); + logger.warn("Encountered element of type \"AddressOnParent\", that could not be parse to an integer number: {}", addressOnParentStr); } boolean automaticAllocation = StringUtils.isNotBlank(automaticAllocationStr) && Boolean.parseBoolean(automaticAllocationStr); @@ -597,7 +584,7 @@ private void fillNicPrerequisites(OVFNetworkTO nic, Node parentNode) { int instanceId = Integer.parseInt(instanceIdStr); nic.setInstanceID(instanceId); } catch (NumberFormatException e) { - logger.warn("Encountered element of type \"InstanceID\", that could not be parse to an integer number: " + instanceIdStr); + logger.warn("Encountered element of type \"InstanceID\", that could not be parse to an integer number: {}", instanceIdStr); } nic.setResourceSubType(resourceSubType); @@ -630,9 +617,7 @@ private Map getNetworksFromDocumentTree(Document doc) { nets.put(networkName,network); } - if (logger.isTraceEnabled()) { - logger.trace(String.format("found %d networks in template", nets.size())); - } + logger.trace("Found {} Networks in Template", nets.size()); return nets; } @@ -771,7 +756,7 @@ private Long getLongValueFromString(String value) { try { return Long.parseLong(value); } catch (NumberFormatException e) { - logger.debug("Could not parse the value: " + value + ", ignoring it"); + logger.debug("Could not parse the value: {}, ignoring it", value); } } return null; @@ -782,7 +767,7 @@ private Integer getIntValueFromString(String value) { try { return Integer.parseInt(value); } catch (NumberFormatException e) { - logger.debug("Could not parse the value: " + value + ", ignoring it"); + logger.debug("Could not parse the value: {}, ignoring it", value); } } return null; @@ -820,7 +805,7 @@ public List getEulaSectionsFromDocument(Document doc) { try { compressedLicense = compressOVFEula(eulaLicense); } catch (IOException e) { - logger.error("Could not compress the license for info " + eulaInfo); + logger.error("Could not compress the license for info {}", eulaInfo); continue; } OVFEulaSectionTO eula = new OVFEulaSectionTO(eulaInfo, compressedLicense, eulaIndex); diff --git a/api/src/main/java/com/cloud/agent/api/storage/OVFParser.java b/api/src/main/java/com/cloud/agent/api/storage/OVFParser.java index 38f478d63cf8..316ab4ea87b9 100644 --- a/api/src/main/java/com/cloud/agent/api/storage/OVFParser.java +++ b/api/src/main/java/com/cloud/agent/api/storage/OVFParser.java @@ -54,7 +54,7 @@ public OVFParser() { documentBuilderFactory.setNamespaceAware(true); documentBuilder = documentBuilderFactory.newDocumentBuilder(); } catch (ParserConfigurationException e) { - logger.error("Cannot start the OVF parser: " + e.getMessage(), e); + logger.error("Cannot start the OVF parser: {}", e.getMessage(), e); } } @@ -70,7 +70,7 @@ public Document parseOVFFile(String ovfFilePath) { try { return documentBuilder.parse(new File(ovfFilePath)); } catch (SAXException | IOException e) { - logger.error("Error parsing " + ovfFilePath + " " + e.getMessage(), e); + logger.error("Error parsing {} {}", ovfFilePath, e.getMessage(), e); return null; } } diff --git a/api/src/main/java/com/cloud/agent/api/to/VirtualMachineMetadataTO.java b/api/src/main/java/com/cloud/agent/api/to/VirtualMachineMetadataTO.java new file mode 100644 index 000000000000..5b22afdedd53 --- /dev/null +++ b/api/src/main/java/com/cloud/agent/api/to/VirtualMachineMetadataTO.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 com.cloud.agent.api.to; + +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + +public class VirtualMachineMetadataTO { + // VM details + private final String name; + private final String internalName; + private final String displayName; + private final String instanceUuid; + private final Integer cpuCores; + private final Integer memory; + private final Long created; + private final Long started; + + // Owner details + private final String ownerDomainUuid; + private final String ownerDomainName; + private final String ownerAccountUuid; + private final String ownerAccountName; + private final String ownerProjectUuid; + private final String ownerProjectName; + + // Host and service offering + private final String serviceOfferingName; + private final List serviceOfferingHostTags; + + // zone, pod, and cluster details + private final String zoneName; + private final String zoneUuid; + private final String podName; + private final String podUuid; + private final String clusterName; + private final String clusterUuid; + + // resource tags + private final Map resourceTags; + + public VirtualMachineMetadataTO( + String name, String internalName, String displayName, String instanceUuid, Integer cpuCores, Integer memory, Long created, Long started, + String ownerDomainUuid, String ownerDomainName, String ownerAccountUuid, String ownerAccountName, String ownerProjectUuid, String ownerProjectName, + String serviceOfferingName, List serviceOfferingHostTags, + String zoneName, String zoneUuid, String podName, String podUuid, String clusterName, String clusterUuid, Map resourceTags) { + /* + * Something failed in the metadata shall not be a fatal error, the VM can still be started + * Thus, the unknown fields just get an explicit "unknown" value so it can be fixed in case + * there are bugs on some execution paths. + * */ + + this.name = (name != null) ? name : "unknown"; + this.internalName = (internalName != null) ? internalName : "unknown"; + this.displayName = (displayName != null) ? displayName : "unknown"; + this.instanceUuid = (instanceUuid != null) ? instanceUuid : "unknown"; + this.cpuCores = (cpuCores != null) ? cpuCores : -1; + this.memory = (memory != null) ? memory : -1; + this.created = (created != null) ? created : 0; + this.started = (started != null) ? started : 0; + this.ownerDomainUuid = (ownerDomainUuid != null) ? ownerDomainUuid : "unknown"; + this.ownerDomainName = (ownerDomainName != null) ? ownerDomainName : "unknown"; + this.ownerAccountUuid = (ownerAccountUuid != null) ? ownerAccountUuid : "unknown"; + this.ownerAccountName = (ownerAccountName != null) ? ownerAccountName : "unknown"; + this.ownerProjectUuid = (ownerProjectUuid != null) ? ownerProjectUuid : "unknown"; + this.ownerProjectName = (ownerProjectName != null) ? ownerProjectName : "unknown"; + this.serviceOfferingName = (serviceOfferingName != null) ? serviceOfferingName : "unknown"; + this.serviceOfferingHostTags = (serviceOfferingHostTags != null) ? serviceOfferingHostTags : new ArrayList<>(); + this.zoneName = (zoneName != null) ? zoneName : "unknown"; + this.zoneUuid = (zoneUuid != null) ? zoneUuid : "unknown"; + this.podName = (podName != null) ? podName : "unknown"; + this.podUuid = (podUuid != null) ? podUuid : "unknown"; + this.clusterName = (clusterName != null) ? clusterName : "unknown"; + this.clusterUuid = (clusterUuid != null) ? clusterUuid : "unknown"; + + this.resourceTags = (resourceTags != null) ? resourceTags : new HashMap<>(); + } + + public String getName() { + return name; + } + + public String getInternalName() { + return internalName; + } + + public String getDisplayName() { + return displayName; + } + + public String getInstanceUuid() { + return instanceUuid; + } + + public Integer getCpuCores() { + return cpuCores; + } + + public Integer getMemory() { + return memory; + } + + public Long getCreated() { return created; } + + public Long getStarted() { + return started; + } + + public String getOwnerDomainUuid() { + return ownerDomainUuid; + } + + public String getOwnerDomainName() { + return ownerDomainName; + } + + public String getOwnerAccountUuid() { + return ownerAccountUuid; + } + + public String getOwnerAccountName() { + return ownerAccountName; + } + + public String getOwnerProjectUuid() { + return ownerProjectUuid; + } + + public String getOwnerProjectName() { + return ownerProjectName; + } + + public String getserviceOfferingName() { + return serviceOfferingName; + } + + public List getserviceOfferingHostTags() { + return serviceOfferingHostTags; + } + + public String getZoneName() { + return zoneName; + } + + public String getZoneUuid() { + return zoneUuid; + } + + public String getPodName() { + return podName; + } + + public String getPodUuid() { + return podUuid; + } + + public String getClusterName() { + return clusterName; + } + + public String getClusterUuid() { + return clusterUuid; + } + + public Map getResourceTags() { return resourceTags; } +} diff --git a/api/src/main/java/com/cloud/agent/api/to/VirtualMachineTO.java b/api/src/main/java/com/cloud/agent/api/to/VirtualMachineTO.java index cffb98740805..e26cc1e9f029 100644 --- a/api/src/main/java/com/cloud/agent/api/to/VirtualMachineTO.java +++ b/api/src/main/java/com/cloud/agent/api/to/VirtualMachineTO.java @@ -89,6 +89,7 @@ public class VirtualMachineTO { private DeployAsIsInfoTO deployAsIsInfo; private String metadataManufacturer; private String metadataProductName; + private VirtualMachineMetadataTO metadata; public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer speed, long minRam, long maxRam, BootloaderType bootloader, String os, boolean enableHA, boolean limitCpuUse, String vncPassword) { @@ -494,6 +495,14 @@ public void setMetadataProductName(String metadataProductName) { this.metadataProductName = metadataProductName; } + public VirtualMachineMetadataTO getMetadata() { + return metadata; + } + + public void setMetadata(VirtualMachineMetadataTO metadata) { + this.metadata = metadata; + } + @Override public String toString() { return String.format("VM {id: \"%s\", name: \"%s\", uuid: \"%s\", type: \"%s\"}", id, name, uuid, type); diff --git a/api/src/main/java/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java b/api/src/main/java/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java index d34c09c94fde..d8aa13710e23 100644 --- a/api/src/main/java/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java +++ b/api/src/main/java/com/cloud/api/commands/ListRecurringSnapshotScheduleCmd.java @@ -35,10 +35,10 @@ public class ListRecurringSnapshotScheduleCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.SNAPSHOT_POLICY_ID, type = CommandType.LONG, description = "lists recurring snapshots by snapshot policy ID") + @Parameter(name = ApiConstants.SNAPSHOT_POLICY_ID, type = CommandType.LONG, description = "Lists recurring Snapshots by Snapshot policy ID") private Long snapshotPolicyId; - @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.LONG, required = true, description = "list recurring snapshots by volume ID") + @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.LONG, required = true, description = "List recurring Snapshots by volume ID") private Long volumeId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/com/cloud/cpu/CPU.java b/api/src/main/java/com/cloud/cpu/CPU.java index 3016e542db65..11b38b73da53 100644 --- a/api/src/main/java/com/cloud/cpu/CPU.java +++ b/api/src/main/java/com/cloud/cpu/CPU.java @@ -22,7 +22,8 @@ public class CPU { public enum CPUArch { x86("i686", 32), amd64("x86_64", 64), - arm64("aarch64", 64); + arm64("aarch64", 64), + s390x("s390x", 64); private final String type; private final int bits; diff --git a/api/src/main/java/com/cloud/deploy/DeploymentClusterPlanner.java b/api/src/main/java/com/cloud/deploy/DeploymentClusterPlanner.java index d127e4bdd660..9471c3d5c84c 100644 --- a/api/src/main/java/com/cloud/deploy/DeploymentClusterPlanner.java +++ b/api/src/main/java/com/cloud/deploy/DeploymentClusterPlanner.java @@ -62,11 +62,11 @@ public interface DeploymentClusterPlanner extends DeploymentPlanner { "vm.allocation.algorithm", "Advanced", "random", - "Order in which hosts within a cluster will be considered for VM allocation. The value can be 'random', 'firstfit', 'userdispersing', 'userconcentratedpod_random', 'userconcentratedpod_firstfit', or 'firstfitleastconsumed'.", + "Order in which hosts within a cluster will be considered for VM allocation. The value can be 'random', 'firstfit', 'userdispersing', or 'firstfitleastconsumed'.", true, ConfigKey.Scope.Global, null, null, null, null, null, ConfigKey.Kind.Select, - "random,firstfit,userdispersing,userconcentratedpod_random,userconcentratedpod_firstfit,firstfitleastconsumed"); + "random,firstfit,userdispersing,firstfitleastconsumed"); /** * This is called to determine list of possible clusters where a virtual diff --git a/api/src/main/java/com/cloud/deploy/DeploymentPlanner.java b/api/src/main/java/com/cloud/deploy/DeploymentPlanner.java index 354f9cfaac53..8f7e773070f0 100644 --- a/api/src/main/java/com/cloud/deploy/DeploymentPlanner.java +++ b/api/src/main/java/com/cloud/deploy/DeploymentPlanner.java @@ -70,7 +70,7 @@ public interface DeploymentPlanner extends Adapter { boolean canHandle(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid); public enum AllocationAlgorithm { - random, firstfit, userdispersing, userconcentratedpod_random, userconcentratedpod_firstfit; + random, firstfit, userdispersing; } public enum PlannerResourceUsage { diff --git a/api/src/main/java/com/cloud/host/HostStats.java b/api/src/main/java/com/cloud/host/HostStats.java index d14794401fa3..0e72b5f2d9d0 100644 --- a/api/src/main/java/com/cloud/host/HostStats.java +++ b/api/src/main/java/com/cloud/host/HostStats.java @@ -36,5 +36,4 @@ public interface HostStats { public HostStats getHostStats(); public double getLoadAverage(); - // public double getXapiMemoryUsageKBs(); } diff --git a/api/src/main/java/com/cloud/network/Ipv6Service.java b/api/src/main/java/com/cloud/network/Ipv6Service.java index 4ef5f98c38d8..e6c3b9250a7a 100644 --- a/api/src/main/java/com/cloud/network/Ipv6Service.java +++ b/api/src/main/java/com/cloud/network/Ipv6Service.java @@ -45,7 +45,7 @@ public interface Ipv6Service extends PluggableService, Configurable { static final ConfigKey Ipv6OfferingCreationEnabled = new ConfigKey("Advanced", Boolean.class, "ipv6.offering.enabled", "false", - "Indicates whether creation of IPv6 network/VPC offering is enabled or not.", + "Indicates whether creation of IPv6 Network/VPC offering is enabled or not.", true); static final ConfigKey Ipv6PrefixSubnetCleanupInterval = new ConfigKey("Advanced", Integer.class, diff --git a/api/src/main/java/com/cloud/network/Network.java b/api/src/main/java/com/cloud/network/Network.java index dc94932e31f5..0846306f70f9 100644 --- a/api/src/main/java/com/cloud/network/Network.java +++ b/api/src/main/java/com/cloud/network/Network.java @@ -325,9 +325,9 @@ enum Event { public enum State { - Allocated("Indicates the network configuration is in allocated but not setup"), Setup("Indicates the network configuration is setup"), Implementing( - "Indicates the network configuration is being implemented"), Implemented("Indicates the network configuration is in use"), Shutdown( - "Indicates the network configuration is being destroyed"), Destroy("Indicates that the network is destroyed"); + Allocated("Indicates the Network configuration is in allocated but not setup"), Setup("Indicates the Network configuration is setup"), Implementing( + "Indicates the Network configuration is being implemented"), Implemented("Indicates the Network configuration is in use"), Shutdown( + "Indicates the Network configuration is being destroyed"), Destroy("Indicates that the Network is destroyed"); protected static final StateMachine2 s_fsm = new StateMachine2(); diff --git a/api/src/main/java/com/cloud/network/NetworkService.java b/api/src/main/java/com/cloud/network/NetworkService.java index 196e1f9aab86..585ebc89d427 100644 --- a/api/src/main/java/com/cloud/network/NetworkService.java +++ b/api/src/main/java/com/cloud/network/NetworkService.java @@ -81,7 +81,7 @@ public interface NetworkService { true, ConfigKey.Scope.Zone); public static final ConfigKey AllowUsersToSpecifyVRMtu = new ConfigKey<>("Advanced", Boolean.class, - "allow.end.users.to.specify.vr.mtu", "false", "Allow end users to specify VR MTU", + "allow.end.users.to.specify.vr.mtu", "false", "Allow end Users to specify VR MTU", true, ConfigKey.Scope.Zone); List getIsolatedNetworksOwnedByAccountInZone(long zoneId, Account owner); diff --git a/api/src/main/java/com/cloud/network/Networks.java b/api/src/main/java/com/cloud/network/Networks.java index 9f06a0441118..5f767686dc97 100644 --- a/api/src/main/java/com/cloud/network/Networks.java +++ b/api/src/main/java/com/cloud/network/Networks.java @@ -78,7 +78,7 @@ public URI toUri(T value) { } @Override public String getValueFrom(URI uri) { - return uri.getAuthority(); + return uri == null ? null : uri.getAuthority(); } }, Vswitch("vs", String.class), LinkLocal(null, null), Vnet("vnet", Long.class), Storage("storage", Integer.class), Lswitch("lswitch", String.class) { @@ -96,7 +96,7 @@ public URI toUri(T value) { */ @Override public String getValueFrom(URI uri) { - return uri.getSchemeSpecificPart(); + return uri == null ? null : uri.getSchemeSpecificPart(); } }, Mido("mido", String.class), Pvlan("pvlan", String.class), @@ -177,7 +177,7 @@ public URI toUri(T value) { * @return the scheme as BroadcastDomainType */ public static BroadcastDomainType getSchemeValue(URI uri) { - return toEnumValue(uri.getScheme()); + return toEnumValue(uri == null ? null : uri.getScheme()); } /** @@ -191,7 +191,7 @@ public static BroadcastDomainType getTypeOf(String str) throws URISyntaxExceptio if (com.cloud.dc.Vlan.UNTAGGED.equalsIgnoreCase(str)) { return Native; } - return getSchemeValue(new URI(str)); + return getSchemeValue(str == null ? null : new URI(str)); } /** @@ -220,7 +220,7 @@ public static BroadcastDomainType toEnumValue(String scheme) { * @return the host part as String */ public String getValueFrom(URI uri) { - return uri.getHost(); + return uri == null ? null : uri.getHost(); } /** @@ -243,7 +243,7 @@ public static String getValue(URI uri) { * @throws URISyntaxException the string is not even an uri */ public static String getValue(String uriString) throws URISyntaxException { - return getValue(new URI(uriString)); + return getValue(uriString == null ? null : new URI(uriString)); } /** diff --git a/api/src/main/java/com/cloud/network/PhysicalNetworkTrafficType.java b/api/src/main/java/com/cloud/network/PhysicalNetworkTrafficType.java index 9676badb4e90..d3804cd29daf 100644 --- a/api/src/main/java/com/cloud/network/PhysicalNetworkTrafficType.java +++ b/api/src/main/java/com/cloud/network/PhysicalNetworkTrafficType.java @@ -41,4 +41,6 @@ public interface PhysicalNetworkTrafficType extends InternalIdentity, Identity { String getHypervNetworkLabel(); String getOvm3NetworkLabel(); + + String getVlan(); } diff --git a/api/src/main/java/com/cloud/network/as/AutoScaleVmGroup.java b/api/src/main/java/com/cloud/network/as/AutoScaleVmGroup.java index c265c1f36a0a..c05b3bda3db5 100644 --- a/api/src/main/java/com/cloud/network/as/AutoScaleVmGroup.java +++ b/api/src/main/java/com/cloud/network/as/AutoScaleVmGroup.java @@ -43,7 +43,7 @@ public static State fromValue(String state) { } else if (state.equalsIgnoreCase("scaling")) { return SCALING; } else { - throw new IllegalArgumentException("Unexpected AutoScale VM group state : " + state); + throw new IllegalArgumentException("Unexpected AutoScale Instance group state : " + state); } } } diff --git a/api/src/main/java/com/cloud/network/rules/LbStickinessMethod.java b/api/src/main/java/com/cloud/network/rules/LbStickinessMethod.java index 56a0622a52ba..5143611ee828 100644 --- a/api/src/main/java/com/cloud/network/rules/LbStickinessMethod.java +++ b/api/src/main/java/com/cloud/network/rules/LbStickinessMethod.java @@ -108,8 +108,7 @@ public LbStickinessMethod(StickinessMethodType methodType, String description) { } public void addParam(String name, Boolean required, String description, Boolean isFlag) { - /* FIXME : UI is breaking if the capability string length is larger , temporarily description is commented out */ - // LbStickinessMethodParam param = new LbStickinessMethodParam(name, required, description); + /* is this still a valid comment: FIXME : UI is breaking if the capability string length is larger , temporarily description is commented out */ LbStickinessMethodParam param = new LbStickinessMethodParam(name, required, " ", isFlag); _paramList.add(param); return; @@ -133,7 +132,6 @@ public String getDescription() { public void setDescription(String description) { /* FIXME : UI is breaking if the capability string length is larger , temporarily description is commented out */ - //this.description = description; this._description = " "; } } diff --git a/api/src/main/java/com/cloud/server/ManagementService.java b/api/src/main/java/com/cloud/server/ManagementService.java index d2a987bb0787..51737546ffad 100644 --- a/api/src/main/java/com/cloud/server/ManagementService.java +++ b/api/src/main/java/com/cloud/server/ManagementService.java @@ -77,6 +77,8 @@ import com.cloud.capacity.Capacity; import com.cloud.dc.Pod; import com.cloud.dc.Vlan; +import com.cloud.deploy.DeploymentPlan; +import com.cloud.deploy.DeploymentPlanner.ExcludeList; import com.cloud.exception.ConcurrentOperationException; import com.cloud.exception.ManagementServerException; import com.cloud.exception.ResourceUnavailableException; @@ -97,6 +99,7 @@ import com.cloud.vm.InstanceGroup; import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachine.Type; +import com.cloud.vm.VirtualMachineProfile; /** * Hopefully this is temporary. @@ -478,6 +481,19 @@ public interface ManagementService { Ternary, Integer>, List, Map> listHostsForMigrationOfVM(VirtualMachine vm, Long startIndex, Long pageSize, String keyword, List vmList); + /** + * Apply affinity group constraints and other exclusion rules for VM migration. + * This is a helper method that can be used independently for per-iteration affinity checks in DRS. + * + * @param vm The virtual machine to migrate + * @param vmProfile The VM profile + * @param plan The deployment plan + * @param vmList List of VMs with current/simulated placements for affinity processing + * @return ExcludeList containing hosts to avoid + */ + ExcludeList applyAffinityConstraints(VirtualMachine vm, VirtualMachineProfile vmProfile, + DeploymentPlan plan, List vmList); + /** * List storage pools for live migrating of a volume. The API returns list of all pools in the cluster to which the * volume can be migrated. Current pool is not included in the list. In case of vSphere datastore cluster storage pools, diff --git a/api/src/main/java/com/cloud/storage/Storage.java b/api/src/main/java/com/cloud/storage/Storage.java index 1ad3731b9eaa..5b3e97698fda 100644 --- a/api/src/main/java/com/cloud/storage/Storage.java +++ b/api/src/main/java/com/cloud/storage/Storage.java @@ -128,7 +128,7 @@ public static enum FileSystem { public static enum TemplateType { ROUTING, // Router template SYSTEM, /* routing, system vm template */ - BUILTIN, /* buildin template */ + BUILTIN, /* builtin template */ PERHOST, /* every host has this template, don't need to install it in secondary storage */ USER, /* User supplied template/iso */ VNF, /* VNFs (virtual network functions) template */ diff --git a/api/src/main/java/com/cloud/user/AccountService.java b/api/src/main/java/com/cloud/user/AccountService.java index c0ebcf09f59b..09fe5ffc0590 100644 --- a/api/src/main/java/com/cloud/user/AccountService.java +++ b/api/src/main/java/com/cloud/user/AccountService.java @@ -25,7 +25,7 @@ import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.cloudstack.api.command.admin.account.CreateAccountCmd; import org.apache.cloudstack.api.command.admin.user.GetUserKeysCmd; -import org.apache.cloudstack.api.command.admin.user.RegisterCmd; +import org.apache.cloudstack.api.command.admin.user.RegisterUserKeyCmd; import org.apache.cloudstack.api.command.admin.user.UpdateUserCmd; import com.cloud.dc.DataCenter; @@ -95,7 +95,7 @@ User createUser(String userName, String password, String firstName, String lastN void markUserRegistered(long userId); - public String[] createApiKeyAndSecretKey(RegisterCmd cmd); + public String[] createApiKeyAndSecretKey(RegisterUserKeyCmd cmd); public String[] createApiKeyAndSecretKey(final long userId); diff --git a/api/src/main/java/com/cloud/user/ResourceLimitService.java b/api/src/main/java/com/cloud/user/ResourceLimitService.java index 49b20fe2fefc..738e593582b4 100644 --- a/api/src/main/java/com/cloud/user/ResourceLimitService.java +++ b/api/src/main/java/com/cloud/user/ResourceLimitService.java @@ -34,7 +34,7 @@ public interface ResourceLimitService { static final ConfigKey MaxAccountSecondaryStorage = new ConfigKey<>("Account Defaults", Long.class, "max.account.secondary.storage", "400", - "The default maximum secondary storage space (in GiB) that can be used for an account", false); + "The default maximum secondary storage space (in GiB) that can be used for an Account", false); static final ConfigKey MaxProjectSecondaryStorage = new ConfigKey<>("Project Defaults", Long.class, "max.project.secondary.storage", "400", "The default maximum secondary storage space (in GiB) that can be used for a project", false); static final ConfigKey ResourceCountCheckInterval = new ConfigKey<>("Advanced", Long.class, "resourcecount.check.interval", "300", diff --git a/api/src/main/java/com/cloud/vm/snapshot/VMSnapshot.java b/api/src/main/java/com/cloud/vm/snapshot/VMSnapshot.java index 24e93af15621..b4b144e2f8af 100644 --- a/api/src/main/java/com/cloud/vm/snapshot/VMSnapshot.java +++ b/api/src/main/java/com/cloud/vm/snapshot/VMSnapshot.java @@ -29,10 +29,10 @@ 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( + Allocated("The Instance Snapshot is allocated but has not been created yet."), Creating("The Instance Snapshot is being created."), Ready( + "The Instance Snapshot is ready to be used."), Reverting("The Instance 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"), - Hidden("The VM snapshot is hidden from the user and cannot be recovered."); + Hidden("The Instance snapshot is hidden from the user and cannot be recovered."); String _description; diff --git a/api/src/main/java/org/apache/cloudstack/acl/RoleType.java b/api/src/main/java/org/apache/cloudstack/acl/RoleType.java index 46e4f1bc510d..c33488cd9239 100644 --- a/api/src/main/java/org/apache/cloudstack/acl/RoleType.java +++ b/api/src/main/java/org/apache/cloudstack/acl/RoleType.java @@ -132,10 +132,10 @@ public static Set fromCombinedMask(int combinedMask) { * */ public static Account.Type getAccountTypeByRole(final Role role, final Account.Type defautAccountType) { if (role != null) { - LOGGER.debug(String.format("Role [%s] is not null; therefore, we use its account type [%s].", role, defautAccountType)); + LOGGER.debug("Role [{}] is not null; therefore, we use its Account type [{}].", role, defautAccountType); return role.getRoleType().getAccountType(); } - LOGGER.debug(String.format("Role is null; therefore, we use the default account type [%s] value.", defautAccountType)); + LOGGER.debug("Role is null; therefore, we use the default Account type [{}] value.", defautAccountType); return defautAccountType; } } diff --git a/api/src/main/java/org/apache/cloudstack/affinity/AffinityGroupResponse.java b/api/src/main/java/org/apache/cloudstack/affinity/AffinityGroupResponse.java index 69f391a5656a..f5a71b994525 100644 --- a/api/src/main/java/org/apache/cloudstack/affinity/AffinityGroupResponse.java +++ b/api/src/main/java/org/apache/cloudstack/affinity/AffinityGroupResponse.java @@ -34,27 +34,27 @@ public class AffinityGroupResponse extends BaseResponse implements ControlledViewEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the affinity group") + @Param(description = "The ID of the affinity group") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the affinity group") + @Param(description = "The name of the affinity group") private String name; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the description of the affinity group") + @Param(description = "The description of the affinity group") private String description; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account owning the affinity group") + @Param(description = "The account owning the affinity group") private String accountName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID of the affinity group") + @Param(description = "The domain ID of the affinity group") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the affinity group") + @Param(description = "The domain name of the affinity group") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -62,19 +62,19 @@ public class AffinityGroupResponse extends BaseResponse implements ControlledVie private String domainPath; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project ID of the affinity group") + @Param(description = "The project ID of the affinity group") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the affinity group") + @Param(description = "The project name of the affinity group") private String projectName; @SerializedName(ApiConstants.TYPE) - @Param(description = "the type of the affinity group") + @Param(description = "The type of the affinity group") private String type; @SerializedName("virtualmachineIds") - @Param(description = "virtual machine IDs associated with this affinity group") + @Param(description = "Instance IDs associated with this affinity group") private List vmIdList; @SerializedName("dedicatedresources") diff --git a/api/src/main/java/org/apache/cloudstack/affinity/AffinityGroupTypeResponse.java b/api/src/main/java/org/apache/cloudstack/affinity/AffinityGroupTypeResponse.java index 6f5fb23d159e..7ddf6dd9f73f 100644 --- a/api/src/main/java/org/apache/cloudstack/affinity/AffinityGroupTypeResponse.java +++ b/api/src/main/java/org/apache/cloudstack/affinity/AffinityGroupTypeResponse.java @@ -29,7 +29,7 @@ public class AffinityGroupTypeResponse extends BaseResponse { @SerializedName(ApiConstants.TYPE) - @Param(description = "the type of the affinity group") + @Param(description = "The type of the affinity group") private String type; public AffinityGroupTypeResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/AbstractGetUploadParamsCmd.java b/api/src/main/java/org/apache/cloudstack/api/AbstractGetUploadParamsCmd.java index 028aab247572..13f351f3a27f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/AbstractGetUploadParamsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/AbstractGetUploadParamsCmd.java @@ -29,28 +29,28 @@ public abstract class AbstractGetUploadParamsCmd extends BaseCmd { - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the volume/template/iso") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the Volume/Template/ISO") private String name; - @Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, required = true, description = "the format for the volume/template/iso. Possible values include QCOW2, OVA, " + @Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, required = true, description = "The format for the Volume/Template/ISO. Possible values include QCOW2, OVA, " + "and VHD.") private String format; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the ID of the zone the volume/template/iso is " + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "The ID of the zone the Volume/Template/ISO is " + "to be hosted on") private Long zoneId; - @Parameter(name = ApiConstants.CHECKSUM, type = CommandType.STRING, description = "the checksum value of this volume/template/iso " + ApiConstants.CHECKSUM_PARAMETER_PREFIX_DESCRIPTION) + @Parameter(name = ApiConstants.CHECKSUM, type = CommandType.STRING, description = "The checksum value of this Volume/Template/ISO " + ApiConstants.CHECKSUM_PARAMETER_PREFIX_DESCRIPTION) private String checksum; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional accountName. Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional accountName. Must be used with domainId.") private String accountName; - @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "an optional domainId. If the account parameter is used, " + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "An optional domainId. If the Account parameter is used, " + "domainId must also be used.") private Long domainId; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Upload volume/template/iso for the project") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Upload Volume/Template/ISO for the project") private Long projectId; public String getName() { diff --git a/api/src/main/java/org/apache/cloudstack/api/BaseAsyncCreateCustomIdCmd.java b/api/src/main/java/org/apache/cloudstack/api/BaseAsyncCreateCustomIdCmd.java index 8680d7f11de3..30baa71d6d85 100644 --- a/api/src/main/java/org/apache/cloudstack/api/BaseAsyncCreateCustomIdCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/BaseAsyncCreateCustomIdCmd.java @@ -19,7 +19,7 @@ public abstract class BaseAsyncCreateCustomIdCmd extends BaseAsyncCreateCmd { @Parameter(name = ApiConstants.CUSTOM_ID, type = CommandType.STRING, - description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only") + description = "An optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only") private String customId; public String getCustomId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/BaseAsyncCustomIdCmd.java b/api/src/main/java/org/apache/cloudstack/api/BaseAsyncCustomIdCmd.java index b251c6ef2ec2..c1777d3b8f84 100644 --- a/api/src/main/java/org/apache/cloudstack/api/BaseAsyncCustomIdCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/BaseAsyncCustomIdCmd.java @@ -21,7 +21,7 @@ public abstract class BaseAsyncCustomIdCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.CUSTOM_ID, type = CommandType.STRING, - description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin}) + description = "An optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin}) private String customId; public String getCustomId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/BaseCmd.java b/api/src/main/java/org/apache/cloudstack/api/BaseCmd.java index 8f47d51b19d4..a4de301cc991 100644 --- a/api/src/main/java/org/apache/cloudstack/api/BaseCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/BaseCmd.java @@ -382,7 +382,7 @@ public List getParamFields() { if (roleIsAllowed) { validFields.add(field); } else { - logger.debug("Ignoring parameter " + parameterAnnotation.name() + " as the caller is not authorized to pass it in"); + logger.debug("Ignoring parameter {} as the caller is not authorized to pass it in", parameterAnnotation.name()); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/BaseCustomIdCmd.java b/api/src/main/java/org/apache/cloudstack/api/BaseCustomIdCmd.java index 7ca9f1efe7ef..8a2292eadd07 100644 --- a/api/src/main/java/org/apache/cloudstack/api/BaseCustomIdCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/BaseCustomIdCmd.java @@ -22,7 +22,7 @@ public abstract class BaseCustomIdCmd extends BaseCmd { @Parameter(name = ApiConstants.CUSTOM_ID, type = CommandType.STRING, - description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin}) + description = "An optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin}) private String customId; public String getCustomId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/BaseListAccountResourcesCmd.java b/api/src/main/java/org/apache/cloudstack/api/BaseListAccountResourcesCmd.java index aa5273ace3bc..bb18080dfcc4 100644 --- a/api/src/main/java/org/apache/cloudstack/api/BaseListAccountResourcesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/BaseListAccountResourcesCmd.java @@ -19,7 +19,7 @@ public abstract class BaseListAccountResourcesCmd extends BaseListDomainResourcesCmd implements IBaseListAccountResourcesCmd { - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "list resources by account. Must be used with the domainId parameter.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "List resources by Account. Must be used with the domainId parameter.") private String accountName; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/BaseListDomainResourcesCmd.java b/api/src/main/java/org/apache/cloudstack/api/BaseListDomainResourcesCmd.java index 7a8cee337705..640caa935425 100644 --- a/api/src/main/java/org/apache/cloudstack/api/BaseListDomainResourcesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/BaseListDomainResourcesCmd.java @@ -27,10 +27,10 @@ public abstract class BaseListDomainResourcesCmd extends BaseListCmd implements @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "list only resources belonging to the domain specified") + description = "List only resources belonging to the domain specified") private Long domainId; - @Parameter(name = ApiConstants.IS_RECURSIVE, type = CommandType.BOOLEAN, description = "defaults to false," + @Parameter(name = ApiConstants.IS_RECURSIVE, type = CommandType.BOOLEAN, description = "Defaults to false," + " but if true, lists all resources from the parent specified by the domainId till leaves.") private Boolean recursive; diff --git a/api/src/main/java/org/apache/cloudstack/api/BaseListProjectAndAccountResourcesCmd.java b/api/src/main/java/org/apache/cloudstack/api/BaseListProjectAndAccountResourcesCmd.java index 0bcfba15ea6e..d3c999ddb048 100644 --- a/api/src/main/java/org/apache/cloudstack/api/BaseListProjectAndAccountResourcesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/BaseListProjectAndAccountResourcesCmd.java @@ -20,7 +20,7 @@ public abstract class BaseListProjectAndAccountResourcesCmd extends BaseListAccountResourcesCmd implements IBaseListProjectAndAccountResourcesCmd { - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "list objects by project; if projectid=-1 lists All VMs") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "List objects by project; if projectid=-1 lists All Instances") private Long projectId; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/BaseListRetrieveOnlyResourceCountCmd.java b/api/src/main/java/org/apache/cloudstack/api/BaseListRetrieveOnlyResourceCountCmd.java index 0e8e136a6c19..20c270c30b21 100644 --- a/api/src/main/java/org/apache/cloudstack/api/BaseListRetrieveOnlyResourceCountCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/BaseListRetrieveOnlyResourceCountCmd.java @@ -19,7 +19,7 @@ import org.apache.commons.lang3.BooleanUtils; public abstract class BaseListRetrieveOnlyResourceCountCmd extends BaseListTaggedResourcesCmd { - @Parameter(name = ApiConstants.RETRIEVE_ONLY_RESOURCE_COUNT, type = CommandType.BOOLEAN, description = "makes the API's response contains only the resource count") + @Parameter(name = ApiConstants.RETRIEVE_ONLY_RESOURCE_COUNT, type = CommandType.BOOLEAN, description = "Makes the API's response contains only the resource count") private Boolean retrieveOnlyResourceCount; public Boolean getRetrieveOnlyResourceCount() { diff --git a/api/src/main/java/org/apache/cloudstack/api/BaseListTemplateOrIsoPermissionsCmd.java b/api/src/main/java/org/apache/cloudstack/api/BaseListTemplateOrIsoPermissionsCmd.java index be95547a8a73..27e58233b249 100644 --- a/api/src/main/java/org/apache/cloudstack/api/BaseListTemplateOrIsoPermissionsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/BaseListTemplateOrIsoPermissionsCmd.java @@ -33,7 +33,7 @@ public abstract class BaseListTemplateOrIsoPermissionsCmd extends BaseCmd implem //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplatePermissionsResponse.class, required = true, description = "the template ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplatePermissionsResponse.class, required = true, description = "The Template ID") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/BaseResponse.java b/api/src/main/java/org/apache/cloudstack/api/BaseResponse.java index 45016c1a2a26..ebf0c4b19a00 100644 --- a/api/src/main/java/org/apache/cloudstack/api/BaseResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/BaseResponse.java @@ -25,11 +25,11 @@ public abstract class BaseResponse implements ResponseObject { private transient String objectName; @SerializedName(ApiConstants.JOB_ID) - @Param(description = "the UUID of the latest async job acting on this object") + @Param(description = "The UUID of the latest async job acting on this object") protected String jobId; @SerializedName(ApiConstants.JOB_STATUS) - @Param(description = "the current status of the latest async job acting on this object") + @Param(description = "The current status of the latest async job acting on this object") private Integer jobStatus; public BaseResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/BaseResponseWithAnnotations.java b/api/src/main/java/org/apache/cloudstack/api/BaseResponseWithAnnotations.java index f7c0c21395f8..19d88382ce78 100644 --- a/api/src/main/java/org/apache/cloudstack/api/BaseResponseWithAnnotations.java +++ b/api/src/main/java/org/apache/cloudstack/api/BaseResponseWithAnnotations.java @@ -22,7 +22,7 @@ public abstract class BaseResponseWithAnnotations extends BaseResponse { @SerializedName(ApiConstants.HAS_ANNOTATIONS) - @Param(description = "true if the entity/resource has annotations") + @Param(description = "True if the entity/resource has annotations") private Boolean hasAnnotation; public Boolean hasAnnotation() { diff --git a/api/src/main/java/org/apache/cloudstack/api/BaseResponseWithAssociatedNetwork.java b/api/src/main/java/org/apache/cloudstack/api/BaseResponseWithAssociatedNetwork.java index 1ffe4657bd98..48be5c6b4de0 100755 --- a/api/src/main/java/org/apache/cloudstack/api/BaseResponseWithAssociatedNetwork.java +++ b/api/src/main/java/org/apache/cloudstack/api/BaseResponseWithAssociatedNetwork.java @@ -22,11 +22,11 @@ public abstract class BaseResponseWithAssociatedNetwork extends BaseResponseWithAnnotations { @SerializedName(ApiConstants.ASSOCIATED_NETWORK_ID) - @Param(description = "the ID of the Network associated with this private gateway") + @Param(description = "The ID of the Network associated with this private gateway") private String associatedNetworkId; @SerializedName(ApiConstants.ASSOCIATED_NETWORK) - @Param(description = "the name of the Network associated with this private gateway") + @Param(description = "The name of the Network associated with this private gateway") private String associatedNetworkName; public void setAssociatedNetworkId(String associatedNetworkId) { diff --git a/api/src/main/java/org/apache/cloudstack/api/BaseResponseWithTagInformation.java b/api/src/main/java/org/apache/cloudstack/api/BaseResponseWithTagInformation.java index 710b9f0b9ecf..a01cd5677bac 100755 --- a/api/src/main/java/org/apache/cloudstack/api/BaseResponseWithTagInformation.java +++ b/api/src/main/java/org/apache/cloudstack/api/BaseResponseWithTagInformation.java @@ -26,7 +26,7 @@ public abstract class BaseResponseWithTagInformation extends BaseResponseWithAnnotations { @SerializedName(ApiConstants.TAGS) - @Param(description = "the list of resource tags associated", responseObject = ResourceTagResponse.class) + @Param(description = "The list of resource tags associated", responseObject = ResourceTagResponse.class) protected Set tags; public void addTag(ResourceTagResponse tag) { diff --git a/api/src/main/java/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoCmd.java b/api/src/main/java/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoCmd.java index 8489bf05ec78..d16a0d49d8ad 100644 --- a/api/src/main/java/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoCmd.java @@ -30,49 +30,49 @@ public abstract class BaseUpdateTemplateOrIsoCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.BOOTABLE, type = CommandType.BOOLEAN, description = "true if image is bootable, false otherwise; available only for updateIso API") + @Parameter(name = ApiConstants.BOOTABLE, type = CommandType.BOOLEAN, description = "True if image is bootable, false otherwise; available only for updateIso API") private Boolean bootable; - @Parameter(name = ApiConstants.REQUIRES_HVM, type = CommandType.BOOLEAN, description = "true if the template requires HVM, false otherwise; available only for updateTemplate API") + @Parameter(name = ApiConstants.REQUIRES_HVM, type = CommandType.BOOLEAN, description = "True if the Template requires HVM, false otherwise; available only for updateTemplate API") private Boolean requiresHvm; - @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "the display text of the image", length = 4096) + @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The display text of the image", length = 4096) private String displayText; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "the ID of the image file") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "The ID of the image file") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the image file") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the image file") private String templateName; @Parameter(name = ApiConstants.OS_TYPE_ID, type = CommandType.UUID, entityType = GuestOSResponse.class, - description = "the ID of the OS type that best represents the OS of this image.") + description = "The ID of the OS type that best represents the OS of this image.") private Long osTypeId; @Parameter(name = ApiConstants.FORCE_UPDATE_OS_TYPE, type = CommandType.BOOLEAN, since = "4.21", description = "Force OS type update. Warning: Updating OS type will " + "update the guest OS configuration for all the existing Instances deployed with this template/iso, which may affect their behavior.") private Boolean forceUpdateOsType; - @Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, description = "the format for the image") + @Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, description = "The format for the image") private String format; - @Parameter(name = ApiConstants.PASSWORD_ENABLED, type = CommandType.BOOLEAN, description = "true if the image supports the password reset feature; default is false") + @Parameter(name = ApiConstants.PASSWORD_ENABLED, type = CommandType.BOOLEAN, description = "True if the image supports the password reset feature; default is false") private Boolean passwordEnabled; - @Parameter(name = ApiConstants.SSHKEY_ENABLED, type = CommandType.BOOLEAN, description = "true if the template supports the sshkey upload feature; default is false") + @Parameter(name = ApiConstants.SSHKEY_ENABLED, type = CommandType.BOOLEAN, description = "True if the Template supports the SSHkey upload feature; default is false") private Boolean sshKeyEnabled; - @Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "sort key of the template, integer") + @Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "Sort key of the Template, integer") private Integer sortKey; @Parameter(name = ApiConstants.IS_DYNAMICALLY_SCALABLE, type = CommandType.BOOLEAN, - description = "true if template/ISO contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory") + description = "True if Template/ISO contains XS/VMWare tools in order to support dynamic scaling of Instance CPU/memory") private Boolean isDynamicallyScalable; - @Parameter(name = ApiConstants.ROUTING, type = CommandType.BOOLEAN, description = "true if the template type is routing i.e., if template is used to deploy router") + @Parameter(name = ApiConstants.ROUTING, type = CommandType.BOOLEAN, description = "True if the Template type is routing i.e., if Template is used to deploy router") protected Boolean isRoutingType; @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "Details in key/value pairs using format details[i].keyname=keyvalue. Example: details[0].hypervisortoolsversion=xenserver61") @@ -80,11 +80,11 @@ public abstract class BaseUpdateTemplateOrIsoCmd extends BaseCmd { @Parameter(name = ApiConstants.CLEAN_UP_DETAILS, type = CommandType.BOOLEAN, - description = "optional boolean field, which indicates if details should be cleaned up or not (if set to true, details removed for this resource, details field ignored; if false or not set, no action)") + description = "Optional boolean field, which indicates if details should be cleaned up or not (if set to true, details removed for this resource, details field ignored; if false or not set, no action)") private Boolean cleanupDetails; @Parameter(name = ApiConstants.ARCH, type = CommandType.STRING, - description = "the CPU arch of the template/ISO. Valid options are: x86_64, aarch64", + description = "the CPU arch of the template/ISO. Valid options are: x86_64, aarch64, s390x", since = "4.20") private String arch; diff --git a/api/src/main/java/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoPermissionsCmd.java b/api/src/main/java/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoPermissionsCmd.java index e6ee0897db02..0a62591ddc24 100644 --- a/api/src/main/java/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoPermissionsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/BaseUpdateTemplateOrIsoPermissionsCmd.java @@ -40,31 +40,31 @@ protected String getResponseName() { @Parameter(name = ApiConstants.ACCOUNTS, type = CommandType.LIST, collectionType = CommandType.STRING, - description = "a comma delimited list of accounts within caller's domain. If specified, \"op\" parameter has to be passed in.") + description = "A comma delimited list of Accounts within caller's domain. If specified, \"op\" parameter has to be passed in.") private List accountNames; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "the template ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "The Template ID") private Long id; - @Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN, description = "true for featured template/iso, false otherwise") + @Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN, description = "True for featured Template/ISO, false otherwise") private Boolean featured; - @Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "true for public template/iso, false for private templates/isos") + @Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "True for public Template/ISO, false for private Templates/ISOs") private Boolean isPublic; @Parameter(name = ApiConstants.IS_EXTRACTABLE, type = CommandType.BOOLEAN, - description = "true if the template/iso is extractable, false other wise. Can be set only by root admin") + description = "True if the Template/ISO is extractable, false otherwise. Can be set only by root admin") private Boolean isExtractable; - @Parameter(name = ApiConstants.OP, type = CommandType.STRING, description = "permission operator (add, remove, reset)") + @Parameter(name = ApiConstants.OP, type = CommandType.STRING, description = "Permission operator (add, remove, reset)") private String operation; @Parameter(name = ApiConstants.PROJECT_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = ProjectResponse.class, - description = "a comma delimited list of projects. If specified, \"op\" parameter has to be passed in.") + description = "A comma delimited list of projects. If specified, \"op\" parameter has to be passed in.") private List projectIds; // /////////////////////////////////////////////////// @@ -121,7 +121,7 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update template/iso permissions"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update Template/ISO permissions"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java index 6dbc6acc59a9..ea25c56ee39e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/CreateAccountCmd.java @@ -50,12 +50,12 @@ public class CreateAccountCmd extends BaseCmd { @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, - description = "Name of the account to be created. The user will be added to this newly created account. If no account is specified, the username will be used as the account name.") + description = "Name of the Account to be created. The user will be added to this newly created account. If no Account is specified, the username will be used as the Account name.") private String accountName; @Parameter(name = ApiConstants.ACCOUNT_TYPE, type = CommandType.INTEGER, - description = "Type of the account. Specify 0 for user, 1 for root admin, and 2 for domain admin") + description = "Type of the account. Specify 0 for user, 1 for root admin, and 2 for domain admin") private Integer accountType; @Parameter(name = ApiConstants.ROLE_ID, type = CommandType.UUID, entityType = RoleResponse.class, description = "Creates the account under the specified role.") @@ -64,13 +64,13 @@ public class CreateAccountCmd extends BaseCmd { @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Creates the user under the specified domain.") private Long domainId; - @Parameter(name = ApiConstants.EMAIL, type = CommandType.STRING, required = true, description = "email") + @Parameter(name = ApiConstants.EMAIL, type = CommandType.STRING, required = true, description = "E-mail") private String email; - @Parameter(name = ApiConstants.FIRSTNAME, type = CommandType.STRING, required = true, description = "firstname") + @Parameter(name = ApiConstants.FIRSTNAME, type = CommandType.STRING, required = true, description = "First name") private String firstName; - @Parameter(name = ApiConstants.LASTNAME, type = CommandType.STRING, required = true, description = "lastname") + @Parameter(name = ApiConstants.LASTNAME, type = CommandType.STRING, required = true, description = "Last name") private String lastName; @Parameter(name = ApiConstants.PASSWORD, @@ -87,16 +87,16 @@ public class CreateAccountCmd extends BaseCmd { @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "Unique username.") private String userName; - @Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, description = "Network domain for the account's networks") + @Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, description = "Network domain for the Account's Networks") private String networkDomain; - @Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "details for account used to store specific parameters") + @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") + @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") + @Parameter(name = ApiConstants.USER_ID, type = CommandType.STRING, description = "User UUID, required for adding Account from external provisioning system") private String userUUID; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java index a90fc4aebe9c..c207801e3640 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/DeleteAccountCmd.java @@ -35,7 +35,7 @@ import com.cloud.event.EventTypes; import com.cloud.user.Account; -@APICommand(name = "deleteAccount", description = "Deletes a account, and all users associated with this account", responseObject = SuccessResponse.class, entityType = {Account.class}, +@APICommand(name = "deleteAccount", description = "Deletes an Account and all Users associated with this Account", responseObject = SuccessResponse.class, entityType = {Account.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteAccountCmd extends BaseAsyncCmd { @@ -79,8 +79,8 @@ public String getEventType() { @Override public String getEventDescription() { Account account = _accountService.getAccount(getId()); - return (account != null ? "Deleting user account " + account.getAccountName() + " (ID: " + account.getUuid() + ") and all corresponding users" - : "Account delete, but this account does not exist in the system"); + return (account != null ? "Deleting user Account " + account.getAccountName() + " (ID: " + account.getUuid() + ") and all corresponding users" + : "Cannot delete Account - it does not exist in the system"); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java index 55293eca619e..29774e254aa0 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/DisableAccountCmd.java @@ -50,13 +50,13 @@ public class DisableAccountCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "Account id") private Long id; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Disables specified account.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Disables specified Account.") private String accountName; - @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Disables specified account in this domain.") + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Disables specified Account in this domain.") private Long domainId; - @Parameter(name = ApiConstants.LOCK, type = CommandType.BOOLEAN, required = true, description = "If true, only lock the account; else disable the account") + @Parameter(name = ApiConstants.LOCK, type = CommandType.BOOLEAN, required = true, description = "If true, only lock the Account; else disable the Account") private Boolean lockRequested; @Inject @@ -108,7 +108,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "disabling account: " + getAccountName() + " in domain: " + getDomainId(); + return "Disabling Account: " + getAccountName() + " in domain: " + getDomainId(); } @Override @@ -120,7 +120,7 @@ public void execute() throws ConcurrentOperationException, ResourceUnavailableEx response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, lockRequested == true ? "Failed to lock account" : "Failed to disable account"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, lockRequested == true ? "Failed to lock Account" : "Failed to disable Account"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/EnableAccountCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/EnableAccountCmd.java index da96383f1345..7478bc8b8116 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/EnableAccountCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/EnableAccountCmd.java @@ -46,10 +46,10 @@ public class EnableAccountCmd extends BaseCmd { @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "Account id") private Long id; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Enables specified account.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Enables specified Account.") private String accountName; - @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Enables specified account in this domain.") + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Enables specified Account in this domain.") private Long domainId; @Inject @@ -98,7 +98,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to enable account"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to enable Account"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/ListAccountsCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/ListAccountsCmdByAdmin.java index 09a626ac9547..50e9ba4989cd 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/ListAccountsCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/ListAccountsCmdByAdmin.java @@ -23,7 +23,7 @@ import com.cloud.user.Account; -@APICommand(name = "listAccounts", description = "Lists accounts and provides detailed account information for listed accounts", responseObject = AccountResponse.class, responseView = ResponseView.Full, entityType = {Account.class}, +@APICommand(name = "listAccounts", description = "Lists Accounts and provides detailed Account information for listed Accounts", responseObject = AccountResponse.class, responseView = ResponseView.Full, entityType = {Account.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class ListAccountsCmdByAdmin extends ListAccountsCmd { } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/LockAccountCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/LockAccountCmd.java index d7847373e927..3ec191acf846 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/LockAccountCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/LockAccountCmd.java @@ -28,7 +28,7 @@ import com.cloud.utils.exception.CloudRuntimeException; @APICommand(name = "lockAccount", - description = "This deprecated function used to locks an account. Look for the API DisableAccount instead", + description = "This deprecated function used to lock an Account. Look for the API DisableAccount instead", responseObject = AccountResponse.class, entityType = {Account.class}, requestHasSensitiveInfo = false, @@ -47,7 +47,7 @@ public class LockAccountCmd extends BaseCmd { type = CommandType.UUID, entityType = DomainResponse.class, required = true, - description = "Locks the specified account on this domain.") + description = "Locks the specified Account on this domain.") private Long domainId; ///////////////////////////////////////////////////// @@ -78,6 +78,6 @@ public long getEntityOwnerId() { @Override public void execute() { - throw new CloudRuntimeException("LockAccount does not lock accounts. Its implementation is disabled. Use DisableAccount instead"); + throw new CloudRuntimeException("LockAccount does not lock Accounts. Its implementation is disabled. Use DisableAccount instead."); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java index 3347a0d09f37..b6b975ae1ce7 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/account/UpdateAccountCmd.java @@ -41,7 +41,7 @@ import com.cloud.user.Account; -@APICommand(name = "updateAccount", description = "Updates account information for the authenticated user", responseObject = AccountResponse.class, entityType = {Account.class}, +@APICommand(name = "updateAccount", description = "Updates Account information for the authenticated user", responseObject = AccountResponse.class, entityType = {Account.class}, responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class UpdateAccountCmd extends BaseCmd implements UserCmd { @@ -52,24 +52,24 @@ public class UpdateAccountCmd extends BaseCmd implements UserCmd { @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "Account UUID") private Long id; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Current account name") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Current Account name") private String accountName; - @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "The UUID of the domain where the account exists") + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "The UUID of the domain where the Account exists") private Long domainId; - @Parameter(name = ApiConstants.ROLE_ID, type = CommandType.UUID, entityType = RoleResponse.class, description = "The UUID of the dynamic role to set for the account") + @Parameter(name = ApiConstants.ROLE_ID, type = CommandType.UUID, entityType = RoleResponse.class, description = "The UUID of the dynamic role to set for the Account") private Long roleId; - @Parameter(name = ApiConstants.NEW_NAME, type = CommandType.STRING, description = "New name for the account") + @Parameter(name = ApiConstants.NEW_NAME, type = CommandType.STRING, description = "New name for the Account") private String newName; @Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, - description = "Network domain for the account's networks; empty string will update domainName with NULL value") + description = "Network domain for the Account's networks; empty string will update domainName with NULL value") private String networkDomain; - @Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "Details for the account used to store specific parameters") + @Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "Details for the Account used to store specific parameters") private Map details; @Parameter(name = ApiConstants.API_KEY_ACCESS, type = CommandType.STRING, description = "Determines if Api key access for this user is enabled, disabled or inherits the value from its parent, the domain level setting api.key.access", since = "4.20.1.0", authorized = {RoleType.Admin}) @@ -144,7 +144,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update account"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update Account"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/CreateRoleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/CreateRoleCmd.java index e67a3e2c0a00..59a09ef7a486 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/CreateRoleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/CreateRoleCmd.java @@ -109,7 +109,7 @@ private void validateRoleParameters() { } if (getRoleId() != null && getRoleId() < 1L) { - throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid role id provided"); + throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid role ID provided"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/UpdateRoleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/UpdateRoleCmd.java index 7d002cd889b6..78fe062ac43e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/UpdateRoleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/UpdateRoleCmd.java @@ -46,7 +46,7 @@ public class UpdateRoleCmd extends RoleCmd { description = "ID of the role", validations = {ApiArgValidator.PositiveNumber}) private Long roleId; - @Parameter(name = ApiConstants.NAME, type = BaseCmd.CommandType.STRING, description = "creates a role with this unique name") + @Parameter(name = ApiConstants.NAME, type = BaseCmd.CommandType.STRING, description = "Creates a role with this unique name") private String roleName; @Parameter(name = ApiConstants.DESCRIPTION, type = BaseCmd.CommandType.STRING, description = "The description of the role") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/UpdateRolePermissionCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/UpdateRolePermissionCmd.java index 3f926092ec3e..8f8115e9957e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/UpdateRolePermissionCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/UpdateRolePermissionCmd.java @@ -53,7 +53,7 @@ public class UpdateRolePermissionCmd extends BaseCmd { private Long roleId; @Parameter(name = ApiConstants.RULE_ORDER, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = RolePermissionResponse.class, - description = "The parent role permission uuid, use 0 to move this rule at the top of the list") + description = "The parent role permission UUID, use 0 to move this rule at the top of the list") private List rulePermissionOrder; @Parameter(name = ApiConstants.RULE_ID, type = CommandType.UUID, entityType = RolePermissionResponse.class, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/project/CreateProjectRoleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/project/CreateProjectRoleCmd.java index ed17a876b248..f71daee5b531 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/project/CreateProjectRoleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/project/CreateProjectRoleCmd.java @@ -41,7 +41,7 @@ public class CreateProjectRoleCmd extends ProjectRoleCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.NAME, type = BaseCmd.CommandType.STRING, required = true, - description = "creates a project role with this unique name") + description = "Creates a project role with this unique name") private String projectRoleName; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/project/UpdateProjectRoleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/project/UpdateProjectRoleCmd.java index 3bc8b3d61868..80dbfd71275f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/project/UpdateProjectRoleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/project/UpdateProjectRoleCmd.java @@ -43,7 +43,7 @@ public class UpdateProjectRoleCmd extends ProjectRoleCmd { private Long id; @Parameter(name = ApiConstants.NAME, type = BaseCmd.CommandType.STRING, - description = "creates a project role with this unique name", validations = {ApiArgValidator.NotNullOrEmpty}) + description = "Creates a project role with this unique name", validations = {ApiArgValidator.NotNullOrEmpty}) private String projectRoleName; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/project/UpdateProjectRolePermissionCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/project/UpdateProjectRolePermissionCmd.java index dd59310c66ae..b273b9f58493 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/project/UpdateProjectRolePermissionCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/acl/project/UpdateProjectRolePermissionCmd.java @@ -57,7 +57,7 @@ public class UpdateProjectRolePermissionCmd extends BaseCmd { private Long projectId; @Parameter(name = ApiConstants.RULE_ORDER, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = ProjectRolePermissionResponse.class, - description = "The parent role permission uuid, use 0 to move this rule at the top of the list") + description = "ID of the parent role permission, use 0 to move this rule at the top of the list") private List projectRulePermissionOrder; @Parameter(name = ApiConstants.PROJECT_ROLE_PERMISSION_ID, type = CommandType.UUID, entityType = ProjectRolePermissionResponse.class, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/address/AcquirePodIpCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/address/AcquirePodIpCmdByAdmin.java index 7397697bd2cc..88c48103c1b4 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/address/AcquirePodIpCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/address/AcquirePodIpCmdByAdmin.java @@ -40,7 +40,7 @@ public class AcquirePodIpCmdByAdmin extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.STRING, entityType = ZoneResponse.class, required = true, description = "the ID of the zone") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.STRING, entityType = ZoneResponse.class, required = true, description = "The ID of the zone") private String zoneId; @Parameter(name = ApiConstants.POD_ID, type = CommandType.STRING, entityType = ZoneResponse.class, required = false, description = "Pod ID") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/address/AssociateIPAddrCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/address/AssociateIPAddrCmdByAdmin.java index 672691ffbd8f..a34de31f78e1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/address/AssociateIPAddrCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/address/AssociateIPAddrCmdByAdmin.java @@ -23,7 +23,7 @@ import org.apache.cloudstack.api.command.user.address.AssociateIPAddrCmd; import org.apache.cloudstack.api.response.IPAddressResponse; -@APICommand(name = "associateIpAddress", description = "Acquires and associates a public IP to an account.", responseObject = IPAddressResponse.class, responseView = ResponseView.Full, +@APICommand(name = "associateIpAddress", description = "Acquires and associates a public IP to an Account.", responseObject = IPAddressResponse.class, responseView = ResponseView.Full, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class AssociateIPAddrCmdByAdmin extends AssociateIPAddrCmd implements AdminCmd { } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/address/ListPublicIpAddressesCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/address/ListPublicIpAddressesCmdByAdmin.java index 4bd6aa7227c8..9976747e1b62 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/address/ListPublicIpAddressesCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/address/ListPublicIpAddressesCmdByAdmin.java @@ -24,6 +24,6 @@ import com.cloud.network.IpAddress; -@APICommand(name = "listPublicIpAddresses", description = "Lists all public ip addresses", responseObject = IPAddressResponse.class, responseView = ResponseView.Full, +@APICommand(name = "listPublicIpAddresses", description = "Lists all public IP addresses", responseObject = IPAddressResponse.class, responseView = ResponseView.Full, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, entityType = {IpAddress.class}) public class ListPublicIpAddressesCmdByAdmin extends ListPublicIpAddressesCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/address/ReleasePodIpCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/address/ReleasePodIpCmdByAdmin.java index 7d4cab6a0ac4..266c8eecd58c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/address/ReleasePodIpCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/address/ReleasePodIpCmdByAdmin.java @@ -70,7 +70,7 @@ public void execute() { response.setDisplayText("IP is released successfully"); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release Pod ip "); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release Pod IP"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/affinitygroup/UpdateVMAffinityGroupCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/affinitygroup/UpdateVMAffinityGroupCmdByAdmin.java index 43e70838e18f..fbe2d3cc0bd2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/affinitygroup/UpdateVMAffinityGroupCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/affinitygroup/UpdateVMAffinityGroupCmdByAdmin.java @@ -26,7 +26,7 @@ import com.cloud.vm.VirtualMachine; -@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 " +@APICommand(name = "updateVMAffinityGroup", description = "Updates the affinity/anti-affinity group associations of an Instance. The Instance has to be stopped and restarted for the " + "new properties to take effect.", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/AddAnnotationCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/AddAnnotationCmd.java index c2ded921c401..834fda1834bb 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/AddAnnotationCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/AddAnnotationCmd.java @@ -33,22 +33,22 @@ import org.apache.cloudstack.context.CallContext; import org.apache.commons.lang3.BooleanUtils; -@APICommand(name = "addAnnotation", description = "add an annotation.", responseObject = AnnotationResponse.class, +@APICommand(name = "addAnnotation", description = "Add an annotation.", responseObject = AnnotationResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, since = "4.11", authorized = {RoleType.Admin}) public class AddAnnotationCmd extends BaseCmd { - @Parameter(name = ApiConstants.ANNOTATION, type = CommandType.STRING, description = "the annotation text") + @Parameter(name = ApiConstants.ANNOTATION, type = CommandType.STRING, description = "The annotation text") private String annotation; @Parameter(name = ApiConstants.ENTITY_TYPE, type = CommandType.STRING, description = "The following entity types are allowed VM, VOLUME, SNAPSHOT, VM_SNAPSHOT, INSTANCE_GROUP, SSH_KEYPAIR, USER_DATA, NETWORK, VPC, PUBLIC_IP_ADDRESS, VPN_CUSTOMER_GATEWAY, TEMPLATE, ISO, KUBERNETES_CLUSTER, SERVICE_OFFERING, DISK_OFFERING, NETWORK_OFFERING, ZONE, POD, CLUSTER, HOST, DOMAIN, PRIMARY_STORAGE, SECONDARY_STORAGE, VR, SYSTEM_VM, AUTOSCALE_VM_GROUP, MANAGEMENT_SERVER") private String entityType; - @Parameter(name = ApiConstants.ENTITY_ID, type = CommandType.STRING, description = "the id of the entity to annotate") + @Parameter(name = ApiConstants.ENTITY_ID, type = CommandType.STRING, description = "The ID of the entity to annotate") private String entityUuid; @Parameter(name = ApiConstants.ADMINS_ONLY, type = CommandType.BOOLEAN, since = "4.16.0", - description = "the annotation is visible for admins only") + description = "The annotation is visible for admins only") private Boolean adminsOnly; public String getAnnotation() { @@ -77,7 +77,7 @@ public boolean isAdminsOnly() { public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException, ConcurrentOperationException, ResourceAllocationException, NetworkRuleConflictException { - Preconditions.checkNotNull(getEntityUuid(),"I have to have an entity to set an annotation on!"); + Preconditions.checkNotNull(getEntityUuid(),"I need to have an entity to set an annotation on!"); Preconditions.checkState(AnnotationService.EntityType.contains(entityType),(java.lang.String)"'%s' is not a valid EntityType to put annotations on", entityType); AnnotationResponse annotationResponse = annotationService.addAnnotation(this); annotationResponse.setResponseName(getCommandName()); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/ListAnnotationsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/ListAnnotationsCmd.java index 3df4536786f4..fcaba5154e1f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/ListAnnotationsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/ListAnnotationsCmd.java @@ -37,22 +37,22 @@ public class ListAnnotationsCmd extends BaseListCmd { - @Parameter(name = ApiConstants.ID, type = CommandType.STRING, description = "the id of the annotation") + @Parameter(name = ApiConstants.ID, type = CommandType.STRING, description = "The ID of the annotation") private String uuid; - @Parameter(name = ApiConstants.ENTITY_TYPE, type = CommandType.STRING, description = "the entity type") + @Parameter(name = ApiConstants.ENTITY_TYPE, type = CommandType.STRING, description = "The entity type") private String entityType; - @Parameter(name = ApiConstants.ENTITY_ID, type = CommandType.STRING, description = "the id of the entity for which to show annotations") + @Parameter(name = ApiConstants.ENTITY_ID, type = CommandType.STRING, description = "The ID of the entity for which to show annotations") private String entityUuid; @Parameter(name = ApiConstants.USER_ID, type = CommandType.STRING, since = "4.16.0", - description = "optional: the id of the user of the annotation", required = false) + description = "Optional: The ID of the user of the annotation", required = false) private String userUuid; @Parameter(name = ApiConstants.ANNOTATION_FILTER, type = CommandType.STRING, since = "4.16.0", - description = "possible values are \"self\" and \"all\". " + description = "Possible values are \"self\" and \"all\". " + "* self : annotations that have been created by the calling user. " + "* all : all the annotations the calling user can access") private String annotationFilter; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/RemoveAnnotationCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/RemoveAnnotationCmd.java index 693ad09bfa9b..d173c35289f2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/RemoveAnnotationCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/RemoveAnnotationCmd.java @@ -30,12 +30,12 @@ import org.apache.cloudstack.api.response.AnnotationResponse; import org.apache.cloudstack.context.CallContext; -@APICommand(name = "removeAnnotation", description = "remove an annotation.", responseObject = AnnotationResponse.class, +@APICommand(name = "removeAnnotation", description = "Remove an annotation.", responseObject = AnnotationResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, since = "4.11", authorized = {RoleType.Admin}) public class RemoveAnnotationCmd extends BaseCmd { - @Parameter(name = ApiConstants.ID, type = CommandType.STRING, required = true, description = "the id of the annotation") + @Parameter(name = ApiConstants.ID, type = CommandType.STRING, required = true, description = "The ID of the annotation") private String uuid; public String getUuid() { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/UpdateAnnotationVisibilityCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/UpdateAnnotationVisibilityCmd.java index b1b7295510cd..d0bd7042ead8 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/UpdateAnnotationVisibilityCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/annotation/UpdateAnnotationVisibilityCmd.java @@ -30,7 +30,7 @@ import org.apache.cloudstack.api.response.AnnotationResponse; import org.apache.cloudstack.context.CallContext; -@APICommand(name = "updateAnnotationVisibility", description = "update an annotation visibility.", +@APICommand(name = "updateAnnotationVisibility", description = "Update an annotation visibility.", responseObject = AnnotationResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, since = "4.16", authorized = {RoleType.Admin}) @@ -38,11 +38,11 @@ public class UpdateAnnotationVisibilityCmd extends BaseCmd { @Parameter(name = ApiConstants.ID, type = CommandType.STRING, required = true, - description = "the id of the annotation") + description = "The ID of the annotation") private String uuid; @Parameter(name = ApiConstants.ADMINS_ONLY, type = CommandType.BOOLEAN, required = true, - description = "the annotation is visible for admins only") + description = "The annotation is visible for admins only") private Boolean adminsOnly; public String getUuid() { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/autoscale/CreateCounterCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/autoscale/CreateCounterCmd.java index 013d0f966ddf..0798357b8bcb 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/autoscale/CreateCounterCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/autoscale/CreateCounterCmd.java @@ -32,7 +32,7 @@ import com.cloud.network.as.Counter; import com.cloud.user.Account; -@APICommand(name = "createCounter", description = "Adds metric counter for VM auto scaling", responseObject = CounterResponse.class, +@APICommand(name = "createCounter", description = "Adds metric counter for Instance auto scaling", responseObject = CounterResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateCounterCmd extends BaseAsyncCreateCmd { private static final String s_name = "counterresponse"; @@ -116,7 +116,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "creating a new Counter"; + return "Creating a new Counter"; } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java index b7b2ce5cb70d..769f6fd8b142 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/autoscale/DeleteCounterCmd.java @@ -32,7 +32,7 @@ import com.cloud.exception.ResourceInUseException; import com.cloud.user.Account; -@APICommand(name = "deleteCounter", description = "Deletes a counter for VM auto scaling", responseObject = SuccessResponse.class, +@APICommand(name = "deleteCounter", description = "Deletes a counter for Instance auto scaling", responseObject = SuccessResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteCounterCmd extends BaseAsyncCmd { @@ -40,7 +40,7 @@ public class DeleteCounterCmd extends BaseAsyncCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = CounterResponse.class, required = true, description = "the ID of the counter") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = CounterResponse.class, required = true, description = "The ID of the counter") private Long id; // /////////////////////////////////////////////////// @@ -61,7 +61,7 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { - logger.warn("Failed to delete counter with Id: " + getId()); + logger.warn("Failed to delete counter with Id: {}", getId()); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete counter."); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/backup/ImportBackupOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/backup/ImportBackupOfferingCmd.java index 7d3902bc4902..2e73698e7aa1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/backup/ImportBackupOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/backup/ImportBackupOfferingCmd.java @@ -55,11 +55,11 @@ public class ImportBackupOfferingCmd extends BaseAsyncCmd { //////////////////////////////////////////////////// @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, - description = "the name of the backup offering") + description = "The name of the backup offering") private String name; @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, required = true, - description = "the description of the backup offering") + description = "The description of the backup offering") private String description; @Parameter(name = ApiConstants.EXTERNAL_ID, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/backup/UpdateBackupOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/backup/UpdateBackupOfferingCmd.java index 9de06715ee74..a645b1e0c8db 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/backup/UpdateBackupOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/backup/UpdateBackupOfferingCmd.java @@ -98,7 +98,7 @@ public void execute() { this.setResponseObject(response); } catch (CloudRuntimeException e) { ApiErrorCode paramError = e instanceof InvalidParameterValueException ? ApiErrorCode.PARAM_ERROR : ApiErrorCode.INTERNAL_ERROR; - logger.error(String.format("Failed to update Backup Offering [id: %s] due to: [%s].", id, e.getMessage()), e); + logger.error("Failed to update Backup Offering [id: {}] due to: [{}].", id, e.getMessage(), e); throw new ServerApiException(paramError, e.getMessage()); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/ca/ProvisionCertificateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/ca/ProvisionCertificateCmd.java index a39985549ac8..af24e1f10c89 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/ca/ProvisionCertificateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/ca/ProvisionCertificateCmd.java @@ -52,7 +52,7 @@ public class ProvisionCertificateCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, required = true, entityType = HostResponse.class, - description = "The host/agent uuid to which the certificate has to be provisioned (issued and propagated)") + description = "The host/agent ID to which the certificate has to be provisioned (issued and propagated)") private Long hostId; @Parameter(name = ApiConstants.RECONNECT, type = CommandType.BOOLEAN, @@ -108,7 +108,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "provisioning certificate for host id=" + hostId + " using provider=" + provider; + return "Provisioning certificate for host id=" + hostId + " using provider=" + provider; } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/ca/RevokeCertificateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/ca/RevokeCertificateCmd.java index 381bed65f95c..c2212442f4ba 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/ca/RevokeCertificateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/ca/RevokeCertificateCmd.java @@ -105,6 +105,6 @@ public String getEventType() { @Override public String getEventDescription() { - return "revoking certificate with serial id=" + serial + ", cn=" + cn; + return "Revoking certificate with serial id=" + serial + ", cn=" + cn; } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java index 3aef11b92e9d..d8fa2123d228 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/AddClusterCmd.java @@ -44,48 +44,48 @@ requestHasSensitiveInfo = true, responseHasSensitiveInfo = false) public class AddClusterCmd extends BaseCmd { - @Parameter(name = ApiConstants.CLUSTER_NAME, type = CommandType.STRING, required = true, description = "the cluster name") + @Parameter(name = ApiConstants.CLUSTER_NAME, type = CommandType.STRING, required = true, description = "The cluster name") private String clusterName; - @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, required = false, description = "the password for the host") + @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, required = false, description = "The password for the host") private String password; - @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, required = true, description = "the Pod ID for the host") + @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, required = true, description = "The Pod ID for the host") private Long podId; - @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = false, description = "the URL") + @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = false, description = "The URL") private String url; - @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = false, description = "the username for the cluster") + @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = false, description = "The username for the cluster") private String username; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the Zone ID for the cluster") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "The Zone ID for the cluster") private Long zoneId; @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, required = true, - description = "hypervisor type of the cluster: XenServer,KVM,VMware,Hyperv,BareMetal,Simulator,Ovm3,External") + description = "Hypervisor type of the cluster: XenServer,KVM,VMware,Hyperv,BareMetal,Simulator,Ovm3,External") private String hypervisor; @Parameter(name = ApiConstants.ARCH, type = CommandType.STRING, - description = "the CPU arch of the cluster. Valid options are: x86_64, aarch64", + description = "The CPU arch of the cluster. Valid options are: x86_64, aarch64, s390x", since = "4.20") private String arch; - @Parameter(name = ApiConstants.CLUSTER_TYPE, type = CommandType.STRING, required = true, description = "type of the cluster: CloudManaged, ExternalManaged") + @Parameter(name = ApiConstants.CLUSTER_TYPE, type = CommandType.STRING, required = true, description = "Type of the cluster: CloudManaged, ExternalManaged") private String clusterType; @Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Allocation state of this cluster for allocation of new resources") private String allocationState; - @Parameter(name = ApiConstants.VSM_USERNAME, type = CommandType.STRING, required = false, description = "the username for the VSM associated with this cluster") + @Parameter(name = ApiConstants.VSM_USERNAME, type = CommandType.STRING, required = false, description = "The username for the VSM associated with this cluster") private String vsmusername; - @Parameter(name = ApiConstants.VSM_PASSWORD, type = CommandType.STRING, required = false, description = "the password for the VSM associated with this cluster") + @Parameter(name = ApiConstants.VSM_PASSWORD, type = CommandType.STRING, required = false, description = "The password for the VSM associated with this cluster") private String vsmpassword; - @Parameter(name = ApiConstants.VSM_IPADDRESS, type = CommandType.STRING, required = false, description = "the ipaddress of the VSM associated with this cluster") + @Parameter(name = ApiConstants.VSM_IPADDRESS, type = CommandType.STRING, required = false, description = "The IP address of the VSM associated with this cluster") private String vsmipaddress; @Parameter(name = ApiConstants.VSWITCH_TYPE_GUEST_TRAFFIC, @@ -109,7 +109,7 @@ public class AddClusterCmd extends BaseCmd { @Parameter(name = ApiConstants.VSWITCH_NAME_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.") + description = "Name of virtual switch used for public traffic in the cluster. This would override zone wide traffic label setting.") private String vSwitchNamePublicTraffic; @Parameter(name = ApiConstants.OVM3_POOL, type = CommandType.STRING, required = false, description = "Ovm3 native pooling enabled for cluster") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/DeleteClusterCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/DeleteClusterCmd.java index 2b1cfe8bcb58..afabf7fef166 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/DeleteClusterCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/DeleteClusterCmd.java @@ -38,7 +38,7 @@ public class DeleteClusterCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ClusterResponse.class, required = true, description = "the cluster ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ClusterResponse.class, required = true, description = "The cluster ID") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java index b38278e39469..9fe4e3f5cfc1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/ListClustersCmd.java @@ -52,31 +52,31 @@ public class ListClustersCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "lists clusters by the cluster ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "Lists clusters by the cluster ID") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "lists clusters by the cluster name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Lists clusters by the cluster name") private String clusterName; - @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "lists clusters by Pod ID") + @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "Lists clusters by Pod ID") private Long podId; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "lists clusters by Zone ID") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "Lists clusters by Zone ID") private Long zoneId; - @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "lists clusters by hypervisor type") + @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "Lists clusters by hypervisor type") private String hypervisorType; - @Parameter(name = ApiConstants.CLUSTER_TYPE, type = CommandType.STRING, description = "lists clusters by cluster type") + @Parameter(name = ApiConstants.CLUSTER_TYPE, type = CommandType.STRING, description = "Lists clusters by cluster type") private String clusterType; - @Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "lists clusters by allocation state") + @Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Lists clusters by allocation state") private String allocationState; - @Parameter(name = ApiConstants.MANAGED_STATE, type = CommandType.STRING, description = "whether this cluster is managed by cloudstack") + @Parameter(name = ApiConstants.MANAGED_STATE, type = CommandType.STRING, description = "Whether this cluster is managed by cloudstack") private String managedState; - @Parameter(name = ApiConstants.SHOW_CAPACITIES, type = CommandType.BOOLEAN, description = "flag to display the capacity of the clusters") + @Parameter(name = ApiConstants.SHOW_CAPACITIES, type = CommandType.BOOLEAN, description = "Flag to display the capacity of the clusters") private Boolean showCapacities; @Parameter(name = ApiConstants.ARCH, type = CommandType.STRING, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java index c160cfd2e034..77d0557af05b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/cluster/UpdateClusterCmd.java @@ -39,26 +39,26 @@ public class UpdateClusterCmd extends BaseCmd { - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ClusterResponse.class, required = true, description = "the ID of the Cluster") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ClusterResponse.class, required = true, description = "The ID of the Cluster") private Long id; - @Parameter(name = ApiConstants.CLUSTER_NAME, type = CommandType.STRING, description = "the cluster name") + @Parameter(name = ApiConstants.CLUSTER_NAME, type = CommandType.STRING, description = "The cluster name") private String clusterName; - @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "hypervisor type of the cluster") + @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "Hypervisor type of the cluster") private String hypervisor; - @Parameter(name = ApiConstants.CLUSTER_TYPE, type = CommandType.STRING, description = "hypervisor type of the cluster") + @Parameter(name = ApiConstants.CLUSTER_TYPE, type = CommandType.STRING, description = "Hypervisor type of the cluster") private String clusterType; @Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Allocation state of this cluster for allocation of new resources") private String allocationState; - @Parameter(name = ApiConstants.MANAGED_STATE, type = CommandType.STRING, description = "whether this cluster is managed by cloudstack") + @Parameter(name = ApiConstants.MANAGED_STATE, type = CommandType.STRING, description = "Whether this cluster is managed by cloudstack") private String managedState; @Parameter(name = ApiConstants.ARCH, type = CommandType.STRING, - description = "the CPU arch of the cluster. Valid options are: x86_64, aarch64", + description = "the CPU arch of the cluster. Valid options are: x86_64, aarch64, s390x", since = "4.20") private String arch; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ListCfgGroupsByCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ListCfgGroupsByCmd.java index d735218169d6..c63e7cf92d4d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ListCfgGroupsByCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ListCfgGroupsByCmd.java @@ -40,7 +40,7 @@ public class ListCfgGroupsByCmd extends BaseListCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.GROUP, type = CommandType.STRING, description = "lists configuration group by group name") + @Parameter(name = ApiConstants.GROUP, type = CommandType.STRING, description = "Lists configuration group by group name") private String groupName; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ListCfgsByCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ListCfgsByCmd.java index e365d8bc2dc7..f6f66415f533 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ListCfgsByCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ListCfgsByCmd.java @@ -52,55 +52,55 @@ public class ListCfgsByCmd extends BaseListCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.CATEGORY, type = CommandType.STRING, description = "lists configurations by category") + @Parameter(name = ApiConstants.CATEGORY, type = CommandType.STRING, description = "Lists configurations by category") private String category; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "lists configuration by name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Lists configuration by name") private String configName; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - description = "the ID of the Zone to update the parameter value for corresponding zone") + description = "The ID of the Zone to update the parameter value for corresponding zone") private Long zoneId; @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, - description = "the ID of the Cluster to update the parameter value for corresponding cluster") + description = "The ID of the Cluster to update the parameter value for corresponding cluster") private Long clusterId; @Parameter(name = ApiConstants.STORAGE_ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, - description = "the ID of the Storage pool to update the parameter value for corresponding storage pool") + description = "The ID of the Storage pool to update the parameter value for corresponding storage pool") private Long storagePoolId; @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, - description = "the ID of the Account to update the parameter value for corresponding account") + description = "The ID of the Account to update the parameter value for corresponding account") private Long accountId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "the ID of the Domain to update the parameter value for corresponding domain") + description = "The ID of the Domain to update the parameter value for corresponding domain") private Long domainId; @Parameter(name = ApiConstants.IMAGE_STORE_UUID, type = CommandType.UUID, entityType = ImageStoreResponse.class, - description = "the ID of the Image Store to update the parameter value for corresponding image store") + description = "The ID of the Image Store to update the parameter value for corresponding image store") private Long imageStoreId; - @Parameter(name = ApiConstants.GROUP, type = CommandType.STRING, description = "lists configuration by group name (primarily used for UI)", since = "4.18.0") + @Parameter(name = ApiConstants.GROUP, type = CommandType.STRING, description = "Lists configuration by group name (primarily used for UI)", since = "4.18.0") private String groupName; - @Parameter(name = ApiConstants.SUBGROUP, type = CommandType.STRING, description = "lists configuration by subgroup name (primarily used for UI)", since = "4.18.0") + @Parameter(name = ApiConstants.SUBGROUP, type = CommandType.STRING, description = "Lists configuration by subgroup name (primarily used for UI)", since = "4.18.0") private String subGroupName; - @Parameter(name = ApiConstants.PARENT, type = CommandType.STRING, description = "lists configuration by parent name (primarily used for UI)", since = "4.18.0") + @Parameter(name = ApiConstants.PARENT, type = CommandType.STRING, description = "Lists configuration by parent name (primarily used for UI)", since = "4.18.0") private String parentName; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ListHypervisorCapabilitiesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ListHypervisorCapabilitiesCmd.java index e7cc9e0234e2..d8622f94b6b6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ListHypervisorCapabilitiesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ListHypervisorCapabilitiesCmd.java @@ -47,7 +47,7 @@ public class ListHypervisorCapabilitiesCmd extends BaseListCmd { @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HypervisorCapabilitiesResponse.class, description = "ID of the hypervisor capability") private Long id; - @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "the hypervisor for which to restrict the search") + @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "The hypervisor for which to restrict the search") private String hypervisor; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ResetCfgCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ResetCfgCmd.java index f114b263b634..2d511cff34db 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ResetCfgCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/config/ResetCfgCmd.java @@ -45,43 +45,43 @@ public class ResetCfgCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the configuration", validations = {ApiArgValidator.NotNullOrEmpty}) + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the configuration", validations = {ApiArgValidator.NotNullOrEmpty}) private String cfgName; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - description = "the ID of the Zone to reset the parameter value for corresponding zone") + description = "The ID of the Zone to reset the parameter value for corresponding zone") private Long zoneId; @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, - description = "the ID of the Cluster to reset the parameter value for corresponding cluster") + description = "The ID of the Cluster to reset the parameter value for corresponding cluster") private Long clusterId; @Parameter(name = ApiConstants.STORAGE_ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, - description = "the ID of the Storage pool to reset the parameter value for corresponding storage pool") + description = "The ID of the Storage pool to reset the parameter value for corresponding storage pool") private Long storagePoolId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "the ID of the Domain to reset the parameter value for corresponding domain") + description = "The ID of the Domain to reset the parameter value for corresponding domain") private Long domainId; @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, - description = "the ID of the Account to reset the parameter value for corresponding account") + description = "The ID of the Account to reset the parameter value for corresponding account") private Long accountId; @Parameter(name = ApiConstants.IMAGE_STORE_ID, type = CommandType.UUID, entityType = ImageStoreResponse.class, - description = "the ID of the Image Store to reset the parameter value for corresponding image store") + description = "The ID of the Image Store to reset the parameter value for corresponding image store") private Long imageStoreId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmd.java index dbf478df7012..97dee8f638af 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmd.java @@ -45,46 +45,46 @@ public class UpdateCfgCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the configuration") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the configuration") private String cfgName; - @Parameter(name = ApiConstants.VALUE, type = CommandType.STRING, description = "the value of the configuration", length = 4096) + @Parameter(name = ApiConstants.VALUE, type = CommandType.STRING, description = "The value of the configuration", length = 4096) private String value; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - description = "the ID of the Zone to update the parameter value for corresponding zone") + description = "The ID of the Zone to update the parameter value for corresponding zone") private Long zoneId; @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, - description = "the ID of the Cluster to update the parameter value for corresponding cluster") + description = "The ID of the Cluster to update the parameter value for corresponding cluster") private Long clusterId; @Parameter(name = ApiConstants.STORAGE_ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, - description = "the ID of the Storage pool to update the parameter value for corresponding storage pool") + description = "The ID of the Storage pool to update the parameter value for corresponding storage pool") private Long storagePoolId; @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, - description = "the ID of the Account to update the parameter value for corresponding account") + description = "The ID of the Account to update the parameter value for corresponding account") private Long accountId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "the ID of the Domain to update the parameter value for corresponding domain") + description = "The ID of the Domain to update the parameter value for corresponding domain") private Long domainId; @Parameter(name = ApiConstants.IMAGE_STORE_UUID, type = CommandType.UUID, entityType = ImageStoreResponse.class, - description = "the ID of the Image Store to update the parameter value for corresponding image store", + description = "The ID of the Image Store to update the parameter value for corresponding image store", validations = ApiArgValidator.PositiveNumber) private Long imageStoreId; @@ -150,7 +150,7 @@ public void execute() { ConfigurationResponse response = _responseGenerator.createConfigurationResponse(cfg); response.setResponseName(getCommandName()); response = setResponseScopes(response); - response = setResponseValue(response, cfg); + setResponseValue(response, cfg); this.setResponseObject(response); } else { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update config"); @@ -161,15 +161,13 @@ public void execute() { * Sets the configuration value in the response. If the configuration is in the `Hidden` or `Secure` categories, the value is encrypted before being set in the response. * @param response to be set with the configuration `cfg` value * @param cfg to be used in setting the response value - * @return the response with the configuration's value */ - public ConfigurationResponse setResponseValue(ConfigurationResponse response, Configuration cfg) { + public void setResponseValue(ConfigurationResponse response, Configuration cfg) { + String value = cfg.getValue(); if (cfg.isEncrypted()) { - response.setValue(DBEncryptionUtil.encrypt(getValue())); - } else { - response.setValue(getValue()); + value = DBEncryptionUtil.encrypt(value); } - return response; + response.setValue(value); } /** diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/config/UpdateHypervisorCapabilitiesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/config/UpdateHypervisorCapabilitiesCmd.java index 01f7af108416..d7342654ec40 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/config/UpdateHypervisorCapabilitiesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/config/UpdateHypervisorCapabilitiesCmd.java @@ -43,28 +43,28 @@ public class UpdateHypervisorCapabilitiesCmd extends BaseCmd { @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HypervisorCapabilitiesResponse.class, description = "ID of the hypervisor capability") private Long id; - @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "the hypervisor for which the hypervisor capabilities are to be updated", since = "4.19.1") + @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "The hypervisor for which the hypervisor capabilities are to be updated", since = "4.19.1") private String hypervisor; - @Parameter(name = ApiConstants.HYPERVISOR_VERSION, type = CommandType.STRING, description = "the hypervisor version for which the hypervisor capabilities are to be updated", since = "4.19.1") + @Parameter(name = ApiConstants.HYPERVISOR_VERSION, type = CommandType.STRING, description = "The hypervisor version for which the hypervisor capabilities are to be updated", since = "4.19.1") private String hypervisorVersion; - @Parameter(name = ApiConstants.SECURITY_GROUP_EANBLED, type = CommandType.BOOLEAN, description = "set true to enable security group for this hypervisor.") + @Parameter(name = ApiConstants.SECURITY_GROUP_EANBLED, type = CommandType.BOOLEAN, description = "Set true to enable security group for this hypervisor.") private Boolean securityGroupEnabled; - @Parameter(name = ApiConstants.MAX_GUESTS_LIMIT, type = CommandType.LONG, description = "the max number of Guest VMs per host for this hypervisor.") + @Parameter(name = ApiConstants.MAX_GUESTS_LIMIT, type = CommandType.LONG, description = "The maximum number of Guest Instances per host for this hypervisor.") private Long maxGuestsLimit; - @Parameter(name = ApiConstants.MAX_DATA_VOLUMES_LIMIT, type = CommandType.INTEGER, description = "the maximum number of Data Volumes that can be attached to a VM for this hypervisor.", since = "4.16.0") + @Parameter(name = ApiConstants.MAX_DATA_VOLUMES_LIMIT, type = CommandType.INTEGER, description = "The maximum number of Data Volumes that can be attached to an Instance for this hypervisor.", since = "4.16.0") private Integer maxDataVolumesLimit; - @Parameter(name = ApiConstants.STORAGE_MOTION_ENABLED, type = CommandType.BOOLEAN, description = "set true to enable storage motion support for this hypervisor", since = "4.16.0") + @Parameter(name = ApiConstants.STORAGE_MOTION_ENABLED, type = CommandType.BOOLEAN, description = "Set true to enable storage motion support for this hypervisor", since = "4.16.0") private Boolean storageMotionSupported; - @Parameter(name = ApiConstants.MAX_HOSTS_PER_CLUSTER, type = CommandType.INTEGER, description = "the maximum number of the hypervisor hosts per cluster ", since = "4.16.0") + @Parameter(name = ApiConstants.MAX_HOSTS_PER_CLUSTER, type = CommandType.INTEGER, description = "The maximum number of the hypervisor hosts per cluster ", since = "4.16.0") private Integer maxHostsPerClusterLimit; - @Parameter(name = ApiConstants.VM_SNAPSHOT_ENABELD, type = CommandType.BOOLEAN, description = "set true to enable VM snapshots for this hypervisor", since = "4.16.0") + @Parameter(name = ApiConstants.VM_SNAPSHOT_ENABELD, type = CommandType.BOOLEAN, description = "Set true to enable Instance Snapshots for this hypervisor", since = "4.16.0") private Boolean vmSnapshotEnabled; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/diagnostics/GetDiagnosticsDataCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/diagnostics/GetDiagnosticsDataCmd.java index 553ba6b1729d..6a59788715ee 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/diagnostics/GetDiagnosticsDataCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/diagnostics/GetDiagnosticsDataCmd.java @@ -48,7 +48,7 @@ entityType = {VirtualMachine.class}, responseHasSensitiveInfo = false, requestHasSensitiveInfo = false, - description = "Get diagnostics and files from system VMs", + description = "Get diagnostics and files from System VMs", since = "4.14.0.0", authorized = {RoleType.Admin}) public class GetDiagnosticsDataCmd extends BaseAsyncCmd { @@ -64,7 +64,7 @@ public class GetDiagnosticsDataCmd extends BaseAsyncCmd { entityType = SystemVmResponse.class, required = true, validations = {ApiArgValidator.PositiveNumber}, - description = "The ID of the system VM instance to retrieve diagnostics data files from") + description = "The ID of the System VM to retrieve diagnostics data files from") private Long id; @Parameter(name = ApiConstants.FILES, @@ -113,7 +113,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE response.setResponseName(getCommandName()); this.setResponseObject(response); } else { - throw new CloudRuntimeException("failed to generate valid download url: " + downloadUrl); + throw new CloudRuntimeException("Failed to generate valid download url: " + downloadUrl); } } catch (ServerApiException e) { throw new CloudRuntimeException("Internal exception caught while retrieving diagnostics files: ", e); @@ -140,7 +140,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Getting diagnostics data files from system vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); + return "Getting diagnostics data files from System VM: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/diagnostics/RunDiagnosticsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/diagnostics/RunDiagnosticsCmd.java index 4537eb6f215c..577d86146fdd 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/diagnostics/RunDiagnosticsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/diagnostics/RunDiagnosticsCmd.java @@ -48,7 +48,7 @@ @APICommand(name = "runDiagnostics", responseObject = RunDiagnosticsResponse.class, entityType = {VirtualMachine.class}, responseHasSensitiveInfo = false, requestHasSensitiveInfo = false, - description = "Execute network-utility command (ping/arping/tracert) on system VMs remotely", + description = "Execute network-utility command (ping/arping/tracert) on System VMs remotely", authorized = {RoleType.Admin}, since = "4.12.0.0") public class RunDiagnosticsCmd extends BaseAsyncCmd { @@ -62,7 +62,7 @@ public class RunDiagnosticsCmd extends BaseAsyncCmd { @ACL(accessType = SecurityChecker.AccessType.OperateEntry) @Parameter(name = ApiConstants.TARGET_ID, type = CommandType.UUID, required = true, entityType = SystemVmResponse.class, validations = {ApiArgValidator.PositiveNumber}, - description = "The ID of the system VM instance to diagnose") + description = "The ID of the System VM to diagnose") private Long id; @Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, required = true, @@ -70,7 +70,7 @@ public class RunDiagnosticsCmd extends BaseAsyncCmd { private String address; @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, required = true, - description = "The system VM diagnostics type valid options are: ping, traceroute, arping") + description = "The System VM diagnostics type valid options are: ping, traceroute, arping") private String type; @Parameter(name = ApiConstants.PARAMS, type = CommandType.STRING, @@ -153,7 +153,7 @@ public ApiCommandResourceType getApiResourceType() { @Override public String getEventDescription() { - return "Executing diagnostics on system vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); + return "Executing diagnostics on System VM: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/ListTemplateDirectDownloadCertificatesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/ListTemplateDirectDownloadCertificatesCmd.java index 145ff6ba7823..9a605ec4200d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/ListTemplateDirectDownloadCertificatesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/ListTemplateDirectDownloadCertificatesCmd.java @@ -41,7 +41,7 @@ import java.util.List; @APICommand(name = "listTemplateDirectDownloadCertificates", - description = "List the uploaded certificates for direct download templates", + description = "List the uploaded certificates for direct download Templates", responseObject = DirectDownloadCertificateResponse.class, since = "4.17.0", authorized = {RoleType.Admin}) @@ -51,15 +51,15 @@ public class ListTemplateDirectDownloadCertificatesCmd extends BaseListCmd { DirectDownloadManager directDownloadManager; @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DirectDownloadCertificateResponse.class, - description = "list direct download certificate by ID") + description = "List direct download certificate by ID") private Long id; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - description = "the zone where certificates are uploaded") + description = "The zone where certificates are uploaded") private Long zoneId; @Parameter(name = ApiConstants.LIST_HOSTS, type = CommandType.BOOLEAN, - description = "if set to true: include the hosts where the certificate is uploaded to") + description = "If set to true: include the hosts where the certificate is uploaded to") private Boolean listHosts; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/ProvisionTemplateDirectDownloadCertificateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/ProvisionTemplateDirectDownloadCertificateCmd.java index 88f538547e10..3dfbbd940c40 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/ProvisionTemplateDirectDownloadCertificateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/ProvisionTemplateDirectDownloadCertificateCmd.java @@ -50,11 +50,11 @@ public class ProvisionTemplateDirectDownloadCertificateCmd extends BaseCmd { DirectDownloadManager directDownloadManager; @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DirectDownloadCertificateResponse.class, - description = "the id of the direct download certificate to provision", required = true) + description = "The id of the direct download certificate to provision", required = true) private Long id; @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, - description = "the host to provision the certificate", required = true) + description = "The host to provision the certificate", required = true) private Long hostId; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/RevokeTemplateDirectDownloadCertificateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/RevokeTemplateDirectDownloadCertificateCmd.java index eb9031cbc587..1ad8f271cfcf 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/RevokeTemplateDirectDownloadCertificateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/RevokeTemplateDirectDownloadCertificateCmd.java @@ -59,23 +59,23 @@ public class RevokeTemplateDirectDownloadCertificateCmd extends BaseCmd { @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DirectDownloadCertificateResponse.class, - description = "id of the certificate") + description = "ID of the certificate") private Long certificateId; @Parameter(name = ApiConstants.NAME, type = BaseCmd.CommandType.STRING, - description = "(optional) alias of the SSL certificate") + description = "(Optional) alias of the SSL certificate") private String certificateAlias; @Parameter(name = ApiConstants.HYPERVISOR, type = BaseCmd.CommandType.STRING, - description = "(optional) hypervisor type") + description = "(Optional) hypervisor type") private String hypervisor; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - description = "(optional) zone to revoke certificate", required = true) + description = "(Optional) zone to revoke certificate", required = true) private Long zoneId; @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, - description = "(optional) the host ID to revoke certificate") + description = "(Optional) the host ID to revoke certificate") private Long hostId; private void createResponse(final List hostsRevokeStatusList) { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/UploadTemplateDirectDownloadCertificateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/UploadTemplateDirectDownloadCertificateCmd.java index c5c102be56d6..ad440376a913 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/UploadTemplateDirectDownloadCertificateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/direct/download/UploadTemplateDirectDownloadCertificateCmd.java @@ -39,7 +39,7 @@ import java.util.List; @APICommand(name = "uploadTemplateDirectDownloadCertificate", - description = "Upload a certificate for HTTPS direct template download on KVM hosts", + description = "Upload a certificate for HTTPS direct Template download on KVM hosts", responseObject = DirectDownloadCertificateResponse.class, since = "4.11.0", authorized = {RoleType.Admin}) @@ -65,7 +65,7 @@ public class UploadTemplateDirectDownloadCertificateCmd extends BaseCmd { private Long zoneId; @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, - description = "(optional) the host ID to upload certificate") + description = "(Optional) the host ID to upload certificate") private Long hostId; private void createResponse(DirectDownloadCertificate certificate, final List hostStatusList) { @@ -95,7 +95,7 @@ public void execute() { } try { - logger.debug("Uploading certificate " + name + " to agents for Direct Download"); + logger.debug("Uploading certificate {} to agents for Direct Download", name); Pair> uploadStatus = directDownloadManager.uploadCertificateToHosts(certificate, name, hypervisor, zoneId, hostId); DirectDownloadCertificate certificate = uploadStatus.first(); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java index c7f06920bb8d..a20f69c90f58 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/CreateDomainCmd.java @@ -40,13 +40,13 @@ public class CreateDomainCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "creates domain with this name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "Creates domain with this name") private String domainName; @Parameter(name = ApiConstants.PARENT_DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "assigns new domain a parent domain by domain ID of the parent. If no parent domain is specified, the ROOT domain is assumed.") + description = "Assigns new domain a parent domain by domain ID of the parent. If no parent domain is specified, the ROOT domain is assumed.") private Long parentDomainId; @Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, description = "Network domain for networks in the domain") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java index db3bae25e399..6adb457f4f83 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/DeleteDomainCmd.java @@ -49,7 +49,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") + description = "True if all domain resources (child domains, Accounts) have to be cleaned up, false otherwise") private Boolean cleanup; @Inject @@ -88,7 +88,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "deleting domain: " + getId(); + return "Deleting domain: " + getId(); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/ListDomainChildrenCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/ListDomainChildrenCmd.java index 8514bb6dda56..e93948987bb7 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/ListDomainChildrenCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/ListDomainChildrenCmd.java @@ -42,15 +42,15 @@ public class ListDomainChildrenCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "list children domain by parent domain ID.") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "List children domain by parent domain ID.") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list children domains by name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "List children domains by name") private String domainName; @Parameter(name = ApiConstants.IS_RECURSIVE, type = CommandType.BOOLEAN, - description = "to return the entire tree, use the value \"true\". To return the first level children, use the value \"false\".") + description = "To return the entire tree, use the value \"true\". To return the first level children, use the value \"false\".") private Boolean recursive; @Parameter(name = ApiConstants.LIST_ALL, @@ -59,7 +59,7 @@ public class ListDomainChildrenCmd extends BaseListCmd { private Boolean listAll; @Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN, - description = "flag to display the resource icon for domains") + description = "Flag to display the resource icon for domains") private Boolean showIcon; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/ListDomainsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/ListDomainsCmd.java index 895e93289923..5c5a92c45cac 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/ListDomainsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/ListDomainsCmd.java @@ -64,11 +64,11 @@ public class ListDomainsCmd extends BaseListCmd implements UserCmd { @Parameter(name = ApiConstants.DETAILS, type = CommandType.LIST, collectionType = CommandType.STRING, - description = "comma separated list of domain details requested, value can be a list of [ all, resource, min]") + description = "Comma separated list of domain details requested, value can be a list of [ all, resource, min]") private List viewDetails; @Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN, - description = "flag to display the resource icon for domains") + description = "Flag to display the resource icon for domains") private Boolean showIcon; @Parameter(name = ApiConstants.TAG, type = CommandType.STRING, description = "Tag for resource type to return usage", since = "4.20.0") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java index 353cb852bfdf..adce521627fb 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/domain/UpdateDomainCmd.java @@ -44,7 +44,7 @@ public class UpdateDomainCmd extends BaseCmd { @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainResponse.class, required = true, description = "ID of domain to update") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "updates domain with this name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Updates domain with this name") private String domainName; @Parameter(name = ApiConstants.NETWORK_DOMAIN, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/AddGuestOsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/AddGuestOsCmd.java index b854e8389c4f..1868d0412a18 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/AddGuestOsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/AddGuestOsCmd.java @@ -138,7 +138,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "adding a new guest OS type Id: " + getEntityId(); + return "Adding a new guest OS type Id: " + getEntityId(); } @Override @@ -153,7 +153,7 @@ public String getCreateEventType() { @Override public String getCreateEventDescription() { - return "adding new guest OS type"; + return "Adding new guest OS type"; } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/AddGuestOsMappingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/AddGuestOsMappingCmd.java index 3fdfebb54bf5..1a32168308ed 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/AddGuestOsMappingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/AddGuestOsMappingCmd.java @@ -133,7 +133,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "adding a new guest OS mapping Id: " + getEntityId(); + return "Adding a new guest OS mapping Id: " + getEntityId(); } @Override @@ -148,6 +148,6 @@ public String getCreateEventType() { @Override public String getCreateEventDescription() { - return "adding new guest OS mapping"; + return "Adding new guest OS mapping"; } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/GetHypervisorGuestOsNamesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/GetHypervisorGuestOsNamesCmd.java index da920a2ec2d0..811ecc8b165b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/GetHypervisorGuestOsNamesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/GetHypervisorGuestOsNamesCmd.java @@ -44,11 +44,11 @@ public class GetHypervisorGuestOsNamesCmd extends BaseAsyncCmd { validations = {ApiArgValidator.NotNullOrEmpty}) private String hypervisor; - @Parameter(name = ApiConstants.HYPERVISOR_VERSION, type = CommandType.STRING, required = true, description = "Hypervisor version to get the guest os names (atleast one hypervisor host with the version specified must be available)", + @Parameter(name = ApiConstants.HYPERVISOR_VERSION, type = CommandType.STRING, required = true, description = "Hypervisor version to get the guest OS names (at least one hypervisor host with the version specified must be available)", validations = {ApiArgValidator.NotNullOrEmpty}) private String hypervisorVersion; - @Parameter(name = ApiConstants.KEYWORD, type = CommandType.STRING, required = false, description = "Keyword for guest os name") + @Parameter(name = ApiConstants.KEYWORD, type = CommandType.STRING, required = false, description = "Keyword for guest OS name") private String keyword; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/ListGuestOsMappingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/ListGuestOsMappingCmd.java index 23e62cdc7810..47082dae68c2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/ListGuestOsMappingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/guest/ListGuestOsMappingCmd.java @@ -40,22 +40,22 @@ public class ListGuestOsMappingCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOsMappingResponse.class, required = false, description = "list mapping by its UUID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOsMappingResponse.class, required = false, description = "List mapping by its UUID") private Long id; - @Parameter(name = ApiConstants.OS_TYPE_ID, type = CommandType.UUID, entityType = GuestOSResponse.class, required = false, description = "list mapping by Guest OS Type UUID") + @Parameter(name = ApiConstants.OS_TYPE_ID, type = CommandType.UUID, entityType = GuestOSResponse.class, required = false, description = "List mapping by Guest OS Type UUID") private Long osTypeId; - @Parameter(name = ApiConstants.OS_DISPLAY_NAME, type = CommandType.STRING, required = false, description = "list Guest OS mapping by OS display name") + @Parameter(name = ApiConstants.OS_DISPLAY_NAME, type = CommandType.STRING, required = false, description = "List Guest OS mapping by OS display name") private String osDisplayName; - @Parameter(name = ApiConstants.OS_NAME_FOR_HYPERVISOR, type = CommandType.STRING, required = false, description = "list Guest OS mapping by OS mapping name with hypervisor") + @Parameter(name = ApiConstants.OS_NAME_FOR_HYPERVISOR, type = CommandType.STRING, required = false, description = "List Guest OS mapping by OS mapping name with hypervisor") private String osNameForHypervisor; - @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, required = false, description = "list Guest OS mapping by hypervisor") + @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, required = false, description = "List Guest OS mapping by hypervisor") private String hypervisor; - @Parameter(name = ApiConstants.HYPERVISOR_VERSION, type = CommandType.STRING, required = false, description = "list Guest OS mapping by hypervisor version. Must be used with hypervisor parameter") + @Parameter(name = ApiConstants.HYPERVISOR_VERSION, type = CommandType.STRING, required = false, description = "List Guest OS mapping by hypervisor version. Must be used with hypervisor parameter") private String hypervisorVersion; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/ConfigureHAForHostCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/ConfigureHAForHostCmd.java index 12033c04b80f..d7707e197d64 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/ConfigureHAForHostCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/ConfigureHAForHostCmd.java @@ -115,6 +115,6 @@ public String getEventType() { @Override public String getEventDescription() { - return "configure HA for host: " + getHostId(); + return "Configure HA for host: " + getHostId(); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/DisableHAForClusterCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/DisableHAForClusterCmd.java index d570746765be..51554b7607dc 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/DisableHAForClusterCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/DisableHAForClusterCmd.java @@ -102,7 +102,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "disable HA for cluster: " + getClusterId(); + return "Disable HA for cluster: " + getClusterId(); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/DisableHAForHostCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/DisableHAForHostCmd.java index 5a8b1f1954f2..ad9c64145322 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/DisableHAForHostCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/DisableHAForHostCmd.java @@ -104,6 +104,6 @@ public String getEventType() { @Override public String getEventDescription() { - return "disable HA for host: " + getHostId(); + return "Disable HA for host: " + getHostId(); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/DisableHAForZoneCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/DisableHAForZoneCmd.java index fbd57fa82a15..1f0758459b5d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/DisableHAForZoneCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/DisableHAForZoneCmd.java @@ -103,7 +103,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "disable HA for zone: " + getZoneId(); + return "Disable HA for zone: " + getZoneId(); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/EnableHAForClusterCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/EnableHAForClusterCmd.java index 7e627939ca55..3bb7a4c3070d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/EnableHAForClusterCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/EnableHAForClusterCmd.java @@ -103,6 +103,6 @@ public String getEventType() { @Override public String getEventDescription() { - return "enable HA for cluster: " + getClusterId(); + return "Enable HA for cluster: " + getClusterId(); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/EnableHAForHostCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/EnableHAForHostCmd.java index aac3d3505198..f54767225432 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/EnableHAForHostCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/EnableHAForHostCmd.java @@ -104,6 +104,6 @@ public String getEventType() { @Override public String getEventDescription() { - return "enable HA for host: " + getHostId(); + return "Enable HA for host: " + getHostId(); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/EnableHAForZoneCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/EnableHAForZoneCmd.java index f9b1560bd8a1..99607315c543 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/EnableHAForZoneCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/ha/EnableHAForZoneCmd.java @@ -103,7 +103,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "enable HA for zone: " + getZoneId(); + return "Enable HA for zone: " + getZoneId(); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/AddHostCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/AddHostCmd.java index cc124ab8106e..a698a62254e6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/AddHostCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/AddHostCmd.java @@ -45,34 +45,34 @@ public class AddHostCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "the cluster ID for the host") + @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "The cluster ID for the host") private Long clusterId; - @Parameter(name = ApiConstants.CLUSTER_NAME, type = CommandType.STRING, description = "the cluster name for the host") + @Parameter(name = ApiConstants.CLUSTER_NAME, type = CommandType.STRING, description = "The cluster name for the host") private String clusterName; - @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, description = "the username for the host; required to be passed for hypervisors other than VMWare") + @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, description = "The username for the host; required to be passed for hypervisors other than VMWare") private String username; - @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, description = "the password for the host; required to be passed for hypervisors other than VMWare") + @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, description = "The password for the host; required to be passed for hypervisors other than VMWare") private String password; - @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, required = true, description = "the Pod ID for the host") + @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, required = true, description = "The Pod ID for the host") private Long podId; - @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "the host URL") + @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "The host URL") private String url; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the Zone ID for the host") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "The Zone ID for the host") private Long zoneId; - @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, required = true, description = "hypervisor type of the host") + @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, required = true, description = "Hypervisor type of the host") private String hypervisor; @Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Allocation state of this Host for allocation of new resources") private String allocationState; - @Parameter(name = ApiConstants.HOST_TAGS, type = CommandType.LIST, collectionType = CommandType.STRING, description = "list of tags to be added to the host") + @Parameter(name = ApiConstants.HOST_TAGS, type = CommandType.LIST, collectionType = CommandType.STRING, description = "List of tags to be added to the host") private List hostTags; @Parameter(name = ApiConstants.STORAGE_ACCESS_GROUPS, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java index c965a39450bd..9a7eff7e2e59 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/AddSecondaryStorageCmd.java @@ -38,10 +38,10 @@ public class AddSecondaryStorageCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "the URL for the secondary storage") + @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "The URL for the secondary storage") protected String url; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID for the secondary storage") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID for the secondary storage") protected Long zoneId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/CancelHostAsDegradedCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/CancelHostAsDegradedCmd.java index 4e9d997b3b76..f68da1edcd17 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/CancelHostAsDegradedCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/CancelHostAsDegradedCmd.java @@ -47,7 +47,7 @@ public class CancelHostAsDegradedCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = BaseCmd.CommandType.UUID, entityType = HostResponse.class, description = "host ID", required = true, validations = {ApiArgValidator.PositiveNumber}) + @Parameter(name = ApiConstants.ID, type = BaseCmd.CommandType.UUID, entityType = HostResponse.class, description = "Host ID", required = true, validations = {ApiArgValidator.PositiveNumber}) private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/CancelHostMaintenanceCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/CancelHostMaintenanceCmd.java index 55fe8ec23cec..111172200b9a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/CancelHostMaintenanceCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/CancelHostMaintenanceCmd.java @@ -40,7 +40,7 @@ public class CancelHostMaintenanceCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "the host ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "The host ID") private Long id; ///////////////////////////////////////////////////// @@ -76,7 +76,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "canceling maintenance for host: " + getId(); + return "Canceling maintenance for host: " + getId(); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/DeclareHostAsDegradedCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/DeclareHostAsDegradedCmd.java index 6bb8f382e541..209d8b65fbab 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/DeclareHostAsDegradedCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/DeclareHostAsDegradedCmd.java @@ -33,7 +33,7 @@ import org.apache.cloudstack.context.CallContext; @APICommand(name = "declareHostAsDegraded", - description = "Declare host as 'Degraded'. Host must be on 'Disconnected' or 'Alert' state. The ADMIN must be sure that there are no VMs running on the respective host otherwise this command might corrupted VMs that were running on the 'Degraded' host.", + description = "Declare host as 'Degraded'. Host must be on 'Disconnected' or 'Alert' state. The ADMIN must be sure that there are no Instances running on the respective host otherwise this command might corrupted Instances that were running on the 'Degraded' host.", since = "4.16.0.0", responseObject = HostResponse.class, requestHasSensitiveInfo = false, @@ -47,7 +47,7 @@ public class DeclareHostAsDegradedCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = BaseCmd.CommandType.UUID, entityType = HostResponse.class, description = "host ID", required = true, validations = {ApiArgValidator.PositiveNumber}) + @Parameter(name = ApiConstants.ID, type = BaseCmd.CommandType.UUID, entityType = HostResponse.class, description = "Host ID", required = true, validations = {ApiArgValidator.PositiveNumber}) private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/DeleteHostCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/DeleteHostCmd.java index 38325c2f072d..79ad1acec9f6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/DeleteHostCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/DeleteHostCmd.java @@ -37,17 +37,17 @@ public class DeleteHostCmd extends BaseCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "the host ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "The host ID") private Long id; @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, - description = "Force delete the host. All HA enabled vms running on the host will be put to HA; HA disabled ones will be stopped") + description = "Force delete the host. All HA enabled Instances running on the host will be put to HA; HA disabled ones will be stopped") private Boolean forced; @Parameter(name = ApiConstants.FORCED_DESTROY_LOCAL_STORAGE, type = CommandType.BOOLEAN, - description = "Force destroy local storage on this host. All VMs created on this local storage will be destroyed") + description = "Force destroy local storage on this host. All Instances created on this local storage will be destroyed") private Boolean forceDestroyLocalStorage; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java index db30e4f4c02f..abca619f82a7 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/FindHostsForMigrationCmd.java @@ -33,7 +33,7 @@ import com.cloud.utils.Pair; import com.cloud.utils.Ternary; -@APICommand(name = "findHostsForMigration", description = "Find hosts suitable for migrating a virtual machine.", responseObject = HostForMigrationResponse.class, +@APICommand(name = "findHostsForMigration", description = "Find hosts suitable for migrating an Instance.", responseObject = HostForMigrationResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class FindHostsForMigrationCmd extends BaseListCmd { @@ -46,7 +46,7 @@ public class FindHostsForMigrationCmd extends BaseListCmd { type = CommandType.UUID, entityType = UserVmResponse.class, required = true, - description = "find hosts to which this VM can be migrated and flag the hosts with enough " + "CPU/RAM to host the VM") + description = "Find hosts to which this Instance can be migrated and flag the hosts with enough " + "CPU/RAM to host the Instance") private Long virtualMachineId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java index a71150a69e27..983ed25d953b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/ListHostsCmd.java @@ -52,59 +52,59 @@ public class ListHostsCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "lists hosts existing in particular cluster") + @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "Lists hosts existing in particular cluster") private Long clusterId; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, description = "the id of the host") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, description = "The ID of the host") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the host") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the host") private String hostName; - @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "the Pod ID for the host") + @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "The Pod ID for the host") private Long podId; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "the state of the host") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "The state of the host") private String state; - @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "the host type") + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "The host type") private String type; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID for the host") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID for the host") private Long zoneId; @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = false, - description = "lists hosts in the same cluster as this VM and flag hosts with enough CPU/RAm to host this VM") + description = "Lists hosts in the same cluster as this Instance and flag hosts with enough CPU/RAm to host this Instance") private Long virtualMachineId; @Parameter(name = ApiConstants.OUTOFBANDMANAGEMENT_ENABLED, type = CommandType.BOOLEAN, - description = "list hosts for which out-of-band management is enabled") + description = "List hosts for which out-of-band management is enabled") private Boolean outOfBandManagementEnabled; @Parameter(name = ApiConstants.OUTOFBANDMANAGEMENT_POWERSTATE, type = CommandType.STRING, - description = "list hosts by its out-of-band management interface's power state. Its value can be one of [On, Off, Unknown]") + description = "List hosts by its out-of-band management interface's power state. Its value can be one of [On, Off, Unknown]") private String outOfBandManagementPowerState; @Parameter(name = ApiConstants.RESOURCE_STATE, type = CommandType.STRING, - description = "list hosts by resource state. Resource state represents current state determined by admin of host, value can be one of [Enabled, Disabled, Unmanaged, PrepareForMaintenance, ErrorInMaintenance, Maintenance, Error]") + description = "List hosts by resource state. Resource state represents current state determined by admin of host, value can be one of [Enabled, Disabled, Unmanaged, PrepareForMaintenance, ErrorInMaintenance, Maintenance, Error]") private String resourceState; @Parameter(name = ApiConstants.DETAILS, type = CommandType.LIST, collectionType = CommandType.STRING, - description = "comma separated list of host details requested, value can be a list of [ min, all, capacity, events, stats]") + description = "Comma separated list of host details requested, value can be a list of [ min, all, capacity, events, stats]") private List viewDetails; - @Parameter(name = ApiConstants.HA_HOST, type = CommandType.BOOLEAN, description = "if true, list only hosts dedicated to HA") + @Parameter(name = ApiConstants.HA_HOST, type = CommandType.BOOLEAN, description = "If true, list only hosts dedicated to HA") private Boolean haHost; - @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "hypervisor type of host: XenServer,KVM,VMware,Hyperv,BareMetal,Simulator") + @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "Hypervisor type of host: XenServer,KVM,VMware,Hyperv,BareMetal,Simulator") private String hypervisor; @Parameter(name = ApiConstants.MANAGEMENT_SERVER_ID, type = CommandType.UUID, entityType = ManagementServerResponse.class, description = "the id of the management server", since="4.21.0") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/PrepareForHostMaintenanceCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/PrepareForHostMaintenanceCmd.java index 5c2b50c87239..b76f500359a3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/PrepareForHostMaintenanceCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/PrepareForHostMaintenanceCmd.java @@ -40,7 +40,7 @@ public class PrepareForHostMaintenanceCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "the host ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "The host ID") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java index 3550d61fdb97..178a96cedbd6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/ReconnectHostCmd.java @@ -41,7 +41,7 @@ public class ReconnectHostCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "the host ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "The host ID") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/ReleaseHostReservationCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/ReleaseHostReservationCmd.java index 7fee0684c781..d7905421a8f3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/ReleaseHostReservationCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/ReleaseHostReservationCmd.java @@ -40,7 +40,7 @@ public class ReleaseHostReservationCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "the host ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "The host ID") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/UpdateHostCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/UpdateHostCmd.java index 86f002b9b7da..c085abd42c76 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/UpdateHostCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/UpdateHostCmd.java @@ -40,7 +40,7 @@ public class UpdateHostCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "the ID of the host to update") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, description = "The ID of the host to update") private Long id; @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Change the name of host", since = "4.15", authorized = {RoleType.Admin}) @@ -49,7 +49,7 @@ public class UpdateHostCmd extends BaseCmd { @Parameter(name = ApiConstants.OS_CATEGORY_ID, type = CommandType.UUID, entityType = GuestOSCategoryResponse.class, - description = "the id of Os category to update the host with") + description = "The ID of OS category to update the host with") private Long osCategoryId; @Parameter(name = ApiConstants.ALLOCATION_STATE, @@ -57,13 +57,13 @@ public class UpdateHostCmd extends BaseCmd { description = "Change resource state of host, valid values are [Enable, Disable]. Operation may failed if host in states not allowing Enable/Disable") private String allocationState; - @Parameter(name = ApiConstants.HOST_TAGS, type = CommandType.LIST, collectionType = CommandType.STRING, description = "list of tags to be added to the host") + @Parameter(name = ApiConstants.HOST_TAGS, type = CommandType.LIST, collectionType = CommandType.STRING, description = "List of tags to be added to the host") private List hostTags; @Parameter(name = ApiConstants.IS_TAG_A_RULE, type = CommandType.BOOLEAN, description = ApiConstants.PARAMETER_DESCRIPTION_IS_TAG_A_RULE) private Boolean isTagARule; - @Parameter(name = ApiConstants.URL, type = CommandType.STRING, description = "the new uri for the secondary storage: nfs://host/path") + @Parameter(name = ApiConstants.URL, type = CommandType.STRING, description = "The new URI for the secondary storage: nfs://host/path") private String url; @Parameter(name = ApiConstants.ANNOTATION, type = CommandType.STRING, description = "Add an annotation to this host", since = "4.11", authorized = {RoleType.Admin}) @@ -147,7 +147,7 @@ public void execute() { this.setResponseObject(hostResponse); } catch (Exception e) { Host host = _entityMgr.findById(Host.class, getId()); - logger.debug("Failed to update host: {} with id {}", host, getId(), e); + logger.error("Failed to update {}", host, e); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, String.format("Failed to update host: %s with id %d, %s", host, getId(), e.getMessage())); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java index c94fe2c58656..f96f01d3a877 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/host/UpdateHostPasswordCmd.java @@ -36,19 +36,19 @@ public class UpdateHostPasswordCmd extends BaseCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, description = "the host ID") + @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, description = "The host ID") private Long hostId; - @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "the cluster ID") + @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "The cluster ID") private Long clusterId; - @Parameter(name = ApiConstants.SHOULD_UPDATE_PASSWORD, type = CommandType.BOOLEAN, description = "if the password should also be updated on the hosts") + @Parameter(name = ApiConstants.SHOULD_UPDATE_PASSWORD, type = CommandType.BOOLEAN, description = "If the password should also be updated on the hosts") private Boolean updatePasswdOnHost; - @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "the username for the host/cluster") + @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "The username for the host/cluster") private String username; - @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, required = true, description = "the new password for the host/cluster") + @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, required = true, description = "The new password for the host/cluster") private String password; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/ConfigureInternalLoadBalancerElementCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/ConfigureInternalLoadBalancerElementCmd.java index c94d326ee622..9bb28523ecad 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/ConfigureInternalLoadBalancerElementCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/ConfigureInternalLoadBalancerElementCmd.java @@ -50,7 +50,7 @@ public class ConfigureInternalLoadBalancerElementCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = InternalLoadBalancerElementResponse.class, required = true, - description = "the ID of the internal lb provider") + description = "The ID of the internal lb provider") private Long id; @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, required = true, description = "Enables/Disables the Internal Load Balancer element") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/CreateInternalLoadBalancerElementCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/CreateInternalLoadBalancerElementCmd.java index 924287b673ba..474bbc831e5c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/CreateInternalLoadBalancerElementCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/CreateInternalLoadBalancerElementCmd.java @@ -48,7 +48,7 @@ public class CreateInternalLoadBalancerElementCmd extends BaseAsyncCreateCmd { type = CommandType.UUID, entityType = ProviderResponse.class, required = true, - description = "the network service provider ID of the internal load balancer element") + description = "The network service provider ID of the internal load balancer element") private Long nspId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/ListInternalLBVMsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/ListInternalLBVMsCmd.java index 0eb00234382d..9ba23279c5df 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/ListInternalLBVMsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/ListInternalLBVMsCmd.java @@ -35,7 +35,7 @@ import com.cloud.network.router.VirtualRouter.Role; import com.cloud.vm.VirtualMachine; -@APICommand(name = "listInternalLoadBalancerVMs", description = "List internal LB VMs.", responseObject = DomainRouterResponse.class, entityType = {VirtualMachine.class}, +@APICommand(name = "listInternalLoadBalancerVMs", description = "List internal LB Instances.", responseObject = DomainRouterResponse.class, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListInternalLBVMsCmd extends BaseListProjectAndAccountResourcesCmd { @@ -45,36 +45,36 @@ public class ListInternalLBVMsCmd extends BaseListProjectAndAccountResourcesCmd //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, description = "the host ID of the Internal LB VM") + @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, description = "The host ID of the Internal LB Instance") private Long hostId; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "the ID of the Internal LB VM") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "The ID of the Internal LB Instance") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the Internal LB VM") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the Internal LB Instance") private String routerName; - @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "the Pod ID of the Internal LB VM") + @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "The Pod ID of the Internal LB Instance") private Long podId; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "the state of the Internal LB VM") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "The state of the Internal LB Instance") private String state; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID of the Internal LB VM") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID of the Internal LB Instance") private Long zoneId; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "list by network id") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "List by Network ID") private Long networkId; - @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "List Internal LB VMs by VPC") + @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "List Internal LB Instances by VPC") private Long vpcId; - @Parameter(name = ApiConstants.FOR_VPC, type = CommandType.BOOLEAN, description = "if true is passed for this parameter, list only VPC Internal LB VMs") + @Parameter(name = ApiConstants.FOR_VPC, type = CommandType.BOOLEAN, description = "If true is passed for this parameter, list only VPC Internal LB Instances") private Boolean forVpc; @Parameter(name = ApiConstants.FETCH_ROUTER_HEALTH_CHECK_RESULTS, type = CommandType.BOOLEAN, since = "4.14", - description = "if true is passed for this parameter, also fetch last executed health check results for the VM. Default is false") + description = "If true is passed for this parameter, also fetch last executed health check results for the Instance. Default is false") private Boolean fetchHealthCheckResults; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/ListInternalLoadBalancerElementsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/ListInternalLoadBalancerElementsCmd.java index b17cc22e7466..9cd7ba2656b5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/ListInternalLoadBalancerElementsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/ListInternalLoadBalancerElementsCmd.java @@ -50,16 +50,16 @@ public class ListInternalLoadBalancerElementsCmd extends BaseListCmd { @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InternalLoadBalancerElementResponse.class, - description = "list internal load balancer elements by id") + description = "List internal load balancer elements by ID") private Long id; @Parameter(name = ApiConstants.NSP_ID, type = CommandType.UUID, entityType = ProviderResponse.class, - description = "list internal load balancer elements by network service provider id") + description = "List internal load balancer elements by network service provider ID") private Long nspId; - @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, description = "list internal load balancer elements by enabled state") + @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, description = "List internal load balancer elements by enabled state") private Boolean enabled; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/StartInternalLBVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/StartInternalLBVMCmd.java index 3dd7d2adf378..b5aa3c8d9b07 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/StartInternalLBVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/StartInternalLBVMCmd.java @@ -38,7 +38,7 @@ import com.cloud.network.router.VirtualRouter.Role; import com.cloud.vm.VirtualMachine; -@APICommand(name = "startInternalLoadBalancerVM", responseObject = DomainRouterResponse.class, description = "Starts an existing internal lb vm.", entityType = {VirtualMachine.class}, +@APICommand(name = "startInternalLoadBalancerVM", responseObject = DomainRouterResponse.class, description = "Starts an existing Internal LB Instance.", entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class StartInternalLBVMCmd extends BaseAsyncCmd { private static final String s_name = "startinternallbvmresponse"; @@ -47,7 +47,7 @@ public class StartInternalLBVMCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, required = true, description = "the ID of the internal lb vm") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, required = true, description = "The ID of the Internal LB Instance") private Long id; ///////////////////////////////////////////////////// @@ -77,7 +77,7 @@ public long getEntityOwnerId() { if (router != null && router.getRole() == Role.INTERNAL_LB_VM) { return router.getAccountId(); } else { - throw new InvalidParameterValueException("Unable to find internal lb vm by id"); + throw new InvalidParameterValueException("Unable to find Internal LB Instance by ID"); } } @@ -88,7 +88,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "starting internal lb vm: " + getId(); + return "starting Internal LB Instance: " + getId(); } @Override @@ -103,11 +103,11 @@ public Long getApiResourceId() { @Override public void execute() throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException { - CallContext.current().setEventDetails("Internal Lb Vm Id: " + getId()); + CallContext.current().setEventDetails("Internal LB Instance ID: " + getId()); VirtualRouter result = null; VirtualRouter router = _routerService.findRouter(getId()); if (router == null || router.getRole() != Role.INTERNAL_LB_VM) { - throw new InvalidParameterValueException("Can't find internal lb vm by id"); + throw new InvalidParameterValueException("Can't find Internal LB Instance by ID"); } else { result = _internalLbSvc.startInternalLbVm(getId(), CallContext.current().getCallingAccount(), CallContext.current().getCallingUserId()); } @@ -117,7 +117,7 @@ public void execute() throws ConcurrentOperationException, ResourceUnavailableEx routerResponse.setResponseName(getCommandName()); setResponseObject(routerResponse); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to start internal lb vm"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to start Internal LB Instance"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/StopInternalLBVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/StopInternalLBVMCmd.java index a746e5d906d6..82eddb27c7dd 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/StopInternalLBVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/internallb/StopInternalLBVMCmd.java @@ -37,7 +37,7 @@ import com.cloud.network.router.VirtualRouter.Role; import com.cloud.vm.VirtualMachine; -@APICommand(name = "stopInternalLoadBalancerVM", description = "Stops an Internal LB vm.", responseObject = DomainRouterResponse.class, entityType = {VirtualMachine.class}, +@APICommand(name = "stopInternalLoadBalancerVM", description = "Stops an Internal LB Instance.", responseObject = DomainRouterResponse.class, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class StopInternalLBVMCmd extends BaseAsyncCmd { private static final String s_name = "stopinternallbvmresponse"; @@ -46,10 +46,10 @@ public class StopInternalLBVMCmd extends BaseAsyncCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, required = true, description = "the ID of the internal lb vm") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, required = true, description = "The ID of the internal LB Instance") private Long id; - @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the VM (vm is marked as Stopped even when command fails to be send to the backend, otherwise a force poweroff is attempted). To be used if the caller knows the VM is stopped and should be marked as such.") + @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the Instance (Instance is marked as Stopped even when command fails to be send to the backend, otherwise a force poweroff is attempted). To be used if the caller knows the Instance is stopped and should be marked as such.") private Boolean forced; // /////////////////////////////////////////////////// @@ -75,7 +75,7 @@ public long getEntityOwnerId() { if (vm != null && vm.getRole() == Role.INTERNAL_LB_VM) { return vm.getAccountId(); } else { - throw new InvalidParameterValueException("Unable to find internal lb vm by id"); + throw new InvalidParameterValueException("Unable to find Internal LB Instance by ID"); } } @@ -86,7 +86,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "stopping internal lb vm: " + getId(); + return "Stopping Internal LB Instance: " + getId(); } @Override @@ -105,11 +105,11 @@ public boolean isForced() { @Override public void execute() throws ConcurrentOperationException, ResourceUnavailableException { - CallContext.current().setEventDetails("Internal lb vm Id: " + getId()); + CallContext.current().setEventDetails("Internal LB Instance Id: " + getId()); VirtualRouter result = null; VirtualRouter vm = _routerService.findRouter(getId()); if (vm == null || vm.getRole() != Role.INTERNAL_LB_VM) { - throw new InvalidParameterValueException("Can't find internal lb vm by id"); + throw new InvalidParameterValueException("Can't find Internal LB Instance by ID"); } else { result = _internalLbSvc.stopInternalLbVm(getId(), isForced(), CallContext.current().getCallingAccount(), CallContext.current().getCallingUserId()); } @@ -119,7 +119,7 @@ public void execute() throws ConcurrentOperationException, ResourceUnavailableEx response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to stop internal lb vm"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to stop Internal LB Instance"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/AttachIsoCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/AttachIsoCmdByAdmin.java index e39107b2593c..d253580f0983 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/AttachIsoCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/AttachIsoCmdByAdmin.java @@ -22,6 +22,6 @@ import org.apache.cloudstack.api.command.user.iso.AttachIsoCmd; import org.apache.cloudstack.api.response.UserVmResponse; -@APICommand(name = "attachIso", description = "Attaches an ISO to a virtual machine.", responseObject = UserVmResponse.class, responseView = ResponseView.Full, +@APICommand(name = "attachIso", description = "Attaches an ISO to an Instance.", responseObject = UserVmResponse.class, responseView = ResponseView.Full, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class AttachIsoCmdByAdmin extends AttachIsoCmd implements AdminCmd { } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/CopyIsoCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/CopyIsoCmdByAdmin.java index f27c0c5c234a..f64326638a33 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/CopyIsoCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/CopyIsoCmdByAdmin.java @@ -21,7 +21,7 @@ import org.apache.cloudstack.api.command.user.iso.CopyIsoCmd; import org.apache.cloudstack.api.response.TemplateResponse; -@APICommand(name = "copyIso", description = "Copies an iso from one zone to another.", responseObject = TemplateResponse.class, responseView = ResponseView.Full, +@APICommand(name = "copyIso", description = "Copies an ISO from one zone to another.", responseObject = TemplateResponse.class, responseView = ResponseView.Full, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CopyIsoCmdByAdmin extends CopyIsoCmd { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/DetachIsoCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/DetachIsoCmdByAdmin.java index 5eeba2bfa301..553d0ae13c69 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/DetachIsoCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/DetachIsoCmdByAdmin.java @@ -22,6 +22,6 @@ import org.apache.cloudstack.api.command.user.iso.DetachIsoCmd; import org.apache.cloudstack.api.response.UserVmResponse; -@APICommand(name = "detachIso", description = "Detaches any ISO file (if any) currently attached to a virtual machine.", responseObject = UserVmResponse.class, responseView = ResponseView.Full, +@APICommand(name = "detachIso", description = "Detaches any ISO file (if any) currently attached to an Instance.", responseObject = UserVmResponse.class, responseView = ResponseView.Full, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class DetachIsoCmdByAdmin extends DetachIsoCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/ListIsoPermissionsCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/ListIsoPermissionsCmdByAdmin.java index 46bd4f3766e7..b831a99cb0af 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/ListIsoPermissionsCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/iso/ListIsoPermissionsCmdByAdmin.java @@ -1,4 +1,4 @@ -// Licensedname = "listIsoPermissions", to the Apache Software Foundation (ASF) under one +// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file @@ -23,7 +23,7 @@ import org.apache.cloudstack.api.response.TemplatePermissionsResponse; @APICommand(name = "listIsoPermissions", - description = "List iso visibility and all accounts that have permissions to view this iso.", + description = "List ISO visibility and all accounts that have permissions to view this ISO.", responseObject = TemplatePermissionsResponse.class, responseView = ResponseView.Full, requestHasSensitiveInfo = false, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/loadbalancer/ListLoadBalancerRuleInstancesCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/loadbalancer/ListLoadBalancerRuleInstancesCmdByAdmin.java index b11988b241fb..a37e058924f6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/loadbalancer/ListLoadBalancerRuleInstancesCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/loadbalancer/ListLoadBalancerRuleInstancesCmdByAdmin.java @@ -23,7 +23,7 @@ import org.apache.cloudstack.api.ResponseObject.ResponseView; import org.apache.cloudstack.api.command.user.loadbalancer.ListLoadBalancerRuleInstancesCmd; -@APICommand(name = "listLoadBalancerRuleInstances", description = "List all virtual machine instances that are assigned to a load balancer rule.", responseObject = LoadBalancerRuleVmMapResponse.class, responseView = ResponseView.Full, +@APICommand(name = "listLoadBalancerRuleInstances", description = "List all Instances that are assigned to a load balancer rule.", responseObject = LoadBalancerRuleVmMapResponse.class, responseView = ResponseView.Full, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class ListLoadBalancerRuleInstancesCmdByAdmin extends ListLoadBalancerRuleInstancesCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/management/ListMgmtsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/management/ListMgmtsCmd.java index 7b7eae1d0e93..ecc59f7cab86 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/management/ListMgmtsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/management/ListMgmtsCmd.java @@ -34,10 +34,10 @@ public class ListMgmtsCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ManagementServerResponse.class, description = "the id of the management server") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ManagementServerResponse.class, description = "The ID of the management server") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the management server") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the management server") private String hostName; @Parameter(name = ApiConstants.PEERS, type = CommandType.BOOLEAN, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/AddNetworkDeviceCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/AddNetworkDeviceCmd.java index 334772970431..e90a56a92abb 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/AddNetworkDeviceCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/AddNetworkDeviceCmd.java @@ -55,7 +55,7 @@ public class AddNetworkDeviceCmd extends BaseCmd { description = "Network device type, now supports ExternalDhcp, PxeServer, NetscalerMPXLoadBalancer, NetscalerVPXLoadBalancer, NetscalerSDXLoadBalancer, F5BigIpLoadBalancer, JuniperSRXFirewall, PaloAltoFirewall") private String type; - @Parameter(name = ApiConstants.NETWORK_DEVICE_PARAMETER_LIST, type = CommandType.MAP, description = "parameters for network device") + @Parameter(name = ApiConstants.NETWORK_DEVICE_PARAMETER_LIST, type = CommandType.MAP, description = "Parameters for network device") private Map paramList; public String getDeviceType() { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/AddNetworkServiceProviderCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/AddNetworkServiceProviderCmd.java index 40a822393452..a0013f9d6e2b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/AddNetworkServiceProviderCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/AddNetworkServiceProviderCmd.java @@ -52,22 +52,22 @@ public class AddNetworkServiceProviderCmd extends BaseAsyncCreateCmd { type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, required = true, - description = "the Physical Network ID to add the provider to") + description = "The Physical Network ID to add the provider to") private Long physicalNetworkId; @Parameter(name = ApiConstants.DEST_PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, - description = "the destination Physical Network ID to bridge to") + description = "The destination Physical Network ID to bridge to") private Long destinationPhysicalNetworkId; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name for the physical network service provider") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name for the physical network service provider") private String name; @Parameter(name = ApiConstants.SERVICE_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, - description = "the list of services to be enabled for this physical network service provider") + description = "The list of services to be enabled for this physical network service provider") private List enabledServices; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateManagementNetworkIpRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateManagementNetworkIpRangeCmd.java index 85cfddfb714f..a7826e022a68 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateManagementNetworkIpRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateManagementNetworkIpRangeCmd.java @@ -34,6 +34,7 @@ import com.cloud.exception.ResourceAllocationException; import com.cloud.exception.ResourceUnavailableException; import com.cloud.user.Account; +import com.cloud.utils.StringUtils; @APICommand(name = "createManagementNetworkIpRange", description = "Creates a Management network IP range.", @@ -118,7 +119,7 @@ public Boolean isForSystemVms() { } public String getVlan() { - if (vlan == null || vlan.isEmpty()) { + if (StringUtils.isBlank(vlan)) { vlan = "untagged"; } return vlan; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateNetworkCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateNetworkCmdByAdmin.java index d8b57f79528c..57d1d4fad116 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateNetworkCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateNetworkCmdByAdmin.java @@ -31,24 +31,24 @@ import java.util.List; -@APICommand(name = "createNetwork", description = "Creates a network", responseObject = NetworkResponse.class, responseView = ResponseView.Full, entityType = {Network.class}, +@APICommand(name = "createNetwork", description = "Creates a Network", responseObject = NetworkResponse.class, responseView = ResponseView.Full, entityType = {Network.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateNetworkCmdByAdmin extends CreateNetworkCmd implements AdminCmd { - @Parameter(name=ApiConstants.VLAN, type=CommandType.STRING, description="the ID or VID of the network") + @Parameter(name=ApiConstants.VLAN, type=CommandType.STRING, description = "The ID or VID of the network") private String vlan; - @Parameter(name=ApiConstants.BYPASS_VLAN_OVERLAP_CHECK, type=CommandType.BOOLEAN, description="when true bypasses VLAN id/range overlap check during network creation for shared and L2 networks") + @Parameter(name=ApiConstants.BYPASS_VLAN_OVERLAP_CHECK, type=CommandType.BOOLEAN, description = "When true bypasses VLAN ID/range overlap check during Network creation for shared and L2 Networks") private Boolean bypassVlanOverlapCheck; - @Parameter(name=ApiConstants.HIDE_IP_ADDRESS_USAGE, type=CommandType.BOOLEAN, description="when true ip address usage for the network will not be exported by the listUsageRecords API") + @Parameter(name=ApiConstants.HIDE_IP_ADDRESS_USAGE, type=CommandType.BOOLEAN, description = "When true IP address usage for the Network will not be exported by the listUsageRecords API") private Boolean hideIpAddressUsage; - @Parameter(name = ApiConstants.ROUTER_IP, type = CommandType.STRING, description = "IPV4 address to be assigned to a router in a shared network", since = "4.16", + @Parameter(name = ApiConstants.ROUTER_IP, type = CommandType.STRING, description = "IPv4 address to be assigned to a router in a shared Network", since = "4.16", validations = {ApiArgValidator.NotNullOrEmpty}) private String routerIp; - @Parameter(name = ApiConstants.ROUTER_IPV6, type = CommandType.STRING, description = "IPV6 address to be assigned to a router in a shared network", since = "4.16", + @Parameter(name = ApiConstants.ROUTER_IPV6, type = CommandType.STRING, description = "IPv6 address to be assigned to a router in a shared Network", since = "4.16", validations = {ApiArgValidator.NotNullOrEmpty}) private String routerIpv6; @@ -56,7 +56,7 @@ public class CreateNetworkCmdByAdmin extends CreateNetworkCmd implements AdminCm type = CommandType.LIST, collectionType = CommandType.UUID, entityType = BgpPeerResponse.class, - description = "Ids of the Bgp Peer for the network", + description = "IDs of the Bgp Peer for the Network", since = "4.20.0") private List bgpPeerIds; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java index 56333f4081b0..a0559f57dab0 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateNetworkOfferingCmd.java @@ -73,76 +73,76 @@ public class CreateNetworkOfferingCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the network offering") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the network offering") private String networkOfferingName; - @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "the display text of the network offering, defaults to the value of 'name'.") + @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The display text of the network offering, defaults to the value of 'name'.") private String displayText; @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, required = true, - description = "the traffic type for the network offering. Supported type in current release is GUEST only") + description = "The traffic type for the network offering. Supported type in current release is GUEST only") private String traffictype; - @Parameter(name = ApiConstants.TAGS, type = CommandType.STRING, description = "the tags for the network offering.", length = 4096) + @Parameter(name = ApiConstants.TAGS, type = CommandType.STRING, description = "The tags for the network offering.", length = 4096) private String tags; - @Parameter(name = ApiConstants.SPECIFY_VLAN, type = CommandType.BOOLEAN, description = "true if network offering supports vlans") + @Parameter(name = ApiConstants.SPECIFY_VLAN, type = CommandType.BOOLEAN, description = "True if network offering supports VLANs") private Boolean specifyVlan; - @Parameter(name = ApiConstants.AVAILABILITY, type = CommandType.STRING, description = "the availability of network offering. The default value is Optional. " + @Parameter(name = ApiConstants.AVAILABILITY, type = CommandType.STRING, description = "The availability of network offering. The default value is Optional. " + " Another value is Required, which will make it as the default network offering for new networks ") private String availability; - @Parameter(name = ApiConstants.NETWORKRATE, type = CommandType.INTEGER, description = "data transfer rate in megabits per second allowed") + @Parameter(name = ApiConstants.NETWORKRATE, type = CommandType.INTEGER, description = "Data transfer rate in megabits per second allowed") private Integer networkRate; - @Parameter(name = ApiConstants.CONSERVE_MODE, type = CommandType.BOOLEAN, description = "true if the network offering is IP conserve mode enabled") + @Parameter(name = ApiConstants.CONSERVE_MODE, type = CommandType.BOOLEAN, description = "True if the network offering is IP conserve mode enabled") private Boolean conserveMode; @Parameter(name = ApiConstants.SERVICE_OFFERING_ID, type = CommandType.UUID, entityType = ServiceOfferingResponse.class, - description = "the service offering ID used by virtual router provider") + description = "The service offering ID used by virtual router provider") private Long serviceOfferingId; - @Parameter(name = ApiConstants.GUEST_IP_TYPE, type = CommandType.STRING, required = true, description = "guest type of the network offering: Shared or Isolated") + @Parameter(name = ApiConstants.GUEST_IP_TYPE, type = CommandType.STRING, required = true, description = "Guest type of the network offering: Shared or Isolated") private String guestIptype; @Parameter(name = ApiConstants.INTERNET_PROTOCOL, type = CommandType.STRING, - description = "The internet protocol of network offering. Options are ipv4 and dualstack. Default is ipv4. dualstack will create a network offering that supports both IPv4 and IPv6", + description = "The internet protocol of network offering. Options are IPv4 and dualstack. Default is IPv4. dualstack will create a network offering that supports both IPv4 and IPv6", since = "4.17.0") private String internetProtocol; @Parameter(name = ApiConstants.SUPPORTED_SERVICES, type = CommandType.LIST, collectionType = CommandType.STRING, - description = "services supported by the network offering") + description = "Services supported by the network 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") + 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; - @Parameter(name = ApiConstants.SERVICE_CAPABILITY_LIST, type = CommandType.MAP, description = "desired service capabilities as part of network offering") + @Parameter(name = ApiConstants.SERVICE_CAPABILITY_LIST, type = CommandType.MAP, description = "Desired service capabilities as part of network offering") private Map serviceCapabilitystList; @Parameter(name = ApiConstants.SPECIFY_IP_RANGES, type = CommandType.BOOLEAN, - description = "true if network offering supports specifying ip ranges; defaulted to false if not specified") + 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") + description = "True if network offering supports persistent networks; defaulted to false if not specified") private Boolean isPersistent; @Parameter(name = ApiConstants.FOR_VPC, type = CommandType.BOOLEAN, - description = "true if network offering is meant to be used for VPC, false otherwise.") + description = "True if network offering is meant to be used for VPC, false otherwise.") private Boolean forVpc; @Deprecated @@ -160,13 +160,13 @@ public class CreateNetworkOfferingCmd extends BaseCmd { @Parameter(name = ApiConstants.NSX_SUPPORT_LB, type = CommandType.BOOLEAN, - description = "true if network offering for NSX network offering supports Load balancer service.", + description = "True if network offering for NSX network offering supports Load balancer service.", since = "4.20.0") private Boolean nsxSupportsLbService; @Parameter(name = ApiConstants.NSX_SUPPORTS_INTERNAL_LB, type = CommandType.BOOLEAN, - description = "true if network offering for NSX network offering supports Internal Load balancer service.", + description = "True if network offering for NSX network offering supports Internal Load balancer service.", since = "4.20.0") private Boolean nsxSupportsInternalLbService; @@ -178,7 +178,7 @@ public class CreateNetworkOfferingCmd extends BaseCmd { @Parameter(name = ApiConstants.FOR_TUNGSTEN, type = CommandType.BOOLEAN, - description = "true if network offering is meant to be used for Tungsten-Fabric, false otherwise.") + description = "True if network offering is meant to be used for Tungsten-Fabric, false otherwise.") private Boolean forTungsten; @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, since = "4.2.0", description = "Network offering details in key/value pairs." @@ -188,38 +188,38 @@ public class CreateNetworkOfferingCmd extends BaseCmd { @Parameter(name = ApiConstants.EGRESS_DEFAULT_POLICY, type = CommandType.BOOLEAN, - description = "true if guest network default egress policy is allow; false if default egress policy is deny") + description = "True if guest network default egress policy is allow; false if default egress policy is deny") private Boolean egressDefaultPolicy; @Parameter(name = ApiConstants.KEEPALIVE_ENABLED, type = CommandType.BOOLEAN, required = false, - description = "if true keepalive will be turned on in the loadbalancer. At the time of writing this has only an effect on haproxy; the mode http and httpclose options are unset in the haproxy conf file.") + description = "If true keepalive will be turned on in the loadbalancer. At the time of writing this has only an effect on haproxy; the mode http and httpclose options are unset in the haproxy conf file.") private Boolean keepAliveEnabled; @Parameter(name = ApiConstants.MAX_CONNECTIONS, type = CommandType.INTEGER, - description = "maximum number of concurrent connections supported by the network offering") + description = "Maximum number of concurrent connections supported by the Network offering") private Integer maxConnections; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = DomainResponse.class, - description = "the ID of the containing domain(s), null for public offerings") + description = "The ID of the containing domain(s), null for public offerings") private List domainIds; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = ZoneResponse.class, - description = "the ID of the containing zone(s), null for public offerings", + description = "The ID of the containing zone(s), null for public offerings", since = "4.13") private List zoneIds; @Parameter(name = ApiConstants.ENABLE, type = CommandType.BOOLEAN, - description = "set to true if the offering is to be enabled during creation. Default is false", + description = "Set to true if the offering is to be enabled during creation. Default is false", since = "4.16") private Boolean enable; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreatePhysicalNetworkCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreatePhysicalNetworkCmd.java index 7eb52b92456c..f4ce9483bfbd 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreatePhysicalNetworkCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreatePhysicalNetworkCmd.java @@ -36,7 +36,7 @@ import com.cloud.network.PhysicalNetwork; import com.cloud.user.Account; -@APICommand(name = "createPhysicalNetwork", description = "Creates a physical network", responseObject = PhysicalNetworkResponse.class, since = "3.0.0", +@APICommand(name = "createPhysicalNetwork", description = "Creates a physical Network", responseObject = PhysicalNetworkResponse.class, since = "3.0.0", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreatePhysicalNetworkCmd extends BaseAsyncCreateCmd { @@ -49,36 +49,36 @@ public class CreatePhysicalNetworkCmd extends BaseAsyncCreateCmd { type = CommandType.UUID, entityType = ZoneResponse.class, required = true, - description = "the Zone ID for the physical network") + description = "The Zone ID for the physical Network") private Long zoneId; - @Parameter(name = ApiConstants.VLAN, type = CommandType.STRING, description = "the VLAN for the physical network") + @Parameter(name = ApiConstants.VLAN, type = CommandType.STRING, description = "The VLAN for the physical Network") private String vlan; - @Parameter(name = ApiConstants.NETWORK_SPEED, type = CommandType.STRING, description = "the speed for the physical network[1G/10G]") + @Parameter(name = ApiConstants.NETWORK_SPEED, type = CommandType.STRING, description = "The speed for the physical Network[1G/10G]") private String speed; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "domain ID of the account owning a physical network") + description = "Domain ID of the Account owning a physical Network") private Long domainId; @Parameter(name = ApiConstants.BROADCAST_DOMAIN_RANGE, type = CommandType.STRING, - description = "the broadcast domain range for the physical network[Pod or Zone]. In Acton release it can be Zone only in Advance zone, and Pod in Basic") + description = "The broadcast domain range for the physical Network[Pod or Zone]. In Acton release it can be Zone only in Advance zone, and Pod in Basic") private String broadcastDomainRange; - @Parameter(name = ApiConstants.TAGS, type = CommandType.LIST, collectionType = CommandType.STRING, description = "Tag the physical network") + @Parameter(name = ApiConstants.TAGS, type = CommandType.LIST, collectionType = CommandType.STRING, description = "Tag the physical Network") private List tags; @Parameter(name = ApiConstants.ISOLATION_METHODS, type = CommandType.LIST, collectionType = CommandType.STRING, - description = "the isolation method for the physical network[VLAN/L3/GRE]") + description = "The isolation method for the physical Network[VLAN/L3/GRE]") private List isolationMethods; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the physical network") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the physical Network") private String networkName; ///////////////////////////////////////////////////// @@ -139,7 +139,7 @@ public String getCreateEventDescription() { @Override public String getEventDescription() { - return "creating Physical Network. Id: " + getEntityId(); + return "Creating Physical Network. ID: " + getEntityId(); } ///////////////////////////////////////////////////// @@ -148,14 +148,14 @@ public String getEventDescription() { @Override public void execute() { - CallContext.current().setEventDetails("Physical Network Id: " + getEntityId()); + CallContext.current().setEventDetails("Physical Network ID: " + getEntityId()); PhysicalNetwork result = _networkService.getCreatedPhysicalNetwork(getEntityId()); if (result != null) { PhysicalNetworkResponse response = _responseGenerator.createPhysicalNetworkResponse(result); response.setResponseName(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create physical network"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create physical Network"); } } @@ -168,7 +168,7 @@ public void create() throws ResourceAllocationException { setEntityId(result.getId()); setEntityUuid(result.getUuid()); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create physical network entity"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create physical Network entity"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateStorageNetworkIpRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateStorageNetworkIpRangeCmd.java index 42262cc2bf15..439edcbf8f99 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateStorageNetworkIpRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/CreateStorageNetworkIpRangeCmd.java @@ -50,24 +50,24 @@ public class CreateStorageNetworkIpRangeCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = PodResponse.class, required = true, - description = "UUID of pod where the ip range belongs to") + description = "ID of pod where the IP range belongs to") private Long podId; - @Parameter(name = ApiConstants.START_IP, type = CommandType.STRING, required = true, description = "the beginning IP address") + @Parameter(name = ApiConstants.START_IP, type = CommandType.STRING, required = true, description = "The starting IP address") private String startIp; - @Parameter(name = ApiConstants.END_IP, type = CommandType.STRING, description = "the ending IP address") + @Parameter(name = ApiConstants.END_IP, type = CommandType.STRING, description = "The ending IP address") private String endIp; @Parameter(name = ApiConstants.VLAN, type = CommandType.INTEGER, - description = "Optional. The vlan the ip range sits on, default to Null when it is not specified which means your network is not on any Vlan. This is mainly for Vmware as other hypervisors can directly retrieve bridge from physical network traffic type table") + description = "Optional. The VLAN the IP range sits on, default to Null when it is not specified which means your network is not on any VLAN. This is mainly for VMware as other hypervisors can directly retrieve bridge from physical network traffic type table") private Integer vlan; - @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, required = true, description = "the netmask for storage network") + @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, required = true, description = "The netmask for storage network") private String netmask; - @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, required = true, description = "the gateway for storage network") + @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, required = true, description = "The gateway for storage network") private String gateway; ///////////////////////////////////////////////////// @@ -105,7 +105,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Creating storage ip range from " + getStartIp() + " to " + getEndIp() + " with vlan " + getVlan(); + return "Creating storage IP range from " + getStartIp() + " to " + getEndIp() + " with VLAN " + getVlan(); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DedicateGuestVlanRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DedicateGuestVlanRangeCmd.java index 355f738679e0..dcc1fa51dcee 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DedicateGuestVlanRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DedicateGuestVlanRangeCmd.java @@ -44,23 +44,23 @@ public class DedicateGuestVlanRangeCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.VLAN_RANGE, type = CommandType.STRING, required = true, description = "guest vlan range to be dedicated") + @Parameter(name = ApiConstants.VLAN_RANGE, type = CommandType.STRING, required = true, description = "Guest VLAN range to be dedicated") private String vlan; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "account who will own the VLAN") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, 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") + @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, description = "domain ID of the account owning a VLAN") + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Domain ID of the Account owning a VLAN") private Long domainId; @Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, required = true, - description = "physical network ID of the vlan") + description = "Physical Network ID of the VLAN") private Long physicalNetworkId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteManagementNetworkIpRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteManagementNetworkIpRangeCmd.java index 41cf5e518b34..5b50c90b3964 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteManagementNetworkIpRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteManagementNetworkIpRangeCmd.java @@ -116,7 +116,7 @@ public void execute() { logger.warn("Exception: ", ex); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage()); } catch (Exception e) { - logger.warn("Failed to delete management ip range from " + getStartIp() + " to " + getEndIp() + " of Pod: " + getPodId(), e); + logger.warn("Failed to delete management ip range from {} to {} of Pod: {}", getStartIp(), getEndIp(), getPodId(), e); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteNetworkOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteNetworkOfferingCmd.java index e0598b71ea17..a24fc0dc3714 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteNetworkOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteNetworkOfferingCmd.java @@ -40,7 +40,7 @@ public class DeleteNetworkOfferingCmd extends BaseCmd { type = CommandType.UUID, entityType = NetworkOfferingResponse.class, required = true, - description = "the ID of the network offering") + description = "The ID of the network offering") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteNetworkServiceProviderCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteNetworkServiceProviderCmd.java index 4b56612fddaa..23d14966c49b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteNetworkServiceProviderCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteNetworkServiceProviderCmd.java @@ -45,7 +45,7 @@ public class DeleteNetworkServiceProviderCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = ProviderResponse.class, required = true, - description = "the ID of the network service provider") + description = "The ID of the network service provider") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeletePhysicalNetworkCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeletePhysicalNetworkCmd.java index 3233130211c4..70c35716b657 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeletePhysicalNetworkCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeletePhysicalNetworkCmd.java @@ -43,7 +43,7 @@ public class DeletePhysicalNetworkCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, required = true, - description = "the ID of the Physical network") + description = "The ID of the Physical network") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteStorageNetworkIpRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteStorageNetworkIpRangeCmd.java index 454dfba92f20..4ffe58332ebf 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteStorageNetworkIpRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/DeleteStorageNetworkIpRangeCmd.java @@ -46,7 +46,7 @@ public class DeleteStorageNetworkIpRangeCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = StorageNetworkIpRangeResponse.class, required = true, - description = "the uuid of the storage network ip range") + description = "The UUID of the storage network IP range") private Long id; ///////////////////////////////////////////////////// @@ -75,7 +75,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } catch (Exception e) { - logger.warn("Failed to delete storage network ip range " + getId(), e); + logger.warn("Failed to delete storage network ip range {}", getId(), e); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListDedicatedGuestVlanRangesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListDedicatedGuestVlanRangesCmd.java index 0247a3069212..a5edbfdce4a9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListDedicatedGuestVlanRangesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListDedicatedGuestVlanRangesCmd.java @@ -44,33 +44,33 @@ public class ListDedicatedGuestVlanRangesCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestVlanRangeResponse.class, description = "list dedicated guest vlan ranges by id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestVlanRangeResponse.class, description = "List dedicated guest VLAN ranges by ID") private Long id; @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, - description = "the account with which the guest VLAN range is associated. Must be used with the domainId parameter.") + description = "The account with which the guest VLAN range is associated. Must be used with the domainId parameter.") private String accountName; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "project who will own the guest VLAN range") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Project who will own the guest VLAN range") private Long projectId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "the domain ID with which the guest VLAN range is associated. If used with the account parameter, returns all guest VLAN ranges for that account in the specified domain.") + description = "The domain ID with which the guest VLAN range is associated. If used with the account parameter, returns all guest VLAN ranges for that account in the specified domain.") private Long domainId; - @Parameter(name = ApiConstants.GUEST_VLAN_RANGE, type = CommandType.STRING, description = "the dedicated guest vlan range") + @Parameter(name = ApiConstants.GUEST_VLAN_RANGE, type = CommandType.STRING, description = "The dedicated guest vlan range") private String guestVlanRange; @Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, - description = "physical network id of the guest VLAN range") + description = "Physical network ID of the guest VLAN range") private Long physicalNetworkId; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "zone of the guest VLAN range") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "Zone of the guest VLAN range") private Long zoneId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListGuestVlansCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListGuestVlansCmd.java index 4b368f5e0341..80c9540a8486 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListGuestVlansCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListGuestVlansCmd.java @@ -44,19 +44,19 @@ public class ListGuestVlansCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.LONG, required = false, description = "list guest vlan by id") + @Parameter(name = ApiConstants.ID, type = CommandType.LONG, required = false, description = "List guest VLAN by ID") private Long id; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = false, description = "list guest vlan by zone") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = false, description = "List guest VLAN by zone") private Long zoneId; - @Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, required = false, description = "list guest vlan by physical network") + @Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, required = false, description = "List guest VLAN by physical network") private Long physicalNetworkId; - @Parameter(name = ApiConstants.VNET, type = CommandType.STRING, required = false, description = "list guest vlan by vnet") + @Parameter(name = ApiConstants.VNET, type = CommandType.STRING, required = false, description = "List guest VLAN by vnet") private String vnet; - @Parameter(name = ApiConstants.ALLOCATED_ONLY, type = CommandType.BOOLEAN, required = false, description = "limits search results to allocated guest vlan. false by default.") + @Parameter(name = ApiConstants.ALLOCATED_ONLY, type = CommandType.BOOLEAN, required = false, description = "Limits search results to allocated guest VLAN. False by default.") private Boolean allocatedOnly; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListNetworkDeviceCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListNetworkDeviceCmd.java index 768bab641087..ace635376eb4 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListNetworkDeviceCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListNetworkDeviceCmd.java @@ -57,7 +57,7 @@ public class ListNetworkDeviceCmd extends BaseListCmd { description = "Network device type, now supports ExternalDhcp, PxeServer, NetscalerMPXLoadBalancer, NetscalerVPXLoadBalancer, NetscalerSDXLoadBalancer, F5BigIpLoadBalancer, JuniperSRXFirewall, PaloAltoFirewall") private String type; - @Parameter(name = ApiConstants.NETWORK_DEVICE_PARAMETER_LIST, type = CommandType.MAP, description = "parameters for network device") + @Parameter(name = ApiConstants.NETWORK_DEVICE_PARAMETER_LIST, type = CommandType.MAP, description = "Parameters for network device") private Map paramList; public String getDeviceType() { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListNetworkServiceProvidersCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListNetworkServiceProvidersCmd.java index 68495a62215f..95071e41f6c0 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListNetworkServiceProvidersCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListNetworkServiceProvidersCmd.java @@ -44,13 +44,13 @@ public class ListNetworkServiceProvidersCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, description = "the Physical Network ID") + @Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, description = "The Physical Network ID") private Long physicalNetworkId; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list providers by name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "List providers by name") private String name; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "list providers by state") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "List providers by state") private String state; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListNetworksCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListNetworksCmdByAdmin.java index 8df1133d5e7c..bb564f1c3ded 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListNetworksCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListNetworksCmdByAdmin.java @@ -30,7 +30,7 @@ requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListNetworksCmdByAdmin extends ListNetworksCmd implements AdminCmd { - @Parameter(name= ApiConstants.VLAN, type=CommandType.STRING, description="the ID or VID of the network", since = "4.17.0") + @Parameter(name= ApiConstants.VLAN, type=CommandType.STRING, description = "The ID or VID of the network", since = "4.17.0") private String vlan; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListPhysicalNetworksCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListPhysicalNetworksCmd.java index 51a6ddabd9f1..27319ff3d671 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListPhysicalNetworksCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListPhysicalNetworksCmd.java @@ -43,13 +43,13 @@ public class ListPhysicalNetworksCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, description = "list physical network by id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, description = "List physical network by id") private Long id; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID for the physical network") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID for the physical network") private Long zoneId; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "search by name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Search by name") private String networkName; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListStorageNetworkIpRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListStorageNetworkIpRangeCmd.java index 556162ca360d..3e32bed3d500 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListStorageNetworkIpRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListStorageNetworkIpRangeCmd.java @@ -51,19 +51,19 @@ public class ListStorageNetworkIpRangeCmd extends BaseListCmd { @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = StorageNetworkIpRangeResponse.class, - description = "optional parameter. Storaget network IP range uuid, if specicied, using it to search the range.") + description = "Optional parameter. Storage network IP range UUID, if specified, using it to search the range.") private Long rangeId; @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, - description = "optional parameter. Pod uuid, if specicied and range uuid is absent, using it to search the range.") + description = "Optional parameter. Pod UUID, if specified and range UUID is absent, using it to search the range.") private Long podId; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - description = "optional parameter. Zone uuid, if specicied and both pod uuid and range uuid are absent, using it to search the range.") + description = "Optional parameter. Zone UUID, if specified and both pod UUID and range UUID are absent, using it to search the range.") private Long zoneId; ///////////////////////////////////////////////////// @@ -97,7 +97,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE response.setResponseName(getCommandName()); this.setResponseObject(response); } catch (Exception e) { - logger.warn("Failed to list storage network ip range for rangeId=" + getRangeId() + " podId=" + getPodId() + " zoneId=" + getZoneId()); + logger.warn("Failed to list storage Network IP range for rangeId={} podId={} zoneId={}", getRangeId(), getPodId(), getZoneId()); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListSupportedNetworkServicesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListSupportedNetworkServicesCmd.java index 120c6af41ad6..227e9b684526 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListSupportedNetworkServicesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ListSupportedNetworkServicesCmd.java @@ -40,10 +40,10 @@ responseHasSensitiveInfo = false) public class ListSupportedNetworkServicesCmd extends BaseListCmd { - @Parameter(name = ApiConstants.PROVIDER, type = CommandType.STRING, description = "network service provider name") + @Parameter(name = ApiConstants.PROVIDER, type = CommandType.STRING, description = "Network service provider name") private String providerName; - @Parameter(name = ApiConstants.SERVICE, type = CommandType.STRING, description = "network service name to list providers and capabilities of") + @Parameter(name = ApiConstants.SERVICE, type = CommandType.STRING, description = "Network service name to list providers and capabilities of") private String serviceName; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/MigrateNetworkCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/MigrateNetworkCmd.java index 8ef853b99da8..8ac9c8da691d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/MigrateNetworkCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/MigrateNetworkCmd.java @@ -38,7 +38,7 @@ import com.cloud.user.Account; import com.cloud.user.User; -@APICommand(name = "migrateNetwork", description = "moves a network to another physical network", +@APICommand(name = "migrateNetwork", description = "Moves a network to another physical network", responseObject = NetworkResponse.class, responseView = ResponseView.Restricted, entityType = {Network.class}, @@ -53,13 +53,13 @@ public class MigrateNetworkCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, required = true, description = "the ID of the network") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, required = true, description = "The ID of the network") protected Long id; - @Parameter(name = ApiConstants.NETWORK_OFFERING_ID, type = CommandType.UUID, entityType = NetworkOfferingResponse.class, required = true, description = "network offering ID") + @Parameter(name = ApiConstants.NETWORK_OFFERING_ID, type = CommandType.UUID, entityType = NetworkOfferingResponse.class, required = true, description = "Network offering ID") private Long networkOfferingId; - @Parameter(name = ApiConstants.RESUME, type = CommandType.BOOLEAN, description = "true if previous network migration cmd failed") + @Parameter(name = ApiConstants.RESUME, type = CommandType.BOOLEAN, description = "True if previous network migration cmd failed") private Boolean resume; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/MigrateVPCCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/MigrateVPCCmd.java index 3e0801be40b1..edef1f846ed7 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/MigrateVPCCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/MigrateVPCCmd.java @@ -40,7 +40,7 @@ import com.cloud.user.User; @APICommand(name = "migrateVPC", - description = "moves a vpc to another physical network", + description = "Moves a VPC to another physical network", responseObject = VpcResponse.class, responseView = ResponseObject.ResponseView.Restricted, entityType = {Vpc.class}, @@ -56,16 +56,16 @@ public class MigrateVPCCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @ACL(accessType = SecurityChecker.AccessType.OperateEntry) @Parameter(name= ApiConstants.VPC_ID, type=CommandType.UUID, entityType = VpcResponse.class, - required=true, description = "the ID of the vpc") + required=true, description = "The ID of the VPC ") protected Long id; - @Parameter(name = ApiConstants.VPC_OFF_ID, type = CommandType.UUID, entityType = VpcOfferingResponse.class, required=true, description = "vpc offering ID") + @Parameter(name = ApiConstants.VPC_OFF_ID, type = CommandType.UUID, entityType = VpcOfferingResponse.class, required=true, description = "VPC offering ID") private Long vpcOfferingId; - @Parameter(name = ApiConstants.TIER_NETWORK_OFFERINGS, type = CommandType.MAP, description = "network offering ids for each network in the vpc. Example: tierNetworkOfferings[0].networkId=networkId1&tierNetworkOfferings[0].networkOfferingId=newNetworkofferingId1&tierNetworkOfferings[1].networkId=networkId2&tierNetworkOfferings[1].networkOfferingId=newNetworkofferingId2") + @Parameter(name = ApiConstants.TIER_NETWORK_OFFERINGS, type = CommandType.MAP, description = "Network offering IDs for each network in the VPC. Example: tierNetworkOfferings[0].networkId=networkId1&tierNetworkOfferings[0].networkOfferingId=newNetworkofferingId1&tierNetworkOfferings[1].networkId=networkId2&tierNetworkOfferings[1].networkOfferingId=newNetworkofferingId2") private Map> tierNetworkOfferings; - @Parameter(name = ApiConstants.RESUME, type = CommandType.BOOLEAN, description = "true if previous network migration cmd failed") + @Parameter(name = ApiConstants.RESUME, type = CommandType.BOOLEAN, description = "True if previous network migration cmd failed") private Boolean resume; ///////////////////////////////////////////////////// @@ -115,12 +115,12 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to migrate vpc"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to migrate VPC"); } } @Override - public String getEventDescription() { return "Migrating vpc: " + getId() + " to new vpc offering (" + vpcOfferingId + ")"; } + public String getEventDescription() { return "Migrating VPC : " + getId() + " to new VPC offering (" + vpcOfferingId + ")"; } @Override public String getEventType() { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ReleaseDedicatedGuestVlanRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ReleaseDedicatedGuestVlanRangeCmd.java index b3125ec36680..632ff9c6ac7f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ReleaseDedicatedGuestVlanRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/ReleaseDedicatedGuestVlanRangeCmd.java @@ -44,7 +44,7 @@ public class ReleaseDedicatedGuestVlanRangeCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = GuestVlanRangeResponse.class, required = true, - description = "the ID of the dedicated guest vlan range") + description = "The ID of the dedicated guest VLAN range") private Long id; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateNetworkCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateNetworkCmdByAdmin.java index b3088a48840e..5879a998b36e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateNetworkCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateNetworkCmdByAdmin.java @@ -29,7 +29,7 @@ @APICommand(name = "updateNetwork", description = "Updates a network", responseObject = NetworkResponse.class, responseView = ResponseView.Full, entityType = {Network.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdateNetworkCmdByAdmin extends UpdateNetworkCmd implements AdminCmd { - @Parameter(name= ApiConstants.HIDE_IP_ADDRESS_USAGE, type=CommandType.BOOLEAN, description="when true ip address usage for the network will not be exported by the listUsageRecords API") + @Parameter(name= ApiConstants.HIDE_IP_ADDRESS_USAGE, type=CommandType.BOOLEAN, description = "When true IP address usage for the Network will not be exported by the listUsageRecords API") private Boolean hideIpAddressUsage; public Boolean getHideIpAddressUsage() { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateNetworkOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateNetworkOfferingCmd.java index 75fb45e1f115..9af10262b2d5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateNetworkOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateNetworkOfferingCmd.java @@ -43,47 +43,47 @@ public class UpdateNetworkOfferingCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkOfferingResponse.class, description = "the id of the network offering") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkOfferingResponse.class, description = "The ID of the network offering") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the network offering") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the network offering") private String networkOfferingName; - @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "the display text of the network offering") + @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The display text of the network offering") private String displayText; - @Parameter(name = ApiConstants.AVAILABILITY, type = CommandType.STRING, description = "the availability of network offering." + @Parameter(name = ApiConstants.AVAILABILITY, type = CommandType.STRING, description = "The availability of network offering." + " The value is Required makes this network offering default for Guest Virtual Networks. Only one network offering can have the value Required ") private String availability; - @Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "sort key of the network offering, integer") + @Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "Sort key of the network offering, integer") private Integer sortKey; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "update state for the network offering") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "Update state for the network offering") private String state; @Parameter(name = ApiConstants.KEEPALIVE_ENABLED, type = CommandType.BOOLEAN, required = false, - description = "if true keepalive will be turned on in the loadbalancer. At the time of writing this has only an effect on haproxy; the mode http and httpclose options are unset in the haproxy conf file.") + description = "If true keepalive will be turned on in the loadbalancer. At the time of writing this has only an effect on haproxy; the mode http and httpclose options are unset in the haproxy conf file.") private Boolean keepAliveEnabled; @Parameter(name = ApiConstants.MAX_CONNECTIONS, type = CommandType.INTEGER, - description = "maximum number of concurrent connections supported by the network offering") + description = "Maximum number of concurrent connections supported by the network offering") private Integer maxConnections; - @Parameter(name = ApiConstants.TAGS, type = CommandType.STRING, description = "the tags for the network offering.", length = 4096) + @Parameter(name = ApiConstants.TAGS, type = CommandType.STRING, description = "The tags for the network offering.", length = 4096) private String tags; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.STRING, - description = "the ID of the containing domain(s) as comma separated string, public for public offerings") + description = "The ID of the containing domain(s) as comma separated string, public for public offerings") private String domainIds; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.STRING, - description = "the ID of the containing zone(s) as comma separated string, all for all zones offerings", + description = "The ID of the containing zone(s) as comma separated string, all for all zones offerings", since = "4.13", length = 4096) private String zoneIds; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateNetworkServiceProviderCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateNetworkServiceProviderCmd.java index b4801d9368eb..db57abad2489 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateNetworkServiceProviderCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateNetworkServiceProviderCmd.java @@ -47,13 +47,13 @@ public class UpdateNetworkServiceProviderCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "Enabled/Disabled/Shutdown the physical network service provider") private String state; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProviderResponse.class, required = true, description = "network service provider id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProviderResponse.class, required = true, description = "Network service provider ID") private Long id; @Parameter(name = ApiConstants.SERVICE_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, - description = "the list of services to be enabled for this physical network service provider") + description = "The list of services to be enabled for this physical network service provider") private List enabledServices; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdatePhysicalNetworkCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdatePhysicalNetworkCmd.java index 162116470bd5..a9ad46fdd78f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdatePhysicalNetworkCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdatePhysicalNetworkCmd.java @@ -38,19 +38,19 @@ public class UpdatePhysicalNetworkCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, required = true, description = "physical network id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, required = true, description = "Physical Network ID") private Long id; - @Parameter(name = ApiConstants.NETWORK_SPEED, type = CommandType.STRING, description = "the speed for the physical network[1G/10G]") + @Parameter(name = ApiConstants.NETWORK_SPEED, type = CommandType.STRING, description = "The speed for the physical Network[1G/10G]") private String speed; - @Parameter(name = ApiConstants.TAGS, type = CommandType.LIST, collectionType = CommandType.STRING, description = "Tag the physical network") + @Parameter(name = ApiConstants.TAGS, type = CommandType.LIST, collectionType = CommandType.STRING, description = "Tag the physical Network") private List tags; @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "Enabled/Disabled") private String state; - @Parameter(name = ApiConstants.VLAN, type = CommandType.STRING, description = "the VLAN for the physical network") + @Parameter(name = ApiConstants.VLAN, type = CommandType.STRING, description = "The VLAN for the physical Network") private String vlan; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdatePodManagementNetworkIpRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdatePodManagementNetworkIpRangeCmd.java index 6f90a070f0d1..394d42a65a3a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdatePodManagementNetworkIpRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdatePodManagementNetworkIpRangeCmd.java @@ -139,7 +139,7 @@ public void execute() { logger.warn("Exception: ", ex); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage()); } catch (Exception e) { - logger.warn("Failed to update pod management IP range " + getNewStartIP() + "-" + getNewEndIP() + " of Pod: " + getPodId(), e); + logger.warn("Failed to update pod management IP range {}-{} of Pod: {}", getNewStartIP(), getNewEndIP(), getPodId(), e); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateStorageNetworkIpRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateStorageNetworkIpRangeCmd.java index 65e2437417de..a1f4d2ed1002 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateStorageNetworkIpRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/network/UpdateStorageNetworkIpRangeCmd.java @@ -51,16 +51,16 @@ public class UpdateStorageNetworkIpRangeCmd extends BaseAsyncCmd { description = "UUID of storage network ip range") private Long id; - @Parameter(name = ApiConstants.START_IP, type = CommandType.STRING, description = "the beginning IP address") + @Parameter(name = ApiConstants.START_IP, type = CommandType.STRING, description = "The beginning IP address") private String startIp; - @Parameter(name = ApiConstants.END_IP, type = CommandType.STRING, description = "the ending IP address") + @Parameter(name = ApiConstants.END_IP, type = CommandType.STRING, description = "The ending IP address") private String endIp; @Parameter(name = ApiConstants.VLAN, type = CommandType.INTEGER, description = "Optional. the vlan the ip range sits on") private Integer vlan; - @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, description = "the netmask for storage network") + @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, description = "The netmask for storage network") private String netmask; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java index 557c76d63c36..e1ff90e4bd89 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/CreateDiskOfferingCmd.java @@ -52,106 +52,105 @@ public class CreateDiskOfferingCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.DISK_SIZE, type = CommandType.LONG, required = false, description = "size of the disk offering in GB (1GB = 1,073,741,824 bytes)") + @Parameter(name = ApiConstants.DISK_SIZE, type = CommandType.LONG, required = false, description = "Size of the disk offering in GB (1GB = 1,073,741,824 bytes)") private Long diskSize; @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "An alternate display text of the disk offering, defaults to 'name'.", length = 4096) private String displayText; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "name of the disk offering") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "Name of the disk offering") private String offeringName; - @Parameter(name = ApiConstants.TAGS, type = CommandType.STRING, description = "tags for the disk offering", length = 4096) + @Parameter(name = ApiConstants.TAGS, type = CommandType.STRING, description = "Tags for the disk offering", length = 4096) private String tags; - @Parameter(name = ApiConstants.CUSTOMIZED, type = CommandType.BOOLEAN, description = "whether disk offering size is custom or not") + @Parameter(name = ApiConstants.CUSTOMIZED, type = CommandType.BOOLEAN, description = "Whether disk offering size is custom or not") private Boolean customized; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = DomainResponse.class, - description = "the ID of the containing domain(s), null for public offerings") + description = "The ID of the containing domain(s), null for public offerings") private List domainIds; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = ZoneResponse.class, - description = "the ID of the containing zone(s), null for public offerings", + description = "The ID of the containing zone(s), null for public offerings", since = "4.13") private List zoneIds; - @Parameter(name = ApiConstants.STORAGE_TYPE, type = CommandType.STRING, description = "the storage type of the disk offering. Values are local and shared.") + @Parameter(name = ApiConstants.STORAGE_TYPE, type = CommandType.STRING, description = "The storage type of the disk offering. Values are local and shared.") private String storageType = ServiceOffering.StorageType.shared.toString(); @Parameter(name = ApiConstants.PROVISIONINGTYPE, type = CommandType.STRING, - description = "provisioning type used to create volumes. Valid values are thin, sparse, fat.") + description = "Provisioning type used to create volumes. Valid values are thin, sparse, fat.") private String provisioningType = ProvisioningType.THIN.toString(); @Parameter(name = ApiConstants.DISPLAY_OFFERING, type = CommandType.BOOLEAN, - description = "an optional field, whether to display the offering to the end user or not.") + description = "An optional field, whether to display the offering to the end user or not.") private Boolean displayOffering; - @Parameter(name = ApiConstants.BYTES_READ_RATE, type = CommandType.LONG, required = false, description = "bytes read rate of the disk offering") + @Parameter(name = ApiConstants.BYTES_READ_RATE, type = CommandType.LONG, required = false, description = "Bytes read rate of the disk offering") private Long bytesReadRate; - @Parameter(name = ApiConstants.BYTES_READ_RATE_MAX, type = CommandType.LONG, required = false, description = "burst bytes read rate of the disk offering") + @Parameter(name = ApiConstants.BYTES_READ_RATE_MAX, type = CommandType.LONG, required = false, description = "Burst bytes read rate of the disk offering") private Long bytesReadRateMax; - @Parameter(name = ApiConstants.BYTES_READ_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "length (in seconds) of the burst") + @Parameter(name = ApiConstants.BYTES_READ_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "Length (in seconds) of the burst") private Long bytesReadRateMaxLength; - @Parameter(name = ApiConstants.BYTES_WRITE_RATE, type = CommandType.LONG, required = false, description = "bytes write rate of the disk offering") + @Parameter(name = ApiConstants.BYTES_WRITE_RATE, type = CommandType.LONG, required = false, description = "Bytes write rate of the disk offering") private Long bytesWriteRate; - @Parameter(name = ApiConstants.BYTES_WRITE_RATE_MAX, type = CommandType.LONG, required = false, description = "burst bytes write rate of the disk offering") + @Parameter(name = ApiConstants.BYTES_WRITE_RATE_MAX, type = CommandType.LONG, required = false, description = "Burst bytes write rate of the disk offering") private Long bytesWriteRateMax; - @Parameter(name = ApiConstants.BYTES_WRITE_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "length (in seconds) of the burst") + @Parameter(name = ApiConstants.BYTES_WRITE_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "Length (in seconds) of the burst") private Long bytesWriteRateMaxLength; - @Parameter(name = ApiConstants.IOPS_READ_RATE, type = CommandType.LONG, required = false, description = "io requests read rate of the disk offering") + @Parameter(name = ApiConstants.IOPS_READ_RATE, type = CommandType.LONG, required = false, description = "I/O requests read rate of the disk offering") private Long iopsReadRate; - @Parameter(name = ApiConstants.IOPS_READ_RATE_MAX, type = CommandType.LONG, required = false, description = "burst requests read rate of the disk offering") + @Parameter(name = ApiConstants.IOPS_READ_RATE_MAX, type = CommandType.LONG, required = false, description = "Burst requests read rate of the disk offering") private Long iopsReadRateMax; - @Parameter(name = ApiConstants.IOPS_READ_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "length (in seconds) of the burst") + @Parameter(name = ApiConstants.IOPS_READ_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "Length (in seconds) of the burst") private Long iopsReadRateMaxLength; - @Parameter(name = ApiConstants.IOPS_WRITE_RATE, type = CommandType.LONG, required = false, description = "io requests write rate of the disk offering") + @Parameter(name = ApiConstants.IOPS_WRITE_RATE, type = CommandType.LONG, required = false, description = "I/O requests write rate of the disk offering") private Long iopsWriteRate; - @Parameter(name = ApiConstants.IOPS_WRITE_RATE_MAX, type = CommandType.LONG, required = false, description = "burst io requests write rate of the disk offering") + @Parameter(name = ApiConstants.IOPS_WRITE_RATE_MAX, type = CommandType.LONG, required = false, description = "Burst I/O requests write rate of the disk offering") private Long iopsWriteRateMax; - @Parameter(name = ApiConstants.IOPS_WRITE_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "length (in seconds) of the burst") + @Parameter(name = ApiConstants.IOPS_WRITE_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "Length (in seconds) of the burst") private Long iopsWriteRateMaxLength; - @Parameter(name = ApiConstants.CUSTOMIZED_IOPS, type = CommandType.BOOLEAN, required = false, description = "whether disk offering iops is custom or not") + @Parameter(name = ApiConstants.CUSTOMIZED_IOPS, type = CommandType.BOOLEAN, required = false, description = "Whether disk offering IOPS is custom or not") private Boolean customizedIops; - @Parameter(name = ApiConstants.MIN_IOPS, type = CommandType.LONG, required = false, description = "min iops of the disk offering") + @Parameter(name = ApiConstants.MIN_IOPS, type = CommandType.LONG, required = false, description = "Min IOPS of the disk offering") private Long minIops; - @Parameter(name = ApiConstants.MAX_IOPS, type = CommandType.LONG, required = false, description = "max iops of the disk offering") + @Parameter(name = ApiConstants.MAX_IOPS, type = CommandType.LONG, required = false, description = "Max IOPS of the disk offering") private Long maxIops; @Parameter(name = ApiConstants.HYPERVISOR_SNAPSHOT_RESERVE, type = CommandType.INTEGER, required = false, - description = "Hypervisor snapshot reserve space as a percent of a volume (for managed storage using Xen or VMware)") + description = "Hypervisor Snapshot reserve space as a percent of a volume (for managed storage using Xen or VMware)") private Integer hypervisorSnapshotReserve; @Parameter(name = ApiConstants.CACHE_MODE, type = CommandType.STRING, - required = false, - description = "the cache mode to use for this disk offering. none, writeback, writethrough or hypervisor default. If the hypervisor default cache mode is used on other hypervisors than KVM, it will fall back to none cache mode", + description = "The cache mode to use for this disk offering. none, writeback, writethrough or hypervisor default. If the hypervisor default cache mode is used on other hypervisors than KVM, it will fall back to none cache mode", since = "4.14") private String cacheMode; @@ -164,7 +163,7 @@ public class CreateDiskOfferingCmd extends BaseCmd { @Parameter(name = ApiConstants.ENCRYPT, type = CommandType.BOOLEAN, required=false, description = "Volumes using this offering should be encrypted", since = "4.18") private Boolean encrypt; - @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "details to specify disk offering parameters", since = "4.16") + @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "Details to specify disk offering parameters", since = "4.16") private Map details; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java index ec109a2a4f37..4363d6861ba1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/CreateServiceOfferingCmd.java @@ -54,143 +54,142 @@ public class CreateServiceOfferingCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.CPU_NUMBER, type = CommandType.INTEGER, required = false, description = "the CPU number of the service offering") + @Parameter(name = ApiConstants.CPU_NUMBER, type = CommandType.INTEGER, required = false, description = "The CPU number of the service offering") private Integer cpuNumber; @Parameter(name = ApiConstants.CPU_SPEED, type = CommandType.INTEGER, required = false, description = "For VMware and Xen based hypervisors this is the CPU speed of the service offering in MHz.\n" + "For the KVM hypervisor," + " the values of the parameters cpuSpeed and cpuNumber will be used to calculate the `shares` value. This value is used by the KVM hypervisor to calculate how much time" + - " the VM will have access to the host's CPU. The `shares` value does not have a unit, and its purpose is being a weight value for the host to compare between its guest" + - " VMs. For more information, see https://libvirt.org/formatdomain.html#cpu-tuning.") + " the Instance will have access to the host's CPU. The `shares` value does not have a unit, and its purpose is being a weight value for the host to compare between its guest" + + " Instances. For more information, see https://libvirt.org/formatdomain.html#cpu-tuning.") private Integer cpuSpeed; @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The display text of the service offering, defaults to 'name'.") private String displayText; - @Parameter(name = ApiConstants.PROVISIONINGTYPE, type = CommandType.STRING, description = "provisioning type used to create volumes. Valid values are thin, sparse, fat.") + @Parameter(name = ApiConstants.PROVISIONINGTYPE, type = CommandType.STRING, description = "Provisioning type used to create volumes. Valid values are thin, sparse, fat.") private String provisioningType = Storage.ProvisioningType.THIN.toString(); - @Parameter(name = ApiConstants.MEMORY, type = CommandType.INTEGER, required = false, description = "the total memory of the service offering in MB") + @Parameter(name = ApiConstants.MEMORY, type = CommandType.INTEGER, required = false, description = "The total memory of the service offering in MB") private Integer memory; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the service offering") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the service offering") private String serviceOfferingName; - @Parameter(name = ApiConstants.OFFER_HA, type = CommandType.BOOLEAN, description = "the HA for the service offering") + @Parameter(name = ApiConstants.OFFER_HA, type = CommandType.BOOLEAN, description = "The HA for the service offering") private Boolean offerHa; - @Parameter(name = ApiConstants.LIMIT_CPU_USE, type = CommandType.BOOLEAN, description = "restrict the CPU usage to committed service offering") + @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") + description = "True if the Instance needs to be volatile so that on every reboot, the original root disk is detached, then destroyed and a fresh root disk is created and attached to the Instance") private Boolean isVolatile; - @Parameter(name = ApiConstants.STORAGE_TYPE, type = CommandType.STRING, description = "the storage type of the service offering. Values are local and shared.") + @Parameter(name = ApiConstants.STORAGE_TYPE, type = CommandType.STRING, description = "The storage type of the service offering. Values are local and shared.") private String storageType; - @Parameter(name = ApiConstants.TAGS, type = CommandType.STRING, description = "the tags for this service offering.") + @Parameter(name = ApiConstants.TAGS, type = CommandType.STRING, description = "The tags for this service offering.") private String tags; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = DomainResponse.class, - description = "the ID of the containing domain(s), null for public offerings") + description = "The ID of the containing domain(s), null for public offerings") private List domainIds; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = ZoneResponse.class, - description = "the ID of the containing zone(s), null for public offerings", + description = "The ID of the containing zone(s), null for public offerings", since = "4.13") private List zoneIds; - @Parameter(name = ApiConstants.HOST_TAGS, type = CommandType.STRING, description = "the host tag for this service offering.") + @Parameter(name = ApiConstants.HOST_TAGS, type = CommandType.STRING, description = "The host tag for this service offering.") private String hostTag; - @Parameter(name = ApiConstants.IS_SYSTEM_OFFERING, type = CommandType.BOOLEAN, description = "is this a system vm offering") + @Parameter(name = ApiConstants.IS_SYSTEM_OFFERING, type = CommandType.BOOLEAN, description = "Is this a system vm offering") private Boolean isSystem; @Parameter(name = ApiConstants.SYSTEM_VM_TYPE, type = CommandType.STRING, - description = "the system VM type. Possible types are \"domainrouter\", \"consoleproxy\" and \"secondarystoragevm\".") + description = "The system VM type. Possible types are \"domainrouter\", \"consoleproxy\" and \"secondarystoragevm\".") private String systemVmType; @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") + 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. If null, value of global config vm.deployment.planner is used") + description = "The deployment planner heuristics used to deploy an Instance of this offering. If null, value of global config vm.deployment.planner is used") private String deploymentPlanner; - @Parameter(name = ApiConstants.SERVICE_OFFERING_DETAILS, type = CommandType.MAP, description = "details for planner, used to store specific parameters") + @Parameter(name = ApiConstants.SERVICE_OFFERING_DETAILS, type = CommandType.MAP, description = "Details for planner, used to store specific parameters") private Map details; - @Parameter(name = ApiConstants.ROOT_DISK_SIZE, type = CommandType.LONG, since = "4.15", description = "the Root disk size in GB.") + @Parameter(name = ApiConstants.ROOT_DISK_SIZE, type = CommandType.LONG, since = "4.15", description = "The Root disk size in GB.") private Long rootDiskSize; - @Parameter(name = ApiConstants.BYTES_READ_RATE, type = CommandType.LONG, required = false, description = "bytes read rate of the disk offering") + @Parameter(name = ApiConstants.BYTES_READ_RATE, type = CommandType.LONG, required = false, description = "Bytes read rate of the disk offering") private Long bytesReadRate; - @Parameter(name = ApiConstants.BYTES_READ_RATE_MAX, type = CommandType.LONG, required = false, description = "burst bytes read rate of the disk offering") + @Parameter(name = ApiConstants.BYTES_READ_RATE_MAX, type = CommandType.LONG, required = false, description = "Burst bytes read rate of the disk offering") private Long bytesReadRateMax; - @Parameter(name = ApiConstants.BYTES_READ_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "length (in seconds) of the burst") + @Parameter(name = ApiConstants.BYTES_READ_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "Length (in seconds) of the burst") private Long bytesReadRateMaxLength; - @Parameter(name = ApiConstants.BYTES_WRITE_RATE, type = CommandType.LONG, required = false, description = "bytes write rate of the disk offering") + @Parameter(name = ApiConstants.BYTES_WRITE_RATE, type = CommandType.LONG, required = false, description = "Bytes write rate of the disk offering") private Long bytesWriteRate; - @Parameter(name = ApiConstants.BYTES_WRITE_RATE_MAX, type = CommandType.LONG, required = false, description = "burst bytes write rate of the disk offering") + @Parameter(name = ApiConstants.BYTES_WRITE_RATE_MAX, type = CommandType.LONG, required = false, description = "Burst bytes write rate of the disk offering") private Long bytesWriteRateMax; - @Parameter(name = ApiConstants.BYTES_WRITE_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "length (in seconds) of the burst") + @Parameter(name = ApiConstants.BYTES_WRITE_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "Length (in seconds) of the burst") private Long bytesWriteRateMaxLength; - @Parameter(name = ApiConstants.IOPS_READ_RATE, type = CommandType.LONG, required = false, description = "io requests read rate of the disk offering") + @Parameter(name = ApiConstants.IOPS_READ_RATE, type = CommandType.LONG, required = false, description = "I/O requests read rate of the disk offering") private Long iopsReadRate; - @Parameter(name = ApiConstants.IOPS_READ_RATE_MAX, type = CommandType.LONG, required = false, description = "burst requests read rate of the disk offering") + @Parameter(name = ApiConstants.IOPS_READ_RATE_MAX, type = CommandType.LONG, required = false, description = "Burst requests read rate of the disk offering") private Long iopsReadRateMax; - @Parameter(name = ApiConstants.IOPS_READ_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "length (in seconds) of the burst") + @Parameter(name = ApiConstants.IOPS_READ_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "Length (in seconds) of the burst") private Long iopsReadRateMaxLength; - @Parameter(name = ApiConstants.IOPS_WRITE_RATE, type = CommandType.LONG, required = false, description = "io requests write rate of the disk offering") + @Parameter(name = ApiConstants.IOPS_WRITE_RATE, type = CommandType.LONG, required = false, description = "I/O requests write rate of the disk offering") private Long iopsWriteRate; - @Parameter(name = ApiConstants.IOPS_WRITE_RATE_MAX, type = CommandType.LONG, required = false, description = "burst io requests write rate of the disk offering") + @Parameter(name = ApiConstants.IOPS_WRITE_RATE_MAX, type = CommandType.LONG, required = false, description = "Burst io requests write rate of the disk offering") private Long iopsWriteRateMax; - @Parameter(name = ApiConstants.IOPS_WRITE_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "length (in seconds) of the burst") + @Parameter(name = ApiConstants.IOPS_WRITE_RATE_MAX_LENGTH, type = CommandType.LONG, required = false, description = "Length (in seconds) of the burst") private Long iopsWriteRateMaxLength; - @Parameter(name = ApiConstants.CUSTOMIZED_IOPS, type = CommandType.BOOLEAN, required = false, description = "whether compute offering iops is custom or not", since = "4.4") + @Parameter(name = ApiConstants.CUSTOMIZED_IOPS, type = CommandType.BOOLEAN, required = false, description = "Whether compute offering iops is custom or not", since = "4.4") private Boolean customizedIops; - @Parameter(name = ApiConstants.MIN_IOPS, type = CommandType.LONG, required = false, description = "min iops of the compute offering", since = "4.4") + @Parameter(name = ApiConstants.MIN_IOPS, type = CommandType.LONG, required = false, description = "Min iops of the compute offering", since = "4.4") private Long minIops; - @Parameter(name = ApiConstants.MAX_IOPS, type = CommandType.LONG, required = false, description = "max iops of the compute offering", since = "4.4") + @Parameter(name = ApiConstants.MAX_IOPS, type = CommandType.LONG, required = false, description = "Max iops of the compute offering", since = "4.4") private Long maxIops; @Parameter(name = ApiConstants.HYPERVISOR_SNAPSHOT_RESERVE, type = CommandType.INTEGER, required = false, - description = "Hypervisor snapshot reserve space as a percent of a volume (for managed storage using Xen or VMware)", + description = "Hypervisor Snapshot reserve space as a percent of a volume (for managed storage using Xen or VMware)", since = "4.4") private Integer hypervisorSnapshotReserve; @Parameter(name = ApiConstants.CACHE_MODE, type = CommandType.STRING, - required = false, - description = "the cache mode to use for this disk offering. none, writeback, writethrough or hypervisor default. If the hypervisor default cache mode is used on other hypervisors than KVM, it will fall back to none cache mode", + description = "The cache mode to use for this disk offering. none, writeback, writethrough or hypervisor default. If the hypervisor default cache mode is used on other hypervisors than KVM, it will fall back to none cache mode", since = "4.14") private String cacheMode; @@ -229,14 +228,14 @@ public class CreateServiceOfferingCmd extends BaseCmd { private Long storagePolicy; @Parameter(name = ApiConstants.DYNAMIC_SCALING_ENABLED, type = CommandType.BOOLEAN, since = "4.16", - description = "true if virtual machine needs to be dynamically scalable of cpu or memory") + description = "True if Instance needs to be dynamically scalable of cpu or memory") protected Boolean isDynamicScalingEnabled; @Parameter(name = ApiConstants.DISK_OFFERING_ID, required = false, type = CommandType.UUID, entityType = DiskOfferingResponse.class, - description = "the ID of the disk offering to which service offering should be mapped", + description = "The ID of the disk offering to which service offering should be mapped", since = "4.17") private Long diskOfferingId; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/DeleteServiceOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/DeleteServiceOfferingCmd.java index 19203289d104..d08b4f144c26 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/DeleteServiceOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/DeleteServiceOfferingCmd.java @@ -40,7 +40,7 @@ public class DeleteServiceOfferingCmd extends BaseCmd { type = CommandType.UUID, entityType = ServiceOfferingResponse.class, required = true, - description = "the ID of the service offering") + description = "The ID of the service offering") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/UpdateDiskOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/UpdateDiskOfferingCmd.java index 370453804cfc..2f07f85f9836 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/UpdateDiskOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/UpdateDiskOfferingCmd.java @@ -47,80 +47,80 @@ public class UpdateDiskOfferingCmd extends BaseCmd { @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, - description = "updates alternate display text of the disk offering with this value", + description = "Updates alternate display text of the disk offering with this value", length = 4096) private String displayText; @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DiskOfferingResponse.class, required = true, description = "ID of the disk offering") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "updates name of the disk offering with this value") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Updates name of the disk offering with this value") private String diskOfferingName; - @Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "sort key of the disk offering, integer") + @Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "Sort key of the disk offering, integer") private Integer sortKey; @Parameter(name = ApiConstants.DISPLAY_OFFERING, type = CommandType.BOOLEAN, - description = "an optional field, whether to display the offering to the end user or not.") + description = "An optional field, whether to display the offering to the end user or not.") private Boolean displayOffering; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.STRING, - description = "the ID of the containing domain(s) as comma separated string, public for public offerings", + description = "The ID of the containing domain(s) as comma separated string, public for public offerings", since = "4.13", length = 4096) private String domainIds; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.STRING, - description = "the ID of the containing zone(s) as comma separated string, all for all zones offerings", + description = "The ID of the containing zone(s) as comma separated string, all for all zones offerings", since = "4.13") private String zoneIds; @Parameter(name = ApiConstants.TAGS, type = CommandType.STRING, - description = "comma-separated list of tags for the disk offering, tags should match with existing storage pool tags", + description = "Comma-separated list of tags for the disk offering, tags should match with existing storage pool tags", since = "4.15") private String tags; - @Parameter(name = ApiConstants.BYTES_READ_RATE, type = CommandType.LONG, description = "bytes read rate of the disk offering", since = "4.15") + @Parameter(name = ApiConstants.BYTES_READ_RATE, type = CommandType.LONG, description = "Bytes read rate of the disk offering", since = "4.15") private Long bytesReadRate; - @Parameter(name = ApiConstants.BYTES_READ_RATE_MAX, type = CommandType.LONG, description = "burst bytes read rate of the disk offering", since = "4.15") + @Parameter(name = ApiConstants.BYTES_READ_RATE_MAX, type = CommandType.LONG, description = "Burst bytes read rate of the disk offering", since = "4.15") private Long bytesReadRateMax; - @Parameter(name = ApiConstants.BYTES_READ_RATE_MAX_LENGTH, type = CommandType.LONG, description = "length (in seconds) of the burst", since = "4.15") + @Parameter(name = ApiConstants.BYTES_READ_RATE_MAX_LENGTH, type = CommandType.LONG, description = "Length (in seconds) of the burst", since = "4.15") private Long bytesReadRateMaxLength; - @Parameter(name = ApiConstants.BYTES_WRITE_RATE, type = CommandType.LONG, description = "bytes write rate of the disk offering", since = "4.15") + @Parameter(name = ApiConstants.BYTES_WRITE_RATE, type = CommandType.LONG, description = "Bytes write rate of the disk offering", since = "4.15") private Long bytesWriteRate; - @Parameter(name = ApiConstants.BYTES_WRITE_RATE_MAX, type = CommandType.LONG, description = "burst bytes write rate of the disk offering", since = "4.15") + @Parameter(name = ApiConstants.BYTES_WRITE_RATE_MAX, type = CommandType.LONG, description = "Burst bytes write rate of the disk offering", since = "4.15") private Long bytesWriteRateMax; - @Parameter(name = ApiConstants.BYTES_WRITE_RATE_MAX_LENGTH, type = CommandType.LONG, description = "length (in seconds) of the burst", since = "4.15") + @Parameter(name = ApiConstants.BYTES_WRITE_RATE_MAX_LENGTH, type = CommandType.LONG, description = "Length (in seconds) of the burst", since = "4.15") private Long bytesWriteRateMaxLength; - @Parameter(name = ApiConstants.IOPS_READ_RATE, type = CommandType.LONG, description = "io requests read rate of the disk offering", since = "4.15") + @Parameter(name = ApiConstants.IOPS_READ_RATE, type = CommandType.LONG, description = "I/O requests read rate of the disk offering", since = "4.15") private Long iopsReadRate; - @Parameter(name = ApiConstants.IOPS_READ_RATE_MAX, type = CommandType.LONG, description = "burst requests read rate of the disk offering", since = "4.15") + @Parameter(name = ApiConstants.IOPS_READ_RATE_MAX, type = CommandType.LONG, description = "Burst requests read rate of the disk offering", since = "4.15") private Long iopsReadRateMax; - @Parameter(name = ApiConstants.IOPS_READ_RATE_MAX_LENGTH, type = CommandType.LONG, description = "length (in seconds) of the burst", since = "4.15") + @Parameter(name = ApiConstants.IOPS_READ_RATE_MAX_LENGTH, type = CommandType.LONG, description = "Length (in seconds) of the burst", since = "4.15") private Long iopsReadRateMaxLength; - @Parameter(name = ApiConstants.IOPS_WRITE_RATE, type = CommandType.LONG, description = "io requests write rate of the disk offering", since = "4.15") + @Parameter(name = ApiConstants.IOPS_WRITE_RATE, type = CommandType.LONG, description = "I/O requests write rate of the disk offering", since = "4.15") private Long iopsWriteRate; - @Parameter(name = ApiConstants.IOPS_WRITE_RATE_MAX, type = CommandType.LONG, description = "burst io requests write rate of the disk offering", since = "4.15") + @Parameter(name = ApiConstants.IOPS_WRITE_RATE_MAX, type = CommandType.LONG, description = "Burst io requests write rate of the disk offering", since = "4.15") private Long iopsWriteRateMax; - @Parameter(name = ApiConstants.IOPS_WRITE_RATE_MAX_LENGTH, type = CommandType.LONG, description = "length (in seconds) of the burst", since = "4.15") + @Parameter(name = ApiConstants.IOPS_WRITE_RATE_MAX_LENGTH, type = CommandType.LONG, description = "Length (in seconds) of the burst", since = "4.15") private Long iopsWriteRateMaxLength; - @Parameter(name = ApiConstants.CACHE_MODE, type = CommandType.STRING, description = "the cache mode to use for this disk offering", since = "4.15") + @Parameter(name = ApiConstants.CACHE_MODE, type = CommandType.STRING, description = "The cache mode to use for this disk offering", since = "4.15") private String cacheMode; @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "state of the disk offering") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/UpdateServiceOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/UpdateServiceOfferingCmd.java index 9d973dfc524b..4027662574ab 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/UpdateServiceOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/offering/UpdateServiceOfferingCmd.java @@ -49,39 +49,39 @@ public class UpdateServiceOfferingCmd extends BaseCmd { type = CommandType.UUID, entityType = ServiceOfferingResponse.class, required = true, - description = "the ID of the service offering to be updated") + description = "The ID of the service offering to be updated") private Long id; - @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "the display text of the service offering to be updated") + @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The display text of the service offering to be updated") private String displayText; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the service offering to be updated") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the service offering to be updated") private String serviceOfferingName; - @Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "sort key of the service offering, integer") + @Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "Sort key of the service offering, integer") private Integer sortKey; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.STRING, - description = "the ID of the containing domain(s) as comma separated string, public for public offerings", + description = "The ID of the containing domain(s) as comma separated string, public for public offerings", length = 4096) private String domainIds; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.STRING, - description = "the ID of the containing zone(s) as comma separated string, all for all zones offerings", + description = "The ID of the containing zone(s) as comma separated string, all for all zones offerings", since = "4.13") private String zoneIds; @Parameter(name = ApiConstants.STORAGE_TAGS, type = CommandType.STRING, - description = "comma-separated list of tags for the service offering, tags should match with existing storage pool tags", + description = "Comma-separated list of tags for the service offering, tags should match with existing storage pool tags", since = "4.16") private String storageTags; @Parameter(name = ApiConstants.HOST_TAGS, type = CommandType.STRING, - description = "the host tag for this service offering.", + description = "The host tag for this service offering.", since = "4.16") private String hostTags; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/ChangeOutOfBandManagementPasswordCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/ChangeOutOfBandManagementPasswordCmd.java index e2c31d6cf072..b22697768681 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/ChangeOutOfBandManagementPasswordCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/ChangeOutOfBandManagementPasswordCmd.java @@ -53,10 +53,10 @@ public class ChangeOutOfBandManagementPasswordCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, - validations = {ApiArgValidator.PositiveNumber}, description = "the ID of the host") + validations = {ApiArgValidator.PositiveNumber}, description = "The ID of the host") private Long hostId; - @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, description = "the new host management interface password of maximum length 16, if none is provided a random password would be used") + @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, description = "The new host management interface password of maximum length 16, if none is provided a random password would be used") private String password; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/ConfigureOutOfBandManagementCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/ConfigureOutOfBandManagementCmd.java index 157d3c627db5..4052539a51d7 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/ConfigureOutOfBandManagementCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/ConfigureOutOfBandManagementCmd.java @@ -54,22 +54,22 @@ public class ConfigureOutOfBandManagementCmd extends BaseCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, - validations = {ApiArgValidator.PositiveNumber}, description = "the ID of the host") + validations = {ApiArgValidator.PositiveNumber}, description = "The ID of the host") private Long hostId; - @Parameter(name = ApiConstants.DRIVER, type = CommandType.STRING, required = true, description = "the host management interface driver, for example: ipmitool") + @Parameter(name = ApiConstants.DRIVER, type = CommandType.STRING, required = true, description = "The host management interface driver, for example: ipmitool") private String driver; - @Parameter(name = ApiConstants.ADDRESS, type = CommandType.STRING, required = true, description = "the host management interface IP address") + @Parameter(name = ApiConstants.ADDRESS, type = CommandType.STRING, required = true, description = "The host management interface IP address") private String address; - @Parameter(name = ApiConstants.PORT, type = CommandType.STRING, required = true, description = "the host management interface port") + @Parameter(name = ApiConstants.PORT, type = CommandType.STRING, required = true, description = "The host management interface port") private String port; - @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "the host management interface user") + @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "The host management interface user") private String username; - @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, required = true, description = "the host management interface password") + @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, required = true, description = "The host management interface password") private String password; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/DisableOutOfBandManagementForClusterCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/DisableOutOfBandManagementForClusterCmd.java index 445e7b92665c..26b0eac6be4a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/DisableOutOfBandManagementForClusterCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/DisableOutOfBandManagementForClusterCmd.java @@ -54,7 +54,7 @@ public class DisableOutOfBandManagementForClusterCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.CLUSTER_ID, type = BaseCmd.CommandType.UUID, required = true, entityType = ClusterResponse.class, - validations = {ApiArgValidator.PositiveNumber}, description = "the ID of the cluster") + validations = {ApiArgValidator.PositiveNumber}, description = "The ID of the cluster") private Long clusterId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/DisableOutOfBandManagementForHostCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/DisableOutOfBandManagementForHostCmd.java index 7e4444e93fbd..6c9b48ef28f7 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/DisableOutOfBandManagementForHostCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/DisableOutOfBandManagementForHostCmd.java @@ -54,7 +54,7 @@ public class DisableOutOfBandManagementForHostCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.HOST_ID, type = BaseCmd.CommandType.UUID, required = true, entityType = HostResponse.class, - validations = {ApiArgValidator.PositiveNumber}, description = "the ID of the host") + validations = {ApiArgValidator.PositiveNumber}, description = "The ID of the host") private Long hostId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/DisableOutOfBandManagementForZoneCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/DisableOutOfBandManagementForZoneCmd.java index 2028f8fc2a07..4f262ca5c09f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/DisableOutOfBandManagementForZoneCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/DisableOutOfBandManagementForZoneCmd.java @@ -54,7 +54,7 @@ public class DisableOutOfBandManagementForZoneCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.ZONE_ID, type = BaseCmd.CommandType.UUID, required = true, entityType = ZoneResponse.class, - validations = {ApiArgValidator.PositiveNumber}, description = "the ID of the zone") + validations = {ApiArgValidator.PositiveNumber}, description = "The ID of the zone") private Long zoneId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/EnableOutOfBandManagementForClusterCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/EnableOutOfBandManagementForClusterCmd.java index 549743b31728..6620f86907e9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/EnableOutOfBandManagementForClusterCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/EnableOutOfBandManagementForClusterCmd.java @@ -54,7 +54,7 @@ public class EnableOutOfBandManagementForClusterCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.CLUSTER_ID, type = BaseCmd.CommandType.UUID, required = true, entityType = ClusterResponse.class, - validations = {ApiArgValidator.PositiveNumber}, description = "the ID of the cluster") + validations = {ApiArgValidator.PositiveNumber}, description = "The ID of the cluster") private Long clusterId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/EnableOutOfBandManagementForHostCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/EnableOutOfBandManagementForHostCmd.java index 834181a5e1c5..3cfee31f78a8 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/EnableOutOfBandManagementForHostCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/EnableOutOfBandManagementForHostCmd.java @@ -54,7 +54,7 @@ public class EnableOutOfBandManagementForHostCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.HOST_ID, type = BaseCmd.CommandType.UUID, required = true, entityType = HostResponse.class, - validations = {ApiArgValidator.PositiveNumber}, description = "the ID of the host") + validations = {ApiArgValidator.PositiveNumber}, description = "The ID of the host") private Long hostId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/EnableOutOfBandManagementForZoneCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/EnableOutOfBandManagementForZoneCmd.java index de4c4d801de1..99d2324b1b66 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/EnableOutOfBandManagementForZoneCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/EnableOutOfBandManagementForZoneCmd.java @@ -54,7 +54,7 @@ public class EnableOutOfBandManagementForZoneCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.ZONE_ID, type = BaseCmd.CommandType.UUID, required = true, entityType = ZoneResponse.class, - validations = {ApiArgValidator.PositiveNumber}, description = "the ID of the zone") + validations = {ApiArgValidator.PositiveNumber}, description = "The ID of the zone") private Long zoneId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/IssueOutOfBandManagementPowerActionCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/IssueOutOfBandManagementPowerActionCmd.java index 97a813c9d476..c63b03aad1b8 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/IssueOutOfBandManagementPowerActionCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/outofbandmanagement/IssueOutOfBandManagementPowerActionCmd.java @@ -53,14 +53,14 @@ public class IssueOutOfBandManagementPowerActionCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, required = true, - validations = {ApiArgValidator.PositiveNumber}, description = "the ID of the host") + validations = {ApiArgValidator.PositiveNumber}, description = "The ID of the host") private Long hostId; - @Parameter(name = ApiConstants.TIMEOUT, type = CommandType.LONG, description = "optional operation timeout in seconds that overrides the global or cluster-level out-of-band management timeout setting") + @Parameter(name = ApiConstants.TIMEOUT, type = CommandType.LONG, description = "Optional operation timeout in seconds that overrides the global or cluster-level out-of-band management timeout setting") private Long actionTimeout; @Parameter(name = ApiConstants.ACTION, type = CommandType.STRING, required = true, - description = "out-of-band management power actions, valid actions are: ON, OFF, CYCLE, RESET, SOFT, STATUS") + description = "Out-of-band management power actions, valid actions are: ON, OFF, CYCLE, RESET, SOFT, STATUS") private String powerAction; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/CreatePodCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/CreatePodCmd.java index 36ad00e6e4ab..6a178b64d876 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/CreatePodCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/CreatePodCmd.java @@ -40,26 +40,26 @@ public class CreatePodCmd extends BaseCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the Pod") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the Pod") private String podName; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, - description = "the Zone ID in which the Pod will be created") + description = "The Zone ID in which the Pod will be created") private Long zoneId; - @Parameter(name = ApiConstants.START_IP, type = CommandType.STRING, description = "the starting IP address for the Pod") + @Parameter(name = ApiConstants.START_IP, type = CommandType.STRING, description = "The starting IP address for the Pod") private String startIp; - @Parameter(name = ApiConstants.END_IP, type = CommandType.STRING, description = "the ending IP address for the Pod") + @Parameter(name = ApiConstants.END_IP, type = CommandType.STRING, description = "The ending IP address for the Pod") private String endIp; - @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, description = "the netmask for the Pod") + @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, description = "The netmask for the Pod") private String netmask; - @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, description = "the gateway for the Pod") + @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, description = "The gateway for the Pod") private String gateway; @Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Allocation state of this Pod for allocation of new resources") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/DeletePodCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/DeletePodCmd.java index c1de800d745b..953fcc91fa71 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/DeletePodCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/DeletePodCmd.java @@ -38,7 +38,7 @@ public class DeletePodCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = PodResponse.class, required = true, description = "the ID of the Pod") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = PodResponse.class, required = true, description = "The ID of the Pod") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/ListPodsByCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/ListPodsByCmd.java index 264e5263c4d7..a19bc3caf8b5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/ListPodsByCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/ListPodsByCmd.java @@ -40,19 +40,19 @@ public class ListPodsByCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = PodResponse.class, description = "list Pods by ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = PodResponse.class, description = "List Pods by ID") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list Pods by name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "List Pods by name") private String podName; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "list Pods by Zone ID") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "List Pods by Zone ID") private Long zoneId; - @Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "list pods by allocation state") + @Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "List pods by allocation state") private String allocationState; - @Parameter(name = ApiConstants.SHOW_CAPACITIES, type = CommandType.BOOLEAN, description = "flag to display the capacity of the pods") + @Parameter(name = ApiConstants.SHOW_CAPACITIES, type = CommandType.BOOLEAN, description = "Flag to display the capacity of the pods") private Boolean showCapacities; @Parameter(name = ApiConstants.STORAGE_ACCESS_GROUP, type = CommandType.STRING, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/UpdatePodCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/UpdatePodCmd.java index 7dae6f4c7cf0..24a549c623ad 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/UpdatePodCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/pod/UpdatePodCmd.java @@ -38,22 +38,22 @@ public class UpdatePodCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = PodResponse.class, required = true, description = "the ID of the Pod") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = PodResponse.class, required = true, description = "The ID of the Pod") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the Pod") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the Pod") private String podName; - @Parameter(name = ApiConstants.START_IP, type = CommandType.STRING, description = "the starting IP address for the Pod") + @Parameter(name = ApiConstants.START_IP, type = CommandType.STRING, description = "The starting IP address for the Pod") private String startIp; - @Parameter(name = ApiConstants.END_IP, type = CommandType.STRING, description = "the ending IP address for the Pod") + @Parameter(name = ApiConstants.END_IP, type = CommandType.STRING, description = "The ending IP address for the Pod") private String endIp; - @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, description = "the netmask of the Pod") + @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, description = "The netmask of the Pod") private String netmask; - @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, description = "the gateway for the Pod") + @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, description = "The gateway for the Pod") private String gateway; @Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Allocation state of this cluster for allocation of new resources") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/region/CreatePortableIpRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/region/CreatePortableIpRangeCmd.java index fd103c838309..1142bdd3f43c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/region/CreatePortableIpRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/region/CreatePortableIpRangeCmd.java @@ -36,7 +36,7 @@ @APICommand(name = "createPortableIpRange", responseObject = PortableIpRangeResponse.class, - description = "adds a range of portable public IP's to a region", + description = "Adds a range of portable public IP's to a region", since = "4.2.0", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) @@ -51,16 +51,16 @@ public class CreatePortableIpRangeCmd extends BaseAsyncCreateCmd { @Parameter(name = ApiConstants.REGION_ID, type = CommandType.INTEGER, entityType = RegionResponse.class, required = true, description = "Id of the Region") private Integer regionId; - @Parameter(name = ApiConstants.START_IP, type = CommandType.STRING, required = true, description = "the beginning IP address in the portable IP range") + @Parameter(name = ApiConstants.START_IP, type = CommandType.STRING, required = true, description = "The beginning IP address in the portable IP range") private String startIp; - @Parameter(name = ApiConstants.END_IP, type = CommandType.STRING, required = true, description = "the ending IP address in the portable IP range") + @Parameter(name = ApiConstants.END_IP, type = CommandType.STRING, required = true, description = "The ending IP address in the portable IP range") private String endIp; - @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, required = true, description = "the gateway for the portable IP range") + @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, required = true, description = "The gateway for the portable IP range") private String gateway; - @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, required = true, description = "the netmask of the portable IP range") + @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, required = true, description = "The netmask of the portable IP range") private String netmask; @Parameter(name = ApiConstants.VLAN, type = CommandType.STRING, description = "VLAN id, if not specified defaulted to untagged") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/region/DeletePortableIpRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/region/DeletePortableIpRangeCmd.java index 3ff46fcc94d5..da7293ea2198 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/region/DeletePortableIpRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/region/DeletePortableIpRangeCmd.java @@ -31,7 +31,7 @@ import com.cloud.event.EventTypes; import com.cloud.user.Account; -@APICommand(name = "deletePortableIpRange", description = "deletes a range of portable public IP's associated with a region", responseObject = SuccessResponse.class, +@APICommand(name = "deletePortableIpRange", description = "Deletes a range of portable public IP's associated with a region", responseObject = SuccessResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeletePortableIpRangeCmd extends BaseAsyncCmd { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/region/ListPortableIpRangesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/region/ListPortableIpRangesCmd.java index e654da6df449..92a1cc3822e9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/region/ListPortableIpRangesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/region/ListPortableIpRangesCmd.java @@ -32,7 +32,7 @@ import com.cloud.user.Account; -@APICommand(name = "listPortableIpRanges", description = "list portable IP ranges", responseObject = PortableIpRangeResponse.class, +@APICommand(name = "listPortableIpRanges", description = "List portable IP ranges", responseObject = PortableIpRangeResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListPortableIpRangesCmd extends BaseListCmd { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/region/UpdateRegionCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/region/UpdateRegionCmd.java index 4267f6a2c286..ec5bfdabf5ec 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/region/UpdateRegionCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/region/UpdateRegionCmd.java @@ -42,10 +42,10 @@ public class UpdateRegionCmd extends BaseCmd { @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") + @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") + @Parameter(name = ApiConstants.END_POINT, type = CommandType.STRING, description = "Updates region with this end point") private String endPoint; @Inject diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java index dc8c15cf09df..e495a1683292 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ArchiveAlertsCmd.java @@ -46,18 +46,18 @@ public class ArchiveAlertsCmd extends BaseCmd { type = CommandType.LIST, collectionType = CommandType.UUID, entityType = AlertResponse.class, - description = "the IDs of the alerts") + description = "The IDs of the alerts") private List ids; - @Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, description = "end date range to archive alerts" + @Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, description = "End date range to archive alerts" + " (including) this date (use format \"yyyy-MM-dd\" or the new format \"yyyy-MM-ddThh:mm:ss\")") private Date endDate; - @Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, description = "start date range to archive alerts" + @Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, description = "Start date range to archive alerts" + " (including) this date (use format \"yyyy-MM-dd\" or the new format \"yyyy-MM-ddThh:mm:ss\")") private Date startDate; - @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "archive by alert type") + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "Archive by alert type") private String type; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/CleanVMReservationsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/CleanVMReservationsCmd.java index 1ae8c9441233..ba1b2be4008f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/CleanVMReservationsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/CleanVMReservationsCmd.java @@ -27,7 +27,7 @@ import com.cloud.event.EventTypes; import com.cloud.user.Account; -@APICommand(name = "cleanVMReservations", description = "Cleanups VM reservations in the database.", responseObject = SuccessResponse.class, +@APICommand(name = "cleanVMReservations", description = "Cleanups Instance reservations in the database.", responseObject = SuccessResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CleanVMReservationsCmd extends BaseAsyncCmd { @@ -63,7 +63,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "cleaning vm reservations in database"; + return "Cleaning Instance reservations in database"; } @Override @@ -73,7 +73,7 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } catch (Exception ex) { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to clean vm reservations"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to clean Instance reservations"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java index 9262a120f72c..f59a16d83733 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/DeleteAlertsCmd.java @@ -46,18 +46,18 @@ public class DeleteAlertsCmd extends BaseCmd { type = CommandType.LIST, collectionType = CommandType.UUID, entityType = AlertResponse.class, - description = "the IDs of the alerts") + description = "The IDs of the alerts") private List ids; - @Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, description = "end date range to delete alerts" + @Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, description = "End date range to delete alerts" + " (including) this date (use format \"yyyy-MM-dd\" or the new format \"yyyy-MM-ddThh:mm:ss\")") private Date endDate; - @Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, description = "start date range to delete alerts" + @Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, description = "Start date range to delete alerts" + " (including) this date (use format \"yyyy-MM-dd\" or the new format \"yyyy-MM-ddThh:mm:ss\")") private Date startDate; - @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "delete by alert type") + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "Delete by alert type") private String type; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java index 64cf691e6a73..e88896703238 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ListAlertsCmd.java @@ -39,13 +39,13 @@ public class ListAlertsCmd extends BaseListCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AlertResponse.class, description = "the ID of the alert") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AlertResponse.class, description = "The ID of the alert") private Long id; - @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "list by alert type") + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "List by alert type") private String type; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list by alert name", since = "4.3") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "List by alert name", since = "4.3") private String name; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java index f46cecdef504..ae98ca9dcd26 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/ListCapacityCmd.java @@ -46,23 +46,23 @@ public class ListCapacityCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "lists capacity by the Zone ID") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "Lists capacity by the Zone ID") private Long zoneId; - @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "lists capacity by the Pod ID") + @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "Lists capacity by the Pod ID") private Long podId; @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, since = "3.0.0", - description = "lists capacity by the Cluster ID") + description = "Lists capacity by the Cluster ID") private Long clusterId; - @Parameter(name = ApiConstants.FETCH_LATEST, type = CommandType.BOOLEAN, since = "3.0.0", description = "recalculate capacities and fetch the latest") + @Parameter(name = ApiConstants.FETCH_LATEST, type = CommandType.BOOLEAN, since = "3.0.0", description = "Recalculate capacities and fetch the latest") private Boolean fetchLatest; - @Parameter(name = ApiConstants.TYPE, type = CommandType.INTEGER, description = "lists capacity by type" + "* CAPACITY_TYPE_MEMORY = 0" + "* CAPACITY_TYPE_CPU = 1" + @Parameter(name = ApiConstants.TYPE, type = CommandType.INTEGER, description = "Lists capacity by type" + "* CAPACITY_TYPE_MEMORY = 0" + "* CAPACITY_TYPE_CPU = 1" + "* CAPACITY_TYPE_STORAGE = 2" + "* CAPACITY_TYPE_STORAGE_ALLOCATED = 3" + "* CAPACITY_TYPE_VIRTUAL_NETWORK_PUBLIC_IP = 4" + "* CAPACITY_TYPE_PRIVATE_IP = 5" + "* CAPACITY_TYPE_SECONDARY_STORAGE = 6" + "* CAPACITY_TYPE_VLAN = 7" + "* CAPACITY_TYPE_DIRECT_ATTACHED_PUBLIC_IP = 8" + "* CAPACITY_TYPE_LOCAL_STORAGE = 9" + "* CAPACITY_TYPE_GPU = 19" + "* CAPACITY_TYPE_CPU_CORE = 90.") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/StartRollingMaintenanceCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/StartRollingMaintenanceCmd.java index 04fa1002611c..3869b9cdf957 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/StartRollingMaintenanceCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/StartRollingMaintenanceCmd.java @@ -60,31 +60,31 @@ public class StartRollingMaintenanceCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.POD_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, - entityType = PodResponse.class, description = "the IDs of the pods to start maintenance on") + entityType = PodResponse.class, description = "The IDs of the pods to start maintenance on") private List podIds; @Parameter(name = ApiConstants.CLUSTER_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, - entityType = ClusterResponse.class, description = "the IDs of the clusters to start maintenance on") + entityType = ClusterResponse.class, description = "The IDs of the clusters to start maintenance on") private List clusterIds; @Parameter(name = ApiConstants.ZONE_ID_LIST, type = CommandType.LIST, collectionType = CommandType.UUID, - entityType = ZoneResponse.class, description = "the IDs of the zones to start maintenance on") + entityType = ZoneResponse.class, description = "The IDs of the zones to start maintenance on") private List zoneIds; @Parameter(name = ApiConstants.HOST_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, - entityType = HostResponse.class, description = "the IDs of the hosts to start maintenance on") + entityType = HostResponse.class, description = "The IDs of the hosts to start maintenance on") private List hostIds; @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, - description = "if rolling mechanism should continue in case of an error") + description = "If rolling mechanism should continue in case of an error") private Boolean forced; @Parameter(name = ApiConstants.PAYLOAD, type = CommandType.STRING, - description = "the command to execute while hosts are on maintenance") + description = "The command to execute while hosts are on maintenance") private String payload; @Parameter(name = ApiConstants.TIMEOUT, type = CommandType.INTEGER, - description = "optional operation timeout (in seconds) that overrides the global timeout setting") + description = "Optional operation timeout (in seconds) that overrides the global timeout setting") private Integer timeout; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/icon/DeleteResourceIconCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/icon/DeleteResourceIconCmd.java index e97a68bddcb6..6289879c1a27 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/icon/DeleteResourceIconCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/icon/DeleteResourceIconCmd.java @@ -31,7 +31,7 @@ import java.util.List; -@APICommand(name = "deleteResourceIcon", description = "deletes the resource icon from the specified resource(s)", +@APICommand(name = "deleteResourceIcon", description = "Deletes the resource icon from the specified resource(s)", responseObject = SuccessResponse.class, since = "4.16.0.0", entityType = {ResourceIcon.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, authorized = {RoleType.Admin, RoleType.DomainAdmin, RoleType.ResourceAdmin, RoleType.User}) @@ -45,10 +45,10 @@ public class DeleteResourceIconCmd extends BaseCmd { type = BaseCmd.CommandType.LIST, required = true, collectionType = BaseCmd.CommandType.STRING, - description = "list of resources to upload the icon/image for") + description = "List of resources to upload the icon/image for") private List resourceIds; - @Parameter(name = ApiConstants.RESOURCE_TYPE, type = BaseCmd.CommandType.STRING, required = true, description = "type of the resource") + @Parameter(name = ApiConstants.RESOURCE_TYPE, type = BaseCmd.CommandType.STRING, required = true, description = "Type of the resource") private String resourceType; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/icon/ListResourceIconCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/icon/ListResourceIconCmd.java index 6cc3173cf155..7b9c9671d47a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/icon/ListResourceIconCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/icon/ListResourceIconCmd.java @@ -42,10 +42,10 @@ public class ListResourceIconCmd extends BaseCmd { type = BaseCmd.CommandType.LIST, required = true, collectionType = BaseCmd.CommandType.STRING, - description = "list of resources to upload the icon/image for") + description = "List of resources to upload the icon/image for") private List resourceIds; - @Parameter(name = ApiConstants.RESOURCE_TYPE, type = BaseCmd.CommandType.STRING, required = true, description = "type of the resource") + @Parameter(name = ApiConstants.RESOURCE_TYPE, type = BaseCmd.CommandType.STRING, required = true, description = "Type of the resource") private String resourceType; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/icon/UploadResourceIconCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/icon/UploadResourceIconCmd.java index 5a6acd961bf5..9201e345302c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/icon/UploadResourceIconCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/resource/icon/UploadResourceIconCmd.java @@ -55,10 +55,10 @@ public class UploadResourceIconCmd extends BaseCmd { type = BaseCmd.CommandType.LIST, required = true, collectionType = BaseCmd.CommandType.STRING, - description = "list of resources to upload the icon/image for") + description = "List of resources to upload the icon/image for") private List resourceIds; - @Parameter(name = ApiConstants.RESOURCE_TYPE, type = BaseCmd.CommandType.STRING, required = true, description = "type of the resource") + @Parameter(name = ApiConstants.RESOURCE_TYPE, type = BaseCmd.CommandType.STRING, required = true, description = "Type of the resource") private String resourceType; @Parameter(name = ApiConstants.BASE64_IMAGE, type = BaseCmd.CommandType.STRING, required = true, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ConfigureOvsElementCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ConfigureOvsElementCmd.java index 4a8c0bc3a3b9..e40462149582 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ConfigureOvsElementCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ConfigureOvsElementCmd.java @@ -48,7 +48,7 @@ public class ConfigureOvsElementCmd extends BaseAsyncCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = OvsProviderResponse.class, required = true, description = "the ID of the ovs provider") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = OvsProviderResponse.class, required = true, description = "The ID of the ovs provider") private Long id; @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, required = true, description = "Enabled/Disabled the service provider") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ConfigureVirtualRouterElementCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ConfigureVirtualRouterElementCmd.java index aa119f3aca75..7be41834cd5a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ConfigureVirtualRouterElementCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ConfigureVirtualRouterElementCmd.java @@ -54,7 +54,7 @@ public class ConfigureVirtualRouterElementCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = VirtualRouterProviderResponse.class, required = true, - description = "the ID of the virtual router provider") + description = "The ID of the virtual router provider") private Long id; @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, required = true, description = "Enabled/Disabled the service provider") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/CreateVirtualRouterElementCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/CreateVirtualRouterElementCmd.java index e85531c83c4d..7c17fd794da6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/CreateVirtualRouterElementCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/CreateVirtualRouterElementCmd.java @@ -54,7 +54,7 @@ public class CreateVirtualRouterElementCmd extends BaseAsyncCreateCmd { type = CommandType.UUID, entityType = ProviderResponse.class, required = true, - description = "the network service provider ID of the virtual router element") + description = "The network service provider ID of the virtual router element") private Long nspId; @Parameter(name = ApiConstants.PROVIDER_TYPE, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/DestroyRouterCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/DestroyRouterCmd.java index 39ccee47fbeb..66fc2eb79e6d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/DestroyRouterCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/DestroyRouterCmd.java @@ -42,7 +42,7 @@ public class DestroyRouterCmd extends BaseAsyncCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, required = true, description = "the ID of the router") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, required = true, description = "The ID of the router") private Long id; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/GetRouterHealthCheckResultsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/GetRouterHealthCheckResultsCmd.java index 4bef26e05550..6d4d62929ded 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/GetRouterHealthCheckResultsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/GetRouterHealthCheckResultsCmd.java @@ -52,10 +52,10 @@ public class GetRouterHealthCheckResultsCmd extends BaseCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.ROUTER_ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, - required = true, description = "the ID of the router") + required = true, description = "The ID of the router") private Long routerId; - @Parameter(name = ApiConstants.PERFORM_FRESH_CHECKS, type = CommandType.BOOLEAN, description = "if true is passed for this parameter, " + + @Parameter(name = ApiConstants.PERFORM_FRESH_CHECKS, type = CommandType.BOOLEAN, description = "If true is passed for this parameter, " + "health checks are performed on the fly. Else last performed checks data is fetched") private Boolean performFreshChecks; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ListOvsElementsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ListOvsElementsCmd.java index a267aa526691..5ed3ae0e208e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ListOvsElementsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ListOvsElementsCmd.java @@ -46,13 +46,13 @@ public class ListOvsElementsCmd extends BaseListCmd { // /////////////////////////////////////////////////// // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = OvsProviderResponse.class, description = "list ovs elements by id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = OvsProviderResponse.class, description = "List ovs elements by id") private Long id; - @Parameter(name = ApiConstants.NSP_ID, type = CommandType.UUID, entityType = ProviderResponse.class, description = "list ovs elements by network service provider id") + @Parameter(name = ApiConstants.NSP_ID, type = CommandType.UUID, entityType = ProviderResponse.class, description = "List ovs elements by network service provider id") private Long nspId; - @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, description = "list network offerings by enabled state") + @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, description = "List network offerings by enabled state") private Boolean enabled; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java index 9e34c05ce216..92ebd323169c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ListRoutersCmd.java @@ -46,45 +46,45 @@ public class ListRoutersCmd extends BaseListProjectAndAccountResourcesCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, description = "the host ID of the router") + @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, description = "The host ID of the router") private Long hostId; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "the ID of the disk router") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "The ID of the disk router") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the router") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the router") private String routerName; - @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "the Pod ID of the router") + @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "The Pod ID of the router") private Long podId; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "the state of the router") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "The state of the router") private String state; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID of the router") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID of the router") private Long zoneId; - @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "the cluster ID of the router") + @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "The cluster ID of the router") private Long clusterId; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "list by network id") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "List by network id") private Long networkId; @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "List networks by VPC") private Long vpcId; - @Parameter(name = ApiConstants.FOR_VPC, type = CommandType.BOOLEAN, description = "if true is passed for this parameter, list only VPC routers") + @Parameter(name = ApiConstants.FOR_VPC, type = CommandType.BOOLEAN, description = "If true is passed for this parameter, list only VPC routers") private Boolean forVpc; - @Parameter(name = ApiConstants.VERSION, type = CommandType.STRING, description = "list virtual router elements by version") + @Parameter(name = ApiConstants.VERSION, type = CommandType.STRING, description = "List virtual router elements by version") private String version; @Parameter(name = ApiConstants.HEALTHCHECK_FAILED, type = CommandType.BOOLEAN, since = "4.16", - description = "if this parameter is passed, list only routers by health check results") + description = "If this parameter is passed, list only routers by health check results") private Boolean healthCheckFailed; @Parameter(name = ApiConstants.FETCH_ROUTER_HEALTH_CHECK_RESULTS, type = CommandType.BOOLEAN, since = "4.14", - description = "if true is passed for this parameter, also fetch last executed health check results for the router. Default is false") + description = "If true is passed for this parameter, also fetch last executed health check results for the router. Default is false") private Boolean fetchHealthCheckResults; @Parameter(name = ApiConstants.ARCH, type = CommandType.STRING, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java index 424b8c29d041..6b175b10ebd9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/ListVirtualRouterElementsCmd.java @@ -49,16 +49,16 @@ public class ListVirtualRouterElementsCmd extends BaseListCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VirtualRouterProviderResponse.class, description = "list virtual router elements by id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VirtualRouterProviderResponse.class, description = "List virtual router elements by id") private Long id; @Parameter(name = ApiConstants.NSP_ID, type = CommandType.UUID, entityType = ProviderResponse.class, - description = "list virtual router elements by network service provider id") + description = "List virtual router elements by network service provider id") private Long nspId; - @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, description = "list network offerings by enabled state") + @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, description = "List network offerings by enabled state") private Boolean enabled; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/RebootRouterCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/RebootRouterCmd.java index 1d97dd803098..36ffdcb42d00 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/RebootRouterCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/RebootRouterCmd.java @@ -43,7 +43,7 @@ public class RebootRouterCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, required = true, description = "the ID of the router") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, required = true, description = "The ID of the router") private Long id; @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force reboot the router (Router is force Stopped and then Started)", since = "4.16.0") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java index 24ab78810374..65849be0d685 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/StartRouterCmd.java @@ -45,7 +45,7 @@ public class StartRouterCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, required = true, description = "the ID of the router") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, required = true, description = "The ID of the router") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java index 971086a57cff..775ffcb4d38e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/StopRouterCmd.java @@ -44,10 +44,10 @@ public class StopRouterCmd extends BaseAsyncCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, required = true, description = "the ID of the router") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, required = true, description = "The ID of the router") private Long id; - @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the VM (vm is marked as Stopped even when command fails to be send to the backend, otherwise a force poweroff is attempted). To be used if the caller knows the VM is stopped and should be marked as such.") + @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the Instance (Instance is marked as Stopped even when command fails to be send to the backend, otherwise a force poweroff is attempted). To be used if the caller knows the Instance is stopped and should be marked as such.") private Boolean forced; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/UpgradeRouterCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/UpgradeRouterCmd.java index 3265a089d672..1428ecbaeca2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/UpgradeRouterCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/UpgradeRouterCmd.java @@ -45,7 +45,7 @@ public class UpgradeRouterCmd extends BaseCmd { type = CommandType.UUID, entityType = ServiceOfferingResponse.class, required = true, - description = "the service offering ID to apply to the domain router") + description = "The service offering ID to apply to the domain router") private Long serviceOfferingId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/UpgradeRouterTemplateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/UpgradeRouterTemplateCmd.java index 74464cab3150..1bbc3a141dbc 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/router/UpgradeRouterTemplateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/router/UpgradeRouterTemplateCmd.java @@ -39,7 +39,7 @@ import com.cloud.exception.ResourceUnavailableException; import com.cloud.user.Account; -@APICommand(name = "upgradeRouterTemplate", description = "Upgrades router to use newer template", responseObject = BaseResponse.class, +@APICommand(name = "upgradeRouterTemplate", description = "Upgrades router to use newer Template", responseObject = BaseResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpgradeRouterTemplateCmd extends org.apache.cloudstack.api.BaseCmd { @@ -47,29 +47,29 @@ public class UpgradeRouterTemplateCmd extends org.apache.cloudstack.api.BaseCmd //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, description = "upgrades router with the specified Id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DomainRouterResponse.class, description = "Upgrades router with the specified Id") private Long id; @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, - description = "upgrades all routers within the specified cluster") + description = "Upgrades all routers within the specified cluster") private Long clusterId; - @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "upgrades all routers within the specified pod") + @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "Upgrades all routers within the specified Pod") private Long podId; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "upgrades all routers within the specified zone") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "Upgrades all routers within the specified zone") private Long zoneId; @Parameter(name=ApiConstants.ACCOUNT, type=CommandType.STRING, - description="upgrades all routers owned by the specified account") + description = "Upgrades all routers owned by the specified account") private String account; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "upgrades all routers owned by the specified domain") + description = "Upgrades all routers owned by the specified domain") private Long domainId; ///////////////////////////////////////////////////// @@ -119,14 +119,14 @@ public Long getInstanceId() { @Override public void execute() throws ConcurrentOperationException, ResourceUnavailableException, InsufficientCapacityException { - CallContext.current().setEventDetails("Upgrading router template"); + CallContext.current().setEventDetails("Upgrading router Template"); List result = _routerService.upgradeRouterTemplate(this); if (result != null) { ListResponse response = _responseGenerator.createUpgradeRouterTemplateResponse(result); response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to upgrade router template"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to upgrade router Template"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/AddImageStoreCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/AddImageStoreCmd.java index 7c8f0e21afbb..72e2e96fe57b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/AddImageStoreCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/AddImageStoreCmd.java @@ -43,21 +43,21 @@ public class AddImageStoreCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name for the image store") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name for the image store") private String name; - @Parameter(name = ApiConstants.URL, type = CommandType.STRING, length = 2048, description = "the URL for the image store") + @Parameter(name = ApiConstants.URL, type = CommandType.STRING, length = 2048, description = "The URL for the image store") private String url; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID for the image store") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID for the image store") private Long zoneId; - @Parameter(name = ApiConstants.PROVIDER, type = CommandType.STRING, required = true, description = "the image store provider name") + @Parameter(name = ApiConstants.PROVIDER, type = CommandType.STRING, required = true, description = "The image store provider name") private String providerName; @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, - description = "the details for the image store. Example: details[0].key=accesskey&details[0].value=s389ddssaa&details[1].key=secretkey&details[1].value=8dshfsss") + description = "The details for the image store. Example: details[0].key=accesskey&details[0].value=s389ddssaa&details[1].key=secretkey&details[1].value=8dshfsss") private Map details; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/CancelPrimaryStorageMaintenanceCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/CancelPrimaryStorageMaintenanceCmd.java index 7e925f286d09..35f7b19f709d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/CancelPrimaryStorageMaintenanceCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/CancelPrimaryStorageMaintenanceCmd.java @@ -42,7 +42,7 @@ public class CancelPrimaryStorageMaintenanceCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, required = true, description = "the primary storage ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, required = true, description = "The primary storage ID") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java index 5776eb6464cf..e197e9f94f11 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/CreateSecondaryStagingStoreCmd.java @@ -34,7 +34,7 @@ import com.cloud.storage.ImageStore; import com.cloud.user.Account; -@APICommand(name = "createSecondaryStagingStore", description = "create secondary staging store.", responseObject = ImageStoreResponse.class, +@APICommand(name = "createSecondaryStagingStore", description = "Create secondary staging store.", responseObject = ImageStoreResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateSecondaryStagingStoreCmd extends BaseCmd { @@ -42,19 +42,19 @@ public class CreateSecondaryStagingStoreCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, length = 2048, description = "the URL for the staging store") + @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, length = 2048, description = "The URL for the staging store") private String url; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID for the staging store") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID for the staging store") private Long zoneId; - @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "the details for the staging store") + @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "The details for the staging store") private Map> details; - @Parameter(name = ApiConstants.SCOPE, type = CommandType.STRING, required = false, description = "the scope of the staging store: zone only for now") + @Parameter(name = ApiConstants.SCOPE, type = CommandType.STRING, required = false, description = "The scope of the staging store: zone only for now") private String scope; - @Parameter(name = ApiConstants.PROVIDER, type = CommandType.STRING, required = false, description = "the staging store provider name") + @Parameter(name = ApiConstants.PROVIDER, type = CommandType.STRING, required = false, description = "The staging store provider name") private String providerName; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java index cbe4b8c06b3f..2aef856f58f3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/CreateStoragePoolCmd.java @@ -46,50 +46,50 @@ public class CreateStoragePoolCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "the cluster ID for the storage pool") + @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, 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") + @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "The details for the storage pool") private Map details; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name for the storage pool") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name for the storage pool") private String storagePoolName; - @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "the Pod ID for the storage pool") + @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, 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") + @Parameter(name = ApiConstants.TAGS, type = CommandType.STRING, description = "The tags for the storage pool") private String tags; @Parameter(name = ApiConstants.STORAGE_ACCESS_GROUPS, type = CommandType.STRING, description = "comma separated list of storage access groups for connecting to hosts having those specific groups", since = "4.21.0") private String storageAccessGroups; - @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "the URL of the storage pool") + @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "The URL of the storage pool") private String url; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the Zone ID for the storage pool") + @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") + @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") + @Parameter(name = ApiConstants.SCOPE, type = CommandType.STRING, required = false, description = "The scope of the storage: cluster or zone") private String scope; - @Parameter(name = ApiConstants.MANAGED, type = CommandType.BOOLEAN, required = false, description = "whether the storage should be managed by CloudStack") + @Parameter(name = ApiConstants.MANAGED, type = CommandType.BOOLEAN, required = false, description = "Whether the storage should be managed by CloudStack") private Boolean managed; @Parameter(name = ApiConstants.CAPACITY_IOPS, type = CommandType.LONG, required = false, description = "IOPS CloudStack can provision from this storage pool") private Long capacityIops; - @Parameter(name = ApiConstants.CAPACITY_BYTES, type = CommandType.LONG, required = false, description = "bytes CloudStack can provision from this storage pool") + @Parameter(name = ApiConstants.CAPACITY_BYTES, type = CommandType.LONG, required = false, description = "Bytes CloudStack can provision from this storage pool") private Long capacityBytes; @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, required = false, - description = "hypervisor type of the hosts in zone that will be attached to this storage pool. KVM, VMware supported as of now.") + description = "Hypervisor type of the hosts in zone that will be attached to this storage pool. KVM, VMware supported as of now.") private String hypervisor; @Parameter(name = ApiConstants.IS_TAG_A_RULE, type = CommandType.BOOLEAN, description = ApiConstants.PARAMETER_DESCRIPTION_IS_TAG_A_RULE) diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java index a0c2731ccdaf..68d9f37df3f0 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/DeleteSecondaryStagingStoreCmd.java @@ -37,7 +37,7 @@ public class DeleteSecondaryStagingStoreCmd extends BaseCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ImageStoreResponse.class, required = true, description = "the staging store ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ImageStoreResponse.class, required = true, description = "The staging store ID") private Long id; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/FindStoragePoolsForMigrationCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/FindStoragePoolsForMigrationCmd.java index a45f72766dc6..7f5e864ed910 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/FindStoragePoolsForMigrationCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/FindStoragePoolsForMigrationCmd.java @@ -43,7 +43,7 @@ public class FindStoragePoolsForMigrationCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VolumeResponse.class, required = true, description = "the ID of the volume") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VolumeResponse.class, required = true, description = "The ID of the volume") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListImageStoresCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListImageStoresCmd.java index 5270569de44e..62d460c354c0 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListImageStoresCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListImageStoresCmd.java @@ -33,22 +33,22 @@ public class ListImageStoresCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the image store") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the image store") private String storeName; - @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "the image store protocol") + @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "The image store protocol") private String protocol; - @Parameter(name = ApiConstants.PROVIDER, type = CommandType.STRING, description = "the image store provider") + @Parameter(name = ApiConstants.PROVIDER, type = CommandType.STRING, description = "The image store provider") private String provider; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID for the image store") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID for the image store") private Long zoneId; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ImageStoreResponse.class, description = "the ID of the storage pool") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ImageStoreResponse.class, description = "The ID of the storage pool") private Long id; - @Parameter(name = ApiConstants.READ_ONLY, type = CommandType.BOOLEAN, entityType = ImageStoreResponse.class, description = "read-only status of the image store", since = "4.15.0") + @Parameter(name = ApiConstants.READ_ONLY, type = CommandType.BOOLEAN, entityType = ImageStoreResponse.class, description = "Read-only status of the image store", since = "4.15.0") private Boolean readonly; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java index 0cad16a247fd..31cd3519c5bb 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListSecondaryStagingStoresCmd.java @@ -35,19 +35,19 @@ public class ListSecondaryStagingStoresCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the staging store") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the staging store") private String storeName; - @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "the staging store protocol") + @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "The staging store protocol") private String protocol; - @Parameter(name = ApiConstants.PROVIDER, type = CommandType.STRING, description = "the staging store provider") + @Parameter(name = ApiConstants.PROVIDER, type = CommandType.STRING, description = "The staging store provider") private String provider; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID for the staging store") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID for the staging store") private Long zoneId; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ImageStoreResponse.class, description = "the ID of the staging store") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ImageStoreResponse.class, description = "The ID of the staging store") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java index 0f2c9f3416e7..236a3769b64c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListStoragePoolsCmd.java @@ -41,32 +41,32 @@ public class ListStoragePoolsCmd extends BaseListCmd { @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, - description = "list storage pools belonging to the specific cluster") + description = "List storage pools belonging to the specific cluster") private Long clusterId; - @Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, description = "the IP address for the storage pool") + @Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, description = "The IP address for the storage pool") private String ipAddress; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the storage pool") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the storage pool") private String storagePoolName; - @Parameter(name = ApiConstants.PATH, type = CommandType.STRING, description = "the storage pool path") + @Parameter(name = ApiConstants.PATH, type = CommandType.STRING, description = "The storage pool path") private String path; - @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "the Pod ID for the storage pool") + @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "The Pod ID for the storage pool") private Long podId; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID for the storage pool") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID for the storage pool") private Long zoneId; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, description = "the ID of the storage pool") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, description = "The ID of the storage pool") private Long id; - @Parameter(name = ApiConstants.SCOPE, type = CommandType.STRING, entityType = StoragePoolResponse.class, description = "the scope of the storage pool") + @Parameter(name = ApiConstants.SCOPE, type = CommandType.STRING, entityType = StoragePoolResponse.class, description = "The scope of the storage pool") private String scope; - @Parameter(name = ApiConstants.STATUS, type = CommandType.STRING, description = "the status of the storage pool") + @Parameter(name = ApiConstants.STATUS, type = CommandType.STRING, description = "The status of the storage pool") private String status; @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, description = "host ID of the storage pools") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListStorageProvidersCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListStorageProvidersCmd.java index efe7a23b5cb4..f7d4c1078359 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListStorageProvidersCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/ListStorageProvidersCmd.java @@ -40,7 +40,7 @@ requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListStorageProvidersCmd extends BaseListCmd { - @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "the type of storage provider: either primary or image", required = true) + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "The type of storage provider: either primary or image", required = true) private String type; public String getType() { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/MigrateSecondaryStorageDataCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/MigrateSecondaryStorageDataCmd.java index 8f5a7aced3fe..edd9c25fbc10 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/MigrateSecondaryStorageDataCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/MigrateSecondaryStorageDataCmd.java @@ -32,7 +32,7 @@ import com.cloud.event.EventTypes; @APICommand(name = "migrateSecondaryStorageData", - description = "migrates data objects from one secondary storage to destination image store(s)", + description = "Migrates data objects from one secondary storage to destination image store(s)", responseObject = MigrationResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, @@ -49,7 +49,7 @@ public class MigrateSecondaryStorageDataCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.SRC_POOL, type = CommandType.UUID, entityType = ImageStoreResponse.class, - description = "id of the image store from where the data is to be migrated", + description = "ID of the image store from where the data is to be migrated", required = true) private Long id; @@ -57,7 +57,7 @@ public class MigrateSecondaryStorageDataCmd extends BaseAsyncCmd { type = CommandType.LIST, collectionType = CommandType.UUID, entityType = ImageStoreResponse.class, - description = "id(s) of the destination secondary storage pool(s) to which the templates are to be migrated", + description = "ID(s) of the destination secondary storage pool(s) to which the Templates are to be migrated", required = true) private List migrateTo; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/UpdateCloudToUseObjectStoreCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/UpdateCloudToUseObjectStoreCmd.java index 5ac34f27bada..022bbb9a9057 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/UpdateCloudToUseObjectStoreCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/UpdateCloudToUseObjectStoreCmd.java @@ -42,17 +42,17 @@ public class UpdateCloudToUseObjectStoreCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="the name for the image store") + @Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description = "The name for the image store") private String name; - @Parameter(name=ApiConstants.URL, type=CommandType.STRING, description="the URL for the image store") + @Parameter(name=ApiConstants.URL, type=CommandType.STRING, description = "The URL for the image store") private String url; @Parameter(name=ApiConstants.PROVIDER, type=CommandType.STRING, - required=true, description="the image store provider name") + required=true, description = "The image store provider name") private String providerName; - @Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, description="the details for the image store. Example: details[0].key=accesskey&details[0].value=s389ddssaa&details[1].key=secretkey&details[1].value=8dshfsss") + @Parameter(name=ApiConstants.DETAILS, type=CommandType.MAP, description = "The details for the image store. Example: details[0].key=accesskey&details[0].value=s389ddssaa&details[1].key=secretkey&details[1].value=8dshfsss") private Map details; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java index f2d7bbeb189e..4b0a6ba00b28 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/storage/UpdateStoragePoolCmd.java @@ -44,22 +44,22 @@ public class UpdateStoragePoolCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, required = true, description = "the Id of the storage pool") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, required = true, description = "The Id of the storage pool") private Long id; @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, entityType = StoragePoolResponse.class, description = "Change the name of the storage pool", since = "4.15") private String name; - @Parameter(name = ApiConstants.TAGS, type = CommandType.LIST, collectionType = CommandType.STRING, description = "comma-separated list of tags for the storage pool") + @Parameter(name = ApiConstants.TAGS, type = CommandType.LIST, collectionType = CommandType.STRING, description = "Comma-separated list of tags for the storage pool") private List tags; @Parameter(name = ApiConstants.CAPACITY_IOPS, type = CommandType.LONG, required = false, description = "IOPS CloudStack can provision from this storage pool") private Long capacityIops; - @Parameter(name = ApiConstants.CAPACITY_BYTES, type = CommandType.LONG, required = false, description = "bytes CloudStack can provision from this storage pool") + @Parameter(name = ApiConstants.CAPACITY_BYTES, type = CommandType.LONG, required = false, description = "Bytes CloudStack can provision from this storage pool") private Long capacityBytes; - @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, required = false, description = "false to disable the pool for allocation of new volumes, true to" + + @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, required = false, description = "False to disable the pool for allocation of new volumes, true to" + " enable it back.") private Boolean enabled; @@ -153,6 +153,8 @@ public void execute() { if (ObjectUtils.anyNotNull(name, capacityIops, capacityBytes, url, isTagARule, tags) || MapUtils.isNotEmpty(details)) { result = _storageService.updateStoragePool(this); + } else { + result = _storageService.getStoragePool(getId()); } if (enabled != null) { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/swift/AddSwiftCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/swift/AddSwiftCmd.java index bd72f3213de1..cc0c77348a90 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/swift/AddSwiftCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/swift/AddSwiftCmd.java @@ -40,13 +40,13 @@ public class AddSwiftCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "the URL for swift") + @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, description = "The URL for swift") private String url; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "the account for swift") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "The account for swift") private String account; - @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, description = "the username for swift") + @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, description = "The username for swift") private String username; @Parameter(name = ApiConstants.KEY, type = CommandType.STRING, description = " key for the user for swift") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/swift/ListSwiftsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/swift/ListSwiftsCmd.java index e21a23349bb5..6645cd60023c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/swift/ListSwiftsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/swift/ListSwiftsCmd.java @@ -35,7 +35,7 @@ public class ListSwiftsCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.LONG, description = "the id of the swift") + @Parameter(name = ApiConstants.ID, type = CommandType.LONG, description = "The id of the swift") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/DestroySystemVmCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/DestroySystemVmCmd.java index 7e0faab2fb50..3a7e1caa4dc3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/DestroySystemVmCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/DestroySystemVmCmd.java @@ -33,7 +33,7 @@ import com.cloud.user.Account; import com.cloud.vm.VirtualMachine; -@APICommand(name = "destroySystemVm", responseObject = SystemVmResponse.class, description = "Destroys a system virtual machine.", entityType = {VirtualMachine.class}, +@APICommand(name = "destroySystemVm", responseObject = SystemVmResponse.class, description = "Destroys a System VM.", entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DestroySystemVmCmd extends BaseAsyncCmd { @@ -43,7 +43,7 @@ public class DestroySystemVmCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = SystemVmResponse.class, required = true, - description = "The ID of the system virtual machine") + description = "The ID of the System VM") private Long id; public Long getId() { @@ -76,7 +76,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "destroying system vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); + return "Destroying system Instance: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java index 13113e17ea4d..d339df850168 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/ListSystemVMsCmd.java @@ -36,7 +36,7 @@ import com.cloud.utils.Pair; import com.cloud.vm.VirtualMachine; -@APICommand(name = "listSystemVms", description = "List system virtual machines.", responseObject = SystemVmResponse.class, entityType = {VirtualMachine.class}, +@APICommand(name = "listSystemVms", description = "List System VMs.", responseObject = SystemVmResponse.class, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListSystemVMsCmd extends BaseListCmd { @@ -45,33 +45,33 @@ public class ListSystemVMsCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, description = "the host ID of the system VM") + @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, description = "The host ID of the system VM") private Long hostId; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SystemVmResponse.class, description = "the ID of the system VM") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SystemVmResponse.class, description = "The ID of the system VM") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the system VM") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the system VM") private String systemVmName; - @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "the Pod ID of the system VM") + @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "The Pod ID of the system VM") private Long podId; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "the state of the system VM") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "The state of the system VM") private String state; @Parameter(name = ApiConstants.SYSTEM_VM_TYPE, type = CommandType.STRING, - description = "the system VM type. Possible types are \"consoleproxy\" and \"secondarystoragevm\".") + description = "The system VM type. Possible types are \"consoleproxy\" and \"secondarystoragevm\".") private String systemVmType; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID of the system VM") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID of the system VM") private Long zoneId; @Parameter(name = ApiConstants.STORAGE_ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, - description = "the storage ID where vm's volumes belong to", + description = "The storage ID where Instance's volumes belong to", since = "3.0.1") private Long storageId; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java index ccc6093aa834..8319883ec442 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/MigrateSystemVMCmd.java @@ -43,7 +43,7 @@ import com.cloud.user.Account; import com.cloud.vm.VirtualMachine; -@APICommand(name = "migrateSystemVm", description = "Attempts Migration of a system virtual machine to the host specified.", responseObject = SystemVmResponse.class, entityType = {VirtualMachine.class}, +@APICommand(name = "migrateSystemVm", description = "Attempts Migration of a System VM to the host specified.", responseObject = SystemVmResponse.class, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class MigrateSystemVMCmd extends BaseAsyncCmd { @@ -55,7 +55,7 @@ public class MigrateSystemVMCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, - description = "destination Host ID to migrate VM to") + description = "Destination Host ID to migrate Instance to") private Long hostId; @ACL(accessType = AccessType.OperateEntry) @@ -63,14 +63,14 @@ public class MigrateSystemVMCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = SystemVmResponse.class, required = true, - description = "the ID of the virtual machine") + description = "The ID of the Instance") private Long virtualMachineId; @Parameter(name = ApiConstants.STORAGE_ID, since = "4.16.0", type = CommandType.UUID, entityType = StoragePoolResponse.class, - description = "Destination storage pool ID to migrate VM volumes to. Required for migrating the root disk volume") + description = "Destination storage pool ID to migrate Instance volumes to. Required for migrating the root disk volume") private Long storageId; @Parameter(name = ApiConstants.AUTO_SELECT, @@ -120,7 +120,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Attempting to migrate VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVirtualMachineId()) + " to host Id: " + this._uuidMgr.getUuid(Host.class, getHostId()); + return "Attempting to migrate Instance Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVirtualMachineId()) + " to host Id: " + this._uuidMgr.getUuid(Host.class, getHostId()); } @Override @@ -136,7 +136,7 @@ public void execute() { // OfflineMigration performed when this parameter is specified StoragePool destStoragePool = _storageService.getStoragePool(getStorageId()); if (destStoragePool == null) { - throw new InvalidParameterValueException("Unable to find the storage pool to migrate the VM"); + throw new InvalidParameterValueException("Unable to find the storage pool to migrate the Instance"); } CallContext.current().setEventDetails("VM Id: " + getVirtualMachineId() + " to storage pool Id: " + getStorageId()); migratedVm = _userVmService.vmStorageMigration(getVirtualMachineId(), destStoragePool); @@ -145,10 +145,10 @@ public void execute() { if (getHostId() != null) { destinationHost =_resourceService.getHost(getHostId()); if (destinationHost == null) { - throw new InvalidParameterValueException("Unable to find the host to migrate the VM, host id=" + getHostId()); + throw new InvalidParameterValueException("Unable to find the host to migrate the Instance, host id=" + getHostId()); } if (destinationHost.getType() != Host.Type.Routing) { - throw new InvalidParameterValueException("The specified host(" + destinationHost.getName() + ") is not suitable to migrate the VM, please specify another one"); + throw new InvalidParameterValueException("The specified host(" + destinationHost.getName() + ") is not suitable to migrate the Instance, please specify another one"); } } else if (! isAutoSelect()) { throw new InvalidParameterValueException("Please specify a host or storage as destination, or pass 'autoselect=true' to automatically select a destination host which do not require storage migration"); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/PatchSystemVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/PatchSystemVMCmd.java index eafee7424ffc..6a4361061dfa 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/PatchSystemVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/PatchSystemVMCmd.java @@ -40,7 +40,7 @@ public class PatchSystemVMCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SystemVmResponse.class, - description = "patches systemVM - CPVM/SSVM with the specified ID") + description = "Patches System VM - CPVM/SSVM with the specified ID") private Long id; @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java index 30bd51184ac3..81affc714525 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/RebootSystemVmCmd.java @@ -46,10 +46,10 @@ public class RebootSystemVmCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = SystemVmResponse.class, required = true, - description = "The ID of the system virtual machine") + description = "The ID of the System VM") private Long id; - @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force reboot the system VM (System VM is Stopped and then Started)", since = "4.16.0") + @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force reboot the System VM (System VM is Stopped and then Started)", since = "4.16.0") private Boolean forced; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java index d822d4fc26ef..eaf927ae0f72 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/ScaleSystemVMCmd.java @@ -55,10 +55,10 @@ public class ScaleSystemVMCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SystemVmResponse.class, required = true, description = "The ID of the system vm") private Long id; - @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") + @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; - @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "name value pairs of custom parameters for cpuspeed, memory and cpunumber. example details[i].name=value") + @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "Name value pairs of custom parameters for cpuspeed, memory and cpunumber. example details[i].name=value") private Map details; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/StartSystemVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/StartSystemVMCmd.java index eac3d64ab59e..bfb6a240a62d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/StartSystemVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/StartSystemVMCmd.java @@ -33,7 +33,7 @@ import com.cloud.user.Account; import com.cloud.vm.VirtualMachine; -@APICommand(name = "startSystemVm", responseObject = SystemVmResponse.class, description = "Starts a system virtual machine.", entityType = {VirtualMachine.class}, +@APICommand(name = "startSystemVm", responseObject = SystemVmResponse.class, description = "Starts a System VM.", entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class StartSystemVMCmd extends BaseAsyncCmd { @@ -46,7 +46,7 @@ public class StartSystemVMCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = SystemVmResponse.class, required = true, - description = "The ID of the system virtual machine") + description = "The ID of the System VM") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java index 1d84382f5d22..e86b6a281215 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/StopSystemVmCmd.java @@ -49,10 +49,10 @@ public class StopSystemVmCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = SystemVmResponse.class, required = true, - description = "The ID of the system virtual machine") + description = "The ID of the System VM") private Long id; - @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the VM (vm is marked as Stopped even when command fails to be send to the backend, otherwise a force poweroff is attempted). To be used if the caller knows the VM is stopped and should be marked as such.") + @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the Instance (Instance is marked as Stopped even when command fails to be send to the backend, otherwise a force poweroff is attempted). To be used if the caller knows the Instance is stopped and should be marked as such.") private Boolean forced; ///////////////////////////////////////////////////// @@ -89,7 +89,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "stopping system vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); + return "Stopping system vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java index a42f00522496..4567c25a0d1a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/systemvm/UpgradeSystemVMCmd.java @@ -46,13 +46,13 @@ public class UpgradeSystemVMCmd extends BaseCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SystemVmResponse.class, required = true, description = "The ID of the system vm") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SystemVmResponse.class, required = true, description = "The ID of the System VM") private Long id; - @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") + @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; - @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "name value pairs of custom parameters for cpuspeed, memory and cpunumber. example details[i].name=value") + @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "Name value pairs of custom parameters for cpuspeed, memory and cpunumber. example details[i].name=value") private Map details; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/template/CopyTemplateCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/template/CopyTemplateCmdByAdmin.java index b937e0b940cc..8e2854db308d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/template/CopyTemplateCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/template/CopyTemplateCmdByAdmin.java @@ -21,6 +21,6 @@ import org.apache.cloudstack.api.command.user.template.CopyTemplateCmd; import org.apache.cloudstack.api.response.TemplateResponse; -@APICommand(name = "copyTemplate", description = "Copies a template from one zone to another.", responseObject = TemplateResponse.class, responseView = ResponseView.Full, +@APICommand(name = "copyTemplate", description = "Copies a Template from one zone to another.", responseObject = TemplateResponse.class, responseView = ResponseView.Full, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CopyTemplateCmdByAdmin extends CopyTemplateCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/template/CreateTemplateCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/template/CreateTemplateCmdByAdmin.java index 12609493b637..18a17c861ad1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/template/CreateTemplateCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/template/CreateTemplateCmdByAdmin.java @@ -22,7 +22,7 @@ import org.apache.cloudstack.api.command.user.template.CreateTemplateCmd; import org.apache.cloudstack.api.response.TemplateResponse; -@APICommand(name = "createTemplate", responseObject = TemplateResponse.class, description = "Creates a template of a virtual machine. " + "The virtual machine must be in a STOPPED state. " - + "A template created from this command is automatically designated as a private template visible to the account that created it.", responseView = ResponseView.Full, +@APICommand(name = "createTemplate", responseObject = TemplateResponse.class, description = "Creates a Template of an Instance. " + "The Instance must be in a STOPPED state. " + + "A Template created from this command is automatically designated as a private Template visible to the account that created it.", responseView = ResponseView.Full, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateTemplateCmdByAdmin extends CreateTemplateCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/template/ListTemplatePermissionsCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/template/ListTemplatePermissionsCmdByAdmin.java index ae0e220b4952..6115ff98f38a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/template/ListTemplatePermissionsCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/template/ListTemplatePermissionsCmdByAdmin.java @@ -1,4 +1,4 @@ -// Licensedname = "listTemplatePermissions", to the Apache Software Foundation (ASF) under one +// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file @@ -22,7 +22,7 @@ import org.apache.cloudstack.api.command.user.template.ListTemplatePermissionsCmd; import org.apache.cloudstack.api.response.TemplatePermissionsResponse; -@APICommand(name = "listTemplatePermissions", description = "List template visibility and all accounts that have permissions to view this template.", responseObject = TemplatePermissionsResponse.class, responseView = ResponseView.Full, +@APICommand(name = "listTemplatePermissions", description = "List Template visibility and all accounts that have permissions to view this Template.", responseObject = TemplatePermissionsResponse.class, responseView = ResponseView.Full, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListTemplatePermissionsCmdByAdmin extends ListTemplatePermissionsCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/template/ListTemplatesCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/template/ListTemplatesCmdByAdmin.java index 22eb0ff06599..54c0c8f702d5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/template/ListTemplatesCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/template/ListTemplatesCmdByAdmin.java @@ -28,7 +28,7 @@ import com.cloud.template.VirtualMachineTemplate; -@APICommand(name = "listTemplates", description = "List all public, private, and privileged templates.", +@APICommand(name = "listTemplates", description = "List all public, private, and privileged Templates.", responseObject = TemplateResponse.class, entityType = {VirtualMachineTemplate.class}, responseView = ResponseView.Full, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListTemplatesCmdByAdmin extends ListTemplatesCmd implements AdminCmd { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java index 9a59efb19f2a..136522d6bf80 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/template/PrepareTemplateCmd.java @@ -34,7 +34,7 @@ import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.Account; -@APICommand(name = "prepareTemplate", responseObject = TemplateResponse.class, description = "load template into primary storage", entityType = {VirtualMachineTemplate.class}, +@APICommand(name = "prepareTemplate", responseObject = TemplateResponse.class, description = "Load Template into primary storage", entityType = {VirtualMachineTemplate.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class PrepareTemplateCmd extends BaseCmd { @@ -47,7 +47,7 @@ public class PrepareTemplateCmd extends BaseCmd { type = CommandType.UUID, entityType = ZoneResponse.class, required = true, - description = "zone ID of the template to be prepared in primary storage(s).") + description = "Zone ID of the Template to be prepared in primary storage(s).") private Long zoneId; @ACL(accessType = AccessType.OperateEntry) @@ -55,7 +55,7 @@ public class PrepareTemplateCmd extends BaseCmd { type = CommandType.UUID, entityType = TemplateResponse.class, required = true, - description = "template ID of the template to be prepared in primary storage(s).") + description = "Template ID of the Template to be prepared in primary storage(s).") private Long templateId; @ACL(accessType = AccessType.OperateEntry) @@ -63,7 +63,7 @@ public class PrepareTemplateCmd extends BaseCmd { type = CommandType.UUID, entityType = StoragePoolResponse.class, required = false, - description = "storage pool ID of the primary storage pool to which the template should be prepared. If it is not provided the template" + + description = "Storage pool ID of the primary storage pool to which the Template should be prepared. If it is not provided the Template" + " is prepared on all the available primary storage pools.") private Long storageId; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/template/RegisterTemplateCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/template/RegisterTemplateCmdByAdmin.java index 91c0dd50e8e3..3eeb9ba7c737 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/template/RegisterTemplateCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/template/RegisterTemplateCmdByAdmin.java @@ -22,7 +22,7 @@ import org.apache.cloudstack.api.command.user.template.RegisterTemplateCmd; import org.apache.cloudstack.api.response.TemplateResponse; -@APICommand(name = "registerTemplate", description = "Registers an existing template into the CloudStack cloud.", responseObject = TemplateResponse.class, responseView = ResponseView.Full, +@APICommand(name = "registerTemplate", description = "Registers an existing Template into the CloudStack cloud.", responseObject = TemplateResponse.class, responseView = ResponseView.Full, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class RegisterTemplateCmdByAdmin extends RegisterTemplateCmd implements AdminCmd { } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/template/UpdateTemplateCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/template/UpdateTemplateCmdByAdmin.java index b1dfae3ed83f..b75a2c0755db 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/template/UpdateTemplateCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/template/UpdateTemplateCmdByAdmin.java @@ -22,7 +22,7 @@ import org.apache.cloudstack.api.command.user.template.UpdateTemplateCmd; import org.apache.cloudstack.api.response.TemplateResponse; -@APICommand(name = "updateTemplate", description = "Updates attributes of a template.", responseObject = TemplateResponse.class, responseView = ResponseView.Full, +@APICommand(name = "updateTemplate", description = "Updates attributes of a Template.", responseObject = TemplateResponse.class, responseView = ResponseView.Full, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdateTemplateCmdByAdmin extends UpdateTemplateCmd implements AdminCmd { } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java index b1810676b744..2ba3b321887d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/AddTrafficTypeCmd.java @@ -46,10 +46,10 @@ public class AddTrafficTypeCmd extends BaseAsyncCreateCmd { type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, required = true, - description = "the Physical Network ID") + description = "The Physical Network ID") private Long physicalNetworkId; - @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, required = true, description = "the trafficType to be added to the physical network") + @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, required = true, description = "The trafficType to be added to the physical network") private String trafficType; @Parameter(name = ApiConstants.XENSERVER_NETWORK_LABEL, @@ -80,7 +80,7 @@ public class AddTrafficTypeCmd extends BaseAsyncCreateCmd { @Parameter(name = ApiConstants.VLAN, type = CommandType.STRING, description = "The VLAN id to be used for Management traffic by VMware host") private String vlan; - @Parameter(name=ApiConstants.ISOLATION_METHOD, type=CommandType.STRING, description="Used if physical network has multiple isolation types and traffic type is public." + @Parameter(name=ApiConstants.ISOLATION_METHOD, type=CommandType.STRING, description = "Used if physical network has multiple isolation types and traffic type is public." + " Choose which isolation method. Valid options currently 'vlan' or 'vxlan', defaults to 'vlan'.") private String isolationMethod; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficTypeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficTypeCmd.java index a1e4ebda09a3..d8813eefa6af 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficTypeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/DeleteTrafficTypeCmd.java @@ -38,7 +38,7 @@ public class DeleteTrafficTypeCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TrafficTypeResponse.class, required = true, description = "traffic type id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TrafficTypeResponse.class, required = true, description = "Traffic type ID") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/ListTrafficMonitorsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/ListTrafficMonitorsCmd.java index ed42bc42dbd1..03e17631ba8a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/ListTrafficMonitorsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/ListTrafficMonitorsCmd.java @@ -38,7 +38,7 @@ public class ListTrafficMonitorsCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "zone Id") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "Zone ID") private long zoneId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java index d106a736fcab..dc6e0f5dd69d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/ListTrafficTypesCmd.java @@ -26,14 +26,13 @@ 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 com.cloud.network.PhysicalNetworkTrafficType; import com.cloud.user.Account; import com.cloud.utils.Pair; -@APICommand(name = "listTrafficTypes", description = "Lists traffic types of a given physical network.", responseObject = ProviderResponse.class, since = "3.0.0", +@APICommand(name = "listTrafficTypes", description = "Lists traffic types of a given physical network.", responseObject = TrafficTypeResponse.class, since = "3.0.0", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListTrafficTypesCmd extends BaseListCmd { @@ -44,7 +43,7 @@ public class ListTrafficTypesCmd extends BaseListCmd { type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, required = true, - description = "the Physical Network ID") + description = "The Physical Network ID") private Long physicalNetworkId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java index c7b3c2b433b4..0de4cfb7edda 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/usage/UpdateTrafficTypeCmd.java @@ -39,7 +39,7 @@ public class UpdateTrafficTypeCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TrafficTypeResponse.class, required = true, description = "traffic type id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TrafficTypeResponse.class, required = true, description = "Traffic type ID") private Long id; @Parameter(name = ApiConstants.XENSERVER_NETWORK_LABEL, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java index e2a2baecc866..f03bb1c4ddd3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/user/CreateUserCmd.java @@ -52,13 +52,13 @@ public class CreateUserCmd extends BaseCmd { description = "Creates the user under the specified domain. Has to be accompanied with the account parameter") private Long domainId; - @Parameter(name = ApiConstants.EMAIL, type = CommandType.STRING, required = true, description = "email") + @Parameter(name = ApiConstants.EMAIL, type = CommandType.STRING, required = true, description = "Email") private String email; - @Parameter(name = ApiConstants.FIRSTNAME, type = CommandType.STRING, required = true, description = "firstname") + @Parameter(name = ApiConstants.FIRSTNAME, type = CommandType.STRING, required = true, description = "Firstname") private String firstname; - @Parameter(name = ApiConstants.LASTNAME, type = CommandType.STRING, required = true, description = "lastname") + @Parameter(name = ApiConstants.LASTNAME, type = CommandType.STRING, required = true, description = "Lastname") private String lastname; @Parameter(name = ApiConstants.PASSWORD, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java index ddf21affb535..f954ac939c3c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/user/DeleteUserCmd.java @@ -42,7 +42,7 @@ public class DeleteUserCmd extends BaseCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserResponse.class, required = true, description = "id of the user to be deleted") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserResponse.class, required = true, description = "ID of the user to be deleted") private Long id; @Inject diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/user/GetUserKeysCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/user/GetUserKeysCmd.java index cdd239f72b57..f04c5f6c478c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/user/GetUserKeysCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/user/GetUserKeysCmd.java @@ -26,14 +26,14 @@ import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.Parameter; -import org.apache.cloudstack.api.response.RegisterResponse; +import org.apache.cloudstack.api.response.RegisterUserKeyResponse; import org.apache.cloudstack.api.response.UserResponse; import java.util.Map; @APICommand(name = "getUserKeys", description = "This command allows the user to query the seceret and API keys for the account", - responseObject = RegisterResponse.class, + responseObject = RegisterUserKeyResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true, authorized = {RoleType.User, RoleType.Admin, RoleType.DomainAdmin, RoleType.ResourceAdmin}, @@ -57,7 +57,7 @@ public Long getID(){ public void execute(){ Pair> keys = _accountService.getKeys(this); - RegisterResponse response = new RegisterResponse(); + RegisterUserKeyResponse response = new RegisterUserKeyResponse(); if(keys != null){ response.setApiKeyAccess(keys.first()); response.setApiKey(keys.second().get("apikey")); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/user/ListUsersCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/user/ListUsersCmd.java index 2f29b1ec1e4d..0fe83fd0796c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/user/ListUsersCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/user/ListUsersCmd.java @@ -63,7 +63,7 @@ public class ListUsersCmd extends BaseListAccountResourcesCmd implements UserCmd private String apiKeyAccess; @Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN, - description = "flag to display the resource icon for users") + description = "Flag to display the resource icon for users") private Boolean showIcon; @Parameter(name = ApiConstants.USER_SOURCE, type = CommandType.STRING, since = "4.21.0.0", diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/user/MoveUserCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/user/MoveUserCmd.java index e57258a45711..a160486c51c4 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/user/MoveUserCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/user/MoveUserCmd.java @@ -54,7 +54,7 @@ public class MoveUserCmd extends BaseCmd { type = CommandType.UUID, entityType = UserResponse.class, required = true, - description = "id of the user to be moved.") + description = "ID of the user to be moved.") private Long id; @Parameter(name = ApiConstants.ACCOUNT, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/user/RegisterCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/user/RegisterUserKeyCmd.java similarity index 93% rename from api/src/main/java/org/apache/cloudstack/api/command/admin/user/RegisterCmd.java rename to api/src/main/java/org/apache/cloudstack/api/command/admin/user/RegisterUserKeyCmd.java index b3e7d2bec821..61f47e2799c6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/user/RegisterCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/user/RegisterUserKeyCmd.java @@ -22,17 +22,17 @@ import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.Parameter; -import org.apache.cloudstack.api.response.RegisterResponse; +import org.apache.cloudstack.api.response.RegisterUserKeyResponse; import org.apache.cloudstack.api.response.UserResponse; import com.cloud.user.Account; import com.cloud.user.User; @APICommand(name = "registerUserKeys", - responseObject = RegisterResponse.class, + responseObject = RegisterUserKeyResponse.class, description = "This command allows a user to register for the developer API, returning a secret key and an API key. This request is made through the integration API port, so it is a privileged command and must be made on behalf of a user. It is up to the implementer just how the username and password are entered, and then how that translates to an integration API request. Both secret key and API key should be returned to the user", requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) -public class RegisterCmd extends BaseCmd { +public class RegisterUserKeyCmd extends BaseCmd { ///////////////////////////////////////////////////// @@ -81,7 +81,7 @@ public ApiCommandResourceType getApiResourceType() { @Override public void execute() { String[] keys = _accountService.createApiKeyAndSecretKey(this); - RegisterResponse response = new RegisterResponse(); + RegisterUserKeyResponse response = new RegisterUserKeyResponse(); if (keys != null) { response.setApiKey(keys[0]); response.setSecretKey(keys[1]); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java index 3d7f51ae2204..cc0b2e4954ce 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/user/UpdateUserCmd.java @@ -46,16 +46,16 @@ public class UpdateUserCmd extends BaseCmd { @Parameter(name = ApiConstants.USER_API_KEY, type = CommandType.STRING, description = "The API key for the user. Must be specified with userSecretKey") private String apiKey; - @Parameter(name = ApiConstants.EMAIL, type = CommandType.STRING, description = "email") + @Parameter(name = ApiConstants.EMAIL, type = CommandType.STRING, description = "Email") private String email; - @Parameter(name = ApiConstants.FIRSTNAME, type = CommandType.STRING, description = "first name") + @Parameter(name = ApiConstants.FIRSTNAME, type = CommandType.STRING, description = "First name") private String firstname; @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserResponse.class, required = true, description = "User uuid") private Long id; - @Parameter(name = ApiConstants.LASTNAME, type = CommandType.STRING, description = "last name") + @Parameter(name = ApiConstants.LASTNAME, type = CommandType.STRING, description = "Last name") private String lastname; @Parameter(name = ApiConstants.PASSWORD, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/CreateVlanIpRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/CreateVlanIpRangeCmd.java index 5cb384925e83..67278991383c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/CreateVlanIpRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/CreateVlanIpRangeCmd.java @@ -19,6 +19,7 @@ import com.cloud.configuration.ConfigurationService; import com.cloud.network.Network; import com.cloud.utils.net.NetUtils; +import com.cloud.utils.StringUtils; import org.apache.cloudstack.api.APICommand; import org.apache.cloudstack.api.ApiConstants; @@ -53,66 +54,66 @@ public class CreateVlanIpRangeCmd extends BaseCmd { @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, - description = "account who will own the VLAN. If VLAN is Zone wide, this parameter should be omitted") + description = "Account who will own the VLAN. If VLAN is Zone wide, this parameter should be omitted") private String accountName; @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, - description = "project who will own the VLAN. If VLAN is Zone wide, this parameter should be omitted") + description = "Project who will own the VLAN. If VLAN is Zone wide, this parameter should be omitted") private Long projectId; - @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "domain ID of the account owning a VLAN") + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Domain ID of the Account owning a VLAN") private Long domainId; - @Parameter(name = ApiConstants.END_IP, type = CommandType.STRING, description = "the ending IP address in the VLAN IP range") + @Parameter(name = ApiConstants.END_IP, type = CommandType.STRING, description = "The ending IP address in the VLAN IP range") private String endIp; - @Parameter(name = ApiConstants.FOR_VIRTUAL_NETWORK, type = CommandType.BOOLEAN, description = "true if VLAN is of Virtual type, false if Direct") + @Parameter(name = ApiConstants.FOR_VIRTUAL_NETWORK, type = CommandType.BOOLEAN, description = "True if VLAN is of Virtual type, false if Direct") private Boolean forVirtualNetwork; - @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, description = "the gateway of the VLAN IP range") + @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, description = "The gateway of the VLAN IP range") private String gateway; - @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, description = "the netmask of the VLAN IP range") + @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, description = "The netmask of the VLAN IP range") private String netmask; @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, - description = "optional parameter. Have to be specified for Direct Untagged vlan only.") + description = "Optional parameter. Have to be specified for Direct Untagged vlan only.") private Long podId; - @Parameter(name = ApiConstants.START_IP, type = CommandType.STRING, 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," + @Parameter(name = ApiConstants.VLAN, type = CommandType.STRING, description = "The ID or VID of the VLAN. If not specified," + " will be defaulted to the vlan of the network or if vlan of the network is null - to Untagged") private String vlan; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID of the VLAN IP range") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID of the VLAN IP range") private Long zoneId; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "the network id") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "The Network ID") private Long networkID; - @Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, description = "the physical network id") + @Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, 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") + @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") + @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 " + @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") + @Parameter(name = ApiConstants.IP6_CIDR, type = CommandType.STRING, description = "The CIDR of IPv6 network, must be at least /64") private String ip6Cidr; - @Parameter(name = ApiConstants.FOR_SYSTEM_VMS, type = CommandType.BOOLEAN, description = "true if IP range is set to system vms, false if not") + @Parameter(name = ApiConstants.FOR_SYSTEM_VMS, type = CommandType.BOOLEAN, description = "True if IP range is set to System VMs, false if not") private Boolean forSystemVms; @Parameter(name = ApiConstants.PROVIDER, type = CommandType.STRING, description = "Provider name for which the IP range is reserved for", since = "4.21.0") @@ -163,7 +164,7 @@ public Network.Provider getProvider() { } public String getVlan() { - if ((vlan == null || vlan.isEmpty()) && !ConfigurationService.IsIpRangeForProvider(getProvider())) { + if (StringUtils.isBlank(vlan) && !ConfigurationService.IsIpRangeForProvider(getProvider())) { vlan = "untagged"; } return vlan; @@ -231,13 +232,13 @@ public void execute() throws ResourceUnavailableException, ResourceAllocationExc response.setResponseName(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create vlan ip range"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create VLAN IP range"); } } catch (ConcurrentOperationException ex) { logger.warn("Exception: ", ex); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage()); } catch (InsufficientCapacityException ex) { - logger.info(ex); + logger.error(ex); throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, ex.getMessage()); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/DedicatePublicIpRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/DedicatePublicIpRangeCmd.java index cac029f3aa12..d4872fa369a6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/DedicatePublicIpRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/DedicatePublicIpRangeCmd.java @@ -41,20 +41,20 @@ public class DedicatePublicIpRangeCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VlanIpRangeResponse.class, required = true, description = "the id of the VLAN IP range") + @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, description = "account who will own the VLAN") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, 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") + @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") + description = "Domain ID of the account owning a VLAN") private Long domainId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/DeleteVlanIpRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/DeleteVlanIpRangeCmd.java index 7ab0b053004c..768b6ecf4192 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/DeleteVlanIpRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/DeleteVlanIpRangeCmd.java @@ -37,7 +37,7 @@ public class DeleteVlanIpRangeCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VlanIpRangeResponse.class, required = true, description = "the id of the VLAN IP range") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VlanIpRangeResponse.class, required = true, description = "The ID of the VLAN IP range") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/ListVlanIpRangesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/ListVlanIpRangesCmd.java index c11b505c684d..875b36f5fe9b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/ListVlanIpRangesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/ListVlanIpRangesCmd.java @@ -47,41 +47,41 @@ public class ListVlanIpRangesCmd extends BaseListCmd { @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, - description = "the account with which the VLAN IP range is associated. Must be used with the domainId parameter.") + description = "The account with which the VLAN IP range is associated. Must be used with the domainId parameter.") private String accountName; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "project who will own the VLAN") + @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, - description = "the domain ID with which the VLAN IP range is associated. If used with the account parameter, " + + description = "The domain ID with which the VLAN IP range is associated. If used with the account parameter, " + "returns all VLAN IP ranges for that account in the specified domain.") private Long domainId; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VlanIpRangeResponse.class, required = false, description = "the ID of the VLAN IP range") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VlanIpRangeResponse.class, required = false, description = "The ID of the VLAN IP range") private Long id; - @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "the Pod ID of the VLAN IP range") + @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "The Pod ID of the VLAN IP range") private Long podId; - @Parameter(name = ApiConstants.VLAN, type = CommandType.STRING, description = "the ID or VID of the VLAN. Default is an \"untagged\" VLAN.") + @Parameter(name = ApiConstants.VLAN, type = CommandType.STRING, description = "The ID or VID of the VLAN. Default is an \"untagged\" VLAN.") private String vlan; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the Zone ID of the VLAN IP range") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The Zone ID of the VLAN IP range") private Long zoneId; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "network id of the VLAN IP range") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "Network ID of the VLAN IP range") private Long networkId; - @Parameter(name = ApiConstants.FOR_VIRTUAL_NETWORK, type = CommandType.BOOLEAN, description = "true if VLAN is of Virtual type, false if Direct") + @Parameter(name = ApiConstants.FOR_VIRTUAL_NETWORK, type = CommandType.BOOLEAN, description = "True if VLAN is of Virtual type, false if Direct") private Boolean forVirtualNetwork; @Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, - description = "physical network id of the VLAN IP range") + description = "Physical Network ID of the VLAN IP range") private Long physicalNetworkId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/ReleasePublicIpRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/ReleasePublicIpRangeCmd.java index be4cea41cd89..e369516f5eec 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/ReleasePublicIpRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/ReleasePublicIpRangeCmd.java @@ -37,7 +37,7 @@ public class ReleasePublicIpRangeCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VlanIpRangeResponse.class, required = true, description = "the id of the Public IP range") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VlanIpRangeResponse.class, required = true, description = "The ID of the Public IP range") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/UpdateVlanIpRangeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/UpdateVlanIpRangeCmd.java index df6d99f8e2af..be8e8b39d4ed 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/UpdateVlanIpRangeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vlan/UpdateVlanIpRangeCmd.java @@ -45,35 +45,35 @@ public class UpdateVlanIpRangeCmd extends BaseCmd { @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VlanIpRangeResponse.class, required = true, - description = "the UUID of the VLAN IP range") + description = "The UUID of the VLAN IP range") private Long id; - @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, description = "the gateway of the VLAN IP range") + @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, description = "The gateway of the VLAN IP range") private String gateway; - @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, description = "the netmask of the VLAN IP range") + @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, description = "The netmask of the VLAN IP range") private String netmask; - @Parameter(name = ApiConstants.START_IP, type = CommandType.STRING, 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.END_IP, type = CommandType.STRING, - description = "the ending IP address in the VLAN IP range") + description = "The ending IP address in the VLAN IP range") private String endIp; - @Parameter(name = ApiConstants.START_IPV6, type = CommandType.STRING, description = "the beginning IPv6 address in the IPv6 network range") + @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") + @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") + @Parameter(name = ApiConstants.IP6_GATEWAY, type = CommandType.STRING, description = "The gateway of the IPv6 Network") private String ip6Gateway; - @Parameter(name = ApiConstants.IP6_CIDR, type = CommandType.STRING, description = "the CIDR of IPv6 network, must be at least /64") + @Parameter(name = ApiConstants.IP6_CIDR, type = CommandType.STRING, description = "The CIDR of IPv6 Network, must be at least /64") private String ip6Cidr; - @Parameter(name = ApiConstants.FOR_SYSTEM_VMS, type = CommandType.BOOLEAN, description = "true if IP range is set to system vms, false if not") + @Parameter(name = ApiConstants.FOR_SYSTEM_VMS, type = CommandType.BOOLEAN, description = "True if IP range is set to System VM, false if not") private Boolean forSystemVms; ///////////////////////////////////////////////////// @@ -144,7 +144,7 @@ public void execute() throws ResourceUnavailableException, ResourceAllocationExc response.setResponseName(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to Update vlan ip range"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to Update VLAN IP range"); } } catch (ConcurrentOperationException ex) { logger.warn("Exception: ", ex); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/AddNicToVMCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/AddNicToVMCmdByAdmin.java index 7a8c409c8a8f..ce421433d50b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/AddNicToVMCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/AddNicToVMCmdByAdmin.java @@ -25,6 +25,6 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "addNicToVirtualMachine", description = "Adds VM to specified network by creating a NIC", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "addNicToVirtualMachine", description = "Adds Instance to specified network by creating a NIC", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class AddNicToVMCmdByAdmin extends AddNicToVMCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java index 6f6a5237b3d1..e11d20d06466 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/AssignVMCmd.java @@ -39,7 +39,7 @@ import com.cloud.vm.VirtualMachine; @APICommand(name = "assignVirtualMachine", - description = "Change ownership of a VM from one account to another. This API is available for Basic zones with security groups and Advanced zones with guest networks. A root administrator can reassign a VM from any account to any other account in any domain. A domain administrator can reassign a VM to any account in the same domain.", + description = "Change ownership of an Instance from one account to another. This API is available for Basic zones with security groups and Advanced zones with guest networks. A root administrator can reassign an Instance from any account to any other account in any domain. A domain administrator can reassign an Instance to any account in the same domain.", responseObject = UserVmResponse.class, since = "3.0.0", entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, @@ -55,16 +55,16 @@ public class AssignVMCmd extends BaseCmd { type = CommandType.UUID, entityType = UserVmResponse.class, required = true, - description = "id of the VM to be moved") + description = "ID of the Instance to be moved") private Long virtualMachineId; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "account name of the new VM owner.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Account name of the new Instance owner.") private String accountName; - @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "domain id of the new VM owner.") + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Domain id of the new Instance owner.") private Long domainId; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "an optional project for the new VM owner.") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "An optional project for the new Instance owner.") private Long projectId; //Network information @@ -72,7 +72,7 @@ public class AssignVMCmd extends BaseCmd { type = CommandType.LIST, collectionType = CommandType.UUID, entityType = NetworkResponse.class, - 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. " + description = "List of new network IDs in which the moved Instance will participate. In case no network ids are provided the Instance 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; @@ -81,8 +81,8 @@ public class AssignVMCmd extends BaseCmd { type = CommandType.LIST, collectionType = CommandType.UUID, entityType = SecurityGroupResponse.class, - 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.") + description = "List of security group ids to be applied on the Instance. " + + "In case no security groups are provided the Instance is part of the default security group.") private List securityGroupIdList; ///////////////////////////////////////////////////// @@ -126,7 +126,7 @@ public void execute() { setResponseObject(response); } catch (Exception e) { ApiErrorCode errorCode = e instanceof InvalidParameterValueException ? ApiErrorCode.PARAM_ERROR : ApiErrorCode.INTERNAL_ERROR; - String msg = String.format("Failed to move VM [%s].", getVmId()); + String msg = String.format("Failed to move Instance due to [%s].", getVmId()); logger.error(msg, e); throw new ServerApiException(errorCode, msg); } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/DeployVMCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/DeployVMCmdByAdmin.java index 6bb7657b86ba..e64c8b3f46c6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/DeployVMCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/DeployVMCmdByAdmin.java @@ -30,15 +30,15 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "deployVirtualMachine", description = "Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "deployVirtualMachine", description = "Creates and automatically starts an Instance based on a service offering, disk offering, and Template.", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class DeployVMCmdByAdmin extends DeployVMCmd implements AdminCmd { - @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "destination Pod ID to deploy the VM to - parameter available for root admin only", since = "4.13") + @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "Destination Pod ID to deploy the Instance to - parameter available for root admin only", since = "4.13") private Long podId; - @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "destination Cluster ID to deploy the VM to - parameter available for root admin only", since = "4.13") + @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "Destination Cluster ID to deploy the Instance to - parameter available for root admin only", since = "4.13") private Long clusterId; public Long getPodId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/DestroyVMCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/DestroyVMCmdByAdmin.java index 08a13649bfa9..93d4b610b900 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/DestroyVMCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/DestroyVMCmdByAdmin.java @@ -24,7 +24,7 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "destroyVirtualMachine", description = "Destroys a virtual machine. Once destroyed, only the administrator can recover it.", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "destroyVirtualMachine", description = "Destroys an Instance. Once destroyed, only the administrator can recover it.", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class DestroyVMCmdByAdmin extends DestroyVMCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ExpungeVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ExpungeVMCmd.java index a964e873bad1..74ebab59de48 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ExpungeVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ExpungeVMCmd.java @@ -39,7 +39,7 @@ import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.vm.VirtualMachine; -@APICommand(name = "expungeVirtualMachine", description = "Expunge a virtual machine. Once expunged, it cannot be recoverd.", responseObject = SuccessResponse.class, entityType = {VirtualMachine.class}, +@APICommand(name = "expungeVirtualMachine", description = "Expunge an Instance. Once expunged, it cannot be recovered.", responseObject = SuccessResponse.class, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ExpungeVMCmd extends BaseAsyncCmd { @@ -49,7 +49,7 @@ public class ExpungeVMCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the virtual machine") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the Instance") private Long id; ///////////////////////////////////////////////////// @@ -81,7 +81,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Expunging vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); + return "Expunging Instance: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); } @Override @@ -104,7 +104,7 @@ public void execute() throws ResourceUnavailableException, ConcurrentOperationEx SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to expunge vm"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to expunge Instance"); } } catch (InvalidParameterValueException ipve) { throw new ServerApiException(ApiErrorCode.PARAM_ERROR, ipve.getMessage()); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/GetVMUserDataCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/GetVMUserDataCmd.java index 8745ef12ce44..2f0aba43ad0e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/GetVMUserDataCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/GetVMUserDataCmd.java @@ -28,7 +28,7 @@ import com.cloud.user.Account; import com.cloud.uservm.UserVm; -@APICommand(name = "getVirtualMachineUserData", description = "Returns user data associated with the VM", responseObject = VMUserDataResponse.class, since = "4.4", +@APICommand(name = "getVirtualMachineUserData", description = "Returns user data associated with the Instance", responseObject = VMUserDataResponse.class, since = "4.4", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class GetVMUserDataCmd extends BaseCmd { @@ -36,7 +36,7 @@ public class GetVMUserDataCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the virtual machine") + @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the Instance") private Long vmId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ImportUnmanagedInstanceCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ImportUnmanagedInstanceCmd.java index ae6ceff26c7d..1164037dfc87 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ImportUnmanagedInstanceCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ImportUnmanagedInstanceCmd.java @@ -56,7 +56,7 @@ import com.cloud.vm.VmDetailConstants; @APICommand(name = "importUnmanagedInstance", - description = "Import unmanaged virtual machine from a given cluster.", + description = "Import unmanaged Instance from a given cluster.", responseObject = UserVmResponse.class, responseView = ResponseObject.ResponseView.Full, requestHasSensitiveInfo = false, @@ -76,83 +76,83 @@ public class ImportUnmanagedInstanceCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = ClusterResponse.class, required = true, - description = "the cluster ID") + description = "The cluster ID") private Long clusterId; @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, - description = "the name of the instance as it is known to the hypervisor") + description = "The name of the Instance as it is known to the hypervisor") private String name; @Parameter(name = ApiConstants.DISPLAY_NAME, type = CommandType.STRING, - description = "the display name of the instance") + description = "The display name of the Instance") private String displayName; @Parameter(name = ApiConstants.HOST_NAME, type = CommandType.STRING, - description = "the host name of the instance") + description = "The host name of the Instance") private String hostName; @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, - description = "an optional account for the virtual machine. Must be used with domainId.") + description = "An optional account for the Instance. Must be used with domainId.") private String accountName; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "import instance to the domain specified") + description = "Import Instance to the domain specified") private Long domainId; @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, - description = "import instance for the project") + description = "Import Instance for the project") private Long projectId; @Parameter(name = ApiConstants.TEMPLATE_ID, type = CommandType.UUID, entityType = TemplateResponse.class, - description = "the ID of the template for the virtual machine") + description = "The ID of the Template for the Instance") private Long templateId; @Parameter(name = ApiConstants.SERVICE_OFFERING_ID, type = CommandType.UUID, entityType = ServiceOfferingResponse.class, required = true, - description = "the service offering for the virtual machine") + description = "The service offering for the Instance") private Long serviceOfferingId; @Parameter(name = ApiConstants.NIC_NETWORK_LIST, type = CommandType.MAP, - description = "VM nic to network id mapping using keys nic and network") + description = "VM NIC to network id mapping using keys NIC and network") private Map nicNetworkList; @Parameter(name = ApiConstants.NIC_IP_ADDRESS_LIST, type = CommandType.MAP, - description = "VM nic to ip address mapping using keys nic, ip4Address") + description = "VM NIC to ip address mapping using keys NIC, ip4Address") private Map nicIpAddressList; @Parameter(name = ApiConstants.DATADISK_OFFERING_LIST, type = CommandType.MAP, - description = "datadisk template to disk-offering mapping using keys disk and diskOffering") + description = "Datadisk Template to disk-offering mapping using keys disk and diskOffering") private Map dataDiskToDiskOfferingList; @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, - description = "used to specify the custom parameters.") + description = "Used to specify the custom parameters.") private Map details; @Parameter(name = ApiConstants.MIGRATE_ALLOWED, type = CommandType.BOOLEAN, - description = "vm and its volumes are allowed to migrate to different host/pool when offerings passed are incompatible with current host/pool") + description = "Instance and its volumes are allowed to migrate to different host/pool when offerings passed are incompatible with current host/pool") private Boolean migrateAllowed; @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, - description = "VM is imported despite some of its NIC's MAC addresses are already present, in case the MAC address exists then a new MAC address is generated") + description = "Instance is imported despite some of its NIC's MAC addresses are already present, in case the MAC address exists then a new MAC address is generated") private Boolean forced; ///////////////////////////////////////////////////// @@ -201,9 +201,7 @@ public Map getNicNetworkList() { for (Map entry : (Collection>)nicNetworkList.values()) { String nic = entry.get(VmDetailConstants.NIC); String networkUuid = entry.get(VmDetailConstants.NETWORK); - if (logger.isDebugEnabled()) { - logger.debug(String.format("nic, '%s', goes on net, '%s'", nic, networkUuid)); - } + logger.debug("Checking if NIC '{}' can be mapped on network '{}'", nic, networkUuid); if (StringUtils.isAnyEmpty(nic, networkUuid) || _entityMgr.findByUuid(Network.class, networkUuid) == null) { throw new InvalidParameterValueException(String.format("Network ID: %s for NIC ID: %s is invalid", networkUuid, nic)); } @@ -219,9 +217,7 @@ public Map getNicIpAddressList() { for (Map entry : (Collection>)nicIpAddressList.values()) { String nic = entry.get(VmDetailConstants.NIC); String ipAddress = StringUtils.defaultIfEmpty(entry.get(VmDetailConstants.IP4_ADDRESS), null); - if (logger.isDebugEnabled()) { - logger.debug(String.format("nic, '%s', gets ip, '%s'", nic, ipAddress)); - } + logger.debug("Checking if IP address '{}' can be mapped to NIC '{}'", ipAddress, nic); if (StringUtils.isEmpty(nic)) { throw new InvalidParameterValueException(String.format("NIC ID: '%s' is invalid for IP address mapping", nic)); } @@ -244,9 +240,7 @@ public Map getDataDiskToDiskOfferingList() { for (Map entry : (Collection>)dataDiskToDiskOfferingList.values()) { String disk = entry.get(VmDetailConstants.DISK); String offeringUuid = entry.get(VmDetailConstants.DISK_OFFERING); - if (logger.isTraceEnabled()) { - logger.trace(String.format("disk, '%s', gets offering, '%s'", disk, offeringUuid)); - } + logger.trace("Checking if offering '{}' can be used on disk '{}'", offeringUuid, disk); if (StringUtils.isAnyEmpty(disk, offeringUuid) || _entityMgr.findByUuid(DiskOffering.class, offeringUuid) == null) { throw new InvalidParameterValueException(String.format("Disk offering ID: %s for disk ID: %s is invalid", offeringUuid, disk)); } @@ -278,7 +272,7 @@ public String getEventType() { @Override public String getEventDescription() { String vmName = this.name; - return String.format("Importing unmanaged VM: %s", vmName); + return String.format("Importing unmanaged Instance: %s", vmName); } public boolean isForced() { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ListUnmanagedInstancesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ListUnmanagedInstancesCmd.java index 6932aa383fa2..1d6285684471 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ListUnmanagedInstancesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ListUnmanagedInstancesCmd.java @@ -41,7 +41,7 @@ import com.cloud.user.Account; @APICommand(name = "listUnmanagedInstances", - description = "Lists unmanaged virtual machines for a given cluster.", + description = "Lists unmanaged Instances for a given cluster.", responseObject = UnmanagedInstanceResponse.class, responseView = ResponseObject.ResponseView.Full, entityType = {UnmanagedInstanceTO.class}, @@ -62,12 +62,12 @@ public class ListUnmanagedInstancesCmd extends BaseListCmd { type = CommandType.UUID, entityType = ClusterResponse.class, required = true, - description = "the cluster ID") + description = "The cluster ID") private Long clusterId; @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, - description = "the hypervisor name of the instance") + description = "The hypervisor name of the Instance") private String name; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ListVMsCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ListVMsCmdByAdmin.java index b48941e7d17a..52309855a7a2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ListVMsCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ListVMsCmdByAdmin.java @@ -30,7 +30,7 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "listVirtualMachines", description = "List the virtual machines owned by the account.", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "listVirtualMachines", description = "List the Instances owned by the account.", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class ListVMsCmdByAdmin extends ListVMsCmd implements AdminCmd { @@ -39,19 +39,19 @@ public class ListVMsCmdByAdmin extends ListVMsCmd implements AdminCmd { ///////////////////////////////////////////////////// @Parameter(name=ApiConstants.HOST_ID, type=CommandType.UUID, entityType=HostResponse.class, - description="the host ID") + description = "The host ID") private Long hostId; @Parameter(name=ApiConstants.POD_ID, type=CommandType.UUID, entityType=PodResponse.class, - description="the pod ID") + description = "The pod ID") private Long podId; @Parameter(name=ApiConstants.STORAGE_ID, type=CommandType.UUID, entityType=StoragePoolResponse.class, - description="the storage ID where vm's volumes belong to") + description = "The storage ID where Instance's volumes belong to") private Long storageId; @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, - description = "the cluster ID", since = "4.16.0") + description = "The cluster ID", since = "4.16.0") private Long clusterId; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java index 0bc993ef1f71..f6335307a382 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVMCmd.java @@ -45,7 +45,7 @@ import com.cloud.vm.VirtualMachine; @APICommand(name = "migrateVirtualMachine", - description = "Attempts Migration of a VM to a different host or Root volume of the vm to a different storage pool", + description = "Attempts Migration of an Instance to a different host or Root volume of the Instance to a different storage pool", responseObject = UserVmResponse.class, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) @@ -60,21 +60,21 @@ public class MigrateVMCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = HostResponse.class, required = false, - description = "Destination Host ID to migrate VM to.") + description = "Destination Host ID to migrate Instance to.") private Long hostId; @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, - description = "the ID of the virtual machine") + description = "The ID of the Instance") private Long virtualMachineId; @Parameter(name = ApiConstants.STORAGE_ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, required = false, - description = "Destination storage pool ID to migrate VM volumes to. Required for migrating the root disk volume") + description = "Destination storage pool ID to migrate Instance volumes to. Required for migrating the root disk volume") private Long storageId; @Parameter(name = ApiConstants.AUTO_SELECT, @@ -126,11 +126,11 @@ public String getEventType() { public String getEventDescription() { String eventDescription; if (getHostId() != null) { - eventDescription = String.format("Attempting to migrate VM id: %s to host Id: %s", getVirtualMachineId(), getHostId()); + eventDescription = String.format("Attempting to migrate Instance id: %s to host Id: %s", getVirtualMachineId(), getHostId()); } else if (getStoragePoolId() != null) { - eventDescription = String.format("Attempting to migrate VM id: %s to storage pool Id: %s", getVirtualMachineId(), getStoragePoolId()); + eventDescription = String.format("Attempting to migrate Instance id: %s to storage pool Id: %s", getVirtualMachineId(), getStoragePoolId()); } else { - eventDescription = String.format("Attempting to migrate VM id: %s", getVirtualMachineId()); + eventDescription = String.format("Attempting to migrate Instance id: %s", getVirtualMachineId()); } return eventDescription; } @@ -143,7 +143,7 @@ public void execute() { UserVm userVm = _userVmService.getUserVm(getVirtualMachineId()); if (userVm == null) { - throw new InvalidParameterValueException("Unable to find the VM by id=" + getVirtualMachineId()); + throw new InvalidParameterValueException("Unable to find the Instance by id=" + getVirtualMachineId()); } if (Hypervisor.HypervisorType.External.equals(userVm.getHypervisorType())) { @@ -156,18 +156,18 @@ public void execute() { if (getStoragePoolId() != null) { destStoragePool = _storageService.getStoragePool(getStoragePoolId()); if (destStoragePool == null) { - throw new InvalidParameterValueException("Unable to find the storage pool to migrate the VM"); + throw new InvalidParameterValueException("Unable to find the storage pool to migrate the Instance"); } CallContext.current().setEventDetails("VM Id: " + getVirtualMachineId() + " to storage pool Id: " + getStoragePoolId()); } else if (getHostId() != null) { destinationHost = _resourceService.getHost(getHostId()); if (destinationHost == null) { - throw new InvalidParameterValueException("Unable to find the host to migrate the VM, host id=" + getHostId()); + throw new InvalidParameterValueException("Unable to find the host to migrate the Instance, host id=" + getHostId()); } if (destinationHost.getType() != Host.Type.Routing) { - throw new InvalidParameterValueException("The specified host(" + destinationHost.getName() + ") is not suitable to migrate the VM, please specify another one"); + throw new InvalidParameterValueException("The specified host(" + destinationHost.getName() + ") is not suitable to migrate the Instance, please specify another one"); } - CallContext.current().setEventDetails("VM Id: " + getVirtualMachineId() + " to host Id: " + getHostId()); + CallContext.current().setEventDetails("Instance Id: " + getVirtualMachineId() + " to host Id: " + getHostId()); } else if (! isAutoSelect()) { throw new InvalidParameterValueException("Please specify a host or storage as destination, or pass 'autoselect=true' to automatically select a destination host which do not require storage migration"); } @@ -184,7 +184,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to migrate vm"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to migrate Instance"); } } catch (ResourceUnavailableException ex) { logger.warn("Exception: ", ex); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java index b736e8606364..0142f6fc81ab 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmd.java @@ -46,7 +46,7 @@ import com.cloud.vm.VirtualMachine; @APICommand(name = "migrateVirtualMachineWithVolume", - description = "Attempts Migration of a VM with its volumes to a different host", + description = "Attempts Migration of an Instance with its volumes to a different host", responseObject = UserVmResponse.class, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) @@ -60,14 +60,14 @@ public class MigrateVirtualMachineWithVolumeCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, - description = "Destination Host ID to migrate VM to.") + description = "Destination Host ID to migrate Instance to.") private Long hostId; @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, - description = "the ID of the virtual machine") + description = "The ID of the Instance") private Long virtualMachineId; @Parameter(name = ApiConstants.MIGRATE_TO, @@ -84,7 +84,7 @@ public class MigrateVirtualMachineWithVolumeCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.AUTO_SELECT, since = "4.19.0", type = CommandType.BOOLEAN, - description = "Automatically select a destination host for a running instance, if hostId is not specified. false by default") + description = "Automatically select a destination host for a running Instance, if hostId is not specified. false by default") private Boolean autoSelect; ///////////////////////////////////////////////////// @@ -135,7 +135,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Attempting to migrate VM Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVirtualMachineId()) + " to host Id: " + this._uuidMgr.getUuid(Host.class, getHostId()); + return "Attempting to migrate Instance Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVirtualMachineId()) + " to host Id: " + this._uuidMgr.getUuid(Host.class, getHostId()); } @Override @@ -155,8 +155,8 @@ private Host getDestinationHost() { Host destinationHost = _resourceService.getHost(getHostId()); // OfflineVmwareMigration: destination host would have to not be a required parameter for stopped VMs if (destinationHost == null) { - logger.error(String.format("Unable to find the host with ID [%s].", getHostId())); - throw new InvalidParameterValueException("Unable to find the specified host to migrate the VM."); + logger.error("Unable to find the host with ID [{}].", getHostId()); + throw new InvalidParameterValueException("Unable to find the specified host to migrate the Instance."); } return destinationHost; } @@ -164,7 +164,7 @@ private Host getDestinationHost() { @Override public void execute() { if (hostId == null && MapUtils.isEmpty(migrateVolumeTo) && !Boolean.TRUE.equals(autoSelect)) { - throw new InvalidParameterValueException(String.format("Either %s or %s must be passed or %s must be true for migrating the VM.", ApiConstants.HOST_ID, ApiConstants.MIGRATE_TO, ApiConstants.AUTO_SELECT)); + throw new InvalidParameterValueException(String.format("Either %s or %s must be passed or %s must be true for migrating the Instance.", ApiConstants.HOST_ID, ApiConstants.MIGRATE_TO, ApiConstants.AUTO_SELECT)); } VirtualMachine virtualMachine = _userVmService.getVm(getVirtualMachineId()); @@ -188,7 +188,7 @@ public void execute() { if (migratedVm != null) { setResponseBasedOnVmType(virtualMachine, migratedVm); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to migrate vm"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to migrate Instance"); } } catch (ResourceUnavailableException ex) { logger.warn("Exception: ", ex); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RebootVMCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RebootVMCmdByAdmin.java index 5f6a7ab384be..36fdc9d8ec18 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RebootVMCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RebootVMCmdByAdmin.java @@ -24,6 +24,6 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "rebootVirtualMachine", description = "Reboots a virtual machine.", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "rebootVirtualMachine", description = "Reboots an Instance.", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class RebootVMCmdByAdmin extends RebootVMCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RecoverVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RecoverVMCmd.java index f34d555dc707..4f63e22b8677 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RecoverVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RecoverVMCmd.java @@ -34,7 +34,7 @@ import com.cloud.uservm.UserVm; import com.cloud.vm.VirtualMachine; -@APICommand(name = "recoverVirtualMachine", description = "Recovers a virtual machine.", responseObject = UserVmResponse.class, entityType = {VirtualMachine.class}, +@APICommand(name = "recoverVirtualMachine", description = "Recovers an Instance.", responseObject = UserVmResponse.class, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class RecoverVMCmd extends BaseCmd { @@ -44,7 +44,7 @@ public class RecoverVMCmd extends BaseCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the virtual machine") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the Instance") private Long id; ///////////////////////////////////////////////////// @@ -87,7 +87,7 @@ public void execute() throws ResourceAllocationException { recoverVmResponse.setResponseName(getCommandName()); setResponseObject(recoverVmResponse); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to recover vm"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to recover Instance"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RemoveNicFromVMCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RemoveNicFromVMCmdByAdmin.java index 89726afe99b5..e25c850e1278 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RemoveNicFromVMCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RemoveNicFromVMCmdByAdmin.java @@ -24,6 +24,6 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "removeNicFromVirtualMachine", description = "Removes VM from specified network by deleting a NIC", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "removeNicFromVirtualMachine", description = "Removes Instance from specified network by deleting a NIC", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class RemoveNicFromVMCmdByAdmin extends RemoveNicFromVMCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ResetVMPasswordCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ResetVMPasswordCmdByAdmin.java index d7ab0c61bbbc..1b4af79d775d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ResetVMPasswordCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ResetVMPasswordCmdByAdmin.java @@ -24,8 +24,8 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "resetPasswordForVirtualMachine", responseObject=UserVmResponse.class, description="Resets the password for virtual machine. " + - "The virtual machine must be in a \"Stopped\" state and the template must already " + +@APICommand(name = "resetPasswordForVirtualMachine", responseObject=UserVmResponse.class, description = "Resets the password for Instance. " + + "The Instance must be in a \"Stopped\" state and the Template must already " + "support this feature for this command to take effect. [async]", responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class ResetVMPasswordCmdByAdmin extends ResetVMPasswordCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ResetVMSSHKeyCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ResetVMSSHKeyCmdByAdmin.java index ed9cc11fd5e4..046a90892da6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ResetVMSSHKeyCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ResetVMSSHKeyCmdByAdmin.java @@ -25,7 +25,7 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "resetSSHKeyForVirtualMachine", responseObject = UserVmResponse.class, description = "Resets the SSH Key for virtual machine. " + - "The virtual machine must be in a \"Stopped\" state. [async]", responseView = ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "resetSSHKeyForVirtualMachine", responseObject = UserVmResponse.class, description = "Resets the SSH Key for Instance. " + + "The Instance must be in a \"Stopped\" state. [async]", responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class ResetVMSSHKeyCmdByAdmin extends ResetVMSSHKeyCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ResetVMUserDataCmdAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ResetVMUserDataCmdAdmin.java index 83e3481840b9..6ae9cb837e56 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ResetVMUserDataCmdAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ResetVMUserDataCmdAdmin.java @@ -23,8 +23,8 @@ import org.apache.cloudstack.api.command.user.vm.ResetVMUserDataCmd; import org.apache.cloudstack.api.response.UserVmResponse; -@APICommand(name = "resetUserDataForVirtualMachine", responseObject = UserVmResponse.class, description = "Resets the UserData for virtual machine. " + - "The virtual machine must be in a \"Stopped\" state. [async]", responseView = ResponseObject.ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "resetUserDataForVirtualMachine", responseObject = UserVmResponse.class, description = "Resets the UserData for Instance. " + + "The Instance must be in a \"Stopped\" state. [async]", responseView = ResponseObject.ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class ResetVMUserDataCmdAdmin extends ResetVMUserDataCmd implements AdminCmd { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RestoreVMCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RestoreVMCmdByAdmin.java index b3ee39829ab0..9a551653e628 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RestoreVMCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/RestoreVMCmdByAdmin.java @@ -24,7 +24,7 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "restoreVirtualMachine", description = "Restore a VM to original template/ISO or new template/ISO", responseObject = UserVmResponse.class, since = "3.0.0", responseView = ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "restoreVirtualMachine", description = "Restore an Instance to original Template/ISO or new Template/ISO", responseObject = UserVmResponse.class, since = "3.0.0", responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class RestoreVMCmdByAdmin extends RestoreVMCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ScaleVMCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ScaleVMCmdByAdmin.java index fd71a4459540..6ed7a0cca8d6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ScaleVMCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/ScaleVMCmdByAdmin.java @@ -25,6 +25,6 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "scaleVirtualMachine", description = "Scales the virtual machine to a new service offering. This command also considers the volume size in the service offering or disk offering linked to the new service offering and apply all characteristics to the root volume.", responseObject = SuccessResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "scaleVirtualMachine", description = "Scales the Instance to a new service offering. This command also considers the volume size in the service offering or disk offering linked to the new service offering and apply all characteristics to the root volume.", responseObject = SuccessResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ScaleVMCmdByAdmin extends ScaleVMCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/StartVMCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/StartVMCmdByAdmin.java index f87622cf734a..30fab3b9382f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/StartVMCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/StartVMCmdByAdmin.java @@ -24,6 +24,6 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "startVirtualMachine", responseObject = UserVmResponse.class, description = "Starts a virtual machine.", responseView = ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "startVirtualMachine", responseObject = UserVmResponse.class, description = "Starts an Instance.", responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class StartVMCmdByAdmin extends StartVMCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/StopVMCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/StopVMCmdByAdmin.java index 2f7cc2198ef7..6dc1947712d6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/StopVMCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/StopVMCmdByAdmin.java @@ -24,6 +24,6 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "stopVirtualMachine", responseObject = UserVmResponse.class, description = "Stops a virtual machine.", responseView = ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "stopVirtualMachine", responseObject = UserVmResponse.class, description = "Stops an Instance.", responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class StopVMCmdByAdmin extends StopVMCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UnmanageVMInstanceCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UnmanageVMInstanceCmd.java index 2c60b5741261..b1d17cf02f62 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UnmanageVMInstanceCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UnmanageVMInstanceCmd.java @@ -47,7 +47,7 @@ import javax.inject.Inject; @APICommand(name = "unmanageVirtualMachine", - description = "Unmanage a guest virtual machine.", + description = "Unmanage a Guest Instance.", entityType = {VirtualMachine.class}, responseObject = UnmanageVMInstanceResponse.class, requestHasSensitiveInfo = false, @@ -65,7 +65,7 @@ public class UnmanageVMInstanceCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, - description = "The ID of the virtual machine to unmanage") + description = "The ID of the Instance to unmanage") private Long vmId; @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, @@ -97,7 +97,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "unmanaging VM. VM ID = " + vmId; + return "Unmanaging Instance. Instance ID = " + vmId; } public Long getHostId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UpdateDefaultNicForVMCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UpdateDefaultNicForVMCmdByAdmin.java index 1c4dde93a226..a702eb264c80 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UpdateDefaultNicForVMCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UpdateDefaultNicForVMCmdByAdmin.java @@ -24,6 +24,6 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "updateDefaultNicForVirtualMachine", description = "Changes the default NIC on a VM", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "updateDefaultNicForVirtualMachine", description = "Changes the default NIC on an Instance", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class UpdateDefaultNicForVMCmdByAdmin extends UpdateDefaultNicForVMCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UpdateVMCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UpdateVMCmdByAdmin.java index cb4bb0433d63..46f5824de252 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UpdateVMCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UpdateVMCmdByAdmin.java @@ -25,8 +25,8 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "updateVirtualMachine", description="Updates properties of a virtual machine. The VM has to be stopped and restarted for the " + - "new properties to take effect. UpdateVirtualMachine does not first check whether the VM is stopped. " + - "Therefore, stop the VM manually before issuing this call.", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "updateVirtualMachine", description = "Updates properties of an Instance. The Instance has to be stopped and restarted for the " + + "new properties to take effect. UpdateVirtualMachine does not first check whether the Instance is stopped. " + + "Therefore, stop the Instance manually before issuing this call.", responseObject = UserVmResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class UpdateVMCmdByAdmin extends UpdateVMCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UpgradeVMCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UpgradeVMCmdByAdmin.java index f3230e64818c..9bf8ccb454b6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UpgradeVMCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vm/UpgradeVMCmdByAdmin.java @@ -25,8 +25,8 @@ import com.cloud.vm.VirtualMachine; @Deprecated(since = "4.18") -@APICommand(name = "changeServiceForVirtualMachine", responseObject=UserVmResponse.class, description="(This API is deprecated, use scaleVirtualMachine API)" + - "Changes the service offering for a virtual machine. The virtual machine must be in a \"Stopped\" state for " + +@APICommand(name = "changeServiceForVirtualMachine", responseObject=UserVmResponse.class, description = "(This API is deprecated, use scaleVirtualMachine API)" + + "Changes the service offering for an Instance. The Instance must be in a \"Stopped\" state for " + "this command to take effect.", responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vmsnapshot/RevertToVMSnapshotCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vmsnapshot/RevertToVMSnapshotCmdByAdmin.java index 8f286626b992..a57362d62056 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vmsnapshot/RevertToVMSnapshotCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vmsnapshot/RevertToVMSnapshotCmdByAdmin.java @@ -22,6 +22,6 @@ import org.apache.cloudstack.api.command.user.vmsnapshot.RevertToVMSnapshotCmd; import org.apache.cloudstack.api.response.UserVmResponse; -@APICommand(name = "revertToVMSnapshot", description = "Revert VM from a vmsnapshot.", responseObject = UserVmResponse.class, since = "4.2.0", responseView = ResponseView.Full, +@APICommand(name = "revertToVMSnapshot", description = "Revert Instance from a vmsnapshot.", responseObject = UserVmResponse.class, since = "4.2.0", responseView = ResponseView.Full, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class RevertToVMSnapshotCmdByAdmin extends RevertToVMSnapshotCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/volume/AttachVolumeCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/volume/AttachVolumeCmdByAdmin.java index 6f31df79e1c9..20418d589405 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/volume/AttachVolumeCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/volume/AttachVolumeCmdByAdmin.java @@ -24,6 +24,6 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "attachVolume", description = "Attaches a disk volume to a virtual machine.", responseObject = VolumeResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "attachVolume", description = "Attaches a disk volume to an Instance.", responseObject = VolumeResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class AttachVolumeCmdByAdmin extends AttachVolumeCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/volume/CreateVolumeCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/volume/CreateVolumeCmdByAdmin.java index c0dfe42acb5f..e156475b29ae 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/volume/CreateVolumeCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/volume/CreateVolumeCmdByAdmin.java @@ -25,7 +25,7 @@ import com.cloud.storage.Volume; import com.cloud.vm.VirtualMachine; -@APICommand(name = "createVolume", responseObject = VolumeResponse.class, description = "Creates a disk volume from a disk offering. This disk volume must still be attached to a virtual machine to make use of it.", responseView = ResponseView.Full, entityType = { +@APICommand(name = "createVolume", responseObject = VolumeResponse.class, description = "Creates a disk volume from a disk offering. This disk volume must still be attached to an Instance to make use of it.", responseView = ResponseView.Full, entityType = { Volume.class, VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateVolumeCmdByAdmin extends CreateVolumeCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/volume/DetachVolumeCmdByAdmin.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/volume/DetachVolumeCmdByAdmin.java index 36a183bc89fc..05f9fe6a31a6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/volume/DetachVolumeCmdByAdmin.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/volume/DetachVolumeCmdByAdmin.java @@ -24,6 +24,6 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "detachVolume", description = "Detaches a disk volume from a virtual machine.", responseObject = VolumeResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, +@APICommand(name = "detachVolume", description = "Detaches a disk volume from an Instance.", responseObject = VolumeResponse.class, responseView = ResponseView.Full, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DetachVolumeCmdByAdmin extends DetachVolumeCmd implements AdminCmd {} diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/CreatePrivateGatewayByAdminCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/CreatePrivateGatewayByAdminCmd.java index 1b2163853ec3..09f0d21d9dfd 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/CreatePrivateGatewayByAdminCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/CreatePrivateGatewayByAdminCmd.java @@ -44,13 +44,13 @@ public class CreatePrivateGatewayByAdminCmd extends CreatePrivateGatewayCmd impl @Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, - description = "the Physical Network ID the network belongs to") + description = "The Physical Network ID the network belongs to") private Long physicalNetworkId; - @Parameter(name = ApiConstants.VLAN, type = CommandType.STRING, description = "the network implementation uri for the private gateway") + @Parameter(name = ApiConstants.VLAN, type = CommandType.STRING, description = "The network implementation uri for the private gateway") private String broadcastUri; - @Parameter(name = ApiConstants.BYPASS_VLAN_OVERLAP_CHECK, type = CommandType.BOOLEAN, description = "when true bypasses VLAN id/range overlap check during private gateway creation") + @Parameter(name = ApiConstants.BYPASS_VLAN_OVERLAP_CHECK, type = CommandType.BOOLEAN, description = "When true bypasses VLAN id/range overlap check during private gateway creation") private Boolean bypassVlanOverlapCheck; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/CreateVPCOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/CreateVPCOfferingCmd.java index 9ed7ced528e7..6b425bc10d21 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/CreateVPCOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/CreateVPCOfferingCmd.java @@ -74,49 +74,49 @@ public class CreateVPCOfferingCmd extends BaseAsyncCreateCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the vpc offering") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the VPC offering") private String vpcOfferingName; - @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "the display text of the vpc offering, defaults to the 'name'") + @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The display text of the VPC offering, defaults to the 'name'") private String displayText; @Parameter(name = ApiConstants.SUPPORTED_SERVICES, type = CommandType.LIST, collectionType = CommandType.STRING, - description = "services supported by the vpc offering") + description = "Services supported by the VPC offering") private List supportedServices; - @Parameter(name = ApiConstants.SERVICE_PROVIDER_LIST, type = CommandType.MAP, description = "provider to service mapping. " + @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; - @Parameter(name = ApiConstants.SERVICE_CAPABILITY_LIST, type = CommandType.MAP, description = "desired service capabilities as part of vpc offering", since = "4.4") + @Parameter(name = ApiConstants.SERVICE_CAPABILITY_LIST, type = CommandType.MAP, description = "Desired service capabilities as part of VPC offering", since = "4.4") private Map> serviceCapabilityList; @Parameter(name = ApiConstants.INTERNET_PROTOCOL, type = CommandType.STRING, - description = "The internet protocol of the offering. Options are ipv4 and dualstack. Default is ipv4. dualstack will create an offering that supports both IPv4 and IPv6", + description = "The internet protocol of the offering. Options are IPv4 and dualstack. Default is IPv4. dualstack will create an offering that supports both IPv4 and IPv6", since = "4.17.0") private String internetProtocol; @Parameter(name = ApiConstants.SERVICE_OFFERING_ID, type = CommandType.UUID, entityType = ServiceOfferingResponse.class, - description = "the ID of the service offering for the VPC router appliance") + description = "The ID of the service offering for the VPC router appliance") private Long serviceOfferingId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = DomainResponse.class, - description = "the ID of the containing domain(s), null for public offerings") + description = "The ID of the containing domain(s), null for public offerings") private List domainIds; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = ZoneResponse.class, - description = "the ID of the containing zone(s), null for public offerings", + description = "The ID of the containing zone(s), null for public offerings", since = "4.13") private List zoneIds; @@ -141,7 +141,7 @@ public class CreateVPCOfferingCmd extends BaseAsyncCreateCmd { @Parameter(name = ApiConstants.ENABLE, type = CommandType.BOOLEAN, - description = "set to true if the offering is to be enabled during creation. Default is false", + description = "Set to true if the offering is to be enabled during creation. Default is false", since = "4.16") private Boolean enable; @@ -224,10 +224,8 @@ public Map> getServiceProviders() { Iterator> iter = servicesCollection.iterator(); while (iter.hasNext()) { Map obj = iter.next(); - if (logger.isTraceEnabled()) { - logger.trace("service provider entry specified: " + obj); - } - HashMap services = (HashMap) obj; + logger.trace("Service provider entry specified: {}", obj); + HashMap services = (HashMap)obj; String service = services.get("service"); String provider = services.get("provider"); List providerList = null; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/DeletePrivateGatewayCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/DeletePrivateGatewayCmd.java index d104edc381bc..cd88d81da675 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/DeletePrivateGatewayCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/DeletePrivateGatewayCmd.java @@ -45,7 +45,7 @@ public class DeletePrivateGatewayCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = PrivateGatewayResponse.class, required = true, description = "the ID of the private gateway") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = PrivateGatewayResponse.class, required = true, description = "The ID of the private gateway") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/DeleteVPCOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/DeleteVPCOfferingCmd.java index 6aa0c3f3afce..b322a6d55890 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/DeleteVPCOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/DeleteVPCOfferingCmd.java @@ -38,7 +38,7 @@ public class DeleteVPCOfferingCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpcOfferingResponse.class, required = true, description = "the ID of the VPC offering") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpcOfferingResponse.class, required = true, description = "The ID of the VPC offering") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCOfferingCmd.java index b59837281ef3..b8a8077b30b5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/vpc/UpdateVPCOfferingCmd.java @@ -44,31 +44,31 @@ public class UpdateVPCOfferingCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpcOfferingResponse.class, required = true, description = "the id of the VPC offering") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpcOfferingResponse.class, required = true, description = "The ID of the VPC offering") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the VPC offering") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the VPC offering") private String vpcOffName; - @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "the display text of the VPC offering") + @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The display text of the VPC offering") private String displayText; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "update state for the VPC offering; " + "supported states - Enabled/Disabled") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "Update state for the VPC offering; " + "supported states - Enabled/Disabled") private String state; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.STRING, - description = "the ID of the containing domain(s) as comma separated string, public for public offerings", + description = "The ID of the containing domain(s) as comma separated string, public for public offerings", length = 4096) private String domainIds; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.STRING, - description = "the ID of the containing zone(s) as comma separated string, all for all zones offerings", + description = "The ID of the containing zone(s) as comma separated string, all for all zones offerings", since = "4.13") private String zoneIds; - @Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "sort key of the VPC offering, integer") + @Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "Sort key of the VPC offering, integer") private Integer sortKey; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/zone/CreateZoneCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/zone/CreateZoneCmd.java index f3c1bab260b9..d7f448d6ece6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/zone/CreateZoneCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/zone/CreateZoneCmd.java @@ -42,28 +42,28 @@ public class CreateZoneCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.DNS1, type = CommandType.STRING, required = true, description = "the first DNS for the Zone") + @Parameter(name = ApiConstants.DNS1, type = CommandType.STRING, required = true, description = "The first DNS for the Zone") private String dns1; - @Parameter(name = ApiConstants.DNS2, type = CommandType.STRING, description = "the second DNS for the Zone") + @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") + @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") + @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") + @Parameter(name = ApiConstants.GUEST_CIDR_ADDRESS, type = CommandType.STRING, description = "The guest CIDR address for the Zone") private String guestCidrAddress; - @Parameter(name = ApiConstants.INTERNAL_DNS1, type = CommandType.STRING, required = true, description = "the first internal DNS for the Zone") + @Parameter(name = ApiConstants.INTERNAL_DNS1, type = CommandType.STRING, required = true, description = "The first internal DNS for the Zone") private String internalDns1; - @Parameter(name = ApiConstants.INTERNAL_DNS2, type = CommandType.STRING, description = "the second internal DNS for the Zone") + @Parameter(name = ApiConstants.INTERNAL_DNS2, type = CommandType.STRING, description = "The second internal DNS for the Zone") private String internalDns2; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the Zone") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the Zone") private String zoneName; @Parameter(name = ApiConstants.DOMAIN, type = CommandType.STRING, description = "Network domain name for the networks in the zone") @@ -72,22 +72,22 @@ public class CreateZoneCmd extends BaseCmd { @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "the ID of the containing domain, null for public zones") + description = "The ID of the containing domain, null for public zones") private Long domainId; - @Parameter(name = ApiConstants.NETWORK_TYPE, type = CommandType.STRING, required = true, description = "network type of the zone, can be Basic or Advanced") + @Parameter(name = ApiConstants.NETWORK_TYPE, type = CommandType.STRING, required = true, description = "Network type of the zone, can be Basic or Advanced") private String networkType; @Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Allocation state of this Zone for allocation of new resources") private String allocationState; - @Parameter(name = ApiConstants.SECURITY_GROUP_EANBLED, type = CommandType.BOOLEAN, description = "true if network is security group enabled, false otherwise") + @Parameter(name = ApiConstants.SECURITY_GROUP_EANBLED, type = CommandType.BOOLEAN, description = "True if network is security group enabled, false otherwise") private Boolean securitygroupenabled; - @Parameter(name = ApiConstants.LOCAL_STORAGE_ENABLED, type = CommandType.BOOLEAN, description = "true if local storage offering enabled, false otherwise") + @Parameter(name = ApiConstants.LOCAL_STORAGE_ENABLED, type = CommandType.BOOLEAN, description = "True if local storage offering enabled, false otherwise") private Boolean localStorageEnabled; - @Parameter(name = ApiConstants.IS_EDGE, type = CommandType.BOOLEAN, description = "true if the zone is an edge zone, false otherwise", since = "4.18.0") + @Parameter(name = ApiConstants.IS_EDGE, type = CommandType.BOOLEAN, description = "True if the zone is an edge zone, false otherwise", since = "4.18.0") private Boolean isEdge; @Parameter(name = ApiConstants.STORAGE_ACCESS_GROUPS, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/zone/DeleteZoneCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/zone/DeleteZoneCmd.java index b89636c6fe52..565baab6e4c6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/zone/DeleteZoneCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/zone/DeleteZoneCmd.java @@ -38,7 +38,7 @@ public class DeleteZoneCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the ID of the Zone") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "The ID of the Zone") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/admin/zone/UpdateZoneCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/admin/zone/UpdateZoneCmd.java index 1b2793d3e158..3e7fffb5fafc 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/admin/zone/UpdateZoneCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/admin/zone/UpdateZoneCmd.java @@ -42,43 +42,43 @@ public class UpdateZoneCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.DNS1, type = CommandType.STRING, description = "the first DNS for the Zone") + @Parameter(name = ApiConstants.DNS1, type = CommandType.STRING, description = "The first DNS for the Zone") private String dns1; - @Parameter(name = ApiConstants.DNS2, type = CommandType.STRING, description = "the second DNS for the Zone") + @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") + @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") + @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") + @Parameter(name = ApiConstants.GUEST_CIDR_ADDRESS, type = CommandType.STRING, description = "The guest CIDR address for the Zone") private String guestCidrAddress; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the ID of the Zone") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "The ID of the Zone") private Long id; - @Parameter(name = ApiConstants.INTERNAL_DNS1, type = CommandType.STRING, description = "the first internal DNS for the Zone") + @Parameter(name = ApiConstants.INTERNAL_DNS1, type = CommandType.STRING, description = "The first internal DNS for the Zone") private String internalDns1; - @Parameter(name = ApiConstants.INTERNAL_DNS2, type = CommandType.STRING, description = "the second internal DNS for the Zone") + @Parameter(name = ApiConstants.INTERNAL_DNS2, type = CommandType.STRING, description = "The second internal DNS for the Zone") private String internalDns2; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the Zone") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the Zone") private String zoneName; - @Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "updates a private zone to public if set, but not vice-versa") + @Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "Updates a private zone to public if set, but not vice-versa") private Boolean isPublic; @Parameter(name = ApiConstants.ALLOCATION_STATE, type = CommandType.STRING, description = "Allocation state of this cluster for allocation of new resources") private String allocationState; - @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "the details for the Zone") + @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "The details for the Zone") private Map details; - @Parameter(name = ApiConstants.DHCP_PROVIDER, type = CommandType.STRING, description = "the dhcp Provider for the Zone") + @Parameter(name = ApiConstants.DHCP_PROVIDER, type = CommandType.STRING, description = "The DHCP Provider for the Zone") private String dhcpProvider; @Parameter(name = ApiConstants.DOMAIN, @@ -86,13 +86,13 @@ public class UpdateZoneCmd extends BaseCmd { description = "Network domain name for the networks in the zone; empty string will update domain with NULL value") private String domain; - @Parameter(name = ApiConstants.DNS_SEARCH_ORDER, type = CommandType.LIST, collectionType = CommandType.STRING, description = "the dns search order list") + @Parameter(name = ApiConstants.DNS_SEARCH_ORDER, type = CommandType.LIST, collectionType = CommandType.STRING, description = "The DNS search order list") private List dnsSearchOrder; - @Parameter(name = ApiConstants.LOCAL_STORAGE_ENABLED, type = CommandType.BOOLEAN, description = "true if local storage offering enabled, false otherwise") + @Parameter(name = ApiConstants.LOCAL_STORAGE_ENABLED, type = CommandType.BOOLEAN, description = "True if local storage offering enabled, false otherwise") private Boolean localStorageEnabled; - @Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "sort key of the zone, integer") + @Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "Sort key of the zone, integer") private Integer sortKey; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/account/AddAccountToProjectCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/account/AddAccountToProjectCmd.java index 2fbcb6df1ccb..93021487040b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/account/AddAccountToProjectCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/account/AddAccountToProjectCmd.java @@ -40,7 +40,7 @@ import com.cloud.projects.Project; import com.cloud.projects.ProjectAccount; -@APICommand(name = "addAccountToProject", description = "Adds account to a project", responseObject = SuccessResponse.class, since = "3.0.0", +@APICommand(name = "addAccountToProject", description = "Adds Account to a project", responseObject = SuccessResponse.class, since = "3.0.0", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class AddAccountToProjectCmd extends BaseAsyncCmd { @@ -53,13 +53,13 @@ public class AddAccountToProjectCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = ProjectResponse.class, required = true, - description = "ID of the project to add the account to") + description = "ID of the project to add the Account to") private Long projectId; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "name of the account to be added to the project") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Name of the Account to be added to the project") private String accountName; - @Parameter(name = ApiConstants.EMAIL, type = CommandType.STRING, description = "email to which invitation to the project is going to be sent") + @Parameter(name = ApiConstants.EMAIL, type = CommandType.STRING, description = "Email to which invitation to the project is going to be sent") private String email; @Parameter(name = ApiConstants.PROJECT_ROLE_ID, type = CommandType.UUID, entityType = ProjectRoleResponse.class, @@ -67,7 +67,7 @@ public class AddAccountToProjectCmd extends BaseAsyncCmd { private Long projectRoleId; @Parameter(name = ApiConstants.ROLE_TYPE, type = BaseCmd.CommandType.STRING, - description = "Project role type to be assigned to the user - Admin/Regular; default: Regular") + description = "Project role type to be assigned to the User - Admin/Regular; default: Regular") private String roleType; ///////////////////////////////////////////////////// @@ -117,7 +117,7 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add account to the project"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add Account to the project"); } } @@ -147,7 +147,7 @@ public String getEventType() { @Override public String getEventDescription() { if (accountName != null) { - return "Adding account " + getAccountName() + " to project: " + getProjectId(); + return "Adding Account " + getAccountName() + " to project: " + getProjectId(); } else { return "Sending invitation to email " + email + " to join project: " + getProjectId(); } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/account/AddUserToProjectCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/account/AddUserToProjectCmd.java index 9cd845c774c5..9bdc85bc5c71 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/account/AddUserToProjectCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/account/AddUserToProjectCmd.java @@ -38,7 +38,7 @@ import com.cloud.exception.InvalidParameterValueException; import com.cloud.projects.ProjectAccount; -@APICommand(name = "addUserToProject", description = "Adds user to a project", responseObject = SuccessResponse.class, since = "4.14", +@APICommand(name = "addUserToProject", description = "Adds User to a project", responseObject = SuccessResponse.class, since = "4.14", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, authorized = {RoleType.Admin, RoleType.DomainAdmin, RoleType.ResourceAdmin, RoleType.User}) public class AddUserToProjectCmd extends BaseAsyncCmd { @@ -50,13 +50,13 @@ public class AddUserToProjectCmd extends BaseAsyncCmd { type = BaseCmd.CommandType.UUID, entityType = ProjectResponse.class, required = true, - description = "ID of the project to add the user to") + description = "ID of the project to add the User to") private Long projectId; - @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "Name of the user to be added to the project") + @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "Name of the User to be added to the project") private String username; - @Parameter(name = ApiConstants.EMAIL, type = CommandType.STRING, description = "email ID of user to which invitation to the project is going to be sent") + @Parameter(name = ApiConstants.EMAIL, type = CommandType.STRING, description = "Email ID of User to which invitation to the project is going to be sent") private String email; @Parameter(name = ApiConstants.PROJECT_ROLE_ID, type = BaseCmd.CommandType.UUID, entityType = ProjectRoleResponse.class, @@ -64,7 +64,7 @@ public class AddUserToProjectCmd extends BaseAsyncCmd { private Long projectRoleId; @Parameter(name = ApiConstants.ROLE_TYPE, type = BaseCmd.CommandType.STRING, - description = "Project role type to be assigned to the user - Admin/Regular") + description = "Project role type to be assigned to the User - Admin/Regular") private String roleType; ///////////////////////////////////////////////////// @@ -103,7 +103,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Adding user " + getUsername() + " to project: " + getProjectId(); + return "Adding User " + getUsername() + " to Project: " + getProjectId(); } ///////////////////////////////////////////////////// @@ -118,7 +118,7 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add account to the project"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add Account to the project"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/account/DeleteAccountFromProjectCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/account/DeleteAccountFromProjectCmd.java index 5e0977938a30..510f97ff7437 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/account/DeleteAccountFromProjectCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/account/DeleteAccountFromProjectCmd.java @@ -34,7 +34,7 @@ import com.cloud.exception.InvalidParameterValueException; import com.cloud.projects.Project; -@APICommand(name = "deleteAccountFromProject", description = "Deletes account from the project", responseObject = SuccessResponse.class, since = "3.0.0", +@APICommand(name = "deleteAccountFromProject", description = "Deletes Account from the project", responseObject = SuccessResponse.class, since = "3.0.0", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteAccountFromProjectCmd extends BaseAsyncCmd { @@ -46,10 +46,10 @@ public class DeleteAccountFromProjectCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = ProjectResponse.class, required = true, - description = "ID of the project to remove the account from") + description = "ID of the project to remove the Account from") private Long projectId; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, required = true, description = "name of the account to be removed from the project") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, required = true, description = "Name of the Account to be removed from the project") private String accountName; ///////////////////////////////////////////////////// @@ -76,7 +76,7 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete account from the project"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete Account from the project"); } } @@ -103,7 +103,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Removing account " + accountName + " from project: " + projectId; + return "Removing Account " + accountName + " from project: " + projectId; } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/account/DeleteUserFromProjectCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/account/DeleteUserFromProjectCmd.java index 0731d8378047..5db604fe05c3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/account/DeleteUserFromProjectCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/account/DeleteUserFromProjectCmd.java @@ -37,7 +37,7 @@ import com.cloud.exception.InvalidParameterValueException; import com.cloud.projects.Project; -@APICommand(name = "deleteUserFromProject", description = "Deletes user from the project", responseObject = SuccessResponse.class, since = "4.15.0", +@APICommand(name = "deleteUserFromProject", description = "Deletes User from the project", responseObject = SuccessResponse.class, since = "4.15.0", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, authorized = {RoleType.Admin, RoleType.DomainAdmin, RoleType.ResourceAdmin, RoleType.User}) public class DeleteUserFromProjectCmd extends BaseAsyncCmd { @@ -48,11 +48,11 @@ public class DeleteUserFromProjectCmd extends BaseAsyncCmd { type = BaseCmd.CommandType.UUID, entityType = ProjectResponse.class, required = true, - description = "ID of the project to remove the user from") + description = "ID of the project to remove the User from") private Long projectId; @Parameter(name = ApiConstants.USER_ID, type = BaseCmd.CommandType.UUID, entityType = UserResponse.class, - required = true, description = "Id of the user to be removed from the project") + required = true, description = "Id of the User to be removed from the project") private Long userId; ///////////////////////////////////////////////////// @@ -78,7 +78,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Removing user " + userId + " from project: " + projectId; + return "Removing User " + userId + " from project: " + projectId; } @Override @@ -107,13 +107,13 @@ public ApiCommandResourceType getApiResourceType() { @Override public void execute() { - CallContext.current().setEventDetails("Project ID: " + projectId + "; user ID: " + userId); + CallContext.current().setEventDetails("Project ID: " + projectId + "; User ID: " + userId); boolean result = _projectService.deleteUserFromProject(getProjectId(), getUserId()); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete account from the project"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete Account from the project"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/account/ListAccountsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/account/ListAccountsCmd.java index bd9ab30f4f1f..dd0ece878902 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/account/ListAccountsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/account/ListAccountsCmd.java @@ -39,7 +39,7 @@ import com.cloud.server.ResourceTag; import com.cloud.user.Account; -@APICommand(name = "listAccounts", description = "Lists accounts and provides detailed account information for listed accounts", responseObject = AccountResponse.class, responseView = ResponseView.Restricted, entityType = {Account.class}, +@APICommand(name = "listAccounts", description = "Lists Accounts and provides detailed Account information for listed Accounts", responseObject = AccountResponse.class, responseView = ResponseView.Restricted, entityType = {Account.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class ListAccountsCmd extends BaseListDomainResourcesCmd implements UserCmd { private static final String s_name = "listaccountsresponse"; @@ -50,32 +50,32 @@ public class ListAccountsCmd extends BaseListDomainResourcesCmd implements UserC @Parameter(name = ApiConstants.ACCOUNT_TYPE, type = CommandType.INTEGER, - description = "list accounts by account type. Valid account types are 1 (admin), 2 (domain-admin), and 0 (user).") + description = "List Accounts by Account type. Valid Account types are 1 (admin), 2 (domain-admin), and 0 (user).") private Integer accountType; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "list account by account ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "List Account by Account ID") private Long id; - @Parameter(name = ApiConstants.IS_CLEANUP_REQUIRED, type = CommandType.BOOLEAN, description = "list accounts by cleanuprequired attribute (values are true or false)") + @Parameter(name = ApiConstants.IS_CLEANUP_REQUIRED, type = CommandType.BOOLEAN, description = "List accounts by cleanuprequired attribute (values are true or false)") private Boolean cleanupRequired; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list account by account name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "List account by account name") private String searchName; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "list accounts by state. Valid states are enabled, disabled, and locked.") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "List accounts by state. Valid states are enabled, disabled, and locked.") private String state; @Parameter(name = ApiConstants.DETAILS, type = CommandType.LIST, collectionType = CommandType.STRING, - description = "comma separated list of account details requested, value can be a list of [ all, resource, min]") + description = "Comma separated list of account details requested, value can be a list of [ all, resource, min]") private List viewDetails; @Parameter(name = ApiConstants.API_KEY_ACCESS, type = CommandType.STRING, description = "List accounts by the Api key access value", since = "4.20.1.0", authorized = {RoleType.Admin}) private String apiKeyAccess; @Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN, - description = "flag to display the resource icon for accounts") + description = "Flag to display the resource icon for accounts") private Boolean showIcon; @Parameter(name = ApiConstants.TAG, type = CommandType.STRING, description = "Tag for resource type to return usage", since = "4.20.0") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/account/ListProjectAccountsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/account/ListProjectAccountsCmd.java index 21aedc7d7725..aeacf7c60d56 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/account/ListProjectAccountsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/account/ListProjectAccountsCmd.java @@ -29,7 +29,7 @@ import com.cloud.user.Account; -@APICommand(name = "listProjectAccounts", description = "Lists project's accounts", responseObject = ProjectResponse.class, since = "3.0.0", +@APICommand(name = "listProjectAccounts", description = "Lists project's Accounts", responseObject = ProjectResponse.class, since = "3.0.0", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListProjectAccountsCmd extends BaseListCmd { @@ -41,16 +41,16 @@ public class ListProjectAccountsCmd extends BaseListCmd { @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "ID of the project") private Long projectId; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "list accounts of the project by account name") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "List Accounts of the project by Account name") private String accountName; - @Parameter(name = ApiConstants.USER_ID, type = CommandType.UUID, entityType = UserResponse.class, description = "list invitation by user ID") + @Parameter(name = ApiConstants.USER_ID, type = CommandType.UUID, entityType = UserResponse.class, description = "List invitation by User ID") private Long userId; - @Parameter(name = ApiConstants.ROLE, type = CommandType.STRING, description = "list accounts of the project by role") + @Parameter(name = ApiConstants.ROLE, type = CommandType.STRING, description = "List Accounts of the project by role") private String role; - @Parameter(name = ApiConstants.PROJECT_ROLE_ID, type = CommandType.UUID, entityType = ProjectRoleResponse.class, description = "list accounts of the project by project role id") + @Parameter(name = ApiConstants.PROJECT_ROLE_ID, type = CommandType.UUID, entityType = ProjectRoleResponse.class, description = "List Accounts of the project by project role id") private Long projectRoleId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java index 5ea144785167..c18d08299c3a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/address/AssociateIPAddrCmd.java @@ -58,7 +58,7 @@ import com.cloud.user.Account; @APICommand(name = "associateIpAddress", - description = "Acquires and associates a public IP to an account. Either of the parameters are required, i.e. either zoneId, or networkId, or vpcId ", + description = "Acquires and associates a public IP to an Account. Either of the parameters are required, i.e. either zoneId, or networkId, or vpcId ", responseObject = IPAddressResponse.class, responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, @@ -72,58 +72,58 @@ public class AssociateIPAddrCmd extends BaseAsyncCreateCmd implements UserCmd { @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, - description = "the account to associate with this IP address") + description = "The Account to associate with this IP address") private String accountName; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "the ID of the domain to associate with this IP address") + description = "The ID of the domain to associate with this IP address") private Long domainId; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - description = "the ID of the availability zone you want to acquire an public IP address from") + description = "The ID of the availability zone you want to acquire an public IP address from") private Long zoneId; @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, - description = "The network this IP address should be associated to.") + description = "The Network this IP address should be associated to.") private Long networkId; @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, - description = "Deploy VM for the project") + description = "Deploy Instance for the project") private Long projectId; @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, - description = "the VPC you want the IP address to be associated with") + description = "The VPC you want the IP address to be associated with") private Long vpcId; @Parameter(name = ApiConstants.IS_PORTABLE, type = BaseCmd.CommandType.BOOLEAN, - description = "should be set to true if public IP is required to be transferable across zones, if not specified defaults to false") + description = "Should be set to true if public IP is required to be transferable across zones, if not specified defaults to false") private Boolean isPortable; @Parameter(name = ApiConstants.REGION_ID, type = CommandType.INTEGER, entityType = RegionResponse.class, required = false, - description = "region ID from where portable IP is to be associated.") + description = "Region ID from where portable IP is to be associated.") private Integer regionId; @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, - description = "an optional field, whether to the display the IP to the end user or not", since = "4.4", + description = "An optional field, whether to the display the IP to the end User or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; - @Parameter(name=ApiConstants.IP_ADDRESS, type=CommandType.STRING, description="IP Address to be associated") + @Parameter(name=ApiConstants.IP_ADDRESS, type=CommandType.STRING, description = "IP Address to be associated") private String ipAddress; ///////////////////////////////////////////////////// @@ -198,21 +198,21 @@ public Long getNetworkId() { List networks = _networkService.getIsolatedNetworksOwnedByAccountInZone(getZoneId(), _accountService.getAccount(getEntityOwnerId())); if (networks.size() == 0) { String domain = _domainService.getDomain(getDomainId()).getName(); - throw new InvalidParameterValueException("Account name=" + getAccountName() + " domain=" + domain + " doesn't have virtual networks in zone=" + + throw new InvalidParameterValueException("Account name=" + getAccountName() + " domain=" + domain + " doesn't have virtual Networks in zone=" + zone.getName()); } if (networks.size() < 1) { - throw new InvalidParameterValueException("Account doesn't have any isolated networks in the zone"); + throw new InvalidParameterValueException("Account doesn't have any isolated Networks in the zone"); } else if (networks.size() > 1) { - throw new InvalidParameterValueException("Account has more than one isolated network in the zone"); + throw new InvalidParameterValueException("Account has more than one isolated Network in the zone"); } return networks.get(0).getId(); } else { Network defaultGuestNetwork = _networkService.getExclusiveGuestNetwork(zoneId); if (defaultGuestNetwork == null) { - throw new InvalidParameterValueException("Unable to find a default guest network for account " + getAccountName() + " in domain ID=" + getDomainId()); + throw new InvalidParameterValueException("Unable to find a default guest Network for Account " + getAccountName() + " in domain ID=" + getDomainId()); } else { return defaultGuestNetwork.getId(); } @@ -253,7 +253,7 @@ public long getEntityOwnerId() { } else if (networkId != null) { Network network = _networkService.getNetwork(networkId); if (network == null) { - throw new InvalidParameterValueException("Unable to find network by network id specified"); + throw new InvalidParameterValueException("Unable to find Network by network id specified"); } NetworkOffering offering = _entityMgr.findById(NetworkOffering.class, network.getNetworkOfferingId()); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java index f4c06e512f07..531f9bb86495 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/address/DisassociateIPAddrCmd.java @@ -35,7 +35,7 @@ import com.cloud.network.IpAddress; import com.cloud.user.Account; -@APICommand(name = "disassociateIpAddress", description = "Disassociates an IP address from the account.", responseObject = SuccessResponse.class, +@APICommand(name = "disassociateIpAddress", description = "Disassociates an IP address from the Account.", responseObject = SuccessResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, entityType = { IpAddress.class }) public class DisassociateIPAddrCmd extends BaseAsyncCmd { @@ -44,7 +44,7 @@ public class DisassociateIPAddrCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = IPAddressResponse.class, description = "the ID of the public IP address" + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = IPAddressResponse.class, description = "The ID of the public IP address" + " to disassociate. Mutually exclusive with the ipaddress parameter") private Long id; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java index 357f0c83ed74..d79381e57c4e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/address/ListPublicIpAddressesCmd.java @@ -50,59 +50,59 @@ public class ListPublicIpAddressesCmd extends BaseListRetrieveOnlyResourceCountC //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ALLOCATED_ONLY, type = CommandType.BOOLEAN, description = "limits search results to allocated public IP addresses") + @Parameter(name = ApiConstants.ALLOCATED_ONLY, type = CommandType.BOOLEAN, description = "Limits search results to allocated public IP addresses") private Boolean allocatedOnly; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "lists all public IP addresses by state") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "Lists all public IP addresses by state. A comma-separated list of states can be passed.") private String state; - @Parameter(name = ApiConstants.FOR_VIRTUAL_NETWORK, type = CommandType.BOOLEAN, description = "the virtual network for the IP address") + @Parameter(name = ApiConstants.FOR_VIRTUAL_NETWORK, type = CommandType.BOOLEAN, description = "The virtual Network for the IP address") private Boolean forVirtualNetwork; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = IPAddressResponse.class, description = "lists IP address by ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = IPAddressResponse.class, description = "Lists IP address by ID") private Long id; - @Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, description = "lists the specified IP address") + @Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, description = "Lists the specified IP address") private String ipAddress; - @Parameter(name = ApiConstants.VLAN_ID, type = CommandType.UUID, entityType = VlanIpRangeResponse.class, description = "lists all public IP addresses by VLAN ID") + @Parameter(name = ApiConstants.VLAN_ID, type = CommandType.UUID, entityType = VlanIpRangeResponse.class, description = "Lists all public IP addresses by VLAN ID") private Long vlanId; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "lists all public IP addresses by zone ID") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "Lists all public IP addresses by zone ID") private Long zoneId; - @Parameter(name = ApiConstants.FOR_LOAD_BALANCING, type = CommandType.BOOLEAN, description = "list only IPs used for load balancing") + @Parameter(name = ApiConstants.FOR_LOAD_BALANCING, type = CommandType.BOOLEAN, description = "List only IPs used for load balancing") private Boolean forLoadBalancing; @Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, - description = "lists all public IP addresses by physical network ID") + description = "Lists all public IP addresses by physical Network ID") private Long physicalNetworkId; @Parameter(name = ApiConstants.ASSOCIATED_NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, - description = "lists all public IP addresses associated to the network specified") + description = "Lists all public IP addresses associated to the Network specified") private Long associatedNetworkId; @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, - description = "lists all public IP addresses by source network ID", + description = "Lists all public IP addresses by source Network ID", since = "4.13.0") private Long networkId; - @Parameter(name = ApiConstants.IS_SOURCE_NAT, type = CommandType.BOOLEAN, description = "list only source NAT IP addresses") + @Parameter(name = ApiConstants.IS_SOURCE_NAT, type = CommandType.BOOLEAN, description = "List only source NAT IP addresses") private Boolean isSourceNat; - @Parameter(name = ApiConstants.IS_STATIC_NAT, type = CommandType.BOOLEAN, description = "list only static NAT IP addresses") + @Parameter(name = ApiConstants.IS_STATIC_NAT, type = CommandType.BOOLEAN, description = "List only static NAT IP addresses") private Boolean isStaticNat; @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "List IPs belonging to the VPC") private Long vpcId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; @Parameter(name = ApiConstants.FOR_SYSTEM_VMS, type = CommandType.BOOLEAN, description = "true if range is dedicated for system VMs", since = "4.20.0") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/address/ReleaseIPAddrCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/address/ReleaseIPAddrCmd.java index effe45c51ed0..0d2ff89930d5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/address/ReleaseIPAddrCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/address/ReleaseIPAddrCmd.java @@ -33,7 +33,7 @@ import com.cloud.network.IpAddress; @APICommand(name = "releaseIpAddress", - description = "Releases an IP address from the account.", + description = "Releases an IP address from the Account.", since = "4.17", responseObject = SuccessResponse.class, requestHasSensitiveInfo = false, @@ -46,7 +46,7 @@ public class ReleaseIPAddrCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = IPAddressResponse.class, required = true, description = "the ID of the public IP address" + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = IPAddressResponse.class, required = true, description = "The ID of the public IP address" + " to release") private Long id; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/address/ReserveIPAddrCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/address/ReserveIPAddrCmd.java index e323d413b9ac..7d102abc07fb 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/address/ReserveIPAddrCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/address/ReserveIPAddrCmd.java @@ -42,7 +42,7 @@ import com.cloud.user.Account; @APICommand(name = "reserveIpAddress", - description = "Reserve a public IP to an account.", + description = "Reserve a public IP to an Account.", since = "4.17", responseObject = IPAddressResponse.class, responseView = ResponseView.Restricted, @@ -57,24 +57,24 @@ public class ReserveIPAddrCmd extends BaseCmd implements UserCmd { @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, - description = "the account to reserve with this IP address") + description = "The Account to reserve with this IP address") private String accountName; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "the ID of the domain to reserve with this IP address") + description = "The ID of the domain to reserve with this IP address") private Long domainId; @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, - description = "the ID of the project to reserve with this IP address") + description = "The ID of the project to reserve with this IP address") private Long projectId; @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, - description = "an optional field, whether to the display the IP to the end user or not", + description = "An optional field, whether to the display the IP to the end User or not", authorized = {RoleType.Admin}) private Boolean display; @@ -82,7 +82,7 @@ public class ReserveIPAddrCmd extends BaseCmd implements UserCmd { type = CommandType.UUID, entityType = IPAddressResponse.class, required = true, - description = "the ID of the public IP address to reserve") + description = "The ID of the public IP address to reserve") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/address/UpdateIPAddrCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/address/UpdateIPAddrCmd.java index 194967e2e4a4..5e7308685a64 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/address/UpdateIPAddrCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/address/UpdateIPAddrCmd.java @@ -46,14 +46,14 @@ public class UpdateIPAddrCmd extends BaseAsyncCustomIdCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = IPAddressResponse.class, required = true, description = "the ID of the public IP address" + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = IPAddressResponse.class, required = true, description = "The ID of the public IP address" + " to update") private Long id; // unexposed parameter needed for events logging @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, expose = false) private Long ownerId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the IP to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the IP to the end User or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java index ee0a38ef35dc..9647fd365640 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/CreateAffinityGroupCmd.java @@ -42,25 +42,25 @@ public class CreateAffinityGroupCmd extends BaseAsyncCreateCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an account for the affinity group. Must be used with domainId.") + @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", + description = "DomainId of the account owning the affinity group", entityType = DomainResponse.class) private Long domainId; @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, - description = "create affinity group for project") + description = "Create affinity group for project") private Long projectId; - @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "optional description of the affinity group") + @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") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "Name of the affinity group") private String affinityGroupName; @Parameter(name = ApiConstants.TYPE, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java index 2f24158cadbb..6eb75c7c1838 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/DeleteAffinityGroupCmd.java @@ -44,12 +44,12 @@ public class DeleteAffinityGroupCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "the account of the affinity group. Must be specified with domain ID") + @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", + description = "The domain ID of account owning the affinity group", entityType = DomainResponse.class) private Long domainId; @@ -63,7 +63,7 @@ public class DeleteAffinityGroupCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the affinity group. Mutually exclusive with ID parameter") private String name; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, description = "the project of the affinity group", entityType = ProjectResponse.class) + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, description = "The project of the affinity group", entityType = ProjectResponse.class) private Long projectId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java index ee23e3794ce1..2f30d8d8eeed 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/ListAffinityGroupsCmd.java @@ -36,19 +36,19 @@ public class ListAffinityGroupsCmd extends BaseListProjectAndAccountResourcesCmd //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "lists affinity groups by name") + @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", + description = "Lists affinity groups by Instance 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) + @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") + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "Lists affinity groups by type") private String affinityGroupType; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/UpdateVMAffinityGroupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/UpdateVMAffinityGroupCmd.java index 6cd9bce62595..e522747780f2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/UpdateVMAffinityGroupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/affinitygroup/UpdateVMAffinityGroupCmd.java @@ -46,7 +46,7 @@ import com.cloud.vm.VirtualMachine; @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 " + description = "Updates the affinity/anti-affinity group associations of an Instance. The Instance has to be stopped and restarted for the " + "new properties to take effect.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, @@ -61,7 +61,7 @@ public class UpdateVMAffinityGroupCmd extends BaseAsyncCmd implements UserCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the virtual machine") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the Instance") private Long id; @ACL @@ -69,8 +69,8 @@ public class UpdateVMAffinityGroupCmd extends BaseAsyncCmd implements UserCmd { 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") + description = "Comma separated list of affinity groups id that are going to be applied to the Instance. " + + "Should be passed only when Instance is created from a zone with Basic Network support." + " Mutually exclusive with securitygroupnames parameter") private List affinityGroupIdList; @ACL @@ -78,8 +78,8 @@ public class UpdateVMAffinityGroupCmd extends BaseAsyncCmd implements UserCmd { 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") + description = "Comma separated list of affinity groups names that are going to be applied to the Instance." + + " Should be passed only when Instance is created from a zone with Basic Network support. " + "Mutually exclusive with securitygroupids parameter") private List affinityGroupNameList; ///////////////////////////////////////////////////// @@ -152,7 +152,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update VM's affinity groups"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update Instance's affinity groups"); } } @@ -163,7 +163,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "updating VM affinity group"; + return "Updating Instance affinity group"; } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScalePolicyCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScalePolicyCmd.java index a000e265f93b..e160a1a90103 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScalePolicyCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScalePolicyCmd.java @@ -37,7 +37,7 @@ import com.cloud.user.Account; @APICommand(name = "createAutoScalePolicy", - description = "Creates an autoscale policy for a provision or deprovision action, the action is taken when the all the conditions evaluates to true for the specified duration. The policy is in effect once it is attached to a autscale vm group.", + description = "Creates an autoscale policy for a provision or deprovision action, the action is taken when the all the conditions evaluates to true for the specified duration. The policy is in effect once it is attached to a autscale Instance group.", responseObject = AutoScalePolicyResponse.class, entityType = {AutoScalePolicy.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) @@ -51,25 +51,25 @@ public class CreateAutoScalePolicyCmd extends BaseAsyncCreateCmd { @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, - description = "the name of the autoscale policy", + description = "The name of the autoscale policy", since = "4.18.0") private String name; @Parameter(name = ApiConstants.ACTION, type = CommandType.STRING, required = true, - description = "the action to be executed if all the conditions evaluate to true for the specified duration.") + description = "The action to be executed if all the conditions evaluate to true for the specified duration.") private String action; @Parameter(name = ApiConstants.DURATION, type = CommandType.INTEGER, required = true, - description = "the duration in which the conditions have to be true before action is taken") + description = "The duration in which the conditions have to be true before action is taken") private int duration; @Parameter(name = ApiConstants.QUIETTIME, type = CommandType.INTEGER, - description = "the cool down period in which the policy should not be evaluated after the action has been taken") + description = "The cool down period in which the policy should not be evaluated after the action has been taken") private Integer quietTime; @Parameter(name = ApiConstants.CONDITION_IDS, @@ -77,7 +77,7 @@ public class CreateAutoScalePolicyCmd extends BaseAsyncCreateCmd { collectionType = CommandType.UUID, entityType = ConditionResponse.class, required = true, - description = "the list of IDs of the conditions that are being evaluated on every interval") + description = "The list of IDs of the conditions that are being evaluated on every interval") private List conditionIds; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmGroupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmGroupCmd.java index 7c9362d4b691..66a1a56fbe2c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmGroupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmGroupCmd.java @@ -39,7 +39,7 @@ import com.cloud.network.rules.LoadBalancer; @APICommand(name = "createAutoScaleVmGroup", - description = "Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.", + description = "Creates and automatically starts an Instance based on a service offering, disk offering, and Template.", responseObject = AutoScaleVmGroupResponse.class, entityType = {AutoScaleVmGroup.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) @@ -55,28 +55,28 @@ public class CreateAutoScaleVmGroupCmd extends BaseAsyncCreateCmd { type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, - description = "the ID of the load balancer rule") + description = "The ID of the load balancer rule") private long lbRuleId; @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, - description = "the name of the autoscale vmgroup", + description = "The name of the autoscale Instance Group", since = "4.18.0") private String name; @Parameter(name = ApiConstants.MIN_MEMBERS, type = CommandType.INTEGER, required = true, - description = "the minimum number of members in the vmgroup, the number of instances in the vm group will be equal to or more than this number.") + description = "The minimum number of members in the Instance Group, the number of Instances in the Instance group will be equal to or more than this number.") private int minMembers; @Parameter(name = ApiConstants.MAX_MEMBERS, type = CommandType.INTEGER, required = true, - description = "the maximum number of members in the vmgroup, The number of instances in the vm group will be equal to or less than this number.") + description = "The maximum number of members in the Instance Group, The number of Instances in the Instance group will be equal to or less than this number.") private int maxMembers; - @Parameter(name = ApiConstants.INTERVAL, type = CommandType.INTEGER, description = "the frequency in which the performance counters to be collected") + @Parameter(name = ApiConstants.INTERVAL, type = CommandType.INTEGER, description = "The frequency in which the performance counters to be collected") private Integer interval; @Parameter(name = ApiConstants.SCALEUP_POLICY_IDS, @@ -84,7 +84,7 @@ public class CreateAutoScaleVmGroupCmd extends BaseAsyncCreateCmd { collectionType = CommandType.UUID, entityType = AutoScalePolicyResponse.class, required = true, - description = "list of scaleup autoscale policies") + description = "List of scaleup autoscale policies") private List scaleUpPolicyIds; @Parameter(name = ApiConstants.SCALEDOWN_POLICY_IDS, @@ -92,17 +92,17 @@ public class CreateAutoScaleVmGroupCmd extends BaseAsyncCreateCmd { collectionType = CommandType.UUID, entityType = AutoScalePolicyResponse.class, required = true, - description = "list of scaledown autoscale policies") + description = "List of scaledown autoscale policies") private List scaleDownPolicyIds; @Parameter(name = ApiConstants.VMPROFILE_ID, type = CommandType.UUID, entityType = AutoScaleVmProfileResponse.class, required = true, - description = "the autoscale profile that contains information about the vms in the vm group.") + description = "The autoscale profile that contains information about the Instances in the Instance group.") private long profileId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the group to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the group to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; // /////////////////////////////////////////////////// @@ -180,12 +180,12 @@ public String getCreateEventType() { @Override public String getCreateEventDescription() { - return "creating AutoScale Vm Group"; + return "Creating AutoScale Instance Group"; } @Override public String getEventDescription() { - return "configuring AutoScale Vm Group. Vm Group Id: " + getEntityId(); + return "Configuring AutoScale Instance Group. Instance Group Id: " + getEntityId(); } @Override @@ -213,7 +213,7 @@ public void create() throws ResourceAllocationException { setEntityId(result.getId()); setEntityUuid(result.getUuid()); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create Autoscale Vm Group"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create Autoscale Instance Group"); } } @@ -231,11 +231,11 @@ public void execute() { } } catch (Exception ex) { // TODO what will happen if Resource Layer fails in a step in between - logger.warn("Failed to create autoscale vm group", ex); + logger.warn("Failed to create autoscale Instance group", ex); } finally { if (!success || vmGroup == null) { _autoScaleService.deleteAutoScaleVmGroup(getEntityId(), true); - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create Autoscale Vm Group"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create Autoscale Instance Group"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmProfileCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmProfileCmd.java index 2d84b20c5828..4ecce59fa454 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmProfileCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateAutoScaleVmProfileCmd.java @@ -44,7 +44,7 @@ import com.cloud.network.as.AutoScaleVmProfile; @APICommand(name = "createAutoScaleVmProfile", - description = "Creates a profile that contains information about the virtual machine which will be provisioned automatically by autoscale feature.", + description = "Creates a profile that contains information about the Instance which will be provisioned automatically by autoscale feature.", responseObject = AutoScaleVmProfileResponse.class, entityType = {AutoScaleVmProfile.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) @@ -61,33 +61,33 @@ public class CreateAutoScaleVmProfileCmd extends BaseAsyncCreateCmd { type = CommandType.UUID, entityType = ZoneResponse.class, required = true, - description = "availability zone for the auto deployed virtual machine") + description = "Availability zone for the auto deployed Instance") private Long zoneId; @Parameter(name = ApiConstants.SERVICE_OFFERING_ID, type = CommandType.UUID, entityType = ServiceOfferingResponse.class, required = true, - description = "the service offering of the auto deployed virtual machine") + description = "The service offering of the auto deployed Instance") private Long serviceOfferingId; @Parameter(name = ApiConstants.TEMPLATE_ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, - description = "the template of the auto deployed virtual machine") + description = "The Template of the auto deployed Instance") private Long templateId; @Parameter(name = ApiConstants.OTHER_DEPLOY_PARAMS, type = CommandType.MAP, - description = "parameters other than zoneId/serviceOfferringId/templateId of the auto deployed virtual machine.\n" + description = "Parameters other than zoneId/serviceOfferringId/templateId of the auto deployed Instance.\n" + "Example: otherdeployparams[0].name=serviceofferingid&otherdeployparams[0].value=a7fb50f6-01d9-11ed-8bc1-77f8f0228926&otherdeployparams[1].name=rootdisksize&otherdeployparams[1].value=10 .\n" + "Possible parameters are \"rootdisksize\", \"diskofferingid\",\"size\", \"securitygroupids\", \"overridediskofferingid\", \"keypairs\", \"affinitygroupids'\" and \"networkids\".") private Map> otherDeployParams; @Parameter(name = ApiConstants.AUTOSCALE_EXPUNGE_VM_GRACE_PERIOD, type = CommandType.INTEGER, - description = "the time allowed for existing connections to get closed before a vm is expunged") + description = "The time allowed for existing connections to get closed before an Instance is expunged") private Integer expungeVmGracePeriod; @Parameter(name = ApiConstants.COUNTERPARAM_LIST, @@ -97,7 +97,7 @@ public class CreateAutoScaleVmProfileCmd extends BaseAsyncCreateCmd { @Parameter(name = ApiConstants.USER_DATA, type = CommandType.STRING, - description = "an optional binary data that can be sent to the virtual machine upon a successful deployment. " + + description = "An optional binary data that can be sent to the Instance upon a successful deployment. " + "This binary data must be base64 encoded before adding it to the request. " + "Using HTTP GET (via querystring), you can send up to 4KB of data after base64 encoding. " + "Using HTTP POST (via POST body), you can send up to 1MB of data after base64 encoding. " + @@ -115,19 +115,19 @@ public class CreateAutoScaleVmProfileCmd extends BaseAsyncCreateCmd { @Parameter(name = ApiConstants.AUTOSCALE_USER_ID, type = CommandType.UUID, entityType = UserResponse.class, - description = "the ID of the user used to launch and destroy the VMs") + description = "The ID of the user used to launch and destroy the Instances") private Long autoscaleUserId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the profile to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the profile to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "account that will own the autoscale VM profile") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Account that will own the autoscale Instance profile") private String accountName; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "an optional project for the autoscale VM profile") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "An optional project for the autoscale Instance profile") private Long projectId; - @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "domain ID of the account owning a autoscale VM profile") + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Domain ID of the Account owning an autoscale Instance profile") private Long domainId; // /////////////////////////////////////////////////// @@ -247,7 +247,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "creating AutoScale Vm Profile"; + return "Creating AutoScale Instance Profile"; } @Override @@ -271,7 +271,7 @@ public void create() throws ResourceAllocationException { setEntityId(result.getId()); setEntityUuid(result.getUuid()); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create Autoscale Vm Profile"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create Autoscale Instance Profile"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateConditionCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateConditionCmd.java index 0ffb9afdac4d..9d42706cb7d7 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateConditionCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/CreateConditionCmd.java @@ -35,7 +35,7 @@ import com.cloud.exception.ResourceAllocationException; import com.cloud.network.as.Condition; -@APICommand(name = "createCondition", description = "Creates a condition for VM auto scaling", responseObject = ConditionResponse.class, entityType = {Condition.class}, +@APICommand(name = "createCondition", description = "Creates a condition for Instance auto scaling", responseObject = ConditionResponse.class, entityType = {Condition.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateConditionCmd extends BaseAsyncCreateCmd { private static final String s_name = "conditionresponse"; @@ -53,13 +53,13 @@ public class CreateConditionCmd extends BaseAsyncCreateCmd { @Parameter(name = ApiConstants.THRESHOLD, type = CommandType.LONG, required = true, description = "Value for which the Counter will be evaluated with the Operator selected.") private Long threshold; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "the account of the condition. " + "Must be used with the domainId parameter.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "The account of the condition. " + "Must be used with the domainId parameter.") private String accountName; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "an optional project for condition") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "An optional project for condition") private Long projectId; - @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "the domain ID of the account.") + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "The domain ID of the account.") private Long domainId; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScalePolicyCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScalePolicyCmd.java index cee9460dbe60..fac7ffe37d30 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScalePolicyCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScalePolicyCmd.java @@ -46,7 +46,7 @@ public class DeleteAutoScalePolicyCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = AutoScalePolicyResponse.class, required = true, - description = "the ID of the autoscale policy") + description = "The ID of the autoscale policy") private Long id; // /////////////////////////////////////////////////// @@ -91,7 +91,7 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { - logger.warn("Failed to delete autoscale policy " + getId()); + logger.warn("Failed to delete autoscale policy {}", getId()); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete AutoScale Policy"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmGroupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmGroupCmd.java index 6bf2157533e1..c2dd6d5424d9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmGroupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmGroupCmd.java @@ -34,7 +34,7 @@ import com.cloud.network.as.AutoScaleVmGroup; import com.cloud.user.Account; -@APICommand(name = "deleteAutoScaleVmGroup", description = "Deletes a autoscale vm group.", responseObject = SuccessResponse.class, entityType = {AutoScaleVmGroup.class}, +@APICommand(name = "deleteAutoScaleVmGroup", description = "Deletes an autoscale Instance group.", responseObject = SuccessResponse.class, entityType = {AutoScaleVmGroup.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteAutoScaleVmGroupCmd extends BaseAsyncCmd { // /////////////////////////////////////////////////// @@ -46,12 +46,12 @@ public class DeleteAutoScaleVmGroupCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = AutoScaleVmGroupResponse.class, required = true, - description = "the ID of the autoscale group") + description = "The ID of the autoscale group") private Long id; @Parameter(name = ApiConstants.CLEANUP, type = CommandType.BOOLEAN, - description = "true if all VMs have to be cleaned up, false otherwise", + description = "True if all VMs have to be cleaned up, false otherwise", since = "4.18.0") private Boolean cleanup; @@ -89,19 +89,19 @@ public String getEventType() { @Override public String getEventDescription() { - return "deleting autoscale vm group: " + getId(); + return "Deleting autoscale Instance group: " + getId(); } @Override public void execute() { - CallContext.current().setEventDetails("AutoScale Vm Group Id: " + getId()); + CallContext.current().setEventDetails("AutoScale Instance Group Id: " + getId()); boolean result = _autoScaleService.deleteAutoScaleVmGroup(id, getCleanup()); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { - logger.warn("Failed to delete autoscale vm group " + getId()); + logger.warn("Failed to delete autoscale Instance group {}", getId()); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete autoscale vm group"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmProfileCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmProfileCmd.java index b90f6aa8ffa5..9e2f63deda2e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmProfileCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteAutoScaleVmProfileCmd.java @@ -34,7 +34,7 @@ import com.cloud.network.as.AutoScaleVmProfile; import com.cloud.user.Account; -@APICommand(name = "deleteAutoScaleVmProfile", description = "Deletes a autoscale vm profile.", responseObject = SuccessResponse.class, entityType = {AutoScaleVmProfile.class}, +@APICommand(name = "deleteAutoScaleVmProfile", description = "Deletes a autoscale Instance profile.", responseObject = SuccessResponse.class, entityType = {AutoScaleVmProfile.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteAutoScaleVmProfileCmd extends BaseAsyncCmd { // /////////////////////////////////////////////////// @@ -46,7 +46,7 @@ public class DeleteAutoScaleVmProfileCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = AutoScaleVmProfileResponse.class, required = true, - description = "the ID of the autoscale profile") + description = "The ID of the autoscale profile") private Long id; // /////////////////////////////////////////////////// @@ -79,19 +79,19 @@ public String getEventType() { @Override public String getEventDescription() { - return "deleting autoscale vm profile: " + getId(); + return "Deleting autoscale Instance profile: " + getId(); } @Override public void execute() { - CallContext.current().setEventDetails("AutoScale VM Profile Id: " + getId()); + CallContext.current().setEventDetails("AutoScale Instance Profile Id: " + getId()); boolean result = _autoScaleService.deleteAutoScaleVmProfile(id); if (result) { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { - logger.warn("Failed to delete autoscale vm profile " + getId()); - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete autoscale vm profile"); + logger.warn("Failed to delete autoscale Instance profile {}", getId()); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete autoscale Instance profile"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteConditionCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteConditionCmd.java index 9590012e0375..2eeed8b49da1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteConditionCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DeleteConditionCmd.java @@ -35,7 +35,7 @@ import com.cloud.network.as.Condition; import com.cloud.user.Account; -@APICommand(name = "deleteCondition", description = "Removes a condition for VM auto scaling", responseObject = SuccessResponse.class, entityType = {Condition.class}, +@APICommand(name = "deleteCondition", description = "Removes a condition for Instance auto scaling", responseObject = SuccessResponse.class, entityType = {Condition.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteConditionCmd extends BaseAsyncCmd { @@ -44,7 +44,7 @@ public class DeleteConditionCmd extends BaseAsyncCmd { // /////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ConditionResponse.class, required = true, description = "the ID of the condition.") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ConditionResponse.class, required = true, description = "The ID of the condition.") private Long id; // /////////////////////////////////////////////////// @@ -64,7 +64,7 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { - logger.warn("Failed to delete condition " + getId()); + logger.warn("Failed to delete condition {}", getId()); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete condition."); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DisableAutoScaleVmGroupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DisableAutoScaleVmGroupCmd.java index 2414c0d82b62..814f35c9f70a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DisableAutoScaleVmGroupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/DisableAutoScaleVmGroupCmd.java @@ -33,7 +33,7 @@ import com.cloud.network.as.AutoScaleVmGroup; import com.cloud.user.Account; -@APICommand(name = "disableAutoScaleVmGroup", description = "Disables an AutoScale Vm Group", responseObject = AutoScaleVmGroupResponse.class, entityType = {AutoScaleVmGroup.class}, +@APICommand(name = "disableAutoScaleVmGroup", description = "Disables an AutoScale Instance Group", responseObject = AutoScaleVmGroupResponse.class, entityType = {AutoScaleVmGroup.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DisableAutoScaleVmGroupCmd extends BaseAsyncCmd { private static final String s_name = "disableautoscalevmGroupresponse"; @@ -47,7 +47,7 @@ public class DisableAutoScaleVmGroupCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = AutoScaleVmGroupResponse.class, required = true, - description = "the ID of the autoscale group") + description = "The ID of the autoscale group") private Long id; // /////////////////////////////////////////////////// @@ -62,7 +62,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to disable AutoScale Vm Group"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to disable AutoScale Instance Group"); } } @@ -96,7 +96,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Disabling AutoScale Vm Group. Vm Group Id: " + getId(); + return "Disabling AutoScale Instance Group. Instance Group Id: " + getId(); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/EnableAutoScaleVmGroupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/EnableAutoScaleVmGroupCmd.java index 96d329d3e0c8..962c5af0e2c1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/EnableAutoScaleVmGroupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/EnableAutoScaleVmGroupCmd.java @@ -33,7 +33,7 @@ import com.cloud.network.as.AutoScaleVmGroup; import com.cloud.user.Account; -@APICommand(name = "enableAutoScaleVmGroup", description = "Enables an AutoScale Vm Group", responseObject = AutoScaleVmGroupResponse.class, entityType = {AutoScaleVmGroup.class}, +@APICommand(name = "enableAutoScaleVmGroup", description = "Enables an AutoScale Instance Group", responseObject = AutoScaleVmGroupResponse.class, entityType = {AutoScaleVmGroup.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class EnableAutoScaleVmGroupCmd extends BaseAsyncCmd { private static final String s_name = "enableautoscalevmGroupresponse"; @@ -47,7 +47,7 @@ public class EnableAutoScaleVmGroupCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = AutoScaleVmGroupResponse.class, required = true, - description = "the ID of the autoscale group") + description = "The ID of the autoscale group") private Long id; // /////////////////////////////////////////////////// @@ -62,7 +62,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to enable AutoScale Vm Group"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to enable AutoScale Instance Group"); } } @@ -96,7 +96,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Enabling AutoScale Vm Group. Vm Group Id: " + getId(); + return "Enabling AutoScale Instance Group. Instance Group Id: " + getId(); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListAutoScalePoliciesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListAutoScalePoliciesCmd.java index 4935889c5255..5ce0aa7f5b75 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListAutoScalePoliciesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListAutoScalePoliciesCmd.java @@ -40,21 +40,21 @@ public class ListAutoScalePoliciesCmd extends BaseListProjectAndAccountResources // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AutoScalePolicyResponse.class, description = "the ID of the autoscale policy") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AutoScalePolicyResponse.class, description = "The ID of the autoscale policy") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the autoscale policy", since = "4.18.0") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the autoscale policy", since = "4.18.0") private String name; - @Parameter(name = ApiConstants.CONDITION_ID, type = CommandType.UUID, entityType = ConditionResponse.class, description = "the ID of the condition of the policy") + @Parameter(name = ApiConstants.CONDITION_ID, type = CommandType.UUID, entityType = ConditionResponse.class, description = "The ID of the condition of the policy") private Long conditionId; @Parameter(name = ApiConstants.ACTION, type = CommandType.STRING, - description = "the action to be executed if all the conditions evaluate to true for the specified duration.") + description = "The action to be executed if all the conditions evaluate to true for the specified duration.") private String action; - @Parameter(name = ApiConstants.VMGROUP_ID, type = CommandType.UUID, entityType = AutoScaleVmGroupResponse.class, description = "the ID of the autoscale vm group") + @Parameter(name = ApiConstants.VMGROUP_ID, type = CommandType.UUID, entityType = AutoScaleVmGroupResponse.class, description = "The ID of the autoscale Instance group") private Long vmGroupId; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmGroupsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmGroupsCmd.java index 6aa4abcccd8c..4bb0ef091487 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmGroupsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmGroupsCmd.java @@ -35,7 +35,7 @@ import com.cloud.exception.InvalidParameterValueException; import com.cloud.network.as.AutoScaleVmGroup; -@APICommand(name = "listAutoScaleVmGroups", description = "Lists autoscale vm groups.", responseObject = AutoScaleVmGroupResponse.class, entityType = {AutoScaleVmGroup.class}, +@APICommand(name = "listAutoScaleVmGroups", description = "Lists autoscale Instance groups.", responseObject = AutoScaleVmGroupResponse.class, entityType = {AutoScaleVmGroup.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListAutoScaleVmGroupsCmd extends BaseListProjectAndAccountResourcesCmd { @@ -44,25 +44,25 @@ public class ListAutoScaleVmGroupsCmd extends BaseListProjectAndAccountResources // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AutoScaleVmGroupResponse.class, description = "the ID of the autoscale vm group") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AutoScaleVmGroupResponse.class, description = "The ID of the autoscale Instance group") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the autoscale vmgroup", since = "4.18.0") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the autoscale vmgroup", since = "4.18.0") private String name; - @Parameter(name = ApiConstants.LBID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, description = "the ID of the loadbalancer") + @Parameter(name = ApiConstants.LBID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, description = "The ID of the loadbalancer") private Long loadBalancerId; - @Parameter(name = ApiConstants.VMPROFILE_ID, type = CommandType.UUID, entityType = AutoScaleVmProfileResponse.class, description = "the ID of the profile") + @Parameter(name = ApiConstants.VMPROFILE_ID, type = CommandType.UUID, entityType = AutoScaleVmProfileResponse.class, description = "The ID of the profile") private Long profileId; - @Parameter(name = ApiConstants.POLICY_ID, type = CommandType.UUID, entityType = AutoScalePolicyResponse.class, description = "the ID of the policy") + @Parameter(name = ApiConstants.POLICY_ID, type = CommandType.UUID, entityType = AutoScalePolicyResponse.class, description = "The ID of the policy") private Long policyId; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the availability zone ID") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The availability zone ID") private Long zoneId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmProfilesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmProfilesCmd.java index bcaea273ce84..4c95e7a4edcd 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmProfilesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListAutoScaleVmProfilesCmd.java @@ -33,7 +33,7 @@ import com.cloud.network.as.AutoScaleVmProfile; -@APICommand(name = "listAutoScaleVmProfiles", description = "Lists autoscale vm profiles.", responseObject = AutoScaleVmProfileResponse.class, entityType = {AutoScaleVmProfile.class}, +@APICommand(name = "listAutoScaleVmProfiles", description = "Lists autoscale Instance profiles.", responseObject = AutoScaleVmProfileResponse.class, entityType = {AutoScaleVmProfile.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListAutoScaleVmProfilesCmd extends BaseListProjectAndAccountResourcesCmd { @@ -42,22 +42,22 @@ public class ListAutoScaleVmProfilesCmd extends BaseListProjectAndAccountResourc // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AutoScaleVmProfileResponse.class, description = "the ID of the autoscale vm profile") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = AutoScaleVmProfileResponse.class, description = "The ID of the autoscale Instance profile") private Long id; - @Parameter(name = ApiConstants.TEMPLATE_ID, type = CommandType.UUID, entityType = TemplateResponse.class, description = "the templateid of the autoscale vm profile") + @Parameter(name = ApiConstants.TEMPLATE_ID, type = CommandType.UUID, entityType = TemplateResponse.class, description = "The templateid of the autoscale Instance profile") private Long templateId; - @Parameter(name = ApiConstants.SERVICE_OFFERING_ID, type = CommandType.UUID, entityType = ServiceOfferingResponse.class, description = "list profiles by service offering id", since = "4.4") + @Parameter(name = ApiConstants.SERVICE_OFFERING_ID, type = CommandType.UUID, entityType = ServiceOfferingResponse.class, description = "List profiles by service offering id", since = "4.4") private Long serviceOffId; - @Parameter(name = ApiConstants.OTHER_DEPLOY_PARAMS, type = CommandType.STRING, description = "the otherdeployparameters of the autoscale vm profile") + @Parameter(name = ApiConstants.OTHER_DEPLOY_PARAMS, type = CommandType.STRING, description = "The otherdeployparameters of the autoscale Instance profile") private String otherDeployParams; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, since = "4.4", description = "availability zone for the auto deployed virtual machine") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, since = "4.4", description = "Availability zone for the auto deployed Instance") private Long zoneId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListConditionsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListConditionsCmd.java index febf937d75f6..02e54a15ac3a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListConditionsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListConditionsCmd.java @@ -32,7 +32,7 @@ import com.cloud.network.as.Condition; -@APICommand(name = "listConditions", description = "List Conditions for VM auto scaling", responseObject = ConditionResponse.class, +@APICommand(name = "listConditions", description = "List Conditions for Instance auto scaling", responseObject = ConditionResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListConditionsCmd extends BaseListProjectAndAccountResourcesCmd { @@ -50,7 +50,7 @@ public class ListConditionsCmd extends BaseListProjectAndAccountResourcesCmd { description = "Counter-id of the condition.") private Long counterId; - @Parameter(name = ApiConstants.POLICY_ID, type = CommandType.UUID, entityType = AutoScalePolicyResponse.class, description = "the ID of the policy") + @Parameter(name = ApiConstants.POLICY_ID, type = CommandType.UUID, entityType = AutoScalePolicyResponse.class, description = "The ID of the policy") private Long policyId; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListCountersCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListCountersCmd.java index d03584fd63d5..983c13f07a29 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListCountersCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/ListCountersCmd.java @@ -31,7 +31,7 @@ import com.cloud.network.as.Counter; import com.cloud.user.Account; -@APICommand(name = "listCounters", description = "List the counters for VM auto scaling", responseObject = CounterResponse.class, +@APICommand(name = "listCounters", description = "List the counters for Instance auto scaling", responseObject = CounterResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListCountersCmd extends BaseListCmd { private static final String s_name = "counterresponse"; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScalePolicyCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScalePolicyCmd.java index 927a9191fcc2..368f9c01fe18 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScalePolicyCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScalePolicyCmd.java @@ -48,23 +48,23 @@ public class UpdateAutoScalePolicyCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, - description = "the name of the autoscale policy", + description = "The name of the autoscale policy", since = "4.18.0") private String name; - @Parameter(name = ApiConstants.DURATION, type = CommandType.INTEGER, description = "the duration in which the conditions have to be true before action is taken") + @Parameter(name = ApiConstants.DURATION, type = CommandType.INTEGER, description = "The duration in which the conditions have to be true before action is taken") private Integer duration; @Parameter(name = ApiConstants.QUIETTIME, type = CommandType.INTEGER, - description = "the cool down period in which the policy should not be evaluated after the action has been taken") + description = "The cool down period in which the policy should not be evaluated after the action has been taken") private Integer quietTime; @Parameter(name = ApiConstants.CONDITION_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = ConditionResponse.class, - description = "the list of IDs of the conditions that are being evaluated on every interval") + description = "The list of IDs of the conditions that are being evaluated on every interval") private List conditionIds; @ACL(accessType = AccessType.OperateEntry) @@ -72,7 +72,7 @@ public class UpdateAutoScalePolicyCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = AutoScalePolicyResponse.class, required = true, - description = "the ID of the autoscale policy") + description = "The ID of the autoscale policy") private Long id; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmGroupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmGroupCmd.java index 69ae8aa36aa1..128a1368c529 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmGroupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmGroupCmd.java @@ -38,7 +38,7 @@ import com.cloud.network.as.AutoScaleVmGroup; import com.cloud.user.Account; -@APICommand(name = "updateAutoScaleVmGroup", description = "Updates an existing autoscale vm group.", responseObject = AutoScaleVmGroupResponse.class, entityType = {AutoScaleVmGroup.class}, +@APICommand(name = "updateAutoScaleVmGroup", description = "Updates an existing autoscale Instance group.", responseObject = AutoScaleVmGroupResponse.class, entityType = {AutoScaleVmGroup.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdateAutoScaleVmGroupCmd extends BaseAsyncCustomIdCmd { @@ -49,35 +49,35 @@ public class UpdateAutoScaleVmGroupCmd extends BaseAsyncCustomIdCmd { @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, - description = "the name of the autoscale vmgroup", + description = "The name of the autoscale vmgroup", since = "4.18.0") private String name; @Parameter(name = ApiConstants.MIN_MEMBERS, type = CommandType.INTEGER, - description = "the minimum number of members in the vmgroup, the number of instances in the vm group will be equal to or more than this number.") + description = "The minimum number of members in the vmgroup, the number of Instances in the Instance group will be equal to or more than this number.") private Integer minMembers; @Parameter(name = ApiConstants.MAX_MEMBERS, type = CommandType.INTEGER, - description = "the maximum number of members in the vmgroup, The number of instances in the vm group will be equal to or less than this number.") + description = "The maximum number of members in the vmgroup, The number of Instances in the Instance group will be equal to or less than this number.") private Integer maxMembers; - @Parameter(name = ApiConstants.INTERVAL, type = CommandType.INTEGER, description = "the frequency in which the performance counters to be collected") + @Parameter(name = ApiConstants.INTERVAL, type = CommandType.INTEGER, description = "The frequency in which the performance counters to be collected") private Integer interval; @Parameter(name = ApiConstants.SCALEUP_POLICY_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = AutoScalePolicyResponse.class, - description = "list of scaleup autoscale policies") + description = "List of scaleup autoscale policies") private List scaleUpPolicyIds; @Parameter(name = ApiConstants.SCALEDOWN_POLICY_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = AutoScalePolicyResponse.class, - description = "list of scaledown autoscale policies") + description = "List of scaledown autoscale policies") private List scaleDownPolicyIds; @ACL(accessType = AccessType.OperateEntry) @@ -85,10 +85,10 @@ public class UpdateAutoScaleVmGroupCmd extends BaseAsyncCustomIdCmd { type = CommandType.UUID, entityType = AutoScaleVmGroupResponse.class, required = true, - description = "the ID of the autoscale group") + description = "The ID of the autoscale group") private Long id; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the group to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the group to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; // /////////////////////////////////////////////////// @@ -97,7 +97,7 @@ public class UpdateAutoScaleVmGroupCmd extends BaseAsyncCustomIdCmd { @Override public void execute() { - CallContext.current().setEventDetails("AutoScale Vm Group Id: " + getId()); + CallContext.current().setEventDetails("AutoScale Instance Group Id: " + getId()); AutoScaleVmGroup result = _autoScaleService.updateAutoScaleVmGroup(this); if (result != null) { AutoScaleVmGroupResponse response = _responseGenerator.createAutoScaleVmGroupResponse(result); @@ -151,7 +151,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Updating AutoScale Vm Group. Vm Group Id: " + getId(); + return "Updating AutoScale Instance Group. Instance Group Id: " + getId(); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmProfileCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmProfileCmd.java index 0b73fd91b525..5192f0382db6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmProfileCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateAutoScaleVmProfileCmd.java @@ -42,7 +42,7 @@ import com.cloud.network.as.AutoScaleVmProfile; import com.cloud.user.Account; -@APICommand(name = "updateAutoScaleVmProfile", description = "Updates an existing autoscale vm profile.", responseObject = AutoScaleVmProfileResponse.class, entityType = {AutoScaleVmProfile.class}, +@APICommand(name = "updateAutoScaleVmProfile", description = "Updates an existing autoscale Instance profile.", responseObject = AutoScaleVmProfileResponse.class, entityType = {AutoScaleVmProfile.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdateAutoScaleVmProfileCmd extends BaseAsyncCustomIdCmd { @@ -56,25 +56,25 @@ public class UpdateAutoScaleVmProfileCmd extends BaseAsyncCustomIdCmd { type = CommandType.UUID, entityType = AutoScaleVmProfileResponse.class, required = true, - description = "the ID of the autoscale vm profile") + description = "The ID of the autoscale Instance profile") private Long id; @Parameter(name = ApiConstants.SERVICE_OFFERING_ID, type = CommandType.UUID, entityType = ServiceOfferingResponse.class, - description = "the service offering of the auto deployed virtual machine", + description = "The service offering of the auto deployed Instance", since = "4.18.0") private Long serviceOfferingId; @Parameter(name = ApiConstants.TEMPLATE_ID, type = CommandType.UUID, entityType = TemplateResponse.class, - description = "the template of the auto deployed virtual machine") + description = "The Template of the auto deployed Instance") private Long templateId; @Parameter(name = ApiConstants.AUTOSCALE_EXPUNGE_VM_GRACE_PERIOD, type = CommandType.INTEGER, - description = "the time allowed for existing connections to get closed before a vm is destroyed") + description = "The time allowed for existing connections to get closed before an Instance is destroyed") private Integer expungeVmGracePeriod; @Parameter(name = ApiConstants.COUNTERPARAM_LIST, @@ -84,7 +84,7 @@ public class UpdateAutoScaleVmProfileCmd extends BaseAsyncCustomIdCmd { @Parameter(name = ApiConstants.OTHER_DEPLOY_PARAMS, type = CommandType.MAP, - description = "parameters other than zoneId/serviceOfferringId/templateId of the auto deployed virtual machine. \n" + description = "Parameters other than zoneId/serviceOfferringId/templateId of the auto deployed Instance. \n" + "Example: otherdeployparams[0].name=serviceofferingid&otherdeployparams[0].value=a7fb50f6-01d9-11ed-8bc1-77f8f0228926&otherdeployparams[1].name=rootdisksize&otherdeployparams[1].value=10 .\n" + "Possible parameters are \"rootdisksize\", \"diskofferingid\",\"size\", \"securitygroupids\", \"overridediskofferingid\", \"keypairs\", \"affinitygroupids'\" and \"networkids\".", since = "4.18.0") @@ -92,7 +92,7 @@ public class UpdateAutoScaleVmProfileCmd extends BaseAsyncCustomIdCmd { @Parameter(name = ApiConstants.USER_DATA, type = CommandType.STRING, - description = "an optional binary data that can be sent to the virtual machine upon a successful deployment. " + + description = "An optional binary data that can be sent to the Instance upon a successful deployment. " + "This binary data must be base64 encoded before adding it to the request. " + "Using HTTP GET (via querystring), you can send up to 4KB of data after base64 encoding. " + "Using HTTP POST (via POST body), you can send up to 1MB of data after base64 encoding. " + @@ -112,10 +112,10 @@ public class UpdateAutoScaleVmProfileCmd extends BaseAsyncCustomIdCmd { @Parameter(name = ApiConstants.AUTOSCALE_USER_ID, type = CommandType.UUID, entityType = UserResponse.class, - description = "the ID of the user used to launch and destroy the VMs") + description = "The ID of the user used to launch and destroy the Instances") private Long autoscaleUserId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the profile to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the profile to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; // /////////////////////////////////////////////////// @@ -131,7 +131,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update autoscale vm profile"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update autoscale Instance profile"); } } @@ -190,7 +190,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Updating AutoScale Vm Profile. Vm Profile Id: " + getId(); + return "Updating AutoScale Instance Profile. Instance Profile Id: " + getId(); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateConditionCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateConditionCmd.java index 4ed8244ff0c9..a386db478438 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateConditionCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/autoscale/UpdateConditionCmd.java @@ -36,7 +36,7 @@ import com.cloud.network.as.Condition; import com.cloud.user.Account; -@APICommand(name = "updateCondition", description = "Updates a condition for VM auto scaling", responseObject = SuccessResponse.class, entityType = {Condition.class}, +@APICommand(name = "updateCondition", description = "Updates a condition for Instance auto scaling", responseObject = SuccessResponse.class, entityType = {Condition.class}, authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, since = "4.18.0") public class UpdateConditionCmd extends BaseAsyncCmd { @@ -46,7 +46,7 @@ public class UpdateConditionCmd extends BaseAsyncCmd { // /////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ConditionResponse.class, required = true, description = "the ID of the condition.") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ConditionResponse.class, required = true, description = "The ID of the condition.") private Long id; @Parameter(name = ApiConstants.RELATIONAL_OPERATOR, type = CommandType.STRING, required = true, description = "Relational Operator to be used with threshold. Valid values are EQ, GT, LT, GE, LE.") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/AssignVirtualMachineToBackupOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/AssignVirtualMachineToBackupOfferingCmd.java index 0e6b2bc165e4..e8914e45c429 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/AssignVirtualMachineToBackupOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/AssignVirtualMachineToBackupOfferingCmd.java @@ -40,7 +40,7 @@ import com.cloud.exception.ResourceUnavailableException; @APICommand(name = "assignVirtualMachineToBackupOffering", - description = "Assigns a VM to a backup offering", + description = "Assigns an Instance to a backup offering", responseObject = SuccessResponse.class, since = "4.14.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class AssignVirtualMachineToBackupOfferingCmd extends BaseAsyncCmd { @@ -56,7 +56,7 @@ public class AssignVirtualMachineToBackupOfferingCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = UserVmResponse.class, required = true, - description = "ID of the virtual machine") + description = "ID of the Instance") private Long vmId; @Parameter(name = ApiConstants.BACKUP_OFFERING_ID, @@ -90,7 +90,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add VM to backup offering"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add Instance to backup offering"); } } catch (Exception e) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); @@ -109,6 +109,6 @@ public String getEventType() { @Override public String getEventDescription() { - return "Assigning VM to backup offering ID: " + offeringId; + return "Assigning Instance to backup offering ID: " + offeringId; } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/CreateBackupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/CreateBackupCmd.java index 4e9028f52173..2d0cde65563d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/CreateBackupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/CreateBackupCmd.java @@ -41,7 +41,7 @@ import com.cloud.utils.exception.CloudRuntimeException; @APICommand(name = "createBackup", - description = "Create VM backup", + description = "Create Instance backup", responseObject = SuccessResponse.class, since = "4.14.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class CreateBackupCmd extends BaseAsyncCreateCmd { @@ -57,7 +57,7 @@ public class CreateBackupCmd extends BaseAsyncCreateCmd { type = CommandType.UUID, entityType = UserVmResponse.class, required = true, - description = "ID of the VM") + description = "ID of the Instance") private Long vmId; @Parameter(name = ApiConstants.NAME, @@ -114,7 +114,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new CloudRuntimeException("Error while creating backup of VM"); + throw new CloudRuntimeException("Error while creating backup of Instance"); } } catch (Exception e) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); @@ -138,7 +138,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Creating backup for VM " + vmId; + return "Creating backup for Instance " + vmId; } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/CreateBackupScheduleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/CreateBackupScheduleCmd.java index a352c688f127..67ad7c71503f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/CreateBackupScheduleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/CreateBackupScheduleCmd.java @@ -26,7 +26,6 @@ import org.apache.cloudstack.api.BaseCmd; import org.apache.cloudstack.api.Parameter; import org.apache.cloudstack.api.ServerApiException; -import org.apache.cloudstack.api.response.BackupResponse; import org.apache.cloudstack.api.response.BackupScheduleResponse; import org.apache.cloudstack.api.response.UserVmResponse; import org.apache.cloudstack.backup.BackupManager; @@ -37,8 +36,8 @@ import com.cloud.utils.exception.CloudRuntimeException; @APICommand(name = "createBackupSchedule", - description = "Creates a user-defined VM backup schedule", - responseObject = BackupResponse.class, since = "4.14.0", + description = "Creates a User-defined Instance backup schedule", + responseObject = BackupScheduleResponse.class, since = "4.14.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class CreateBackupScheduleCmd extends BaseCmd { @@ -53,19 +52,19 @@ public class CreateBackupScheduleCmd extends BaseCmd { type = CommandType.UUID, entityType = UserVmResponse.class, required = true, - description = "ID of the VM for which schedule is to be defined") + description = "ID of the Instance for which schedule is to be defined") private Long vmId; @Parameter(name = ApiConstants.INTERVAL_TYPE, type = CommandType.STRING, required = true, - description = "valid values are HOURLY, DAILY, WEEKLY, and MONTHLY") + description = "Valid values are HOURLY, DAILY, WEEKLY, and MONTHLY") private String intervalType; @Parameter(name = ApiConstants.SCHEDULE, type = CommandType.STRING, required = true, - description = "custom backup schedule, the format is:" + description = "Custom backup schedule, the format is:" + "for HOURLY MM*, for DAILY MM:HH*, for WEEKLY MM:HH:DD (1-7)*, for MONTHLY MM:HH:DD (1-28)") private String schedule; @@ -129,7 +128,7 @@ public void execute() throws ServerApiException { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new CloudRuntimeException("Error while creating backup schedule of VM"); + throw new CloudRuntimeException("Error while creating backup schedule of Instance"); } } catch (Exception e) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/DeleteBackupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/DeleteBackupCmd.java index 7f0a63ecc912..369934a79c49 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/DeleteBackupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/DeleteBackupCmd.java @@ -41,7 +41,7 @@ import com.cloud.utils.exception.CloudRuntimeException; @APICommand(name = "deleteBackup", - description = "Delete VM backup", + description = "Delete Instance backup", responseObject = SuccessResponse.class, since = "4.14.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class DeleteBackupCmd extends BaseAsyncCmd { @@ -57,13 +57,13 @@ public class DeleteBackupCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = BackupResponse.class, required = true, - description = "id of the VM backup") + description = "ID of the Instance backup") private Long backupId; @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, - description = "force the deletion of backup which removes the entire backup chain but keep VM in Backup Offering", + description = "Force the deletion of backup which removes the entire backup chain but keep Instance in Backup Offering", since = "4.18.0.0") private Boolean forced; @@ -92,7 +92,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new CloudRuntimeException("Error while deleting backup of VM"); + throw new CloudRuntimeException("Error while deleting backup of Instance"); } } catch (Exception e) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/DeleteBackupScheduleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/DeleteBackupScheduleCmd.java index dbfd21d5a56b..8dcf7574aed6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/DeleteBackupScheduleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/DeleteBackupScheduleCmd.java @@ -40,7 +40,7 @@ import com.cloud.utils.exception.CloudRuntimeException; @APICommand(name = "deleteBackupSchedule", - description = "Deletes the backup schedule of a VM", + description = "Deletes the backup schedule of a Instance", responseObject = SuccessResponse.class, since = "4.14.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class DeleteBackupScheduleCmd extends BaseCmd { @@ -85,7 +85,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new CloudRuntimeException("Failed to delete VM backup schedule"); + throw new CloudRuntimeException("Failed to delete Instance backup schedule"); } } catch (Exception e) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/ListBackupScheduleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/ListBackupScheduleCmd.java index d68e4a9296e9..eed346376152 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/ListBackupScheduleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/ListBackupScheduleCmd.java @@ -44,7 +44,7 @@ import java.util.List; @APICommand(name = "listBackupSchedule", - description = "List backup schedule of a VM", + description = "List backup schedule of an Instance", responseObject = BackupScheduleResponse.class, since = "4.14.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class ListBackupScheduleCmd extends BaseListProjectAndAccountResourcesCmd { @@ -59,7 +59,8 @@ public class ListBackupScheduleCmd extends BaseListProjectAndAccountResourcesCmd @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, - description = "ID of the VM") + required = true, + description = "ID of the Instance") private Long vmId; @Parameter(name = ApiConstants.ID, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/ListBackupsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/ListBackupsCmd.java index 0c2b4f9b91ef..fb9c92f433e5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/ListBackupsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/ListBackupsCmd.java @@ -46,7 +46,7 @@ import com.cloud.utils.Pair; @APICommand(name = "listBackups", - description = "Lists VM backups", + description = "Lists Instance backups", responseObject = BackupResponse.class, since = "4.14.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class ListBackupsCmd extends BaseListProjectAndAccountResourcesCmd { @@ -61,19 +61,19 @@ public class ListBackupsCmd extends BaseListProjectAndAccountResourcesCmd { @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = BackupResponse.class, - description = "id of the backup") + description = "ID of the backup") private Long id; @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, - description = "id of the VM") + description = "ID of the Instance") private Long vmId; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - description = "list backups by zone id") + description = "List backups by zone id") private Long zoneId; @Parameter(name = ApiConstants.NAME, @@ -148,7 +148,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE Pair, Integer> result = backupManager.listBackups(this); setupResponseBackupList(result.first(), result.second()); } catch (Exception e) { - logger.debug("Exception while listing backups", e); + logger.error("Exception while listing backups", e); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/RemoveVirtualMachineFromBackupOfferingCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/RemoveVirtualMachineFromBackupOfferingCmd.java index c451bff54566..81f11edb7d90 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/RemoveVirtualMachineFromBackupOfferingCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/RemoveVirtualMachineFromBackupOfferingCmd.java @@ -39,7 +39,7 @@ import com.cloud.exception.ResourceUnavailableException; @APICommand(name = "removeVirtualMachineFromBackupOffering", - description = "Removes a VM from any existing backup offering", + description = "Removes an Instance from any existing backup offering", responseObject = SuccessResponse.class, since = "4.14.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class RemoveVirtualMachineFromBackupOfferingCmd extends BaseAsyncCmd { @@ -55,12 +55,12 @@ public class RemoveVirtualMachineFromBackupOfferingCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = UserVmResponse.class, required = true, - description = "ID of the virtual machine") + description = "ID of the Instance") private Long vmId; @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, - description = "Whether to force remove VM from the backup offering that may also delete VM backups.") + description = "Whether to force remove Instance from the backup offering that may also delete Instance backups.") private Boolean forced; ///////////////////////////////////////////////////// @@ -87,7 +87,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove VM from backup offering"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove Instance from backup offering"); } } catch (Exception e) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); @@ -106,6 +106,6 @@ public String getEventType() { @Override public String getEventDescription() { - return "Removing VM ID" + vmId + " from backup offering"; + return "Removing Instance ID" + vmId + " from backup offering"; } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/RestoreBackupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/RestoreBackupCmd.java index 6d02a084b704..5385c0fb0b6a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/RestoreBackupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/RestoreBackupCmd.java @@ -40,7 +40,7 @@ import com.cloud.utils.exception.CloudRuntimeException; @APICommand(name = "restoreBackup", - description = "Restores an existing stopped or deleted VM using a VM backup", + description = "Restores an existing stopped or deleted Instance using an Instance backup", responseObject = SuccessResponse.class, since = "4.14.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class RestoreBackupCmd extends BaseAsyncCmd { @@ -80,7 +80,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new CloudRuntimeException("Error while restoring VM from backup"); + throw new CloudRuntimeException("Error while restoring Instance from backup"); } } catch (Exception e) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); @@ -99,6 +99,6 @@ public String getEventType() { @Override public String getEventDescription() { - return "Restoring VM from backup: " + backupId; + return "Restoring Instance from backup: " + backupId; } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/RestoreVolumeFromBackupAndAttachToVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/RestoreVolumeFromBackupAndAttachToVMCmd.java index 310b0bd9bf13..cee367a149c2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/RestoreVolumeFromBackupAndAttachToVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/RestoreVolumeFromBackupAndAttachToVMCmd.java @@ -41,7 +41,7 @@ import com.cloud.utils.exception.CloudRuntimeException; @APICommand(name = "restoreVolumeFromBackupAndAttachToVM", - description = "Restore and attach a backed up volume to VM", + description = "Restore and attach a backed up volume to Instance", responseObject = SuccessResponse.class, since = "4.14.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class RestoreVolumeFromBackupAndAttachToVMCmd extends BaseAsyncCmd { @@ -57,7 +57,7 @@ public class RestoreVolumeFromBackupAndAttachToVMCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = BackupResponse.class, required = true, - description = "ID of the VM backup") + description = "ID of the Instance backup") private Long backupId; @Parameter(name = ApiConstants.VOLUME_ID, @@ -70,7 +70,7 @@ public class RestoreVolumeFromBackupAndAttachToVMCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = UserVmResponse.class, required = true, - description = "id of the VM where to attach the restored volume") + description = "ID of the Instance where to attach the restored volume") private Long vmId; ///////////////////////////////////////////////////// @@ -107,7 +107,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new CloudRuntimeException("Error restoring volume and attaching to VM"); + throw new CloudRuntimeException("Error restoring volume and attaching to Instance"); } } catch (Exception e) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); @@ -121,6 +121,6 @@ public String getEventType() { @Override public String getEventDescription() { - return "Restoring volume "+ volumeUuid + " from backup " + backupId + " and attaching it to VM " + vmId; + return "Restoring volume "+ volumeUuid + " from backup " + backupId + " and attaching it to Instance " + vmId; } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/UpdateBackupScheduleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/UpdateBackupScheduleCmd.java index 47c8dc42facd..f4938ee0f87d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/backup/UpdateBackupScheduleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/backup/UpdateBackupScheduleCmd.java @@ -22,7 +22,7 @@ import org.apache.cloudstack.api.response.BackupResponse; @APICommand(name = "updateBackupSchedule", - description = "Updates a user-defined VM backup schedule", + description = "Updates a User-defined Instance backup schedule", responseObject = BackupResponse.class, since = "4.14.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class UpdateBackupScheduleCmd extends CreateBackupScheduleCmd { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/consoleproxy/CreateConsoleEndpointCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/consoleproxy/CreateConsoleEndpointCmd.java index b84f8ce34899..41eaf36e4252 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/consoleproxy/CreateConsoleEndpointCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/consoleproxy/CreateConsoleEndpointCmd.java @@ -40,7 +40,7 @@ import javax.inject.Inject; import java.util.Map; -@APICommand(name = "createConsoleEndpoint", description = "Create a console endpoint to connect to a VM console", +@APICommand(name = "createConsoleEndpoint", description = "Create a console endpoint to connect to a Instance console", responseObject = CreateConsoleEndpointResponse.class, since = "4.18.0", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) @@ -54,7 +54,7 @@ public class CreateConsoleEndpointCmd extends BaseCmd { type = CommandType.UUID, entityType = UserVmResponse.class, required = true, - description = "ID of the VM") + description = "ID of the Instance") private Long vmId; @Parameter(name = ApiConstants.TOKEN, @@ -71,7 +71,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE CreateConsoleEndpointResponse response = createResponse(endpoint); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Unable to generate console endpoint for vm " + vmId); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Unable to generate console endpoint for Instance " + vmId); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java index 669b1782e9e4..e449f4b002bc 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/event/ArchiveEventsCmd.java @@ -48,18 +48,18 @@ public class ArchiveEventsCmd extends BaseCmd { type = CommandType.LIST, collectionType = CommandType.UUID, entityType = EventResponse.class, - description = "the IDs of the events") + description = "The IDs of the events") private List ids; - @Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, description = "end date range to archive events" + @Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, description = "End date range to archive events" + " (including) this date (use format \"yyyy-MM-dd\" or the new format \"yyyy-MM-ddThh:mm:ss\")") private Date endDate; - @Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, description = "start date range to archive events" + @Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, description = "Start date range to archive events" + " (including) this date (use format \"yyyy-MM-dd\" or the new format \"yyyy-MM-ddThh:mm:ss\")") private Date startDate; - @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "archive by event type") + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "Archive by event type") private String type; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java index c9c3f1d69554..db183a08e5ab 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/event/DeleteEventsCmd.java @@ -48,18 +48,18 @@ public class DeleteEventsCmd extends BaseCmd { type = CommandType.LIST, collectionType = CommandType.UUID, entityType = EventResponse.class, - description = "the IDs of the events") + description = "The IDs of the events") private List ids; - @Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, description = "end date range to delete events" + @Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, description = "End date range to delete events" + " (including) this date (use format \"yyyy-MM-dd\" or the new format \"yyyy-MM-ddThh:mm:ss\")") private Date endDate; - @Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, description = "start date range to delete events" + @Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, description = "Start date range to delete events" + " (including) this date (use format \"yyyy-MM-dd\" or the new format \"yyyy-MM-ddThh:mm:ss\")") private Date startDate; - @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "delete by event type") + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "Delete by event type") private String type; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java index cb935c13e97b..b86d1f8b956a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/event/ListEventsCmd.java @@ -36,41 +36,41 @@ public class ListEventsCmd extends BaseListProjectAndAccountResourcesCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = EventResponse.class, description = "the ID of the event") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = EventResponse.class, description = "The ID of the event") private Long id; - @Parameter(name = ApiConstants.DURATION, type = CommandType.INTEGER, description = "the duration of the event") + @Parameter(name = ApiConstants.DURATION, type = CommandType.INTEGER, description = "The duration of the event") private Integer duration; @Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, - description = "the end date range of the list you want to retrieve (use format \"yyyy-MM-dd\" or the new format \"yyyy-MM-dd HH:mm:ss\")") + description = "The end date range of the list you want to retrieve (use format \"yyyy-MM-dd\" or the new format \"yyyy-MM-dd HH:mm:ss\")") private Date endDate; - @Parameter(name = ApiConstants.ENTRY_TIME, type = CommandType.INTEGER, description = "the time the event was entered") + @Parameter(name = ApiConstants.ENTRY_TIME, type = CommandType.INTEGER, description = "The time the event was entered") private Integer entryTime; - @Parameter(name = ApiConstants.LEVEL, type = CommandType.STRING, description = "the event level (INFO, WARN, ERROR)") + @Parameter(name = ApiConstants.LEVEL, type = CommandType.STRING, description = "The event level (INFO, WARN, ERROR)") private String level; @Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, - description = "the start date range of the list you want to retrieve (use format \"yyyy-MM-dd\" or the new format \"yyyy-MM-dd HH:mm:ss\")") + description = "The start date range of the list you want to retrieve (use format \"yyyy-MM-dd\" or the new format \"yyyy-MM-dd HH:mm:ss\")") private Date startDate; - @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "the event type (see event types)") + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "The event type (see event types)") private String type; - @Parameter(name = ApiConstants.START_ID, type = CommandType.UUID, entityType = EventResponse.class, description = "the parent/start ID of the event, when provided this will list all the events with the start/parent ID including the parent event") + @Parameter(name = ApiConstants.START_ID, type = CommandType.UUID, entityType = EventResponse.class, description = "The parent/start ID of the event, when provided this will list all the events with the start/parent ID including the parent event") private Long startId; - @Parameter(name = ApiConstants.RESOURCE_ID, type = CommandType.STRING, description = "the ID of the resource associated with the event", since="4.17.0") + @Parameter(name = ApiConstants.RESOURCE_ID, type = CommandType.STRING, description = "The ID of the resource associated with the event", since="4.17.0") private String resourceId; - @Parameter(name = ApiConstants.RESOURCE_TYPE, type = CommandType.STRING, description = "the type of the resource associated with the event", since="4.17.0") + @Parameter(name = ApiConstants.RESOURCE_TYPE, type = CommandType.STRING, description = "The type of the resource associated with the event", since="4.17.0") private String resourceType; - @Parameter(name = ApiConstants.ARCHIVED, type = CommandType.BOOLEAN, description = "true to list archived events otherwise false", since="4.19.0") + @Parameter(name = ApiConstants.ARCHIVED, type = CommandType.BOOLEAN, description = "True to list archived events otherwise false", since="4.19.0") private Boolean archived; @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "The state of the events", since="4.21.0") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreateEgressFirewallRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreateEgressFirewallRuleCmd.java index 8cbbcea6a59f..f972cbdc6758 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreateEgressFirewallRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreateEgressFirewallRuleCmd.java @@ -57,37 +57,37 @@ public class CreateEgressFirewallRuleCmd extends BaseAsyncCreateCmd implements F type = CommandType.UUID, entityType = NetworkResponse.class, required = true, - description = "the network id of the port forwarding rule") + description = "The Network ID of the port forwarding rule") private Long networkId; @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, required = true, - description = "the protocol for the firewall rule. Valid values are TCP/UDP/ICMP.") + description = "The protocol for the firewall rule. Valid values are TCP/UDP/ICMP.") private String protocol; - @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "the starting port of firewall rule") + @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "The starting port of firewall rule") private Integer publicStartPort; - @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "the ending port of firewall rule") + @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "The ending port of firewall rule") private Integer publicEndPort; - @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "the cidr list to forward traffic from. Multiple entries must be separated by a single comma character (,).") + @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "The CIDR list to forward traffic from. Multiple entries must be separated by a single comma character (,).") private List cidrlist; - @Parameter(name = ApiConstants.DEST_CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "the cidr list to forward traffic to. Multiple entries must be separated by a single comma character (,).") + @Parameter(name = ApiConstants.DEST_CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "The CIDR list to forward traffic to. Multiple entries must be separated by a single comma character (,).") private List destCidrList; - @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "type of the icmp message being sent") + @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "Type of the ICMP message being sent") private Integer icmpType; - @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "error code for this icmp message") + @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "Error code for this ICMP message") private Integer icmpCode; - @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "type of firewallrule: system/user") + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "Type of firewallrule: system/user") private String type; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; // /////////////////////////////////////////////////// @@ -255,11 +255,8 @@ public void create() { } } catch (NetworkRuleConflictException ex) { String message = "Network rule conflict: "; - if (!logger.isTraceEnabled()) { - logger.info(message + ex.getMessage()); - } else { - logger.trace(message, ex); - } + logger.error("{}{}", message, ex.getMessage()); + logger.trace(message, ex); throw new ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, ex.getMessage()); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java index efccb5c09b0d..92be579a1ced 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreateFirewallRuleCmd.java @@ -57,34 +57,34 @@ public class CreateFirewallRuleCmd extends BaseAsyncCreateCmd implements Firewal type = CommandType.UUID, entityType = IPAddressResponse.class, required = true, - description = "the IP address id of the port forwarding rule") + description = "The IP address ID of the port forwarding rule") private Long ipAddressId; @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, required = true, - description = "the protocol for the firewall rule. Valid values are TCP/UDP/ICMP.") + description = "The protocol for the firewall rule. Valid values are TCP/UDP/ICMP.") private String protocol; - @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "the starting port of firewall rule") + @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "The starting port of firewall rule") private Integer publicStartPort; - @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "the ending port of firewall rule") + @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "The ending port of firewall rule") private Integer publicEndPort; - @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "the CIDR list to forward traffic from. Multiple entries must be separated by a single comma character (,).") + @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "The CIDR list to forward traffic from. Multiple entries must be separated by a single comma character (,).") private List cidrlist; - @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "type of the ICMP message being sent") + @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "Type of the ICMP message being sent") private Integer icmpType; - @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "error code for this icmp message") + @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "Error code for this icmp message") private Integer icmpCode; - @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "type of firewallrule: system/user") + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "Type of firewallrule: system/user") private String type; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the rule to the end User or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; // /////////////////////////////////////////////////// @@ -171,7 +171,7 @@ public void execute() throws ResourceUnavailableException { @Override public long getId() { - throw new UnsupportedOperationException("database ID can only provided by VO objects"); + throw new UnsupportedOperationException("Database ID can only provided by VO objects"); } @Override @@ -271,7 +271,7 @@ public void create() { setEntityUuid(result.getUuid()); } } catch (NetworkRuleConflictException ex) { - logger.trace("Network Rule Conflict: ", ex); + logger.error("Network Rule Conflict: ", ex); throw new ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, ex.getMessage(), ex); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java index 9d1fe176019d..db6b788178ab 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/CreatePortForwardingRuleCmd.java @@ -64,37 +64,37 @@ public class CreatePortForwardingRuleCmd extends BaseAsyncCreateCmd implements P type = CommandType.UUID, entityType = IPAddressResponse.class, required = true, - description = "the IP address id of the port forwarding rule") + description = "The IP address ID of the port forwarding rule") private Long ipAddressId; @Parameter(name = ApiConstants.PRIVATE_START_PORT, type = CommandType.INTEGER, required = true, - description = "the starting port of port forwarding rule's private port range") + description = "The starting port of port forwarding rule's private port range") private Integer privateStartPort; @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, required = true, - description = "the protocol for the port forwarding rule. Valid values are TCP or UDP.") + description = "The protocol for the port forwarding rule. Valid values are TCP or UDP.") private String protocol; @Parameter(name = ApiConstants.PRIVATE_END_PORT, type = CommandType.INTEGER, required = false, - description = "the ending port of port forwarding rule's private port range") + description = "The ending port of port forwarding rule's private port range") private Integer privateEndPort; @Parameter(name = ApiConstants.PUBLIC_START_PORT, type = CommandType.INTEGER, required = true, - description = "the starting port of port forwarding rule's public port range") + description = "The starting port of port forwarding rule's public port range") private Integer publicStartPort; @Parameter(name = ApiConstants.PUBLIC_END_PORT, type = CommandType.INTEGER, required = false, - description = "the ending port of port forwarding rule's private port range") + description = "The ending port of port forwarding rule's private port range") private Integer publicEndPort; @ACL(accessType = AccessType.OperateEntry) @@ -102,17 +102,17 @@ public class CreatePortForwardingRuleCmd extends BaseAsyncCreateCmd implements P type = CommandType.UUID, entityType = UserVmResponse.class, required = true, - description = "the ID of the virtual machine for the port forwarding rule") + description = "The ID of the Instance for the port forwarding rule") private Long virtualMachineId; @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, - description = " the source CIDR list to allow traffic from; all other CIDRs will be blocked. " + + description = "The source CIDR list to allow traffic from; all other CIDRs will be blocked. " + "Multiple entries must be separated by a single comma character (,). This param will be used only for VPC tiers. By default, all CIDRs are allowed.") private List sourceCidrList; - @Parameter(name = ApiConstants.OPEN_FIREWALL, type = CommandType.BOOLEAN, description = "if true, firewall rule for source/end public port is automatically created; " + @Parameter(name = ApiConstants.OPEN_FIREWALL, type = CommandType.BOOLEAN, description = "If true, firewall rule for source/end public port is automatically created; " + "if false - firewall rule has to be created explicitly. If not specified 1) defaulted to false when PF" + " rule is being created for VPC guest network 2) in all other cases defaulted to true") private Boolean openFirewall; @@ -120,16 +120,16 @@ public class CreatePortForwardingRuleCmd extends BaseAsyncCreateCmd implements P @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, - description = "the network of the virtual machine the port forwarding rule will be created for. " + description = "The Network of the Instance 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") + description = "Instance guest NIC secondary IP address for the port forwarding rule") private String vmSecondaryIp; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; // /////////////////////////////////////////////////// @@ -335,7 +335,7 @@ public void create() { Ip privateIp = getVmSecondaryIp(); if (privateIp != null) { if (!NetUtils.isValidIp4(privateIp.toString())) { - throw new InvalidParameterValueException("Invalid vm ip address"); + throw new InvalidParameterValueException("Invalid Instance IP address"); } } @@ -359,7 +359,7 @@ public String getEventType() { @Override public String getEventDescription() { IpAddress ip = _networkService.getIp(ipAddressId); - return ("Applying port forwarding rule for Ip: " + ip.getAddress() + " with virtual machine:" + virtualMachineId); + return ("Applying port forwarding rule for Ip: " + ip.getAddress() + " with Instance:" + virtualMachineId); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/DeleteEgressFirewallRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/DeleteEgressFirewallRuleCmd.java index b93d943eab9f..60c7839bdc6d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/DeleteEgressFirewallRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/DeleteEgressFirewallRuleCmd.java @@ -46,7 +46,7 @@ public class DeleteEgressFirewallRuleCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, 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 diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/DeleteFirewallRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/DeleteFirewallRuleCmd.java index c4a4dfd75cb1..7c4d5f2249f5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/DeleteFirewallRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/DeleteFirewallRuleCmd.java @@ -44,7 +44,7 @@ public class DeleteFirewallRuleCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, 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 diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/DeletePortForwardingRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/DeletePortForwardingRuleCmd.java index 267d18d8a8a7..47dd9e039eb3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/DeletePortForwardingRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/DeletePortForwardingRuleCmd.java @@ -48,7 +48,7 @@ public class DeletePortForwardingRuleCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, - description = "the ID of the port forwarding rule") + description = "The ID of the port forwarding rule") private Long id; // unexposed parameter needed for events logging diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/ListEgressFirewallRulesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/ListEgressFirewallRulesCmd.java index aa0fd28fdec8..4a1547cccaee 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/ListEgressFirewallRulesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/ListEgressFirewallRulesCmd.java @@ -48,16 +48,16 @@ public class ListEgressFirewallRulesCmd extends BaseListTaggedResourcesCmd imple @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, - description = "the network ID for the egress firewall services") + description = "The network ID for the egress firewall services") private Long networkId; @Parameter(name = ApiConstants.IP_ADDRESS_ID, type = CommandType.UUID, entityType = IPAddressResponse.class, - description = "the ID of IP address of the firewall services") + description = "The ID of IP address of the firewall services") private Long ipAddressId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/ListFirewallRulesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/ListFirewallRulesCmd.java index 19a05b158908..6cb560df8f0a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/ListFirewallRulesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/ListFirewallRulesCmd.java @@ -47,17 +47,17 @@ public class ListFirewallRulesCmd extends BaseListTaggedResourcesCmd implements @Parameter(name = ApiConstants.IP_ADDRESS_ID, type = CommandType.UUID, entityType = IPAddressResponse.class, - description = "the ID of IP address of the firewall services") + description = "The ID of IP address of the firewall services") private Long ipAddressId; @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, - description = "list firewall rules for certain network", + description = "List firewall rules for certain network", since = "4.3") private Long networkId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java index a2e9152a9e47..e5fd35f61eb4 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/ListPortForwardingRulesCmd.java @@ -48,17 +48,17 @@ public class ListPortForwardingRulesCmd extends BaseListTaggedResourcesCmd { @Parameter(name = ApiConstants.IP_ADDRESS_ID, type = CommandType.UUID, entityType = IPAddressResponse.class, - description = "the ID of IP address of the port forwarding services") + description = "The ID of IP address of the port forwarding services") private Long ipAddressId; @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, - description = "list port forwarding rules for certain network", + description = "List port forwarding rules for certain network", since = "4.3") private Long networkId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/UpdateEgressFirewallRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/UpdateEgressFirewallRuleCmd.java index a8db4ec2b29e..7516a78f0bac 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/UpdateEgressFirewallRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/UpdateEgressFirewallRuleCmd.java @@ -42,14 +42,14 @@ public class UpdateEgressFirewallRuleCmd extends BaseAsyncCustomIdCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, description = "the ID of the egress firewall rule") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, description = "The ID of the egress firewall rule") private Long id; // unexposed parameter needed for events logging @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, expose = false) private Long ownerId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/UpdateFirewallRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/UpdateFirewallRuleCmd.java index 89c9bc891eb0..347434d23940 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/UpdateFirewallRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/UpdateFirewallRuleCmd.java @@ -42,14 +42,14 @@ public class UpdateFirewallRuleCmd extends BaseAsyncCustomIdCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, 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.UUID, entityType = AccountResponse.class, expose = false) private Long ownerId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/UpdatePortForwardingRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/UpdatePortForwardingRuleCmd.java index ee4bd18ad40a..aaeca27375b7 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/UpdatePortForwardingRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/firewall/UpdatePortForwardingRuleCmd.java @@ -36,33 +36,33 @@ @APICommand(name = "updatePortForwardingRule", responseObject = FirewallRuleResponse.class, - description = "Updates a port forwarding rule. Only the private port and the virtual machine can be updated.", entityType = {PortForwardingRule.class}, + description = "Updates a port forwarding rule. Only the private port and the Instance can be updated.", entityType = {PortForwardingRule.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdatePortForwardingRuleCmd extends BaseAsyncCustomIdCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, description = "the ID of the port forwarding rule", since = "4.4") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, description = "The ID of the port forwarding rule", since = "4.4") private Long id; - @Parameter(name=ApiConstants.PRIVATE_START_PORT, type=CommandType.INTEGER, description="the private start port of the port forwarding rule") + @Parameter(name=ApiConstants.PRIVATE_START_PORT, type=CommandType.INTEGER, description = "The private start port of the port forwarding rule") private Integer privatePort; - @Parameter(name=ApiConstants.PRIVATE_END_PORT, type=CommandType.INTEGER, description="the private end port of the port forwarding rule") + @Parameter(name=ApiConstants.PRIVATE_END_PORT, type=CommandType.INTEGER, description = "The private end port of the port forwarding rule") private Integer privateEndPort; @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, - description = "the ID of the virtual machine for the port forwarding rule") + description = "The ID of the Instance for the port forwarding rule") private Long virtualMachineId; - @Parameter(name = ApiConstants.VM_GUEST_IP, type = CommandType.STRING, required = false, description = "VM guest nic Secondary ip address for the port forwarding rule", since = "4.5") + @Parameter(name = ApiConstants.VM_GUEST_IP, type = CommandType.STRING, required = false, description = "Instance guest NIC Secondary IP address for the port forwarding rule", since = "4.5") private String vmGuestIp; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; @Parameter(name = ApiConstants.CIDR_LIST, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/guest/ListGuestOsCategoriesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/guest/ListGuestOsCategoriesCmd.java index 413798970bf1..61e1d7aa5192 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/guest/ListGuestOsCategoriesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/guest/ListGuestOsCategoriesCmd.java @@ -41,7 +41,7 @@ public class ListGuestOsCategoriesCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOSCategoryResponse.class, description = "List OS category by id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOSCategoryResponse.class, description = "List OS category by ID") private Long id; @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "List OS category by name", since = "3.0.1") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/guest/ListGuestOsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/guest/ListGuestOsCmd.java index b31a46692201..4ff2ebf0a667 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/guest/ListGuestOsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/guest/ListGuestOsCmd.java @@ -42,13 +42,13 @@ public class ListGuestOsCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOSResponse.class, description = "list by Os type Id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GuestOSResponse.class, description = "List by OS type ID") private Long id; - @Parameter(name = ApiConstants.OS_CATEGORY_ID, type = CommandType.UUID, entityType = GuestOSCategoryResponse.class, description = "list by Os Category id") + @Parameter(name = ApiConstants.OS_CATEGORY_ID, type = CommandType.UUID, entityType = GuestOSCategoryResponse.class, description = "List by OS Category ID") private Long osCategoryId; - @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "list os by description", since = "3.0.1") + @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "List OS by description", since = "3.0.1") private String description; @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/CreateIpv6FirewallRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/CreateIpv6FirewallRuleCmd.java index 18af5b2973ee..8db66112cdbe 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/CreateIpv6FirewallRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/CreateIpv6FirewallRuleCmd.java @@ -43,7 +43,7 @@ import com.cloud.utils.net.NetUtils; @APICommand(name = "createIpv6FirewallRule", - description = "Creates an Ipv6 firewall rule in the given network (the network must not belong to VPC)", + description = "Creates an IPv6 firewall rule in the given Network (the Network must not belong to VPC)", responseObject = FirewallRuleResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, @@ -55,34 +55,34 @@ public class CreateIpv6FirewallRuleCmd extends BaseAsyncCreateCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, required = true, description = "the protocol for the Ipv6 firewall rule. Valid values are TCP/UDP/ICMP/ALL or valid protocol number") + @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, required = true, description = "The protocol for the Ipv6 firewall rule. Valid values are TCP/UDP/ICMP/ALL or valid protocol number") private String protocol; - @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "the starting port of Ipv6 firewall rule") + @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "The starting port of Ipv6 firewall rule") private Integer publicStartPort; - @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "the ending port of Ipv6 firewall rule") + @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "The ending port of Ipv6 firewall rule") private Integer publicEndPort; - @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "the source CIDR list to allow traffic from. Multiple entries must be separated by a single comma character (,).") + @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "The source CIDR list to allow traffic from. Multiple entries must be separated by a single comma character (,).") private List sourceCidrList; - @Parameter(name = ApiConstants.DEST_CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "the destination CIDR list to allow traffic to. Multiple entries must be separated by a single comma character (,).") + @Parameter(name = ApiConstants.DEST_CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "The destination CIDR list to allow traffic to. Multiple entries must be separated by a single comma character (,).") private List destinationCidrlist; - @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "type of the ICMP message being sent") + @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "Type of the ICMP message being sent") private Integer icmpType; - @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "error code for this ICMP message") + @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "Error code for this ICMP message") private Integer icmpCode; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "The network of the VM the Ipv6 firewall rule will be created for", required = true) + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "The Network of the Instance the Ipv6 firewall rule will be created for", required = true) private Long networkId; - @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "the traffic type for the Ipv6 firewall rule, can be ingress or egress, defaulted to ingress if not specified") + @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "The traffic type for the Ipv6 firewall rule, can be ingress or egress, defaulted to ingress if not specified") private String trafficType; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the rule to the end user or not", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the rule to the end User or not", authorized = {RoleType.Admin}) private Boolean display; // /////////////////////////////////////////////////// @@ -193,7 +193,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Creating ipv6 firewall rule"; + return "Creating IPv6 firewall rule"; } public Integer getIcmpCode() { @@ -246,7 +246,7 @@ public void execute() throws ResourceUnavailableException { } finally { if (!success || rule == null) { ipv6Service.revokeIpv6FirewallRule(getEntityId()); - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create ipv6 firewall rule"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create IPv6 firewall rule"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/DeleteIpv6FirewallRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/DeleteIpv6FirewallRuleCmd.java index aaee19b59489..19ecbda290c6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/DeleteIpv6FirewallRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/DeleteIpv6FirewallRuleCmd.java @@ -45,7 +45,7 @@ public class DeleteIpv6FirewallRuleCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, description = "the ID of the IPv6 firewall rule") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, description = "The ID of the IPv6 firewall rule") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/ListIpv6FirewallRulesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/ListIpv6FirewallRulesCmd.java index 7ade2e3ed040..59401578cb25 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/ListIpv6FirewallRulesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/ListIpv6FirewallRulesCmd.java @@ -46,16 +46,16 @@ public class ListIpv6FirewallRulesCmd extends BaseListTaggedResourcesCmd impleme //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, - description = "Lists ipv6 firewall rule with the specified ID") + description = "Lists IPv6 firewall rule with the specified ID") private Long id; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "list ipv6 firewall rules by network ID") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "List IPV6 firewall rules by Network ID") private Long networkId; - @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "list ipv6 firewall rules by traffic type - ingress or egress") + @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "List IPV6 firewall rules by traffic type - ingress or egress") private String trafficType; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/UpdateIpv6FirewallRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/UpdateIpv6FirewallRuleCmd.java index 2d63d703dc5e..353f28e908b5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/UpdateIpv6FirewallRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/ipv6/UpdateIpv6FirewallRuleCmd.java @@ -46,31 +46,31 @@ public class UpdateIpv6FirewallRuleCmd extends BaseAsyncCustomIdCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, description = "the ID of the ipv6 firewall rule") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, description = "The ID of the IPv6 firewall rule") private Long id; - @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "the protocol for the Ipv6 firewall rule. Valid values are TCP/UDP/ICMP/ALL or valid protocol number") + @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "The protocol for the Ipv6 firewall rule. Valid values are TCP/UDP/ICMP/ALL or valid protocol number") private String protocol; - @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "the starting port of Ipv6 firewall rule") + @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "The starting port of Ipv6 firewall rule") private Integer publicStartPort; - @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "the ending port of Ipv6 firewall rule") + @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "The ending port of Ipv6 firewall rule") private Integer publicEndPort; - @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "the cidr list to allow traffic from/to. Multiple entries must be separated by a single comma character (,).") + @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "The cidr list to allow traffic from/to. Multiple entries must be separated by a single comma character (,).") private List cidrlist; - @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "type of the ICMP message being sent") + @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "Type of the ICMP message being sent") private Integer icmpType; - @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "error code for this ICMP message") + @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "Error code for this ICMP message") private Integer icmpCode; - @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "the traffic type for the Ipv6 firewall rule, can be Ingress or Egress, defaulted to Ingress if not specified") + @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "The traffic type for the Ipv6 firewall rule, can be Ingress or Egress, defaulted to Ingress if not specified") private String trafficType; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the Ipv6 firewall rule to the end user or not", since = "4.4", authorized = { + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the Ipv6 firewall rule to the end User or not", since = "4.4", authorized = { RoleType.Admin}) private Boolean display; @@ -143,7 +143,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Updating ipv6 firewall rule"; + return "Updating IPv6 firewall rule"; } public Integer getIcmpCode() { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/AttachIsoCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/AttachIsoCmd.java index d795fbabb528..27026d62a674 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/AttachIsoCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/AttachIsoCmd.java @@ -35,7 +35,7 @@ import com.cloud.exception.InvalidParameterValueException; import com.cloud.uservm.UserVm; -@APICommand(name = "attachIso", description = "Attaches an ISO to a virtual machine.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, +@APICommand(name = "attachIso", description = "Attaches an ISO to an Instance.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class AttachIsoCmd extends BaseAsyncCmd implements UserCmd { @@ -46,11 +46,11 @@ public class AttachIsoCmd extends BaseAsyncCmd implements UserCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, - required = true, description = "the ID of the ISO file") + required = true, description = "The ID of the ISO file") protected Long id; @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, - required = true, description = "the ID of the virtual machine") + required = true, description = "The ID of the Instance") protected Long virtualMachineId; @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, @@ -86,7 +86,7 @@ public String getCommandName() { public long getEntityOwnerId() { UserVm vm = _entityMgr.findById(UserVm.class, getVirtualMachineId()); if (vm == null) { - throw new InvalidParameterValueException("Unable to find virtual machine by ID " + getVirtualMachineId()); + throw new InvalidParameterValueException("Unable to find Instance by ID " + getVirtualMachineId()); } return vm.getAccountId(); @@ -99,7 +99,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "attaching ISO: " + getId() + " to VM: " + getVirtualMachineId(); + return "attaching ISO: " + getId() + " to Instance: " + getVirtualMachineId(); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/DeleteIsoCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/DeleteIsoCmd.java index feae31026b9f..b00b11ab1d31 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/DeleteIsoCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/DeleteIsoCmd.java @@ -41,13 +41,13 @@ public class DeleteIsoCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "the ID of the ISO file") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "The ID of the ISO file") private Long id; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - description = "the ID of the zone of the ISO file. If not specified, the ISO will be deleted from all the zones") + description = "The ID of the zone of the ISO file. If not specified, the ISO will be deleted from all the zones") private Long zoneId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/DetachIsoCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/DetachIsoCmd.java index 78f1a4bcdee6..03d433827984 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/DetachIsoCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/DetachIsoCmd.java @@ -33,7 +33,7 @@ import com.cloud.exception.InvalidParameterValueException; import com.cloud.uservm.UserVm; -@APICommand(name = "detachIso", description = "Detaches any ISO file (if any) currently attached to a virtual machine.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, +@APICommand(name = "detachIso", description = "Detaches any ISO file (if any) currently attached to an Instance.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class DetachIsoCmd extends BaseAsyncCmd implements UserCmd { @@ -44,7 +44,7 @@ public class DetachIsoCmd extends BaseAsyncCmd implements UserCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, - required = true, description = "The ID of the virtual machine") + required = true, description = "The ID of the Instance") protected Long virtualMachineId; @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, @@ -78,7 +78,7 @@ public long getEntityOwnerId() { if (vm != null) { return vm.getAccountId(); } else { - throw new InvalidParameterValueException("Unable to find VM by ID " + getVirtualMachineId()); + throw new InvalidParameterValueException("Unable to find Instance by ID " + getVirtualMachineId()); } } @@ -89,7 +89,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "detaching ISO from VM: " + getVirtualMachineId(); + return "detaching ISO from Instance: " + getVirtualMachineId(); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/ExtractIsoCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/ExtractIsoCmd.java index 4d11f0dc3d21..6cd8b312f979 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/ExtractIsoCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/ExtractIsoCmd.java @@ -44,20 +44,20 @@ public class ExtractIsoCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "the ID of the ISO file") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "The ID of the ISO file") private Long id; - @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = false, length = 2048, description = "the URL to which the ISO would be extracted") + @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = false, length = 2048, description = "The URL to which the ISO would be extracted") private String url; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = false, - description = "the ID of the zone where the ISO is originally located") + description = "The ID of the zone where the ISO is originally located") private Long zoneId; - @Parameter(name = ApiConstants.MODE, type = CommandType.STRING, required = true, description = "the mode of extraction - HTTP_DOWNLOAD or FTP_UPLOAD") + @Parameter(name = ApiConstants.MODE, type = CommandType.STRING, required = true, description = "The mode of extraction - HTTP_DOWNLOAD or FTP_UPLOAD") private String mode; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/GetUploadParamsForIsoCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/GetUploadParamsForIsoCmd.java index d52e53d3bb45..564ebb20b758 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/GetUploadParamsForIsoCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/GetUploadParamsForIsoCmd.java @@ -38,7 +38,7 @@ import com.cloud.exception.ResourceUnavailableException; @APICommand(name = "getUploadParamsForIso", - description = "upload an existing ISO into the CloudStack cloud.", + description = "Upload an existing ISO into the CloudStack cloud.", responseObject = GetUploadParamsResponse.class, since = "4.13", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) @@ -50,30 +50,30 @@ public class GetUploadParamsForIsoCmd extends AbstractGetUploadParamsCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.BOOTABLE, type = BaseCmd.CommandType.BOOLEAN, description = "true if this ISO is bootable. If not passed explicitly its assumed to be true") + @Parameter(name = ApiConstants.BOOTABLE, type = BaseCmd.CommandType.BOOLEAN, description = "True if this ISO is bootable. If not passed explicitly its assumed to be true") private Boolean bootable; @Parameter(name = ApiConstants.DISPLAY_TEXT, type = BaseCmd.CommandType.STRING, - description = "the display text of the ISO. This is usually used for display purposes.", + description = "The display text of the ISO. This is usually used for display purposes.", length = 4096) private String displayText; - @Parameter(name = ApiConstants.IS_FEATURED, type = BaseCmd.CommandType.BOOLEAN, description = "true if you want this ISO to be featured") + @Parameter(name = ApiConstants.IS_FEATURED, type = BaseCmd.CommandType.BOOLEAN, description = "True if you want this ISO to be featured") private Boolean featured; @Parameter(name = ApiConstants.IS_PUBLIC, type = BaseCmd.CommandType.BOOLEAN, - description = "true if you want to register the ISO to be publicly available to all users, false otherwise.") + description = "True if you want to register the ISO to be publicly available to all Users, false otherwise.") private Boolean publicIso; - @Parameter(name = ApiConstants.IS_EXTRACTABLE, type = BaseCmd.CommandType.BOOLEAN, description = "true if the ISO or its derivatives are extractable; default is false") + @Parameter(name = ApiConstants.IS_EXTRACTABLE, type = BaseCmd.CommandType.BOOLEAN, description = "True if the ISO or its derivatives are extractable; default is false") private Boolean extractable; @Parameter(name = ApiConstants.OS_TYPE_ID, type = BaseCmd.CommandType.UUID, entityType = GuestOSResponse.class, - description = "the ID of the OS type that best represents the OS of this ISO. If the ISO is bootable this parameter needs to be passed") + description = "The ID of the OS type that best represents the OS of this ISO. If the ISO is bootable this parameter needs to be passed") private Long osTypeId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/ListIsoPermissionsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/ListIsoPermissionsCmd.java index 6f220c774b84..069f3e4959bb 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/ListIsoPermissionsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/ListIsoPermissionsCmd.java @@ -1,4 +1,4 @@ -// Licensedname = "listIsoPermissions", to the Apache Software Foundation (ASF) under one +// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file @@ -26,7 +26,7 @@ import com.cloud.storage.Storage.ImageFormat; import com.cloud.template.VirtualMachineTemplate; -@APICommand(name = "listIsoPermissions", description = "List ISO visibility and all accounts that have permissions to view this ISO.", responseObject = TemplatePermissionsResponse.class, responseView = ResponseView.Restricted, +@APICommand(name = "listIsoPermissions", description = "List ISO visibility and all Accounts that have permissions to view this ISO.", responseObject = TemplatePermissionsResponse.class, responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListIsoPermissionsCmd extends BaseListTemplateOrIsoPermissionsCmd implements UserCmd { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java index 346eca8cff04..562cbc2c623d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/ListIsosCmd.java @@ -45,49 +45,49 @@ public class ListIsosCmd extends BaseListTaggedResourcesCmd implements UserCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.BOOTABLE, type = CommandType.BOOLEAN, description = "true if the ISO is bootable, false otherwise") + @Parameter(name = ApiConstants.BOOTABLE, type = CommandType.BOOLEAN, description = "True if the ISO is bootable, false otherwise") private Boolean bootable; - @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "the hypervisor for which to restrict the search") + @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "The hypervisor for which to restrict the search") private String hypervisor; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, description = "list ISO by ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, 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.") + @Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "True if the ISO is publicly available to all Users, false otherwise.") private Boolean publicIso; - @Parameter(name = ApiConstants.IS_READY, type = CommandType.BOOLEAN, description = "list ISOs that are ready to be deployed") + @Parameter(name = ApiConstants.IS_READY, type = CommandType.BOOLEAN, description = "If True, list ISOs that are ready to be deployed.") private Boolean ready; @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).") + 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 Instance. " + + "* 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 an Instance. " + + "* 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") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "List all ISOs by name") private String isoName; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the ID of the zone") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The ID of the zone") private Long zoneId; - @Parameter(name=ApiConstants.SHOW_REMOVED, type=CommandType.BOOLEAN, description="show removed ISOs as well") + @Parameter(name=ApiConstants.SHOW_REMOVED, type=CommandType.BOOLEAN, description = "Show removed ISOs as well") private Boolean showRemoved; - @Parameter(name = ApiConstants.SHOW_UNIQUE, type = CommandType.BOOLEAN, description = "If set to true, list only unique isos across zones", since = "4.13.2") + @Parameter(name = ApiConstants.SHOW_UNIQUE, type = CommandType.BOOLEAN, description = "If set to true, list only unique ISOs across zones", since = "4.13.2") private Boolean showUnique; - @Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN, description = "flag to display the resource image for the isos") + @Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN, description = "Flag to display the resource image for the ISOs") private Boolean showIcon; @Parameter(name = ApiConstants.ARCH, type = CommandType.STRING, - description = "the CPU arch of the ISO. Valid options are: x86_64, aarch64", + description = "the CPU arch of the ISO. Valid options are: x86_64, aarch64, s390x", since = "4.20") private String arch; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java index 81f525522895..860931aa2481 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/iso/RegisterIsoCmd.java @@ -50,52 +50,52 @@ public class RegisterIsoCmd extends BaseCmd implements UserCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.BOOTABLE, type = CommandType.BOOLEAN, description = "true if this ISO is bootable. If not passed explicitly its assumed to be true") + @Parameter(name = ApiConstants.BOOTABLE, type = CommandType.BOOLEAN, description = "True if this ISO is bootable. If not passed explicitly its assumed to be true") private Boolean bootable; @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, - description = "the display text of the ISO, defaults to the 'name'", + description = "The display text of the ISO, defaults to the 'name'", length = 4096) private String displayText; - @Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN, description = "true if you want this ISO to be featured") + @Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN, description = "True if you want this ISO to be featured") private Boolean featured; @Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, - description = "true if you want to register the ISO to be publicly available to all users, false otherwise.") + description = "True if you want to register the ISO to be publicly available to all Users, false otherwise.") private Boolean publicIso; - @Parameter(name = ApiConstants.IS_EXTRACTABLE, type = CommandType.BOOLEAN, description = "true if the ISO or its derivatives are extractable; default is false") + @Parameter(name = ApiConstants.IS_EXTRACTABLE, type = CommandType.BOOLEAN, description = "True if the ISO or its derivatives are extractable; default is false") private Boolean extractable; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the ISO") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the ISO") private String isoName; @Parameter(name = ApiConstants.OS_TYPE_ID, type = CommandType.UUID, entityType = GuestOSResponse.class, - description = "the ID of the OS type that best represents the OS of this ISO. If the ISO is bootable this parameter needs to be passed") + description = "The ID of the OS type that best represents the OS of this ISO. If the ISO is bootable this parameter needs to be passed") private Long osTypeId; - @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, length = 2048, description = "the URL to where the ISO is currently being hosted") + @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, length = 2048, description = "The URL to where the ISO is currently being hosted") private String url; @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class, - required=true, description="the ID of the zone you wish to register the ISO to.") + required=true, description = "The ID of the zone you wish to register the ISO to.") protected Long zoneId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "an optional domainId. If the account parameter is used, domainId must also be used.") + description = "An optional domainId. If the Account parameter is used, domainId must also be used.") private Long domainId; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account name. Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional Account name. Must be used with domainId.") private String accountName; - @Parameter(name = ApiConstants.CHECKSUM, type = CommandType.STRING, description = "the checksum value of this ISO. " + ApiConstants.CHECKSUM_PARAMETER_PREFIX_DESCRIPTION) + @Parameter(name = ApiConstants.CHECKSUM, type = CommandType.STRING, description = "The checksum value of this ISO. " + ApiConstants.CHECKSUM_PARAMETER_PREFIX_DESCRIPTION) private String checksum; @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Register ISO for the project") @@ -106,21 +106,21 @@ public class RegisterIsoCmd extends BaseCmd implements UserCmd { @Parameter(name = ApiConstants.IS_DYNAMICALLY_SCALABLE, type = CommandType.BOOLEAN, - description = "true if ISO contains XS/VMWare tools inorder to support dynamic scaling of VM CPU/memory") + description = "True if ISO contains XS/VMWare tools in order to support dynamic scaling of Instance CPU/memory") protected Boolean isDynamicallyScalable; @Parameter(name=ApiConstants.DIRECT_DOWNLOAD, type = CommandType.BOOLEAN, - description = "true if ISO should bypass Secondary Storage and be downloaded to Primary Storage on deployment") + description = "True if ISO should bypass Secondary Storage and be downloaded to Primary Storage on deployment") private Boolean directDownload; @Parameter(name = ApiConstants.PASSWORD_ENABLED, type = CommandType.BOOLEAN, - description = "true if password reset feature is supported; default is false") + description = "True if password reset feature is supported; default is false") private Boolean passwordEnabled; @Parameter(name = ApiConstants.ARCH, type = CommandType.STRING, - description = "the CPU arch of the ISO. Valid options are: x86_64, aarch64", + description = "the CPU arch of the ISO. Valid options are: x86_64, aarch64, s390x", since = "4.20") private String arch; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/job/ListAsyncJobsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/job/ListAsyncJobsCmd.java index 783d78fdce32..b55d1b234f19 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/job/ListAsyncJobsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/job/ListAsyncJobsCmd.java @@ -26,7 +26,7 @@ import org.apache.cloudstack.api.response.ListResponse; import org.apache.cloudstack.api.response.ManagementServerResponse; -@APICommand(name = "listAsyncJobs", description = "Lists all pending asynchronous jobs for the account.", responseObject = AsyncJobResponse.class, +@APICommand(name = "listAsyncJobs", description = "Lists all pending asynchronous jobs for the Account.", responseObject = AsyncJobResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListAsyncJobsCmd extends BaseListAccountResourcesCmd { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/job/QueryAsyncJobResultCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/job/QueryAsyncJobResultCmd.java index 3d328543dc29..93a443757212 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/job/QueryAsyncJobResultCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/job/QueryAsyncJobResultCmd.java @@ -34,7 +34,7 @@ public class QueryAsyncJobResultCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.JOB_ID, type = CommandType.UUID, entityType = AsyncJobResponse.class, required = true, description = "the ID of the asynchronous job") + @Parameter(name = ApiConstants.JOB_ID, type = CommandType.UUID, entityType = AsyncJobResponse.class, required = true, description = "The ID of the asynchronous job") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/AssignCertToLoadBalancerCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/AssignCertToLoadBalancerCmd.java index bfc155468404..87b193e2513f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/AssignCertToLoadBalancerCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/AssignCertToLoadBalancerCmd.java @@ -48,14 +48,14 @@ public class AssignCertToLoadBalancerCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, - description = "the ID of the load balancer rule") + description = "The ID of the load balancer rule") Long lbRuleId; @Parameter(name = ApiConstants.CERTIFICATE_ID, type = CommandType.UUID, entityType = SslCertResponse.class, required = true, - description = "the ID of the certificate") + description = "The ID of the certificate") Long certId; @Parameter(name = ApiConstants.FORCED, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/AssignToLoadBalancerRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/AssignToLoadBalancerRuleCmd.java index c4424b1d9374..f7962dab1379 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/AssignToLoadBalancerRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/AssignToLoadBalancerRuleCmd.java @@ -45,7 +45,7 @@ import com.cloud.vm.VirtualMachine; @APICommand(name = "assignToLoadBalancerRule", - description = "Assigns virtual machine or a list of virtual machines to a load balancer rule.", + description = "Assigns an Instance or a list of Instances to a load balancer rule.", responseObject = SuccessResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) @@ -60,14 +60,14 @@ public class AssignToLoadBalancerRuleCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, - description = "the ID of the load balancer rule") + description = "The ID of the load balancer rule") private Long id; @Parameter(name = ApiConstants.VIRTUAL_MACHINE_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = UserVmResponse.class, - description = "the list of IDs of the virtual machine that are being assigned to the load balancer rule(i.e. virtualMachineIds=1,2,3)") + description = "The list of IDs of the Instance that are being assigned to the load balancer rule(i.e. virtualMachineIds=1,2,3)") private List virtualMachineIds; @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID_IP, @@ -112,7 +112,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "applying instances for load balancer: " + getLoadBalancerId() + " (ids: " + StringUtils.join(getVirtualMachineIds(), ",") + ")"; + return "applying Instances for load balancer: " + getLoadBalancerId() + " (ids: " + StringUtils.join(getVirtualMachineIds(), ",") + ")"; } @@ -128,7 +128,7 @@ public Map> getVmIdIpListMap() { VirtualMachine lbvm = _entityMgr.findByUuid(VirtualMachine.class, vmId); if (lbvm == null) { - throw new InvalidParameterValueException("Unable to find virtual machine ID: " + vmId); + throw new InvalidParameterValueException("Unable to find Instance ID: " + vmId); } //check whether the given ip is valid ip or not @@ -155,7 +155,7 @@ public Map> getVmIdIpListMap() { @Override public void execute() { - CallContext.current().setEventDetails("Load balancer Id: " + getLoadBalancerId() + " VmIds: " + StringUtils.join(getVirtualMachineIds(), ",")); + CallContext.current().setEventDetails("Load balancer Id: " + getLoadBalancerId() + " Instance IDs: " + StringUtils.join(getVirtualMachineIds(), ",")); Map> vmIdIpsMap = getVmIdIpListMap(); boolean result = false; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateApplicationLoadBalancerCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateApplicationLoadBalancerCmd.java index 2199dfb4e8b4..b244375d64b9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateApplicationLoadBalancerCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateApplicationLoadBalancerCmd.java @@ -48,51 +48,51 @@ public class CreateApplicationLoadBalancerCmd extends BaseAsyncCreateCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "name of the load balancer") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "Name of the load balancer") private String loadBalancerName; - @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "the description of the load balancer", length = 4096) + @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "The description of the load balancer", length = 4096) private String description; @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, required = true, entityType = NetworkResponse.class, - description = "The guest network the load balancer will be created for") + description = "The guest Network the load balancer will be created for") private Long networkId; @Parameter(name = ApiConstants.SOURCE_PORT, type = CommandType.INTEGER, required = true, - description = "the source port the network traffic will be load balanced from") + description = "The source port the Network traffic will be load balanced from") private Integer sourcePort; - @Parameter(name = ApiConstants.ALGORITHM, type = CommandType.STRING, required = true, description = "load balancer algorithm (source, roundrobin, leastconn)") + @Parameter(name = ApiConstants.ALGORITHM, type = CommandType.STRING, required = true, description = "Load balancer algorithm (source, roundrobin, leastconn)") private String algorithm; @Parameter(name = ApiConstants.INSTANCE_PORT, type = CommandType.INTEGER, required = true, - description = "the TCP port of the virtual machine where the network traffic will be load balanced to") + description = "The TCP port of the Instance where the network traffic will be load balanced to") private Integer instancePort; - @Parameter(name = ApiConstants.SOURCE_IP, type = CommandType.STRING, description = "the source IP address the network traffic will be load balanced from") + @Parameter(name = ApiConstants.SOURCE_IP, type = CommandType.STRING, description = "The source IP address the network traffic will be load balanced from") private String sourceIp; @Parameter(name = ApiConstants.SOURCE_IP_NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, required = true, - description = "the network id of the source ip address") + description = "The Network ID of the source IP address") private Long sourceIpNetworkId; @Parameter(name = ApiConstants.SCHEME, type = CommandType.STRING, required = true, - description = "the load balancer scheme. Supported value in this release is Internal") + description = "The load balancer scheme. Supported value in this release is Internal") private String scheme; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBHealthCheckPolicyCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBHealthCheckPolicyCmd.java index c24a5f19f077..c4dfcad7918a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBHealthCheckPolicyCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBHealthCheckPolicyCmd.java @@ -53,10 +53,10 @@ public class CreateLBHealthCheckPolicyCmd extends BaseAsyncCreateCmd { type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, - description = "the ID of the load balancer rule") + 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 health check policy") + @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "The description of the load balancer health check policy") private String description; @Parameter(name = ApiConstants.HEALTHCHECK_PINGPATH, type = CommandType.STRING, required = false, description = "HTTP ping path") @@ -77,16 +77,16 @@ public class CreateLBHealthCheckPolicyCmd extends BaseAsyncCreateCmd { @Parameter(name = ApiConstants.HEALTHCHECK_HEALTHY_THRESHOLD, type = CommandType.INTEGER, required = false, - description = "Number of consecutive health check success before declaring an instance healthy") + 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") + description = "Number of consecutive health check failures before declaring an Instance unhealthy") private int unhealthyThreshold; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBStickinessPolicyCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBStickinessPolicyCmd.java index c6b5036bc955..b336b84517f4 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBStickinessPolicyCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateLBStickinessPolicyCmd.java @@ -54,25 +54,25 @@ public class CreateLBStickinessPolicyCmd extends BaseAsyncCreateCmd { type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, - description = "the ID of the load balancer rule") + 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 stickiness policy") + @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "The description of the load balancer stickiness policy") private String description; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "name of the load balancer stickiness policy") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "Name of the load balancer stickiness policy") private String lbStickinessPolicyName; @Parameter(name = ApiConstants.METHOD_NAME, type = CommandType.STRING, required = true, - description = "name of the load balancer stickiness policy method, possible values are LbCookie, AppCookie, SourceBased") + description = "Name of the load balancer stickiness policy method, possible values are LbCookie, AppCookie, SourceBased") private String stickinessMethodName; - @Parameter(name = ApiConstants.PARAM_LIST, type = CommandType.MAP, description = "param list. Example: param[0].name=cookiename¶m[0].value=LBCookie ") + @Parameter(name = ApiConstants.PARAM_LIST, type = CommandType.MAP, description = "Param list. Example: param[0].name=cookiename¶m[0].value=LBCookie ") private Map paramList; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateLoadBalancerRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateLoadBalancerRuleCmd.java index aa43b9cfdaf1..c39b8b9c6ec0 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateLoadBalancerRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/CreateLoadBalancerRuleCmd.java @@ -58,65 +58,65 @@ public class CreateLoadBalancerRuleCmd extends BaseAsyncCreateCmd /*implements L //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ALGORITHM, type = CommandType.STRING, required = true, description = "load balancer algorithm (source, roundrobin, leastconn)") + @Parameter(name = ApiConstants.ALGORITHM, type = CommandType.STRING, required = true, description = "Load balancer algorithm (source, roundrobin, leastconn)") private String algorithm; - @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "the description of the load balancer rule", length = 4096) + @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "The description of the load balancer rule", length = 4096) private String description; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "name of the load balancer rule") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "Name of the load balancer rule") private String loadBalancerRuleName; @Parameter(name = ApiConstants.PRIVATE_PORT, type = CommandType.INTEGER, required = true, - description = "the private port of the private IP address/virtual machine where the network traffic will be load balanced to") + description = "The private port of the private IP address/Instance where the network traffic will be load balanced to") private Integer privatePort; @Parameter(name = ApiConstants.PUBLIC_IP_ID, type = CommandType.UUID, entityType = IPAddressResponse.class, - description = "public IP address ID from where the network traffic will be load balanced from") + description = "Public IP address ID from where the network traffic will be load balanced from") private Long publicIpId; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = false, - description = "zone where the load balancer is going to be created. This parameter is required when LB service provider is ElasticLoadBalancerVm") + description = "Zone where the load balancer is going to be created. This parameter is required when LB service provider is ElasticLoadBalancerVm") private Long zoneId; @Parameter(name = ApiConstants.PUBLIC_PORT, type = CommandType.INTEGER, required = true, - description = "the public port from where the network traffic will be load balanced from") + description = "The public port from where the network traffic will be load balanced from") private Integer publicPort; - @Parameter(name = ApiConstants.OPEN_FIREWALL, type = CommandType.BOOLEAN, description = "if true, firewall rule for" + @Parameter(name = ApiConstants.OPEN_FIREWALL, type = CommandType.BOOLEAN, description = "If true, firewall rule for" + " source/end public port is automatically created; if false - firewall rule has to be created explicitly. If not specified 1) defaulted to false when LB" + " rule is being created for VPC guest network 2) in all other cases defaulted to true") private Boolean openFirewall; @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, - description = "the account associated with the load balancer. Must be used with the domainId parameter.") + description = "The Account associated with the 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") + @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.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, since = "4.18.0.0", description = "the source CIDR list to allow traffic from; " + @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, since = "4.18.0.0", description = "The source CIDR list to allow traffic from; " + "all other CIDRs will be blocked. Multiple entries must be separated by a single comma character (,). By default, all CIDRs are allowed.") private List cidrlist; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "The guest network this " - + "rule will be created for. Required when public Ip address is not associated with any Guest network yet (VPC case)") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "The guest Network this " + + "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.PROTOCOL, type = CommandType.STRING, description = "The protocol for the LB such as tcp, udp, tcp-proxy or ssl.") + @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "The protocol for the LB such as TCP, UDP, TCP-proxy or SSL.") private String lbProtocol; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// @@ -207,7 +207,7 @@ public long getNetworkId() { } else { Network defaultGuestNetwork = _networkService.getExclusiveGuestNetwork(zoneId); if (defaultGuestNetwork == null) { - throw new InvalidParameterValueException("Unable to find a default guest network for account " + getAccountName() + " in domain ID=" + getDomainId()); + throw new InvalidParameterValueException("Unable to find a default guest Network for Account " + getAccountName() + " in domain ID=" + getDomainId()); } else { return defaultGuestNetwork.getId(); } @@ -217,7 +217,7 @@ public long getNetworkId() { if (ipAddr.getAssociatedWithNetworkId() != null) { return ipAddr.getAssociatedWithNetworkId(); } else { - throw new InvalidParameterValueException("IP address ID=" + publicIpId + " is not associated with any network"); + throw new InvalidParameterValueException("IP address ID=" + publicIpId + " is not associated with any Network"); } } } @@ -340,10 +340,10 @@ public long getAccountId() { if (account != null) { return account.getId(); } else { - throw new InvalidParameterValueException("Unable to find account " + accountName + " in domain ID=" + domainId); + throw new InvalidParameterValueException("Unable to find Account " + accountName + " in domain ID=" + domainId); } } else { - throw new InvalidParameterValueException("Can't define IP owner. Either specify account/domainId or publicIpId"); + throw new InvalidParameterValueException("Can't define IP owner. Either specify Account/domainId or publicIpId"); } } @@ -388,7 +388,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "creating load balancer: " + getName() + " account: " + getAccountName(); + return "Creating load balancer: " + getName() + " Account: " + getAccountName(); } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteApplicationLoadBalancerCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteApplicationLoadBalancerCmd.java index 410df086393c..f2064d42ca4f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteApplicationLoadBalancerCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteApplicationLoadBalancerCmd.java @@ -39,7 +39,7 @@ public class DeleteApplicationLoadBalancerCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, description = "the ID of the Load Balancer") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, description = "The ID of the Load Balancer") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBHealthCheckPolicyCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBHealthCheckPolicyCmd.java index 3cf1f345037a..27a92bb25fc6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBHealthCheckPolicyCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBHealthCheckPolicyCmd.java @@ -44,7 +44,7 @@ public class DeleteLBHealthCheckPolicyCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = LBHealthCheckResponse.class, required = true, - description = "the ID of the load balancer health check policy") + description = "The ID of the load balancer health check policy") private Long id; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBStickinessPolicyCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBStickinessPolicyCmd.java index 5d04de3cae58..cc83835cd0e7 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBStickinessPolicyCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLBStickinessPolicyCmd.java @@ -45,7 +45,7 @@ public class DeleteLBStickinessPolicyCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = LBStickinessResponse.class, required = true, - description = "the ID of the LB stickiness policy") + description = "The ID of the LB stickiness policy") private Long id; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLoadBalancerRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLoadBalancerRuleCmd.java index b4079430ee32..fee9067d6950 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLoadBalancerRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/DeleteLoadBalancerRuleCmd.java @@ -44,7 +44,7 @@ public class DeleteLoadBalancerRuleCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, - description = "the ID of the load balancer rule") + description = "The ID of the load balancer rule") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListApplicationLoadBalancersCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListApplicationLoadBalancersCmd.java index d54f3e1155ec..b1d29f18f1a2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListApplicationLoadBalancersCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListApplicationLoadBalancersCmd.java @@ -43,28 +43,28 @@ public class ListApplicationLoadBalancersCmd extends BaseListTaggedResourcesCmd // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, description = "the ID of the load balancer") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, description = "The ID of the load balancer") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the load balancer") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the load balancer") private String loadBalancerName; - @Parameter(name = ApiConstants.SOURCE_IP, type = CommandType.STRING, description = "the source IP address of the load balancer") + @Parameter(name = ApiConstants.SOURCE_IP, type = CommandType.STRING, description = "The source IP address of the load balancer") private String sourceIp; @Parameter(name = ApiConstants.SOURCE_IP_NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, - description = "the network ID of the source IP address") + description = "The network ID of the source IP address") private Long sourceIpNetworkId; - @Parameter(name = ApiConstants.SCHEME, type = CommandType.STRING, description = "the scheme of the load balancer. Supported value is internal in the current release") + @Parameter(name = ApiConstants.SCHEME, type = CommandType.STRING, description = "The scheme of the load balancer. Supported value is internal in the current release") private String scheme; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "the network ID of the load balancer") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "The network ID of the load balancer") private Long networkId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLBHealthCheckPoliciesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLBHealthCheckPoliciesCmd.java index cb2cdb446d1c..e91f315bdaf1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLBHealthCheckPoliciesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLBHealthCheckPoliciesCmd.java @@ -44,13 +44,13 @@ public class ListLBHealthCheckPoliciesCmd extends BaseListCmd { @Parameter(name = ApiConstants.LBID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, - description = "the ID of the load balancer rule") + description = "The ID of the load balancer rule") private Long lbRuleId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = LBHealthCheckResponse.class, description = "the ID of the health check policy", since = "4.4") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = LBHealthCheckResponse.class, description = "The ID of the health check policy", since = "4.4") private Long id; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLBStickinessPoliciesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLBStickinessPoliciesCmd.java index a48e2ea37b71..a14f731435b1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLBStickinessPoliciesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLBStickinessPoliciesCmd.java @@ -45,17 +45,17 @@ public class ListLBStickinessPoliciesCmd extends BaseListCmd { @Parameter(name = ApiConstants.LBID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, - description = "the ID of the load balancer rule") + description = "The ID of the load balancer rule") private Long lbRuleId; @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = LBStickinessResponse.class, - description = "the ID of the load balancer stickiness policy") + description = "The ID of the load balancer stickiness policy") private Long id; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRuleInstancesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRuleInstancesCmd.java index 3bfc68a95bad..bf4604612b1d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRuleInstancesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRuleInstancesCmd.java @@ -36,7 +36,7 @@ import com.cloud.uservm.UserVm; import com.cloud.utils.Pair; -@APICommand(name = "listLoadBalancerRuleInstances", description = "List all virtual machine instances that are assigned to a load balancer rule.", responseObject = LoadBalancerRuleVmMapResponse.class, responseView = ResponseView.Restricted, +@APICommand(name = "listLoadBalancerRuleInstances", description = "List all Instances that are assigned to a load balancer rule.", responseObject = LoadBalancerRuleVmMapResponse.class, responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class ListLoadBalancerRuleInstancesCmd extends BaseListCmd implements UserCmd { @@ -49,20 +49,20 @@ public class ListLoadBalancerRuleInstancesCmd extends BaseListCmd implements Use @Parameter(name = ApiConstants.APPLIED, type = CommandType.BOOLEAN, - description = "true if listing all virtual machines currently applied to the load balancer rule; default is true") + description = "True if listing all Instances currently applied to the load balancer rule; default is true") private Boolean applied; @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, - description = "the ID of the load balancer rule") + description = "The ID of the load balancer rule") private Long id; @Parameter(name = ApiConstants.LIST_LB_VMIPS, type = CommandType.BOOLEAN, - description = "true if load balancer rule VM IP information to be included; default is false") + description = "True if load balancer rule Instance IP information to be included; default is false") private boolean isListLbVmip; @@ -95,10 +95,10 @@ public String getCommandName() { public void execute() { Pair, List> vmServiceMap = _lbService.listLoadBalancerInstances(this); List result = vmServiceMap.first(); - logger.debug(String.format("A total of [%s] user VMs were obtained when listing the load balancer instances: [%s].", result.size(), result)); + logger.debug("A total of [{}] user VMs were obtained when listing the load balancer instances: [{}].", result.size(), result); List serviceStates = vmServiceMap.second(); - logger.debug(String.format("A total of [%s] service states were obtained when listing the load balancer instances: [%s].", serviceStates.size(), serviceStates)); + logger.debug("A total of [{}] service states were obtained when listing the load balancer instances: [{}].", serviceStates.size(), serviceStates); if (!isListLbVmip()) { ListResponse response = new ListResponse<>(); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRulesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRulesCmd.java index b8b82f0c4a89..6ee317567776 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRulesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/ListLoadBalancerRulesCmd.java @@ -44,31 +44,31 @@ public class ListLoadBalancerRulesCmd extends BaseListTaggedResourcesCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, description = "the ID of the load balancer rule") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, description = "The ID of the load balancer rule") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the load balancer rule") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the load balancer rule") private String loadBalancerRuleName; @Parameter(name = ApiConstants.PUBLIC_IP_ID, type = CommandType.UUID, entityType = IPAddressResponse.class, - description = "the public IP address ID of the load balancer rule") + description = "The public IP address ID of the load balancer rule") private Long publicIpId; @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, - description = "the ID of the virtual machine of the load balancer rule") + description = "The ID of the Instance of the load balancer rule") private Long virtualMachineId; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the availability zone ID") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The availability zone ID") private Long zoneId; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "list by network ID the rule belongs to") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "List by Network ID the rule belongs to") private Long networkId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/RemoveCertFromLoadBalancerCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/RemoveCertFromLoadBalancerCmd.java index ddd2133d932e..0fccddf68445 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/RemoveCertFromLoadBalancerCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/RemoveCertFromLoadBalancerCmd.java @@ -45,7 +45,7 @@ public class RemoveCertFromLoadBalancerCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, - description = "the ID of the load balancer rule") + description = "The ID of the load balancer rule") Long lbRuleId; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/RemoveFromLoadBalancerRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/RemoveFromLoadBalancerRuleCmd.java index d29f2676ed55..713879c8c785 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/RemoveFromLoadBalancerRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/RemoveFromLoadBalancerRuleCmd.java @@ -43,7 +43,7 @@ import com.cloud.user.Account; @APICommand(name = "removeFromLoadBalancerRule", - description = "Removes a virtual machine or a list of virtual machines from a load balancer rule.", + description = "Removes an Instance or a list of Instances from a load balancer rule.", responseObject = SuccessResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) @@ -65,7 +65,7 @@ public class RemoveFromLoadBalancerRuleCmd extends BaseAsyncCmd { type = CommandType.LIST, collectionType = CommandType.UUID, entityType = UserVmResponse.class, - description = "the list of IDs of the virtual machines that are being removed from the load balancer rule (i.e. virtualMachineIds=1,2,3)") + description = "The list of IDs of the Instances that are being removed from the load balancer rule (i.e. virtualMachineIds=1,2,3)") private List virtualMachineIds; @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID_IP, @@ -121,7 +121,7 @@ public Map> getVmIdIpListMap() { VirtualMachine lbvm = _entityMgr.findByUuid(VirtualMachine.class, vmId); if (lbvm == null) { - throw new InvalidParameterValueException("Unable to find virtual machine ID: " + vmId); + throw new InvalidParameterValueException("Unable to find Instance ID: " + vmId); } Long longVmId = lbvm.getId(); @@ -143,12 +143,12 @@ public Map> getVmIdIpListMap() { @Override public String getEventDescription() { - return "removing instances from load balancer: " + getId() + " (ids: " + StringUtils.join(getVirtualMachineIds(), ",") + ")"; + return "removing Instances from load balancer: " + getId() + " (ids: " + StringUtils.join(getVirtualMachineIds(), ",") + ")"; } @Override public void execute() { - CallContext.current().setEventDetails("Load balancer Id: " + getId() + " VmIds: " + StringUtils.join(getVirtualMachineIds(), ",")); + CallContext.current().setEventDetails("Load balancer Id: " + getId() + " Instance IDs: " + StringUtils.join(getVirtualMachineIds(), ",")); Map> vmIdIpsMap = getVmIdIpListMap(); try { boolean result = _lbService.removeFromLoadBalancer(id, virtualMachineIds, vmIdIpsMap, false); @@ -156,10 +156,10 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove instance from load balancer rule"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove Instance from load balancer rule"); } }catch (InvalidParameterValueException ex) { - throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Failed to remove instance from load balancer rule"); + throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Failed to remove Instance from load balancer rule"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateApplicationLoadBalancerCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateApplicationLoadBalancerCmd.java index d129cd8988f8..19a366732d54 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateApplicationLoadBalancerCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateApplicationLoadBalancerCmd.java @@ -38,10 +38,10 @@ public class UpdateApplicationLoadBalancerCmd extends BaseAsyncCustomIdCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, description = "the ID of the load balancer") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, description = "The ID of the load balancer") private Long id; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLBHealthCheckPolicyCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLBHealthCheckPolicyCmd.java index fdd98fc3a0a4..17bd61c502dc 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLBHealthCheckPolicyCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLBHealthCheckPolicyCmd.java @@ -37,7 +37,7 @@ public class UpdateLBHealthCheckPolicyCmd extends BaseAsyncCustomIdCmd{ @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = LBHealthCheckResponse.class, required = true, description = "ID of load balancer health check policy") private Long id; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the policy to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the policy to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// @@ -63,7 +63,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "Update load balancer health check policy ID= " + id; + return "Update load balancer health check policy ID = " + id; } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLBStickinessPolicyCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLBStickinessPolicyCmd.java index b2137cf262d8..e79c1c561206 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLBStickinessPolicyCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLBStickinessPolicyCmd.java @@ -33,10 +33,10 @@ public class UpdateLBStickinessPolicyCmd extends BaseAsyncCustomIdCmd{ ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = LBStickinessResponse.class, required = true, description = "id of lb stickiness policy") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = LBStickinessResponse.class, required = true, description = "ID of lb stickiness policy") private Long id; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the policy to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the policy to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// @@ -62,7 +62,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "Update load balancer stickiness policy ID= " + id; + return "Update load balancer stickiness policy ID = " + id; } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLoadBalancerRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLoadBalancerRuleCmd.java index 8593cad82c65..5e6a877954ff 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLoadBalancerRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UpdateLoadBalancerRuleCmd.java @@ -43,23 +43,23 @@ public class UpdateLoadBalancerRuleCmd extends BaseAsyncCustomIdCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ALGORITHM, type = CommandType.STRING, description = "load balancer algorithm (source, roundrobin, leastconn)") + @Parameter(name = ApiConstants.ALGORITHM, type = CommandType.STRING, description = "Load balancer algorithm (source, roundrobin, leastconn)") private String algorithm; - @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "the description of the load balancer rule", length = 4096) + @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "The description of the load balancer rule", length = 4096) private String description; @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, - description = "the ID of the load balancer rule to update") + description = "The ID of the load balancer rule to update") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the load balancer rule") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the load balancer rule") private String loadBalancerName; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "The protocol for the LB") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UploadSslCertCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UploadSslCertCmd.java index e51b4dee9db6..0032b7a0acdf 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UploadSslCertCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/loadbalancer/UploadSslCertCmd.java @@ -61,13 +61,13 @@ public class UploadSslCertCmd extends BaseCmd { @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, description = "Password for the private key") private String password; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "account that will own the SSL certificate") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Account that will own the SSL certificate") private String accountName; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "an optional project for the SSL certificate") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "An optional project for the SSL certificate") private Long projectId; - @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "domain ID of the account owning the SSL certificate") + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Domain ID of the account owning the SSL certificate") private Long domainId; @Parameter(name = ApiConstants.NAME , type = CommandType.STRING, required = true, description = "Name for the uploaded certificate") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/nat/CreateIpForwardingRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/nat/CreateIpForwardingRuleCmd.java index e883a7a0e4dd..596d5952706a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/nat/CreateIpForwardingRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/nat/CreateIpForwardingRuleCmd.java @@ -54,24 +54,24 @@ public class CreateIpForwardingRuleCmd extends BaseAsyncCreateCmd implements Sta type = CommandType.UUID, entityType = IPAddressResponse.class, required = true, - description = "the public IP address ID of the forwarding rule, already associated via associateIp") + description = "The public IP address ID of the forwarding rule, already associated via associateIp") private Long ipAddressId; - @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, required = true, description = "the start port for the rule") + @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, required = true, description = "The start port for the rule") private Integer startPort; - @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "the end port for the rule") + @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "The end port for the rule") private Integer endPort; - @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, required = true, description = "the protocol for the rule. Valid values are TCP or UDP.") + @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, required = true, description = "The protocol for the rule. Valid values are TCP or UDP.") private String protocol; @Parameter(name = ApiConstants.OPEN_FIREWALL, type = CommandType.BOOLEAN, - description = "if true, firewall rule for source/end public port is automatically created; if false - firewall rule has to be created explicitly. Has value true by default") + description = "If true, firewall rule for source/end public port is automatically created; if false - firewall rule has to be created explicitly. Has value true by default") private Boolean openFirewall; - @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "the CIDR list to forward traffic from. Multiple entries must be separated by a single comma character (,). This parameter is deprecated. Do not use.") + @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "The CIDR list to forward traffic from. Multiple entries must be separated by a single comma character (,). This parameter is deprecated. Do not use.") private List cidrlist; ///////////////////////////////////////////////////// @@ -148,7 +148,7 @@ public void create() { setEntityId(rule.getId()); setEntityUuid(rule.getUuid()); } catch (NetworkRuleConflictException e) { - logger.info("Unable to create static NAT rule due to ", e); + logger.error("Unable to create static NAT rule due to ", e); throw new ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, e.getMessage()); } } @@ -172,14 +172,14 @@ public String getEventType() { @Override public String getEventDescription() { IpAddress ip = _networkService.getIp(ipAddressId); - return ("Applying an ipforwarding 1:1 NAT rule for IP: " + ip.getAddress() + " with virtual machine:" + getVirtualMachineId()); + return ("Applying an IP forwarding 1:1 NAT rule for IP: " + ip.getAddress() + " with Instance:" + getVirtualMachineId()); } private long getVirtualMachineId() { Long vmId = _networkService.getIp(ipAddressId).getAssociatedWithVmId(); if (vmId == null) { - throw new InvalidParameterValueException("IP address is not associated with any network, unable to create static NAT rule"); + throw new InvalidParameterValueException("IP address is not associated with any Network, unable to create static NAT rule"); } return vmId; } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/nat/DeleteIpForwardingRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/nat/DeleteIpForwardingRuleCmd.java index e4c16a317518..6ca48bf36c43 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/nat/DeleteIpForwardingRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/nat/DeleteIpForwardingRuleCmd.java @@ -42,7 +42,7 @@ public class DeleteIpForwardingRuleCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, description = "the ID of the forwarding rule") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, description = "The ID of the forwarding rule") private Long id; // unexposed parameter needed for events logging diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/nat/DisableStaticNatCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/nat/DisableStaticNatCmd.java index 2bee7dfcc895..f3d03b8beb37 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/nat/DisableStaticNatCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/nat/DisableStaticNatCmd.java @@ -46,7 +46,7 @@ public class DisableStaticNatCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = IPAddressResponse.class, required = true, - description = "the public IP address ID for which static NAT feature is being disabled") + description = "The public IP address ID for which static NAT feature is being disabled") private Long ipAddressId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/nat/EnableStaticNatCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/nat/EnableStaticNatCmd.java index 48c6cc20bf1c..23ad2852a8e3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/nat/EnableStaticNatCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/nat/EnableStaticNatCmd.java @@ -45,19 +45,19 @@ public class EnableStaticNatCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.IP_ADDRESS_ID, type = CommandType.UUID, entityType = IPAddressResponse.class, required = true, description = "the public IP " + @Parameter(name = ApiConstants.IP_ADDRESS_ID, type = CommandType.UUID, entityType = IPAddressResponse.class, required = true, description = "The public IP " + "address ID for which static NAT feature is being enabled") private Long ipAddressId; - @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "the ID of " - + "the virtual machine for enabling static NAT feature") + @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of " + + "the Instance for enabling static NAT feature") private Long virtualMachineId; @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, - 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)") + description = "The Network of the Instance 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, @@ -101,7 +101,7 @@ public long getNetworkId() { if (ntwkId == null) { throw new InvalidParameterValueException("Unable to enable static NAT for the ipAddress id=" + ipAddressId + - " as IP is not associated with any network and no networkId is passed in"); + " as IP is not associated with any Network and no networkId is passed in"); } return ntwkId; } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/nat/ListIpForwardingRulesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/nat/ListIpForwardingRulesCmd.java index 89981a6453b5..089ed972b3bb 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/nat/ListIpForwardingRulesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/nat/ListIpForwardingRulesCmd.java @@ -46,7 +46,7 @@ public class ListIpForwardingRulesCmd extends BaseListProjectAndAccountResources @Parameter(name = ApiConstants.IP_ADDRESS_ID, type = CommandType.UUID, entityType = IPAddressResponse.class, - description = "list the rule belonging to this public IP address") + description = "List the rule belonging to this public IP address") private Long publicIpAddressId; @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = FirewallRuleResponse.class, description = "Lists rule with the specified ID.") @@ -55,7 +55,7 @@ public class ListIpForwardingRulesCmd extends BaseListProjectAndAccountResources @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, - description = "Lists all rules applied to the specified VM.") + description = "Lists all rules applied to the specified Instance.") private Long vmId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkACLCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkACLCmd.java index 8d8e598bcab8..a6cd724f2d1f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkACLCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkACLCmd.java @@ -40,7 +40,7 @@ import com.cloud.user.Account; import com.cloud.utils.net.NetUtils; -@APICommand(name = "createNetworkACL", description = "Creates a ACL rule in the given network (the network has to belong to VPC)", responseObject = NetworkACLItemResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) +@APICommand(name = "createNetworkACL", description = "Creates a ACL rule in the given Network (the Network has to belong to VPC)", responseObject = NetworkACLItemResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateNetworkACLCmd extends BaseAsyncCreateCmd { @@ -48,40 +48,40 @@ public class CreateNetworkACLCmd extends BaseAsyncCreateCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, required = true, description = "the protocol for the ACL rule. Valid values are TCP/UDP/ICMP/ALL or valid protocol number") + @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, required = true, description = "The protocol for the ACL rule. Valid values are TCP/UDP/ICMP/ALL or valid protocol number") private String protocol; - @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "the starting port of ACL") + @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "The starting port of ACL") private Integer publicStartPort; - @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "the ending port of ACL") + @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "The ending port of ACL") private Integer publicEndPort; - @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "the CIDR list to allow traffic from/to. Multiple entries must be separated by a single comma character (,).") + @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "The CIDR list to allow traffic from/to. Multiple entries must be separated by a single comma character (,).") private List cidrlist; - @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "type of the ICMP message being sent") + @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "Type of the ICMP message being sent") private Integer icmpType; - @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "error code for this ICMP message") + @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "Error code for this ICMP message") private Integer icmpCode; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "The network of the VM the ACL will be created for") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "The Network of the Instance the ACL will be created for") private Long networkId; - @Parameter(name = ApiConstants.ACL_ID, type = CommandType.UUID, entityType = NetworkACLResponse.class, description = "The network of the VM the ACL will be created for") + @Parameter(name = ApiConstants.ACL_ID, type = CommandType.UUID, entityType = NetworkACLResponse.class, description = "The network of the Instance the ACL will be created for") private Long aclId; - @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "the traffic type for the ACL," + "can be ingress or egress, defaulted to ingress if not specified") + @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "The traffic type for the ACL," + "can be ingress or egress, defaulted to ingress if not specified") private String trafficType; @Parameter(name = ApiConstants.NUMBER, type = CommandType.INTEGER, description = "The number of the ACL item, its ordering") private Integer number; - @Parameter(name = ApiConstants.ACTION, type = CommandType.STRING, description = "scl entry action, allow or deny") + @Parameter(name = ApiConstants.ACTION, type = CommandType.STRING, description = "ACL entry action, allow or deny") private String action; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = { + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the rule to the end User or not", since = "4.4", authorized = { RoleType.Admin}) private Boolean display; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkACLListCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkACLListCmd.java index cd25a604e776..31d1b49c2e71 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkACLListCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkACLListCmd.java @@ -36,7 +36,7 @@ import com.cloud.network.vpc.Vpc; import com.cloud.user.Account; -@APICommand(name = "createNetworkACLList", description = "Creates a network ACL. If no VPC is given, then it creates a global ACL that can be used by everyone.", +@APICommand(name = "createNetworkACLList", description = "Creates a Network ACL. If no VPC is given, then it creates a global ACL that can be used by everyone.", responseObject = NetworkACLResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateNetworkACLListCmd extends BaseAsyncCreateCmd { @@ -46,19 +46,19 @@ public class CreateNetworkACLListCmd extends BaseAsyncCreateCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "Name of the network ACL list") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "Name of the Network ACL list") private String name; - @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "Description of the network ACL list") + @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "Description of the Network ACL list") private String description; @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, - description = "ID of the VPC associated with this network ACL list") + description = "ID of the VPC associated with this Network ACL list") private Long vpcId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the list to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the list to the end User or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; // /////////////////////////////////////////////////// @@ -112,7 +112,7 @@ public void execute() throws ResourceUnavailableException { setResponseObject(aclResponse); aclResponse.setResponseName(getCommandName()); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create network ACL"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create Network ACL"); } } @@ -128,7 +128,7 @@ public long getEntityOwnerId() { } else { account = CallContext.current().getCallingAccount(); if (!Account.Type.ADMIN.equals(account.getType())) { - logger.warn(String.format("Only Root Admin can create global ACLs. Account [%s] cannot create any global ACL.", account)); + logger.error("Only Root Admin can create global ACLs. {} cannot create any global ACL.", account); throw new PermissionDeniedException("Only Root Admin can create global ACLs."); } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java index aca3d3ca1b45..35fec1d6b3e2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkCmd.java @@ -57,68 +57,68 @@ public class CreateNetworkCmd extends BaseCmd implements UserCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the network") + @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, description = "the display text of the network") + @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The display text of the network") private String displayText; @Parameter(name = ApiConstants.NETWORK_OFFERING_ID, type = CommandType.UUID, entityType = NetworkOfferingResponse.class, required = true, - description = "the network offering ID") + description = "The network offering ID") private Long networkOfferingId; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the zone ID for the network") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "The zone ID for the network") private Long zoneId; @Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, - description = "the physical network ID the network belongs to") + description = "The physical Network ID the network belongs to") private Long physicalNetworkId; - @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, description = "the gateway of the network. Required " + @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, description = "The gateway of the Network. Required " + "for shared networks and isolated networks when it belongs to VPC") private String gateway; - @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, description = "the netmask of the network. Required " + @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, description = "The netmask of the Network. Required " + "for shared networks and isolated networks when it belongs to VPC") private String netmask; - @Parameter(name = ApiConstants.START_IP, type = CommandType.STRING, description = "the beginning IP address in the network IP range") + @Parameter(name = ApiConstants.START_IP, type = CommandType.STRING, 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" + @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.ISOLATED_PVLAN, type = CommandType.STRING, description = "the isolated private VLAN for this network") + @Parameter(name = ApiConstants.ISOLATED_PVLAN, type = CommandType.STRING, description = "The isolated private VLAN for this Network") private String isolatedPvlan; @Parameter(name = ApiConstants.ISOLATED_PVLAN_TYPE, type = CommandType.STRING, - description = "the isolated private VLAN type for this network") + description = "The isolated private VLAN type for this network") private String isolatedPvlanType; - @Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, description = "network domain") + @Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, description = "Network domain") private String networkDomain; @Parameter(name = ApiConstants.ACL_TYPE, type = CommandType.STRING, description = "Access control type; supported values" - + " are account and domain. In 3.0 all shared networks should have aclType=Domain, and all isolated networks" - + " - Account. Account means that only the account owner can use the network, domain - all accounts in the domain can use the network") + + " are Account and domain. In 3.0 all shared networks should have aclType=Domain, and all isolated networks" + + " - Account. Account means that only the Account owner can use the network, domain - all accounts in the domain can use the network") private String aclType; @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Account that will own the network. Account should be under the selected domain") private String accountName; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "an optional project for the network") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "An optional project for the network") private Long projectId; - @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "domain ID of the account owning a network. " + - "If the account is not specified, but the acltype is Account or not specified, the network will be automatically assigned to the caller account and domain. " + - "To create a network under the domain without linking it to any account, make sure to include acltype=Domain parameter in the api call. " + - "If account is not specified, but acltype is Domain, the network will be created for the specified domain.") + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Domain ID of the account owning a network. " + + "If the Account is not specified, but the acltype is Account or not specified, the Network will be automatically assigned to the caller account and domain. " + + "To create a Network under the domain without linking it to any account, make sure to include acltype=Domain parameter in the api call. " + + "If Account is not specified, but acltype is Domain, the network will be created for the specified domain.") private Long domainId; @Parameter(name = ApiConstants.SUBDOMAIN_ACCESS, @@ -127,22 +127,22 @@ public class CreateNetworkCmd extends BaseCmd implements UserCmd { + " subdomains to use networks dedicated to their parent domain(s). Should be used with aclType=Domain, defaulted to allow.subdomain.network.access global config if not specified") private Boolean subdomainAccess; - @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "the VPC network belongs to") + @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "The VPC network belongs to") private Long vpcId; @Parameter(name = ApiConstants.TUNGSTEN_VIRTUAL_ROUTER_UUID, type = CommandType.STRING, description = "Tungsten-Fabric virtual router the network belongs to") private String tungstenVirtualRouterUuid; - @Parameter(name = ApiConstants.START_IPV6, type = CommandType.STRING, description = "the beginning IPv6 address in the IPv6 network range") + @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") + @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") + @Parameter(name = ApiConstants.IP6_GATEWAY, type = CommandType.STRING, description = "The gateway of the IPv6 network. Required for Shared networks") private String ip6Gateway; - @Parameter(name = ApiConstants.IP6_CIDR, type = CommandType.STRING, description = "the CIDR of IPv6 network, must be at least /64") + @Parameter(name = ApiConstants.IP6_CIDR, type = CommandType.STRING, description = "The CIDR of IPv6 network, must be at least /64") private String ip6Cidr; @Parameter(name = ApiConstants.EXTERNAL_ID, type = CommandType.STRING, description = "ID of the network in an external system.") @@ -150,7 +150,7 @@ public class CreateNetworkCmd extends BaseCmd implements UserCmd { @Parameter(name = ApiConstants.DISPLAY_NETWORK, type = CommandType.BOOLEAN, - description = "an optional field, whether to the display the network to the end user or not.", authorized = {RoleType.Admin}) + description = "An optional field, whether to the display the network to the end User or not.", authorized = {RoleType.Admin}) private Boolean displayNetwork; @Parameter(name = ApiConstants.ACL_ID, type = CommandType.UUID, entityType = NetworkACLResponse.class, description = "Network ACL ID associated for the network") @@ -171,16 +171,16 @@ public class CreateNetworkCmd extends BaseCmd implements UserCmd { description = "MTU to be configured on the network VR's private interface(s)", since = "4.18.0") private Integer privateMtu; - @Parameter(name = ApiConstants.DNS1, type = CommandType.STRING, description = "the first IPv4 DNS for the network", since = "4.18.0") + @Parameter(name = ApiConstants.DNS1, type = CommandType.STRING, description = "The first IPv4 DNS for the network", since = "4.18.0") private String ip4Dns1; - @Parameter(name = ApiConstants.DNS2, type = CommandType.STRING, description = "the second IPv4 DNS for the network", since = "4.18.0") + @Parameter(name = ApiConstants.DNS2, type = CommandType.STRING, description = "The second IPv4 DNS for the network", since = "4.18.0") private String ip4Dns2; - @Parameter(name = ApiConstants.IP6_DNS1, type = CommandType.STRING, description = "the first IPv6 DNS for the network", since = "4.18.0") + @Parameter(name = ApiConstants.IP6_DNS1, type = CommandType.STRING, description = "The first IPv6 DNS for the network", since = "4.18.0") private String ip6Dns1; - @Parameter(name = ApiConstants.IP6_DNS2, type = CommandType.STRING, description = "the second IPv6 DNS for the network", since = "4.18.0") + @Parameter(name = ApiConstants.IP6_DNS2, type = CommandType.STRING, description = "The second IPv6 DNS for the network", since = "4.18.0") private String ip6Dns2; @Parameter(name = ApiConstants.SOURCE_NAT_IP, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkPermissionsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkPermissionsCmd.java index 1df472cbb228..eb95bc781892 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkPermissionsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/CreateNetworkPermissionsCmd.java @@ -51,24 +51,24 @@ public class CreateNetworkPermissionsCmd extends BaseCmd { @Parameter(name = ApiConstants.ACCOUNTS, type = CommandType.LIST, collectionType = CommandType.STRING, - description = "a comma delimited list of accounts within owner's domain. If specified, \"op\" parameter has to be passed in.") + description = "A comma delimited list of accounts within owner's domain. If specified, \"op\" parameter has to be passed in.") private List accountNames; @Parameter(name = ApiConstants.ACCOUNT_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = AccountResponse.class, - description = "a comma delimited list of account IDs within owner's domain. If specified, \"op\" parameter has to be passed in.") + description = "A comma delimited list of account IDs within owner's domain. If specified, \"op\" parameter has to be passed in.") private List accountIds; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, required = true, description = "the network ID") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, required = true, description = "The network ID") private Long networkId; @Parameter(name = ApiConstants.PROJECT_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = ProjectResponse.class, - description = "a comma delimited list of projects within owner's domain. If specified, \"op\" parameter has to be passed in.") + description = "A comma delimited list of projects within owner's domain. If specified, \"op\" parameter has to be passed in.") private List projectIds; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/DeleteNetworkACLCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/DeleteNetworkACLCmd.java index ca42626eacb5..76bbd127066c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/DeleteNetworkACLCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/DeleteNetworkACLCmd.java @@ -32,7 +32,7 @@ import com.cloud.exception.ResourceUnavailableException; import com.cloud.user.Account; -@APICommand(name = "deleteNetworkACL", description = "Deletes a network ACL", responseObject = SuccessResponse.class, +@APICommand(name = "deleteNetworkACL", description = "Deletes a Network ACL", responseObject = SuccessResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteNetworkACLCmd extends BaseAsyncCmd { @@ -40,7 +40,7 @@ public class DeleteNetworkACLCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkACLItemResponse.class, required = true, description = "the ID of the network ACL") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkACLItemResponse.class, required = true, description = "The ID of the Network ACL") private Long id; ///////////////////////////////////////////////////// @@ -89,7 +89,7 @@ public void execute() throws ResourceUnavailableException { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete network ACL item"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete Network ACL item"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/DeleteNetworkACLListCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/DeleteNetworkACLListCmd.java index 45bc86e8c91d..0352a5756b18 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/DeleteNetworkACLListCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/DeleteNetworkACLListCmd.java @@ -40,7 +40,7 @@ public class DeleteNetworkACLListCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkACLResponse.class, required = true, description = "the ID of the network ACL") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkACLResponse.class, required = true, description = "The ID of the network ACL") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/DeleteNetworkCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/DeleteNetworkCmd.java index 8e8e18c67024..7063be7ee180 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/DeleteNetworkCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/DeleteNetworkCmd.java @@ -33,7 +33,7 @@ import com.cloud.exception.InvalidParameterValueException; import com.cloud.network.Network; -@APICommand(name = "deleteNetwork", description = "Deletes a network", responseObject = SuccessResponse.class, entityType = {Network.class}, +@APICommand(name = "deleteNetwork", description = "Deletes a Network", responseObject = SuccessResponse.class, entityType = {Network.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteNetworkCmd extends BaseAsyncCmd { @@ -41,7 +41,7 @@ public class DeleteNetworkCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkResponse.class, required = true, description = "the ID of the network") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkResponse.class, required = true, description = "The ID of the network") private Long id; @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force delete a network." + diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkACLListsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkACLListsCmd.java index c88f956943b4..62834a51e033 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkACLListsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkACLListsCmd.java @@ -43,16 +43,16 @@ public class ListNetworkACLListsCmd extends BaseListProjectAndAccountResourcesCm @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkACLResponse.class, description = "Lists network ACL with the specified ID.") private Long id; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "list network ACLs by network ID") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "List network ACLs by network ID") private Long networkId; - @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "list network ACLs by VPC ID") + @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "List network ACLs by VPC ID") private Long vpcId; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list network ACLs by specified name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "List network ACLs by specified name") private String name; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkACLsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkACLsCmd.java index 1ef2b9b7bfbf..159f07296eef 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkACLsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkACLsCmd.java @@ -44,22 +44,22 @@ public class ListNetworkACLsCmd extends BaseListTaggedResourcesCmd { description = "Lists network ACL Item with the specified ID") private Long id; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "list network ACL items by network ID") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "List network ACL items by network ID") private Long networkId; - @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "list network ACL items by traffic type - ingress or egress") + @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "List network ACL items by traffic type - ingress or egress") private String trafficType; - @Parameter(name = ApiConstants.ACL_ID, type = CommandType.UUID, entityType = NetworkACLResponse.class, description = "list network ACL items by ACL ID") + @Parameter(name = ApiConstants.ACL_ID, type = CommandType.UUID, entityType = NetworkACLResponse.class, description = "List network ACL items by ACL ID") private Long aclId; - @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "list network ACL items by protocol") + @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "List network ACL items by protocol") private String protocol; - @Parameter(name = ApiConstants.ACTION, type = CommandType.STRING, description = "list network ACL items by action") + @Parameter(name = ApiConstants.ACTION, type = CommandType.STRING, description = "List network ACL items by action") private String action; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkOfferingsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkOfferingsCmd.java index bdc89d804cdf..ff3b61056be3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkOfferingsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkOfferingsCmd.java @@ -39,75 +39,75 @@ public class ListNetworkOfferingsCmd extends BaseListCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkOfferingResponse.class, description = "list network offerings by ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkOfferingResponse.class, description = "List network offerings by ID") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list network offerings by name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "List network offerings by name") private String networkOfferingName; - @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "list network offerings by display text") + @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "List network offerings by display text") private String displayText; - @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "list by traffic type") + @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "List by traffic type") private String trafficType; - @Parameter(name = ApiConstants.IS_DEFAULT, type = CommandType.BOOLEAN, description = "true if need to list only default network offerings. Default value is false") + @Parameter(name = ApiConstants.IS_DEFAULT, type = CommandType.BOOLEAN, description = "True if need to list only default network offerings. Default value is false") private Boolean isDefault; - @Parameter(name = ApiConstants.SPECIFY_VLAN, type = CommandType.BOOLEAN, description = "the tags for the network offering.") + @Parameter(name = ApiConstants.SPECIFY_VLAN, type = CommandType.BOOLEAN, description = "The tags for the network offering.") private Boolean specifyVlan; - @Parameter(name = ApiConstants.AVAILABILITY, type = CommandType.STRING, description = "the availability of network offering. Default value is required") + @Parameter(name = ApiConstants.AVAILABILITY, type = CommandType.STRING, description = "The availability of network offering. Default value is required") private String availability; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "list network offerings available for network creation in specific domain", + description = "List network offerings available for network creation in specific domain", since = "4.13") private Long domainId; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - description = "list network offerings available for network creation in specific zone") + description = "List network offerings available for network creation in specific zone") private Long zoneId; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "list network offerings by state") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "List network offerings by state") private String state; @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, - description = "the ID of the network. Pass this in if you want to see the available network offering that a network can be changed to.") + description = "The ID of the network. Pass this in if you want to see the available network offering that a network can be changed to.") private Long networkId; - @Parameter(name = ApiConstants.GUEST_IP_TYPE, type = CommandType.STRING, description = "list network offerings by guest type: shared or isolated") + @Parameter(name = ApiConstants.GUEST_IP_TYPE, type = CommandType.STRING, description = "List network offerings by guest type: shared or isolated") private String guestIpType; @Parameter(name = ApiConstants.SUPPORTED_SERVICES, type = CommandType.LIST, collectionType = CommandType.STRING, - description = "list network offerings supporting certain services") + description = "List network offerings supporting certain services") private List supportedServices; @Parameter(name = ApiConstants.SOURCE_NAT_SUPPORTED, type = CommandType.BOOLEAN, - description = "true if need to list only netwok offerings where source NAT is supported, false otherwise") + description = "True if need to list only netwok offerings where source NAT is supported, false otherwise") private Boolean sourceNatSupported; @Parameter(name = ApiConstants.SPECIFY_IP_RANGES, type = CommandType.BOOLEAN, - description = "true if need to list only network offerings which support specifying ip ranges") + description = "True if need to list only network offerings which support specifying ip ranges") private Boolean specifyIpRanges; - @Parameter(name = ApiConstants.TAGS, type = CommandType.STRING, description = "list network offerings by tags", length = 4096) + @Parameter(name = ApiConstants.TAGS, type = CommandType.STRING, description = "List network offerings by tags", length = 4096) private String tags; - @Parameter(name = ApiConstants.IS_TAGGED, type = CommandType.BOOLEAN, description = "true if offering has tags specified") + @Parameter(name = ApiConstants.IS_TAGGED, type = CommandType.BOOLEAN, description = "True if offering has tags specified") private Boolean isTagged; - @Parameter(name = ApiConstants.FOR_VPC, type = CommandType.BOOLEAN, description = "the network offering can be used" + " only for network creation inside the VPC") + @Parameter(name = ApiConstants.FOR_VPC, type = CommandType.BOOLEAN, description = "The network offering can be used" + " only for network creation inside the VPC") private Boolean forVpc; @Parameter(name = ApiConstants.ROUTING_MODE, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkPermissionsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkPermissionsCmd.java index 6ea4937e1153..e852fdccecb9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkPermissionsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworkPermissionsCmd.java @@ -34,7 +34,7 @@ import java.util.ArrayList; import java.util.List; -@APICommand(name = "listNetworkPermissions", description = "List network visibility and all accounts that have permissions to view this network.", +@APICommand(name = "listNetworkPermissions", description = "List Network visibility and all Accounts that have permissions to view this Network.", responseObject = NetworkPermissionsResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, @@ -47,7 +47,7 @@ public class ListNetworkPermissionsCmd extends BaseCmd implements UserCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, required = true, description = "Lists network permission by network ID") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, required = true, description = "Lists Network permission by Network ID") private Long networkId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java index 0eb5ddc5ebec..79f2cf8c7449 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/ListNetworksCmd.java @@ -42,7 +42,7 @@ import com.cloud.utils.Pair; import org.apache.commons.lang3.StringUtils; -@APICommand(name = "listNetworks", description = "Lists all available networks.", responseObject = NetworkResponse.class, responseView = ResponseView.Restricted, entityType = {Network.class}, +@APICommand(name = "listNetworks", description = "Lists all available Networks.", responseObject = NetworkResponse.class, responseView = ResponseView.Restricted, entityType = {Network.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListNetworksCmd extends BaseListRetrieveOnlyResourceCountCmd implements UserCmd { private static final String s_name = "listnetworksresponse"; @@ -50,52 +50,52 @@ public class ListNetworksCmd extends BaseListRetrieveOnlyResourceCountCmd implem ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "list networks by ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "List Networks by ID") private Long id; @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list networks by name", since = "4.22.0") private String name; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the zone ID of the network") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The zone ID of the Network") private Long zoneId; - @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "the type of the network. Supported values are: isolated, l2, shared and all") + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "The type of the Network. Supported values are: isolated, l2, shared and all") private String guestIpType; - @Parameter(name = ApiConstants.IS_SYSTEM, type = CommandType.BOOLEAN, description = "true if network is system, false otherwise") + @Parameter(name = ApiConstants.IS_SYSTEM, type = CommandType.BOOLEAN, description = "True if Network is system, false otherwise") private Boolean isSystem; - @Parameter(name = ApiConstants.ACL_TYPE, type = CommandType.STRING, description = "list networks by ACL (access control list) type. Supported values are account and domain") + @Parameter(name = ApiConstants.ACL_TYPE, type = CommandType.STRING, description = "List Networks by ACL (access control list) type. Supported values are Account and domain") private String aclType; - @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "type of the traffic") + @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "Type of the traffic") private String trafficType; - @Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, description = "list networks by physical network id") + @Parameter(name = ApiConstants.PHYSICAL_NETWORK_ID, type = CommandType.UUID, entityType = PhysicalNetworkResponse.class, description = "List Networks by physical Network ID") private Long physicalNetworkId; - @Parameter(name = ApiConstants.SUPPORTED_SERVICES, type = CommandType.LIST, collectionType = CommandType.STRING, description = "list networks supporting certain services") + @Parameter(name = ApiConstants.SUPPORTED_SERVICES, type = CommandType.LIST, collectionType = CommandType.STRING, description = "List Networks supporting certain services") private List supportedServices; - @Parameter(name = ApiConstants.RESTART_REQUIRED, type = CommandType.BOOLEAN, description = "list networks by restartRequired") + @Parameter(name = ApiConstants.RESTART_REQUIRED, type = CommandType.BOOLEAN, description = "List networks by restartRequired") private Boolean restartRequired; - @Parameter(name = ApiConstants.SPECIFY_IP_RANGES, type = CommandType.BOOLEAN, description = "true if need to list only networks which support specifying IP ranges") + @Parameter(name = ApiConstants.SPECIFY_IP_RANGES, type = CommandType.BOOLEAN, description = "True if need to list only networks which support specifying IP ranges") private Boolean specifyIpRanges; @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "List networks by VPC") private Long vpcId; - @Parameter(name = ApiConstants.CAN_USE_FOR_DEPLOY, type = CommandType.BOOLEAN, description = "list networks available for VM deployment") + @Parameter(name = ApiConstants.CAN_USE_FOR_DEPLOY, type = CommandType.BOOLEAN, description = "List networks available for Instance deployment") private Boolean canUseForDeploy; - @Parameter(name = ApiConstants.FOR_VPC, type = CommandType.BOOLEAN, description = "the network belongs to VPC") + @Parameter(name = ApiConstants.FOR_VPC, type = CommandType.BOOLEAN, description = "The network belongs to VPC") private Boolean forVpc; - @Parameter(name = ApiConstants.DISPLAY_NETWORK, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.DISPLAY_NETWORK, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; - @Parameter(name = ApiConstants.NETWORK_OFFERING_ID, type = CommandType.UUID, entityType = NetworkOfferingResponse.class, description = "list networks by network offering ID") + @Parameter(name = ApiConstants.NETWORK_OFFERING_ID, type = CommandType.UUID, entityType = NetworkOfferingResponse.class, description = "List networks by network offering ID") private Long networkOfferingId; @Parameter(name = ApiConstants.ASSOCIATED_NETWORK_ID, @@ -106,17 +106,17 @@ public class ListNetworksCmd extends BaseListRetrieveOnlyResourceCountCmd implem private Long associatedNetworkId; @Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN, - description = "flag to display the resource icon for networks") + description = "Flag to display the resource icon for networks") private Boolean showIcon; @Parameter(name = ApiConstants.NETWORK_FILTER, type = CommandType.STRING, since = "4.17.0", - description = "possible values are \"account\", \"domain\", \"accountdomain\",\"shared\", and \"all\". Default value is \"all\"." - + "* account : account networks that have been registered for or created by the calling user. " - + "* domain : domain networks that have been registered for or created by the calling user. " - + "* accountdomain : account and domain networks that have been registered for or created by the calling user. " - + "* shared : networks that have been granted to the calling user by another user. " + description = "Possible values are \"account\", \"domain\", \"accountdomain\",\"shared\", and \"all\". Default value is \"all\"." + + "* account : account networks that have been registered for or created by the calling User. " + + "* domain : domain networks that have been registered for or created by the calling User. " + + "* accountdomain : account and domain networks that have been registered for or created by the calling User. " + + "* shared : networks that have been granted to the calling User by another User. " + "* all : all networks (account, domain and shared).") private String networkFilter; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/MoveNetworkAclItemCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/MoveNetworkAclItemCmd.java index 5d36dcfd8e93..6b525e63c185 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/MoveNetworkAclItemCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/MoveNetworkAclItemCmd.java @@ -28,7 +28,7 @@ import com.cloud.network.vpc.NetworkACLItem; import com.cloud.user.Account; -@APICommand(name = "moveNetworkAclItem", description = "Move an ACL rule to a position bettwen two other ACL rules of the same ACL network list", responseObject = NetworkACLItemResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) +@APICommand(name = "moveNetworkAclItem", description = "Move an ACL rule to a position between two other ACL rules of the same ACL Network list", responseObject = NetworkACLItemResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class MoveNetworkAclItemCmd extends BaseAsyncCustomIdCmd { private static final String s_name = "moveNetworkAclItemResponse"; @@ -42,7 +42,7 @@ public class MoveNetworkAclItemCmd extends BaseAsyncCustomIdCmd { @Parameter(name = ApiConstants.NEXT_ACL_RULE_ID, type = CommandType.STRING, description = "The ID of the rule that is right after the new position where the rule being moved is going to be placed. This value can be 'NULL' if the rule is being moved to the last position of the network ACL list.") private String nextAclRuleUuid; - @Parameter(name = ApiConstants.MOVE_ACL_CONSISTENCY_HASH, type = CommandType.STRING, description = "Md5 hash used to check the consistency of the ACL rule list before applying the ACL rule move. This check is useful to manage concurrency problems that may happen when multiple users are editing the same ACL rule listing. The parameter is not required. Therefore, if the user does not send it, they assume the risk of moving ACL rules without checking the consistency of the access control list before executing the move. We use MD5 hash function on a String that is composed of all UUIDs of the ACL rules in concatenated in their respective order (order defined via 'number' field).") + @Parameter(name = ApiConstants.MOVE_ACL_CONSISTENCY_HASH, type = CommandType.STRING, description = "Md5 hash used to check the consistency of the ACL rule list before applying the ACL rule move. This check is useful to manage concurrency problems that may happen when multiple Users are editing the same ACL rule listing. The parameter is not required. Therefore, if the User does not send it, they assume the risk of moving ACL rules without checking the consistency of the access control list before executing the move. We use MD5 hash function on a String that is composed of all UUIDs of the ACL rules in concatenated in their respective order (order defined via 'number' field).") private String aclConsistencyHash; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/RemoveNetworkPermissionsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/RemoveNetworkPermissionsCmd.java index c199d872e0c0..546b460f16c5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/RemoveNetworkPermissionsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/RemoveNetworkPermissionsCmd.java @@ -34,7 +34,7 @@ import java.util.List; -@APICommand(name = "removeNetworkPermissions", description = "Removes network permissions.", +@APICommand(name = "removeNetworkPermissions", description = "Removes Network permissions.", responseObject = SuccessResponse.class, entityType = {Network.class}, requestHasSensitiveInfo = false, @@ -51,24 +51,24 @@ public class RemoveNetworkPermissionsCmd extends BaseCmd { @Parameter(name = ApiConstants.ACCOUNTS, type = CommandType.LIST, collectionType = CommandType.STRING, - description = "a comma delimited list of accounts within owner's domain. If specified, \"op\" parameter has to be passed in.") + description = "A comma delimited list of Accounts within owner's domain. If specified, \"op\" parameter has to be passed in.") private List accountNames; @Parameter(name = ApiConstants.ACCOUNT_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = AccountResponse.class, - description = "a comma delimited list of account IDs within owner's domain. If specified, \"op\" parameter has to be passed in.") + description = "A comma delimited list of account IDs within owner's domain. If specified, \"op\" parameter has to be passed in.") private List accountIds; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, required = true, description = "the network ID") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, required = true, description = "The Network ID") private Long networkId; @Parameter(name = ApiConstants.PROJECT_IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = ProjectResponse.class, - description = "a comma delimited list of projects within owner's domain. If specified, \"op\" parameter has to be passed in.") + description = "A comma delimited list of projects within owner's domain. If specified, \"op\" parameter has to be passed in.") private List projectIds; // /////////////////////////////////////////////////// @@ -105,7 +105,7 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update network permissions"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update Network permissions"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/ReplaceNetworkACLListCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/ReplaceNetworkACLListCmd.java index f6e9557aadb3..faddd340f83a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/ReplaceNetworkACLListCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/ReplaceNetworkACLListCmd.java @@ -41,13 +41,13 @@ public class ReplaceNetworkACLListCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ACL_ID, type = CommandType.UUID, entityType = NetworkACLResponse.class, required = true, description = "the ID of the network ACL") + @Parameter(name = ApiConstants.ACL_ID, type = CommandType.UUID, entityType = NetworkACLResponse.class, required = true, description = "The ID of the network ACL") private long aclId; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "the ID of the network") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "The ID of the network") private Long networkId; - @Parameter(name = ApiConstants.GATEWAY_ID, type = CommandType.UUID, entityType = PrivateGatewayResponse.class, description = "the ID of the private gateway") + @Parameter(name = ApiConstants.GATEWAY_ID, type = CommandType.UUID, entityType = PrivateGatewayResponse.class, description = "The ID of the private gateway") private Long privateGatewayId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/ResetNetworkPermissionsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/ResetNetworkPermissionsCmd.java index a23b98c84a88..611e35028be0 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/ResetNetworkPermissionsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/ResetNetworkPermissionsCmd.java @@ -29,7 +29,7 @@ import com.cloud.network.Network; import com.cloud.user.Account; -@APICommand(name = "resetNetworkPermissions", description = "Resets network permissions.", +@APICommand(name = "resetNetworkPermissions", description = "Resets Network permissions.", responseObject = SuccessResponse.class, entityType = {Network.class}, requestHasSensitiveInfo = false, @@ -43,7 +43,7 @@ public class ResetNetworkPermissionsCmd extends BaseCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, required = true, description = "the network ID") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, required = true, description = "The Network ID") private Long networkId; // /////////////////////////////////////////////////// @@ -65,7 +65,7 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update network permissions"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update Network permissions"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/RestartNetworkCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/RestartNetworkCmd.java index ffc2e36dee53..c04a50cb05d8 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/RestartNetworkCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/RestartNetworkCmd.java @@ -37,7 +37,7 @@ import com.cloud.network.Network; @APICommand(name = "restartNetwork", - description = "Restarts the network; includes 1) restarting network elements - virtual routers, DHCP servers 2) reapplying all public IPs 3) reapplying loadBalancing/portForwarding rules", + description = "Restarts the Network; includes 1) restarting network elements - virtual routers, DHCP servers 2) reapplying all public IPs 3) reapplying loadBalancing/portForwarding rules", responseObject = SuccessResponse.class, entityType = {Network.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/UpdateNetworkACLItemCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/UpdateNetworkACLItemCmd.java index 42cb0697edb4..9e7e1b5b8542 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/UpdateNetworkACLItemCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/UpdateNetworkACLItemCmd.java @@ -41,37 +41,37 @@ public class UpdateNetworkACLItemCmd extends BaseAsyncCustomIdCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkACLItemResponse.class, required = true, description = "the ID of the network ACL item") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkACLItemResponse.class, required = true, description = "The ID of the network ACL item") private Long id; - @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "the protocol for the ACL rule. Valid values are TCP/UDP/ICMP/ALL or valid protocol number") + @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "The protocol for the ACL rule. Valid values are TCP/UDP/ICMP/ALL or valid protocol number") private String protocol; - @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "the starting port of ACL") + @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "The starting port of ACL") private Integer publicStartPort; - @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "the ending port of ACL") + @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "The ending port of ACL") private Integer publicEndPort; - @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "the cidr list to allow traffic from/to. Multiple entries must be separated by a single comma character (,).") + @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "The CIDR list to allow traffic from/to. Multiple entries must be separated by a single comma character (,).") private List cidrlist; - @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "type of the ICMP message being sent") + @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "Type of the ICMP message being sent") private Integer icmpType; - @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "error code for this ICMP message") + @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "Error code for this ICMP message") private Integer icmpCode; - @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "the traffic type for the ACL, can be Ingress or Egress, defaulted to Ingress if not specified") + @Parameter(name = ApiConstants.TRAFFIC_TYPE, type = CommandType.STRING, description = "The traffic type for the ACL, can be Ingress or Egress, defaulted to Ingress if not specified") private String trafficType; - @Parameter(name = ApiConstants.NUMBER, type = CommandType.INTEGER, description = "The network of the vm the ACL will be created for") + @Parameter(name = ApiConstants.NUMBER, type = CommandType.INTEGER, description = "The Network of the Instance the ACL will be created for") private Integer number; - @Parameter(name = ApiConstants.ACTION, type = CommandType.STRING, description = "scl entry action, allow or deny") + @Parameter(name = ApiConstants.ACTION, type = CommandType.STRING, description = "ACL entry action, allow or deny") private String action; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the rule to the end user or not", since = "4.4", authorized = { + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the rule to the end User or not", since = "4.4", authorized = { RoleType.Admin}) private Boolean display; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/UpdateNetworkACLListCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/UpdateNetworkACLListCmd.java index adab885542d1..fa29ed44b701 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/UpdateNetworkACLListCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/UpdateNetworkACLListCmd.java @@ -31,17 +31,17 @@ import com.cloud.network.vpc.NetworkACL; import com.cloud.user.Account; -@APICommand(name = "updateNetworkACLList", description = "Updates network ACL list", responseObject = SuccessResponse.class, since = "4.4", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) +@APICommand(name = "updateNetworkACLList", description = "Updates Network ACL list", responseObject = SuccessResponse.class, since = "4.4", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdateNetworkACLListCmd extends BaseAsyncCustomIdCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkACLResponse.class, required = true, description = "the ID of the network ACL") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = NetworkACLResponse.class, required = true, description = "The ID of the network ACL") private Long id; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the list to the end user or not", since = "4.4", authorized = { + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the list to the end User or not", since = "4.4", authorized = { RoleType.Admin}) private Boolean display; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java index 0d92a635e7f9..2e638f1e2f76 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/UpdateNetworkCmd.java @@ -39,7 +39,7 @@ import com.cloud.network.Network; import com.cloud.offering.NetworkOffering; -@APICommand(name = "updateNetwork", description = "Updates a network", responseObject = NetworkResponse.class, responseView = ResponseView.Restricted, entityType = {Network.class}, +@APICommand(name = "updateNetwork", description = "Updates a Network", responseObject = NetworkResponse.class, responseView = ResponseView.Restricted, entityType = {Network.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdateNetworkCmd extends BaseAsyncCustomIdCmd implements UserCmd { @@ -50,33 +50,33 @@ public class UpdateNetworkCmd extends BaseAsyncCustomIdCmd implements UserCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = NetworkResponse.class, - required=true, description="the ID of the network") + required=true, description = "The ID of the network") protected Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the new name for the network") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The new name for the network") private String name; - @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "the new display text for the network") + @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The new display text for the network") private String displayText; - @Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, description = "network domain") + @Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, description = "Network domain") private String networkDomain; @Parameter(name = ApiConstants.CHANGE_CIDR, type = CommandType.BOOLEAN, description = "Force update even if CIDR type is different") private Boolean changeCidr; - @Parameter(name = ApiConstants.NETWORK_OFFERING_ID, type = CommandType.UUID, entityType = NetworkOfferingResponse.class, description = "network offering ID") + @Parameter(name = ApiConstants.NETWORK_OFFERING_ID, type = CommandType.UUID, entityType = NetworkOfferingResponse.class, 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; - @Parameter(name =ApiConstants.UPDATE_IN_SEQUENCE, type=CommandType.BOOLEAN, description = "if true, we will update the routers one after the other. applicable only for redundant router based networks using virtual router as provider") + @Parameter(name =ApiConstants.UPDATE_IN_SEQUENCE, type=CommandType.BOOLEAN, description = "If true, we will update the routers one after the other. applicable only for redundant router based networks using virtual router as provider") private Boolean updateInSequence; @Parameter(name = ApiConstants.DISPLAY_NETWORK, type = CommandType.BOOLEAN, - description = "an optional field, whether to the display the network to the end user or not.", authorized = {RoleType.Admin}) + description = "An optional field, whether to the display the network to the end User or not.", authorized = {RoleType.Admin}) private Boolean displayNetwork; @Parameter(name= ApiConstants.FORCED, type = CommandType.BOOLEAN, description = "Setting this to true will cause a forced network update,", authorized = {RoleType.Admin}) @@ -90,16 +90,16 @@ public class UpdateNetworkCmd extends BaseAsyncCustomIdCmd implements UserCmd { description = "MTU to be configured on the network VR's public facing interfaces", since = "4.18.0") private Integer privateMtu; - @Parameter(name = ApiConstants.DNS1, type = CommandType.STRING, description = "the first IPv4 DNS for the network. Empty string will update the first IPv4 DNS with the value from the zone", since = "4.18.0") + @Parameter(name = ApiConstants.DNS1, type = CommandType.STRING, description = "The first IPv4 DNS for the network. Empty string will update the first IPv4 DNS with the value from the zone", since = "4.18.0") private String ip4Dns1; - @Parameter(name = ApiConstants.DNS2, type = CommandType.STRING, description = "the second IPv4 DNS for the network. Empty string will update the second IPv4 DNS with the value from the zone", since = "4.18.0") + @Parameter(name = ApiConstants.DNS2, type = CommandType.STRING, description = "The second IPv4 DNS for the network. Empty string will update the second IPv4 DNS with the value from the zone", since = "4.18.0") private String ip4Dns2; - @Parameter(name = ApiConstants.IP6_DNS1, type = CommandType.STRING, description = "the first IPv6 DNS for the network. Empty string will update the first IPv6 DNS with the value from the zone", since = "4.18.0") + @Parameter(name = ApiConstants.IP6_DNS1, type = CommandType.STRING, description = "The first IPv6 DNS for the network. Empty string will update the first IPv6 DNS with the value from the zone", since = "4.18.0") private String ip6Dns1; - @Parameter(name = ApiConstants.IP6_DNS2, type = CommandType.STRING, description = "the second IPv6 DNS for the network. Empty string will update the second IPv6 DNS with the value from the zone", since = "4.18.0") + @Parameter(name = ApiConstants.IP6_DNS2, type = CommandType.STRING, description = "The second IPv6 DNS for the network. Empty string will update the second IPv6 DNS with the value from the zone", since = "4.18.0") private String ip6Dns2; @Parameter(name = ApiConstants.SOURCE_NAT_IP, type = CommandType.STRING, description = "IPV4 address to be assigned to the public interface of the network router. This address must already be acquired for this network", since = "4.19") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/network/routing/CreateRoutingFirewallRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/network/routing/CreateRoutingFirewallRuleCmd.java index 7146d1ae1d19..ad52916c7a92 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/network/routing/CreateRoutingFirewallRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/network/routing/CreateRoutingFirewallRuleCmd.java @@ -250,7 +250,7 @@ public void execute() throws ResourceUnavailableException { } ruleResponse.setResponseName(getCommandName()); } catch (Exception ex) { - logger.error("Got exception when create Routing firewall rules: " + ex); + logger.error("Got exception when create Routing firewall rules: ", ex); } finally { if (!success || rule == null) { routedIpv4Manager.revokeRoutingFirewallRule(getEntityId()); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/offering/ListDiskOfferingsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/offering/ListDiskOfferingsCmd.java index f9b9ec59a400..c7343b95dd6b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/offering/ListDiskOfferingsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/offering/ListDiskOfferingsCmd.java @@ -45,13 +45,13 @@ public class ListDiskOfferingsCmd extends BaseListProjectAndAccountResourcesCmd @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = DiskOfferingResponse.class, description = "ID of the disk offering") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "name of the disk offering") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Name of the disk offering") private String diskOfferingName; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - description = "id of zone disk offering is associated with", + description = "ID of zone disk offering is associated with", since = "4.13") private Long zoneId; @@ -61,7 +61,7 @@ public class ListDiskOfferingsCmd extends BaseListProjectAndAccountResourcesCmd @Parameter(name = ApiConstants.STORAGE_ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, description = "The ID of the storage pool, tags of the storage pool are used to filter the offerings", since = "4.17") private Long storagePoolId; - @Parameter(name = ApiConstants.ENCRYPT, type = CommandType.BOOLEAN, description = "listed offerings support disk encryption", since = "4.18") + @Parameter(name = ApiConstants.ENCRYPT, type = CommandType.BOOLEAN, description = "Listed offerings support disk encryption", since = "4.18") private Boolean encrypt; @Parameter(name = ApiConstants.STORAGE_TYPE, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/offering/ListServiceOfferingsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/offering/ListServiceOfferingsCmd.java index 3b693fe57b7e..5c5c8776bce3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/offering/ListServiceOfferingsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/offering/ListServiceOfferingsCmd.java @@ -45,51 +45,51 @@ public class ListServiceOfferingsCmd extends BaseListProjectAndAccountResourcesC @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ServiceOfferingResponse.class, description = "ID of the service offering") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "name of the service offering") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Name of the service offering") private String serviceOfferingName; @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, - description = "the ID of the virtual machine. Pass this in if you want to see the available service offering that a virtual machine can be changed to.") + description = "The ID of the Instance. Pass this in if you want to see the available service offering that an Instance can be changed to.") private Long virtualMachineId; - @Parameter(name=ApiConstants.IS_SYSTEM_OFFERING, type=CommandType.BOOLEAN, description="is this a system vm offering") + @Parameter(name=ApiConstants.IS_SYSTEM_OFFERING, type=CommandType.BOOLEAN, description = " Is this a System VM offering") private Boolean isSystem; @Parameter(name = ApiConstants.SYSTEM_VM_TYPE, type = CommandType.STRING, - description = "the system VM type. Possible types are \"consoleproxy\", \"secondarystoragevm\" or \"domainrouter\".") + description = "The system Instance type. Possible types are \"consoleproxy\", \"secondarystoragevm\" or \"domainrouter\".") private String systemVmType; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - description = "id of zone disk offering is associated with", + description = "ID of zone disk offering is associated with", since = "4.13") private Long zoneId; @Parameter(name = ApiConstants.CPU_NUMBER, type = CommandType.INTEGER, - description = "the CPU number that listed offerings must support", + description = "The CPU number that listed offerings must support", since = "4.15") private Integer cpuNumber; @Parameter(name = ApiConstants.MEMORY, type = CommandType.INTEGER, - description = "the RAM memory that listed offering must support", + description = "The RAM memory that listed offering must support", since = "4.15") private Integer memory; @Parameter(name = ApiConstants.CPU_SPEED, type = CommandType.INTEGER, - description = "the CPU speed that listed offerings must support", + description = "The CPU speed that listed offerings must support", since = "4.15") private Integer cpuSpeed; @Parameter(name = ApiConstants.ENCRYPT_ROOT, type = CommandType.BOOLEAN, - description = "listed offerings support root disk encryption", + description = "Listed offerings support root disk encryption", since = "4.18") private Boolean encryptRoot; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/project/ActivateProjectCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/project/ActivateProjectCmd.java index 42e045d4389f..228afb5a1862 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/project/ActivateProjectCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/project/ActivateProjectCmd.java @@ -42,7 +42,7 @@ public class ActivateProjectCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "id of the project to be modified") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "ID of the project to be modified") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/project/CreateProjectCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/project/CreateProjectCmd.java index cb93729381a4..2d0e92d47d4f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/project/CreateProjectCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/project/CreateProjectCmd.java @@ -44,20 +44,20 @@ public class CreateProjectCmd extends BaseAsyncCreateCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "account who will be Admin for the project") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Account who will be Admin for the project") private String accountName; @Parameter(name = ApiConstants.USER_ID, type = CommandType.UUID, entityType = UserResponse.class, - description = "user ID of the account to be assigned as owner of the project i.e., Project Admin", since = "4.15.0") + description = "User ID of the Account to be assigned as owner of the project i.e., Project Admin", since = "4.15.0") private Long userId; - @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "domain ID of the account owning a project") + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Domain ID of the Account owning a project") private Long domainId; - @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "ID of the account owning a project") + @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, description = "ID of the Account owning a project") private Long accountId; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "name of the project") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "Name of the project") private String name; @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The display text of the project, defaults to the 'name´.") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/project/DeleteProjectCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/project/DeleteProjectCmd.java index 1fd205fdae41..d4e2b8f56f91 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/project/DeleteProjectCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/project/DeleteProjectCmd.java @@ -42,10 +42,10 @@ public class DeleteProjectCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "id of the project to be deleted") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "ID of the project to be deleted") private Long id; - @Parameter(name = ApiConstants.CLEANUP, type = CommandType.BOOLEAN, since = "4.16.0", description = "true if all project resources have to be cleaned up, false otherwise") + @Parameter(name = ApiConstants.CLEANUP, type = CommandType.BOOLEAN, since = "4.16.0", description = "True if all project resources have to be cleaned up, false otherwise") private Boolean cleanup; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/project/DeleteProjectInvitationCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/project/DeleteProjectInvitationCmd.java index d1b17eda76b1..7fe2c3c4abc6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/project/DeleteProjectInvitationCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/project/DeleteProjectInvitationCmd.java @@ -37,7 +37,7 @@ public class DeleteProjectInvitationCmd extends BaseAsyncCmd { // /////////////////////////////////////////////////// // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectInvitationResponse.class, required = true, description = "id of the invitation") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectInvitationResponse.class, required = true, description = "ID of the invitation") private Long id; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/project/ListProjectInvitationsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/project/ListProjectInvitationsCmd.java index 210394ec2ddf..679ba863b10a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/project/ListProjectInvitationsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/project/ListProjectInvitationsCmd.java @@ -37,21 +37,21 @@ public class ListProjectInvitationsCmd extends BaseListAccountResourcesCmd { // /////////////////////////////////////////////////// // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "list by project id") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "List by project ID") private Long projectId; @Parameter(name = ApiConstants.ACTIVE_ONLY, type = CommandType.BOOLEAN, - description = "if true, list only active invitations - having Pending state and ones that are not timed out yet") + description = "If true, list only active invitations - having Pending state and ones that are not timed out yet") private boolean activeOnly; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "list invitations by state") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "List invitations by state") private String state; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectInvitationResponse.class, description = "list invitations by id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectInvitationResponse.class, description = "List invitations by ID") private Long id; - @Parameter(name = ApiConstants.USER_ID, type = CommandType.UUID, entityType = UserResponse.class, description = "list invitation by user ID") + @Parameter(name = ApiConstants.USER_ID, type = CommandType.UUID, entityType = UserResponse.class, description = "List invitation by user ID") private Long userId; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/project/ListProjectsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/project/ListProjectsCmd.java index d4679dbe0578..2f65429aca6a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/project/ListProjectsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/project/ListProjectsCmd.java @@ -48,16 +48,16 @@ public class ListProjectsCmd extends BaseListAccountResourcesCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "list projects by project ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "List projects by project ID") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list projects by name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "List projects by name") private String name; - @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "list projects by display text") + @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "List projects by display text") private String displayText; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "list projects by state") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "List projects by state") private String state; @Parameter(name = ApiConstants.TAGS, type = CommandType.MAP, description = "List projects by tags (key/value pairs)") @@ -69,11 +69,11 @@ public class ListProjectsCmd extends BaseListAccountResourcesCmd { @Parameter(name = ApiConstants.DETAILS, type = CommandType.LIST, collectionType = CommandType.STRING, - description = "comma separated list of project details requested, value can be a list of [ all, resource, min]") + description = "Comma separated list of project details requested, value can be a list of [ all, resource, min]") private List viewDetails; @Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN, - description = "flag to display the resource icon for projects") + description = "Flag to display the resource icon for projects") private Boolean showIcon; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/project/SuspendProjectCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/project/SuspendProjectCmd.java index a3eee8c80bb7..7850e7bf694b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/project/SuspendProjectCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/project/SuspendProjectCmd.java @@ -43,7 +43,7 @@ public class SuspendProjectCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "id of the project to be suspended") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "ID of the project to be suspended") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/project/UpdateProjectCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/project/UpdateProjectCmd.java index 4fabf7da788c..e38f9417e8a8 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/project/UpdateProjectCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/project/UpdateProjectCmd.java @@ -45,27 +45,27 @@ public class UpdateProjectCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "id of the project to be modified") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "ID of the project to be modified") private Long id; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "new Admin account for the project") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "New Admin Account for the project") private String accountName; - @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "display text of the project") + @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "Display text of the project") private String displayText; - @Parameter(name = ApiConstants.USER_ID, type = CommandType.UUID, entityType = UserResponse.class, description = "ID of the user to be promoted/demoted") + @Parameter(name = ApiConstants.USER_ID, type = CommandType.UUID, entityType = UserResponse.class, description = "ID of the User to be promoted/demoted") private Long userId; - @Parameter(name = ApiConstants.ROLE_TYPE, type = CommandType.STRING, description = "Account level role to be assigned to the user/account : Admin/Regular") + @Parameter(name = ApiConstants.ROLE_TYPE, type = CommandType.STRING, description = "Account level role to be assigned to the User/Account : Admin/Regular") private String roleType; - @Parameter(name = ApiConstants.SWAP_OWNER, type = CommandType.BOOLEAN, description = "when true, it swaps ownership with the account/ user provided. " + + @Parameter(name = ApiConstants.SWAP_OWNER, type = CommandType.BOOLEAN, description = "When true, it swaps ownership with the Account/User provided. " + "Ideally to be used when a single project administrator is present. In case of multiple project admins, swapowner is to be set to false," + "to promote or demote the user/account based on the roleType (Regular or Admin) provided. Defaults to true") private Boolean swapOwner; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "name of the project", since = "4.19.0") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Name of the project", since = "4.19.0") private String name; ///////////////////////////////////////////////////// @@ -135,8 +135,8 @@ public List getEntityOwnerIds() { public void execute() throws ResourceAllocationException { CallContext.current().setEventDetails("Project id: " + getId()); if (getAccountName() != null && getUserId() != null) { - throw new InvalidParameterValueException("Account name and user ID are mutually exclusive. Provide either account name" + - "to update account or user ID to update the user of the project"); + throw new InvalidParameterValueException("Account name and User ID are mutually exclusive. Provide either Account name" + + "to update Account or user ID to update the user of the project"); } Project project = null; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/project/UpdateProjectInvitationCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/project/UpdateProjectInvitationCmd.java index 0cbd9f702c27..a8a6fb802fbf 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/project/UpdateProjectInvitationCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/project/UpdateProjectInvitationCmd.java @@ -38,10 +38,10 @@ public class UpdateProjectInvitationCmd extends BaseAsyncCmd { // /////////////////////////////////////////////////// // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "id of the project to join") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, required = true, description = "ID of the project to join") private Long projectId; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "account that is joining the project") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "Account that is joining the project") private String accountName; @Parameter(name = ApiConstants.USER_ID, type = BaseCmd.CommandType.UUID, entityType = UserResponse.class, @@ -50,10 +50,10 @@ public class UpdateProjectInvitationCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.TOKEN, type = CommandType.STRING, - description = "list invitations for specified account; this parameter has to be specified with domainId") + description = "List invitations for specified account; this parameter has to be specified with domainId") private String token; - @Parameter(name = ApiConstants.ACCEPT, type = CommandType.BOOLEAN, description = "if true, accept the invitation, decline if false. True by default") + @Parameter(name = ApiConstants.ACCEPT, type = CommandType.BOOLEAN, description = "If true, accept the invitation, decline if false. True by default") private Boolean accept; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java index 649b2a7bd9bc..1cda9ab2757d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/AssignToGlobalLoadBalancerRuleCmd.java @@ -62,7 +62,7 @@ public class AssignToGlobalLoadBalancerRuleCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = GlobalLoadBalancerResponse.class, required = true, - description = "the ID of the global load balancer rule") + description = "The ID of the global load balancer rule") private Long id; @Parameter(name = ApiConstants.LOAD_BALANCER_RULE_LIST, @@ -70,7 +70,7 @@ public class AssignToGlobalLoadBalancerRuleCmd extends BaseAsyncCmd { collectionType = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, - description = "the list load balancer rules that will be assigned to global load balancer rule") + description = "The list load balancer rules that will be assigned to global load balancer rule") private List loadBalancerRulesIds; @Parameter(name = ApiConstants.GSLB_LBRULE_WEIGHT_MAP, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java index ddaadde78524..df9b6b318651 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/CreateGlobalLoadBalancerRuleCmd.java @@ -47,41 +47,41 @@ public class CreateGlobalLoadBalancerRuleCmd extends BaseAsyncCreateCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "name of the load balancer rule") + @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) + @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.") + 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.") + 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") + @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) " + 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") + 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.") + @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, http)") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java index 7f3308614ccf..6053a11cf711 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/DeleteGlobalLoadBalancerRuleCmd.java @@ -50,7 +50,7 @@ public class DeleteGlobalLoadBalancerRuleCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = GlobalLoadBalancerResponse.class, required = true, - description = "the ID of the global load balancer rule") + description = "The ID of the global load balancer rule") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/ListGlobalLoadBalancerRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/ListGlobalLoadBalancerRuleCmd.java index bf0cf22a2ecb..a4bd027fc976 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/ListGlobalLoadBalancerRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/ListGlobalLoadBalancerRuleCmd.java @@ -43,10 +43,10 @@ public class ListGlobalLoadBalancerRuleCmd extends BaseListTaggedResourcesCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = GlobalLoadBalancerResponse.class, description = "the ID of the global load balancer rule") + @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") + @Parameter(name = ApiConstants.REGION_ID, type = CommandType.INTEGER, entityType = RegionResponse.class, description = "Region ID") private Integer regionId; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/RemoveFromGlobalLoadBalancerRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/RemoveFromGlobalLoadBalancerRuleCmd.java index d4b02139892c..eb72cad86f29 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/RemoveFromGlobalLoadBalancerRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/RemoveFromGlobalLoadBalancerRuleCmd.java @@ -65,7 +65,7 @@ public class RemoveFromGlobalLoadBalancerRuleCmd extends BaseAsyncCmd { collectionType = CommandType.UUID, entityType = FirewallRuleResponse.class, required = true, - description = "the list load balancer rules that will be assigned to global load balancer rule") + description = "The list load balancer rules that will be assigned to global load balancer rule") private List loadBalancerRulesIds; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/UpdateGlobalLoadBalancerRuleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/UpdateGlobalLoadBalancerRuleCmd.java index 7996998e5d92..7ccf62a293af 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/UpdateGlobalLoadBalancerRuleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/region/ha/gslb/UpdateGlobalLoadBalancerRuleCmd.java @@ -33,7 +33,7 @@ import com.cloud.region.ha.GlobalLoadBalancingRulesService; import com.cloud.user.Account; -@APICommand(name = "updateGlobalLoadBalancerRule", description = "update global load balancer rules.", responseObject = GlobalLoadBalancerResponse.class, +@APICommand(name = "updateGlobalLoadBalancerRule", description = "Update global load balancer rules.", responseObject = GlobalLoadBalancerResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdateGlobalLoadBalancerRuleCmd extends BaseAsyncCmd { @@ -46,23 +46,23 @@ public class UpdateGlobalLoadBalancerRuleCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = GlobalLoadBalancerResponse.class, required = true, - description = "the ID of the global load balancer rule") + 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) + @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) " + 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") + description = "Session sticky method (sourceip) if not specified defaults to sourceip") private String stickyMethod; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/resource/GetCloudIdentifierCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/resource/GetCloudIdentifierCmd.java index b9e43336217d..04b0ccc4cb07 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/resource/GetCloudIdentifierCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/resource/GetCloudIdentifierCmd.java @@ -42,7 +42,7 @@ public class GetCloudIdentifierCmd extends BaseCmd { type = CommandType.UUID, entityType = UserResponse.class, required = true, - description = "the user ID for the cloud identifier") + description = "The user ID for the cloud identifier") private Long userid; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/resource/ListDetailOptionsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/resource/ListDetailOptionsCmd.java index 240852a74c52..273f931fa23c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/resource/ListDetailOptionsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/resource/ListDetailOptionsCmd.java @@ -28,7 +28,7 @@ import org.apache.commons.lang3.StringUtils; @APICommand(name = "listDetailOptions", - description = "Lists all possible details and their options for a resource type such as a VM or a template", + description = "Lists all possible details and their options for a resource type such as an Instance or a Template", responseObject = DetailOptionsResponse.class, since = "4.13", requestHasSensitiveInfo = false, @@ -41,11 +41,11 @@ public class ListDetailOptionsCmd extends BaseCmd { ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.RESOURCE_TYPE, type = CommandType.STRING, required = true, - description = "the resource type such as UserVm, Template etc.") + description = "The resource type such as UserVm, Template etc.") private String resourceType; @Parameter(name = ApiConstants.RESOURCE_ID, type = CommandType.STRING, - description = "the UUID of the resource (optional)") + description = "The UUID of the resource (optional)") private String resourceId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/resource/ListHypervisorsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/resource/ListHypervisorsCmd.java index 556f3b081f02..70d339abd6f2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/resource/ListHypervisorsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/resource/ListHypervisorsCmd.java @@ -38,7 +38,7 @@ public class ListHypervisorsCmd extends BaseCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the zone id for listing hypervisors.") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The zone id for listing hypervisors.") private Long zoneId; // /////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/resource/ListResourceLimitsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/resource/ListResourceLimitsCmd.java index 71b886ed12b6..7bae74c73a46 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/resource/ListResourceLimitsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/resource/ListResourceLimitsCmd.java @@ -43,11 +43,11 @@ public class ListResourceLimitsCmd extends BaseListProjectAndAccountResourcesCmd private Long id; @Parameter(name = ApiConstants.RESOURCE_TYPE, type = CommandType.INTEGER, description = "Type of resource. Values are 0, 1, 2, 3, 4, 6, 7, 8, 9, 10 and 11. " - + "0 - Instance. Number of instances a user can create. " + + "0 - Instance. Number of Instances a user can create. " + "1 - IP. Number of public IP addresses an account can own. " + "2 - Volume. Number of disk volumes an account can own. " - + "3 - Snapshot. Number of snapshots an account can own. " - + "4 - Template. Number of templates an account can register/create. " + + "3 - Snapshot. Number of Snapshots an account can own. " + + "4 - Template. Number of Templates an account can register/create. " + "5 - Project. Number of projects an account can own. " + "6 - Network. Number of networks an account can own. " + "7 - VPC. Number of VPC an account can own. " @@ -58,11 +58,11 @@ public class ListResourceLimitsCmd extends BaseListProjectAndAccountResourcesCmd private Integer resourceType; @Parameter(name = ApiConstants.RESOURCE_TYPE_NAME, type = CommandType.STRING, description = "Type of resource (wins over resourceType if both are provided). Values are: " - + "user_vm - Instance. Number of instances a user can create. " + + "user_vm - Instance. Number of Instances a user can create. " + "public_ip - IP. Number of public IP addresses an account can own. " + "volume - Volume. Number of disk volumes an account can own. " - + "snapshot - Snapshot. Number of snapshots an account can own. " - + "template - Template. Number of templates an account can register/create. " + + "snapshot - Snapshot. Number of Snapshots an account can own. " + + "template - Template. Number of Templates an account can register/create. " + "project - Project. Number of projects an account can own. " + "network - Network. Number of networks an account can own. " + "vpc - VPC. Number of VPC an account can own. " diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/resource/UpdateResourceCountCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/resource/UpdateResourceCountCmd.java index 49c6ee605c8c..123b0e48a74c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/resource/UpdateResourceCountCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/resource/UpdateResourceCountCmd.java @@ -61,11 +61,11 @@ public class UpdateResourceCountCmd extends BaseCmd { @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. " + + "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. " + + "3 - Snapshot. Number of Snapshots a user can 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. " diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/resource/UpdateResourceLimitCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/resource/UpdateResourceLimitCmd.java index 3538a389a6e9..3678e885a6ea 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/resource/UpdateResourceLimitCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/resource/UpdateResourceLimitCmd.java @@ -57,13 +57,13 @@ public class UpdateResourceLimitCmd extends BaseCmd { 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. " + + "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. " - + "5 - Project. Number of projects a user can create. " - + "6 - Network. Number of guest network a user can create. " + + "3 - Snapshot. Number of Snapshots a user can create. " + + "4 - Template. Number of Templates that a user can register/create. " + + "5 - Project. Number of Projects 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. " diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupEgressCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupEgressCmd.java index 13faafe348c0..13b09c7e19ac 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupEgressCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupEgressCmd.java @@ -58,43 +58,43 @@ public class AuthorizeSecurityGroupEgressCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "TCP is default. UDP is the other supported protocol") private String protocol; - @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "start port for this egress rule") + @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "Start port for this egress rule") private Integer startPort; - @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "end port for this egress rule") + @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "End port for this egress rule") private Integer endPort; - @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "type of the icmp message being sent") + @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "Type of the ICMP message being sent") private Integer icmpType; - @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "error code for this icmp message") + @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "Error code for this icmp message") private Integer icmpCode; - @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "the cidr list associated. Multiple entries must be separated by a single comma character (,).") + @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "The CIDR list associated. Multiple entries must be separated by a single comma character (,).") private List cidrList; - @Parameter(name = ApiConstants.USER_SECURITY_GROUP_LIST, type = CommandType.MAP, description = "user to security group mapping") + @Parameter(name = ApiConstants.USER_SECURITY_GROUP_LIST, type = CommandType.MAP, description = "User to security group mapping") private Map userSecurityGroupList; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, - description = "an optional domainId for the security group. If the account parameter is used, domainId must also be used.", + description = "An optional domainId for the security group. If the account parameter is used, domainId must also be used.", entityType = DomainResponse.class) private Long domainId; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the security group. Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional account for the security group. Must be used with domainId.") private String accountName; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, description = "an optional project of the security group", entityType = ProjectResponse.class) + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, description = "An optional project of the security group", entityType = ProjectResponse.class) private Long projectId; @ACL(accessType = AccessType.OperateEntry) - @Parameter(name=ApiConstants.SECURITY_GROUP_ID, type=CommandType.UUID, description="The ID of the security group. Mutually exclusive with securityGroupName parameter", entityType=SecurityGroupResponse.class) + @Parameter(name=ApiConstants.SECURITY_GROUP_ID, type=CommandType.UUID, description = "The ID of the security group. Mutually exclusive with securityGroupName parameter", entityType=SecurityGroupResponse.class) private Long securityGroupId; // This @ACL will not work, since we don't have a way to convert this parameter to the entity like securityGroupId. //@ACL(accessType = AccessType.OperateEntry) - @Parameter(name=ApiConstants.SECURITY_GROUP_NAME, type=CommandType.STRING, description="The name of the security group. Mutually exclusive with securityGroupId parameter") + @Parameter(name=ApiConstants.SECURITY_GROUP_NAME, type=CommandType.STRING, description = "The name of the security group. Mutually exclusive with securityGroupId parameter") private String securityGroupName; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupIngressCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupIngressCmd.java index 640870fc3de3..07a4df9eb5d9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupIngressCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/AuthorizeSecurityGroupIngressCmd.java @@ -55,46 +55,46 @@ public class AuthorizeSecurityGroupIngressCmd extends BaseAsyncCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "the protocol for the ACL rule. Valid values are TCP/UDP/ICMP/ALL or valid protocol number (see /etc/protocols). ALL is default.") + @Parameter(name = ApiConstants.PROTOCOL, type = CommandType.STRING, description = "The protocol for the ACL rule. Valid values are TCP/UDP/ICMP/ALL or valid protocol number (see /etc/protocols). ALL is default.") private String protocol; - @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "start port for this ingress rule") + @Parameter(name = ApiConstants.START_PORT, type = CommandType.INTEGER, description = "Start port for this ingress rule") private Integer startPort; - @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "end port for this ingress rule") + @Parameter(name = ApiConstants.END_PORT, type = CommandType.INTEGER, description = "End port for this ingress rule") private Integer endPort; - @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "type of the icmp message being sent") + @Parameter(name = ApiConstants.ICMP_TYPE, type = CommandType.INTEGER, description = "Type of the icmp message being sent") private Integer icmpType; - @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "error code for this icmp message") + @Parameter(name = ApiConstants.ICMP_CODE, type = CommandType.INTEGER, description = "Error code for this icmp message") private Integer icmpCode; - @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "the cidr list associated. Multiple entries must be separated by a single comma character (,).") + @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.LIST, collectionType = CommandType.STRING, description = "The cidr list associated. Multiple entries must be separated by a single comma character (,).") private List cidrList; - @Parameter(name = ApiConstants.USER_SECURITY_GROUP_LIST, type = CommandType.MAP, description = "user to security group mapping") + @Parameter(name = ApiConstants.USER_SECURITY_GROUP_LIST, type = CommandType.MAP, description = "User to security group mapping") private Map userSecurityGroupList; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, - description = "an optional domainId for the security group. If the account parameter is used, domainId must also be used.", + description = "An optional domainId for the security group. If the account parameter is used, domainId must also be used.", entityType = DomainResponse.class) private Long domainId; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the security group. Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional account for the security group. Must be used with domainId.") private String accountName; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, description = "an optional project of the security group", entityType = ProjectResponse.class) + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, description = "An optional project of the security group", entityType = ProjectResponse.class) private Long projectId; @ACL(accessType = AccessType.OperateEntry) - @Parameter(name=ApiConstants.SECURITY_GROUP_ID, type=CommandType.UUID, description="The ID of the security group. Mutually exclusive with securityGroupName parameter", entityType=SecurityGroupResponse.class) + @Parameter(name=ApiConstants.SECURITY_GROUP_ID, type=CommandType.UUID, description = "The ID of the security group. Mutually exclusive with securityGroupName parameter", entityType=SecurityGroupResponse.class) private Long securityGroupId; // This @ACL will not work, since we don't have a way to convert this parameter to the entity like securityGroupId. //@ACL(accessType = AccessType.OperateEntry) - @Parameter(name=ApiConstants.SECURITY_GROUP_NAME, type=CommandType.STRING, description="The name of the security group. Mutually exclusive with securityGroupId parameter") + @Parameter(name=ApiConstants.SECURITY_GROUP_NAME, type=CommandType.STRING, description = "The name of the security group. Mutually exclusive with securityGroupId parameter") private String securityGroupName; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/CreateSecurityGroupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/CreateSecurityGroupCmd.java index 673eaaef33da..333dc9ff7482 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/CreateSecurityGroupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/CreateSecurityGroupCmd.java @@ -40,19 +40,19 @@ public class CreateSecurityGroupCmd extends BaseCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the security group. Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional account for the security group. Must be used with domainId.") private String accountName; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, - description = "an optional domainId for the security group. If the account parameter is used, domainId must also be used.", + description = "An optional domainId for the security group. If the account parameter is used, domainId must also be used.", entityType = DomainResponse.class) private Long domainId; - @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "the description of the security group") + @Parameter(name = ApiConstants.DESCRIPTION, type = CommandType.STRING, description = "The description of the security group") private String description; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "name of the security group") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "Name of the security group") private String securityGroupName; @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, description = "Create security group for project", entityType = ProjectResponse.class) diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/DeleteSecurityGroupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/DeleteSecurityGroupCmd.java index b2ea90792b8e..0636f03c92a3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/DeleteSecurityGroupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/DeleteSecurityGroupCmd.java @@ -43,20 +43,20 @@ public class DeleteSecurityGroupCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "the account of the security group. Must be specified with domain ID") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "The account of the security 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 security group", + description = "The domain ID of account owning the security group", entityType = DomainResponse.class) private Long domainId; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, description = "the project of the security group", entityType = ProjectResponse.class) + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, description = "The project of the security group", entityType = ProjectResponse.class) private Long projectId; @ACL(accessType = AccessType.OperateEntry) - @Parameter(name=ApiConstants.ID, type=CommandType.UUID, description="The ID of the security group. Mutually exclusive with name parameter", entityType=SecurityGroupResponse.class) + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, description = "The ID of the security group. Mutually exclusive with name parameter", entityType=SecurityGroupResponse.class) private Long id; @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The ID of the security group. Mutually exclusive with id parameter") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/ListSecurityGroupsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/ListSecurityGroupsCmd.java index f93e7b39586b..0de3bd5bdb69 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/ListSecurityGroupsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/ListSecurityGroupsCmd.java @@ -37,16 +37,16 @@ public class ListSecurityGroupsCmd extends BaseListTaggedResourcesCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.SECURITY_GROUP_NAME, type = CommandType.STRING, description = "lists security groups by name") + @Parameter(name = ApiConstants.SECURITY_GROUP_NAME, type = CommandType.STRING, description = "Lists security groups by name") private String securityGroupName; @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, - description = "lists security groups by virtual machine id", + description = "Lists security groups by Instance id", entityType = UserVmResponse.class) private Long virtualMachineId; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, description = "list the security group by the id provided", entityType = SecurityGroupResponse.class) + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, description = "List the security group by the id provided", entityType = SecurityGroupResponse.class) private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/UpdateSecurityGroupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/UpdateSecurityGroupCmd.java index 801fb6ac5e51..ea756927b039 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/UpdateSecurityGroupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/securitygroup/UpdateSecurityGroupCmd.java @@ -42,7 +42,7 @@ public class UpdateSecurityGroupCmd extends BaseCustomIdCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, required=true, description="The ID of the security group.", entityType=SecurityGroupResponse.class) + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, required=true, description = "The ID of the security group.", entityType=SecurityGroupResponse.class) private Long id; @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The new name of the security group.") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/ArchiveSnapshotCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/ArchiveSnapshotCmd.java index f72de2278cc7..c6ed36ccef53 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/ArchiveSnapshotCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/ArchiveSnapshotCmd.java @@ -36,7 +36,7 @@ import org.apache.cloudstack.api.response.SuccessResponse; import org.apache.cloudstack.context.CallContext; -@APICommand(name = "archiveSnapshot", description = "Archives (moves) a snapshot on primary storage to secondary storage", +@APICommand(name = "archiveSnapshot", description = "Archives (moves) a Snapshot on primary storage to secondary storage", responseObject = SnapshotResponse.class, entityType = {Snapshot.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ArchiveSnapshotCmd extends BaseAsyncCmd { @@ -44,7 +44,7 @@ public class ArchiveSnapshotCmd extends BaseAsyncCmd { @ACL(accessType = SecurityChecker.AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = SnapshotResponse.class, - required=true, description="The ID of the snapshot") + required=true, description = "The ID of the Snapshot") private Long id; @Override @@ -54,7 +54,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Archiving snapshot " + id + " to secondary storage"; + return "Archiving Snapshot " + id + " to secondary storage"; } @Override @@ -65,7 +65,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to archive snapshot"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to archive Snapshot"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java index 60f3bbda8588..3a49bad8fcb9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotCmd.java @@ -49,7 +49,7 @@ import com.cloud.user.Account; import com.cloud.utils.exception.CloudRuntimeException; -@APICommand(name = "createSnapshot", description = "Creates an instant snapshot of a volume.", responseObject = SnapshotResponse.class, entityType = {Snapshot.class}, +@APICommand(name = "createSnapshot", description = "Creates an instant Snapshot of a volume.", responseObject = SnapshotResponse.class, entityType = {Snapshot.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateSnapshotCmd extends BaseAsyncCreateCmd { @@ -59,13 +59,13 @@ public class CreateSnapshotCmd extends BaseAsyncCreateCmd { @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, - description = "The account of the snapshot. The account parameter must be used with the domainId parameter.") + description = "The Account of the Snapshot. The Account parameter 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 of the snapshot. If used with the account parameter, specifies a domain for the account associated with the disk volume. If account is NOT provided then snapshot will be assigned to the caller account and domain.") + description = "The domain ID of the Snapshot. If used with the Account parameter, specifies a domain for the Account associated with the disk volume. If Account is NOT provided then snapshot will be assigned to the caller Account and domain.") private Long domainId; @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.UUID, entityType = VolumeResponse.class, required = true, description = "The ID of the disk volume") @@ -74,20 +74,20 @@ public class CreateSnapshotCmd extends BaseAsyncCreateCmd { @Parameter(name = ApiConstants.POLICY_ID, type = CommandType.UUID, entityType = SnapshotPolicyResponse.class, - description = "policy id of the snapshot, if this is null, then use MANUAL_POLICY.") + description = "Policy ID of the Snapshot, if this is null, then use MANUAL_POLICY.") private Long policyId; - @Parameter(name = ApiConstants.SNAPSHOT_QUIESCEVM, type = CommandType.BOOLEAN, required = false, description = "quiesce vm if true") + @Parameter(name = ApiConstants.SNAPSHOT_QUIESCEVM, type = CommandType.BOOLEAN, required = false, description = "Quiesce Instance if true") private Boolean quiescevm; @Parameter(name = ApiConstants.LOCATION_TYPE, type = CommandType.STRING, required = false, description = "Currently applicable only for managed storage. " + "Valid location types: 'primary', 'secondary'. Default = 'primary'.") private String locationType; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the snapshot") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the Snapshot") private String snapshotName; - @Parameter(name = ApiConstants.ASYNC_BACKUP, type = CommandType.BOOLEAN, required = false, description = "asynchronous backup if true") + @Parameter(name = ApiConstants.ASYNC_BACKUP, type = CommandType.BOOLEAN, required = false, description = "Asynchronous backup if true") private Boolean asyncBackup; @Parameter(name = ApiConstants.TAGS, type = CommandType.MAP, description = "Map of tags (key/value pairs)") @@ -213,7 +213,7 @@ public long getEntityOwnerId() { " as it's no longer active"); } } else if (account.getState() == Account.State.DISABLED) { - throw new PermissionDeniedException("The owner of template is disabled: " + account); + throw new PermissionDeniedException("The owner of Template is disabled: " + account); } return volume.getAccountId(); @@ -226,7 +226,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "creating snapshot for volume: " + getVolumeUuid(); + return "Creating Snapshot for volume: " + getVolumeUuid(); } @Override @@ -241,7 +241,7 @@ public void create() throws ResourceAllocationException { setEntityId(snapshot.getId()); setEntityUuid(snapshot.getUuid()); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create snapshot for volume" + getVolumeUuid()); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create Snapshot for volume" + getVolumeUuid()); } } @@ -261,10 +261,10 @@ public void execute() { } } catch (Exception e) { if (e.getCause() instanceof UnsupportedOperationException) { - throw new ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, String.format("Failed to create snapshot due to unsupported operation: %s", e.getCause().getMessage())); + throw new ServerApiException(ApiErrorCode.UNSUPPORTED_ACTION_ERROR, String.format("Failed to create Snapshot due to unsupported operation: %s", e.getCause().getMessage())); } - String errorMessage = "Failed to create snapshot due to an internal error creating snapshot for volume " + getVolumeUuid(); + String errorMessage = "Failed to create Snapshot due to an internal error creating Snapshot for volume " + getVolumeUuid(); logger.error(errorMessage, e); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, errorMessage); } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotFromVMSnapshotCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotFromVMSnapshotCmd.java index c99373688e5d..0dd275cb4ae2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotFromVMSnapshotCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotFromVMSnapshotCmd.java @@ -39,7 +39,7 @@ import com.cloud.uservm.UserVm; import com.cloud.vm.snapshot.VMSnapshot; -@APICommand(name = "createSnapshotFromVMSnapshot", description = "Creates an instant snapshot of a volume from existing vm snapshot.", responseObject = SnapshotResponse.class, entityType = {Snapshot.class}, since = "4.10.0", +@APICommand(name = "createSnapshotFromVMSnapshot", description = "Creates an instant Snapshot of a volume from existing Instance Snapshot.", responseObject = SnapshotResponse.class, entityType = {Snapshot.class}, since = "4.10.0", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateSnapshotFromVMSnapshotCmd extends BaseAsyncCreateCmd { @@ -51,10 +51,10 @@ public class CreateSnapshotFromVMSnapshotCmd extends BaseAsyncCreateCmd { private Long volumeId; @Parameter(name=ApiConstants.VM_SNAPSHOT_ID, type=CommandType.UUID, entityType=VMSnapshotResponse.class, - required=true, description="The ID of the VM snapshot") + required=true, description = "The ID of the Instance Snapshot") private Long vmSnapshotId; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the snapshot") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the Snapshot") private String snapshotName; private String syncObjectType = BaseAsyncCmd.snapshotHostSyncObject; @@ -78,18 +78,18 @@ public String getSnapshotName() { private Long getVmId() { VMSnapshot vmsnapshot = _entityMgr.findById(VMSnapshot.class, getVMSnapshotId()); if (vmsnapshot == null) { - throw new InvalidParameterValueException("Unable to find vm snapshot by id=" + getVMSnapshotId()); + throw new InvalidParameterValueException("Unable to find Instance Snapshot by id=" + getVMSnapshotId()); } UserVm vm = _entityMgr.findById(UserVm.class, vmsnapshot.getVmId()); if (vm == null) { - throw new InvalidParameterValueException("Unable to find vm by vm snapshot id=" + getVMSnapshotId()); + throw new InvalidParameterValueException("Unable to find Instance by Instance Snapshot id=" + getVMSnapshotId()); } return vm.getId(); } private Long getHostId() { VMSnapshot vmsnapshot = _entityMgr.findById(VMSnapshot.class, getVMSnapshotId()); if (vmsnapshot == null) { - throw new InvalidParameterValueException("Unable to find vm snapshot by id=" + getVMSnapshotId()); + throw new InvalidParameterValueException("Unable to find Instance Snapshot by id=" + getVMSnapshotId()); } UserVm vm = _entityMgr.findById(UserVm.class, vmsnapshot.getVmId()); if (vm != null) { @@ -124,13 +124,13 @@ public long getEntityOwnerId() { if (account.getType() == Account.Type.PROJECT) { Project project = _projectService.findByProjectAccountId(vmsnapshot.getAccountId()); if (project == null) { - throw new InvalidParameterValueException(String.format("Unable to find project by account %s", account)); + throw new InvalidParameterValueException(String.format("Unable to find project by Account %s", account)); } if (project.getState() != Project.State.Active) { throw new PermissionDeniedException(String.format("Can't add resources to the project %s in state=%s as it's no longer active", project, project.getState())); } } else if (account.getState() == Account.State.DISABLED) { - throw new PermissionDeniedException("The owner of template is disabled: " + account); + throw new PermissionDeniedException("The owner of Template is disabled: " + account); } return vmsnapshot.getAccountId(); @@ -143,7 +143,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "creating snapshot from vm snapshot : " + this._uuidMgr.getUuid(VMSnapshot.class, getVMSnapshotId()); + return "Creating Snapshot from Instance Snapshot : " + this._uuidMgr.getUuid(VMSnapshot.class, getVMSnapshotId()); } @Override @@ -158,15 +158,15 @@ public void create() throws ResourceAllocationException { this.setEntityId(snapshot.getId()); this.setEntityUuid(snapshot.getUuid()); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create snapshot from vm snapshot"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create Snapshot from Instance Snapshot"); } } @Override public void execute() { VMSnapshot vmSnapshot = _vmSnapshotService.getVMSnapshotById(getVMSnapshotId()); - logger.info("CreateSnapshotFromVMSnapshotCmd with vm snapshot {} with id {} and snapshot [id: {}, uuid: {}]", vmSnapshot, getVMSnapshotId(), getEntityId(), getEntityUuid()); - CallContext.current().setEventDetails("Vm Snapshot Id: " + vmSnapshot.getUuid()); + logger.info("CreateSnapshotFromVMSnapshotCmd with {} and Snapshot [ID: {}, UUID: {}]", vmSnapshot, getEntityId(), getEntityUuid()); + CallContext.current().setEventDetails("Instance Snapshot Id: " + vmSnapshot.getUuid()); Snapshot snapshot = null; try { snapshot = _snapshotService.backupSnapshotFromVmSnapshot(getEntityId(), getVmId(), getVolumeId(), getVMSnapshotId()); @@ -175,19 +175,19 @@ public void execute() { response.setResponseName(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, String.format("Failed to create snapshot due to an internal error creating snapshot from vm snapshot %s", vmSnapshot)); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, String.format("Failed to create Snapshot due to an internal error creating Snapshot from Instance Snapshot %s", vmSnapshot)); } } catch (InvalidParameterValueException ex) { throw ex; } catch (Exception e) { logger.debug("Failed to create snapshot", e); - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, String.format("Failed to create snapshot due to an internal error creating snapshot from vm snapshot %s", vmSnapshot)); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, String.format("Failed to create Snapshot due to an internal error creating Snapshot from Instance Snapshot %s", vmSnapshot)); } finally { if (snapshot == null) { try { _snapshotService.deleteSnapshot(getEntityId(), null); } catch (Exception e) { - logger.debug("Failed to clean failed snapshot {} with id {}", () -> _entityMgr.findById(Snapshot.class, getEntityId()), this::getEntityId); + logger.debug("Failed to clean failed Snapshot {} with ID {}", () -> _entityMgr.findById(Snapshot.class, getEntityId()), this::getEntityId); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotPolicyCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotPolicyCmd.java index 66089894737d..24d756befaba 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotPolicyCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/CreateSnapshotPolicyCmd.java @@ -43,7 +43,7 @@ import java.util.Map; import org.apache.commons.lang3.BooleanUtils; -@APICommand(name = "createSnapshotPolicy", description = "Creates a snapshot policy for the account.", responseObject = SnapshotPolicyResponse.class, +@APICommand(name = "createSnapshotPolicy", description = "Creates a Snapshot policy for the account.", responseObject = SnapshotPolicyResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateSnapshotPolicyCmd extends BaseCmd { @@ -52,13 +52,13 @@ public class CreateSnapshotPolicyCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.INTERVAL_TYPE, type = CommandType.STRING, required = true, description = "valid values are HOURLY, DAILY, WEEKLY, and MONTHLY") + @Parameter(name = ApiConstants.INTERVAL_TYPE, type = CommandType.STRING, required = true, description = "Valid values are HOURLY, DAILY, WEEKLY, and MONTHLY") private String intervalType; - @Parameter(name = ApiConstants.MAX_SNAPS, type = CommandType.INTEGER, required = true, description = "maximum number of snapshots to retain") + @Parameter(name = ApiConstants.MAX_SNAPS, type = CommandType.INTEGER, required = true, description = "Maximum number of Snapshots to retain") private Integer maxSnaps; - @Parameter(name = ApiConstants.SCHEDULE, type = CommandType.STRING, required = true, description = "time the snapshot is scheduled to be taken. " + "Format is:" + @Parameter(name = ApiConstants.SCHEDULE, type = CommandType.STRING, required = true, description = "Time the Snapshot is scheduled to be taken. " + "Format is:" + "* if HOURLY, MM" + "* if DAILY, MM:HH" + "* if WEEKLY, MM:HH:DD (1-7)" + "* if MONTHLY, MM:HH:DD (1-28)") private String schedule; @@ -68,10 +68,10 @@ public class CreateSnapshotPolicyCmd extends BaseCmd { description = "Specifies a timezone for this command. For more information on the timezone parameter, see Time Zone Format.") private String timezone; - @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.UUID, entityType = VolumeResponse.class, required = true, description = "the ID of the disk volume") + @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.UUID, entityType = VolumeResponse.class, required = true, description = "The ID of the disk volume") private Long volumeId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the policy to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the policy to the end user or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; @Parameter(name = ApiConstants.TAGS, type = CommandType.MAP, description = "Map of tags (key/value pairs)") @@ -162,7 +162,7 @@ public long getEntityOwnerId() { throw ex; } } else if (account.getState() == Account.State.DISABLED) { - throw new PermissionDeniedException("The owner of template is disabled: " + account); + throw new PermissionDeniedException("The owner of Template is disabled: " + account); } return volume.getAccountId(); @@ -188,7 +188,7 @@ public void execute() { response.setResponseName(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create snapshot policy"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create Snapshot policy"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotCmd.java index a0a8cfac9bd2..894777375819 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotCmd.java @@ -35,7 +35,7 @@ import com.cloud.storage.Snapshot; import com.cloud.user.Account; -@APICommand(name = "deleteSnapshot", description = "Deletes a snapshot of a disk volume.", responseObject = SuccessResponse.class, entityType = {Snapshot.class}, +@APICommand(name = "deleteSnapshot", description = "Deletes a Snapshot of a disk volume.", responseObject = SuccessResponse.class, entityType = {Snapshot.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteSnapshotCmd extends BaseAsyncCmd { @@ -45,7 +45,7 @@ public class DeleteSnapshotCmd extends BaseAsyncCmd { @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType = SnapshotResponse.class, - required=true, description="The ID of the snapshot") + required=true, description = "The ID of the Snapshot") private Long id; @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class, description="The ID of the zone for the snapshot", since = "4.19.0") @@ -85,7 +85,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "deleting snapshot: " + this._uuidMgr.getUuid(Snapshot.class, getId()); + return "Deleting Snapshot: " + this._uuidMgr.getUuid(Snapshot.class, getId()); } @Override @@ -106,7 +106,7 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete snapshot"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete Snapshot"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotPoliciesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotPoliciesCmd.java index 6f4b60dc8b21..79ac80f78e86 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotPoliciesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/DeleteSnapshotPoliciesCmd.java @@ -30,7 +30,7 @@ import com.cloud.user.Account; -@APICommand(name = "deleteSnapshotPolicies", description = "Deletes snapshot policies for the account.", responseObject = SuccessResponse.class, +@APICommand(name = "deleteSnapshotPolicies", description = "Deletes Snapshot policies for the account.", responseObject = SuccessResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteSnapshotPoliciesCmd extends BaseCmd { @@ -39,14 +39,14 @@ public class DeleteSnapshotPoliciesCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SnapshotPolicyResponse.class, description = "the Id of the snapshot policy") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SnapshotPolicyResponse.class, description = "The ID of the Snapshot policy") private Long id; @Parameter(name = ApiConstants.IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = SnapshotPolicyResponse.class, - description = "list of snapshots policy IDs separated by comma") + description = "List of Snapshots policy IDs separated by comma") private List ids; ///////////////////////////////////////////////////// @@ -77,7 +77,7 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete snapshot policy"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete Snapshot policy"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotPoliciesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotPoliciesCmd.java index f4dfbe58cf2a..df73a009a035 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotPoliciesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotPoliciesCmd.java @@ -32,7 +32,7 @@ import com.cloud.storage.snapshot.SnapshotPolicy; import com.cloud.utils.Pair; -@APICommand(name = "listSnapshotPolicies", description = "Lists snapshot policies.", responseObject = SnapshotPolicyResponse.class, +@APICommand(name = "listSnapshotPolicies", description = "Lists Snapshot policies.", responseObject = SnapshotPolicyResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListSnapshotPoliciesCmd extends BaseListProjectAndAccountResourcesCmd { @@ -41,13 +41,13 @@ public class ListSnapshotPoliciesCmd extends BaseListProjectAndAccountResourcesC //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.UUID, entityType = VolumeResponse.class, description = "the ID of the disk volume") + @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.UUID, entityType = VolumeResponse.class, description = "The ID of the disk volume") private Long volumeId; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SnapshotPolicyResponse.class, description = "the ID of the snapshot policy") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SnapshotPolicyResponse.class, description = "The ID of the Snapshot policy") private Long id; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotsCmd.java index 826c54c2e052..316b9c8d0c9d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/ListSnapshotsCmd.java @@ -31,7 +31,7 @@ import com.cloud.storage.Snapshot; -@APICommand(name = "listSnapshots", description = "Lists all available snapshots for the account.", responseObject = SnapshotResponse.class, entityType = { +@APICommand(name = "listSnapshots", description = "Lists all available Snapshots for the Account.", responseObject = SnapshotResponse.class, entityType = { Snapshot.class }, responseView = ResponseObject.ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListSnapshotsCmd extends BaseListTaggedResourcesCmd { @@ -40,25 +40,25 @@ public class ListSnapshotsCmd extends BaseListTaggedResourcesCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SnapshotResponse.class, description = "lists snapshot by snapshot ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SnapshotResponse.class, description = "Lists Snapshot by Snapshot ID") private Long id; - @Parameter(name=ApiConstants.IDS, type=CommandType.LIST, collectionType=CommandType.UUID, entityType=SnapshotResponse.class, description="the IDs of the snapshots, mutually exclusive with id", since = "4.9") + @Parameter(name=ApiConstants.IDS, type=CommandType.LIST, collectionType=CommandType.UUID, entityType=SnapshotResponse.class, description = "The IDs of the Snapshots, mutually exclusive with id", since = "4.9") private List ids; - @Parameter(name = ApiConstants.INTERVAL_TYPE, type = CommandType.STRING, description = "valid values are HOURLY, DAILY, WEEKLY, and MONTHLY.") + @Parameter(name = ApiConstants.INTERVAL_TYPE, type = CommandType.STRING, description = "Valid values are HOURLY, DAILY, WEEKLY, and MONTHLY.") private String intervalType; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "lists snapshot by snapshot name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Lists Snapshot by Snapshot name") private String snapshotName; - @Parameter(name = ApiConstants.SNAPSHOT_TYPE, type = CommandType.STRING, description = "valid values are MANUAL or RECURRING.") + @Parameter(name = ApiConstants.SNAPSHOT_TYPE, type = CommandType.STRING, description = "Valid values are MANUAL or RECURRING.") private String snapshotType; - @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.UUID, entityType = VolumeResponse.class, description = "the ID of the disk volume") + @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.UUID, entityType = VolumeResponse.class, description = "The ID of the disk volume") private Long volumeId; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "list snapshots by zone id") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "List Snapshots by zone id") private Long zoneId; @Parameter(name = ApiConstants.SHOW_UNIQUE, type = CommandType.BOOLEAN, description = "If set to false, list templates across zones and their storages", since = "4.19.0") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/RevertSnapshotCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/RevertSnapshotCmd.java index fe3b4da0160e..7cee7e71cf37 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/RevertSnapshotCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/RevertSnapshotCmd.java @@ -35,7 +35,7 @@ import com.cloud.storage.Snapshot; import com.cloud.user.Account; -@APICommand(name = "revertSnapshot", description = "This is supposed to revert a volume snapshot. This command is only supported with KVM so far", responseObject = SnapshotResponse.class, entityType = {Snapshot.class}, +@APICommand(name = "revertSnapshot", description = "This is supposed to revert a volume Snapshot. This command is only supported with KVM so far", responseObject = SnapshotResponse.class, entityType = {Snapshot.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class RevertSnapshotCmd extends BaseAsyncCmd { @@ -44,7 +44,7 @@ public class RevertSnapshotCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) @Parameter(name= ApiConstants.ID, type= BaseCmd.CommandType.UUID, entityType = SnapshotResponse.class, - required=true, description="The ID of the snapshot") + required=true, description = "The ID of the Snapshot") private Long id; ///////////////////////////////////////////////////// @@ -74,7 +74,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "revert snapshot: " + this._uuidMgr.getUuid(Snapshot.class, getId()); + return "revert Snapshot: " + this._uuidMgr.getUuid(Snapshot.class, getId()); } @Override @@ -96,7 +96,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to revert snapshot"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to revert Snapshot"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/UpdateSnapshotPolicyCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/UpdateSnapshotPolicyCmd.java index e7feb11f4afd..ba98956644cb 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/UpdateSnapshotPolicyCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/snapshot/UpdateSnapshotPolicyCmd.java @@ -35,7 +35,7 @@ import org.apache.cloudstack.context.CallContext; -@APICommand(name = "updateSnapshotPolicy", description = "Updates the snapshot policy.", responseObject = SnapshotPolicyResponse.class, responseView = ResponseObject.ResponseView.Restricted, entityType = {Volume.class}, +@APICommand(name = "updateSnapshotPolicy", description = "Updates the Snapshot policy.", responseObject = SnapshotPolicyResponse.class, responseView = ResponseObject.ResponseView.Restricted, entityType = {Volume.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdateSnapshotPolicyCmd extends BaseAsyncCustomIdCmd { @@ -44,12 +44,12 @@ public class UpdateSnapshotPolicyCmd extends BaseAsyncCustomIdCmd { ///////////////////////////////////////////////////// @ACL(accessType = SecurityChecker.AccessType.OperateEntry) - @Parameter(name= ApiConstants.ID, type=CommandType.UUID, entityType=SnapshotPolicyResponse.class, description="the ID of the snapshot policy") + @Parameter(name= ApiConstants.ID, type=CommandType.UUID, entityType=SnapshotPolicyResponse.class, description = "The ID of the Snapshot policy") private Long id; @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, - description = "an optional field, whether to the display the snapshot policy to the end user or not.", + description = "An optional field, whether to the display the Snapshot policy to the end user or not.", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; @@ -80,11 +80,11 @@ public long getEntityOwnerId() { SnapshotPolicy policy = _entityMgr.findById(SnapshotPolicy.class, getId()); if (policy == null) { - throw new InvalidParameterValueException("Invalid snapshot policy id was provided"); + throw new InvalidParameterValueException("Invalid Snapshot policy ID was provided"); } Volume volume = _responseGenerator.findVolumeById(policy.getVolumeId()); if (volume == null) { - throw new InvalidParameterValueException("Snapshot policy's volume id doesn't exist"); + throw new InvalidParameterValueException("Snapshot policy's volume ID doesn't exist"); }else{ return volume.getAccountId(); } @@ -97,21 +97,21 @@ public String getEventType() { @Override public String getEventDescription() { - StringBuilder desc = new StringBuilder("Updating snapshot policy: "); + StringBuilder desc = new StringBuilder("Updating Snapshot policy: "); desc.append(getId()); return desc.toString(); } @Override public void execute() { - CallContext.current().setEventDetails("SnapshotPolicy Id: " + getId()); + CallContext.current().setEventDetails("SnapshotPolicy ID: " + getId()); SnapshotPolicy result = _snapshotService.updateSnapshotPolicy(this); if (result != null) { SnapshotPolicyResponse response = _responseGenerator.createSnapshotPolicyResponse(result); response.setResponseName(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update snapshot policy"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update Snapshot policy"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/CreateSSHKeyPairCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/CreateSSHKeyPairCmd.java index 5212779e9654..a55b20593025 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/CreateSSHKeyPairCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/CreateSSHKeyPairCmd.java @@ -40,16 +40,16 @@ public class CreateSSHKeyPairCmd extends BaseCmd { private String name; //Owner information - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the ssh key. Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional Account for the SSH key. Must be used with domainId.") private String accountName; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "an optional domainId for the ssh key. If the account parameter is used, domainId must also be used.") + description = "An optional domainId for the SSH key. If the Account parameter is used, domainId must also be used.") private Long domainId; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "an optional project for the ssh key") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "An optional project for the SSH key") private Long projectId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/DeleteSSHKeyPairCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/DeleteSSHKeyPairCmd.java index 364ca77ae1fc..4ed8664a79d7 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/DeleteSSHKeyPairCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/DeleteSSHKeyPairCmd.java @@ -41,13 +41,13 @@ public class DeleteSSHKeyPairCmd extends BaseCmd { @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "Name of the keypair") private String name; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "the account associated with the keypair. Must be used with the domainId parameter.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "The Account associated with the keypair. 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 keypair") + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "The domain ID associated with the keypair") private Long domainId; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "the project associated with keypair") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "The project associated with keypair") private Long projectId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/ListSSHKeyPairsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/ListSSHKeyPairsCmd.java index 6bf8dca864b0..343db1bc9565 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/ListSSHKeyPairsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/ListSSHKeyPairsCmd.java @@ -37,7 +37,7 @@ public class ListSSHKeyPairsCmd extends BaseListProjectAndAccountResourcesCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SSHKeyPairResponse.class, description = "the ID of the ssh keypair") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = SSHKeyPairResponse.class, description = "The ID of the SSH keypair") private Long id; @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "A key pair name to look for") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/RegisterSSHKeyPairCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/RegisterSSHKeyPairCmd.java index 6a0c0541bb4f..36c708ea1112 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/RegisterSSHKeyPairCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/ssh/RegisterSSHKeyPairCmd.java @@ -43,16 +43,16 @@ public class RegisterSSHKeyPairCmd extends BaseCmd { private String publicKey; //Owner information - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the ssh key. Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional Account for the SSH key. Must be used with domainId.") private String accountName; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "an optional domainId for the ssh key. If the account parameter is used, domainId must also be used.") + description = "An optional domainId for the SSH key. If the Account parameter is used, domainId must also be used.") private Long domainId; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "an optional project for the ssh key") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "An optional project for the SSH key") private Long projectId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/tag/CreateTagsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/tag/CreateTagsCmd.java index 30904db46c44..6350baefe9a5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/tag/CreateTagsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/tag/CreateTagsCmd.java @@ -46,17 +46,17 @@ public class CreateTagsCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.TAGS, type = CommandType.MAP, required = true, description = "Map of tags (key/value pairs)") private Map tag; - @Parameter(name = ApiConstants.RESOURCE_TYPE, type = CommandType.STRING, required = true, description = "type of the resource") + @Parameter(name = ApiConstants.RESOURCE_TYPE, type = CommandType.STRING, required = true, description = "Type of the resource") private String resourceType; @Parameter(name = ApiConstants.RESOURCE_IDS, type = CommandType.LIST, required = true, collectionType = CommandType.STRING, - description = "list of resources to create the tags for") + description = "List of resources to create the tags for") private List resourceIds; - @Parameter(name = ApiConstants.CUSTOMER, type = CommandType.STRING, description = "identifies client specific tag. " + @Parameter(name = ApiConstants.CUSTOMER, type = CommandType.STRING, description = "Identifies client specific tag. " + "When the value is not null, the tag can't be used by cloudStack code internally") private String customer; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/tag/ListTagsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/tag/ListTagsCmd.java index 8b3c83aa20a6..2590f7d67b7b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/tag/ListTagsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/tag/ListTagsCmd.java @@ -30,19 +30,19 @@ requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListTagsCmd extends BaseListProjectAndAccountResourcesCmd { - @Parameter(name = ApiConstants.RESOURCE_TYPE, type = CommandType.STRING, description = "list by resource type") + @Parameter(name = ApiConstants.RESOURCE_TYPE, type = CommandType.STRING, description = "List by resource type") private String resourceType; - @Parameter(name = ApiConstants.RESOURCE_ID, type = CommandType.STRING, description = "list by resource id") + @Parameter(name = ApiConstants.RESOURCE_ID, type = CommandType.STRING, description = "List by resource ID") private String resourceId; - @Parameter(name = ApiConstants.KEY, type = CommandType.STRING, description = "list by key") + @Parameter(name = ApiConstants.KEY, type = CommandType.STRING, description = "List by key") private String key; - @Parameter(name = ApiConstants.VALUE, type = CommandType.STRING, description = "list by value") + @Parameter(name = ApiConstants.VALUE, type = CommandType.STRING, description = "List by value") private String value; - @Parameter(name = ApiConstants.CUSTOMER, type = CommandType.STRING, description = "list by customer name") + @Parameter(name = ApiConstants.CUSTOMER, type = CommandType.STRING, description = "List by customer name") private String customer; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/template/CopyTemplateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/template/CopyTemplateCmd.java index f094bc435070..66a20fac8606 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/template/CopyTemplateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/template/CopyTemplateCmd.java @@ -39,7 +39,7 @@ import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.Account; -@APICommand(name = "copyTemplate", description = "Copies a template from one zone to another.", responseObject = TemplateResponse.class, responseView = ResponseView.Restricted, +@APICommand(name = "copyTemplate", description = "Copies a Template from one zone to another.", responseObject = TemplateResponse.class, responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CopyTemplateCmd extends BaseAsyncCmd implements UserCmd { private static final String s_name = "copytemplateresponse"; @@ -52,7 +52,7 @@ public class CopyTemplateCmd extends BaseAsyncCmd implements UserCmd { type = CommandType.UUID, entityType = ZoneResponse.class, required = false, - description = "ID of the zone the template is being copied to.") + description = "ID of the zone the Template is being copied to.") protected Long destZoneId; @Parameter(name = ApiConstants.ID, type = CommandType.UUID, @@ -62,9 +62,9 @@ public class CopyTemplateCmd extends BaseAsyncCmd implements UserCmd { @Parameter(name = ApiConstants.SOURCE_ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - description = "ID of the zone the template is currently hosted on. " + - "If not specified and template is cross-zone, " + - "then we will sync this template to region wide image store.") + description = "ID of the zone the Template is currently hosted on. " + + "If not specified and Template is cross-zone, " + + "then we will sync this Template to region wide image store.") private Long sourceZoneId; @Parameter(name = ApiConstants.DESTINATION_ZONE_ID_LIST, @@ -72,8 +72,8 @@ public class CopyTemplateCmd extends BaseAsyncCmd implements UserCmd { collectionType = CommandType.UUID, entityType = ZoneResponse.class, required = false, - description = "A list of IDs of the zones that the template needs to be copied to." + - "Specify this list if the template needs to copied to multiple zones in one go. " + + description = "A list of IDs of the zones that the Template needs to be copied to." + + "Specify this list if the Template needs to copied to multiple zones in one go. " + "Do not specify destzoneid and destzoneids together, however one of them is required.") protected List destZoneIds; @@ -148,7 +148,7 @@ public String getEventDescription() { } } - return "copying template: " + this._uuidMgr.getUuid(VirtualMachineTemplate.class, getId()) +((getSourceZoneId() != null) ? " from zone: " + this._uuidMgr.getUuid(DataCenter.class, getSourceZoneId()) : "") + ((descBuilder.length() > 0) ? " to zones: " + descBuilder.toString() : ""); + return "Copying Template: " + this._uuidMgr.getUuid(VirtualMachineTemplate.class, getId()) +((getSourceZoneId() != null) ? " from zone: " + this._uuidMgr.getUuid(DataCenter.class, getSourceZoneId()) : "") + ((descBuilder.length() > 0) ? " to zones: " + descBuilder.toString() : ""); } @Override @@ -186,7 +186,7 @@ public void execute() throws ResourceAllocationException { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to copy template"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to copy Template"); } } catch (StorageUnavailableException ex) { logger.warn("Exception: ", ex); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java index 5f09ac6698d6..3720e2c89f16 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/template/CreateTemplateCmd.java @@ -51,8 +51,8 @@ import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.Account; -@APICommand(name = "createTemplate", responseObject = TemplateResponse.class, description = "Creates a template of a virtual machine. " + "The virtual machine must be in a STOPPED state. " - + "A template created from this command is automatically designated as a private template visible to the account that created it.", responseView = ResponseView.Restricted, +@APICommand(name = "createTemplate", responseObject = TemplateResponse.class, description = "Creates a Template of an Instance. " + "The Instance must be in a STOPPED state. " + + "A Template created from this command is automatically designated as a private Template visible to the account that created it.", responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateTemplateCmd extends BaseAsyncCreateCmd implements UserCmd { private static final String s_name = "createtemplateresponse"; @@ -66,60 +66,60 @@ public class CreateTemplateCmd extends BaseAsyncCreateCmd implements UserCmd { @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, - description = "The display text of the template, defaults to the 'name'.", + description = "The display text of the Template, defaults to the 'name'.", length = 4096) private String displayText; - @Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN, description = "true if this template is a featured template, false otherwise") + @Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN, description = "True if this Template is a featured Template, false otherwise") private Boolean featured; - @Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "true if this template is a public template, false otherwise") + @Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "True if this Template is a public Template, false otherwise") private Boolean publicTemplate; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the template") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the Template") private String templateName; @Parameter(name = ApiConstants.OS_TYPE_ID, type = CommandType.UUID, entityType = GuestOSResponse.class, required = true, - description = "the ID of the OS Type that best represents the OS of this template.") + description = "The ID of the OS Type that best represents the OS of this Template.") private Long osTypeId; @Parameter(name = ApiConstants.PASSWORD_ENABLED, type = CommandType.BOOLEAN, - description = "true if the template supports the password reset feature; default is false") + description = "True if the Template supports the password reset feature; default is false") private Boolean passwordEnabled; - @Parameter(name = ApiConstants.SSHKEY_ENABLED, type = CommandType.BOOLEAN, description = "true if the template supports the sshkey upload feature; default is false") + @Parameter(name = ApiConstants.SSHKEY_ENABLED, type = CommandType.BOOLEAN, description = "True if the Template supports the SSHkey upload feature; default is false") private Boolean sshKeyEnabled; - @Parameter(name = ApiConstants.REQUIRES_HVM, type = CommandType.BOOLEAN, description = "true if the template requires HVM, false otherwise") + @Parameter(name = ApiConstants.REQUIRES_HVM, type = CommandType.BOOLEAN, description = "True if the Template requires HVM, false otherwise") private Boolean requiresHvm; @Parameter(name = ApiConstants.SNAPSHOT_ID, type = CommandType.UUID, entityType = SnapshotResponse.class, - description = "the ID of the snapshot the template is being created from. Either this parameter, or volumeId has to be passed in") + description = "The ID of the Snapshot the Template is being created from. Either this parameter, or volumeId has to be passed in") protected Long snapshotId; @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.UUID, entityType = VolumeResponse.class, - description = "the ID of the disk volume the template is being created from. Either this parameter, or snapshotId has to be passed in") + description = "The ID of the disk volume the Template is being created from. Either this parameter, or snapshotId has to be passed in") protected Long volumeId; @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType = UserVmResponse.class, - description="Optional, VM ID. If this presents, it is going to create a baremetal template for VM this ID refers to. This is only for VM whose hypervisor type is BareMetal") + description = "Optional, Instance ID. If this presents, it is going to create a baremetal Template for Instance this ID refers to. This is only for Instance whose hypervisor type is BareMetal") protected Long vmId; @Parameter(name = ApiConstants.URL, type = CommandType.STRING, length = 2048, - description = "Optional, only for baremetal hypervisor. The directory name where template stored on CIFS server") + description = "Optional, only for baremetal hypervisor. The directory name where Template stored on CIFS server") private String url; - @Parameter(name = ApiConstants.TEMPLATE_TAG, type = CommandType.STRING, description = "the tag for this template.") + @Parameter(name = ApiConstants.TEMPLATE_TAG, type = CommandType.STRING, description = "The tag for this Template.") private String templateTag; @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "Template details in key/value pairs using format details[i].keyname=keyvalue. Example: details[0].hypervisortoolsversion=xenserver61") @@ -127,10 +127,10 @@ public class CreateTemplateCmd extends BaseAsyncCreateCmd implements UserCmd { @Parameter(name = ApiConstants.IS_DYNAMICALLY_SCALABLE, type = CommandType.BOOLEAN, - description = "true if template contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory") + description = "True if Template contains XS/VMWare tools in order to support dynamic scaling of Instance CPU/memory") protected Boolean isDynamicallyScalable; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "create template for the project") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Create Template for the project") private Long projectId; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the zone for the template. Can be specified with snapshot only", since = "4.19.0") @@ -150,7 +150,7 @@ public class CreateTemplateCmd extends BaseAsyncCreateCmd implements UserCmd { private String accountName; @Parameter(name = ApiConstants.ARCH, type = CommandType.STRING, - description = "the CPU arch of the template. Valid options are: x86_64, aarch64. Defaults to x86_64", + description = "the CPU arch of the template. Valid options are: x86_64, aarch64, s390x. Defaults to x86_64", since = "4.20.2") private String arch; @@ -211,7 +211,7 @@ public String getUrl() { } public String getTemplateTag() { - return templateTag; + return StringUtils.isBlank(templateTag) ? null : templateTag; } public Map getDetails() { @@ -272,7 +272,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "creating template: " + getTemplateName(); + return "Creating Template: " + getTemplateName(); } @Override @@ -293,7 +293,7 @@ public void create() throws ResourceAllocationException { setEntityId(template.getId()); 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"); } } @@ -301,7 +301,7 @@ public void create() throws ResourceAllocationException { @Override public void execute() { CallContext.current().setEventDetails( - "Template Id: " + getEntityUuid() + ((getSnapshotId() == null) ? " from volume Id: " + this._uuidMgr.getUuid(Volume.class, getVolumeId()) : " from snapshot Id: " + this._uuidMgr.getUuid(Snapshot.class, getSnapshotId()))); + "Template Id: " + getEntityUuid() + ((getSnapshotId() == null) ? " from volume Id: " + this._uuidMgr.getUuid(Volume.class, getVolumeId()) : " from Snapshot Id: " + this._uuidMgr.getUuid(Snapshot.class, getSnapshotId()))); VirtualMachineTemplate template = _templateService.createPrivateTemplate(this); if (template != null) { @@ -318,7 +318,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create private template"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create private Template"); } } @@ -356,12 +356,10 @@ private Long findAccountIdToUse(Account callingAccount) { try { accountIdToUse = _accountService.finalyzeAccountId(accountName, domainId, projectId, true); } catch (InvalidParameterValueException | PermissionDeniedException ex) { - if (logger.isDebugEnabled()) { - logger.debug(String.format("An exception occurred while finalizing account id with accountName, domainId and projectId" + - "using callingAccountId=%s", callingAccount.getUuid()), ex); - } - logger.warn("Unable to find accountId associated with accountName=" + accountName + " and domainId=" - + domainId + " or projectId=" + projectId + ", using callingAccountId=" + callingAccount.getUuid()); + logger.error("Unable to find accountId associated with accountName={} and domainId={} or projectId={}" + + ", using callingAccountId={}", accountName, domainId, projectId, callingAccount.getUuid()); + logger.debug("An exception occurred while finalizing account id with accountName, domainId and projectId" + + "using callingAccountId={}", callingAccount.getUuid(), ex); } return accountIdToUse != null ? accountIdToUse : callingAccount.getAccountId(); } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java index 5e9bf317fe1d..fef70d188e59 100755 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/template/DeleteTemplateCmd.java @@ -37,7 +37,7 @@ @APICommand(name = "deleteTemplate", responseObject = SuccessResponse.class, - description = "Deletes a template from the system. All virtual machines using the deleted template will not be affected.", + description = "Deletes a Template from the system. All Instances using the deleted Template will not be affected.", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteTemplateCmd extends BaseAsyncCmd { @@ -45,13 +45,13 @@ public class DeleteTemplateCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "the ID of the template") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "The ID of the Template") private Long id; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the ID of zone of the template") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The ID of zone of the Template") private Long zoneId; - @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force delete a template.", since = "4.9+") + @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force delete a Template.", since = "4.9+") private Boolean forced; @Parameter(name = ApiConstants.IS_SYSTEM, type = CommandType.BOOLEAN, required = false, description = "Necessary if the template's type is system.", since = "4.20.0", authorized = {RoleType.Admin}) @@ -98,7 +98,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Deleting template " + this._uuidMgr.getUuid(VirtualMachineTemplate.class, getId()); + return "Deleting Template " + this._uuidMgr.getUuid(VirtualMachineTemplate.class, getId()); } @Override @@ -119,7 +119,7 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete template"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete Template"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/template/ExtractTemplateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/template/ExtractTemplateCmd.java index 22f59351e9ab..b0215b12ef2e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/template/ExtractTemplateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/template/ExtractTemplateCmd.java @@ -34,7 +34,7 @@ import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.Account; -@APICommand(name = "extractTemplate", description = "Extracts a template", responseObject = ExtractResponse.class, +@APICommand(name = "extractTemplate", description = "Extracts a Template", responseObject = ExtractResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ExtractTemplateCmd extends BaseAsyncCmd { @@ -43,20 +43,20 @@ public class ExtractTemplateCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "the ID of the template") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "The ID of the Template") private Long id; - @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = false, length = 2048, description = "the url to which the ISO would be extracted") + @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = false, length = 2048, description = "The url to which the ISO would be extracted") private String url; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = false, - description = "the ID of the zone where the ISO is originally located") + description = "The ID of the zone where the ISO is originally located") private Long zoneId; - @Parameter(name = ApiConstants.MODE, type = CommandType.STRING, required = true, description = "the mode of extraction - HTTP_DOWNLOAD or FTP_UPLOAD") + @Parameter(name = ApiConstants.MODE, type = CommandType.STRING, required = true, description = "The mode of extraction - HTTP_DOWNLOAD or FTP_UPLOAD") private String mode; ///////////////////////////////////////////////////// @@ -102,7 +102,7 @@ public String getEventType() { @Override public String getEventDescription() { String templateId = this._uuidMgr.getUuid(VirtualMachineTemplate.class, getId()); - String baseDescription = String.format("Extracting template: %s", templateId); + String baseDescription = String.format("Extracting Template: %s", templateId); Long zoneId = getZoneId(); if (zoneId == null) { @@ -133,7 +133,7 @@ public void execute() { response.setObjectName("template"); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to extract template"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to extract Template"); } } catch (InternalErrorException ex) { logger.warn("Exception: ", ex); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/template/GetUploadParamsForTemplateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/template/GetUploadParamsForTemplateCmd.java index 2472a03b890b..5058790d1f4a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/template/GetUploadParamsForTemplateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/template/GetUploadParamsForTemplateCmd.java @@ -38,7 +38,7 @@ import com.cloud.exception.ResourceAllocationException; -@APICommand(name = "getUploadParamsForTemplate", description = "upload an existing template into the CloudStack cloud. ", +@APICommand(name = "getUploadParamsForTemplate", description = "Upload an existing Template into the CloudStack cloud. ", responseObject = GetUploadParamsResponse.class, since = "4.6.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) @@ -46,18 +46,18 @@ public class GetUploadParamsForTemplateCmd extends AbstractGetUploadParamsCmd { private static final String s_name = "postuploadtemplateresponse"; - @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "the display text of the template. This is usually used for display purposes.", length = 4096) + @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The display text of the Template. This is usually used for display purposes.", length = 4096) private String displayText; - @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, required = true, description = "the target hypervisor for the template") + @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, required = true, description = "The target hypervisor for the Template") private String hypervisor; @Parameter(name = ApiConstants.OS_TYPE_ID, type = CommandType.UUID, entityType = GuestOSResponse.class, required = false, - description = "the ID of the OS Type that best represents the OS of this template. Not required for VMware as the guest OS is obtained from the OVF file.") + description = "The ID of the OS Type that best represents the OS of this Template. Not required for VMware as the guest OS is obtained from the OVF file.") private Long osTypeId; @Parameter(name = ApiConstants.ARCH, type = CommandType.STRING, - description = "the CPU arch of the template. Valid options are: x86_64, aarch64", + description = "the CPU arch of the template. Valid options are: x86_64, aarch64, s390x", since = "4.20") private String arch; @@ -67,36 +67,36 @@ public class GetUploadParamsForTemplateCmd extends AbstractGetUploadParamsCmd { @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "Template details in key/value pairs.") private Map details; - @Parameter(name = ApiConstants.IS_DYNAMICALLY_SCALABLE, type = CommandType.BOOLEAN, description = "true if template contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory") + @Parameter(name = ApiConstants.IS_DYNAMICALLY_SCALABLE, type = CommandType.BOOLEAN, description = "True if Template contains XS/VMWare tools in order to support dynamic scaling of Instance CPU/memory") private Boolean isDynamicallyScalable; - @Parameter(name = ApiConstants.IS_EXTRACTABLE, type = CommandType.BOOLEAN, description = "true if the template or its derivatives are extractable; default is false") + @Parameter(name = ApiConstants.IS_EXTRACTABLE, type = CommandType.BOOLEAN, description = "True if the Template or its derivatives are extractable; default is false") private Boolean extractable; - @Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN, description = "true if this template is a featured template, false otherwise") + @Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN, description = "True if this Template is a featured Template, false otherwise") private Boolean featured; - @Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "true if the template is available to all accounts; default is true") + @Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "True if the Template is available to all accounts; default is true") private Boolean publicTemplate; - @Parameter(name = ApiConstants.ROUTING, type = CommandType.BOOLEAN, description = "true if the template type is routing i.e., if template is used to deploy router") + @Parameter(name = ApiConstants.ROUTING, type = CommandType.BOOLEAN, description = "True if the Template type is routing i.e., if Template is used to deploy router") private Boolean isRoutingType; - @Parameter(name = ApiConstants.PASSWORD_ENABLED, type = CommandType.BOOLEAN, description = "true if the template supports the password reset feature; default is false") + @Parameter(name = ApiConstants.PASSWORD_ENABLED, type = CommandType.BOOLEAN, description = "True if the Template supports the password reset feature; default is false") private Boolean passwordEnabled; - @Parameter(name = ApiConstants.REQUIRES_HVM, type = CommandType.BOOLEAN, description = "true if this template requires HVM") + @Parameter(name = ApiConstants.REQUIRES_HVM, type = CommandType.BOOLEAN, description = "True if this Template requires HVM") private Boolean requiresHvm; - @Parameter(name = ApiConstants.SSHKEY_ENABLED, type = CommandType.BOOLEAN, description = "true if the template supports the sshkey upload feature; default is false") + @Parameter(name = ApiConstants.SSHKEY_ENABLED, type = CommandType.BOOLEAN, description = "True if the Template supports the SSHkey upload feature; default is false") private Boolean sshKeyEnabled; - @Parameter(name = ApiConstants.TEMPLATE_TAG, type = CommandType.STRING, description = "the tag for this template.") + @Parameter(name = ApiConstants.TEMPLATE_TAG, type = CommandType.STRING, description = "The tag for this Template.") private String templateTag; @Parameter(name=ApiConstants.DEPLOY_AS_IS, type = CommandType.BOOLEAN, - description = "(VMware only) true if VM deployments should preserve all the configurations defined for this template", since = "4.15.1") + description = "(VMware only) true if Instance deployments should preserve all the configurations defined for this Template", since = "4.15.1") private Boolean deployAsIs; @Parameter(name=ApiConstants.FOR_CKS, @@ -170,7 +170,7 @@ public Boolean isSshKeyEnabled() { } public String getTemplateTag() { - return templateTag; + return StringUtils.isBlank(templateTag) ? null : templateTag; } public boolean isDeployAsIs() { @@ -198,14 +198,14 @@ public void execute() throws ServerApiException { response.setResponseName(getCommandName()); setResponseObject(response); } catch (ResourceAllocationException | MalformedURLException e) { - logger.error("exception while registering template", e); - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "exception while registering template: " + e.getMessage()); + logger.error("Exception while registering Template", e); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Exception while registering Template: " + e.getMessage()); } } private void validateRequest() { if (getZoneId() <= 0) { - throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "invalid zoneid"); + throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid zoneid"); } if (!isDeployAsIs() && osTypeId == null) { throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Missing parameter ostypeid"); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/template/ListTemplatePermissionsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/template/ListTemplatePermissionsCmd.java index 6d544df41871..7e7efcf87cf4 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/template/ListTemplatePermissionsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/template/ListTemplatePermissionsCmd.java @@ -1,4 +1,4 @@ -// Licensedname = "listTemplatePermissions", to the Apache Software Foundation (ASF) under one +// Licensed to the Apache Software Foundation (ASF) under one // or more contributor license agreements. See the NOTICE file // distributed with this work for additional information // regarding copyright ownership. The ASF licenses this file @@ -26,7 +26,7 @@ import com.cloud.storage.Storage.ImageFormat; import com.cloud.template.VirtualMachineTemplate; -@APICommand(name = "listTemplatePermissions", description = "List template visibility and all accounts that have permissions to view this template.", responseObject = TemplatePermissionsResponse.class, responseView = ResponseView.Restricted, +@APICommand(name = "listTemplatePermissions", description = "List Template visibility and all accounts that have permissions to view this Template.", responseObject = TemplatePermissionsResponse.class, responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListTemplatePermissionsCmd extends BaseListTemplateOrIsoPermissionsCmd implements UserCmd { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java index 223ac57b11f8..0b52413aaf19 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/template/ListTemplatesCmd.java @@ -44,7 +44,7 @@ import com.cloud.template.VirtualMachineTemplate.TemplateFilter; import com.cloud.user.Account; -@APICommand(name = "listTemplates", description = "List all public, private, and privileged templates.", responseObject = TemplateResponse.class, entityType = {VirtualMachineTemplate.class}, responseView = ResponseView.Restricted, +@APICommand(name = "listTemplates", description = "List all public, private, and privileged Templates.", responseObject = TemplateResponse.class, entityType = {VirtualMachineTemplate.class}, responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListTemplatesCmd extends BaseListTaggedResourcesCmd implements UserCmd { @@ -54,47 +54,47 @@ public class ListTemplatesCmd extends BaseListTaggedResourcesCmd implements User //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "the hypervisor for which to restrict the search") + @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "The hypervisor for which to restrict the search") private String hypervisor; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, description = "the template ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, description = "The Template ID") private Long id; - @Parameter(name=ApiConstants.IDS, type=CommandType.LIST, collectionType=CommandType.UUID, entityType=TemplateResponse.class, description="the IDs of the templates, mutually exclusive with id", since = "4.9") + @Parameter(name=ApiConstants.IDS, type=CommandType.LIST, collectionType=CommandType.UUID, entityType=TemplateResponse.class, description = "The IDs of the Templates, mutually exclusive with id", since = "4.9") private List ids; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the template name") + @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\", \"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).") + 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 Instance. " + + "* 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 an Instance. " + + "* 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, description = "list templates by zoneId") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "List Templates by zoneId") private Long zoneId; - @Parameter(name = ApiConstants.SHOW_REMOVED, type = CommandType.BOOLEAN, description = "show removed templates as well") + @Parameter(name = ApiConstants.SHOW_REMOVED, type = CommandType.BOOLEAN, description = "Show removed Templates as well") private Boolean showRemoved; - @Parameter(name = ApiConstants.SHOW_UNIQUE, type = CommandType.BOOLEAN, description = "If set to true, list only unique templates across zones", since = "4.13.2") + @Parameter(name = ApiConstants.SHOW_UNIQUE, type = CommandType.BOOLEAN, description = "If set to true, list only unique Templates across zones", since = "4.13.2") private Boolean showUnique; - @Parameter(name = ApiConstants.PARENT_TEMPLATE_ID, type = CommandType.UUID, entityType = TemplateResponse.class, description = "list datadisk templates by parent template id", since = "4.4") + @Parameter(name = ApiConstants.PARENT_TEMPLATE_ID, type = CommandType.UUID, entityType = TemplateResponse.class, description = "List datadisk Templates by parent Template id", since = "4.4") private Long parentTemplateId; @Parameter(name = ApiConstants.DETAILS, type = CommandType.LIST, collectionType = CommandType.STRING, since = "4.15", - description = "comma separated list of template details requested, value can be a list of [ all, min]") + description = "Comma separated list of Template details requested, value can be a list of [all, min]") private List viewDetails; @Parameter(name = ApiConstants.TEMPLATE_TYPE, type = CommandType.STRING, @@ -112,7 +112,7 @@ public class ListTemplatesCmd extends BaseListTaggedResourcesCmd implements User private Boolean forCks; @Parameter(name = ApiConstants.ARCH, type = CommandType.STRING, - description = "the CPU arch of the template. Valid options are: x86_64, aarch64", + description = "the CPU arch of the template. Valid options are: x86_64, aarch64, s390x", since = "4.20") private String arch; @@ -208,7 +208,7 @@ public boolean listInReadyState() { return onlyReady; } - @Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN, description = "flag to display the resource image for the templates") + @Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN, description = "Flag to display the resource image for the Templates") private Boolean showIcon; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java index 5d5cab219c19..b8a0a0c67561 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/template/RegisterTemplateCmd.java @@ -47,7 +47,7 @@ import com.cloud.hypervisor.HypervisorGuru; import com.cloud.template.VirtualMachineTemplate; -@APICommand(name = "registerTemplate", description = "Registers an existing template into the CloudStack cloud. ", responseObject = TemplateResponse.class, responseView = ResponseView.Restricted, +@APICommand(name = "registerTemplate", description = "Registers an existing Template into the CloudStack cloud. ", responseObject = TemplateResponse.class, responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class RegisterTemplateCmd extends BaseCmd implements UserCmd { @@ -62,76 +62,76 @@ public class RegisterTemplateCmd extends BaseCmd implements UserCmd { @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, - description = "The display text of the template, defaults to 'name'.", + description = "The display text of the Template, defaults to 'name'.", length = 4096) private String displayText; @Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, required = true, - description = "the format for the template. Possible values include QCOW2, RAW, VHD and OVA.") + description = "The format for the Template. Possible values include QCOW2, RAW, VHD and OVA.") private String format; - @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, required = true, description = "the target hypervisor for the template") + @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, required = true, description = "The target hypervisor for the Template") protected String hypervisor; - @Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN, description = "true if this template is a featured template, false otherwise") + @Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN, description = "True if this Template is a featured Template, false otherwise") private Boolean featured; - @Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "true if the template is available to all accounts; default is true") + @Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "True if the Template is available to all accounts; default is true") private Boolean publicTemplate; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the template") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the Template") private String templateName; @Parameter(name = ApiConstants.OS_TYPE_ID, type = CommandType.UUID, entityType = GuestOSResponse.class, required = false, - description = "the ID of the OS Type that best represents the OS of this template. Not applicable with VMware, as we honour what is defined in the template") + description = "The ID of the OS Type that best represents the OS of this Template. Not applicable with VMware, as we honour what is defined in the Template") private Long osTypeId; @Parameter(name = ApiConstants.PASSWORD_ENABLED, type = CommandType.BOOLEAN, - description = "true if the template supports the password reset feature; default is false") + description = "True if the Template supports the password reset feature; default is false") private Boolean passwordEnabled; - @Parameter(name = ApiConstants.SSHKEY_ENABLED, type = CommandType.BOOLEAN, description = "true if the template supports the sshkey upload feature; default is false") + @Parameter(name = ApiConstants.SSHKEY_ENABLED, type = CommandType.BOOLEAN, description = "True if the Template supports the sshkey upload feature; default is false") private Boolean sshKeyEnabled; - @Parameter(name = ApiConstants.IS_EXTRACTABLE, type = CommandType.BOOLEAN, description = "true if the template or its derivatives are extractable; default is false") + @Parameter(name = ApiConstants.IS_EXTRACTABLE, type = CommandType.BOOLEAN, description = "True if the Template or its derivatives are extractable; default is false") private Boolean extractable; - @Parameter(name = ApiConstants.REQUIRES_HVM, type = CommandType.BOOLEAN, description = "true if this template requires HVM") + @Parameter(name = ApiConstants.REQUIRES_HVM, type = CommandType.BOOLEAN, description = "True if this Template requires HVM") private Boolean requiresHvm; @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, length = 2048, - description = "the URL of where the template is hosted. Possible URL include http:// and https://") + description = "The URL of where the Template is hosted. Possible URL include http:// and https://") private String url; @Parameter(name=ApiConstants.ZONE_ID, type=CommandType.UUID, entityType = ZoneResponse.class, - required=false, description="the ID of the zone the template is to be hosted on") + required=false, description = "The ID of the zone the Template is to be hosted on") protected Long zoneId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "an optional domainId. If the account parameter is used, domainId must also be used.") + description = "An optional domainId. If the account parameter is used, domainId must also be used.") private Long domainId; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional accountName. Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional accountName. Must be used with domainId.") private String accountName; - @Parameter(name = ApiConstants.CHECKSUM, type = CommandType.STRING, description = "the checksum value of this template. " + ApiConstants.CHECKSUM_PARAMETER_PREFIX_DESCRIPTION) + @Parameter(name = ApiConstants.CHECKSUM, type = CommandType.STRING, description = "The checksum value of this Template. " + ApiConstants.CHECKSUM_PARAMETER_PREFIX_DESCRIPTION) private String checksum; - @Parameter(name = ApiConstants.TEMPLATE_TAG, type = CommandType.STRING, description = "the tag for this template.") + @Parameter(name = ApiConstants.TEMPLATE_TAG, type = CommandType.STRING, description = "The tag for this Template.") private String templateTag; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Register template for the project") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Register Template for the project") private Long projectId; @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, @@ -140,11 +140,11 @@ public class RegisterTemplateCmd extends BaseCmd implements UserCmd { @Parameter(name = ApiConstants.IS_DYNAMICALLY_SCALABLE, type = CommandType.BOOLEAN, - description = "true if template contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory") + description = "True if Template contains XS/VMWare tools in order to support dynamic scaling of Instance cpu/memory") protected Boolean isDynamicallyScalable; @Deprecated - @Parameter(name = ApiConstants.ROUTING, type = CommandType.BOOLEAN, description = "true if the template type is routing i.e., if template is used to deploy router") + @Parameter(name = ApiConstants.ROUTING, type = CommandType.BOOLEAN, description = "True if the Template type is routing i.e., if Template is used to deploy router") protected Boolean isRoutingType; @Parameter(name=ApiConstants.ZONE_ID_LIST, @@ -152,21 +152,21 @@ public class RegisterTemplateCmd extends BaseCmd implements UserCmd { collectionType = CommandType.UUID, entityType = ZoneResponse.class, required=false, - description="A list of zone ids where the template will be hosted. Use this parameter if the template needs " + - "to be registered to multiple zones in one go. Use zoneid if the template " + + description = "A list of zone IDs where the Template will be hosted. Use this parameter if the Template needs " + + "to be registered to multiple zones in one go. Use zoneid if the Template " + "needs to be registered to only one zone." + - "Passing only -1 to this will cause the template to be registered as a cross " + - "zone template and will be copied to all zones. ") + "Passing only -1 to this will cause the Template to be registered as a cross " + + "zone Template and will be copied to all zones. ") protected List zoneIds; @Parameter(name=ApiConstants.DIRECT_DOWNLOAD, type = CommandType.BOOLEAN, - description = "true if template should bypass Secondary Storage and be downloaded to Primary Storage on deployment") + description = "True if Template should bypass Secondary Storage and be downloaded to Primary Storage on deployment") private Boolean directDownload; @Parameter(name=ApiConstants.DEPLOY_AS_IS, type = CommandType.BOOLEAN, - description = "(VMware only) true if VM deployments should preserve all the configurations defined for this template", since = "4.15.1") + description = "(VMware only) true if Instance deployments should preserve all the configurations defined for this Template", since = "4.15.1") protected Boolean deployAsIs; @Parameter(name=ApiConstants.FOR_CKS, @@ -180,7 +180,7 @@ public class RegisterTemplateCmd extends BaseCmd implements UserCmd { private String templateType; @Parameter(name = ApiConstants.ARCH, type = CommandType.STRING, - description = "the CPU arch of the template. Valid options are: x86_64, aarch64", + description = "the CPU arch of the template. Valid options are: x86_64, aarch64, s390x", since = "4.20") private String arch; @@ -279,7 +279,7 @@ public String getChecksum() { } public String getTemplateTag() { - return templateTag; + return StringUtils.isBlank(templateTag) ? null : templateTag; } public Map getDetails() { @@ -366,7 +366,7 @@ public void execute() throws ResourceAllocationException { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to register template"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to register Template"); } } catch (URISyntaxException ex1) { logger.info(ex1); @@ -393,7 +393,7 @@ protected void validateParameters() { .isFunctionalitySupported(Hypervisor.HypervisorType.Functionality.DirectDownloadTemplate) || getHypervisor().equalsIgnoreCase(customHypervisor))) { throw new ServerApiException(ApiErrorCode.PARAM_ERROR, String.format("Parameter directdownload " + - "is only allowed for KVM or %s templates", customHypervisor)); + "is only allowed for KVM or %s Templates", customHypervisor)); } if (!isDeployAsIs() && osTypeId == null) { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/template/UpdateTemplateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/template/UpdateTemplateCmd.java index 20849d1ba6c5..56d50285692d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/template/UpdateTemplateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/template/UpdateTemplateCmd.java @@ -30,7 +30,7 @@ import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.Account; -@APICommand(name = "updateTemplate", description = "Updates attributes of a template.", responseObject = TemplateResponse.class, responseView = ResponseView.Restricted, +@APICommand(name = "updateTemplate", description = "Updates attributes of a Template.", responseObject = TemplateResponse.class, responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdateTemplateCmd extends BaseUpdateTemplateOrIsoCmd implements UserCmd { private static final String s_name = "updatetemplateresponse"; @@ -40,7 +40,7 @@ public class UpdateTemplateCmd extends BaseUpdateTemplateOrIsoCmd implements Use ///////////////////////////////////////////////////// @Parameter(name = ApiConstants.TEMPLATE_TYPE, type = CommandType.STRING, - description = "the type of the template. Valid options are: USER/VNF (for all users) and SYSTEM/ROUTING/BUILTIN (for admins only).") + description = "The type of the Template. Valid options are: USER/VNF (for all users) and SYSTEM/ROUTING/BUILTIN (for admins only).") private String templateType; @Parameter(name = ApiConstants.TEMPLATE_TAG, type = CommandType.STRING, description = "the tag for this template.", since = "4.20.0") @@ -115,7 +115,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update template"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update Template"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/template/UpdateTemplatePermissionsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/template/UpdateTemplatePermissionsCmd.java index de8f09a64005..9c408238fe21 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/template/UpdateTemplatePermissionsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/template/UpdateTemplatePermissionsCmd.java @@ -24,9 +24,9 @@ import com.cloud.template.VirtualMachineTemplate; import com.cloud.user.Account; -@APICommand(name = "updateTemplatePermissions", responseObject = SuccessResponse.class, description = "Updates a template visibility permissions. " - + "A public template is visible to all accounts within the same domain. " + "A private template is visible only to the owner of the template. " - + "A privileged template is a private template with account permissions added. " + "Only accounts specified under the template permissions are visible to them.", entityType = {VirtualMachineTemplate.class}, +@APICommand(name = "updateTemplatePermissions", responseObject = SuccessResponse.class, description = "Updates a Template visibility permissions. " + + "A public Template is visible to all accounts within the same domain. " + "A private Template is visible only to the owner of the Template. " + + "A privileged Template is a private Template with account permissions added. " + "Only accounts specified under the Template permissions are visible to them.", entityType = {VirtualMachineTemplate.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdateTemplatePermissionsCmd extends BaseUpdateTemplateOrIsoPermissionsCmd { @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/DeleteUserDataCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/DeleteUserDataCmd.java index a1d1afc7b057..f6d29e5dc40c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/DeleteUserDataCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/DeleteUserDataCmd.java @@ -43,20 +43,20 @@ public class DeleteUserDataCmd extends BaseCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, required = true, entityType = UserDataResponse.class, description = "the ID of the Userdata") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, required = true, entityType = UserDataResponse.class, description = "The ID of the Userdata") private Long id; //Owner information - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the userdata. Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional account for the userdata. Must be used with domainId.") private String accountName; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "an optional domainId for the userdata. If the account parameter is used, domainId must also be used.") + description = "An optional domainId for the userdata. If the account parameter is used, domainId must also be used.") private Long domainId; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "an optional project for the userdata") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "An optional project for the userdata") private Long projectId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/LinkUserDataToTemplateCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/LinkUserDataToTemplateCmd.java index e322de00bb1b..c8c6d17d4162 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/LinkUserDataToTemplateCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/LinkUserDataToTemplateCmd.java @@ -34,7 +34,7 @@ import com.cloud.user.UserData; import com.cloud.utils.exception.CloudRuntimeException; -@APICommand(name = "linkUserDataToTemplate", description = "Link or unlink a userdata to a template.", responseObject = TemplateResponse.class, responseView = ResponseObject.ResponseView.Restricted, +@APICommand(name = "linkUserDataToTemplate", description = "Link or unlink a userdata to a Template.", responseObject = TemplateResponse.class, responseView = ResponseObject.ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, since = "4.18.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class LinkUserDataToTemplateCmd extends BaseCmd implements AdminCmd { @@ -47,24 +47,24 @@ public class LinkUserDataToTemplateCmd extends BaseCmd implements AdminCmd { @Parameter(name = ApiConstants.TEMPLATE_ID, type = CommandType.UUID, entityType = TemplateResponse.class, - description = "the ID of the template for the virtual machine") + description = "The ID of the Template for the Instance") private Long templateId; @Parameter(name = ApiConstants.ISO_ID, type = CommandType.UUID, entityType = TemplateResponse.class, - description = "the ID of the ISO for the virtual machine") + description = "The ID of the ISO for the Instance") private Long isoId; @Parameter(name = ApiConstants.USER_DATA_ID, type = CommandType.UUID, entityType = UserDataResponse.class, - description = "the ID of the userdata that has to be linked to template/ISO. If not provided existing userdata will be unlinked from the template/ISO") + description = "The ID of the userdata that has to be linked to Template/ISO. If not provided existing userdata will be unlinked from the Template/ISO") private Long userdataId; @Parameter(name = ApiConstants.USER_DATA_POLICY, type = CommandType.STRING, - description = "an optional override policy of the userdata. Possible values are - ALLOWOVERRIDE, APPEND, DENYOVERRIDE. Default policy is allowoverride") + description = "An optional override policy of the userdata. Possible values are - ALLOWOVERRIDE, APPEND, DENYOVERRIDE. Default policy is allowoverride") private String userdataPolicy; ///////////////////////////////////////////////////// @@ -96,7 +96,7 @@ public void execute() { try { result = _templateService.linkUserDataToTemplate(this); } catch (Exception e) { - throw new CloudRuntimeException(String.format("Failed to link userdata to template, due to: %s", e.getLocalizedMessage()), e); + throw new CloudRuntimeException(String.format("Failed to link userdata to Template, due to: %s", e.getLocalizedMessage()), e); } if (result != null) { TemplateResponse response = _responseGenerator.createTemplateUpdateResponse(getResponseView(), result); @@ -109,7 +109,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to link userdata to template"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to link userdata to Template"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/ListUserDataCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/ListUserDataCmd.java index 16bf1e5c1e44..693342305242 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/ListUserDataCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/ListUserDataCmd.java @@ -38,7 +38,7 @@ public class ListUserDataCmd extends BaseListProjectAndAccountResourcesCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserDataResponse.class, description = "the ID of the Userdata") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserDataResponse.class, description = "The ID of the Userdata") private Long id; @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Userdata name to look for") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/RegisterUserDataCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/RegisterUserDataCmd.java index 185c9c05b1ca..cbbe76748143 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/RegisterUserDataCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/userdata/RegisterUserDataCmd.java @@ -46,9 +46,20 @@ public class RegisterUserDataCmd extends BaseRegisterUserDataCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.USER_DATA, type = CommandType.STRING, required = true, description = "User data content", length = 1048576) + @Parameter(name = ApiConstants.USER_DATA, + type = CommandType.STRING, + required = true, + description = "Base64 encoded User Data content. " + + "Using HTTP GET (via querystring), you can send up to 4KB of data after base64 encoding. " + + "Using HTTP POST (via POST body), you can send up to 32KB of data after base64 encoding, " + + "which can be increased upto 1MB using the vm.userdata.max.length setting", + length = 1048576) protected String userData; + ///////////////////////////////////////////////////// + /////////////////// Accessors /////////////////////// + ///////////////////////////////////////////////////// + public String getUserData() { return userData; } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java index e76a75ae398a..3882b157e6e8 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddIpToVmNicCmd.java @@ -50,7 +50,7 @@ public class AddIpToVmNicCmd extends BaseAsyncCreateCmd { ///////////////////////////////////////////////////// //////////////// 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") + @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") @@ -67,7 +67,7 @@ public String getEntityTable() { private long getNetworkId() { Nic nic = _entityMgr.findById(Nic.class, nicId); if (nic == null) { - throw new InvalidParameterValueException("Can't find network id for specified nic"); + throw new InvalidParameterValueException("Can't find Network ID for specified NIC"); } return nic.getNetworkId(); } @@ -89,7 +89,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "associating ip to nic id=" + this._uuidMgr.getUuid(Nic.class, getNicId()) + " belonging to network id=" + this._uuidMgr.getUuid(Network.class, getNetworkId()); + return "Associating IP to NIC id=" + this._uuidMgr.getUuid(Nic.class, getNicId()) + " belonging to Network id=" + this._uuidMgr.getUuid(Network.class, getNetworkId()); } ///////////////////////////////////////////////////// @@ -117,14 +117,14 @@ public void execute() throws ResourceUnavailableException, ResourceAllocationExc success = _networkService.configureNicSecondaryIp(result, isZoneSGEnabled()); if (success == false) { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to set security group rules for the secondary ip"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to set security group rules for the secondary IP"); } NicSecondaryIpResponse response = _responseGenerator.createSecondaryIPToNicResponse(result); response.setResponseName(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to assign secondary ip to nic"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to assign secondary IP to NIC"); } } @@ -142,7 +142,7 @@ public ApiCommandResourceType getApiResourceType() { public long getEntityOwnerId() { Nic nic = _entityMgr.findById(Nic.class, nicId); if (nic == null) { - throw new InvalidParameterValueException("Can't find nic for id specified"); + throw new InvalidParameterValueException("Can't find NIC for id specified"); } long vmId = nic.getInstanceId(); VirtualMachine vm = _entityMgr.findById(VirtualMachine.class, vmId); @@ -166,11 +166,11 @@ public void create() throws ResourceAllocationException { setEntityUuid(result.getUuid()); } } catch (InsufficientAddressCapacityException e) { - throw new InvalidParameterValueException("Allocating guest ip for nic failed : " + e.getMessage()); + throw new InvalidParameterValueException("Allocating guest IP for NIC failed : " + e.getMessage()); } if (result == null) { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to assign secondary ip to nic"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to assign secondary IP to NIC"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddNicToVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddNicToVMCmd.java index ecd066d98cd5..cf91e15601ba 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddNicToVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/AddNicToVMCmd.java @@ -47,7 +47,7 @@ import com.cloud.utils.net.NetUtils; import com.cloud.vm.VirtualMachine; -@APICommand(name = "addNicToVirtualMachine", description = "Adds VM to specified network by creating a NIC", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "addNicToVirtualMachine", description = "Adds Instance to specified Network by creating a NIC", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class AddNicToVMCmd extends BaseAsyncCmd implements UserCmd { private static final String s_name = "addnictovirtualmachineresponse"; @@ -57,19 +57,19 @@ public class AddNicToVMCmd extends BaseAsyncCmd implements UserCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType=UserVmResponse.class, - required=true, description="Virtual Machine ID") + required=true, description = "Instance ID") private Long vmId; @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, required = true, description = "Network ID") private Long netId; - @Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, description = "IP Address for the new network") + @Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, description = "IP Address for the new Network") private String ipaddr; - @Parameter(name = ApiConstants.MAC_ADDRESS, type = CommandType.STRING, description = "Mac Address for the new network") + @Parameter(name = ApiConstants.MAC_ADDRESS, type = CommandType.STRING, description = "Mac Address for the new Network") private String macaddr; - @Parameter(name = ApiConstants.DHCP_OPTIONS, type = CommandType.MAP, description = "DHCP options which are passed to the nic" + @Parameter(name = ApiConstants.DHCP_OPTIONS, type = CommandType.MAP, description = "DHCP options which are passed to the NIC" + " Example: dhcpoptions[0].dhcp:114=url&dhcpoptions[0].dhcp:66=www.test.com") private Map dhcpOptions; @@ -121,7 +121,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Adding network " + this._uuidMgr.getUuid(Network.class, getNetworkId()) + " to user vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()); + return "Adding Network " + this._uuidMgr.getUuid(Network.class, getNetworkId()) + " to User Instance: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()); } @Override @@ -177,7 +177,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add NIC to vm. Refer to server logs for details."); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add NIC to Instance. Refer to server logs for details."); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/BaseDeployVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/BaseDeployVMCmd.java index ecbde47692f2..a72fdee3a58d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/BaseDeployVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/BaseDeployVMCmd.java @@ -416,9 +416,7 @@ public Map getVmNetworkMap() { nic = null; } String networkUuid = entry.get(VmDetailConstants.NETWORK); - if (logger.isTraceEnabled()) { - logger.trace(String.format("nic, '%s', goes on net, '%s'", nic, networkUuid)); - } + logger.trace("Checking if NIC '{}' can be mapped on network '{}'", nic, networkUuid); if (nic == null || StringUtils.isEmpty(networkUuid) || _entityMgr.findByUuid(Network.class, networkUuid) == null) { throw new InvalidParameterValueException(String.format("Network ID: %s for NIC ID: %s is invalid", networkUuid, nic)); } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/CreateVMFromBackupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/CreateVMFromBackupCmd.java index 04e413ed67ab..e17ba9c2d705 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/CreateVMFromBackupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/CreateVMFromBackupCmd.java @@ -137,7 +137,7 @@ public void execute () { message.append(", Please check the affinity groups provided, there may not be sufficient capacity to follow them"); } } - logger.info(String.format("%s: %s", message.toString(), ex.getLocalizedMessage())); + logger.info("{}: {}", message.toString(), ex.getLocalizedMessage()); logger.debug(message.toString(), ex); throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, message.toString()); } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/CreateVMScheduleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/CreateVMScheduleCmd.java index 5811eb1abfc5..7e9bdd942ed7 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/CreateVMScheduleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/CreateVMScheduleCmd.java @@ -32,7 +32,7 @@ import javax.inject.Inject; import java.util.Date; -@APICommand(name = "createVMSchedule", description = "Create VM Schedule", responseObject = VMScheduleResponse.class, +@APICommand(name = "createVMSchedule", description = "Create Instance Schedule", responseObject = VMScheduleResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, since = "4.19.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class CreateVMScheduleCmd extends BaseCmd { @@ -44,7 +44,7 @@ public class CreateVMScheduleCmd extends BaseCmd { type = CommandType.UUID, entityType = UserVmResponse.class, required = true, - description = "ID of the VM for which schedule is to be defined") + description = "ID of the Instance for which schedule is to be defined") private Long vmId; @Parameter(name = ApiConstants.DESCRIPTION, @@ -56,7 +56,7 @@ public class CreateVMScheduleCmd extends BaseCmd { @Parameter(name = ApiConstants.SCHEDULE, type = CommandType.STRING, required = true, - description = "Schedule for action on VM in cron format. e.g. '0 15 10 * *' for 'at 15:00 on 10th day of every month'") + description = "Schedule for action on Instance in cron format. e.g. '0 15 10 * *' for 'at 15:00 on 10th day of every month'") private String schedule; @Parameter(name = ApiConstants.TIMEZONE, @@ -68,27 +68,27 @@ public class CreateVMScheduleCmd extends BaseCmd { @Parameter(name = ApiConstants.ACTION, type = CommandType.STRING, required = true, - description = "Action to take on the VM (start/stop/reboot/force_stop/force_reboot).") + description = "Action to take on the Instance (start/stop/reboot/force_stop/force_reboot).") private String action; @Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, required = false, - description = "start date from which the schedule becomes active. Defaults to current date plus 1 minute." + description = "Start date from which the schedule becomes active. Defaults to current date plus 1 minute." + "Use format \"yyyy-MM-dd hh:mm:ss\")") private Date startDate; @Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, required = false, - description = "end date after which the schedule becomes inactive" + description = "End date after which the schedule becomes inactive" + "Use format \"yyyy-MM-dd hh:mm:ss\")") private Date endDate; @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, required = false, - description = "Enable VM schedule. Defaults to true") + description = "Enable Instance schedule. Defaults to true") private Boolean enabled; ///////////////////////////////////////////////////// @@ -145,7 +145,7 @@ public void execute() { public long getEntityOwnerId() { VirtualMachine vm = _entityMgr.findById(VirtualMachine.class, getVmId()); if (vm == null) { - throw new InvalidParameterValueException(String.format("Unable to find VM by id=%d", getVmId())); + throw new InvalidParameterValueException(String.format("Unable to find Instance by id=%d", getVmId())); } return vm.getAccountId(); } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeleteVMScheduleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeleteVMScheduleCmd.java index 775a902e0bb9..f34d07b045d9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeleteVMScheduleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeleteVMScheduleCmd.java @@ -37,7 +37,7 @@ import java.util.Collections; import java.util.List; -@APICommand(name = "deleteVMSchedule", description = "Delete VM Schedule.", responseObject = SuccessResponse.class, +@APICommand(name = "deleteVMSchedule", description = "Delete Instance Schedule.", responseObject = SuccessResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, since = "4.19.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class DeleteVMScheduleCmd extends BaseCmd { @@ -48,20 +48,20 @@ public class DeleteVMScheduleCmd extends BaseCmd { type = CommandType.UUID, entityType = UserVmResponse.class, required = true, - description = "ID of VM") + description = "ID of Instance") private Long vmId; @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VMScheduleResponse.class, required = false, - description = "ID of VM schedule") + description = "ID of Instance schedule") private Long id; @Parameter(name = ApiConstants.IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = VMScheduleResponse.class, required = false, - description = "IDs of VM schedule") + description = "IDs of Instance schedule") private List ids; ///////////////////////////////////////////////////// @@ -97,7 +97,7 @@ public void execute() { response.setObjectName(VMSchedule.class.getSimpleName().toLowerCase()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete VM Schedules"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete Instance Schedules"); } } @@ -105,7 +105,7 @@ public void execute() { public long getEntityOwnerId() { VirtualMachine vm = _entityMgr.findById(VirtualMachine.class, getVmId()); if (vm == null) { - throw new InvalidParameterValueException(String.format("Unable to find VM by id=%d", getVmId())); + throw new InvalidParameterValueException(String.format("Unable to find Instance by id=%d", getVmId())); } return vm.getAccountId(); } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java index dc1ca3583cc3..06272cadae26 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java @@ -42,8 +42,8 @@ import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.vm.VirtualMachine; -@APICommand(name = "deployVirtualMachine", description = "Creates and automatically starts a virtual machine based on a service offering, disk offering, and template.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, - requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) +@APICommand(name = "deployVirtualMachine", description = "Creates and automatically starts an Instance based on a service offering, disk offering, and Template.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, + requestHasSensitiveInfo = false) public class DeployVMCmd extends BaseDeployVMCmd { ///////////////////////////////////////////////////// @@ -51,11 +51,11 @@ public class DeployVMCmd extends BaseDeployVMCmd { ///////////////////////////////////////////////////// @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") + @Parameter(name = ApiConstants.SERVICE_OFFERING_ID, type = CommandType.UUID, entityType = ServiceOfferingResponse.class, required = true, description = "The ID of the Service offering for the Instance") private Long serviceOfferingId; @ACL - @Parameter(name = ApiConstants.TEMPLATE_ID, type = CommandType.UUID, entityType = TemplateResponse.class, description = "the ID of the template for the virtual machine") + @Parameter(name = ApiConstants.TEMPLATE_ID, type = CommandType.UUID, entityType = TemplateResponse.class, description = "The ID of the Template for the Instance") private Long templateId; @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.UUID, entityType = VolumeResponse.class, since = "4.21") @@ -87,11 +87,12 @@ public Long getSnapshotId() { public boolean isVolumeOrSnapshotProvided() { return volumeId != null || snapshotId != null; } + @Override public void execute() { UserVm result; - CallContext.current().setEventDetails("Vm Id: " + getEntityUuid()); + CallContext.current().setEventDetails("Instance Id: " + getEntityUuid()); if (getStartVm()) { try { result = _userVmService.startVirtualMachine(this); @@ -111,12 +112,12 @@ public void execute() { message.append(", Please check the affinity groups provided, there may not be sufficient capacity to follow them"); } } - logger.info(String.format("%s: %s", message.toString(), ex.getLocalizedMessage())); + logger.info("{}: {}", message.toString(), ex.getLocalizedMessage()); logger.debug(message.toString(), ex); throw new ServerApiException(ApiErrorCode.INSUFFICIENT_CAPACITY_ERROR, message.toString()); } } else { - logger.info("VM " + getEntityUuid() + " already created, load UserVm from DB"); + logger.info("Instance {} already created, load UserVm from DB", getEntityUuid()); result = _userVmService.finalizeCreateVirtualMachine(getEntityId()); } @@ -125,7 +126,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to deploy vm uuid:"+getEntityUuid()); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to deploy Instance UUID:"+getEntityUuid()); } } @@ -142,7 +143,7 @@ public void create() throws ResourceAllocationException { setEntityId(vm.getId()); setEntityUuid(vm.getUuid()); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to deploy vm"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to deploy Instance"); } } catch (InsufficientCapacityException ex) { logger.info(ex); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java index 18a9d2058a62..1ca73c0cb3cd 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/DestroyVMCmd.java @@ -41,7 +41,7 @@ import com.cloud.uservm.UserVm; import com.cloud.vm.VirtualMachine; -@APICommand(name = "destroyVirtualMachine", description = "Destroys a virtual machine.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "destroyVirtualMachine", description = "Destroys an Instance.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class DestroyVMCmd extends BaseAsyncCmd implements UserCmd { @@ -54,12 +54,12 @@ public class DestroyVMCmd extends BaseAsyncCmd implements UserCmd { @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=UserVmResponse.class, - required=true, description="The ID of the virtual machine") + required=true, description = "The ID of the Instance") private Long id; @Parameter(name = ApiConstants.EXPUNGE, type = CommandType.BOOLEAN, - description = "If true is passed, the vm is expunged immediately. False by default.", + description = "If true is passed, the Instance is expunged immediately. False by default.", since = "4.2.1") private Boolean expunge; @@ -116,7 +116,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "destroying vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); + return "destroying Instance: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); } @Override @@ -144,7 +144,7 @@ public void execute() throws ResourceUnavailableException, ConcurrentOperationEx response.setObjectName("virtualmachine"); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to destroy vm"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to destroy Instance"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/GetVMPasswordCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/GetVMPasswordCmd.java index 11534fd43759..d2e6ef9e7428 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/GetVMPasswordCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/GetVMPasswordCmd.java @@ -30,7 +30,7 @@ import com.cloud.uservm.UserVm; import com.cloud.vm.VirtualMachine; -@APICommand(name = "getVMPassword", responseObject = GetVMPasswordResponse.class, description = "Returns an encrypted password for the VM", entityType = {VirtualMachine.class}, +@APICommand(name = "getVMPassword", responseObject = GetVMPasswordResponse.class, description = "Returns an encrypted password for the Instance", entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class GetVMPasswordCmd extends BaseCmd { @@ -40,7 +40,7 @@ public class GetVMPasswordCmd extends BaseCmd { @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=UserVmResponse.class - , required=true, description="The ID of the virtual machine") + , required=true, description = "The ID of the Instance") private Long id; ///////////////////////////////////////////////////// @@ -59,7 +59,7 @@ public Long getId() { public void execute() { String passwd = _mgr.getVMPassword(this); if (passwd == null || passwd.equals("")) - throw new InvalidParameterValueException("No password for VM with id '" + getId() + "' found."); + throw new InvalidParameterValueException("No password for Instance with ID '" + getId() + "' found."); setResponseObject(new GetVMPasswordResponse(getCommandName(), passwd)); } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ListNicsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ListNicsCmd.java index 0e659fc02a1a..7d2b27e7ac5f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ListNicsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ListNicsCmd.java @@ -41,7 +41,7 @@ import com.cloud.user.Account; import com.cloud.vm.Nic; -@APICommand(name = "listNics", description = "list the vm nics IP to NIC", responseObject = NicResponse.class, +@APICommand(name = "listNics", description = "List the Instance NICs IP to NIC", responseObject = NicResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListNicsCmd extends BaseListCmd { @@ -49,16 +49,16 @@ public class ListNicsCmd extends BaseListCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NIC_ID, type = CommandType.UUID, entityType = NicResponse.class, required = false, description = "the ID of the nic to list IPs") + @Parameter(name = ApiConstants.NIC_ID, type = CommandType.UUID, entityType = NicResponse.class, required = false, description = "The ID of the NIC 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") + @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the Instance") private Long vmId; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "list nic of the specific vm's network") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "List NIC of the specific Instance's Network") private Long networkId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// @@ -155,7 +155,7 @@ public void execute() throws ResourceUnavailableException, ResourceAllocationExc this.setResponseObject(response); } } catch (Exception e) { - logger.warn("Failed to list secondary ip address per nic "); + logger.warn("Failed to list secondary ip address per NIC"); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, e.getMessage()); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ListVMScheduleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ListVMScheduleCmd.java index 3474f1ddcaad..be94315abe76 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ListVMScheduleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ListVMScheduleCmd.java @@ -31,7 +31,7 @@ import javax.inject.Inject; -@APICommand(name = "listVMSchedule", description = "List VM Schedules.", responseObject = VMScheduleResponse.class, +@APICommand(name = "listVMSchedule", description = "List Instance Schedules.", responseObject = VMScheduleResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, since = "4.19.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class ListVMScheduleCmd extends BaseListCmd { @@ -42,14 +42,14 @@ public class ListVMScheduleCmd extends BaseListCmd { type = CommandType.UUID, entityType = UserVmResponse.class, required = true, - description = "ID of the VM for which schedule is to be defined") + description = "ID of the Instance for which schedule is to be defined") private Long vmId; @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VMScheduleResponse.class, required = false, - description = "ID of VM schedule") + description = "ID of Instance schedule") private Long id; @Parameter(name = ApiConstants.ACTION, @@ -61,7 +61,7 @@ public class ListVMScheduleCmd extends BaseListCmd { @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, required = false, - description = "ID of VM schedule") + description = "ID of Instance schedule") private Boolean enabled; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java index a561b6fd24f5..46e3c7926f4e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ListVMsCmd.java @@ -64,7 +64,7 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "listVirtualMachines", description = "List the virtual machines owned by the account.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "listVirtualMachines", description = "List the Instances owned by the Account.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class ListVMsCmd extends BaseListRetrieveOnlyResourceCountCmd implements UserCmd { @@ -73,90 +73,90 @@ public class ListVMsCmd extends BaseListRetrieveOnlyResourceCountCmd implements //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.GROUP_ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class, description = "the group ID") + @Parameter(name = ApiConstants.GROUP_ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class, description = "The group ID") private Long groupId; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "the ID of the virtual machine") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "The ID of the Instance") private Long id; - @Parameter(name=ApiConstants.IDS, type=CommandType.LIST, collectionType=CommandType.UUID, entityType=UserVmResponse.class, description="the IDs of the virtual machines, mutually exclusive with id", since = "4.4") + @Parameter(name=ApiConstants.IDS, type=CommandType.LIST, collectionType=CommandType.UUID, entityType=UserVmResponse.class, description = "The IDs of the Instances, mutually exclusive with id", since = "4.4") private List ids; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "name of the virtual machine (a substring match is made against the parameter value, data for all matching VMs will be returned)") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Name of the Instance (a substring match is made against the parameter value, data for all matching Instances will be returned)") private String name; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "state of the virtual machine. Possible values are: Running, Stopped, Present, Destroyed, Expunged. Present is used for the state equal not destroyed.") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "State of the Instance. Possible values are: Running, Stopped, Present, Destroyed, Expunged. Present is used for the state equal not destroyed.") private String state; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the availability zone ID") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The availability zone ID") private Long zoneId; @Parameter(name = ApiConstants.FOR_VIRTUAL_NETWORK, type = CommandType.BOOLEAN, - description = "list by network type; true if need to list vms using Virtual Network, false otherwise") + description = "List by Network type; true if need to list Instances using Virtual Network, false otherwise") private Boolean forVirtualNetwork; - @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "list by network id") + @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, description = "List by Network ID") private Long networkId; - @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "the target hypervisor for the template") + @Parameter(name = ApiConstants.HYPERVISOR, type = CommandType.STRING, description = "The target hypervisor for the Template") private String hypervisor; @Parameter(name = ApiConstants.DETAILS, type = CommandType.LIST, collectionType = CommandType.STRING, - description = "comma separated list of vm details requested, " + description = "Comma separated list of Instance details requested, " + "value can be a list of [all, group, nics, stats, secgrp, tmpl, servoff, diskoff, backoff, iso, volume, min, affgrp]." + " When no parameters are passed, all the details are returned if list.vm.default.details.stats is true (default)," + " otherwise when list.vm.default.details.stats is false the API response will exclude the stats details.") private List viewDetails; - @Parameter(name = ApiConstants.TEMPLATE_ID, type = CommandType.UUID, entityType = TemplateResponse.class, description = "list vms by template") + @Parameter(name = ApiConstants.TEMPLATE_ID, type = CommandType.UUID, entityType = TemplateResponse.class, description = "List Instances by Template") private Long templateId; - @Parameter(name = ApiConstants.ISO_ID, type = CommandType.UUID, entityType = IsoVmResponse.class, description = "list vms by iso") + @Parameter(name = ApiConstants.ISO_ID, type = CommandType.UUID, entityType = IsoVmResponse.class, description = "List Instances by ISO") private Long isoId; - @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "list vms by vpc") + @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "List Instances by VPC") private Long vpcId; - @Parameter(name = ApiConstants.AFFINITY_GROUP_ID, type = CommandType.UUID, entityType = AffinityGroupResponse.class, description = "list vms by affinity group") + @Parameter(name = ApiConstants.AFFINITY_GROUP_ID, type = CommandType.UUID, entityType = AffinityGroupResponse.class, description = "List Instances by affinity group") private Long affinityGroupId; - @Parameter(name = ApiConstants.SSH_KEYPAIR, type = CommandType.STRING, description = "list vms by ssh keypair name") + @Parameter(name = ApiConstants.SSH_KEYPAIR, type = CommandType.STRING, description = "List Instances by SSH keypair name") private String keypair; - @Parameter(name = ApiConstants.SERVICE_OFFERING_ID, type = CommandType.UUID, entityType = ServiceOfferingResponse.class, description = "list by the service offering", since = "4.4") + @Parameter(name = ApiConstants.SERVICE_OFFERING_ID, type = CommandType.UUID, entityType = ServiceOfferingResponse.class, description = "List by the service offering", since = "4.4") private Long serviceOffId; - @Parameter(name = ApiConstants.BACKUP_OFFERING_ID, type = CommandType.UUID, entityType = BackupOfferingResponse.class, description = "list by the backup offering", since = "4.17") + @Parameter(name = ApiConstants.BACKUP_OFFERING_ID, type = CommandType.UUID, entityType = BackupOfferingResponse.class, description = "List by the backup offering", since = "4.17") private Long backupOffId; - @Parameter(name = ApiConstants.DISPLAY_VM, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.DISPLAY_VM, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; - @Parameter(name = ApiConstants.USER_ID, type = CommandType.UUID, entityType = UserResponse.class, required = false, description = "the user ID that created the VM and is under the account that owns the VM") + @Parameter(name = ApiConstants.USER_ID, type = CommandType.UUID, entityType = UserResponse.class, required = false, description = "The user ID that created the Instance and is under the Account that owns the Instance") private Long userId; - @Parameter(name = ApiConstants.SECURITY_GROUP_ID, type = CommandType.UUID, entityType = SecurityGroupResponse.class, description = "the security group ID", since = "4.15") + @Parameter(name = ApiConstants.SECURITY_GROUP_ID, type = CommandType.UUID, entityType = SecurityGroupResponse.class, description = "The security group ID", since = "4.15") private Long securityGroupId; - @Parameter(name = ApiConstants.HA_ENABLE, type = CommandType.BOOLEAN, description = "list by the High Availability offering; true if filtering VMs with HA enabled; false for VMs with HA disabled", since = "4.15") + @Parameter(name = ApiConstants.HA_ENABLE, type = CommandType.BOOLEAN, description = "List by the High Availability offering; true if filtering Instances with HA enabled; false for Instances with HA disabled", since = "4.15") private Boolean haEnabled; - @Parameter(name = ApiConstants.AUTOSCALE_VMGROUP_ID, type = CommandType.UUID, entityType = AutoScaleVmGroupResponse.class, description = "the ID of AutoScaling VM Group", since = "4.18.0") + @Parameter(name = ApiConstants.AUTOSCALE_VMGROUP_ID, type = CommandType.UUID, entityType = AutoScaleVmGroupResponse.class, description = "The ID of AutoScaling Instance Group", since = "4.18.0") private Long autoScaleVmGroupId; @Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN, - description = "flag to display the resource icon for VMs", since = "4.16.0.0") + description = "Flag to display the resource icon for Instances", since = "4.16.0.0") private Boolean showIcon; @Parameter(name = ApiConstants.ACCUMULATE, type = CommandType.BOOLEAN, - description = "Accumulates the VM metrics data instead of returning only the most recent data collected. The default behavior is set by the global configuration vm.stats.increment.metrics.", + description = "Accumulates the Instance metrics data instead of returning only the most recent data collected. The default behavior is set by the global configuration vm.stats.increment.metrics.", since = "4.17.0") private Boolean accumulate; - @Parameter(name = ApiConstants.USER_DATA, type = CommandType.BOOLEAN, description = "Whether to return the VMs' user data or not. By default, user data will not be returned.", since = "4.18.0.0") + @Parameter(name = ApiConstants.USER_DATA, type = CommandType.BOOLEAN, description = "Whether to return the Instances' User data or not. By default, User data will not be returned.", since = "4.18.0.0") private Boolean showUserData; @Parameter(name = ApiConstants.USER_DATA_ID, type = CommandType.UUID, entityType = UserDataResponse.class, required = false, description = "the instances by userdata", since = "4.20.1") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java index 153f5ea65636..32756755f395 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RebootVMCmd.java @@ -39,7 +39,7 @@ import com.cloud.uservm.UserVm; import com.cloud.vm.VirtualMachine; -@APICommand(name = "rebootVirtualMachine", description = "Reboots a virtual machine.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "rebootVirtualMachine", description = "Reboots an Instance.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class RebootVMCmd extends BaseAsyncCmd implements UserCmd { private static final String s_name = "rebootvirtualmachineresponse"; @@ -49,10 +49,10 @@ public class RebootVMCmd extends BaseAsyncCmd implements UserCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=UserVmResponse.class, - required=true, description="The ID of the virtual machine") + required=true, description = "The ID of the Instance") private Long id; - @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force reboot the VM (VM is Stopped and then Started)", since = "4.16.0") + @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force reboot the Instance (It is Stopped and then Started)", since = "4.16.0") private Boolean forced; @Parameter(name = ApiConstants.BOOT_INTO_SETUP, type = CommandType.BOOLEAN, required = false, description = "Boot into hardware setup menu or not", since = "4.15.0.0") @@ -100,7 +100,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "rebooting user vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); + return "Rebooting User Instance: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); } @Override @@ -123,7 +123,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to reboot vm instance"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to reboot Instance"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RemoveIpFromVmNicCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RemoveIpFromVmNicCmd.java index 2f53c3d4e4cd..09c84fdbb380 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RemoveIpFromVmNicCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RemoveIpFromVmNicCmd.java @@ -48,7 +48,7 @@ public class RemoveIpFromVmNicCmd extends BaseAsyncCmd { type = CommandType.UUID, required = true, entityType = NicSecondaryIpResponse.class, - description = "the ID of the secondary ip address to nic") + description = "The ID of the secondary ip address to NIC") private Long id; // unexposed parameter needed for events logging @@ -159,10 +159,10 @@ public void execute() throws InvalidParameterValueException { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove secondary ip address for the nic"); + 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"); + throw new InvalidParameterValueException("Removing guest IP from NIC failed"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RemoveNicFromVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RemoveNicFromVMCmd.java index d9024f340228..8a891e824eea 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RemoveNicFromVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RemoveNicFromVMCmd.java @@ -41,7 +41,7 @@ import com.cloud.uservm.UserVm; import com.cloud.vm.VirtualMachine; -@APICommand(name = "removeNicFromVirtualMachine", description = "Removes VM from specified network by deleting a NIC", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "removeNicFromVirtualMachine", description = "Removes Instance from specified Network by deleting a NIC", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class RemoveNicFromVMCmd extends BaseAsyncCmd implements UserCmd { private static final String s_name = "removenicfromvirtualmachineresponse"; @@ -51,7 +51,7 @@ public class RemoveNicFromVMCmd extends BaseAsyncCmd implements UserCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType=UserVmResponse.class, - required=true, description="Virtual Machine ID") + required=true, description = "Instance ID") private Long vmId; @Parameter(name = ApiConstants.NIC_ID, type = CommandType.UUID, entityType = NicResponse.class, required = true, description = "NIC ID") @@ -89,7 +89,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Removing NIC " + this._uuidMgr.getUuid(Nic.class, getNicId()) + " from user vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()); + return "Removing NIC " + this._uuidMgr.getUuid(Nic.class, getNicId()) + " from User Instance: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()); } @Override @@ -113,7 +113,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove NIC from vm, see error log for details"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to remove NIC from Instance, see error log for details"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java index 7270004aeed8..5302675fb5f1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMPasswordCmd.java @@ -39,8 +39,8 @@ import com.cloud.uservm.UserVm; import com.cloud.vm.VirtualMachine; -@APICommand(name = "resetPasswordForVirtualMachine", responseObject=UserVmResponse.class, description="Resets the password for virtual machine. " + - "The virtual machine must be in a \"Stopped\" state and the template must already " + +@APICommand(name = "resetPasswordForVirtualMachine", responseObject=UserVmResponse.class, description = "Resets the password for the Instance. " + + "The Instance must be in a \"Stopped\" state and the Template must already " + "support this feature for this command to take effect. [async]", responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class ResetVMPasswordCmd extends BaseAsyncCmd implements UserCmd { @@ -52,7 +52,7 @@ public class ResetVMPasswordCmd extends BaseAsyncCmd implements UserCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=UserVmResponse.class, - required=true, description="The ID of the virtual machine") + required=true, description = "The ID of the Instance") private Long id; @Parameter(name=ApiConstants.PASSWORD, type=CommandType.STRING, description="The new password of the virtual machine. If null, a random password will be generated for the VM.", since="4.19.0") @@ -101,7 +101,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "resetting password for vm: " + getId(); + return "resetting password for Instance: " + getId(); } @Override @@ -120,9 +120,9 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE UserVm vm = _responseGenerator.findUserVmById(getId()); if (StringUtils.isBlank(password)) { password = _mgr.generateRandomPassword(); - logger.debug(String.format("Resetting VM [%s] password to a randomly generated password.", vm.getUuid())); + logger.debug("Resetting VM [{}] password to a randomly generated password.", vm.getUuid()); } else { - logger.debug(String.format("Resetting VM [%s] password to password defined by user.", vm.getUuid())); + logger.debug("Resetting VM [{}] password to password defined by user.", vm.getUuid()); } CallContext.current().setEventDetails("Vm Id: " + getId()); UserVm result = _userVmService.resetVMPassword(this, password); @@ -131,7 +131,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to reset vm password"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to reset Instance password"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java index a4019411e1d2..530677edf383 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMSSHKeyCmd.java @@ -44,8 +44,8 @@ import java.util.ArrayList; import java.util.List; -@APICommand(name = "resetSSHKeyForVirtualMachine", responseObject = UserVmResponse.class, description = "Resets the SSH Key for virtual machine. " + - "The virtual machine must be in a \"Stopped\" state. [async]", responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "resetSSHKeyForVirtualMachine", responseObject = UserVmResponse.class, description = "Resets the SSH Key for the Instance. " + + "The Instance must be in a \"Stopped\" state. [async]", responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class ResetVMSSHKeyCmd extends BaseAsyncCmd implements UserCmd { @@ -56,27 +56,27 @@ public class ResetVMSSHKeyCmd extends BaseAsyncCmd implements UserCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the virtual machine") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the Instance") private Long id; @Deprecated - @Parameter(name = ApiConstants.SSH_KEYPAIR, type = CommandType.STRING ,description = "name of the ssh key pair used to login to the virtual machine") + @Parameter(name = ApiConstants.SSH_KEYPAIR, type = CommandType.STRING ,description = "Name of the SSH key pair used to login to the Instance") String name; - @Parameter(name = ApiConstants.SSH_KEYPAIRS, type = CommandType.LIST, collectionType = CommandType.STRING, since="4.17", description = "names of the ssh key pairs to be used to login to the virtual machine") + @Parameter(name = ApiConstants.SSH_KEYPAIRS, type = CommandType.LIST, collectionType = CommandType.STRING, since="4.17", description = "Names of the SSH key pairs to be used to login to the Instance") List names; //Owner information - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the ssh key. Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional Account for the SSH key. Must be used with domainId.") private String accountName; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "an optional domainId for the virtual machine. If the account parameter is used, domainId must also be used.") + description = "An optional domainId for the Instance. If the Account parameter is used, domainId must also be used.") private Long domainId; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "an optional project for the ssh key") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "An optional project for the SSH key") private Long projectId; ///////////////////////////////////////////////////// @@ -121,7 +121,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "resetting SSHKey for vm: " + getId(); + return "resetting SSHKey for Instance: " + getId(); } @Override @@ -160,7 +160,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to reset vm SSHKey"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to reset SSHKey"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMUserDataCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMUserDataCmd.java index 0ecf4ff13845..9fb60b537c5a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMUserDataCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ResetVMUserDataCmd.java @@ -40,8 +40,8 @@ import java.util.Map; -@APICommand(name = "resetUserDataForVirtualMachine", responseObject = UserVmResponse.class, description = "Resets the UserData for virtual machine. " + - "The virtual machine must be in a \"Stopped\" state.", responseView = ResponseObject.ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "resetUserDataForVirtualMachine", responseObject = UserVmResponse.class, description = "Resets the UserData for Instance. " + + "The Instance must be in a \"Stopped\" state.", responseView = ResponseObject.ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true, since = "4.18.0") public class ResetVMUserDataCmd extends BaseCmd implements UserCmd { @@ -52,12 +52,12 @@ public class ResetVMUserDataCmd extends BaseCmd implements UserCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @ACL(accessType = SecurityChecker.AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the virtual machine") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = UserVmResponse.class, required = true, description = "The ID of the Instance") private Long id; @Parameter(name = ApiConstants.USER_DATA, type = CommandType.STRING, - description = "an optional binary data that can be sent to the virtual machine upon a successful deployment. " + + description = "An optional binary data that can be sent to the Instance upon a successful deployment. " + "This binary data must be base64 encoded before adding it to the request. " + "Using HTTP GET (via querystring), you can send up to 4KB of data after base64 encoding. " + "Using HTTP POST (via POST body), you can send up to 1MB of data after base64 encoding. " + @@ -65,23 +65,23 @@ public class ResetVMUserDataCmd extends BaseCmd implements UserCmd { length = 1048576) private String userData; - @Parameter(name = ApiConstants.USER_DATA_ID, type = CommandType.UUID, entityType = UserDataResponse.class, description = "the ID of the userdata") + @Parameter(name = ApiConstants.USER_DATA_ID, type = CommandType.UUID, entityType = UserDataResponse.class, description = "The ID of the userdata") private Long userdataId; - @Parameter(name = ApiConstants.USER_DATA_DETAILS, type = CommandType.MAP, description = "used to specify the parameters values for the variables in userdata.") + @Parameter(name = ApiConstants.USER_DATA_DETAILS, type = CommandType.MAP, description = "Used to specify the parameters values for the variables in userdata.") private Map userdataDetails; //Owner information - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the virtual machine. Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional Account for the Instance. Must be used with domainId.") private String accountName; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "an optional domainId for the virtual machine. If the account parameter is used, domainId must also be used.") + description = "An optional domainId for the Instance. If the Account parameter is used, domainId must also be used.") private Long domainId; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "an optional project for the virtual machine") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "An optional project for the Instance") private Long projectId; ///////////////////////////////////////////////////// @@ -151,7 +151,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to reset vm SSHKey"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to reset SSHKey"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java index 3839049eee5e..b92b2d1b3c16 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/RestoreVMCmd.java @@ -44,7 +44,7 @@ import java.util.Map; -@APICommand(name = "restoreVirtualMachine", description = "Restore a VM to original template/ISO or new template/ISO", responseObject = UserVmResponse.class, since = "3.0.0", responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "restoreVirtualMachine", description = "Restore an Instance to original Template/ISO or new Template/ISO", responseObject = UserVmResponse.class, since = "3.0.0", responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class RestoreVMCmd extends BaseAsyncCmd implements UserCmd { @@ -52,13 +52,13 @@ public class RestoreVMCmd extends BaseAsyncCmd implements UserCmd { @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType=UserVmResponse.class, - required=true, description="Virtual Machine ID") + required=true, description = "Instance 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. This can be an ISO id in case of restore vm deployed using ISO") + description = "An optional Template Id to restore Instance from the new Template. This can be an ISO id in case of restore Instance deployed using ISO") private Long templateId; @Parameter(name = ApiConstants.DISK_OFFERING_ID, @@ -90,7 +90,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Restore a VM to original template or specific snapshot"; + return "Restore an Instance to original Template or specific Snapshot"; } @Override @@ -104,7 +104,7 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacityE response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to restore vm " + getVmId()); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to restore Instance " + getVmId()); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java index 3af6d5245f00..cd3aeefc44b2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/ScaleVMCmd.java @@ -45,7 +45,7 @@ import com.cloud.vm.VirtualMachine; -@APICommand(name = "scaleVirtualMachine", description = "Scales the virtual machine to a new service offering. This command also considers the volume size in the service offering or disk offering linked to the new service offering and apply all characteristics to the root volume.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "scaleVirtualMachine", description = "Scales the Instance to a new service offering. This command also considers the volume size in the service offering or disk offering linked to the new service offering and apply all characteristics to the root volume.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ScaleVMCmd extends BaseAsyncCmd implements UserCmd { private static final String s_name = "scalevirtualmachineresponse"; @@ -55,14 +55,14 @@ public class ScaleVMCmd extends BaseAsyncCmd implements UserCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=UserVmResponse.class, - required=true, description="The ID of the virtual machine") + required=true, description = "The ID of the Instance") private Long id; @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") + required=true, description = "The ID of the service offering for the Instance") private Long serviceOfferingId; - @Parameter(name = ApiConstants.DETAILS, type = BaseCmd.CommandType.MAP, description = "name value pairs of custom parameters for cpuspeed, memory and cpunumber. example details[i].name=value") + @Parameter(name = ApiConstants.DETAILS, type = BaseCmd.CommandType.MAP, description = "Name value pairs of custom parameters for cpuspeed, memory and cpunumber. example details[i].name=value") private Map details; @Parameter(name = ApiConstants.MIN_IOPS, type = CommandType.LONG, required = false, description = "New minimum number of IOPS for the custom disk offering", since = "4.17") @@ -148,7 +148,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "upgrading vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()) + " to service offering: " + this._uuidMgr.getUuid(ServiceOffering.class, getServiceOfferingId()); + return "Upgrading Instance: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()) + " to service offering: " + this._uuidMgr.getUuid(ServiceOffering.class, getServiceOfferingId()); } @Override @@ -185,7 +185,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to scale vm"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to scale Instance"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java index c0311d599974..af7058d44923 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/StartVMCmd.java @@ -47,7 +47,7 @@ import com.cloud.utils.exception.ExecutionException; import com.cloud.vm.VirtualMachine; -@APICommand(name = "startVirtualMachine", responseObject = UserVmResponse.class, description = "Starts a virtual machine.", responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "startVirtualMachine", responseObject = UserVmResponse.class, description = "Starts an Instance.", responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class StartVMCmd extends BaseAsyncCmd implements UserCmd { @@ -58,37 +58,37 @@ public class StartVMCmd extends BaseAsyncCmd implements UserCmd { // /////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType=UserVmResponse.class, - required = true, description = "The ID of the virtual machine") + required = true, description = "The ID of the Instance") private Long id; @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, - description = "destination Pod ID to deploy the VM to - parameter available for root admin only") + description = "Destination Pod ID to deploy the Instance to - parameter available for root admin only") private Long podId; @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, - description = "destination Cluster ID to deploy the VM to - parameter available for root admin only") + description = "Destination Cluster ID to deploy the Instance to - parameter available for root admin only") private Long clusterId; @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, - description = "destination Host ID to deploy the VM to - parameter available for root admin only", + description = "Destination Host ID to deploy the Instance to - parameter available for root admin only", since = "3.0.1") private Long hostId; @Parameter(name = ApiConstants.CONSIDER_LAST_HOST, type = CommandType.BOOLEAN, - description = "True by default, CloudStack will firstly try to start the VM on the last host where it run on before stopping, if destination host is not specified. " + - "If false, CloudStack will not consider the last host and start the VM by normal process.", + description = "True by default, CloudStack will firstly try to start the Instance on the last host where it run on before stopping, if destination host is not specified. " + + "If false, CloudStack will not consider the last host and start the Instance by normal process.", since = "4.18.0", authorized = {RoleType.Admin}) private Boolean considerLastHost; - @Parameter(name = ApiConstants.DEPLOYMENT_PLANNER, type = CommandType.STRING, description = "Deployment planner to use for vm allocation. Available to ROOT admin only", since = "4.4", authorized = { RoleType.Admin }) + @Parameter(name = ApiConstants.DEPLOYMENT_PLANNER, type = CommandType.STRING, description = "Deployment planner to use for Instance allocation. Available to ROOT admin only", since = "4.4", authorized = { RoleType.Admin }) private String deploymentPlanner; @Parameter(name = ApiConstants.BOOT_INTO_SETUP, type = CommandType.BOOLEAN, required = false, description = "Boot into hardware setup menu or not", since = "4.15.0.0") @@ -161,7 +161,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "starting user vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); + return "Starting User Instance: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); } @Override @@ -187,7 +187,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to start a vm"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to start an Instance"); } } catch (ConcurrentOperationException ex) { logger.warn("Exception: ", ex); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java index bfd5d8d07f61..d20f27eb56db 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/StopVMCmd.java @@ -37,7 +37,7 @@ import com.cloud.uservm.UserVm; import com.cloud.vm.VirtualMachine; -@APICommand(name = "stopVirtualMachine", responseObject = UserVmResponse.class, description = "Stops a virtual machine.", responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "stopVirtualMachine", responseObject = UserVmResponse.class, description = "Stops an Instance.", responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class StopVMCmd extends BaseAsyncCmd implements UserCmd { @@ -49,12 +49,12 @@ public class StopVMCmd extends BaseAsyncCmd implements UserCmd { @ACL(accessType = AccessType.OperateEntry) @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType=UserVmResponse.class, - required = true, description = "The ID of the virtual machine") + required = true, description = "The ID of the Instance") private Long id; - @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the VM " - + "(vm is marked as Stopped even when command fails to be send to the backend, otherwise a force poweroff is attempted)." - + " This option is to be used if the caller knows the VM is stopped and should be marked as such.") + @Parameter(name = ApiConstants.FORCED, type = CommandType.BOOLEAN, required = false, description = "Force stop the Instance " + + "(Instance is marked as Stopped even when command fails to be send to the backend, otherwise a force poweroff is attempted)." + + " This option is to be used if the caller knows the Instance is stopped and should be marked as such.") private Boolean forced; // /////////////////////////////////////////////////// @@ -96,7 +96,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "stopping user vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); + return "Stopping User Instance: " + this._uuidMgr.getUuid(VirtualMachine.class, getId()); } @Override @@ -125,7 +125,7 @@ public void execute() throws ServerApiException, ConcurrentOperationException { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to stop vm"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to stop Instance"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateDefaultNicForVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateDefaultNicForVMCmd.java index 837bde06a6ca..591d3871493e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateDefaultNicForVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateDefaultNicForVMCmd.java @@ -41,7 +41,7 @@ import com.cloud.uservm.UserVm; import com.cloud.vm.VirtualMachine; -@APICommand(name = "updateDefaultNicForVirtualMachine", description = "Changes the default NIC on a VM", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "updateDefaultNicForVirtualMachine", description = "Changes the default NIC on an Instance", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class UpdateDefaultNicForVMCmd extends BaseAsyncCmd implements UserCmd { private static final String s_name = "updatedefaultnicforvirtualmachineresponse"; @@ -52,7 +52,7 @@ public class UpdateDefaultNicForVMCmd extends BaseAsyncCmd implements UserCmd { @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType=UserVmResponse.class, - required=true, description="Virtual Machine ID") + required=true, description = "Instance ID") private Long vmId; @Parameter(name = ApiConstants.NIC_ID, type = CommandType.UUID, entityType = NicResponse.class, required = true, description = "NIC ID") @@ -90,7 +90,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "Updating NIC " + this._uuidMgr.getUuid(Nic.class, getNicId()) + " on user vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()); + return "Updating NIC " + this._uuidMgr.getUuid(Nic.class, getNicId()) + " on User Instance: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()); } @Override @@ -114,7 +114,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to set default nic for VM. Refer to server logs for details."); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to set default NIC for Instance. Refer to server logs for details."); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java index 7906ec632a49..ddc2c06eb097 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVMCmd.java @@ -51,9 +51,9 @@ import java.util.List; import java.util.Map; -@APICommand(name = "updateVirtualMachine", description="Updates properties of a virtual machine. The VM has to be stopped and restarted for the " + - "new properties to take effect. UpdateVirtualMachine does not first check whether the VM is stopped. " + - "Therefore, stop the VM manually before issuing this call.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "updateVirtualMachine", description = "Updates properties of an Instance. The Instance has to be stopped and restarted for the " + + "new properties to take effect. UpdateVirtualMachine does not first check whether the Instance is stopped. " + + "Therefore, stop the Instance manually before issuing this call.", responseObject = UserVmResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class UpdateVMCmd extends BaseCustomIdCmd implements SecurityGroupAction, UserCmd { private static final String s_name = "updatevirtualmachineresponse"; @@ -62,29 +62,29 @@ public class UpdateVMCmd extends BaseCustomIdCmd implements SecurityGroupAction, //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.DISPLAY_NAME, type = CommandType.STRING, description = "user generated name") + @Parameter(name = ApiConstants.DISPLAY_NAME, type = CommandType.STRING, description = "User generated name") private String displayName; - @Parameter(name = ApiConstants.GROUP, type = CommandType.STRING, description = "group of the virtual machine") + @Parameter(name = ApiConstants.GROUP, type = CommandType.STRING, description = "Group of the Instance") private String group; - @Parameter(name = ApiConstants.HA_ENABLE, type = CommandType.BOOLEAN, description = "true if high-availability is enabled for the virtual machine, false otherwise") + @Parameter(name = ApiConstants.HA_ENABLE, type = CommandType.BOOLEAN, description = "True if high-availability is enabled for the Instance, false otherwise") private Boolean haEnable; @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=UserVmResponse.class, - required=true, description="The ID of the virtual machine") + required=true, description = "The ID of the Instance") private Long id; @Parameter(name = ApiConstants.OS_TYPE_ID, type = CommandType.UUID, entityType = GuestOSResponse.class, - description = "the ID of the OS type that best represents this VM.") + description = "The ID of the OS type that best represents this Instance.") private Long osTypeId; @Parameter(name = ApiConstants.USER_DATA, type = CommandType.STRING, - description = "an optional binary data that can be sent to the virtual machine upon a successful deployment. " + + description = "An optional binary data that can be sent to the Instance upon a successful deployment. " + "This binary data must be base64 encoded before adding it to the request. " + "Using HTTP GET (via querystring), you can send up to 4KB of data after base64 encoding. " + "Using HTTP POST (via POST body), you can send up to 1MB of data after base64 encoding. " + @@ -93,24 +93,24 @@ public class UpdateVMCmd extends BaseCustomIdCmd implements SecurityGroupAction, since = "4.16.0") private String userData; - @Parameter(name = ApiConstants.USER_DATA_ID, type = CommandType.UUID, entityType = UserDataResponse.class, description = "the ID of the userdata", since = "4.18") + @Parameter(name = ApiConstants.USER_DATA_ID, type = CommandType.UUID, entityType = UserDataResponse.class, description = "The ID of the userdata", since = "4.18") private Long userdataId; - @Parameter(name = ApiConstants.USER_DATA_DETAILS, type = CommandType.MAP, description = "used to specify the parameters values for the variables in userdata.", since = "4.18") + @Parameter(name = ApiConstants.USER_DATA_DETAILS, type = CommandType.MAP, description = "Used to specify the parameters values for the variables in userdata.", since = "4.18") private Map userdataDetails; - @Parameter(name = ApiConstants.DISPLAY_VM, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vm to the end user or not.", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.DISPLAY_VM, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the Instance to the end User or not.", authorized = {RoleType.Admin}) private Boolean displayVm; @Parameter(name = ApiConstants.IS_DYNAMICALLY_SCALABLE, type = CommandType.BOOLEAN, - description = "true if VM contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory. This can be updated only when dynamic scaling is enabled on template, service offering and the corresponding global setting") + description = "True if Instance contains XS/VMWare tools in order to support dynamic scaling of Instance cpu/memory. This can be updated only when dynamic scaling is enabled on Template, service offering and the corresponding global setting") protected Boolean isDynamicallyScalable; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "new host name of the vm. The VM has to be stopped/started for this update to take affect", validations = {ApiArgValidator.RFCComplianceDomainName}, since = "4.4") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "New host name of the Instance. The Instance has to be stopped/started for this update to take affect", validations = {ApiArgValidator.RFCComplianceDomainName}, since = "4.4") private String name; - @Parameter(name = ApiConstants.INSTANCE_NAME, type = CommandType.STRING, description = "instance name of the user vm", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.INSTANCE_NAME, type = CommandType.STRING, description = "Instance name of the User Instance", since = "4.4", authorized = {RoleType.Admin}) private String instanceName; @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "Details in key/value pairs. 'extraconfig' is not allowed to be passed in details.") @@ -121,7 +121,7 @@ public class UpdateVMCmd extends BaseCustomIdCmd implements SecurityGroupAction, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = SecurityGroupResponse.class, - description = "list of security group ids to be applied on the virtual machine.") + description = "List of security group ids to be applied on the Instance.") private List securityGroupIdList; @ACL @@ -129,22 +129,22 @@ public class UpdateVMCmd extends BaseCustomIdCmd implements SecurityGroupAction, type = CommandType.LIST, collectionType = CommandType.STRING, entityType = SecurityGroupResponse.class, - description = "comma separated list of security groups names that going to be applied to the virtual machine. " + - "Should be passed only when vm is created from a zone with Basic Network support. " + + description = "Comma separated list of security groups names that going to be applied to the Instance. " + + "Should be passed only when Instance is created from a zone with Basic Network support. " + "Mutually exclusive with securitygroupids parameter" ) private List securityGroupNameList; @Parameter(name = ApiConstants.CLEAN_UP_DETAILS, type = CommandType.BOOLEAN, - description = "optional boolean field, which indicates if details should be cleaned up or not (if set to true, details removed for this resource, details field ignored; if false or not set, no action)") + description = "Optional boolean field, which indicates if details should be cleaned up or not (if set to true, details removed for this resource, details field ignored; if false or not set, no action)") private Boolean cleanupDetails; - @Parameter(name = ApiConstants.DHCP_OPTIONS_NETWORK_LIST, type = CommandType.MAP, description = "DHCP options which are passed to the VM on start up" + @Parameter(name = ApiConstants.DHCP_OPTIONS_NETWORK_LIST, type = CommandType.MAP, description = "DHCP options which are passed to the Instance on start up" + " Example: dhcpoptionsnetworklist[0].dhcp:114=url&dhcpoptionsetworklist[0].networkid=networkid&dhcpoptionsetworklist[0].dhcp:66=www.test.com") private Map dhcpOptionsNetworkList; - @Parameter(name = ApiConstants.EXTRA_CONFIG, type = CommandType.STRING, since = "4.12", description = "an optional URL encoded string that can be passed to the virtual machine upon successful deployment", length = 5120) + @Parameter(name = ApiConstants.EXTRA_CONFIG, type = CommandType.STRING, since = "4.12", description = "An optional URL encoded string that can be passed to the Instance upon successful deployment", length = 5120) private String extraConfig; @Parameter(name = ApiConstants.DELETE_PROTECTION, @@ -245,7 +245,7 @@ public Map> getDhcpOptionsMap() { String networkId = dhcpNetworkOptions.get(ApiConstants.NETWORK_ID); if(networkId == null) { - throw new IllegalArgumentException("No networkid specified when providing extra dhcp options."); + throw new IllegalArgumentException("No networkid specified when providing extra DHCP options."); } Map dhcpOptionsForNetwork = new HashMap<>(); @@ -300,19 +300,19 @@ public long getEntityOwnerId() { @Override public void execute() throws ResourceUnavailableException, InsufficientCapacityException, ServerApiException { - CallContext.current().setEventDetails("Vm Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId())); + CallContext.current().setEventDetails("Instance Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getId())); UserVm result = null; try { result = _userVmService.updateVirtualMachine(this); } catch (CloudRuntimeException e) { - throw new CloudRuntimeException(String.format("Failed to update VM, due to: %s", e.getLocalizedMessage()), e); + throw new CloudRuntimeException(String.format("Failed to update Instance, due to: %s", e.getLocalizedMessage()), e); } if (result != null) { UserVmResponse response = _responseGenerator.createUserVmResponse(getResponseView(), "virtualmachine", result).get(0); response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update vm"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update Instance"); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVMScheduleCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVMScheduleCmd.java index 72f85c1a99ce..b7222944fe07 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVMScheduleCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVMScheduleCmd.java @@ -32,7 +32,7 @@ import javax.inject.Inject; import java.util.Date; -@APICommand(name = "updateVMSchedule", description = "Update VM Schedule.", responseObject = VMScheduleResponse.class, +@APICommand(name = "updateVMSchedule", description = "Update Instance Schedule.", responseObject = VMScheduleResponse.class, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, since = "4.19.0", authorized = {RoleType.Admin, RoleType.ResourceAdmin, RoleType.DomainAdmin, RoleType.User}) public class UpdateVMScheduleCmd extends BaseCmd { @@ -43,7 +43,7 @@ public class UpdateVMScheduleCmd extends BaseCmd { type = CommandType.UUID, entityType = VMScheduleResponse.class, required = true, - description = "ID of VM schedule") + description = "ID of Instance schedule") private Long id; @Parameter(name = ApiConstants.DESCRIPTION, @@ -55,7 +55,7 @@ public class UpdateVMScheduleCmd extends BaseCmd { @Parameter(name = ApiConstants.SCHEDULE, type = CommandType.STRING, required = false, - description = "Schedule for action on VM in cron format. e.g. '0 15 10 * *' for 'at 15:00 on 10th day of every month'") + description = "Schedule for action on Instance in cron format. e.g. '0 15 10 * *' for 'at 15:00 on 10th day of every month'") private String schedule; @Parameter(name = ApiConstants.TIMEZONE, @@ -67,21 +67,21 @@ public class UpdateVMScheduleCmd extends BaseCmd { @Parameter(name = ApiConstants.START_DATE, type = CommandType.DATE, required = false, - description = "start date from which the schedule becomes active" + description = "Start date from which the schedule becomes active" + "Use format \"yyyy-MM-dd hh:mm:ss\")") private Date startDate; @Parameter(name = ApiConstants.END_DATE, type = CommandType.DATE, required = false, - description = "end date after which the schedule becomes inactive" + description = "End date after which the schedule becomes inactive" + "Use format \"yyyy-MM-dd hh:mm:ss\")") private Date endDate; @Parameter(name = ApiConstants.ENABLED, type = CommandType.BOOLEAN, required = false, - description = "Enable VM schedule") + description = "Enable Instance schedule") private Boolean enabled; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVmNicIpCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVmNicIpCmd.java index 5c654701de91..f8ca0b7afea0 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVmNicIpCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpdateVmNicIpCmd.java @@ -46,14 +46,14 @@ import com.cloud.utils.net.NetUtils; import com.cloud.vm.Nic; -@APICommand(name = "updateVmNicIp", description = "Update the default Ip of a VM Nic", responseObject = UserVmResponse.class) +@APICommand(name = "updateVmNicIp", description = "Update the default IP of an Instance NIC", responseObject = UserVmResponse.class) public class UpdateVmNicIpCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// //////////////// 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") + 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, @@ -79,7 +79,7 @@ public long getDomainId() { private long getZoneId() { Network ntwk = _entityMgr.findById(Network.class, getNetworkId()); if (ntwk == null) { - throw new InvalidParameterValueException("Can't find zone id for specified"); + throw new InvalidParameterValueException("Can't find zone ID for specified"); } return ntwk.getDataCenterId(); } @@ -87,7 +87,7 @@ private long getZoneId() { public Long getNetworkId() { Nic nic = _entityMgr.findById(Nic.class, nicId); if (nic == null) { - throw new InvalidParameterValueException("Can't find network id for specified nic"); + throw new InvalidParameterValueException("Can't find Network ID for specified NIC"); } Long networkId = nic.getNetworkId(); return networkId; @@ -123,7 +123,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "associating ip to nic id: " + this._uuidMgr.getUuid(Network.class, getNetworkId()) + " in zone " + this._uuidMgr.getUuid(DataCenter.class, getZoneId()); + return "Associating IP to NIC id: " + this._uuidMgr.getUuid(Network.class, getNetworkId()) + " in zone " + this._uuidMgr.getUuid(DataCenter.class, getZoneId()); } ///////////////////////////////////////////////////// @@ -143,7 +143,7 @@ public void execute() throws ResourceUnavailableException, ResourceAllocationExc String ip; if ((ip = getIpaddress()) != null) { if (!NetUtils.isValidIp4(ip)) { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Invalid ip address " + ip); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Invalid IP address " + ip); } } @@ -156,7 +156,7 @@ public void execute() throws ResourceUnavailableException, ResourceAllocationExc response.setResponseName(getCommandName()); this.setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update ip address on vm NIC. Refer to server logs for details."); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update IP address on Instance NIC. Refer to server logs for details."); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java index 6a7422e70bbb..c45a18d2fa2b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vm/UpgradeVMCmd.java @@ -41,8 +41,8 @@ import com.cloud.vm.VirtualMachine; @Deprecated(since = "4.18") -@APICommand(name = "changeServiceForVirtualMachine", responseObject=UserVmResponse.class, description="(This API is deprecated, use scaleVirtualMachine API)" + - "Changes the service offering for a virtual machine. The virtual machine must be in a \"Stopped\" state for " + +@APICommand(name = "changeServiceForVirtualMachine", responseObject=UserVmResponse.class, description = "(This API is deprecated, use scaleVirtualMachine API)" + + "Changes the service offering for an Instance. The Instance must be in a \"Stopped\" state for " + "this command to take effect.", responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class UpgradeVMCmd extends BaseCmd implements UserCmd { @@ -54,14 +54,14 @@ public class UpgradeVMCmd extends BaseCmd implements UserCmd { @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=UserVmResponse.class, - required=true, description="The ID of the virtual machine") + required=true, description = "The ID of the Instance") private Long id; @Parameter(name=ApiConstants.SERVICE_OFFERING_ID, type=CommandType.UUID, entityType=ServiceOfferingResponse.class, - required=true, description="the service offering ID to apply to the virtual machine") + required=true, description = "The service offering ID to apply to the Instance") protected Long serviceOfferingId; - @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "name value pairs of custom parameters for cpuspeed, memory and cpunumber. example details[i].name=value") + @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "Name value pairs of custom parameters for cpuspeed, memory and cpunumber. example details[i].name=value") private Map details; @Parameter(name = ApiConstants.MIN_IOPS, type = CommandType.LONG, required = false, description = "New minimum number of IOPS for the custom disk offering", since = "4.17") @@ -153,7 +153,7 @@ public void execute() throws ResourceAllocationException { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to upgrade vm"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to upgrade Instance"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java index e2952b5bd818..a142ffa2d492 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/CreateVMGroupCmd.java @@ -30,7 +30,7 @@ import com.cloud.vm.InstanceGroup; -@APICommand(name = "createInstanceGroup", description = "Creates a vm group", responseObject = InstanceGroupResponse.class, entityType = {InstanceGroup.class}, +@APICommand(name = "createInstanceGroup", description = "Creates an Instance group", responseObject = InstanceGroupResponse.class, entityType = {InstanceGroup.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateVMGroupCmd extends BaseCmd { @@ -39,21 +39,21 @@ public class CreateVMGroupCmd extends BaseCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the instance group") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the Instance group") private String groupName; @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, - description = "the account of the instance group. The account parameter must be used with the domainId parameter.") + description = "The account of the Instance group. The account parameter 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 of account owning the instance group") + description = "The domain ID of account owning the Instance group") private Long domainId; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "The project of the instance group") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "The project of the Instance group") private Long projectId; // /////////////////////////////////////////////////// @@ -98,7 +98,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create vm instance group"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create Instance Instance group"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java index b74bc43eeb7a..b07084a273c5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/DeleteVMGroupCmd.java @@ -31,7 +31,7 @@ import com.cloud.user.Account; import com.cloud.vm.InstanceGroup; -@APICommand(name = "deleteInstanceGroup", description = "Deletes a vm group", responseObject = SuccessResponse.class, entityType = {InstanceGroup.class}, +@APICommand(name = "deleteInstanceGroup", description = "Deletes an Instance group", responseObject = SuccessResponse.class, entityType = {InstanceGroup.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteVMGroupCmd extends BaseCmd { @@ -40,7 +40,7 @@ public class DeleteVMGroupCmd extends BaseCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class, required = true, description = "the ID of the instance group") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class, required = true, description = "The ID of the Instance group") private Long id; ///////////////////////////////////////////////////// @@ -72,7 +72,7 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete vm group"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete Instance group"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java index 31845a956e92..ee918944046f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/ListVMGroupsCmd.java @@ -26,7 +26,7 @@ import com.cloud.vm.InstanceGroup; -@APICommand(name = "listInstanceGroups", description = "Lists vm groups", responseObject = InstanceGroupResponse.class, entityType = {InstanceGroup.class}, +@APICommand(name = "listInstanceGroups", description = "Lists Instance groups", responseObject = InstanceGroupResponse.class, entityType = {InstanceGroup.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListVMGroupsCmd extends BaseListProjectAndAccountResourcesCmd { @@ -35,10 +35,10 @@ public class ListVMGroupsCmd extends BaseListProjectAndAccountResourcesCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class, description = "list instance groups by ID") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class, description = "List Instance groups by ID") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list instance groups by name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "List Instance groups by name") private String groupName; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java index 5c553f064042..d63a5aea6dea 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vmgroup/UpdateVMGroupCmd.java @@ -30,7 +30,7 @@ import com.cloud.user.Account; import com.cloud.vm.InstanceGroup; -@APICommand(name = "updateInstanceGroup", description = "Updates a vm group", responseObject = InstanceGroupResponse.class, entityType = {InstanceGroup.class}, +@APICommand(name = "updateInstanceGroup", description = "Updates an Instance group", responseObject = InstanceGroupResponse.class, entityType = {InstanceGroup.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdateVMGroupCmd extends BaseCmd { @@ -42,7 +42,7 @@ public class UpdateVMGroupCmd extends BaseCmd { @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = InstanceGroupResponse.class, required = true, description = "Instance group ID") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "new instance group name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "New Instance group name") private String groupName; ///////////////////////////////////////////////////// @@ -79,7 +79,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update vm instance group"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update Instance group"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/CreateVMSnapshotCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/CreateVMSnapshotCmd.java index 18a478e9daec..6e1a7daf4c23 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/CreateVMSnapshotCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/CreateVMSnapshotCmd.java @@ -37,25 +37,25 @@ import com.cloud.vm.VirtualMachine; import com.cloud.vm.snapshot.VMSnapshot; -@APICommand(name = "createVMSnapshot", description = "Creates snapshot for a vm.", responseObject = VMSnapshotResponse.class, since = "4.2.0", entityType = {VMSnapshot.class}, +@APICommand(name = "createVMSnapshot", description = "Creates Snapshot for an Instance.", responseObject = VMSnapshotResponse.class, since = "4.2.0", entityType = {VMSnapshot.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateVMSnapshotCmd extends BaseAsyncCreateCmd { @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, required = true, entityType = UserVmResponse.class, description = "The ID of the vm") + @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, required = true, entityType = UserVmResponse.class, description = "The ID of the Instance") private Long vmId; - @Parameter(name = ApiConstants.VM_SNAPSHOT_DESCRIPTION, type = CommandType.STRING, required = false, description = "The description of the snapshot") + @Parameter(name = ApiConstants.VM_SNAPSHOT_DESCRIPTION, type = CommandType.STRING, required = false, description = "The description of the Snapshot") private String description; - @Parameter(name = ApiConstants.VM_SNAPSHOT_DISPLAYNAME, type = CommandType.STRING, required = false, description = "The display name of the snapshot") + @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") + @Parameter(name = ApiConstants.VM_SNAPSHOT_MEMORY, type = CommandType.BOOLEAN, required = false, description = "Snapshot memory if true") private Boolean snapshotMemory; - @Parameter(name = ApiConstants.VM_SNAPSHOT_QUIESCEVM, type = CommandType.BOOLEAN, required = false, description = "quiesce vm if true") + @Parameter(name = ApiConstants.VM_SNAPSHOT_QUIESCEVM, type = CommandType.BOOLEAN, required = false, description = "Quiesce Instance if true") private Boolean quiescevm; public Boolean snapshotMemory() { @@ -92,20 +92,20 @@ public void create() throws ResourceAllocationException { try { vmsnapshot = _vmSnapshotService.allocVMSnapshot(getVmId(), getDisplayName(), getDescription(), snapshotMemory()); } catch (CloudRuntimeException e) { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create vm snapshot: " + e.getMessage(), e); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create Instance Snapshot: " + e.getMessage(), e); } if (vmsnapshot != null) { setEntityId(vmsnapshot.getId()); setEntityUuid(vmsnapshot.getUuid()); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create vm snapshot"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create Instance Snapshot"); } } @Override public String getEventDescription() { - return "creating snapshot for VM: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()); + return "Creating Snapshot for Instance: " + this._uuidMgr.getUuid(VirtualMachine.class, getVmId()); } @Override @@ -122,7 +122,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create vm snapshot due to an internal error creating snapshot for vm " + getVmId()); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create Instance Snapshot due to an internal error creating Snapshot for Instance " + getVmId()); } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/DeleteVMSnapshotCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/DeleteVMSnapshotCmd.java index 94b8824f8685..afd63e8e64be 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/DeleteVMSnapshotCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/DeleteVMSnapshotCmd.java @@ -35,7 +35,7 @@ import com.cloud.user.Account; import com.cloud.vm.snapshot.VMSnapshot; -@APICommand(name = "deleteVMSnapshot", description = "Deletes a vmsnapshot.", responseObject = SuccessResponse.class, since = "4.2.0", entityType = {VMSnapshot.class}, +@APICommand(name = "deleteVMSnapshot", description = "Deletes an Instance Snapshot.", responseObject = SuccessResponse.class, since = "4.2.0", entityType = {VMSnapshot.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteVMSnapshotCmd extends BaseAsyncCmd { @@ -44,7 +44,7 @@ public class DeleteVMSnapshotCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = VMSnapshotResponse.class, required = true, - description = "The ID of the VM snapshot") + description = "The ID of the Instance Snapshot") private Long id; public Long getId() { @@ -68,13 +68,13 @@ public void execute() { SuccessResponse response = new SuccessResponse(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete vm snapshot"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete Instance Snapshot"); } } @Override public String getEventDescription() { - return "Delete VM snapshot: " + this._uuidMgr.getUuid(VMSnapshot.class, getId()); + return "Delete Instance Snapshot: " + this._uuidMgr.getUuid(VMSnapshot.class, getId()); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/ListVMSnapshotCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/ListVMSnapshotCmd.java index 87dd6e0b4789..b5d603e000c1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/ListVMSnapshotCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/ListVMSnapshotCmd.java @@ -31,24 +31,24 @@ import com.cloud.utils.Pair; import com.cloud.vm.snapshot.VMSnapshot; -@APICommand(name = "listVMSnapshot", description = "List virtual machine snapshot by conditions", responseObject = VMSnapshotResponse.class, since = "4.2.0", entityType = {VMSnapshot.class}, +@APICommand(name = "listVMSnapshot", description = "List Instance Snapshot by conditions", responseObject = VMSnapshotResponse.class, since = "4.2.0", entityType = {VMSnapshot.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListVMSnapshotCmd extends BaseListTaggedResourcesCmd { - @Parameter(name = ApiConstants.VM_SNAPSHOT_ID, type = CommandType.UUID, entityType = VMSnapshotResponse.class, description = "The ID of the VM snapshot") + @Parameter(name = ApiConstants.VM_SNAPSHOT_ID, type = CommandType.UUID, entityType = VMSnapshotResponse.class, description = "The ID of the Instance Snapshot") private Long id; - @Parameter(name=ApiConstants.VM_SNAPSHOT_IDS, type=CommandType.LIST, collectionType=CommandType.UUID, entityType=VMSnapshotResponse.class, description="the IDs of the vm snapshots, mutually exclusive with vmsnapshotid", since = "4.9") + @Parameter(name=ApiConstants.VM_SNAPSHOT_IDS, type=CommandType.LIST, collectionType=CommandType.UUID, entityType=VMSnapshotResponse.class, description = "The IDs of the Instance Snapshots, mutually exclusive with vmsnapshotid", since = "4.9") private List ids; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "state of the virtual machine snapshot") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "State of the Instance Snapshot") private String state; - @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "the ID of the vm") + @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "The ID of the Instance") private Long vmId; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "lists snapshot by snapshot name or display name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "Lists Snapshot by Snapshot name or display name") private String vmSnapshotName; public String getState() { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/RevertToVMSnapshotCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/RevertToVMSnapshotCmd.java index 310b45687d49..43f20362e98d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/RevertToVMSnapshotCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vmsnapshot/RevertToVMSnapshotCmd.java @@ -41,7 +41,7 @@ import com.cloud.uservm.UserVm; import com.cloud.vm.snapshot.VMSnapshot; -@APICommand(name = "revertToVMSnapshot", description = "Revert VM from a vmsnapshot.", responseObject = UserVmResponse.class, since = "4.2.0", responseView = ResponseView.Restricted, +@APICommand(name = "revertToVMSnapshot", description = "Revert Instance from a vmsnapshot.", responseObject = UserVmResponse.class, since = "4.2.0", responseView = ResponseView.Restricted, requestHasSensitiveInfo = false, responseHasSensitiveInfo = true) public class RevertToVMSnapshotCmd extends BaseAsyncCmd implements UserCmd { private static final String s_name = "reverttovmsnapshotresponse"; @@ -51,7 +51,7 @@ public class RevertToVMSnapshotCmd extends BaseAsyncCmd implements UserCmd { type = CommandType.UUID, required = true, entityType = VMSnapshotResponse.class, - description = "The ID of the vm snapshot") + description = "The ID of the Instance Snapshot") private Long vmSnapShotId; public Long getVmSnapShotId() { @@ -82,13 +82,13 @@ public void execute() throws ResourceUnavailableException, InsufficientCapacity response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to revert VM snapshot"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to revert Instance Snapshot"); } } @Override public String getEventDescription() { - return "Revert from VM snapshot: " + this._uuidMgr.getUuid(VMSnapshot.class, getVmSnapShotId()); + return "Revert from Instance Snapshot: " + this._uuidMgr.getUuid(VMSnapshot.class, getVmSnapShotId()); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AddResourceDetailCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AddResourceDetailCmd.java index 287991fa9846..b1e58bb6ef63 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AddResourceDetailCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AddResourceDetailCmd.java @@ -40,13 +40,13 @@ public class AddResourceDetailCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, required = true, description = "Map of (key/value pairs)") private Map details; - @Parameter(name = ApiConstants.RESOURCE_TYPE, type = CommandType.STRING, required = true, description = "type of the resource") + @Parameter(name = ApiConstants.RESOURCE_TYPE, type = CommandType.STRING, required = true, description = "Type of the resource") private String resourceType; - @Parameter(name = ApiConstants.RESOURCE_ID, type = CommandType.STRING, required = true, collectionType = CommandType.STRING, description = "resource id to create the details for") + @Parameter(name = ApiConstants.RESOURCE_ID, type = CommandType.STRING, required = true, collectionType = CommandType.STRING, description = "Resource ID to create the details for") private String resourceId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "pass false if you want this detail to be disabled for the regular user. True by default", since = "4.4") + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "Pass false if you want this detail to be disabled for the regular User. True by default", since = "4.4") private Boolean display; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AssignVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AssignVolumeCmd.java index 1a51aa03c226..f39853512281 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AssignVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AssignVolumeCmd.java @@ -34,7 +34,7 @@ import java.util.Map; -@APICommand(name = AssignVolumeCmd.CMD_NAME, responseObject = VolumeResponse.class, description = "Changes ownership of a Volume from one account to another.", entityType = { +@APICommand(name = AssignVolumeCmd.CMD_NAME, responseObject = VolumeResponse.class, description = "Changes ownership of a Volume from one Account to another.", entityType = { Volume.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false, since = "4.18.0.0") public class AssignVolumeCmd extends BaseCmd implements UserCmd { public static final String CMD_NAME = "assignVolume"; @@ -47,7 +47,7 @@ public class AssignVolumeCmd extends BaseCmd implements UserCmd { private Long volumeId; @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, - description = "The ID of the account to which the volume will be assigned. Mutually exclusive with parameter 'projectid'.") + description = "The ID of the Account to which the volume will be assigned. Mutually exclusive with parameter 'projectid'.") private Long accountId; @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, @@ -81,7 +81,7 @@ public void execute() { if (result == null) { Map fullParams = getFullUrlParams(); if (accountId != null) { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, String.format("Failed to move volume [%s] to account [%s].", fullParams.get(ApiConstants.VOLUME_ID), + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, String.format("Failed to move volume [%s] to Account [%s].", fullParams.get(ApiConstants.VOLUME_ID), fullParams.get(ApiConstants.ACCOUNT_ID))); } throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, String.format("Failed to move volume [%s] to project [%s].", fullParams.get(ApiConstants.VOLUME_ID), diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java index 1a3b9220877f..23fbc0fa0c75 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/AttachVolumeCmd.java @@ -37,7 +37,7 @@ import com.cloud.user.Account; import com.cloud.vm.VirtualMachine; -@APICommand(name = "attachVolume", description = "Attaches a disk volume to a virtual machine.", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "attachVolume", description = "Attaches a disk volume to an Instance.", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class AttachVolumeCmd extends BaseAsyncCmd implements UserCmd { private static final String s_name = "attachvolumeresponse"; @@ -52,12 +52,12 @@ public class AttachVolumeCmd extends BaseAsyncCmd implements UserCmd { + "Please refer to the docs of your hypervisor for the correct mapping of the deviceID and the actual logical disk structure.") private Long deviceId; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VolumeResponse.class, required = true, description = "the ID of the disk volume") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VolumeResponse.class, required = true, description = "The ID of the disk volume") private Long id; @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.VIRTUAL_MACHINE_ID, type=CommandType.UUID, entityType=UserVmResponse.class, - required=true, description=" the ID of the virtual machine") + required=true, description = " the ID of the Instance") private Long virtualMachineId; ///////////////////////////////////////////////////// @@ -111,12 +111,12 @@ public String getEventType() { @Override public String getEventDescription() { - return "attaching volume: " + this._uuidMgr.getUuid(Volume.class, getId()) + " to vm: " + this._uuidMgr.getUuid(VirtualMachine.class, getVirtualMachineId()); + return "Attaching volume: " + this._uuidMgr.getUuid(Volume.class, getId()) + " to Instance: " + this._uuidMgr.getUuid(VirtualMachine.class, getVirtualMachineId()); } @Override public void execute() { - CallContext.current().setEventDetails("Volume Id: " + this._uuidMgr.getUuid(Volume.class, getId()) + " VmId: " + this._uuidMgr.getUuid(VirtualMachine.class, getVirtualMachineId())); + CallContext.current().setEventDetails("Volume Id: " + this._uuidMgr.getUuid(Volume.class, getId()) + " Instance Id: " + this._uuidMgr.getUuid(VirtualMachine.class, getVirtualMachineId())); Volume result = _volumeService.attachVolumeToVM(this); if (result != null) { VolumeResponse response = _responseGenerator.createVolumeResponse(getResponseView(), result); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ChangeOfferingForVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ChangeOfferingForVolumeCmd.java index 404a02b04b8b..77c30aa6be92 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ChangeOfferingForVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ChangeOfferingForVolumeCmd.java @@ -50,14 +50,14 @@ public class ChangeOfferingForVolumeCmd extends BaseAsyncCmd implements UserCmd //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, entityType = VolumeResponse.class, required = true, type = CommandType.UUID, description = "the ID of the volume") + @Parameter(name = ApiConstants.ID, entityType = VolumeResponse.class, required = true, type = CommandType.UUID, description = "The ID of the volume") private Long id; @Parameter(name = ApiConstants.DISK_OFFERING_ID, entityType = DiskOfferingResponse.class, type = CommandType.UUID, required = true, - description = "new disk offering id") + description = "New disk offering ID") private Long newDiskOfferingId; @Parameter(name = ApiConstants.SIZE, type = CommandType.LONG, required = false, description = "New volume size in GB for the custom disk offering") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java index 7ffcea50b219..27b592aa8f15 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/CreateVolumeCmd.java @@ -43,7 +43,7 @@ import com.cloud.storage.Volume; import com.cloud.vm.VirtualMachine; -@APICommand(name = "createVolume", responseObject = VolumeResponse.class, description = "Creates a disk volume from a disk offering. This disk volume must still be attached to a virtual machine to make use of it.", responseView = ResponseView.Restricted, entityType = { +@APICommand(name = "createVolume", responseObject = VolumeResponse.class, description = "Creates a disk volume from a disk offering. This disk volume must still be attached to an Instance to make use of it.", responseView = ResponseView.Restricted, entityType = { Volume.class, VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateVolumeCmd extends BaseAsyncCreateCustomIdCmd implements UserCmd { @@ -55,58 +55,58 @@ public class CreateVolumeCmd extends BaseAsyncCreateCustomIdCmd implements UserC @Parameter(name = ApiConstants.ACCOUNT, type = BaseCmd.CommandType.STRING, - description = "the account associated with the disk volume. Must be used with the domainId parameter.") + description = "The Account associated with the disk volume. Must be used with the domainId parameter.") private String accountName; @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, - description = "the project associated with the volume. Mutually exclusive with account parameter") + description = "The project associated with the volume. Mutually exclusive with Account parameter") private Long projectId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "the domain ID associated with the disk offering. If used with the account parameter" - + " returns the disk volume associated with the account for the specified domain." + - "If account is NOT provided then the volume will be assigned to the caller account and domain.") + description = "The domain ID associated with the disk offering. If used with the Account parameter" + + " returns the disk volume associated with the Account for the specified domain." + + "If account is NOT provided then the volume will be assigned to the caller Account and domain.") private Long domainId; @Parameter(name = ApiConstants.DISK_OFFERING_ID, required = false, type = CommandType.UUID, entityType = DiskOfferingResponse.class, - description = "the ID of the disk offering. Either diskOfferingId or snapshotId must be passed in.") + description = "The ID of the disk offering. Either diskOfferingId or snapshotId must be passed in.") private Long diskOfferingId; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the disk volume") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the disk volume") private String volumeName; @Parameter(name = ApiConstants.SIZE, type = CommandType.LONG, description = "Arbitrary volume size") private Long size; - @Parameter(name = ApiConstants.MIN_IOPS, type = CommandType.LONG, description = "min iops") + @Parameter(name = ApiConstants.MIN_IOPS, type = CommandType.LONG, description = "Min IOPS") private Long minIops; - @Parameter(name = ApiConstants.MAX_IOPS, type = CommandType.LONG, description = "max iops") + @Parameter(name = ApiConstants.MAX_IOPS, type = CommandType.LONG, description = "Max IOPS") private Long maxIops; @Parameter(name = ApiConstants.SNAPSHOT_ID, type = CommandType.UUID, entityType = SnapshotResponse.class, - description = "the snapshot ID for the disk volume. Either diskOfferingId or snapshotId must be passed in.") + description = "The Snapshot ID for the disk volume. Either diskOfferingId or snapshotId must be passed in.") private Long snapshotId; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the ID of the availability zone") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The ID of the availability zone") private Long zoneId; - @Parameter(name = ApiConstants.DISPLAY_VOLUME, type = CommandType.BOOLEAN, description = "an optional field, whether to display the volume to the end user or not.", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.DISPLAY_VOLUME, type = CommandType.BOOLEAN, description = "An optional field, whether to display the volume to the end User or not.", authorized = {RoleType.Admin}) private Boolean displayVolume; @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, - description = "the ID of the virtual machine; to be used with snapshot Id, VM to which the volume gets attached after creation") + description = "The ID of the Instance; to be used with snapshot Id, Instance to which the volume gets attached after creation") private Long virtualMachineId; ///////////////////////////////////////////////////// @@ -203,7 +203,7 @@ public String getEventType() { @Override public String getEventDescription() { - return "creating volume: " + getVolumeName() + ((getSnapshotId() == null) ? "" : " from snapshot: " + this._uuidMgr.getUuid(Snapshot.class, getSnapshotId())); + return "Creating volume: " + getVolumeName() + ((getSnapshotId() == null) ? "" : " from Snapshot: " + this._uuidMgr.getUuid(Snapshot.class, getSnapshotId())); } @Override @@ -220,7 +220,7 @@ public void create() throws ResourceAllocationException { @Override public void execute() { - CallContext.current().setEventDetails("Volume Id: " + getEntityUuid() + ((getSnapshotId() == null) ? "" : " from snapshot: " + this._uuidMgr.getUuid(Snapshot.class, getSnapshotId()))); + CallContext.current().setEventDetails("Volume Id: " + getEntityUuid() + ((getSnapshotId() == null) ? "" : " from Snapshot: " + this._uuidMgr.getUuid(Snapshot.class, getSnapshotId()))); Volume volume = _volumeService.createVolume(this); if (volume != null) { VolumeResponse response = _responseGenerator.createVolumeResponse(getResponseView(), volume); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java index 6111488a8021..e21103654c81 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/DeleteVolumeCmd.java @@ -43,7 +43,7 @@ public class DeleteVolumeCmd extends BaseCmd { @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class, - required=true, description="The ID of the disk volume") + required=true, description = "The ID of the disk volume") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/DestroyVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/DestroyVolumeCmd.java index 2eafb76e5915..32ddec880861 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/DestroyVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/DestroyVolumeCmd.java @@ -50,7 +50,7 @@ public class DestroyVolumeCmd extends BaseAsyncCmd { @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class, - required=true, description="The ID of the volume") + required=true, description = "The ID of the volume") private Long id; @Parameter(name = ApiConstants.EXPUNGE, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java index 2fddcace84dd..9c8b8fcf6e67 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/DetachVolumeCmd.java @@ -38,7 +38,7 @@ import com.cloud.uservm.UserVm; import com.cloud.vm.VirtualMachine; -@APICommand(name = "detachVolume", description = "Detaches a disk volume from a virtual machine.", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, +@APICommand(name = "detachVolume", description = "Detaches a disk volume from an Instance.", responseObject = VolumeResponse.class, responseView = ResponseView.Restricted, entityType = {VirtualMachine.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DetachVolumeCmd extends BaseAsyncCmd implements UserCmd { private static final String s_name = "detachvolumeresponse"; @@ -48,17 +48,17 @@ public class DetachVolumeCmd extends BaseAsyncCmd implements UserCmd { ///////////////////////////////////////////////////// @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class, - description="the ID of the disk volume") + description= " The ID of the disk volume") private Long id; - @Parameter(name = ApiConstants.DEVICE_ID, type = CommandType.LONG, description = "the device ID on the virtual machine where volume is detached from") + @Parameter(name = ApiConstants.DEVICE_ID, type = CommandType.LONG, description = "The device ID on the Instance where volume is detached from") private Long deviceId; @ACL(accessType = AccessType.OperateEntry) @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, - description = "the ID of the virtual machine where the volume is detached from") + description = "The ID of the Instance where the volume is detached from") private Long virtualMachineId; ///////////////////////////////////////////////////// @@ -130,7 +130,7 @@ public String getEventDescription() { if (id != null) { sb.append(": " + this._uuidMgr.getUuid(Volume.class, id)); } else if ((deviceId != null) && (virtualMachineId != null)) { - sb.append(" with device id: " + deviceId + " from vm: " + ((getVirtualMachineId() != null) ? this._uuidMgr.getUuid(VirtualMachine.class, getVirtualMachineId()) : "" )); + sb.append(" with device id: " + deviceId + " from Instance: " + ((getVirtualMachineId() != null) ? this._uuidMgr.getUuid(VirtualMachine.class, getVirtualMachineId()) : "" )); } else { sb.append(" "); } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java index 6ddb5f1e567b..2b225f4fd347 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ExtractVolumeCmd.java @@ -47,20 +47,20 @@ public class ExtractVolumeCmd extends BaseAsyncCmd { @ACL(accessType = AccessType.OperateEntry) @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class, - required=true, description="the ID of the volume") + required=true, description = "The ID of the volume") private Long id; - @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = false, length = 2048, description = "the url to which the volume would be extracted") + @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = false, length = 2048, description = "The URL to which the volume would be extracted") private String url; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, - description = "the ID of the zone where the volume is located") + description = "The ID of the zone where the volume is located") private Long zoneId; - @Parameter(name = ApiConstants.MODE, type = CommandType.STRING, required = true, description = "the mode of extraction - HTTP_DOWNLOAD or FTP_UPLOAD") + @Parameter(name = ApiConstants.MODE, type = CommandType.STRING, required = true, description = "The mode of extraction - HTTP_DOWNLOAD or FTP_UPLOAD") private String mode; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/GetUploadParamsForVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/GetUploadParamsForVolumeCmd.java index 4ccd5f97993a..0020fe4021e8 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/GetUploadParamsForVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/GetUploadParamsForVolumeCmd.java @@ -40,7 +40,7 @@ public class GetUploadParamsForVolumeCmd extends AbstractGetUploadParamsCmd { @Parameter(name = ApiConstants.IMAGE_STORE_UUID, type = CommandType.STRING, description = "Image store uuid") private String imageStoreUuid; - @Parameter(name = ApiConstants.DISK_OFFERING_ID, required = false, type = CommandType.UUID, entityType = DiskOfferingResponse.class, description = "the ID of the disk " + @Parameter(name = ApiConstants.DISK_OFFERING_ID, required = false, type = CommandType.UUID, entityType = DiskOfferingResponse.class, description = "The ID of the disk " + "offering. This must be a custom sized offering since during upload of volume/template size is unknown.") private Long diskOfferingId; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ListResourceDetailsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ListResourceDetailsCmd.java index 318836d8d877..93a2445ee8f3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ListResourceDetailsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ListResourceDetailsCmd.java @@ -34,20 +34,20 @@ requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListResourceDetailsCmd extends BaseListProjectAndAccountResourcesCmd { - @Parameter(name = ApiConstants.RESOURCE_TYPE, type = CommandType.STRING, description = "list by resource type", required = true) + @Parameter(name = ApiConstants.RESOURCE_TYPE, type = CommandType.STRING, description = "List by resource type", required = true) private String resourceType; - @Parameter(name = ApiConstants.RESOURCE_ID, type = CommandType.STRING, description = "list by resource id") + @Parameter(name = ApiConstants.RESOURCE_ID, type = CommandType.STRING, description = "List by resource ID") private String resourceId; - @Parameter(name = ApiConstants.KEY, type = CommandType.STRING, description = "list by key") + @Parameter(name = ApiConstants.KEY, type = CommandType.STRING, description = "List by key") private String key; - @Parameter(name = ApiConstants.VALUE, type = CommandType.STRING, description = "list by key, value. Needs to be passed only along with key" , + @Parameter(name = ApiConstants.VALUE, type = CommandType.STRING, description = "List by key, value. Needs to be passed only along with key" , since = "4.4", authorized = { RoleType.Admin }) private String value; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "if set to true, only details marked with display=true, are returned." + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "If set to true, only details marked with display=true, are returned." + " False by default", since = "4.3", authorized = { RoleType.Admin }) private Boolean forDisplay; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java index a1024a988981..a4cd299dae9c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ListVolumesCmd.java @@ -50,55 +50,55 @@ public class ListVolumesCmd extends BaseListRetrieveOnlyResourceCountCmd impleme //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, description = "list volumes on specified host") + @Parameter(name = ApiConstants.HOST_ID, type = CommandType.UUID, entityType = HostResponse.class, description = "List volumes on specified host") private Long hostId; - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VolumeResponse.class, description = "the ID of the disk volume") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VolumeResponse.class, description = "The ID of the disk volume") private Long id; - @Parameter(name = ApiConstants.IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = VolumeResponse.class, description = "the IDs of the volumes, mutually exclusive with id", since = "4.9") + @Parameter(name = ApiConstants.IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = VolumeResponse.class, description = "The IDs of the volumes, mutually exclusive with id", since = "4.9") private List ids; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the disk volume") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the disk volume") private String volumeName; - @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "the pod id the disk volume belongs to") + @Parameter(name = ApiConstants.POD_ID, type = CommandType.UUID, entityType = PodResponse.class, description = "The pod ID the disk volume belongs to") private Long podId; - @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "the cluster id the disk volume belongs to", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.CLUSTER_ID, type = CommandType.UUID, entityType = ClusterResponse.class, description = "The cluster ID the disk volume belongs to", authorized = {RoleType.Admin}) private Long clusterId; - @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "the type of disk volume") + @Parameter(name = ApiConstants.TYPE, type = CommandType.STRING, description = "The type of disk volume") private String type; - @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "the ID of the virtual machine") + @Parameter(name = ApiConstants.VIRTUAL_MACHINE_ID, type = CommandType.UUID, entityType = UserVmResponse.class, description = "The ID of the Instance") private Long virtualMachineId; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the ID of the availability zone") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The ID of the availability zone") private Long zoneId; - @Parameter(name = ApiConstants.STORAGE_ID, type = CommandType.STRING, entityType = StoragePoolResponse.class, description = "the ID of the storage pool, available to ROOT admin only", since = "4.3", authorized = { + @Parameter(name = ApiConstants.STORAGE_ID, type = CommandType.STRING, entityType = StoragePoolResponse.class, description = "The ID of the storage pool, available to ROOT admin only", since = "4.3", authorized = { RoleType.Admin}) private String storageId; @Parameter(name = ApiConstants.SERVICE_OFFERING_ID, type = CommandType.UUID, entityType = ServiceOfferingResponse.class, - description = "list volumes by disk offering of a service offering. If both service offering and " + + description = "List volumes by disk offering of a service offering. If both service offering and " + "disk offering are passed, service offering is ignored", since = "4.19.1") private Long serviceOfferingId; - @Parameter(name = ApiConstants.DISK_OFFERING_ID, type = CommandType.UUID, entityType = DiskOfferingResponse.class, description = "list volumes by disk offering", since = "4.4") + @Parameter(name = ApiConstants.DISK_OFFERING_ID, type = CommandType.UUID, entityType = DiskOfferingResponse.class, description = "List volumes by disk offering", since = "4.4") private Long diskOfferingId; - @Parameter(name = ApiConstants.DISPLAY_VOLUME, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = { + @Parameter(name = ApiConstants.DISPLAY_VOLUME, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = { RoleType.Admin}) private Boolean display; - @Parameter(name = ApiConstants.LIST_SYSTEM_VMS, type = CommandType.BOOLEAN, description = "list system VMs; only ROOT admin is eligible to pass this parameter", since = "4.18", + @Parameter(name = ApiConstants.LIST_SYSTEM_VMS, type = CommandType.BOOLEAN, description = "List system VMs; only ROOT admin is eligible to pass this parameter", since = "4.18", authorized = { RoleType.Admin }) private Boolean listSystemVms; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "state of the volume. Possible values are: Ready, Allocated, Destroy, Expunging, Expunged.") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "State of the volume. Possible values are: Ready, Allocated, Destroy, Expunging, Expunged.") private String state; @Parameter(name = ApiConstants.IS_ENCRYPTED, type = CommandType.BOOLEAN, description = "list only volumes that are encrypted", since = "4.19.1", diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/MigrateVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/MigrateVolumeCmd.java index a0a50c5b9fc5..ea6890ac3e82 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/MigrateVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/MigrateVolumeCmd.java @@ -43,13 +43,13 @@ public class MigrateVolumeCmd extends BaseAsyncCmd implements UserCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.UUID, entityType = VolumeResponse.class, required = true, description = "the ID of the volume") + @Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.UUID, entityType = VolumeResponse.class, required = true, description = "The ID of the volume") private Long volumeId; - @Parameter(name = ApiConstants.STORAGE_ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, required = true, description = "destination storage pool ID to migrate the volume to") + @Parameter(name = ApiConstants.STORAGE_ID, type = CommandType.UUID, entityType = StoragePoolResponse.class, required = true, description = "Destination storage pool ID to migrate the volume to") private Long storageId; - @Parameter(name = ApiConstants.LIVE_MIGRATE, type = CommandType.BOOLEAN, required = false, description = "if the volume should be live migrated when it is attached to a running vm") + @Parameter(name = ApiConstants.LIVE_MIGRATE, type = CommandType.BOOLEAN, required = false, description = "If the volume should be live migrated when it is attached to a running Instance") private Boolean liveMigrate; @Parameter(name = ApiConstants.NEW_DISK_OFFERING_ID, type = CommandType.UUID, entityType = DiskOfferingResponse.class, description = "The new disk offering ID that replaces the current one used by the volume. This new disk offering is used to better reflect the new storage where the volume is going to be migrated to.") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java index eb89115cf464..5b2b6709cf64 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/ResizeVolumeCmd.java @@ -51,7 +51,7 @@ public class ResizeVolumeCmd extends BaseAsyncCmd implements UserCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, entityType = VolumeResponse.class, required = true, type = CommandType.UUID, description = "the ID of the disk volume") + @Parameter(name = ApiConstants.ID, entityType = VolumeResponse.class, required = true, type = CommandType.UUID, description = "The ID of the disk volume") private Long id; @Parameter(name = ApiConstants.MIN_IOPS, type = CommandType.LONG, required = false, description = "New minimum number of IOPS") @@ -70,7 +70,7 @@ public class ResizeVolumeCmd extends BaseAsyncCmd implements UserCmd { entityType = DiskOfferingResponse.class, type = CommandType.UUID, required = false, - description = "new disk offering id") + description = "New disk offering ID") private Long newDiskOfferingId; @Parameter(name = ApiConstants.AUTO_MIGRATE, type = CommandType.BOOLEAN, required = false, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java index 22b819c8cba2..0d3fc59a5285 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UpdateVolumeCmd.java @@ -47,7 +47,7 @@ public class UpdateVolumeCmd extends BaseAsyncCustomIdCmd implements UserCmd { ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class, description="the ID of the disk volume") + @Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=VolumeResponse.class, description = "The ID of the disk volume") private Long id; @Parameter(name = ApiConstants.PATH, type = CommandType.STRING, description = "The path of the volume", authorized = {RoleType.Admin}) @@ -71,10 +71,10 @@ public class UpdateVolumeCmd extends BaseAsyncCustomIdCmd implements UserCmd { @Parameter(name = ApiConstants.DISPLAY_VOLUME, type = CommandType.BOOLEAN, - description = "an optional field, whether to the display the volume to the end user or not.", authorized = {RoleType.Admin}) + description = "An optional field, whether to the display the volume to the end User or not.", authorized = {RoleType.Admin}) private Boolean displayVolume; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "new name of the volume", since = "4.16") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "New name of the volume", since = "4.16") private String name; @Parameter(name = ApiConstants.DELETE_PROTECTION, diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java index 339c276d59ea..3d23a6317223 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/volume/UploadVolumeCmd.java @@ -53,36 +53,36 @@ public class UploadVolumeCmd extends BaseAsyncCmd implements UserCmd { @Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, required = true, - description = "the format for the volume. Possible values include QCOW2, OVA, and VHD.") + description = "The format for the volume. Possible values include QCOW2, OVA, and VHD.") private String format; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the volume") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the volume") private String volumeName; @Parameter(name = ApiConstants.URL, type = CommandType.STRING, required = true, length = 2048, - description = "the URL of where the volume is hosted. Possible URL include http:// and https://") + description = "The URL of where the volume is hosted. Possible URL include http:// and https://") private String url; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, - description = "the ID of the zone the volume is to be hosted on") + description = "The ID of the zone the volume is to be hosted on") private Long zoneId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "an optional domainId. If the account parameter is used, domainId must also be used. If account is NOT provided then volume will be assigned to the caller account and domain.") + description = "An optional domainId. If the Account parameter is used, domainId must also be used. If Account is NOT provided then volume will be assigned to the caller Account and domain.") private Long domainId; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional accountName. Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional accountName. Must be used with domainId.") private String accountName; - @Parameter(name = ApiConstants.CHECKSUM, type = CommandType.STRING, description = "the checksum value of this volume. " + ApiConstants.CHECKSUM_PARAMETER_PREFIX_DESCRIPTION) + @Parameter(name = ApiConstants.CHECKSUM, type = CommandType.STRING, description = "The checksum value of this volume. " + ApiConstants.CHECKSUM_PARAMETER_PREFIX_DESCRIPTION) private String checksum; @Parameter(name = ApiConstants.IMAGE_STORE_UUID, type = CommandType.STRING, description = "Image store uuid") @@ -91,7 +91,7 @@ public class UploadVolumeCmd extends BaseAsyncCmd implements UserCmd { @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Upload volume for the project") private Long projectId; - @Parameter(name = ApiConstants.DISK_OFFERING_ID, required = false, type = CommandType.UUID, entityType = DiskOfferingResponse.class, description = "the ID of the disk offering. This must be a custom sized offering since during uploadVolume volume size is unknown.") + @Parameter(name = ApiConstants.DISK_OFFERING_ID, required = false, type = CommandType.UUID, entityType = DiskOfferingResponse.class, description = "The ID of the disk offering. This must be a custom sized offering since during uploadVolume volume size is unknown.") private Long diskOfferingId; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/CreatePrivateGatewayCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/CreatePrivateGatewayCmd.java index dceaabf648de..7755abce6f7e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/CreatePrivateGatewayCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/CreatePrivateGatewayCmd.java @@ -44,7 +44,7 @@ import com.cloud.network.vpc.Vpc; import com.cloud.network.vpc.VpcGateway; -@APICommand(name = "createPrivateGateway", description = "Creates a private gateway", +@APICommand(name = "createPrivateGateway", description = "Creates a private Gateway", responseObject = PrivateGatewayResponse.class, responseView = ResponseView.Restricted, entityType = {VpcGateway.class}, @@ -58,40 +58,40 @@ public class CreatePrivateGatewayCmd extends BaseAsyncCreateCmd implements UserC //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, required = true, description = "the gateway of the Private gateway") + @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, required = true, description = "The Gateway of the Private Gateway") private String gateway; - @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, required = true, description = "the netmask of the Private gateway") + @Parameter(name = ApiConstants.NETMASK, type = CommandType.STRING, required = true, description = "The Netmask of the Private Gateway") private String netmask; - @Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, required = true, description = "the IP address of the Private gateaway") + @Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, required = true, description = "The IP address of the Private Gateway") private String ipAddress; @Parameter(name = ApiConstants.NETWORK_OFFERING_ID, type = CommandType.UUID, required = false, entityType = NetworkOfferingResponse.class, - description = "the uuid of the network offering to use for the private gateways network connection") + description = "The UUID of the Network offering to use for the private gateways Network connection") private Long networkOfferingId; - @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, required = true, description = "the VPC network belongs to") + @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, required = true, description = "The VPC Network belongs to") private Long vpcId; @Parameter(name = ApiConstants.SOURCE_NAT_SUPPORTED, type = CommandType.BOOLEAN, required = false, - description = "source NAT supported value. Default value false. If 'true' source NAT is enabled on the private gateway" + description = "Source NAT supported value. Default value: false. When 'true', the source NAT is enabled on the private gateway" + " 'false': sourcenat is not supported") private Boolean isSourceNat; - @Parameter(name = ApiConstants.ACL_ID, type = CommandType.UUID, entityType = NetworkACLResponse.class, required = false, description = "the ID of the network ACL") + @Parameter(name = ApiConstants.ACL_ID, type = CommandType.UUID, entityType = NetworkACLResponse.class, required = false, description = "The ID of the Network ACL") private Long aclId; @Parameter(name = ApiConstants.ASSOCIATED_NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, since = "4.17.0", - description = "The isolated network this private gateway is associated to.") + description = "The Isolated Network this private gateway is associated to.") private Long associatedNetworkId; ///////////////////////////////////////////////////// @@ -179,7 +179,7 @@ public void execute() throws InsufficientCapacityException, ConcurrentOperationE public long getEntityOwnerId() { Vpc vpc = _entityMgr.findById(Vpc.class, vpcId); if (vpc == null) { - throw new InvalidParameterValueException("Invalid id is specified for the vpc"); + throw new InvalidParameterValueException("Invalid id is specified for the VPC"); } return vpc.getAccountId(); } @@ -203,7 +203,7 @@ public String getSyncObjType() { public Long getSyncObjId() { Vpc vpc = _entityMgr.findById(Vpc.class, vpcId); if (vpc == null) { - throw new InvalidParameterValueException("Invalid id is specified for the vpc"); + throw new InvalidParameterValueException("Invalid ID is specified for the VPC"); } return vpc.getId(); } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/CreateStaticRouteCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/CreateStaticRouteCmd.java index c4b5e159b5ce..1605e4830bd1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/CreateStaticRouteCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/CreateStaticRouteCmd.java @@ -46,7 +46,8 @@ public class CreateStaticRouteCmd extends BaseAsyncCreateCmd { @Parameter(name = ApiConstants.GATEWAY_ID, type = CommandType.UUID, entityType = PrivateGatewayResponse.class, - description = "the gateway id we are creating static route for. Mutually exclusive with the nexthop parameter") + required = true, + description = "The gateway ID we are creating static route for. Mutually exclusive with the nexthop parameter") private Long gatewayId; @Parameter(name = ApiConstants.VPC_ID, @@ -62,7 +63,7 @@ public class CreateStaticRouteCmd extends BaseAsyncCreateCmd { since = "4.21.0") private String nextHop; - @Parameter(name = ApiConstants.CIDR, required = true, type = CommandType.STRING, description = "static route cidr") + @Parameter(name = ApiConstants.CIDR, required = true, type = CommandType.STRING, description = "Static route CIDR") private String cidr; ///////////////////////////////////////////////////// @@ -94,7 +95,7 @@ public void create() throws ResourceAllocationException { setEntityId(result.getId()); setEntityUuid(result.getUuid()); } catch (NetworkRuleConflictException ex) { - logger.info("Network rule conflict: " + ex.getMessage()); + logger.info("Network rule conflict: {}", ex.getMessage()); logger.trace("Network rule conflict: ", ex); throw new ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, ex.getMessage()); } @@ -128,7 +129,7 @@ public void execute() throws ResourceUnavailableException { } finally { if (!success || route == null) { _entityMgr.remove(StaticRoute.class, getEntityId()); - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create static route"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create a static route"); } } } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java index 08b7b9911b1b..a91d3bad410f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/CreateVPCCmd.java @@ -52,24 +52,24 @@ public class CreateVPCCmd extends BaseAsyncCreateCmd implements UserCmd { // ////////////// API parameters ///////////////////// // /////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "the account associated with the VPC. " + + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "The Account associated with the VPC. " + "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 VPC. " + - "If used with the account parameter returns the VPC associated with the account for the specified domain.") + description = "The domain ID associated with the VPC. " + + "If used with the Account parameter returns the VPC associated with the Account for the specified domain.") private Long domainId; @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, - description = "create VPC for the project") + description = "Create VPC for the project") private Long projectId; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - required = true, description = "the ID of the availability zone") + required = true, description = "The ID of the availability zone") private Long zoneId; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the VPC") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the VPC") private String vpcName; @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The display text of the VPC, defaults to its 'name'.") @@ -77,7 +77,7 @@ public class CreateVPCCmd extends BaseAsyncCreateCmd implements UserCmd { private String displayText; @Parameter(name = ApiConstants.CIDR, type = CommandType.STRING, - description = "the cidr of the VPC. All VPC guest networks' cidrs should be within this CIDR") + description = "The CIDR of the VPC. All VPC Guest Network's CIDRs should be within this CIDR") private String cidr; @Parameter(name = ApiConstants.CIDR_SIZE, type = CommandType.INTEGER, @@ -86,40 +86,40 @@ public class CreateVPCCmd extends BaseAsyncCreateCmd implements UserCmd { private Integer cidrSize; @Parameter(name = ApiConstants.VPC_OFF_ID, type = CommandType.UUID, entityType = VpcOfferingResponse.class, - required = true, description = "the ID of the VPC offering") + required = true, description = "The ID of the VPC offering") private Long vpcOffering; @Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, - description = "VPC network domain. All networks inside the VPC will belong to this domain") + description = "VPC Network domain. All Networks inside the VPC will belong to this domain") private String networkDomain; @Parameter(name = ApiConstants.START, type = CommandType.BOOLEAN, - description = "If set to false, the VPC won't start (VPC VR will not get allocated) until its first network gets implemented. " + + description = "If set to false, the VPC won't start (VPC VR will not get allocated) until its first Network gets implemented. " + "True by default.", since = "4.3") private Boolean start; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpc to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the VPC to the end User or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; @Parameter(name = ApiConstants.PUBLIC_MTU, type = CommandType.INTEGER, - description = "MTU to be configured on the network VR's public facing interfaces", since = "4.18.0") + description = "MTU to be configured on the Network VR's public facing interfaces", since = "4.18.0") private Integer publicMtu; - @Parameter(name = ApiConstants.DNS1, type = CommandType.STRING, description = "the first IPv4 DNS for the VPC", since = "4.18.0") + @Parameter(name = ApiConstants.DNS1, type = CommandType.STRING, description = "The first IPv4 DNS for the VPC", since = "4.18.0") private String ip4Dns1; - @Parameter(name = ApiConstants.DNS2, type = CommandType.STRING, description = "the second IPv4 DNS for the VPC", since = "4.18.0") + @Parameter(name = ApiConstants.DNS2, type = CommandType.STRING, description = "The second IPv4 DNS for the VPC", since = "4.18.0") private String ip4Dns2; - @Parameter(name = ApiConstants.IP6_DNS1, type = CommandType.STRING, description = "the first IPv6 DNS for the VPC", since = "4.18.0") + @Parameter(name = ApiConstants.IP6_DNS1, type = CommandType.STRING, description = "The first IPv6 DNS for the VPC", since = "4.18.0") private String ip6Dns1; - @Parameter(name = ApiConstants.IP6_DNS2, type = CommandType.STRING, description = "the second IPv6 DNS for the VPC", since = "4.18.0") + @Parameter(name = ApiConstants.IP6_DNS2, type = CommandType.STRING, description = "The second IPv6 DNS for the VPC", since = "4.18.0") private String ip6Dns2; - @Parameter(name = ApiConstants.SOURCE_NAT_IP, type = CommandType.STRING, description = "IPV4 address to be assigned to the public interface of the network router." + - "This address will be used as source NAT address for the networks in ths VPC. " + - "\nIf an address is given and it cannot be acquired, an error will be returned and the network won´t be implemented,", + @Parameter(name = ApiConstants.SOURCE_NAT_IP, type = CommandType.STRING, description = "IPv4 address to be assigned to the public interface of the Network router." + + "This address will be used as source NAT address for the Networks in ths VPC. " + + "\nIf an address is given and it cannot be acquired, an error will be returned and the Network won´t be implemented,", since = "4.19") private String sourceNatIP; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/DeleteStaticRouteCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/DeleteStaticRouteCmd.java index 01b6aae425b3..532a4108076c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/DeleteStaticRouteCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/DeleteStaticRouteCmd.java @@ -44,7 +44,7 @@ public class DeleteStaticRouteCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = StaticRouteResponse.class, required = true, description = "the ID of the static route") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = StaticRouteResponse.class, required = true, description = "The ID of the static route") private Long id; // unexposed parameter needed for events logging diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/DeleteVPCCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/DeleteVPCCmd.java index c35d9084bcc5..ccaac2b1e29b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/DeleteVPCCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/DeleteVPCCmd.java @@ -43,7 +43,7 @@ public class DeleteVPCCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpcResponse.class, required = true, description = "the ID of the VPC") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpcResponse.class, required = true, description = "The ID of the VPC") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListPrivateGatewaysCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListPrivateGatewaysCmd.java index 2304cef3c6d1..aadef68d5ae2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListPrivateGatewaysCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListPrivateGatewaysCmd.java @@ -43,19 +43,19 @@ public class ListPrivateGatewaysCmd extends BaseListProjectAndAccountResourcesCm ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = PrivateGatewayResponse.class, description = "list private gateway by id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = PrivateGatewayResponse.class, description = "List private gateway by ID") private Long id; - @Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, description = "list gateways by ip address") + @Parameter(name = ApiConstants.IP_ADDRESS, type = CommandType.STRING, description = "List gateways by IP address") private String ipAddress; - @Parameter(name = ApiConstants.VLAN, type = CommandType.STRING, description = "list gateways by vlan") + @Parameter(name = ApiConstants.VLAN, type = CommandType.STRING, description = "List gateways by VLAN") private String vlan; - @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "list gateways by vpc") + @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "List gateways by VPC") private Long vpcId; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "list gateways by state") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "List gateways by state") private String state; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListStaticRoutesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListStaticRoutesCmd.java index 36574e2a7777..babc38bc42f1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListStaticRoutesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListStaticRoutesCmd.java @@ -38,16 +38,16 @@ public class ListStaticRoutesCmd extends BaseListTaggedResourcesCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = StaticRouteResponse.class, description = "list static route by id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = StaticRouteResponse.class, description = "List static route by ID") private Long id; - @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "list static routes by vpc id") + @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "List static routes by VPC ID") private Long vpcId; - @Parameter(name = ApiConstants.GATEWAY_ID, type = CommandType.UUID, entityType = PrivateGatewayResponse.class, description = "list static routes by gateway id") + @Parameter(name = ApiConstants.GATEWAY_ID, type = CommandType.UUID, entityType = PrivateGatewayResponse.class, description = "List static routes by gateway ID") private Long gatewayId; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "list static routes by state") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "List static routes by state") private String state; public Long getId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListVPCOfferingsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListVPCOfferingsCmd.java index f48e113286a9..7d603a85993d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListVPCOfferingsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListVPCOfferingsCmd.java @@ -38,38 +38,38 @@ public class ListVPCOfferingsCmd extends BaseListCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpcOfferingResponse.class, description = "list VPC offerings by id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpcOfferingResponse.class, description = "List VPC offerings by ID") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list VPC offerings by name") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "List VPC offerings by name") private String vpcOffName; - @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "list VPC offerings by display text") + @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "List VPC offerings by display text") private String displayText; - @Parameter(name = ApiConstants.IS_DEFAULT, type = CommandType.BOOLEAN, description = "true if need to list only default " + "VPC offerings. Default value is false") + @Parameter(name = ApiConstants.IS_DEFAULT, type = CommandType.BOOLEAN, description = "True if need to list only default " + "VPC offerings. Default value is false") private Boolean isDefault; @Parameter(name = ApiConstants.SUPPORTED_SERVICES, type = CommandType.LIST, collectionType = CommandType.STRING, - description = "list VPC offerings supporting certain services") + description = "List VPC offerings supporting certain services") private List supportedServices; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "list VPC offerings by state") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "List VPC offerings by state") private String state; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "list VPC offerings available for VPC creation in specific domain", + description = "List VPC offerings available for VPC creation in specific domain", since = "4.18") private Long domainId; @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, - description = "id of zone VPC offering is associated with", + description = "ID of zone VPC offering is associated with", since = "4.13") private Long zoneId; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListVPCsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListVPCsCmd.java index d128be1414d2..c4597d9b986c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListVPCsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/ListVPCsCmd.java @@ -46,39 +46,39 @@ public class ListVPCsCmd extends BaseListTaggedResourcesCmd implements UserCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// //////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "list VPC by id") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "List VPC by ID") private Long id; - @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "list by zone") + @Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "List by zone") private Long zoneId; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "list by name of the VPC") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "List by name of the VPC") private String vpcName; - @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "List by display text of " + "the VPC") + @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "List by display text of " + "The VPC") private String displayText; - @Parameter(name = ApiConstants.CIDR, type = CommandType.STRING, description = "list by cidr of the VPC. All VPC " - + "guest networks' cidrs should be within this CIDR") + @Parameter(name = ApiConstants.CIDR, type = CommandType.STRING, description = "List by CIDR of the VPC. All VPC " + + "Guest Network's CIDRs should be within this CIDR") private String cidr; - @Parameter(name = ApiConstants.VPC_OFF_ID, type = CommandType.UUID, entityType = VpcOfferingResponse.class, description = "list by ID of the VPC offering") + @Parameter(name = ApiConstants.VPC_OFF_ID, type = CommandType.UUID, entityType = VpcOfferingResponse.class, description = "List by ID of the VPC offering") private Long VpcOffId; - @Parameter(name = ApiConstants.SUPPORTED_SERVICES, type = CommandType.LIST, collectionType = CommandType.STRING, description = "list VPC supporting certain services") + @Parameter(name = ApiConstants.SUPPORTED_SERVICES, type = CommandType.LIST, collectionType = CommandType.STRING, description = "List VPC supporting certain services") private List supportedServices; - @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "list VPCs by state") + @Parameter(name = ApiConstants.STATE, type = CommandType.STRING, description = "List VPCs by state") private String state; - @Parameter(name = ApiConstants.RESTART_REQUIRED, type = CommandType.BOOLEAN, description = "list VPCs by restartRequired option") + @Parameter(name = ApiConstants.RESTART_REQUIRED, type = CommandType.BOOLEAN, description = "List VPCs by restartRequired option") private Boolean restartRequired; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; @Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN, - description = "flag to display the resource icon for VPCs") + description = "Flag to display the resource icon for VPCs") private Boolean showIcon; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java index 5ccd496eeb4c..9dadf061753a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/RestartVPCCmd.java @@ -43,10 +43,10 @@ public class RestartVPCCmd extends BaseAsyncCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpcResponse.class, required = true, description = "the id of the VPC") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpcResponse.class, required = true, description = "The ID of the VPC") private Long id; - @Parameter(name = ApiConstants.CLEANUP, type = CommandType.BOOLEAN, required = false, description = "If cleanup old network elements") + @Parameter(name = ApiConstants.CLEANUP, type = CommandType.BOOLEAN, required = false, description = "Should we cleanup the old Network elements") private Boolean cleanup = false; @Parameter(name = ApiConstants.MAKEREDUNDANT, type = CommandType.BOOLEAN, required = false, description = "Turn a single VPC into a redundant one.") diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java index 6fcfb5311f62..88e38649802b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpc/UpdateVPCCmd.java @@ -47,25 +47,25 @@ public class UpdateVPCCmd extends BaseAsyncCustomIdCmd implements UserCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// @ACL(accessType = AccessType.OperateEntry) - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpcResponse.class, required = true, description = "the id of the VPC") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpcResponse.class, required = true, description = "The ID of the VPC") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the VPC") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the VPC") private String vpcName; - @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "the display text of the VPC") + @Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The display text of the VPC") private String displayText; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpc to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "Optional field, should we display the VPC to the end User or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; @Parameter(name = ApiConstants.PUBLIC_MTU, type = CommandType.INTEGER, - description = "MTU to be configured on the network VR's public facing interfaces", since = "4.18.0") + description = "MTU to be configured on the Network VR's public facing interfaces", since = "4.18.0") private Integer publicMtu; @Parameter(name = ApiConstants.SOURCE_NAT_IP, type = CommandType.STRING, - description = "IPV4 address to be assigned to the public interface of the network router. This address must already be acquired for this VPC", + description = "IPV4 address to be assigned to the public interface of the Network router. This address must already be acquired for this VPC", since = "4.19") private String sourceNatIP; diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/AddVpnUserCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/AddVpnUserCmd.java index 781edff52e3e..b00b932258a4 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/AddVpnUserCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/AddVpnUserCmd.java @@ -32,7 +32,7 @@ import com.cloud.network.VpnUser; import com.cloud.user.Account; -@APICommand(name = "addVpnUser", description = "Adds vpn users", responseObject = VpnUsersResponse.class, entityType = {VpnUser.class}, +@APICommand(name = "addVpnUser", description = "Adds VPN Users", responseObject = VpnUsersResponse.class, entityType = {VpnUser.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class AddVpnUserCmd extends BaseAsyncCreateCmd { @@ -40,22 +40,22 @@ public class AddVpnUserCmd extends BaseAsyncCreateCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "username for the vpn user") + @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "Username for the VPN User") private String userName; - @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, required = true, description = "password for the username") + @Parameter(name = ApiConstants.PASSWORD, type = CommandType.STRING, required = true, description = "Password for the username") private String password; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the vpn user. Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional Account for the VPN User. Must be used with domainId.") private String accountName; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "add vpn user to the specific project") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Add VPN User to the specific project") private Long projectId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "an optional domainId for the vpn user. If the account parameter is used, domainId must also be used.") + description = "An optional domainId for the VPN User. If the account parameter is used, domainId must also be used.") private Long domainId; ///////////////////////////////////////////////////// @@ -98,7 +98,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "Add Remote Access VPN user for account " + getEntityOwnerId() + " username= " + getUserName(); + return "Add Remote Access VPN User for Account " + getEntityOwnerId() + " username= " + getUserName(); } @Override @@ -111,7 +111,7 @@ public void execute() { VpnUser vpnUser = _entityMgr.findById(VpnUser.class, getEntityId()); try { if (!_ravService.applyVpnUsers(vpnUser.getAccountId(), userName)) { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add vpn user"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add VPN User"); } } catch (Exception ex) { throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, ex.getMessage()); @@ -129,7 +129,7 @@ public void create() { VpnUser vpnUser = _ravService.addVpnUser(owner.getId(), userName, password); if (vpnUser == null) { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add vpn user"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to add VPN User"); } setEntityId(vpnUser.getId()); setEntityUuid(vpnUser.getUuid()); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateRemoteAccessVpnCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateRemoteAccessVpnCmd.java index 417ba2773c41..c730c2c5fe88 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateRemoteAccessVpnCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateRemoteAccessVpnCmd.java @@ -37,7 +37,7 @@ import com.cloud.network.IpAddress; import com.cloud.network.RemoteAccessVpn; -@APICommand(name = "createRemoteAccessVpn", description = "Creates a l2tp/ipsec remote access vpn", responseObject = RemoteAccessVpnResponse.class, entityType = {RemoteAccessVpn.class}, +@APICommand(name = "createRemoteAccessVpn", description = "Creates a l2tp/ipsec remote access VPN", responseObject = RemoteAccessVpnResponse.class, entityType = {RemoteAccessVpn.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateRemoteAccessVpnCmd extends BaseAsyncCreateCmd { @@ -49,32 +49,32 @@ public class CreateRemoteAccessVpnCmd extends BaseAsyncCreateCmd { type = CommandType.UUID, entityType = IPAddressResponse.class, required = true, - description = "public ip address id of the vpn server") + description = "Public IP address id of the VPN server") private Long publicIpId; @Parameter(name = "iprange", type = CommandType.STRING, required = false, - description = "the range of ip addresses to allocate to vpn clients. The first ip in the range will be taken by the vpn server") + description = "The range of IP addresses to allocate to VPN clients. The first IP in the range will be taken by the VPN server") private String ipRange; @Deprecated - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the VPN. Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional Account for the VPN. Must be used with domainId.") private String accountName; @Deprecated @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "an optional domainId for the VPN. If the account parameter is used, domainId must also be used.") + description = "An optional domainId for the VPN. If the account parameter is used, domainId must also be used.") private Long domainId; @Parameter(name = ApiConstants.OPEN_FIREWALL, type = CommandType.BOOLEAN, - description = "if true, firewall rule for source/end public port is automatically created; if false - firewall rule has to be created explicitly. Has value true by default") + description = "If true, firewall rule for source/end public port is automatically created; if false - firewall rule has to be created explicitly. Has value true by default") private Boolean openFirewall; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpn to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the VPN to the end User or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// @@ -127,7 +127,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "Create Remote Access VPN for account " + getEntityOwnerId() + " using public ip id=" + publicIpId; + return "Create Remote Access VPN for Account " + getEntityOwnerId() + " using public ip id=" + publicIpId; } @Override @@ -143,10 +143,10 @@ public void create() { setEntityId(vpn.getId()); setEntityUuid(vpn.getUuid()); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create remote access vpn"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create remote access VPN"); } } catch (NetworkRuleConflictException e) { - logger.info("Network rule conflict: " + e.getMessage()); + logger.info("Network rule conflict: {}", e.getMessage()); logger.trace("Network Rule Conflict: ", e); throw new ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, e.getMessage()); } @@ -161,7 +161,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create remote access vpn"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create remote access VPN"); } } catch (ResourceUnavailableException ex) { logger.warn("Exception: ", ex); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateVpnConnectionCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateVpnConnectionCmd.java index 0b5c46d36eb9..3d6b7918effd 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateVpnConnectionCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateVpnConnectionCmd.java @@ -37,7 +37,7 @@ import com.cloud.network.vpc.Vpc; -@APICommand(name = "createVpnConnection", description = "Create site to site vpn connection", responseObject = Site2SiteVpnConnectionResponse.class, entityType = {Site2SiteVpnConnection.class}, +@APICommand(name = "createVpnConnection", description = "Create site to site VPN connection", responseObject = Site2SiteVpnConnectionResponse.class, entityType = {Site2SiteVpnConnection.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateVpnConnectionCmd extends BaseAsyncCreateCmd { @@ -49,20 +49,20 @@ public class CreateVpnConnectionCmd extends BaseAsyncCreateCmd { type = CommandType.UUID, entityType = Site2SiteVpnGatewayResponse.class, required = true, - description = "id of the vpn gateway") + description = "ID of the VPN gateway") private Long vpnGatewayId; @Parameter(name = ApiConstants.S2S_CUSTOMER_GATEWAY_ID, type = CommandType.UUID, entityType = Site2SiteCustomerGatewayResponse.class, required = true, - description = "id of the customer gateway") + description = "ID of the customer gateway") private Long customerGatewayId; - @Parameter(name = ApiConstants.PASSIVE, type = CommandType.BOOLEAN, required = false, description = "connection is passive or not") + @Parameter(name = ApiConstants.PASSIVE, type = CommandType.BOOLEAN, required = false, description = "Connection is passive or not") private Boolean passive; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpn to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the VPN to the end User or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// @@ -114,7 +114,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "Create site-to-site VPN connection for account " + getEntityOwnerId(); + return "Create site-to-site VPN connection for Account " + getEntityOwnerId(); } @Override @@ -130,10 +130,10 @@ public void create() { setEntityId(conn.getId()); setEntityUuid(conn.getUuid()); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create site to site vpn connection"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create site to site VPN connection"); } } catch (NetworkRuleConflictException e) { - logger.info("Network rule conflict: " + e.getMessage()); + logger.info("Network rule conflict: {}", e.getMessage()); logger.trace("Network Rule Conflict: ", e); throw new ServerApiException(ApiErrorCode.NETWORK_RULE_CONFLICT_ERROR, e.getMessage()); } @@ -148,7 +148,7 @@ public void execute() { response.setResponseName(getCommandName()); setResponseObject(response); } else { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create site to site vpn connection"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create site to site VPN connection"); } } catch (ResourceUnavailableException ex) { logger.warn("Exception: ", ex); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateVpnCustomerGatewayCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateVpnCustomerGatewayCmd.java index a2fa0d9829c8..ef0e2354495f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateVpnCustomerGatewayCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateVpnCustomerGatewayCmd.java @@ -33,7 +33,7 @@ import com.cloud.exception.ResourceAllocationException; import com.cloud.network.Site2SiteCustomerGateway; -@APICommand(name = "createVpnCustomerGateway", description = "Creates site to site vpn customer gateway", responseObject = Site2SiteCustomerGatewayResponse.class, entityType = {Site2SiteCustomerGateway.class}, +@APICommand(name = "createVpnCustomerGateway", description = "Creates site to site VPN customer gateway", responseObject = Site2SiteCustomerGatewayResponse.class, entityType = {Site2SiteCustomerGateway.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateVpnCustomerGatewayCmd extends BaseAsyncCreateCmd { @@ -41,13 +41,13 @@ public class CreateVpnCustomerGatewayCmd extends BaseAsyncCreateCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = false, description = "name of this customer gateway") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = false, description = "Name of this customer gateway") private String name; - @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, required = true, description = "public ip address id of the customer gateway") + @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, required = true, description = "Public IP address id of the customer gateway") private String gatewayIp; - @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.STRING, required = true, description = "guest cidr list of the customer gateway. Multiple entries must be separated by a single comma character (,).") + @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.STRING, required = true, description = "Guest cidr list of the customer gateway. Multiple entries must be separated by a single comma character (,).") private String peerCidrList; @Parameter(name = ApiConstants.IPSEC_PSK, type = CommandType.STRING, required = true, description = "IPsec Preshared-Key of the customer gateway. Cannot contain newline or double quotes.") @@ -77,18 +77,18 @@ public class CreateVpnCustomerGatewayCmd extends BaseAsyncCreateCmd { @Parameter(name = ApiConstants.FORCE_ENCAP, type = CommandType.BOOLEAN, required = false, description = "Force Encapsulation for NAT traversal") private Boolean encap; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "the account associated with the gateway. Must be used with the domainId parameter.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "The Account associated with the gateway. 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 gateway. If used with the account parameter returns the " - + "gateway associated with the account for the specified domain.") + description = "The domain ID associated with the gateway. If used with the account parameter returns the " + + "gateway associated with the Account for the specified domain.") private Long domainId; @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, - description = "create site-to-site VPN customer gateway for the project", since = "4.6") + description = "Create site-to-site VPN customer gateway for the project", since = "4.6") private Long projectId; @Parameter(name = ApiConstants.SPLIT_CONNECTIONS, type = CommandType.BOOLEAN, required = false, description = "For IKEv2, whether to split multiple right subnet cidrs into multiple connection statements.", @@ -176,7 +176,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "Create site-to-site VPN customer gateway for account " + getEntityOwnerId(); + return "Create site-to-site VPN customer gateway for Account " + getEntityOwnerId(); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateVpnGatewayCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateVpnGatewayCmd.java index 6c3f57b3dfa8..533d2c0ab814 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateVpnGatewayCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/CreateVpnGatewayCmd.java @@ -33,7 +33,7 @@ import org.apache.cloudstack.api.response.VpcResponse; import org.apache.cloudstack.context.CallContext; -@APICommand(name = "createVpnGateway", description = "Creates site to site vpn local gateway", responseObject = Site2SiteVpnGatewayResponse.class, entityType = {Site2SiteVpnGateway.class}, +@APICommand(name = "createVpnGateway", description = "Creates site to site VPN local gateway", responseObject = Site2SiteVpnGatewayResponse.class, entityType = {Site2SiteVpnGateway.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class CreateVpnGatewayCmd extends BaseAsyncCreateCmd { @@ -45,7 +45,7 @@ public class CreateVpnGatewayCmd extends BaseAsyncCreateCmd { type = CommandType.UUID, entityType = VpcResponse.class, required = true, - description = "id of the vpc") + description = "Public IP address id of the VPN gateway") private Long vpcId; @Parameter(name = ApiConstants.IP_ADDRESS_ID, @@ -55,7 +55,7 @@ public class CreateVpnGatewayCmd extends BaseAsyncCreateCmd { since = "4.21.0") private Long ipAddressId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpn to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the VPN to the end User or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// @@ -96,7 +96,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "Create site-to-site VPN gateway for account " + getEntityOwnerId(); + return "Create site-to-site VPN gateway for Account " + getEntityOwnerId(); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteRemoteAccessVpnCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteRemoteAccessVpnCmd.java index bf8d01579238..91e1cd1e56c7 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteRemoteAccessVpnCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteRemoteAccessVpnCmd.java @@ -34,7 +34,7 @@ import com.cloud.exception.ResourceUnavailableException; import com.cloud.network.RemoteAccessVpn; -@APICommand(name = "deleteRemoteAccessVpn", description = "Destroys a l2tp/ipsec remote access vpn", responseObject = SuccessResponse.class, entityType = {RemoteAccessVpn.class}, +@APICommand(name = "deleteRemoteAccessVpn", description = "Destroys a l2tp/ipsec remote access VPN", responseObject = SuccessResponse.class, entityType = {RemoteAccessVpn.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteRemoteAccessVpnCmd extends BaseAsyncCmd { @@ -47,7 +47,7 @@ public class DeleteRemoteAccessVpnCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = IPAddressResponse.class, required = true, - description = "public ip address id of the vpn server") + description = "Public IP address id of the VPN server") private Long publicIpId; // unexposed parameter needed for events logging @@ -69,14 +69,14 @@ public long getEntityOwnerId() { if (vpnEntity != null) return vpnEntity.getAccountId(); - throw new InvalidParameterValueException("The specified public ip is not allocated to any account"); + throw new InvalidParameterValueException("The specified public ip is not allocated to any Account"); } return ownerId; } @Override public String getEventDescription() { - return "Delete Remote Access VPN for account " + getEntityOwnerId() + " for ip id=" + publicIpId; + return "Delete Remote Access VPN for Account " + getEntityOwnerId() + " for ip id=" + publicIpId; } @Override @@ -87,7 +87,7 @@ public String getEventType() { @Override public void execute() throws ResourceUnavailableException { if (! _ravService.destroyRemoteAccessVpnForIp(publicIpId, CallContext.current().getCallingAccount(), false)) { - throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete remote access vpn"); + throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete remote access VPN"); } SuccessResponse response = new SuccessResponse(getCommandName()); this.setResponseObject(response); diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteVpnConnectionCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteVpnConnectionCmd.java index 2528d93a0422..f66fe237a996 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteVpnConnectionCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteVpnConnectionCmd.java @@ -31,7 +31,7 @@ import com.cloud.network.Site2SiteVpnConnection; import com.cloud.user.Account; -@APICommand(name = "deleteVpnConnection", description = "Delete site to site vpn connection", responseObject = SuccessResponse.class, entityType = {Site2SiteVpnConnection.class}, +@APICommand(name = "deleteVpnConnection", description = "Delete site to site VPN connection", responseObject = SuccessResponse.class, entityType = {Site2SiteVpnConnection.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteVpnConnectionCmd extends BaseAsyncCmd { @@ -39,7 +39,7 @@ public class DeleteVpnConnectionCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnConnectionResponse.class, required = true, description = "id of vpn connection") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnConnectionResponse.class, required = true, description = "ID of VPN connection") private Long id; ///////////////////////////////////////////////////// @@ -65,7 +65,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "Delete site-to-site VPN connection for account " + getEntityOwnerId(); + return "Delete site-to-site VPN connection for Account " + getEntityOwnerId(); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteVpnCustomerGatewayCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteVpnCustomerGatewayCmd.java index 2b657fd3c088..0d43477205ec 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteVpnCustomerGatewayCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteVpnCustomerGatewayCmd.java @@ -33,7 +33,7 @@ import com.cloud.network.Site2SiteCustomerGateway; import com.cloud.user.Account; -@APICommand(name = "deleteVpnCustomerGateway", description = "Delete site to site vpn customer gateway", responseObject = SuccessResponse.class, entityType = {Site2SiteCustomerGateway.class}, +@APICommand(name = "deleteVpnCustomerGateway", description = "Delete site to site VPN customer gateway", responseObject = SuccessResponse.class, entityType = {Site2SiteCustomerGateway.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteVpnCustomerGatewayCmd extends BaseAsyncCmd { @@ -46,7 +46,7 @@ public class DeleteVpnCustomerGatewayCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = Site2SiteCustomerGatewayResponse.class, required = true, - description = "id of customer gateway") + description = "ID of customer gateway") private Long id; ///////////////////////////////////////////////////// @@ -72,7 +72,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "Delete site-to-site VPN customer gateway for account " + getEntityOwnerId(); + return "Delete site-to-site VPN customer gateway for Account " + getEntityOwnerId(); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteVpnGatewayCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteVpnGatewayCmd.java index 27ded12dc58d..bfea59a3e6f3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteVpnGatewayCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/DeleteVpnGatewayCmd.java @@ -30,7 +30,7 @@ import com.cloud.network.Site2SiteVpnGateway; import com.cloud.user.Account; -@APICommand(name = "deleteVpnGateway", description = "Delete site to site vpn gateway", responseObject = SuccessResponse.class, entityType = {Site2SiteVpnGateway.class}, +@APICommand(name = "deleteVpnGateway", description = "Delete site to site VPN gateway", responseObject = SuccessResponse.class, entityType = {Site2SiteVpnGateway.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class DeleteVpnGatewayCmd extends BaseAsyncCmd { @@ -38,7 +38,7 @@ public class DeleteVpnGatewayCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnGatewayResponse.class, required = true, description = "id of customer gateway") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnGatewayResponse.class, required = true, description = "ID of customer gateway") private Long id; ///////////////////////////////////////////////////// @@ -64,7 +64,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "Delete site-to-site VPN gateway for account " + getEntityOwnerId(); + return "Delete site-to-site VPN gateway for Account " + getEntityOwnerId(); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListRemoteAccessVpnsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListRemoteAccessVpnsCmd.java index 4efc70c84199..185d11bc29d4 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListRemoteAccessVpnsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListRemoteAccessVpnsCmd.java @@ -33,7 +33,7 @@ import com.cloud.network.RemoteAccessVpn; import com.cloud.utils.Pair; -@APICommand(name = "listRemoteAccessVpns", description = "Lists remote access vpns", responseObject = RemoteAccessVpnResponse.class, entityType = {RemoteAccessVpn.class}, +@APICommand(name = "listRemoteAccessVpns", description = "Lists remote access VPNs", responseObject = RemoteAccessVpnResponse.class, entityType = {RemoteAccessVpn.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListRemoteAccessVpnsCmd extends BaseListProjectAndAccountResourcesCmd { @@ -41,24 +41,24 @@ public class ListRemoteAccessVpnsCmd extends BaseListProjectAndAccountResourcesC ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.PUBLIC_IP_ID, type = CommandType.UUID, entityType = IPAddressResponse.class, description = "public ip address id of the vpn server") + @Parameter(name = ApiConstants.PUBLIC_IP_ID, type = CommandType.UUID, entityType = IPAddressResponse.class, description = "Public ip address id of the VPN server") private Long publicIpId; @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = RemoteAccessVpnResponse.class, - description = "Lists remote access vpn rule with the specified ID", + description = "Lists remote access VPN rule with the specified ID", since = "4.3") private Long id; @Parameter(name = ApiConstants.NETWORK_ID, type = CommandType.UUID, entityType = NetworkResponse.class, - description = "list remote access VPNs for certain network", + description = "List remote access VPNs for certain Network", since = "4.3") private Long networkId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnConnectionsCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnConnectionsCmd.java index aeeae44d0046..9a37e2f786c0 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnConnectionsCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnConnectionsCmd.java @@ -32,7 +32,7 @@ import com.cloud.network.Site2SiteVpnConnection; import com.cloud.utils.Pair; -@APICommand(name = "listVpnConnections", description = "Lists site to site vpn connection gateways", responseObject = Site2SiteVpnConnectionResponse.class, entityType = {Site2SiteVpnConnection.class}, +@APICommand(name = "listVpnConnections", description = "Lists site to site VPN connection gateways", responseObject = Site2SiteVpnConnectionResponse.class, entityType = {Site2SiteVpnConnection.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListVpnConnectionsCmd extends BaseListProjectAndAccountResourcesCmd { @@ -40,13 +40,13 @@ public class ListVpnConnectionsCmd extends BaseListProjectAndAccountResourcesCmd ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnConnectionResponse.class, description = "id of the vpn connection") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnConnectionResponse.class, description = "ID of the VPN connection") private Long id; - @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "id of vpc") + @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "ID of VPC") private Long vpcId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnCustomerGatewaysCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnCustomerGatewaysCmd.java index 258a8a753ebe..51e761839718 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnCustomerGatewaysCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnCustomerGatewaysCmd.java @@ -30,7 +30,7 @@ import com.cloud.network.Site2SiteCustomerGateway; import com.cloud.utils.Pair; -@APICommand(name = "listVpnCustomerGateways", description = "Lists site to site vpn customer gateways", responseObject = Site2SiteCustomerGatewayResponse.class, entityType = {Site2SiteCustomerGateway.class}, +@APICommand(name = "listVpnCustomerGateways", description = "Lists site to site VPN customer gateways", responseObject = Site2SiteCustomerGatewayResponse.class, entityType = {Site2SiteCustomerGateway.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListVpnCustomerGatewaysCmd extends BaseListProjectAndAccountResourcesCmd { @@ -39,7 +39,7 @@ public class ListVpnCustomerGatewaysCmd extends BaseListProjectAndAccountResourc //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteCustomerGatewayResponse.class, description = "id of the customer gateway") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteCustomerGatewayResponse.class, description = "ID of the customer gateway") private Long id; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnGatewaysCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnGatewaysCmd.java index d30fbf8d32bb..3bdcf79677a0 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnGatewaysCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnGatewaysCmd.java @@ -32,7 +32,7 @@ import com.cloud.network.Site2SiteVpnGateway; import com.cloud.utils.Pair; -@APICommand(name = "listVpnGateways", description = "Lists site 2 site vpn gateways", responseObject = Site2SiteVpnGatewayResponse.class, entityType = {Site2SiteVpnGateway.class}, +@APICommand(name = "listVpnGateways", description = "Lists site 2 site VPN gateways", responseObject = Site2SiteVpnGatewayResponse.class, entityType = {Site2SiteVpnGateway.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListVpnGatewaysCmd extends BaseListProjectAndAccountResourcesCmd { @@ -41,13 +41,13 @@ public class ListVpnGatewaysCmd extends BaseListProjectAndAccountResourcesCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnGatewayResponse.class, description = "id of the vpn gateway") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnGatewayResponse.class, description = "ID of the VPN gateway") private Long id; - @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "id of vpc") + @Parameter(name = ApiConstants.VPC_ID, type = CommandType.UUID, entityType = VpcResponse.class, description = "ID of VPC ") private Long vpcId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "list resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "List resources by display flag; only ROOT admin is eligible to pass this parameter", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnUsersCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnUsersCmd.java index 48591765ec34..b4a621e53f91 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnUsersCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ListVpnUsersCmd.java @@ -30,7 +30,7 @@ import com.cloud.network.VpnUser; import com.cloud.utils.Pair; -@APICommand(name = "listVpnUsers", description = "Lists vpn users", responseObject = VpnUsersResponse.class, entityType = {VpnUser.class}, +@APICommand(name = "listVpnUsers", description = "Lists VPN Users", responseObject = VpnUsersResponse.class, entityType = {VpnUser.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ListVpnUsersCmd extends BaseListProjectAndAccountResourcesCmd { @@ -38,10 +38,10 @@ public class ListVpnUsersCmd extends BaseListProjectAndAccountResourcesCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpnUsersResponse.class, description = "The uuid of the Vpn user") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = VpnUsersResponse.class, description = "The UUID of the VPN User") private Long id; - @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, description = "the username of the vpn user.") + @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, description = "The username of the VPN User.") private String userName; ///////////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/RemoveVpnUserCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/RemoveVpnUserCmd.java index 0697987b04de..aff87105f9cb 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/RemoveVpnUserCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/RemoveVpnUserCmd.java @@ -33,7 +33,7 @@ import com.cloud.network.VpnUser; import com.cloud.user.Account; -@APICommand(name = "removeVpnUser", description = "Removes vpn user", responseObject = SuccessResponse.class, entityType = {VpnUser.class}, +@APICommand(name = "removeVpnUser", description = "Removes VPN User", responseObject = SuccessResponse.class, entityType = {VpnUser.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class RemoveVpnUserCmd extends BaseAsyncCmd { @@ -41,19 +41,19 @@ public class RemoveVpnUserCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "username for the vpn user") + @Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "Username for the VPN User") private String userName; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for the vpn user. Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional Account for the VPN User. Must be used with domainId.") private String accountName; - @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "remove vpn user from the project") + @Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Remove VPN User from the project") private Long projectId; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "an optional domainId for the vpn user. If the account parameter is used, domainId must also be used.") + description = "An optional domainId for the VPN User. If the Account parameter is used, domainId must also be used.") private Long domainId; ///////////////////////////////////////////////////// @@ -92,7 +92,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "Remove Remote Access VPN user for account " + getEntityOwnerId() + " username= " + getUserName(); + return "Remove Remote Access VPN User for Account " + getEntityOwnerId() + " username= " + getUserName(); } @Override @@ -106,7 +106,7 @@ public void execute() { long ownerId = owner.getId(); boolean result = _ravService.removeVpnUser(owner, userName, CallContext.current().getCallingAccount()); if (!result) { - String errorMessage = String.format("Failed to remove VPN user=[%s]. VPN owner id=[%s].", userName, ownerId); + String errorMessage = String.format("Failed to remove VPN User=[%s]. VPN owner id=[%s].", userName, ownerId); logger.error(errorMessage); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, errorMessage); } @@ -115,13 +115,13 @@ public void execute() { try { appliedVpnUsers = _ravService.applyVpnUsers(ownerId, userName, true); } catch (ResourceUnavailableException ex) { - String errorMessage = String.format("Failed to refresh VPN user=[%s] due to resource unavailable. VPN owner id=[%s].", userName, ownerId); + String errorMessage = String.format("Failed to refresh VPN User=[%s] due to resource unavailable. VPN owner id=[%s].", userName, ownerId); logger.error(errorMessage, ex); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, errorMessage, ex); } if (!appliedVpnUsers) { - String errorMessage = String.format("Failed to refresh VPN user=[%s]. VPN owner id=[%s].", userName, ownerId); + String errorMessage = String.format("Failed to refresh VPN User=[%s]. VPN owner id=[%s].", userName, ownerId); logger.debug(errorMessage); throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, errorMessage); } diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ResetVpnConnectionCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ResetVpnConnectionCmd.java index 736295b4119c..b6e29e66ff4b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ResetVpnConnectionCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/ResetVpnConnectionCmd.java @@ -32,7 +32,7 @@ import com.cloud.network.Site2SiteVpnConnection; import com.cloud.user.Account; -@APICommand(name = "resetVpnConnection", description = "Reset site to site vpn connection", responseObject = Site2SiteVpnConnectionResponse.class, entityType = {Site2SiteVpnConnection.class}, +@APICommand(name = "resetVpnConnection", description = "Reset site to site VPN connection", responseObject = Site2SiteVpnConnectionResponse.class, entityType = {Site2SiteVpnConnection.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class ResetVpnConnectionCmd extends BaseAsyncCmd { @@ -40,16 +40,16 @@ public class ResetVpnConnectionCmd extends BaseAsyncCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnConnectionResponse.class, required = true, description = "id of vpn connection") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnConnectionResponse.class, required = true, description = "ID of VPN connection") private Long id; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional account for connection. " + "Must be used with domainId.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional Account for connection. " + "Must be used with domainId.") private String accountName; @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, - description = "an optional domainId for connection. If the account parameter is used, domainId must also be used.") + description = "An optional domainId for connection. If the Account parameter is used, domainId must also be used.") private Long domainId; ///////////////////////////////////////////////////// @@ -83,7 +83,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "Reset site-to-site VPN connection for account " + getEntityOwnerId(); + return "Reset site-to-site VPN connection for Account " + getEntityOwnerId(); } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateRemoteAccessVpnCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateRemoteAccessVpnCmd.java index defde70b63ac..edf2b9e630bc 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateRemoteAccessVpnCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateRemoteAccessVpnCmd.java @@ -28,7 +28,7 @@ import com.cloud.exception.InvalidParameterValueException; import com.cloud.network.RemoteAccessVpn; -@APICommand(name = "updateRemoteAccessVpn", description = "Updates remote access vpn", responseObject = RemoteAccessVpnResponse.class, since = "4.4", +@APICommand(name = "updateRemoteAccessVpn", description = "Updates remote access VPN", responseObject = RemoteAccessVpnResponse.class, since = "4.4", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdateRemoteAccessVpnCmd extends BaseAsyncCustomIdCmd { @@ -37,14 +37,14 @@ public class UpdateRemoteAccessVpnCmd extends BaseAsyncCustomIdCmd { //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, required = true, entityType = RemoteAccessVpnResponse.class, description = "id of the remote access vpn") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, required = true, entityType = RemoteAccessVpnResponse.class, description = "ID of the remote access VPN") private Long id; // unexposed parameter needed for events logging @Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.UUID, entityType = AccountResponse.class, expose = false) private Long ownerId; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpn to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the VPN to the end User or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// @@ -73,7 +73,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "Updating remote access vpn id=" + id; + return "Updating remote access VPN id=" + id; } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateVpnConnectionCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateVpnConnectionCmd.java index 62dd6167b753..92f6786268ad 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateVpnConnectionCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateVpnConnectionCmd.java @@ -27,7 +27,7 @@ import com.cloud.network.Site2SiteVpnConnection; import com.cloud.user.Account; -@APICommand(name = "updateVpnConnection", description = "Updates site to site vpn connection", responseObject = Site2SiteVpnConnectionResponse.class, since = "4.4", +@APICommand(name = "updateVpnConnection", description = "Updates site to site VPN connection", responseObject = Site2SiteVpnConnectionResponse.class, since = "4.4", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdateVpnConnectionCmd extends BaseAsyncCustomIdCmd { @@ -35,10 +35,10 @@ public class UpdateVpnConnectionCmd extends BaseAsyncCustomIdCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnConnectionResponse.class, required = true, description = "id of vpn connection") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnConnectionResponse.class, required = true, description = "ID of VPN connection") private Long id; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpn to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the VPN to the end User or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// @@ -66,7 +66,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "Updating site-to-site VPN connection id= " + id; + return "Updating site-to-site VPN connection ID = " + id; } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateVpnCustomerGatewayCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateVpnCustomerGatewayCmd.java index 9f3ac2ec4367..edd168f08373 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateVpnCustomerGatewayCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateVpnCustomerGatewayCmd.java @@ -32,7 +32,7 @@ import com.cloud.event.EventTypes; import com.cloud.network.Site2SiteCustomerGateway; -@APICommand(name = "updateVpnCustomerGateway", description = "Update site to site vpn customer gateway", responseObject = Site2SiteCustomerGatewayResponse.class, entityType = {Site2SiteCustomerGateway.class}, +@APICommand(name = "updateVpnCustomerGateway", description = "Update site to site VPN customer gateway", responseObject = Site2SiteCustomerGatewayResponse.class, entityType = {Site2SiteCustomerGateway.class}, requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdateVpnCustomerGatewayCmd extends BaseAsyncCmd { @@ -44,16 +44,16 @@ public class UpdateVpnCustomerGatewayCmd extends BaseAsyncCmd { type = CommandType.UUID, entityType = Site2SiteCustomerGatewayResponse.class, required = true, - description = "id of customer gateway") + description = "ID of customer gateway") private Long id; - @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = false, description = "name of this customer gateway") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = false, description = "Name of this customer gateway") private String name; - @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, required = true, description = "public ip address id of the customer gateway") + @Parameter(name = ApiConstants.GATEWAY, type = CommandType.STRING, required = true, description = "Public IP address id of the customer gateway") private String gatewayIp; - @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.STRING, required = true, description = "guest cidr of the customer gateway. Multiple entries must be separated by a single comma character (,).") + @Parameter(name = ApiConstants.CIDR_LIST, type = CommandType.STRING, required = true, description = "Guest CIDR of the customer gateway. Multiple entries must be separated by a single comma character (,).") private String guestCidrList; @Parameter(name = ApiConstants.IPSEC_PSK, type = CommandType.STRING, required = true, description = "IPsec Preshared-Key of the customer gateway. Cannot contain newline or double quotes.") @@ -83,14 +83,14 @@ public class UpdateVpnCustomerGatewayCmd extends BaseAsyncCmd { @Parameter(name = ApiConstants.FORCE_ENCAP, type = CommandType.BOOLEAN, required = false, description = "Force encapsulation for Nat Traversal") private Boolean encap; - @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "the account associated with the gateway. Must be used with the domainId parameter.") + @Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "The Account associated with the gateway. 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 gateway. If used with the account parameter returns the " - + "gateway associated with the account for the specified domain.") + description = "The domain ID associated with the gateway. If used with the account parameter returns the " + + "gateway associated with the Account for the specified domain.") private Long domainId; @Parameter(name = ApiConstants.SPLIT_CONNECTIONS, type = CommandType.BOOLEAN, required = false, description = "For IKEv2, whether to split multiple right subnet cidrs into multiple connection statements.", diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateVpnGatewayCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateVpnGatewayCmd.java index 9fe5ae0480f7..25076991217f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateVpnGatewayCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/vpn/UpdateVpnGatewayCmd.java @@ -27,7 +27,7 @@ import com.cloud.network.Site2SiteVpnGateway; import com.cloud.user.Account; -@APICommand(name = "updateVpnGateway", description = "Updates site to site vpn local gateway", responseObject = Site2SiteVpnGatewayResponse.class, since = "4.4", +@APICommand(name = "updateVpnGateway", description = "Updates site to site VPN local gateway", responseObject = Site2SiteVpnGatewayResponse.class, since = "4.4", requestHasSensitiveInfo = false, responseHasSensitiveInfo = false) public class UpdateVpnGatewayCmd extends BaseAsyncCustomIdCmd { @@ -35,10 +35,10 @@ public class UpdateVpnGatewayCmd extends BaseAsyncCustomIdCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnGatewayResponse.class, required = true, description = "id of customer gateway") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = Site2SiteVpnGatewayResponse.class, required = true, description = "ID of customer gateway") private Long id; - @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "an optional field, whether to the display the vpn to the end user or not", since = "4.4", authorized = {RoleType.Admin}) + @Parameter(name = ApiConstants.FOR_DISPLAY, type = CommandType.BOOLEAN, description = "An optional field, whether to the display the VPN to the end User or not", since = "4.4", authorized = {RoleType.Admin}) private Boolean display; ///////////////////////////////////////////////////// @@ -63,7 +63,7 @@ public long getEntityOwnerId() { @Override public String getEventDescription() { - return "Update site-to-site VPN gateway id= " + id; + return "Update site-to-site VPN gateway ID = " + id; } @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/command/user/zone/ListZonesCmd.java b/api/src/main/java/org/apache/cloudstack/api/command/user/zone/ListZonesCmd.java index 36ce23cbc6ee..55f70b9edcdf 100644 --- a/api/src/main/java/org/apache/cloudstack/api/command/user/zone/ListZonesCmd.java +++ b/api/src/main/java/org/apache/cloudstack/api/command/user/zone/ListZonesCmd.java @@ -37,7 +37,7 @@ public class ListZonesCmd extends BaseListCmd implements UserCmd { ///////////////////////////////////////////////////// //////////////// API parameters ///////////////////// ///////////////////////////////////////////////////// - @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "the ID of the zone") + @Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = ZoneResponse.class, description = "The ID of the zone") private Long id; @Parameter(name = ApiConstants.IDS, type = CommandType.LIST, collectionType = CommandType.UUID, entityType = ZoneResponse.class, description = "the IDs of the zones, mutually exclusive with id", since = "4.19.0") @@ -45,26 +45,26 @@ public class ListZonesCmd extends BaseListCmd implements UserCmd { @Parameter(name = ApiConstants.AVAILABLE, type = CommandType.BOOLEAN, - description = "true if you want to retrieve all available Zones. False if you only want to return the Zones" - + " from which you have at least one VM. Default is false.") + description = "True if you want to retrieve all available Zones. False if you only want to return the Zones" + + " from which you have at least one Instance. Default is false.") private Boolean available; - @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "the ID of the domain associated with the zone") + @Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, 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") + @Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the zone") private String name; - @Parameter(name = ApiConstants.NETWORK_TYPE, type = CommandType.STRING, description = "the network type of the zone that the virtual machine belongs to") + @Parameter(name = ApiConstants.NETWORK_TYPE, type = CommandType.STRING, description = "The Network type of the zone that the Instance belongs to") private String networkType; - @Parameter(name = ApiConstants.SHOW_CAPACITIES, type = CommandType.BOOLEAN, description = "flag to display the capacity of the zones") + @Parameter(name = ApiConstants.SHOW_CAPACITIES, type = CommandType.BOOLEAN, description = "Flag to display the capacity of the zones") private Boolean showCapacities; @Parameter(name = ApiConstants.TAGS, type = CommandType.MAP, description = "List zones by resource tags (key/value pairs)", since = "4.3") private Map tags; - @Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN, description = "flag to display the resource image for the zones") + @Parameter(name = ApiConstants.SHOW_RESOURCE_ICON, type = CommandType.BOOLEAN, description = "Flag to display the resource image for the zones") private Boolean showIcon; @Parameter(name = ApiConstants.STORAGE_ACCESS_GROUP, type = CommandType.STRING, diff --git a/api/src/main/java/org/apache/cloudstack/api/response/AccountResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/AccountResponse.java index a09ef89f1b65..93529b8a8887 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/AccountResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/AccountResponse.java @@ -32,99 +32,99 @@ @EntityReference(value = Account.class) public class AccountResponse extends BaseResponse implements ResourceLimitAndCountResponse, SetResourceIconResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the id of the account") + @Param(description = "The ID of the Account") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the account") + @Param(description = "The name of the Account") private String name; @SerializedName(ApiConstants.ACCOUNT_TYPE) - @Param(description = "account type (admin, domain-admin, user)") + @Param(description = "Account type (admin, domain-admin, user)") private Integer accountType; @SerializedName(ApiConstants.ROLE_ID) - @Param(description = "the ID of the role") + @Param(description = "The ID of the role") private String roleId; @SerializedName(ApiConstants.ROLE_TYPE) - @Param(description = "the type of the role (Admin, ResourceAdmin, DomainAdmin, User)") + @Param(description = "The type of the role (Admin, ResourceAdmin, DomainAdmin, User)") private String roleType; @SerializedName(ApiConstants.ROLE_NAME) - @Param(description = "the name of the role") + @Param(description = "The name of the role") private String roleName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "id of the Domain the account belongs to") + @Param(description = "ID of the Domain the Account belongs to") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "name of the Domain the account belongs to") + @Param(description = "Name of the Domain the Account belongs to") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the Domain the account belongs to", since = "4.13") + @Param(description = "Path of the Domain the Account belongs to", since = "4.13") private String domainPath; @SerializedName(ApiConstants.DEFAULT_ZONE_ID) - @Param(description = "the default zone of the account") + @Param(description = "The default zone of the Account") private String defaultZoneId; @SerializedName(ApiConstants.RECEIVED_BYTES) - @Param(description = "the total number of network traffic bytes received") + @Param(description = "The total number of Network traffic bytes received") private Long bytesReceived; @SerializedName(ApiConstants.SENT_BYTES) - @Param(description = "the total number of network traffic bytes sent") + @Param(description = "The total number of Network traffic bytes sent") private Long bytesSent; @SerializedName(ApiConstants.VM_LIMIT) - @Param(description = "the total number of virtual machines that can be deployed by this account") + @Param(description = "The total number of Instances that can be deployed by this Account") private String vmLimit; @SerializedName(ApiConstants.VM_TOTAL) - @Param(description = "the total number of virtual machines deployed by this account") + @Param(description = "The total number of Instances deployed by this Account") private Long vmTotal; @SerializedName(ApiConstants.VM_AVAILABLE) - @Param(description = "the total number of virtual machines available for this account to acquire") + @Param(description = "The total number of Instances available for this Account to acquire") private String vmAvailable; @SerializedName(ApiConstants.IP_LIMIT) - @Param(description = "the total number of public ip addresses this account can acquire") + @Param(description = "The total number of public IP addresses this Account can acquire") private String ipLimit; @SerializedName(ApiConstants.IP_TOTAL) - @Param(description = "the total number of public ip addresses allocated for this account") + @Param(description = "The total number of public IP addresses allocated for this Account") private Long ipTotal; @SerializedName(ApiConstants.IP_AVAILABLE) - @Param(description = "the total number of public ip addresses available for this account to acquire") + @Param(description = "The total number of public IP addresses available for this Account to acquire") private String ipAvailable; @SerializedName("volumelimit") - @Param(description = "the total volume which can be used by this account") + @Param(description = "The total volume which can be used by this Account") private String volumeLimit; @SerializedName("volumetotal") - @Param(description = "the total volume being used by this account") + @Param(description = "The total volume being used by this Account") private Long volumeTotal; @SerializedName("volumeavailable") - @Param(description = "the total volume available for this account") + @Param(description = "The total volume available for this Account") private String volumeAvailable; @SerializedName("snapshotlimit") - @Param(description = "the total number of snapshots which can be stored by this account") + @Param(description = "The total number of Snapshots which can be stored by this Account") private String snapshotLimit; @SerializedName("snapshottotal") - @Param(description = "the total number of snapshots stored by this account") + @Param(description = "The total number of Snapshots stored by this Account") private Long snapshotTotal; @SerializedName("snapshotavailable") - @Param(description = "the total number of snapshots available for this account") + @Param(description = "The total number of Snapshots available for this Account") private String snapshotAvailable; @SerializedName(ApiConstants.BACKUP_LIMIT) @@ -152,83 +152,83 @@ public class AccountResponse extends BaseResponse implements ResourceLimitAndCou private String backupStorageAvailable; @SerializedName("templatelimit") - @Param(description = "the total number of templates which can be created by this account") + @Param(description = "The total number of Templates which can be created by this Account") private String templateLimit; @SerializedName("templatetotal") - @Param(description = "the total number of templates which have been created by this account") + @Param(description = "The total number of Templates which have been created by this Account") private Long templateTotal; @SerializedName("templateavailable") - @Param(description = "the total number of templates available to be created by this account") + @Param(description = "The total number of Templates available to be created by this Account") private String templateAvailable; @SerializedName("vmstopped") - @Param(description = "the total number of virtual machines stopped for this account") + @Param(description = "The total number of Instances stopped for this Account") private Integer vmStopped; @SerializedName("vmrunning") - @Param(description = "the total number of virtual machines running for this account") + @Param(description = "The total number of Instances running for this Account") private Integer vmRunning; @SerializedName("projectlimit") - @Param(description = "the total number of projects the account can own", since = "3.0.1") + @Param(description = "The total number of projects the Account can own", since = "3.0.1") private String projectLimit; @SerializedName("projecttotal") - @Param(description = "the total number of projects being administrated by this account", since = "3.0.1") + @Param(description = "The total number of projects being administrated by this Account", since = "3.0.1") private Long projectTotal; @SerializedName("projectavailable") - @Param(description = "the total number of projects available for administration by this account", since = "3.0.1") + @Param(description = "The total number of projects available for administration by this Account", since = "3.0.1") private String projectAvailable; @SerializedName("networklimit") - @Param(description = "the total number of networks the account can own", since = "3.0.1") + @Param(description = "The total number of Networks the Account can own", since = "3.0.1") private String networkLimit; @SerializedName("networktotal") - @Param(description = "the total number of networks owned by account", since = "3.0.1") + @Param(description = "The total number of Networks owned by Account", since = "3.0.1") private Long networkTotal; @SerializedName("networkavailable") - @Param(description = "the total number of networks available to be created for this account", since = "3.0.1") + @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 = "4.0.0") + @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 = "4.0.0") + @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 = "4.0.0") + @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") + @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") + @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") + @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") + @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") + @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") + @Param(description = "The total memory (in MB) available to be created for this account", since = "4.2.0") private String memoryAvailable; @SerializedName("gpulimit") @@ -244,27 +244,27 @@ public class AccountResponse extends BaseResponse implements ResourceLimitAndCou private String gpuAvailable; @SerializedName("primarystoragelimit") - @Param(description = "the total primary storage space (in GiB) the account can own", since = "4.2.0") + @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") + @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") + @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") + @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") + @Param(description = "The total secondary storage space (in GiB) owned by account", since = "4.2.0") private float secondaryStorageTotal; @SerializedName("secondarystorageavailable") - @Param(description = "the total secondary storage space (in GiB) available to be used for this account", since = "4.2.0") + @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.BUCKET_LIMIT) @@ -292,35 +292,35 @@ public class AccountResponse extends BaseResponse implements ResourceLimitAndCou private String objectStorageAvailable; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the account") + @Param(description = "The state of the account") private String state; @SerializedName(ApiConstants.IS_CLEANUP_REQUIRED) - @Param(description = "true if the account requires cleanup") + @Param(description = "True if the account requires cleanup") private Boolean cleanupRequired; @SerializedName(ApiConstants.CREATED) - @Param(description="the date when this account was created") + @Param(description = "The date when this account was created") private Date created; @SerializedName("user") - @Param(description = "the list of users associated with account", responseObject = UserResponse.class) + @Param(description = "The list of users associated with account", responseObject = UserResponse.class) private List users; @SerializedName(ApiConstants.NETWORK_DOMAIN) - @Param(description = "the network domain") + @Param(description = "The Network domain") private String networkDomain; @SerializedName(ApiConstants.ACCOUNT_DETAILS) - @Param(description = "details for the account") + @Param(description = "Details for the account") private Map details; @SerializedName(ApiConstants.IS_DEFAULT) - @Param(description = "true if account is default, false otherwise", since = "4.2.0") + @Param(description = "True if account is default, false otherwise", since = "4.2.0") private Boolean isDefault; @SerializedName(ApiConstants.IAM_GROUPS) - @Param(description = "the list of acl groups that account belongs to", since = "4.4") + @Param(description = "The list of ACL groups that account belongs to", since = "4.4") private List groups; @SerializedName(ApiConstants.RESOURCE_ICON) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/AcquireIPAddressResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/AcquireIPAddressResponse.java index 06351a40d9db..cb0b14054775 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/AcquireIPAddressResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/AcquireIPAddressResponse.java @@ -32,47 +32,47 @@ @SuppressWarnings("unused") public class AcquireIPAddressResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "public IP address id") + @Param(description = "Public IP address id") private String id; @SerializedName(ApiConstants.IP_ADDRESS) - @Param(description = "public IP address") + @Param(description = "Public IP address") private String ipAddress; @SerializedName("allocated") - @Param(description = "date the public IP address was acquired") + @Param(description = "Date the public IP address was acquired") private Date allocated; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the ID of the zone the public IP address belongs to") + @Param(description = "The ID of the zone the public IP address belongs to") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the name of the zone the public IP address belongs to") + @Param(description = "The name of the zone the public IP address belongs to") private String zoneName; @SerializedName("issourcenat") - @Param(description = "true if the IP address is a source nat address, false otherwise") + @Param(description = "True if the IP address is a source NAT address, false otherwise") private Boolean sourceNat; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account the public IP address is associated with") + @Param(description = "The Account the public IP address is associated with") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the ipaddress") + @Param(description = "The project id of the IP address") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the address") + @Param(description = "The project name of the address") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID the public IP address is associated with") + @Param(description = "The domain ID the public IP address is associated with") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain the public IP address is associated with") + @Param(description = "The domain the public IP address is associated with") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -80,78 +80,78 @@ public class AcquireIPAddressResponse extends BaseResponse implements Controlle private String domainPath; @SerializedName(ApiConstants.FOR_VIRTUAL_NETWORK) - @Param(description = "the virtual network for the IP address") + @Param(description = "The virtual Network for the IP address") private Boolean forVirtualNetwork; @SerializedName(ApiConstants.VLAN_ID) - @Param(description = "the ID of the VLAN associated with the IP address." + " This parameter is visible to ROOT admins only") + @Param(description = "The ID of the VLAN associated with the IP address." + " This parameter is visible to ROOT admins only") private String vlanId; @SerializedName("vlanname") - @Param(description = "the VLAN associated with the IP address") + @Param(description = "The VLAN associated with the IP address") private String vlanName; @SerializedName("isstaticnat") - @Param(description = "true if this ip is for static nat, false otherwise") + @Param(description = "True if this IP is for static NAT, false otherwise") private Boolean staticNat; @SerializedName(ApiConstants.IS_SYSTEM) - @Param(description = "true if this ip is system ip (was allocated as a part of deployVm or createLbRule)") + @Param(description = "True if this IP is system IP (was allocated as a part of deployVm or createLbRule)") private Boolean isSystem; @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) - @Param(description = "virtual machine id the ip address is assigned to (not null only for static nat Ip)") + @Param(description = "Instance id the IP address is assigned to (not null only for static NAT IP)") private String virtualMachineId; @SerializedName("vmipaddress") - @Param(description = "virtual machine (dnat) ip address (not null only for static nat Ip)") + @Param(description = "Instance (DNAT) IP address (not null only for static NAT IP)") private String virtualMachineIp; @SerializedName("virtualmachinename") - @Param(description = "virtual machine name the ip address is assigned to (not null only for static nat Ip)") + @Param(description = "Instance name the IP address is assigned to (not null only for static NAT IP)") private String virtualMachineName; @SerializedName("virtualmachinedisplayname") - @Param(description = "virtual machine display name the ip address is assigned to (not null only for static nat Ip)") + @Param(description = "Instance display name the IP address is assigned to (not null only for static NAT IP)") private String virtualMachineDisplayName; @SerializedName(ApiConstants.ASSOCIATED_NETWORK_ID) - @Param(description = "the ID of the Network associated with the IP address") + @Param(description = "The ID of the Network associated with the IP address") private String associatedNetworkId; @SerializedName(ApiConstants.ASSOCIATED_NETWORK_NAME) - @Param(description = "the name of the Network associated with the IP address") + @Param(description = "The name of the Network associated with the IP address") private String associatedNetworkName; @SerializedName(ApiConstants.NETWORK_ID) - @Param(description = "the ID of the Network where ip belongs to") + @Param(description = "The ID of the Network where IP belongs to") private String networkId; @SerializedName(ApiConstants.STATE) - @Param(description = "State of the ip address. Can be: Allocating, Allocated and Releasing") + @Param(description = "State of the IP address. Can be: Allocating, Allocated and Releasing") private String state; @SerializedName(ApiConstants.PHYSICAL_NETWORK_ID) - @Param(description = "the physical network this belongs to") + @Param(description = "The physical Network this belongs to") private String physicalNetworkId; @SerializedName(ApiConstants.PURPOSE) - @Param(description = "purpose of the IP address. In Acton this value is not null for Ips with isSystem=true, and can have either StaticNat or LB value") + @Param(description = "Purpose of the IP address. In Acton this value is not null for IPs with isSystem=true, and can have either StaticNat or LB value") private String purpose; @SerializedName(ApiConstants.VPC_ID) - @Param(description = "VPC the ip belongs to") + @Param(description = "VPC the IP belongs to") private String vpcId; @SerializedName(ApiConstants.TAGS) - @Param(description = "the list of resource tags associated with ip address", responseObject = ResourceTagResponse.class) + @Param(description = "The list of resource tags associated with IP address", responseObject = ResourceTagResponse.class) private List tags; @SerializedName(ApiConstants.IS_PORTABLE) - @Param(description = "is public IP portable across the zones") + @Param(description = "Is public IP portable across the zones") private Boolean isPortable; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is public ip for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is public IP for display to the regular User", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; public void setIpAddress(String ipAddress) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/AcquirePodIpCmdResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/AcquirePodIpCmdResponse.java index 2226efd063d2..fb95c5b8130c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/AcquirePodIpCmdResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/AcquirePodIpCmdResponse.java @@ -31,7 +31,7 @@ public class AcquirePodIpCmdResponse extends BaseResponse { private String ipAddress; @SerializedName(ApiConstants.POD_ID) - @Param(description = "the ID of the pod the IP address belongs to") + @Param(description = "The ID of the pod the IP address belongs to") private Long podId; @SerializedName(ApiConstants.GATEWAY) @@ -43,15 +43,15 @@ public class AcquirePodIpCmdResponse extends BaseResponse { private String cidrAddress; @SerializedName(ApiConstants.NIC_ID) - @Param(description = "the ID of the nic") + @Param(description = "The ID of the NIC") private Long nicId; @SerializedName(ApiConstants.HOST_MAC) - @Param(description = "MAC address of the pod the IP") + @Param(description = "MAC address of the pod the IP") private Long macAddress; @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the pod the IP address") + @Param(description = "The ID of the pod the IP address") private long id; public void setIpAddress(String ipAddress) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/AlertResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/AlertResponse.java index faa64b0c0909..00c94a6fd0e7 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/AlertResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/AlertResponse.java @@ -31,7 +31,7 @@ @SuppressWarnings("unused") public class AlertResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the id of the alert") + @Param(description = "The ID of the alert") private String id; @SerializedName(ApiConstants.TYPE) @@ -46,15 +46,15 @@ public class AlertResponse extends BaseResponse { private Short alertType; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the alert", since = "4.3") + @Param(description = "The name of the alert", since = "4.3") private String alertName; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "description of the alert") + @Param(description = "Description of the alert") private String description; @SerializedName(ApiConstants.SENT) - @Param(description = "the date and time the alert was sent") + @Param(description = "The date and time the alert was sent") private Date lastSent; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/AnnotationResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/AnnotationResponse.java index 86d485ac751e..62ffd6c6256d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/AnnotationResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/AnnotationResponse.java @@ -32,31 +32,31 @@ @EntityReference(value = Annotation.class) public class AnnotationResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the (uu)id of the annotation") + @Param(description = "The UUID of the annotation") private String uuid; @SerializedName(ApiConstants.ENTITY_TYPE) - @Param(description = "the type of the annotated entity") + @Param(description = "The type of the annotated entity") private String entityType; @SerializedName(ApiConstants.ENTITY_ID) - @Param(description = "the (uu)id of the entity to which this annotation pertains") + @Param(description = "The UUID of the entity to which this annotation pertains") private String entityUuid; @SerializedName(ApiConstants.ENTITY_NAME) - @Param(description = "the name of the entity to which this annotation pertains") + @Param(description = "The name of the entity to which this annotation pertains") private String entityName; @SerializedName(ApiConstants.ANNOTATION) - @Param(description = "the contents of the annotation") + @Param(description = "The contents of the annotation") private String annotation; @SerializedName(ApiConstants.USER_ID) - @Param(description = "The (uu)id of the user that entered the annotation") + @Param(description = "The UUID of the User that entered the annotation") private String userUuid; @SerializedName(ApiConstants.USERNAME) - @Param(description = "The username of the user that entered the annotation") + @Param(description = "The username of the User that entered the annotation") private String username; @SerializedName(ApiConstants.ADMINS_ONLY) @@ -64,11 +64,11 @@ public class AnnotationResponse extends BaseResponse { private Boolean adminsOnly; @SerializedName(ApiConstants.CREATED) - @Param(description = "the creation timestamp for this annotation") + @Param(description = "The creation timestamp for this annotation") private Date created; @SerializedName(ApiConstants.REMOVED) - @Param(description = "the removal timestamp for this annotation") + @Param(description = "The removal timestamp for this annotation") private Date removed; public String getUuid() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ApplicationLoadBalancerInstanceResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ApplicationLoadBalancerInstanceResponse.java index bdbb954df03a..2ebc25e72404 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ApplicationLoadBalancerInstanceResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ApplicationLoadBalancerInstanceResponse.java @@ -32,19 +32,19 @@ public class ApplicationLoadBalancerInstanceResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the instance ID") + @Param(description = "The Instance ID") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the instance") + @Param(description = "The name of the Instance") private String name; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the instance") + @Param(description = "The state of the Instance") private String state; @SerializedName(ApiConstants.IP_ADDRESS) - @Param(description = "the ip address of the instance") + @Param(description = "The IP address of the Instance") private String ipAddress; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ApplicationLoadBalancerResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ApplicationLoadBalancerResponse.java index 0b6485bfc142..e900bebe05f0 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ApplicationLoadBalancerResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ApplicationLoadBalancerResponse.java @@ -29,51 +29,51 @@ @SuppressWarnings("unused") public class ApplicationLoadBalancerResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the Load Balancer ID") + @Param(description = "The Load Balancer ID") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the Load Balancer") + @Param(description = "The name of the Load Balancer") private String name; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the description of the Load Balancer") + @Param(description = "The description of the Load Balancer") private String description; @SerializedName(ApiConstants.ALGORITHM) - @Param(description = "the load balancer algorithm (source, roundrobin, leastconn)") + @Param(description = "The Load balancer algorithm (source, roundrobin, leastconn)") private String algorithm; @SerializedName(ApiConstants.NETWORK_ID) - @Param(description = "Load Balancer network id") + @Param(description = "Load Balancer Network id") private String networkId; @SerializedName(ApiConstants.SOURCE_IP) - @Param(description = "Load Balancer source ip") + @Param(description = "Load Balancer source IP") private String sourceIp; @SerializedName(ApiConstants.SOURCE_IP_NETWORK_ID) - @Param(description = "Load Balancer source ip network id") + @Param(description = "Load Balancer source IP Network id") private String sourceIpNetworkId; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account of the Load Balancer") + @Param(description = "The Account of the Load Balancer") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the Load Balancer") + @Param(description = "The project id of the Load Balancer") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the Load Balancer") + @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") + @Param(description = "The domain ID of the Load Balancer") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain of the Load Balancer") + @Param(description = "The domain of the Load Balancer") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -81,19 +81,19 @@ public class ApplicationLoadBalancerResponse extends BaseResponse implements Con private String domainPath; @SerializedName("loadbalancerrule") - @Param(description = "the list of rules associated with the Load Balancer", responseObject = ApplicationLoadBalancerRuleResponse.class) + @Param(description = "The list of rules associated with the Load Balancer", responseObject = ApplicationLoadBalancerRuleResponse.class) private List lbRules; @SerializedName("loadbalancerinstance") - @Param(description = "the list of instances associated with the Load Balancer", responseObject = ApplicationLoadBalancerInstanceResponse.class) + @Param(description = "The list of Instances associated with the Load Balancer", responseObject = ApplicationLoadBalancerInstanceResponse.class) private List lbInstances; @SerializedName(ApiConstants.TAGS) - @Param(description = "the list of resource tags associated with the Load Balancer", responseObject = ResourceTagResponse.class) + @Param(description = "The list of resource tags associated with the Load Balancer", responseObject = ResourceTagResponse.class) private List tags; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is rule for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is rule for display to the regular User", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ApplicationLoadBalancerRuleResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ApplicationLoadBalancerRuleResponse.java index 8af64276c9e1..d6d8c2f95563 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ApplicationLoadBalancerRuleResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ApplicationLoadBalancerRuleResponse.java @@ -30,15 +30,15 @@ @SuppressWarnings("unused") public class ApplicationLoadBalancerRuleResponse extends BaseResponse { @SerializedName(ApiConstants.SOURCE_PORT) - @Param(description = "source port of the load balancer rule") + @Param(description = "Source port of the Load balancer rule") private Integer sourcePort; @SerializedName(ApiConstants.INSTANCE_PORT) - @Param(description = "instance port of the load balancer rule") + @Param(description = "Instance port of the Load balancer rule") private Integer instancePort; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the load balancer rule") + @Param(description = "The state of the Load balancer rule") private String state; public void setSourcePort(Integer sourcePort) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/AsyncJobResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/AsyncJobResponse.java index edbc94bc498e..5be0052069ec 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/AsyncJobResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/AsyncJobResponse.java @@ -32,55 +32,55 @@ public class AsyncJobResponse extends BaseResponse { @SerializedName("accountid") - @Param(description = "the account id that executed the async command") + @Param(description = "The Account ID that executed the async command") private String accountId; @SerializedName("account") - @Param(description = "the account that executed the async command") + @Param(description = "The Account that executed the async command") private String account; @SerializedName("domainid") - @Param(description = "the domain id that executed the async command") + @Param(description = "The domain ID that executed the async command") private String domainid; @SerializedName("domainpath") - @Param(description = "the domain that executed the async command") + @Param(description = "The domain that executed the async command") private String domainPath; @SerializedName(ApiConstants.USER_ID) - @Param(description = "the user that executed the async command") + @Param(description = "The User that executed the async command") private String userId; @SerializedName("cmd") - @Param(description = "the async command executed") + @Param(description = "The async command executed") private String cmd; @SerializedName("jobprocstatus") - @Param(description = "the progress information of the PENDING job") + @Param(description = "The progress information of the PENDING job") private Integer jobProcStatus; @SerializedName("jobresultcode") - @Param(description = "the result code for the job") + @Param(description = "The result code for the job") private Integer jobResultCode; @SerializedName("jobresulttype") - @Param(description = "the result type") + @Param(description = "The result type") private String jobResultType; @SerializedName("jobresult") - @Param(description = "the result reason") + @Param(description = "The result reason") private ResponseObject jobResult; @SerializedName("jobinstancetype") - @Param(description = "the instance/entity object related to the job") + @Param(description = "The Instance/entity object related to the job") private String jobInstanceType; @SerializedName("jobinstanceid") - @Param(description = "the unique ID of the instance/entity object related to the job") + @Param(description = "The unique ID of the Instance/entity object related to the job") private String jobInstanceId; @SerializedName(ApiConstants.MANAGEMENT_SERVER_ID) - @Param(description = "the msid of the management server on which the job is running", since = "4.19") + @Param(description = "The MSID of the management server on which the job is running", since = "4.19") private String managementServerId; @SerializedName(ApiConstants.MANAGEMENT_SERVER_NAME) @@ -88,11 +88,11 @@ public class AsyncJobResponse extends BaseResponse { private String managementServerName; @SerializedName(ApiConstants.CREATED) - @Param(description = " the created date of the job") + @Param(description = "The created date of the job") private Date created; @SerializedName(ApiConstants.COMPLETED) - @Param(description = " the completed date of the job") + @Param(description = "The completed date of the job") private Date removed; public void setAccountId(String accountId) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/AutoScalePolicyResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/AutoScalePolicyResponse.java index e3f9902dec6a..d2155fb23583 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/AutoScalePolicyResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/AutoScalePolicyResponse.java @@ -31,47 +31,47 @@ public class AutoScalePolicyResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the autoscale policy ID") + @Param(description = "The autoscale policy ID") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "name of the autoscale policy") + @Param(description = "Name of the autoscale policy") private String name; @SerializedName(ApiConstants.ACTION) - @Param(description = "the action to be executed if all the conditions evaluate to true for the specified duration.") + @Param(description = "The action to be executed if all the conditions evaluate to true for the specified duration.") private String action; @SerializedName(ApiConstants.DURATION) - @Param(description = "the duration for which the conditions have to be true before action is taken") + @Param(description = "The duration for which the conditions have to be true before action is taken") private Integer duration; @SerializedName(ApiConstants.QUIETTIME) - @Param(description = "the cool down period for which the policy should not be evaluated after the action has been taken") + @Param(description = "The cool down period for which the policy should not be evaluated after the action has been taken") private Integer quietTime; @SerializedName("conditions") - @Param(description = "the list of IDs of the conditions that are being evaluated on every interval") + @Param(description = "The list of IDs of the conditions that are being evaluated on every interval") private List conditions; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account owning the autoscale policy") + @Param(description = "The Account owning the autoscale policy") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id autoscale policy") + @Param(description = "The project id autoscale policy") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the autoscale policy") + @Param(description = "The project name of the autoscale policy") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID of the autoscale policy") + @Param(description = "The domain ID of the autoscale policy") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the autoscale policy") + @Param(description = "The domain name of the autoscale policy") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/AutoScaleVmGroupResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/AutoScaleVmGroupResponse.java index b1389acdecb3..921e3f6166a3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/AutoScaleVmGroupResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/AutoScaleVmGroupResponse.java @@ -32,95 +32,95 @@ public class AutoScaleVmGroupResponse extends BaseResponseWithAnnotations implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the autoscale vm group ID") + @Param(description = "The autoscale Instance group ID") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the autoscale vm group ") + @Param(description = "The name of the autoscale Instance group ") private String name; @SerializedName(ApiConstants.LBID) - @Param(description = "the load balancer rule ID") + @Param(description = "The Load balancer rule ID") private String loadBalancerId; @SerializedName(ApiConstants.ASSOCIATED_NETWORK_NAME) - @Param(description = "the name of the guest network the lb rule belongs to") + @Param(description = "The name of the guest Network the LB rule belongs to") private String networkName; @SerializedName(ApiConstants.ASSOCIATED_NETWORK_ID) - @Param(description = "the id of the guest network the lb rule belongs to") + @Param(description = "The id of the guest Network the LB rule belongs to") private String networkId; @SerializedName(ApiConstants.LB_PROVIDER) - @Param(description = "the lb provider of the guest network the lb rule belongs to") + @Param(description = "The LB provider of the guest Network the LB rule belongs to") private String lbProvider; @SerializedName(ApiConstants.PUBLIC_IP_ID) - @Param(description = "the public ip address id") + @Param(description = "The public IP address ID") private String publicIpId; @SerializedName(ApiConstants.PUBLIC_IP) - @Param(description = "the public ip address") + @Param(description = "The public IP address") private String publicIp; @SerializedName(ApiConstants.PUBLIC_PORT) - @Param(description = "the public port") + @Param(description = "The public port") private String publicPort; @SerializedName(ApiConstants.PRIVATE_PORT) - @Param(description = "the private port") + @Param(description = "The private port") private String privatePort; @SerializedName(ApiConstants.VMPROFILE_ID) - @Param(description = "the autoscale profile that contains information about the vms in the vm group.") + @Param(description = "The autoscale profile that contains information about the Instances in the Instance group.") private String profileId; @SerializedName(ApiConstants.MIN_MEMBERS) - @Param(description = "the minimum number of members in the vmgroup, the number of instances in the vm group will be equal to or more than this number.") + @Param(description = "The minimum number of members in the Instance Group, the number of Instances in the Instance group will be equal to or more than this number.") private int minMembers; @SerializedName(ApiConstants.MAX_MEMBERS) - @Param(description = "the maximum number of members in the vmgroup, The number of instances in the vm group will be equal to or less than this number.") + @Param(description = "The maximum number of members in the Instance Group, The number of Instances in the Instance group will be equal to or less than this number.") private int maxMembers; @SerializedName(ApiConstants.AVAILABLE_VIRTUAL_MACHINE_COUNT) - @Param(description = "the number of available virtual machines (in Running, Starting, Stopping or Migrating state) in the vmgroup", since = "4.18.0") + @Param(description = "The number of available Instances (in Running, Starting, Stopping or Migrating state) in the Instance Group", since = "4.18.0") private int availableVirtualMachineCount; @SerializedName(ApiConstants.INTERVAL) - @Param(description = "the frequency at which the conditions have to be evaluated") + @Param(description = "The frequency at which the conditions have to be evaluated") private int interval; @SerializedName(ApiConstants.STATE) - @Param(description = "the current state of the AutoScale Vm Group") + @Param(description = "The current state of the AutoScale Instance Group") private String state; @SerializedName(ApiConstants.SCALEUP_POLICIES) - @Param(description = "list of scaleup autoscale policies") + @Param(description = "List of scaleup autoscale policies") private List scaleUpPolicies; @SerializedName(ApiConstants.SCALEDOWN_POLICIES) - @Param(description = "list of scaledown autoscale policies") + @Param(description = "List of scaledown autoscale policies") private List scaleDownPolicies; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account owning the vm group") + @Param(description = "The Account owning the Instance group") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the vm group") + @Param(description = "The project id of the Instance group") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the vm group") + @Param(description = "The project name of the Instance group") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID of the vm group") + @Param(description = "The domain ID of the Instance group") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the vm group") + @Param(description = "The domain name of the Instance group") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -128,11 +128,11 @@ public class AutoScaleVmGroupResponse extends BaseResponseWithAnnotations implem private String domainPath; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is group for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is group for display to the regular User", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; @SerializedName(ApiConstants.CREATED) - @Param(description = "the date when this vm group was created") + @Param(description = "The date when this Instance group was created") private Date created; public AutoScaleVmGroupResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/AutoScaleVmProfileResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/AutoScaleVmProfileResponse.java index 22e4eb2288b2..2eda8210fcf8 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/AutoScaleVmProfileResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/AutoScaleVmProfileResponse.java @@ -36,29 +36,29 @@ public class AutoScaleVmProfileResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the autoscale vm profile ID") + @Param(description = "The autoscale Instance profile ID") private String id; /* Parameters related to deploy virtual machine */ @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the availability zone to be used while deploying a virtual machine") + @Param(description = "The availability zone to be used while deploying an Instance") private String zoneId; @SerializedName(ApiConstants.SERVICE_OFFERING_ID) - @Param(description = "the service offering to be used while deploying a virtual machine") + @Param(description = "The service offering to be used while deploying an Instance") private String serviceOfferingId; @SerializedName(ApiConstants.TEMPLATE_ID) - @Param(description = "the template to be used while deploying a virtual machine") + @Param(description = "The Template to be used while deploying an Instance") private String templateId; @SerializedName(ApiConstants.OTHER_DEPLOY_PARAMS) - @Param(description = "parameters other than zoneId/serviceOfferringId/templateId to be used while deploying a virtual machine") + @Param(description = "Parameters other than zoneId/serviceOfferringId/templateId to be used while deploying an Instance") private Map otherDeployParams; /* Parameters related to destroying a virtual machine */ @SerializedName(ApiConstants.AUTOSCALE_EXPUNGE_VM_GRACE_PERIOD) - @Param(description = "the time allowed for existing connections to get closed before a vm is destroyed") + @Param(description = "The time allowed for existing connections to get closed before an Instance is destroyed") private Integer expungeVmGracePeriod; /* Parameters related to a running virtual machine - monitoring aspects */ @@ -69,7 +69,7 @@ public class AutoScaleVmProfileResponse extends BaseResponse implements Controll private Map counterParams; @SerializedName(ApiConstants.USER_DATA) - @Param(description = "Base64 encoded VM user data") + @Param(description = "Base64 encoded Instance user data") private String userData; @SerializedName(ApiConstants.USER_DATA_ID) @Param(description="the id of userdata used for the VM", since = "4.18.1") @@ -85,33 +85,33 @@ public class AutoScaleVmProfileResponse extends BaseResponse implements Controll private String userDataDetails; @SerializedName(ApiConstants.AUTOSCALE_USER_ID) - @Param(description = "the ID of the user used to launch and destroy the VMs") + @Param(description = "The ID of the User used to launch and destroy the Instances") private String autoscaleUserId; @Parameter(name = ApiConstants.CS_URL, type = CommandType.STRING, - description = "the API URL including port of the CloudStack Management Server example: http://server.cloud.com:8080/client/api?") + description = "The API URL including port of the CloudStack Management Server example: http://server.cloud.com:8080/client/api?") // leaving cloud.com reference above as it serves only as an example private String csUrl; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account owning the instance group") + @Param(description = "The Account owning the Instance group") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id vm profile") + @Param(description = "The project id Instance profile") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the vm profile") + @Param(description = "The project name of the Instance profile") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID of the vm profile") + @Param(description = "The domain ID of the Instance profile") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the vm profile") + @Param(description = "The domain name of the Instance profile") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -119,7 +119,7 @@ public class AutoScaleVmProfileResponse extends BaseResponse implements Controll private String domainPath; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is profile for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is profile for display to the regular User", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; public AutoScaleVmProfileResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/BackupOfferingResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/BackupOfferingResponse.java index 4120f68d9da3..b3a7d0362198 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/BackupOfferingResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/BackupOfferingResponse.java @@ -34,11 +34,11 @@ public class BackupOfferingResponse extends BaseResponse { private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "name for the backup offering") + @Param(description = "Name for the backup offering") private String name; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "description for the backup offering") + @Param(description = "Description for the backup offering") private String description; @SerializedName(ApiConstants.PROVIDER) @@ -46,19 +46,19 @@ public class BackupOfferingResponse extends BaseResponse { private String provider; @SerializedName(ApiConstants.EXTERNAL_ID) - @Param(description = "external ID on the provider side") + @Param(description = "External ID on the provider side") private String externalId; @SerializedName(ApiConstants.ALLOW_USER_DRIVEN_BACKUPS) - @Param(description = "whether offering allows user driven ad-hoc/scheduled backups") + @Param(description = "Whether the offering allows User driven ad-hoc/scheduled backups") private Boolean userDrivenBackups; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "zone ID") + @Param(description = "Zone ID") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "zone name") + @Param(description = "Zone name") private String zoneName; @SerializedName(ApiConstants.CROSS_ZONE_INSTANCE_CREATION) @@ -66,7 +66,7 @@ public class BackupOfferingResponse extends BaseResponse { private Boolean crossZoneInstanceCreation; @SerializedName(ApiConstants.CREATED) - @Param(description = "the date this backup offering was created") + @Param(description = "The date this backup offering was created") private Date created; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/BackupProviderResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/BackupProviderResponse.java index 5227d850887c..af74c509b109 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/BackupProviderResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/BackupProviderResponse.java @@ -28,11 +28,11 @@ @EntityReference(BackupProvider.class) public class BackupProviderResponse extends BaseResponse { @SerializedName(ApiConstants.NAME) - @Param(description = "the CA service provider name") + @Param(description = "The CA service provider name") private String name; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the description of the CA service provider") + @Param(description = "The description of the CA service provider") private String description; public String getName() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/BackupResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/BackupResponse.java index b9eca67d9a8f..b855bfe40b8d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/BackupResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/BackupResponse.java @@ -32,7 +32,7 @@ public class BackupResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "ID of the VM backup") + @Param(description = "ID of the Instance backup") private String id; @SerializedName(ApiConstants.NAME) @@ -44,71 +44,71 @@ public class BackupResponse extends BaseResponse { private String description; @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) - @Param(description = "ID of the VM") + @Param(description = "ID of the Instance") private String vmId; @SerializedName(ApiConstants.VIRTUAL_MACHINE_NAME) - @Param(description = "name of the VM") + @Param(description = "Name of the Instance") private String vmName; @SerializedName(ApiConstants.EXTERNAL_ID) - @Param(description = "external backup id") + @Param(description = "External backup id") private String externalId; @SerializedName(ApiConstants.TYPE) - @Param(description = "backup type") + @Param(description = "Backup type") private String type; @SerializedName(ApiConstants.CREATED) - @Param(description = "backup date") + @Param(description = "Backup date") private Date date; @SerializedName(ApiConstants.SIZE) - @Param(description = "backup size in bytes") + @Param(description = "Backup size in bytes") private Long size; @SerializedName(ApiConstants.VIRTUAL_SIZE) - @Param(description = "backup protected (virtual) size in bytes") + @Param(description = "Backup protected (virtual) size in bytes") private Long protectedSize; @SerializedName(ApiConstants.STATUS) - @Param(description = "backup status") + @Param(description = "Backup status") private Backup.Status status; @SerializedName(ApiConstants.VOLUMES) - @Param(description = "backed up volumes") + @Param(description = "Backed up volumes") private String volumes; @SerializedName(ApiConstants.BACKUP_OFFERING_ID) - @Param(description = "backup offering id") + @Param(description = "Backup offering id") private String backupOfferingId; @SerializedName(ApiConstants.BACKUP_OFFERING_NAME) - @Param(description = "backup offering name") + @Param(description = "Backup offering name") private String backupOfferingName; @SerializedName(ApiConstants.ACCOUNT_ID) - @Param(description = "account id") + @Param(description = "Account id") private String accountId; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "account name") + @Param(description = "Account name") private String account; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "domain id") + @Param(description = "Domain ID") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "domain name") + @Param(description = "Domain name") private String domain; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "zone id") + @Param(description = "Zone ID") private String zoneId; @SerializedName(ApiConstants.ZONE) - @Param(description = "zone name") + @Param(description = "Zone name") private String zone; @SerializedName(ApiConstants.VM_DETAILS) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/BackupRestorePointResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/BackupRestorePointResponse.java index 22bb099b1b03..e338fe6b35f9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/BackupRestorePointResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/BackupRestorePointResponse.java @@ -31,15 +31,15 @@ public class BackupRestorePointResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "external id of the restore point") + @Param(description = "External ID of the restore point") private String id; @SerializedName(ApiConstants.CREATED) - @Param(description = "created time") + @Param(description = "Created time") private Date created; @SerializedName(ApiConstants.TYPE) - @Param(description = "restore point type") + @Param(description = "Restore point type") private String type; public String getId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/BackupScheduleResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/BackupScheduleResponse.java index d8c2980774d3..13d0c5d8c562 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/BackupScheduleResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/BackupScheduleResponse.java @@ -33,23 +33,23 @@ public class BackupScheduleResponse extends BaseResponse { private String id; @SerializedName(ApiConstants.VIRTUAL_MACHINE_NAME) - @Param(description = "name of the VM") + @Param(description = "Name of the Instance") private String vmName; @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) - @Param(description = "ID of the VM") + @Param(description = "ID of the Instance") private String vmId; @SerializedName(ApiConstants.SCHEDULE) - @Param(description = "time the backup is scheduled to be taken.") + @Param(description = "The time the backup is scheduled to be taken.") private String schedule; @SerializedName(ApiConstants.INTERVAL_TYPE) - @Param(description = "the interval type of the backup schedule") + @Param(description = "The interval type of the backup schedule") private DateUtil.IntervalType intervalType; @SerializedName(ApiConstants.TIMEZONE) - @Param(description = "the time zone of the backup schedule") + @Param(description = "The time zone of the backup schedule") private String timezone; @SerializedName(ApiConstants.MAX_BACKUPS) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/BaseRolePermissionResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/BaseRolePermissionResponse.java index c39939a20a60..ee563085704b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/BaseRolePermissionResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/BaseRolePermissionResponse.java @@ -27,15 +27,15 @@ public class BaseRolePermissionResponse extends BaseResponse { @SerializedName(ApiConstants.RULE) - @Param(description = "the api name or wildcard rule") + @Param(description = "The api name or wildcard rule") private String rule; @SerializedName(ApiConstants.PERMISSION) - @Param(description = "the permission type of the api name or wildcard rule, allow/deny") + @Param(description = "The permission type of the api name or wildcard rule, allow/deny") private String rulePermission; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the description of the role permission") + @Param(description = "The description of the role permission") private String ruleDescription; public String getRule() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/BaseRoleResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/BaseRoleResponse.java index b1bba905bc69..68484149f012 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/BaseRoleResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/BaseRoleResponse.java @@ -25,19 +25,19 @@ public class BaseRoleResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the role") + @Param(description = "The ID of the role") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the role") + @Param(description = "The name of the role") private String roleName; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the description of the role") + @Param(description = "The description of the role") private String roleDescription; @SerializedName(ApiConstants.IS_PUBLIC) - @Param(description = "Indicates whether the role will be visible to all users (public) or only to root admins (private)." + + @Param(description = "Indicates whether the role will be visible to all Users (public) or only to root admins (private)." + " If this parameter is not specified during the creation of the role its value will be defaulted to true (public).") private boolean publicRole = true; diff --git a/api/src/main/java/org/apache/cloudstack/api/response/CAProviderResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/CAProviderResponse.java index 94d5882e18ac..84d4da5e1037 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/CAProviderResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/CAProviderResponse.java @@ -27,11 +27,11 @@ @EntityReference(value = CAProvider.class) public class CAProviderResponse extends BaseResponse { @SerializedName(ApiConstants.NAME) - @Param(description = "the CA service provider name") + @Param(description = "The CA service provider name") private String name; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the description of the CA service provider") + @Param(description = "The description of the CA service provider") private String description; public String getName() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/CapabilitiesResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/CapabilitiesResponse.java index d2c71b5f3525..930d1a50de0f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/CapabilitiesResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/CapabilitiesResponse.java @@ -26,51 +26,51 @@ @SuppressWarnings("unused") public class CapabilitiesResponse extends BaseResponse { @SerializedName("securitygroupsenabled") - @Param(description = "true if security groups support is enabled, false otherwise") + @Param(description = "True if security groups support is enabled, false otherwise") private boolean securityGroupsEnabled; @SerializedName("dynamicrolesenabled") - @Param(description = "true if dynamic role-based api checker is enabled, false otherwise") + @Param(description = "True if dynamic role-based api checker is enabled, false otherwise") private boolean dynamicRolesEnabled; @SerializedName("cloudstackversion") - @Param(description = "version of the cloud stack") + @Param(description = "Version of the CloudStack") private String cloudStackVersion; @SerializedName("userpublictemplateenabled") - @Param(description = "true if user and domain admins can set templates to be shared, false otherwise") + @Param(description = "True if user and domain admins can set Templates to be shared, false otherwise") private boolean userPublicTemplateEnabled; @SerializedName("supportELB") - @Param(description = "true if region supports elastic load balancer on basic zones") + @Param(description = "True if region supports elastic Load balancer on basic zones") private String supportELB; @SerializedName(ApiConstants.PROJECT_INVITE_REQUIRED) - @Param(description = "If invitation confirmation is required when add account to project") + @Param(description = "If invitation confirmation is required when add Account to project") private Boolean projectInviteRequired; @SerializedName(ApiConstants.ALLOW_USER_CREATE_PROJECTS) - @Param(description = "true if regular user is allowed to create projects") + @Param(description = "True if regular User is allowed to create projects") private Boolean allowUsersCreateProjects; @SerializedName(ApiConstants.CUSTOM_DISK_OFF_MIN_SIZE) - @Param(description = "minimum size that can be specified when " + "create disk from disk offering with custom size") + @Param(description = "Minimum size that can be specified when " + "create disk from disk offering with custom size") private Long diskOffMinSize; @SerializedName(ApiConstants.CUSTOM_DISK_OFF_MAX_SIZE) - @Param(description = "maximum size that can be specified when " + "create disk from disk offering with custom size") + @Param(description = "Maximum size that can be specified when " + "create disk from disk offering with custom size") private Long diskOffMaxSize; @SerializedName("regionsecondaryenabled") - @Param(description = "true if region wide secondary is enabled, false otherwise") + @Param(description = "True if region wide secondary is enabled, false otherwise") private boolean regionSecondaryEnabled; @SerializedName("apilimitinterval") - @Param(description = "time interval (in seconds) to reset api count") + @Param(description = "Time interval (in seconds) to reset api count") private Integer apiLimitInterval; @SerializedName("kvmsnapshotenabled") - @Param(description = "true if snapshot is supported for KVM host, false otherwise") + @Param(description = "True if Snapshot is supported for KVM host, false otherwise") private boolean kvmSnapshotEnabled; @SerializedName("apilimitmax") @@ -78,19 +78,19 @@ public class CapabilitiesResponse extends BaseResponse { private Integer apiLimitMax; @SerializedName("allowuserviewdestroyedvm") - @Param(description = "true if the user is allowed to view destroyed virtualmachines, false otherwise", since = "4.6.0") + @Param(description = "True if the User is allowed to view the destroyed Instances, false otherwise", since = "4.6.0") private boolean allowUserViewDestroyedVM; @SerializedName("allowuserexpungerecovervm") - @Param(description = "true if the user can recover and expunge virtualmachines, false otherwise", since = "4.6.0") + @Param(description = "True if the User can recover and expunge Instances, false otherwise", since = "4.6.0") private boolean allowUserExpungeRecoverVM; @SerializedName("allowuserexpungerecovervolume") - @Param(description = "true if the user can recover and expunge volumes, false otherwise", since = "4.14.0") + @Param(description = "True if the User can recover and expunge volumes, false otherwise", since = "4.14.0") private boolean allowUserExpungeRecoverVolume; @SerializedName("allowuserviewalldomainaccounts") - @Param(description = "true if users can see all accounts within the same domain, false otherwise") + @Param(description = "True if Users can see all Accounts within the same domain, false otherwise") private boolean allowUserViewAllDomainAccounts; @SerializedName(ApiConstants.ALLOW_USER_FORCE_STOP_VM) @@ -98,11 +98,11 @@ public class CapabilitiesResponse extends BaseResponse { private boolean allowUserForceStopVM; @SerializedName("kubernetesserviceenabled") - @Param(description = "true if Kubernetes Service plugin is enabled, false otherwise") + @Param(description = "True if Kubernetes Service plugin is enabled, false otherwise") private boolean kubernetesServiceEnabled; @SerializedName("kubernetesclusterexperimentalfeaturesenabled") - @Param(description = "true if experimental features for Kubernetes cluster such as Docker private registry are enabled, false otherwise") + @Param(description = "True if experimental features for Kubernetes cluster such as Docker private registry are enabled, false otherwise") private boolean kubernetesClusterExperimentalFeaturesEnabled; @SerializedName("customhypervisordisplayname") @@ -110,23 +110,23 @@ public class CapabilitiesResponse extends BaseResponse { private String customHypervisorDisplayName; @SerializedName("defaultuipagesize") - @Param(description = "default page size in the UI for various views, value set in the configurations", since = "4.15.2") + @Param(description = "Default page size in the UI for various views, value set in the configurations", since = "4.15.2") private Long defaultUiPageSize; @SerializedName(ApiConstants.INSTANCES_STATS_RETENTION_TIME) - @Param(description = "the retention time for Instances stats", since = "4.18.0") + @Param(description = "The retention time for Instances stats", since = "4.18.0") private Integer instancesStatsRetentionTime; @SerializedName(ApiConstants.INSTANCES_STATS_USER_ONLY) - @Param(description = "true if stats are collected only for user instances, false if system instance stats are also collected", since = "4.18.0") + @Param(description = "True if stats are collected only for User Instances, false if System VM stats are also collected", since = "4.18.0") private Boolean instancesStatsUserOnly; @SerializedName(ApiConstants.INSTANCES_DISKS_STATS_RETENTION_ENABLED) - @Param(description = "true if stats are retained for instance disks otherwise false", since = "4.18.0") + @Param(description = "True if stats are retained for Instance disks otherwise false", since = "4.18.0") private Boolean instancesDisksStatsRetentionEnabled; @SerializedName(ApiConstants.INSTANCES_DISKS_STATS_RETENTION_TIME) - @Param(description = "the retention time for Instances disks stats", since = "4.18.0") + @Param(description = "The retention time for Instances disks stats", since = "4.18.0") private Integer instancesDisksStatsRetentionTime; @SerializedName(ApiConstants.SHAREDFSVM_MIN_CPU_COUNT) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/CapabilityResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/CapabilityResponse.java index 6862a5541ebe..67a5b33b6a93 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/CapabilityResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/CapabilityResponse.java @@ -26,15 +26,15 @@ public class CapabilityResponse extends BaseResponse { @SerializedName(ApiConstants.NAME) - @Param(description = "the capability name") + @Param(description = "The capability name") private String name; @SerializedName(ApiConstants.VALUE) - @Param(description = "the capability value") + @Param(description = "The capability value") private String value; @SerializedName(ApiConstants.CAN_CHOOSE_SERVICE_CAPABILITY) - @Param(description = "can this service capability value can be choosable while creatine network offerings") + @Param(description = "Can this service capability value can be choosable while creatine Network offerings") private boolean canChoose; public String getName() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/CapacityResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/CapacityResponse.java index 2d0e21586515..e01a7323fee9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/CapacityResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/CapacityResponse.java @@ -24,51 +24,51 @@ public class CapacityResponse extends BaseResponse { @SerializedName(ApiConstants.TYPE) - @Param(description = "the capacity type") + @Param(description = "The capacity type") private Short capacityType; @SerializedName(ApiConstants.NAME) - @Param(description="the capacity name") + @Param(description = "The capacity name") private String capacityName; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the Zone ID") + @Param(description = "The Zone ID") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the Zone name") + @Param(description = "The Zone name") private String zoneName; @SerializedName(ApiConstants.POD_ID) - @Param(description = "the Pod ID") + @Param(description = "The Pod ID") private String podId; @SerializedName("podname") - @Param(description = "the Pod name") + @Param(description = "The Pod name") private String podName; @SerializedName(ApiConstants.CLUSTER_ID) - @Param(description = "the Cluster ID") + @Param(description = "The Cluster ID") private String clusterId; @SerializedName("clustername") - @Param(description = "the Cluster name") + @Param(description = "The Cluster name") private String clusterName; @SerializedName("capacityallocated") - @Param(description="the capacity currently in allocated") + @Param(description = "The capacity currently in allocated") private Long capacityAllocated; @SerializedName("capacityused") - @Param(description = "the capacity currently in use") + @Param(description = "The capacity currently in use") private Long capacityUsed; @SerializedName("capacitytotal") - @Param(description = "the total capacity available") + @Param(description = "The total capacity available") private Long capacityTotal; @SerializedName("percentused") - @Param(description = "the percentage of capacity currently in use") + @Param(description = "The percentage of capacity currently in use") private String percentUsed; @SerializedName(ApiConstants.TAG) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ChildTemplateResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ChildTemplateResponse.java index 8f5b5de29194..d757b59f0285 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ChildTemplateResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ChildTemplateResponse.java @@ -28,19 +28,19 @@ @SuppressWarnings("unused") public class ChildTemplateResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the template ID") + @Param(description = "The Template ID") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the template name") + @Param(description = "The Template name") private String name; @SerializedName(ApiConstants.SIZE) - @Param(description = "the size of the template") + @Param(description = "The size of the Template") private Integer size; @SerializedName(ApiConstants.TEMPLATE_TYPE) - @Param(description = "the type of the template") + @Param(description = "The type of the Template") private String templateType; public String getId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/CloudIdentifierResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/CloudIdentifierResponse.java index 94520ef2f8f4..e87bdf00c316 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/CloudIdentifierResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/CloudIdentifierResponse.java @@ -26,15 +26,15 @@ public class CloudIdentifierResponse extends BaseResponse { @SerializedName(ApiConstants.USER_ID) - @Param(description = "the user ID for the cloud identifier") + @Param(description = "The User ID for the cloud identifier") private String userId; @SerializedName("cloudidentifier") - @Param(description = "the cloud identifier") + @Param(description = "The cloud identifier") private String cloudIdentifier; @SerializedName("signature") - @Param(description = "the signed response for the cloud identifier") + @Param(description = "The signed response for the cloud identifier") private String signature; public String getUserId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ClusterResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ClusterResponse.java index 202ff4bd8705..e73cd3876a92 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ClusterResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ClusterResponse.java @@ -34,51 +34,51 @@ public class ClusterResponse extends BaseResponseWithAnnotations { private transient long internalId; @SerializedName(ApiConstants.ID) - @Param(description = "the cluster ID") + @Param(description = "The cluster ID") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the cluster name") + @Param(description = "The cluster name") private String name; @SerializedName(ApiConstants.POD_ID) - @Param(description = "the Pod ID of the cluster") + @Param(description = "The Pod ID of the cluster") private String podId; @SerializedName("podname") - @Param(description = "the Pod name of the cluster") + @Param(description = "The Pod name of the cluster") private String podName; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the Zone ID of the cluster") + @Param(description = "The Zone ID of the cluster") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the Zone name of the cluster") + @Param(description = "The Zone name of the cluster") private String zoneName; @SerializedName("hypervisortype") - @Param(description = "the hypervisor type of the cluster") + @Param(description = "The hypervisor type of the cluster") private String hypervisorType; @SerializedName("clustertype") - @Param(description = "the type of the cluster") + @Param(description = "The type of the cluster") private String clusterType; @SerializedName("allocationstate") - @Param(description = "the allocation state of the cluster") + @Param(description = "The allocation state of the cluster") private String allocationState; @SerializedName("managedstate") - @Param(description = "whether this cluster is managed by cloudstack") + @Param(description = "Whether this cluster is managed by Cloudstack") private String managedState; @SerializedName("capacity") - @Param(description = "the capacity of the Cluster", responseObject = CapacityResponse.class) + @Param(description = "The capacity of the Cluster", responseObject = CapacityResponse.class) private List capacities; @SerializedName("cpuovercommitratio") - @Param(description = "The cpu overcommit ratio of the cluster") + @Param(description = "The CPU overcommit ratio of the cluster") private String cpuovercommitratio; @SerializedName("memoryovercommitratio") diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ConditionResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ConditionResponse.java index 1038177cb86c..d27a1cdf672c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ConditionResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ConditionResponse.java @@ -30,7 +30,7 @@ @SuppressWarnings("unused") public class ConditionResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName("id") - @Param(description = "the id of the Condition") + @Param(description = "The ID of the Condition") private String id; @SerializedName(value = ApiConstants.THRESHOLD) @@ -42,11 +42,11 @@ public class ConditionResponse extends BaseResponse implements ControlledEntityR private String relationalOperator; @SerializedName("counterid") - @Param(description = "the Id of the Counter.") + @Param(description = "The ID of the Counter.") private String counterId; @SerializedName("countername") - @Param(description = "the Name of the Counter.") + @Param(description = "The Name of the Counter.") private String counterName; @SerializedName("counter") @@ -54,11 +54,11 @@ public class ConditionResponse extends BaseResponse implements ControlledEntityR private CounterResponse counterResponse; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain id of the Condition owner") + @Param(description = "The domain ID of the Condition owner") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the owner.") + @Param(description = "The domain name of the owner.") private String domain; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -66,19 +66,19 @@ public class ConditionResponse extends BaseResponse implements ControlledEntityR private String domainPath; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "zone id of counter") + @Param(description = "Zone ID of counter") private String zoneId; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the Condition.") + @Param(description = "The project ID of the Condition.") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the Condition") + @Param(description = "The project name of the Condition") private String projectName; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the owner of the Condition.") + @Param(description = "The owner of the Condition.") private String accountName; // ///////////////////////////////////////////////// diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ConfigurationGroupResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ConfigurationGroupResponse.java index 053ee5fdc35e..32926a71d8a8 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ConfigurationGroupResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ConfigurationGroupResponse.java @@ -27,19 +27,19 @@ public class ConfigurationGroupResponse extends BaseResponse { @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the configuration group") + @Param(description = "The name of the configuration group") private String groupName; @SerializedName(ApiConstants.SUBGROUP) - @Param(description = "the subgroups of the configuration group", responseObject = ConfigurationSubGroupResponse.class) + @Param(description = "The subgroups of the configuration group", responseObject = ConfigurationSubGroupResponse.class) private List subGroups; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the description of the configuration group") + @Param(description = "The description of the configuration group") private String description; @SerializedName(ApiConstants.PRECEDENCE) - @Param(description = "the precedence of the configuration group") + @Param(description = "The precedence of the configuration group") private Long precedence; public String getGroupName() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ConfigurationResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ConfigurationResponse.java index 1818e914a97e..416f0102d859 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ConfigurationResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ConfigurationResponse.java @@ -25,63 +25,63 @@ public class ConfigurationResponse extends BaseResponse { @SerializedName(ApiConstants.CATEGORY) - @Param(description = "the category of the configuration") + @Param(description = "The category of the configuration") private String category; @SerializedName(ApiConstants.GROUP) - @Param(description = "the group of the configuration", since = "4.18.0") + @Param(description = "The group of the configuration", since = "4.18.0") private String group; @SerializedName(ApiConstants.SUBGROUP) - @Param(description = "the subgroup of the configuration", since = "4.18.0") + @Param(description = "The subgroup of the configuration", since = "4.18.0") private String subGroup; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the configuration") + @Param(description = "The name of the configuration") private String name; @SerializedName(ApiConstants.VALUE) - @Param(description = "the value of the configuration") + @Param(description = "The value of the configuration") private String value; @SerializedName(ApiConstants.DEFAULT_VALUE) - @Param(description = "the default value of the configuration", since = "4.18.0") + @Param(description = "The default value of the configuration", since = "4.18.0") private String defaultValue; @SerializedName(ApiConstants.SCOPE) - @Param(description = "scope(zone/cluster/pool/account) of the parameter that needs to be updated") + @Param(description = "Scope (zone/cluster/pool/account) of the parameter that needs to be updated") private String scope; @SerializedName(ApiConstants.ID) - @Param(description = "the value of the configuration") + @Param(description = "The value of the configuration") private Long id; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the description of the configuration") + @Param(description = "The description of the configuration") private String description; @SerializedName(ApiConstants.IS_DYNAMIC) - @Param(description = "true if the configuration is dynamic") + @Param(description = "True if the configuration is dynamic") private boolean isDynamic; @SerializedName(ApiConstants.COMPONENT) - @Param(description = "the component of the configuration", since = "4.18.0") + @Param(description = "The component of the configuration", since = "4.18.0") private String component; @SerializedName(ApiConstants.PARENT) - @Param(description = "the name of the parent configuration", since = "4.18.0") + @Param(description = "The name of the parent configuration", since = "4.18.0") private String parent; @SerializedName(ApiConstants.DISPLAY_TEXT) - @Param(description = "the display text of the configuration", since = "4.18.0") + @Param(description = "The display text of the configuration", since = "4.18.0") private String displayText; @SerializedName(ApiConstants.TYPE) - @Param(description = "the type of the configuration value", since = "4.18.0") + @Param(description = "The type of the configuration value", since = "4.18.0") private String type; @SerializedName(ApiConstants.OPTIONS) - @Param(description = "the possible options of the configuration value", since = "4.18.0") + @Param(description = "The possible options of the configuration value", since = "4.18.0") private String options; public String getCategory() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ConfigurationSubGroupResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ConfigurationSubGroupResponse.java index fda8e18b361a..81f1bbd45768 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ConfigurationSubGroupResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ConfigurationSubGroupResponse.java @@ -25,11 +25,11 @@ public class ConfigurationSubGroupResponse extends BaseResponse { @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the configuration subgroup") + @Param(description = "The name of the configuration subgroup") private String subGroupName; @SerializedName(ApiConstants.PRECEDENCE) - @Param(description = "the precedence of the configuration subgroup") + @Param(description = "The precedence of the configuration subgroup") private Long precedence; public String getSubGroupName() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ConsoleEndpointWebsocketResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ConsoleEndpointWebsocketResponse.java index d98b52d08636..0cc6a53019a6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ConsoleEndpointWebsocketResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ConsoleEndpointWebsocketResponse.java @@ -27,23 +27,23 @@ public ConsoleEndpointWebsocketResponse() { } @SerializedName(ApiConstants.TOKEN) - @Param(description = "the console websocket token") + @Param(description = "The console websocket token") private String token; @SerializedName("host") - @Param(description = "the console websocket host") + @Param(description = "The console websocket host") private String host; @SerializedName(ApiConstants.PORT) - @Param(description = "the console websocket port") + @Param(description = "The console websocket port") private String port; @SerializedName(ApiConstants.PATH) - @Param(description = "the console websocket path") + @Param(description = "The console websocket path") private String path; @SerializedName("extra") - @Param(description = "the console websocket extra field for validation (if enabled)") + @Param(description = "The console websocket extra field for validation (if enabled)") private String extra; public String getToken() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/CounterResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/CounterResponse.java index f013690b64cc..d4b4bed7e2bb 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/CounterResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/CounterResponse.java @@ -30,7 +30,7 @@ @EntityReference(value = Counter.class) public class CounterResponse extends BaseResponse { @SerializedName("id") - @Param(description = "the id of the Counter") + @Param(description = "The ID of the Counter") private String id; @SerializedName(value = ApiConstants.NAME) @@ -46,7 +46,7 @@ public class CounterResponse extends BaseResponse { private String value; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "zone id of counter") + @Param(description = "Zone ID of counter") private String zoneId; @SerializedName(value = ApiConstants.PROVIDER) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/CreateConsoleEndpointResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/CreateConsoleEndpointResponse.java index c1e04beee732..557315442e4b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/CreateConsoleEndpointResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/CreateConsoleEndpointResponse.java @@ -27,19 +27,19 @@ public CreateConsoleEndpointResponse() { } @SerializedName(ApiConstants.SUCCESS) - @Param(description = "true if the console endpoint is generated properly") + @Param(description = "True if the console endpoint is generated properly") private Boolean result; @SerializedName(ApiConstants.DETAILS) - @Param(description = "details in case of an error") + @Param(description = "Details in case of an error") private String details; @SerializedName(ApiConstants.URL) - @Param(description = "the console url") + @Param(description = "The console url") private String url; @SerializedName("websocket") - @Param(description = "the console websocket options") + @Param(description = "The console websocket options") private ConsoleEndpointWebsocketResponse websocketResponse; public Boolean getResult() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/CustomCertificateResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/CustomCertificateResponse.java index 44b732769183..ca6e454db1e8 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/CustomCertificateResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/CustomCertificateResponse.java @@ -25,7 +25,7 @@ public class CustomCertificateResponse extends BaseResponse { @SerializedName("message") - @Param(description = "message of the certificate upload operation") + @Param(description = "Message of the certificate upload operation") private String message; public String getResultMessage() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/DataCenterGuestIpv6PrefixResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/DataCenterGuestIpv6PrefixResponse.java index fd0803f1c581..db4314f5568f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/DataCenterGuestIpv6PrefixResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/DataCenterGuestIpv6PrefixResponse.java @@ -30,31 +30,31 @@ @EntityReference(value = DataCenterGuestIpv6Prefix.class) public class DataCenterGuestIpv6PrefixResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "id of the guest IPv6 prefix") + @Param(description = "ID of the guest IPv6 prefix") private String id; @SerializedName(ApiConstants.PREFIX) - @Param(description = "guest IPv6 prefix") + @Param(description = "Guest IPv6 prefix") private String prefix; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "id of zone to which the IPv6 prefix belongs to." ) + @Param(description = "ID of zone to which the IPv6 prefix belongs to." ) private String zoneId; @SerializedName(ApiConstants.USED_SUBNETS) - @Param(description = "count of the used IPv6 subnets for the prefix." ) + @Param(description = "Count of the used IPv6 subnets for the prefix." ) private Integer usedSubnets; @SerializedName(ApiConstants.AVAILABLE_SUBNETS) - @Param(description = "count of the available IPv6 subnets for the prefix." ) + @Param(description = "Count of the available IPv6 subnets for the prefix." ) private Integer availableSubnets; @SerializedName(ApiConstants.TOTAL_SUBNETS) - @Param(description = "count of the total IPv6 subnets for the prefix." ) + @Param(description = "Count of the total IPv6 subnets for the prefix." ) private Integer totalSubnets; @SerializedName(ApiConstants.CREATED) - @Param(description = " date when this IPv6 prefix was created." ) + @Param(description = "Date when this IPv6 prefix was created." ) private Date created; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/DirectDownloadCertificateHostStatusResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/DirectDownloadCertificateHostStatusResponse.java index cc9f2fc366ad..80c787a0e2aa 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/DirectDownloadCertificateHostStatusResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/DirectDownloadCertificateHostStatusResponse.java @@ -24,19 +24,19 @@ public class DirectDownloadCertificateHostStatusResponse extends BaseResponse { @SerializedName(ApiConstants.HOST_ID) - @Param(description = "the ID of the host") + @Param(description = "The ID of the host") private String hostId; @SerializedName(ApiConstants.HOST_NAME) - @Param(description = "the name of the host") + @Param(description = "The name of the host") private String hostName; @SerializedName(ApiConstants.STATUS) - @Param(description = "indicates if the certificate has been revoked from the host, failed or skipped") + @Param(description = "Indicates if the certificate has been revoked from the host, failed or skipped") private String status; @SerializedName(ApiConstants.DETAILS) - @Param(description = "indicates the details in case of failure or host skipped") + @Param(description = "Indicates the details in case of failure or host skipped") private String details; public String getHostId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/DirectDownloadCertificateResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/DirectDownloadCertificateResponse.java index f04cba812ba5..480d70d8f881 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/DirectDownloadCertificateResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/DirectDownloadCertificateResponse.java @@ -29,47 +29,47 @@ public class DirectDownloadCertificateResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the direct download certificate id") + @Param(description = "The direct download certificate ID") private String id; @SerializedName(ApiConstants.ALIAS) - @Param(description = "the direct download certificate alias") + @Param(description = "The direct download certificate alias") private String alias; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the zone id where the certificate is uploaded") + @Param(description = "The zone ID where the certificate is uploaded") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the zone name where the certificate is uploaded") + @Param(description = "The zone name where the certificate is uploaded") private String zoneName; @SerializedName(ApiConstants.VERSION) - @Param(description = "the direct download certificate version") + @Param(description = "The direct download certificate version") private String version; @SerializedName(ApiConstants.CERTIFICATE_SUBJECT) - @Param(description = "the direct download certificate subject") + @Param(description = "The direct download certificate subject") private String subject; @SerializedName(ApiConstants.CERTIFICATE_ISSUER) - @Param(description = "the direct download certificate issuer") + @Param(description = "The direct download certificate issuer") private String issuer; @SerializedName(ApiConstants.CERTIFICATE_VALIDITY) - @Param(description = "the direct download certificate issuer") + @Param(description = "The direct download certificate issuer") private String validity; @SerializedName(ApiConstants.CERTIFICATE_SERIALNUM) - @Param(description = "the direct download certificate serial num") + @Param(description = "The direct download certificate serial num") private String serialNum; @SerializedName(ApiConstants.HYPERVISOR) - @Param(description = "the hypervisor of the hosts where the certificate is uploaded") + @Param(description = "The hypervisor of the hosts where the certificate is uploaded") private String hypervisor; @SerializedName(ApiConstants.HOSTS_MAP) - @Param(description = "the hosts where the certificate is uploaded to", responseObject = HostResponse.class) + @Param(description = "The hosts where the certificate is uploaded to", responseObject = HostResponse.class) private List hostsMap; public String getId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/DiskOfferingResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/DiskOfferingResponse.java index 0fed9827ef13..528890ea5fae 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/DiskOfferingResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/DiskOfferingResponse.java @@ -30,27 +30,27 @@ @EntityReference(value = DiskOffering.class) public class DiskOfferingResponse extends BaseResponseWithAnnotations { @SerializedName(ApiConstants.ID) - @Param(description = "unique ID of the disk offering") + @Param(description = "Unique ID of the disk offering") private String id; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") + @Param(description = "The domain ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") + @Param(description = "The domain name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") private String domain; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the zone ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") + @Param(description = "The zone ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") private String zoneId; @SerializedName(ApiConstants.ZONE) - @Param(description = "the zone name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") + @Param(description = "The zone name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") private String zone; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the disk offering") + @Param(description = "The name of the disk offering") private String name; @SerializedName(ApiConstants.STATE) @@ -58,106 +58,106 @@ public class DiskOfferingResponse extends BaseResponseWithAnnotations { private String state; @SerializedName(ApiConstants.DISPLAY_TEXT) - @Param(description = "an alternate display text of the disk offering.") + @Param(description = "An alternate display text of the disk offering.") private String displayText; @SerializedName(ApiConstants.DISK_SIZE) - @Param(description = "the size of the disk offering in GB") + @Param(description = "The size of the disk offering in GB") private Long diskSize; @SerializedName(ApiConstants.CREATED) - @Param(description = "the date this disk offering was created") + @Param(description = "The date this disk offering was created") private Date created; @SerializedName("iscustomized") - @Param(description = "true if disk offering uses custom size, false otherwise") + @Param(description = "True if disk offering uses custom size, false otherwise") private Boolean customized; @SerializedName("iscustomizediops") - @Param(description = "true if disk offering uses custom iops, false otherwise") + @Param(description = "True if disk offering uses custom IOPS, false otherwise") private Boolean customizedIops; @SerializedName(ApiConstants.MIN_IOPS) - @Param(description = "the min iops of the disk offering") + @Param(description = "The min IOPS of the disk offering") private Long minIops; @SerializedName(ApiConstants.MAX_IOPS) - @Param(description = "the max iops of the disk offering") + @Param(description = "The max IOPS of the disk offering") private Long maxIops; @SerializedName(ApiConstants.HYPERVISOR_SNAPSHOT_RESERVE) - @Param(description = "Hypervisor snapshot reserve space as a percent of a volume (for managed storage using Xen or VMware)", since = "4.4") + @Param(description = "Hypervisor Snapshot reserve space as a percent of a volume (for managed storage using Xen or VMware)", since = "4.4") private Integer hypervisorSnapshotReserve; @SerializedName(ApiConstants.TAGS) - @Param(description = "the tags for the disk offering") + @Param(description = "The tags for the disk offering") private String tags; @SerializedName("storagetype") - @Param(description = "the storage type for this disk offering") + @Param(description = "The storage type for this disk offering") private String storageType; - @SerializedName("provisioningtype") @Param(description="provisioning type used to create volumes. Valid values are thin, sparse, fat.", since = "4.4.0") + @SerializedName("provisioningtype") @Param(description = "Provisioning type used to create volumes. Valid values are thin, sparse, fat.", since = "4.4.0") private String provisioningType; @SerializedName("diskBytesReadRate") - @Param(description = "bytes read rate of the disk offering") + @Param(description = "Bytes read rate of the disk offering") private Long bytesReadRate; @SerializedName("diskBytesReadRateMax") - @Param(description = "burst bytes read rate of the disk offering") + @Param(description = "Burst bytes read rate of the disk offering") private Long bytesReadRateMax; @SerializedName("diskBytesReadRateMaxLength") - @Param(description = "length (in seconds) of the burst") + @Param(description = "Length (in seconds) of the burst") private Long bytesReadRateMaxLength; @SerializedName("diskBytesWriteRate") - @Param(description = "bytes write rate of the disk offering") + @Param(description = "Bytes write rate of the disk offering") private Long bytesWriteRate; @SerializedName("diskBytesWriteRateMax") - @Param(description = "burst bytes write rate of the disk offering") + @Param(description = "Burst bytes write rate of the disk offering") private Long bytesWriteRateMax; @SerializedName("diskBytesWriteRateMaxLength") - @Param(description = "length (in seconds) of the burst") + @Param(description = "Length (in seconds) of the burst") private Long bytesWriteRateMaxLength; @SerializedName("diskIopsReadRate") - @Param(description = "io requests read rate of the disk offering") + @Param(description = "I/O requests read rate of the disk offering") private Long iopsReadRate; @SerializedName("diskIopsReadRateMax") - @Param(description = "burst io requests read rate of the disk offering") + @Param(description = "Burst io requests read rate of the disk offering") private Long iopsReadRateMax; @SerializedName("diskIopsReadRateMaxLength") - @Param(description = "length (in second) of the burst") + @Param(description = "Length (in second) of the burst") private Long iopsReadRateMaxLength; @SerializedName("diskIopsWriteRate") - @Param(description = "io requests write rate of the disk offering") + @Param(description = "I/O requests write rate of the disk offering") private Long iopsWriteRate; @SerializedName("diskIopsWriteRateMax") - @Param(description = "burst io requests write rate of the disk offering") + @Param(description = "Burst io requests write rate of the disk offering") private Long iopsWriteRateMax; @SerializedName("diskIopsWriteRateMaxLength") - @Param(description = "length (in seconds) of the burst") + @Param(description = "Length (in seconds) of the burst") private Long iopsWriteRateMaxLength; @SerializedName("cacheMode") - @Param(description = "the cache mode to use for this disk offering. none, writeback or writethrough", since = "4.4") + @Param(description = "The cache mode to use for this disk offering. none, writeback or writethrough", since = "4.4") private String cacheMode; @SerializedName("displayoffering") - @Param(description = "whether to display the offering to the end user or not.") + @Param(description = "Whether to display the offering to the end user or not.") private Boolean displayOffering; @SerializedName("vspherestoragepolicy") - @Param(description = "the vsphere storage policy tagged to the disk offering in case of VMware", since = "4.15") + @Param(description = "The vsphere storage policy tagged to the disk offering in case of VMware", since = "4.15") private String vsphereStoragePolicy; @@ -170,7 +170,7 @@ public class DiskOfferingResponse extends BaseResponseWithAnnotations { private Boolean encrypt; @SerializedName(ApiConstants.DETAILS) - @Param(description = "additional key/value details tied with this disk offering", since = "4.17") + @Param(description = "Additional key/value details tied with this disk offering", since = "4.17") private Map details; @SerializedName(ApiConstants.SUITABLE_FOR_VM) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/DomainResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/DomainResponse.java index e2246a1d531f..e018b1a0f724 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/DomainResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/DomainResponse.java @@ -32,77 +32,77 @@ @EntityReference(value = Domain.class) public class DomainResponse extends BaseResponseWithAnnotations implements ResourceLimitAndCountResponse, SetResourceIconResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the domain") + @Param(description = "The ID of the domain") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the domain") + @Param(description = "The name of the domain") private String domainName; @SerializedName(ApiConstants.LEVEL) - @Param(description = "the level of the domain") + @Param(description = "The level of the domain") private Integer level; @SerializedName("parentdomainid") - @Param(description = "the domain ID of the parent domain") + @Param(description = "The domain ID of the parent domain") private String parentDomainId; @SerializedName("parentdomainname") - @Param(description = "the domain name of the parent domain") + @Param(description = "The domain name of the parent domain") private String parentDomainName; @SerializedName("haschild") - @Param(description = "whether the domain has one or more sub-domains") + @Param(description = "Whether the domain has one or more sub-domains") private boolean hasChild; @SerializedName(ApiConstants.NETWORK_DOMAIN) - @Param(description = "the network domain") + @Param(description = "The Network domain") private String networkDomain; @SerializedName(ApiConstants.PATH) - @Param(description = "the path of the domain") + @Param(description = "The path of the domain") private String path; - @SerializedName(ApiConstants.STATE) @Param(description="the state of the domain") + @SerializedName(ApiConstants.STATE) @Param(description = "The state of the domain") private String state; - @SerializedName(ApiConstants.CREATED) @Param(description="the date when this domain was created") + @SerializedName(ApiConstants.CREATED) @Param(description = "The date when this domain was created") private Date created; - @SerializedName(ApiConstants.VM_LIMIT) @Param(description="the total number of virtual machines that can be deployed by this domain") + @SerializedName(ApiConstants.VM_LIMIT) @Param(description = "The total number of Instances that can be deployed by this domain") private String vmLimit; - @SerializedName(ApiConstants.VM_TOTAL) @Param(description="the total number of virtual machines deployed by this domain") + @SerializedName(ApiConstants.VM_TOTAL) @Param(description = "The total number of Instances deployed by this domain") private Long vmTotal; - @SerializedName(ApiConstants.VM_AVAILABLE) @Param(description="the total number of virtual machines available for this domain to acquire") + @SerializedName(ApiConstants.VM_AVAILABLE) @Param(description = "The total number of Instances available for this domain to acquire") private String vmAvailable; - @SerializedName(ApiConstants.IP_LIMIT) @Param(description="the total number of public ip addresses this domain can acquire") + @SerializedName(ApiConstants.IP_LIMIT) @Param(description = "The total number of public IP addresses this domain can acquire") private String ipLimit; - @SerializedName(ApiConstants.IP_TOTAL) @Param(description="the total number of public ip addresses allocated for this domain") + @SerializedName(ApiConstants.IP_TOTAL) @Param(description = "The total number of public IP addresses allocated for this domain") private Long ipTotal; - @SerializedName(ApiConstants.IP_AVAILABLE) @Param(description="the total number of public ip addresses available for this domain to acquire") + @SerializedName(ApiConstants.IP_AVAILABLE) @Param(description = "The total number of public IP addresses available for this domain to acquire") private String ipAvailable; - @SerializedName("volumelimit") @Param(description="the total volume which can be used by this domain") + @SerializedName("volumelimit") @Param(description = "The total volume which can be used by this domain") private String volumeLimit; - @SerializedName("volumetotal") @Param(description="the total volume being used by this domain") + @SerializedName("volumetotal") @Param(description = "The total volume being used by this domain") private Long volumeTotal; - @SerializedName("volumeavailable") @Param(description="the total volume available for this domain") + @SerializedName("volumeavailable") @Param(description = "The total volume available for this domain") private String volumeAvailable; - @SerializedName("snapshotlimit") @Param(description="the total number of snapshots which can be stored by this domain") + @SerializedName("snapshotlimit") @Param(description = "The total number of Snapshots which can be stored by this domain") private String snapshotLimit; - @SerializedName("snapshottotal") @Param(description="the total number of snapshots stored by this domain") + @SerializedName("snapshottotal") @Param(description = "The total number of Snapshots stored by this domain") private Long snapshotTotal; - @SerializedName("snapshotavailable") @Param(description="the total number of snapshots available for this domain") + @SerializedName("snapshotavailable") @Param(description = "The total number of Snapshots available for this domain") private String snapshotAvailable; @SerializedName(ApiConstants.BACKUP_LIMIT) @@ -129,58 +129,58 @@ public class DomainResponse extends BaseResponseWithAnnotations implements Resou @Param(description = "the total backup storage space (in GiB) available to the domain", since = "4.21.0") private String backupStorageAvailable; - @SerializedName("templatelimit") @Param(description="the total number of templates which can be created by this domain") + @SerializedName("templatelimit") @Param(description = "The total number of Templates which can be created by this domain") private String templateLimit; - @SerializedName("templatetotal") @Param(description="the total number of templates which have been created by this domain") + @SerializedName("templatetotal") @Param(description = "The total number of Templates which have been created by this domain") private Long templateTotal; - @SerializedName("templateavailable") @Param(description="the total number of templates available to be created by this domain") + @SerializedName("templateavailable") @Param(description = "The total number of Templates available to be created by this domain") private String templateAvailable; - @SerializedName("projectlimit") @Param(description="the total number of projects the domain can own", since="3.0.1") + @SerializedName("projectlimit") @Param(description = "The total number of projects the domain can own", since="3.0.1") private String projectLimit; - @SerializedName("projecttotal") @Param(description="the total number of projects being administrated by this domain", since="3.0.1") + @SerializedName("projecttotal") @Param(description = "The total number of projects being administrated by this domain", since="3.0.1") private Long projectTotal; - @SerializedName("projectavailable") @Param(description="the total number of projects available for administration by this domain", since="3.0.1") + @SerializedName("projectavailable") @Param(description = "The total number of projects available for administration by this domain", since="3.0.1") private String projectAvailable; - @SerializedName("networklimit") @Param(description="the total number of networks the domain can own", since="3.0.1") + @SerializedName("networklimit") @Param(description = "The total number of Networks the domain can own", since="3.0.1") private String networkLimit; - @SerializedName("networktotal") @Param(description="the total number of networks owned by domain", since="3.0.1") + @SerializedName("networktotal") @Param(description = "The total number of Networks owned by domain", since="3.0.1") private Long networkTotal; - @SerializedName("networkavailable") @Param(description="the total number of networks available to be created for this domain", since="3.0.1") + @SerializedName("networkavailable") @Param(description = "The total number of Networks available to be created for this domain", since="3.0.1") private String networkAvailable; - @SerializedName("vpclimit") @Param(description="the total number of vpcs the domain can own", since="4.0.0") + @SerializedName("vpclimit") @Param(description = "The total number of VPCs the domain can own", since="4.0.0") private String vpcLimit; - @SerializedName("vpctotal") @Param(description="the total number of vpcs owned by domain", since="4.0.0") + @SerializedName("vpctotal") @Param(description = "The total number of VPCs owned by domain", since="4.0.0") private Long vpcTotal; - @SerializedName("vpcavailable") @Param(description="the total number of vpcs available to be created for this domain", since="4.0.0") + @SerializedName("vpcavailable") @Param(description = "The total number of VPCs available to be created for this domain", since="4.0.0") private String vpcAvailable; - @SerializedName("cpulimit") @Param(description="the total number of cpu cores the domain can own", since="4.2.0") + @SerializedName("cpulimit") @Param(description = "The total number of CPU cores the domain can own", since="4.2.0") private String cpuLimit; - @SerializedName("cputotal") @Param(description="the total number of cpu cores owned by domain", since="4.2.0") + @SerializedName("cputotal") @Param(description = "The total number of CPU cores owned by domain", since="4.2.0") private Long cpuTotal; - @SerializedName("cpuavailable") @Param(description="the total number of cpu cores available to be created for this domain", since="4.2.0") + @SerializedName("cpuavailable") @Param(description = "The total number of CPU cores available to be created for this domain", since="4.2.0") private String cpuAvailable; - @SerializedName("memorylimit") @Param(description="the total memory (in MB) the domain can own", since="4.2.0") + @SerializedName("memorylimit") @Param(description = "The total memory (in MB) the domain can own", since="4.2.0") private String memoryLimit; - @SerializedName("memorytotal") @Param(description="the total memory (in MB) owned by domain", since="4.2.0") + @SerializedName("memorytotal") @Param(description = "The total memory (in MB) owned by domain", since="4.2.0") private Long memoryTotal; - @SerializedName("memoryavailable") @Param(description="the total memory (in MB) available to be created for this domain", since="4.2.0") + @SerializedName("memoryavailable") @Param(description = "The total memory (in MB) available to be created for this domain", since="4.2.0") private String memoryAvailable; @SerializedName("gpulimit") @Param(description="the total number of gpus the domain can own", since="4.21.0") @@ -192,22 +192,22 @@ public class DomainResponse extends BaseResponseWithAnnotations implements Resou @SerializedName("gpuavailable") @Param(description="the total number of gpus available to be created for this domain", since="4.21.0") private String gpuAvailable; - @SerializedName("primarystoragelimit") @Param(description="the total primary storage space (in GiB) the domain can own", since="4.2.0") + @SerializedName("primarystoragelimit") @Param(description = "The total primary storage space (in GiB) the domain can own", since="4.2.0") private String primaryStorageLimit; - @SerializedName("primarystoragetotal") @Param(description="the total primary storage space (in GiB) owned by domain", since="4.2.0") + @SerializedName("primarystoragetotal") @Param(description = "The total primary storage space (in GiB) owned by domain", since="4.2.0") private Long primaryStorageTotal; - @SerializedName("primarystorageavailable") @Param(description="the total primary storage space (in GiB) available to be used for this domain", since="4.2.0") + @SerializedName("primarystorageavailable") @Param(description = "The total primary storage space (in GiB) available to be used for this domain", since="4.2.0") private String primaryStorageAvailable; - @SerializedName("secondarystoragelimit") @Param(description="the total secondary storage space (in GiB) the domain can own", since="4.2.0") + @SerializedName("secondarystoragelimit") @Param(description = "The total secondary storage space (in GiB) the domain can own", since="4.2.0") private String secondaryStorageLimit; - @SerializedName("secondarystoragetotal") @Param(description="the total secondary storage space (in GiB) owned by domain", since="4.2.0") + @SerializedName("secondarystoragetotal") @Param(description = "The total secondary storage space (in GiB) owned by domain", since="4.2.0") private float secondaryStorageTotal; - @SerializedName("secondarystorageavailable") @Param(description="the total secondary storage space (in GiB) available to be used for this domain", since="4.2.0") + @SerializedName("secondarystorageavailable") @Param(description = "The total secondary storage space (in GiB) available to be used for this domain", since="4.2.0") private String secondaryStorageAvailable; @SerializedName(ApiConstants.BUCKET_LIMIT) @@ -239,7 +239,7 @@ public class DomainResponse extends BaseResponseWithAnnotations implements Resou ResourceIconResponse icon; @SerializedName(ApiConstants.DOMAIN_DETAILS) - @Param(description = "details for the domain") + @Param(description = "Details for the domain") private Map details; @SerializedName(ApiConstants.TAGGED_RESOURCES) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/DomainRouterResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/DomainRouterResponse.java index 4b5e886a16e2..6c94991e8f08 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/DomainRouterResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/DomainRouterResponse.java @@ -34,155 +34,155 @@ @SuppressWarnings("unused") public class DomainRouterResponse extends BaseResponseWithAnnotations implements ControlledViewEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the id of the router") + @Param(description = "The ID of the router") private String id; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the Zone ID for the router") + @Param(description = "The Zone ID for the router") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the Zone name for the router") + @Param(description = "The Zone name for the router") private String zoneName; @SerializedName(ApiConstants.DNS1) - @Param(description = "the first DNS for the router") + @Param(description = "The first DNS for the router") private String dns1; @SerializedName(ApiConstants.DNS2) - @Param(description = "the second DNS for the router") + @Param(description = "The second DNS for the router") private String dns2; @SerializedName(ApiConstants.IP6_DNS1) - @Param(description = "the first IPv6 DNS for the router") + @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") + @Param(description = "The second IPv6 DNS for the router") private String ip6Dns2; @SerializedName("networkdomain") - @Param(description = "the network domain for the router") + @Param(description = "The Network domain for the router") private String networkDomain; @SerializedName(ApiConstants.GATEWAY) - @Param(description = "the gateway for the router") + @Param(description = "The gateway for the router") private String gateway; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the router") + @Param(description = "The name of the router") private String name; @SerializedName(ApiConstants.POD_ID) - @Param(description = "the Pod ID for the router") + @Param(description = "The Pod ID for the router") private String podId; @SerializedName(ApiConstants.POD_NAME) - @Param(description = "the Pod name for the router", since = "4.13.2") + @Param(description = "The Pod name for the router", since = "4.13.2") private String podName; @SerializedName(ApiConstants.HOST_ID) - @Param(description = "the host ID for the router") + @Param(description = "The host ID for the router") private String hostId; @SerializedName("hostname") - @Param(description = "the hostname for the router") + @Param(description = "The hostname for the router") private String hostName; @SerializedName(ApiConstants.HOST_CONTROL_STATE) - @Param(description = "the control state of the host for the router") + @Param(description = "The control state of the host for the router") private String hostControlState; @SerializedName("hypervisor") - @Param(description = "the hypervisor on which the template runs") + @Param(description = "The hypervisor on which the Template runs") private String hypervisor; @SerializedName(ApiConstants.LINK_LOCAL_IP) - @Param(description = "the link local IP address for the router") + @Param(description = "The Control IP address for the router") private String linkLocalIp; @SerializedName(ApiConstants.LINK_LOCAL_MAC_ADDRESS) - @Param(description = "the link local MAC address for the router") + @Param(description = "The link local MAC address for the router") private String linkLocalMacAddress; @SerializedName(ApiConstants.LINK_LOCAL_MAC_NETMASK) - @Param(description = "the link local netmask for the router") + @Param(description = "The link local netmask for the router") private String linkLocalNetmask; @SerializedName(ApiConstants.LINK_LOCAL_NETWORK_ID) - @Param(description = "the ID of the corresponding link local network") + @Param(description = "The ID of the corresponding link local Network") private String linkLocalNetworkId; @SerializedName(ApiConstants.PUBLIC_IP) - @Param(description = "the public IP address for the router") + @Param(description = "The public IP address for the router") private String publicIp; @SerializedName("publicmacaddress") - @Param(description = "the public MAC address for the router") + @Param(description = "The public MAC address for the router") private String publicMacAddress; @SerializedName("publicnetmask") - @Param(description = "the public netmask for the router") + @Param(description = "The public netmask for the router") private String publicNetmask; @SerializedName("publicnetworkid") - @Param(description = "the ID of the corresponding public network") + @Param(description = "The ID of the corresponding public Network") private String publicNetworkId; @SerializedName("guestipaddress") - @Param(description = "the guest IP address for the router") + @Param(description = "The guest IP address for the router") private String guestIpAddress; @SerializedName("guestmacaddress") - @Param(description = "the guest MAC address for the router") + @Param(description = "The guest MAC address for the router") private String guestMacAddress; @SerializedName("guestnetmask") - @Param(description = "the guest netmask for the router") + @Param(description = "The guest netmask for the router") private String guestNetmask; @SerializedName("guestnetworkid") - @Param(description = "the ID of the corresponding guest network") + @Param(description = "The ID of the corresponding guest Network") private String guestNetworkId; @SerializedName("guestnetworkname") - @Param(description = "the name of the corresponding guest network") + @Param(description = "The name of the corresponding guest Network") private String guestNetworkName; @SerializedName(ApiConstants.TEMPLATE_ID) - @Param(description = "the template ID for the router") + @Param(description = "The Template ID for the router") private String templateId; @SerializedName(ApiConstants.TEMPLATE_NAME) - @Param(description = "the template name for the router", since = "4.13.2") + @Param(description = "The Template name for the router", since = "4.13.2") private String templateName; @SerializedName(ApiConstants.CREATED) - @Param(description = "the date and time the router was created") + @Param(description = "The date and time the router was created") private Date created; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the router") + @Param(description = "The state of the router") private State state; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account associated with the router") + @Param(description = "The Account associated with the router") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the ipaddress") + @Param(description = "The project id of the IP address") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the address") + @Param(description = "The project name of the address") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID associated with the router") + @Param(description = "The domain ID associated with the router") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain associated with the router") + @Param(description = "The domain associated with the router") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -190,27 +190,27 @@ public class DomainRouterResponse extends BaseResponseWithAnnotations implements private String domainPath; @SerializedName(ApiConstants.SERVICE_OFFERING_ID) - @Param(description = "the ID of the service offering of the virtual machine") + @Param(description = "The ID of the service offering of the Instance") private String serviceOfferingId; @SerializedName("serviceofferingname") - @Param(description = "the name of the service offering of the virtual machine") + @Param(description = "The name of the service offering of the Instance") private String serviceOfferingName; @SerializedName("isredundantrouter") - @Param(description = "if this router is an redundant virtual router") + @Param(description = "If this router is an redundant virtual router") private boolean isRedundantRouter; @SerializedName("redundantstate") - @Param(description = "the state of redundant virtual router") + @Param(description = "The state of redundant virtual router") private String redundantState; @SerializedName("version") - @Param(description = "the version of template") + @Param(description = "The version of Template") private String version; @SerializedName("scriptsversion") - @Param(description = "the version of scripts") + @Param(description = "The version of scripts") private String scriptsVersion; @SerializedName(ApiConstants.VPC_ID) @@ -218,23 +218,23 @@ public class DomainRouterResponse extends BaseResponseWithAnnotations implements private String vpcId; @SerializedName("vpcname") - @Param(description = "the name of VPC the router belongs to") + @Param(description = "The name of VPC the router belongs to") private String vpcName; @SerializedName(ApiConstants.ROLE) - @Param(description = "role of the domain router") + @Param(description = "Role of the domain router") private String role; @SerializedName("nic") - @Param(description = "the list of nics associated with the router", responseObject = NicResponse.class, since = "4.0") + @Param(description = "The list of NICs associated with the router", responseObject = NicResponse.class, since = "4.0") private Set nics; @SerializedName("requiresupgrade") - @Param(description = "true if the router template requires upgrader") + @Param(description = "True if the router Template requires upgrade") private boolean requiresUpgrade; @SerializedName(ApiConstants.HEALTHCHECK_FAILED) - @Param(description = "true if any health checks had failed") + @Param(description = "True if any health checks had failed") private boolean healthChecksFailed; @SerializedName("healthcheckresults") @@ -242,7 +242,7 @@ public class DomainRouterResponse extends BaseResponseWithAnnotations implements List healthCheckResults; @SerializedName("softwareversion") - @Param(description = "the version of the code / software in the router") + @Param(description = "The version of the code / software in the router") private String softwareVersion; @SerializedName(ApiConstants.ARCH) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/EventResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/EventResponse.java index 751d00922f1e..889b3c41c6b7 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/EventResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/EventResponse.java @@ -30,43 +30,43 @@ @SuppressWarnings("unused") public class EventResponse extends BaseResponse implements ControlledViewEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the event") + @Param(description = "The ID of the event") private String id; @SerializedName(ApiConstants.USERNAME) - @Param(description = "the name of the user who performed the action (can be different from the account if an admin is performing an action for a user, e.g. starting/stopping a user's virtual machine)") + @Param(description = "The name of the User who performed the action (can be different from the Account if an admin is performing an action for a User, e.g. starting/stopping a User's Instance)") private String username; @SerializedName(ApiConstants.TYPE) - @Param(description = "the type of the event (see event types)") + @Param(description = "The type of the event (see event types)") private String eventType; @SerializedName(ApiConstants.LEVEL) - @Param(description = "the event level (INFO, WARN, ERROR)") + @Param(description = "The event level (INFO, WARN, ERROR)") private String level; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "a brief description of the event") + @Param(description = "A brief description of the event") private String description; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account name for the account that owns the object being acted on in the event (e.g. the owner of the virtual machine, ip address, or security group)") + @Param(description = "The Account name for the Account that owns the object being acted on in the event (e.g. the owner of the Instance, IP address, or security group)") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the ipaddress") + @Param(description = "The project ID of the IP address") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the address") + @Param(description = "The project name of the address") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the id of the account's domain") + @Param(description = "The ID of the Account's domain") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the name of the account's domain") + @Param(description = "The name of the Account's domain") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -74,31 +74,31 @@ public class EventResponse extends BaseResponse implements ControlledViewEntityR private String domainPath; @SerializedName(ApiConstants.RESOURCE_ID) - @Param(description = "the id of the resource", since = "4.17.0") + @Param(description = "The ID of the resource", since = "4.17.0") private String resourceId; @SerializedName(ApiConstants.RESOURCE_TYPE) - @Param(description = "the type of the resource", since = "4.17.0") + @Param(description = "The type of the resource", since = "4.17.0") private String resourceType; @SerializedName(ApiConstants.RESOURCE_NAME) - @Param(description = "the name of the resource", since = "4.17.0") + @Param(description = "The name of the resource", since = "4.17.0") private String resourceName; @SerializedName(ApiConstants.CREATED) - @Param(description = "the date the event was created") + @Param(description = "The date the event was created") private Date created; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the event") + @Param(description = "The state of the event") private Event.State state; @SerializedName(ApiConstants.PARENT_ID) - @Param(description = "whether the event is parented") + @Param(description = "Whether the event is parented") private String parentId; @SerializedName(ApiConstants.ARCHIVED) - @Param(description = "whether the event has been archived or not") + @Param(description = "Whether the event has been archived or not") private Boolean archived; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ExceptionResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ExceptionResponse.java index 65d4ac333711..d475dee0620f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ExceptionResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ExceptionResponse.java @@ -29,19 +29,19 @@ public class ExceptionResponse extends BaseResponse { @SerializedName("uuidList") - @Param(description = "List of uuids associated with this error") + @Param(description = "List of UUIDs associated with this error") private List idList; @SerializedName("errorcode") - @Param(description = "numeric code associated with this error") + @Param(description = "Numeric code associated with this error") private Integer errorCode; @SerializedName("cserrorcode") - @Param(description = "cloudstack exception error code associated with this error") + @Param(description = "Cloudstack exception error code associated with this error") private Integer csErrorCode; @SerializedName("errortext") - @Param(description = "the text associated with this error") + @Param(description = "The text associated with this error") private String errorText = "Command failed due to Internal Server Error"; public ExceptionResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ExternalFirewallResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ExternalFirewallResponse.java index b92288ddb3ff..36e2eabadc59 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ExternalFirewallResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ExternalFirewallResponse.java @@ -25,47 +25,47 @@ public class ExternalFirewallResponse extends NetworkDeviceResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the external firewall") + @Param(description = "The ID of the external firewall") private String id; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the zone ID of the external firewall") + @Param(description = "The zone ID of the external firewall") private String zoneId; @SerializedName(ApiConstants.IP_ADDRESS) - @Param(description = "the management IP address of the external firewall") + @Param(description = "The management IP address of the external firewall") private String ipAddress; @SerializedName(ApiConstants.USERNAME) - @Param(description = "the username that's used to log in to the external firewall") + @Param(description = "The username that's used to log in to the external firewall") private String username; @SerializedName(ApiConstants.PUBLIC_INTERFACE) - @Param(description = "the public interface of the external firewall") + @Param(description = "The public interface of the external firewall") private String publicInterface; @SerializedName(ApiConstants.USAGE_INTERFACE) - @Param(description = "the usage interface of the external firewall") + @Param(description = "The usage interface of the external firewall") private String usageInterface; @SerializedName(ApiConstants.PRIVATE_INTERFACE) - @Param(description = "the private interface of the external firewall") + @Param(description = "The private interface of the external firewall") private String privateInterface; @SerializedName(ApiConstants.PUBLIC_ZONE) - @Param(description = "the public security zone of the external firewall") + @Param(description = "The public security zone of the external firewall") private String publicZone; @SerializedName(ApiConstants.PRIVATE_ZONE) - @Param(description = "the private security zone of the external firewall") + @Param(description = "The private security zone of the external firewall") private String privateZone; @SerializedName(ApiConstants.NUM_RETRIES) - @Param(description = "the number of times to retry requests to the external firewall") + @Param(description = "The number of times to retry requests to the external firewall") private String numRetries; @SerializedName(ApiConstants.TIMEOUT) - @Param(description = "the timeout (in seconds) for requests to the external firewall") + @Param(description = "The timeout (in seconds) for requests to the external firewall") private String timeout; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ExternalLoadBalancerResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ExternalLoadBalancerResponse.java index fe50b9774288..ae25a2cb627e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ExternalLoadBalancerResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ExternalLoadBalancerResponse.java @@ -25,31 +25,31 @@ public class ExternalLoadBalancerResponse extends NetworkDeviceResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the external load balancer") + @Param(description = "The ID of the external Load balancer") private String id; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the zone ID of the external load balancer") + @Param(description = "The zone ID of the external Load balancer") private String zoneId; @SerializedName(ApiConstants.IP_ADDRESS) - @Param(description = "the management IP address of the external load balancer") + @Param(description = "The management IP address of the external Load balancer") private String ipAddress; @SerializedName(ApiConstants.USERNAME) - @Param(description = "the username that's used to log in to the external load balancer") + @Param(description = "The username that's used to log in to the external Load balancer") private String username; @SerializedName(ApiConstants.PUBLIC_INTERFACE) - @Param(description = "the public interface of the external load balancer") + @Param(description = "The public interface of the external Load balancer") private String publicInterface; @SerializedName(ApiConstants.PRIVATE_INTERFACE) - @Param(description = "the private interface of the external load balancer") + @Param(description = "The private interface of the external Load balancer") private String privateInterface; @SerializedName(ApiConstants.NUM_RETRIES) - @Param(description = "the number of times to retry requests to the external load balancer") + @Param(description = "The number of times to retry requests to the external Load balancer") private String numRetries; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ExtractResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ExtractResponse.java index 3d22dfe092ce..fc5fd6c7a55f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ExtractResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ExtractResponse.java @@ -27,27 +27,27 @@ public class ExtractResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the id of extracted object") + @Param(description = "The ID of extracted object") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the extracted object") + @Param(description = "The name of the extracted object") private String name; @SerializedName("extractId") - @Param(description = "the upload id of extracted object") + @Param(description = "The upload ID of extracted object") private String uploadId; @SerializedName("uploadpercentage") - @Param(description = "the percentage of the entity uploaded to the specified location") + @Param(description = "The percentage of the entity uploaded to the specified location") private Integer uploadPercent; @SerializedName("status") - @Param(description = "the status of the extraction") + @Param(description = "The status of the extraction") private String status; @SerializedName("accountid") - @Param(description = "the account id to which the extracted object belongs") + @Param(description = "The Account ID to which the extracted object belongs") private String accountId; @SerializedName("resultstring") @@ -55,31 +55,31 @@ public class ExtractResponse extends BaseResponse { private String resultString; @SerializedName(ApiConstants.CREATED) - @Param(description = "the time and date the object was created") + @Param(description = "The time and date the object was created") private Date createdDate; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the extracted object") + @Param(description = "The state of the extracted object") private String state; @SerializedName("storagetype") - @Param(description = "type of the storage") + @Param(description = "Type of the storage") private String storageType; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "zone ID the object was extracted from") + @Param(description = "Zone ID the object was extracted from") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "zone name the object was extracted from") + @Param(description = "Zone name the object was extracted from") private String zoneName; @SerializedName("extractMode") - @Param(description = "the mode of extraction - upload or download") + @Param(description = "The mode of extraction - upload or download") private String mode; @SerializedName(ApiConstants.URL) - @Param(description = "if mode = upload then url of the uploaded entity. if mode = download the url from which the entity can be downloaded") + @Param(description = "If mode = upload then URL of the uploaded entity. if mode = download the URL from which the entity can be downloaded") private String url; public ExtractResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/FirewallResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/FirewallResponse.java index a9ecdd8e3393..5986c16dc8c0 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/FirewallResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/FirewallResponse.java @@ -28,63 +28,63 @@ @SuppressWarnings("unused") public class FirewallResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the firewall rule") + @Param(description = "The ID of the firewall rule") private String id; @SerializedName(ApiConstants.PROTOCOL) - @Param(description = "the protocol of the firewall rule") + @Param(description = "The protocol of the firewall rule") private String protocol; @SerializedName(ApiConstants.START_PORT) - @Param(description = "the starting port of firewall rule's port range") + @Param(description = "The starting port of firewall rule's port range") private Integer startPort; @SerializedName(ApiConstants.END_PORT) - @Param(description = "the ending port of firewall rule's port range") + @Param(description = "The ending port of firewall rule's port range") private Integer endPort; @SerializedName(ApiConstants.IP_ADDRESS_ID) - @Param(description = "the public ip address id for the firewall rule") + @Param(description = "The public IP address ID for the firewall rule") private String publicIpAddressId; @SerializedName(ApiConstants.NETWORK_ID) - @Param(description = "the network id of the firewall rule") + @Param(description = "The Network ID of the firewall rule") private String networkId; @SerializedName(ApiConstants.IP_ADDRESS) - @Param(description = "the public ip address for the firewall rule") + @Param(description = "The public IP address for the firewall rule") private String publicIpAddress; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the rule") + @Param(description = "The state of the rule") private String state; @SerializedName(ApiConstants.CIDR_LIST) - @Param(description = "the cidr list to forward traffic from. Multiple entries are separated by a single comma character (,).") + @Param(description = "The CIDR list to forward traffic from. Multiple entries are separated by a single comma character (,).") private String cidrList; @SerializedName(ApiConstants.ICMP_TYPE) - @Param(description = "type of the icmp message being sent") + @Param(description = "Type of the ICMP message being sent") private Integer icmpType; @SerializedName(ApiConstants.ICMP_CODE) - @Param(description = "error code for this icmp message") + @Param(description = "Error code for this ICMP message") private Integer icmpCode; @SerializedName(ApiConstants.TAGS) - @Param(description = "the list of resource tags associated with the rule", responseObject = ResourceTagResponse.class) + @Param(description = "The list of resource tags associated with the rule", responseObject = ResourceTagResponse.class) private List tags; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is rule for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is rule for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; @SerializedName(ApiConstants.DEST_CIDR_LIST) - @Param(description = "the cidr list to forward traffic to. Multiple entries are separated by a single comma character (,).") + @Param(description = "The CIDR list to forward traffic to. Multiple entries are separated by a single comma character (,).") private String destCidr; @SerializedName(ApiConstants.TRAFFIC_TYPE) - @Param(description = "the traffic type for the firewall rule", since = "4.17.0") + @Param(description = "The traffic type for the firewall rule", since = "4.17.0") private String trafficType; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/FirewallRuleResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/FirewallRuleResponse.java index 1d3b665634fd..48097e51d992 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/FirewallRuleResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/FirewallRuleResponse.java @@ -31,71 +31,71 @@ @SuppressWarnings("unused") public class FirewallRuleResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the port forwarding rule") + @Param(description = "The ID of the port forwarding rule") private String id; @SerializedName(ApiConstants.PRIVATE_START_PORT) - @Param(description = "the starting port of port forwarding rule's private port range") + @Param(description = "The starting port of port forwarding rule's private port range") private String privateStartPort; @SerializedName(ApiConstants.PRIVATE_END_PORT) - @Param(description = "the ending port of port forwarding rule's private port range") + @Param(description = "The ending port of port forwarding rule's private port range") private String privateEndPort; @SerializedName(ApiConstants.PROTOCOL) - @Param(description = "the protocol of the port forwarding rule") + @Param(description = "The protocol of the port forwarding rule") private String protocol; @SerializedName(ApiConstants.PUBLIC_START_PORT) - @Param(description = "the starting port of port forwarding rule's public port range") + @Param(description = "The starting port of port forwarding rule's public port range") private String publicStartPort; @SerializedName(ApiConstants.PUBLIC_END_PORT) - @Param(description = "the ending port of port forwarding rule's private port range") + @Param(description = "The ending port of port forwarding rule's private port range") private String publicEndPort; @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) - @Param(description = "the VM ID for the port forwarding rule") + @Param(description = "The Instance ID for the port forwarding rule") private String virtualMachineId; @SerializedName("virtualmachinename") - @Param(description = "the VM name for the port forwarding rule") + @Param(description = "The Instance name for the port forwarding rule") private String virtualMachineName; @SerializedName("virtualmachinedisplayname") - @Param(description = "the VM display name for the port forwarding rule") + @Param(description = "The Instance display name for the port forwarding rule") private String virtualMachineDisplayName; @SerializedName(ApiConstants.IP_ADDRESS_ID) - @Param(description = "the public ip address id for the port forwarding rule") + @Param(description = "The public IP address id for the port forwarding rule") private String publicIpAddressId; @SerializedName(ApiConstants.IP_ADDRESS) - @Param(description = "the public ip address for the port forwarding rule") + @Param(description = "The public IP address for the port forwarding rule") private String publicIpAddress; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the rule") + @Param(description = "The state of the rule") private String state; @SerializedName(ApiConstants.CIDR_LIST) - @Param(description = "the cidr list to forward traffic from. Multiple entries are separated by a single comma character (,).") + @Param(description = "The CIDR list to forward traffic from. Multiple entries are separated by a single comma character (,).") private String cidrList; @SerializedName(ApiConstants.TAGS) - @Param(description = "the list of resource tags associated with the rule", responseObject = ResourceTagResponse.class) + @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") + @Param(description = "The Instance IP address for the port forwarding rule") private String destNatVmIp; @SerializedName(ApiConstants.NETWORK_ID) - @Param(description = "the id of the guest network the port forwarding rule belongs to") + @Param(description = "The ID of the guest Network the port forwarding rule belongs to") private String networkId; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is firewall for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is firewall for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; public String getDestNatVmIp() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/GetUploadParamsResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/GetUploadParamsResponse.java index 00f7e7740c28..0e51aa6cd381 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/GetUploadParamsResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/GetUploadParamsResponse.java @@ -30,7 +30,7 @@ public class GetUploadParamsResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the template/volume ID") + @Param(description = "The Template/volume ID") private UUID id; @SerializedName(ApiConstants.POST_URL) @@ -38,15 +38,15 @@ public class GetUploadParamsResponse extends BaseResponse { private URL postURL; @SerializedName(ApiConstants.METADATA) - @Param(description = "encrypted data to be sent in the POST request.") + @Param(description = "Encrypted data to be sent in the POST request.") private String metadata; @SerializedName(ApiConstants.EXPIRES) - @Param(description = "the timestamp after which the signature expires") + @Param(description = "The timestamp after which the signature expires") private String expires; @SerializedName(ApiConstants.SIGNATURE) - @Param(description = "signature to be sent in the POST request.") + @Param(description = "Signature to be sent in the POST request.") private String signature; public GetUploadParamsResponse(UUID id, URL postURL, String metadata, String expires, String signature) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/GetVMPasswordResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/GetVMPasswordResponse.java index 49603212edc9..9c9e41774958 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/GetVMPasswordResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/GetVMPasswordResponse.java @@ -25,7 +25,7 @@ public class GetVMPasswordResponse extends BaseResponse { @SerializedName("encryptedpassword") - @Param(description = "The base64 encoded encrypted password of the VM", isSensitive = true) + @Param(description = "The base64 encoded encrypted password of the Instance", isSensitive = true) private String encryptedPassword; public GetVMPasswordResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java index d41e4d2ab34c..b16706bb872d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/GlobalLoadBalancerResponse.java @@ -31,27 +31,27 @@ public class GlobalLoadBalancerResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "global load balancer rule ID") + @Param(description = "Global Load balancer rule ID") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "name of the global load balancer rule") + @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") + @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") + @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") + @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") + @Param(description = "Session persistence method used for the global Load balancer") private String stickyMethod; @SerializedName(ApiConstants.GSLB_SERVICE_TYPE) @@ -59,27 +59,27 @@ public class GlobalLoadBalancerResponse extends BaseResponse implements Controll private String serviceType; @SerializedName(ApiConstants.REGION_ID) - @Param(description = "Region Id in which global load balancer is created") + @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") + @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") + @Param(description = "The project ID of the Load balancer") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the load balancer") + @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") + @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") + @Param(description = "The domain of the Load balancer rule") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -87,7 +87,7 @@ public class GlobalLoadBalancerResponse extends BaseResponse implements Controll private String domainPath; @SerializedName(ApiConstants.LOAD_BALANCER_RULE) - @Param(description = "List of load balancer rules that are part of GSLB rule", responseObject = LoadBalancerResponse.class) + @Param(description = "List of Load balancer rules that are part of GSLB rule", responseObject = LoadBalancerResponse.class) private List siteLoadBalancers; public void setRegionIdId(Integer regionId) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/GpuResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/GpuResponse.java index b655749126e7..8738c622eaf5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/GpuResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/GpuResponse.java @@ -32,7 +32,7 @@ public class GpuResponse extends BaseResponse { private String gpuGroupName; @SerializedName(ApiConstants.VGPU) - @Param(description = "the list of enabled vGPUs", responseObject = VgpuResponse.class) + @Param(description = "The list of enabled vGPUs", responseObject = VgpuResponse.class) private List vgpu; public void setGpuGroupName(String gpuGroupName) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/GuestOSCategoryResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/GuestOSCategoryResponse.java index 495e349856ab..182e74200070 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/GuestOSCategoryResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/GuestOSCategoryResponse.java @@ -30,11 +30,11 @@ @EntityReference(value = GuestOsCategory.class) public class GuestOSCategoryResponse extends BaseResponse implements SetResourceIconResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the OS category") + @Param(description = "The ID of the OS category") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the OS category") + @Param(description = "The name of the OS category") private String name; @SerializedName(ApiConstants.IS_FEATURED) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/GuestOSResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/GuestOSResponse.java index f870a2f0d942..6f8e7937d0b9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/GuestOSResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/GuestOSResponse.java @@ -28,19 +28,19 @@ @EntityReference(value = GuestOS.class) public class GuestOSResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the OS type") + @Param(description = "The ID of the OS type") private String id; @SerializedName(ApiConstants.OS_CATEGORY_ID) - @Param(description = "the ID of the OS category") + @Param(description = "The ID of the OS category") private String osCategoryId; @SerializedName(ApiConstants.OS_CATEGORY_NAME) - @Param(description = "the name of the OS category") + @Param(description = "The name of the OS category") private String osCategoryName; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the OS type") + @Param(description = "The name of the OS type") private String name; /** @@ -48,15 +48,15 @@ public class GuestOSResponse extends BaseResponse { */ @Deprecated(since = "4.19") @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the name/description of the OS type") + @Param(description = "The name/description of the OS type") private String description; @SerializedName(ApiConstants.IS_USER_DEFINED) - @Param(description = "is the guest OS user defined") + @Param(description = "Is the guest OS user defined") private Boolean isUserDefined; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is the guest OS visible for the users") + @Param(description = "Is the guest OS visible for the users") private Boolean forDisplay; public String getId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/GuestOsMappingResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/GuestOsMappingResponse.java index 583768d47bef..3681f182e95f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/GuestOsMappingResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/GuestOsMappingResponse.java @@ -29,31 +29,31 @@ @EntityReference(value = GuestOSHypervisor.class) public class GuestOsMappingResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the Guest OS mapping") + @Param(description = "The ID of the Guest OS mapping") private String id; @SerializedName(ApiConstants.HYPERVISOR) - @Param(description = "the hypervisor") + @Param(description = "The hypervisor") private String hypervisor; @SerializedName(ApiConstants.HYPERVISOR_VERSION) - @Param(description = "version of the hypervisor for mapping") + @Param(description = "Version of the hypervisor for mapping") private String hypervisorVersion; @SerializedName(ApiConstants.OS_TYPE_ID) - @Param(description = "the ID of the Guest OS type") + @Param(description = "The ID of the Guest OS type") private String osTypeId; @SerializedName(ApiConstants.OS_DISPLAY_NAME) - @Param(description = "standard display name for the Guest OS") + @Param(description = "Standard display name for the Guest OS") private String osStdName; @SerializedName(ApiConstants.OS_NAME_FOR_HYPERVISOR) - @Param(description = "hypervisor specific name for the Guest OS") + @Param(description = "Hypervisor specific name for the Guest OS") private String osNameForHypervisor; @SerializedName(ApiConstants.IS_USER_DEFINED) - @Param(description = "is the mapping user defined") + @Param(description = "Is the mapping user defined") private String isUserDefined; public String getIsUserDefined() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/GuestVlanRangeResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/GuestVlanRangeResponse.java index 133338d27ae3..c67b38866989 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/GuestVlanRangeResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/GuestVlanRangeResponse.java @@ -29,19 +29,19 @@ @SuppressWarnings("unused") public class GuestVlanRangeResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the guest VLAN range") + @Param(description = "The ID of the guest VLAN range") private String id; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account of the guest VLAN range") + @Param(description = "The Account of the guest VLAN range") private String accountName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID of the guest VLAN range") + @Param(description = "The domain ID of the guest VLAN range") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the guest VLAN range") + @Param(description = "The domain name of the guest VLAN range") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -49,23 +49,23 @@ public class GuestVlanRangeResponse extends BaseResponse implements ControlledEn private String domainPath; @SerializedName(ApiConstants.GUEST_VLAN_RANGE) - @Param(description = "the guest VLAN range") + @Param(description = "The guest VLAN range") private String guestVlanRange; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the guest vlan range") + @Param(description = "The project id of the guest VLAN range") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the guest vlan range") + @Param(description = "The project name of the guest VLAN range") private String projectName; @SerializedName(ApiConstants.PHYSICAL_NETWORK_ID) - @Param(description = "the physical network of the guest vlan range") + @Param(description = "The physical Network of the guest VLAN range") private Long physicalNetworkId; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the zone of the guest vlan range") + @Param(description = "The zone of the guest VLAN range") private Long zoneId; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/GuestVlanResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/GuestVlanResponse.java index 6716911ab82e..28d33e9fe659 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/GuestVlanResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/GuestVlanResponse.java @@ -30,23 +30,23 @@ public class GuestVlanResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the guest VLAN id") + @Param(description = "The guest VLAN ID") private long id; @SerializedName(ApiConstants.VLAN) - @Param(description = "the guest VLAN") + @Param(description = "The guest VLAN") private String guestVlan; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account of the guest VLAN range") + @Param(description = "The Account of the guest VLAN range") private String accountName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID of the guest VLAN range") + @Param(description = "The domain ID of the guest VLAN range") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the guest VLAN range") + @Param(description = "The domain name of the guest VLAN range") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -54,43 +54,43 @@ public class GuestVlanResponse extends BaseResponse implements ControlledEntityR private String domainPath; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the guest VLAN range") + @Param(description = "The project ID of the guest VLAN range") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the guest VLAN range") + @Param(description = "The project name of the guest VLAN range") private String projectName; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the zone ID of the guest VLAN range") + @Param(description = "The zone ID of the guest VLAN range") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the zone name of the guest VLAN range") + @Param(description = "The zone name of the guest VLAN range") private String zoneName; @SerializedName(ApiConstants.PHYSICAL_NETWORK_ID) - @Param(description = "the physical network ID of the guest VLAN range") + @Param(description = "The physical Network ID of the guest VLAN range") private String physicalNetworkId; @SerializedName(ApiConstants.PHYSICAL_NETWORK_NAME) - @Param(description = "the physical network name of the guest VLAN range") + @Param(description = "The physical Network name of the guest VLAN range") private String physicalNetworkName; @SerializedName(ApiConstants.IS_DEDICATED) - @Param(description = "true if the guest VLAN is dedicated to the account") + @Param(description = "True if the guest VLAN is dedicated to the Account") private Boolean isDedicated; @SerializedName(ApiConstants.ALLOCATION_STATE) - @Param(description = "the allocation state of the guest VLAN") + @Param(description = "The allocation state of the guest VLAN") private String allocationState; @SerializedName(ApiConstants.TAKEN) - @Param(description = "date the guest VLAN was taken") + @Param(description = "Date the guest VLAN was taken") private Date taken; @SerializedName(ApiConstants.NETWORK) - @Param(description = "the list of networks who use this guest VLAN", responseObject = NetworkResponse.class) + @Param(description = "The list of Networks who use this guest VLAN", responseObject = NetworkResponse.class) private List networks; public void setId(long id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/HAProviderResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/HAProviderResponse.java index d75cbc3e1205..c1c761780084 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/HAProviderResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/HAProviderResponse.java @@ -29,11 +29,11 @@ @EntityReference(value = HAConfig.class) public final class HAProviderResponse extends BaseResponse { @SerializedName(ApiConstants.HA_PROVIDER) - @Param(description = "the HA provider") + @Param(description = "The HA provider") private String provider; @SerializedName(ApiConstants.TYPE) - @Param(description = "the HA provider resource type detail") + @Param(description = "The HA provider resource type detail") private List supportedResourceTypes; public HAProviderResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/HostForMigrationResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/HostForMigrationResponse.java index b4de48baec46..b3853d9cc245 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/HostForMigrationResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/HostForMigrationResponse.java @@ -26,7 +26,7 @@ public class HostForMigrationResponse extends HostResponse { @SerializedName("requiresStorageMotion") - @Param(description = "true if migrating a vm to this host requires storage motion, false otherwise") + @Param(description = "True if migrating an Instance to this host requires storage motion, false otherwise") private Boolean requiresStorageMotion; public void setRequiresStorageMotion(Boolean requiresStorageMotion) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/HostHAResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/HostHAResponse.java index a8b44bd56496..de2281dba315 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/HostHAResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/HostHAResponse.java @@ -27,23 +27,23 @@ @EntityReference(value = HAConfig.class) public final class HostHAResponse extends BaseResponse { @SerializedName(ApiConstants.HOST_ID) - @Param(description = "the ID of the host") + @Param(description = "The ID of the host") private String id; @SerializedName(ApiConstants.HA_ENABLE) - @Param(description = "if host HA is enabled for the host") + @Param(description = "If host HA is enabled for the host") private Boolean enabled; @SerializedName(ApiConstants.HA_STATE) - @Param(description = "the HA state of the host") + @Param(description = "The HA state of the host") private HAConfig.HAState haState; @SerializedName(ApiConstants.HA_PROVIDER) - @Param(description = "the host HA provider") + @Param(description = "The host HA provider") private String provider; @SerializedName(ApiConstants.STATUS) - @Param(description = "operation status") + @Param(description = "Operation status") private Boolean status; public HostHAResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/HostResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/HostResponse.java index ca31bd8b1556..5d085d1bee05 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/HostResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/HostResponse.java @@ -36,133 +36,133 @@ @EntityReference(value = Host.class) public class HostResponse extends BaseResponseWithAnnotations { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the host") + @Param(description = "The ID of the host") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the host") + @Param(description = "The name of the host") private String name; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the host") + @Param(description = "The state of the host") private Status state; @SerializedName("disconnected") - @Param(description = "true if the host is disconnected. False otherwise.") + @Param(description = "True if the host is disconnected. False otherwise.") private Date disconnectedOn; @SerializedName(ApiConstants.TYPE) - @Param(description = "the host type") + @Param(description = "The host type") private Host.Type hostType; @SerializedName("oscategoryid") - @Param(description = "the OS category ID of the host") + @Param(description = "The OS category ID of the host") private String osCategoryId; @SerializedName("oscategoryname") - @Param(description = "the OS category name of the host") + @Param(description = "The OS category name of the host") private String osCategoryName; @SerializedName(ApiConstants.IP_ADDRESS) - @Param(description = "the IP address of the host") + @Param(description = "The IP address of the host") private String ipAddress; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the Zone ID of the host") + @Param(description = "The Zone ID of the host") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the Zone name of the host") + @Param(description = "The Zone name of the host") private String zoneName; @SerializedName(ApiConstants.POD_ID) - @Param(description = "the Pod ID of the host") + @Param(description = "The Pod ID of the host") private String podId; @SerializedName("podname") - @Param(description = "the Pod name of the host") + @Param(description = "The Pod name of the host") private String podName; @SerializedName("version") - @Param(description = "the host version") + @Param(description = "The host version") private String version; @SerializedName(ApiConstants.HYPERVISOR) - @Param(description = "the host hypervisor") + @Param(description = "The host hypervisor") private String hypervisor; @SerializedName("cpusockets") - @Param(description = "the number of CPU sockets on the host") + @Param(description = "The number of CPU sockets on the host") private Integer cpuSockets; @SerializedName("cpunumber") - @Param(description = "the CPU number of the host") + @Param(description = "The CPU number of the host") private Integer cpuNumber; @SerializedName("cpuspeed") - @Param(description = "the CPU speed of the host") + @Param(description = "The CPU speed of the host") private Long cpuSpeed; @Deprecated @SerializedName("cpuallocated") - @Param(description = "the amount of the host's CPU currently allocated") + @Param(description = "The amount of the host's CPU currently allocated") private String cpuAllocated; @SerializedName("cpuallocatedvalue") - @Param(description = "the amount of the host's CPU currently allocated in MHz") + @Param(description = "The amount of the host's CPU currently allocated in MHz") private Long cpuAllocatedValue; @SerializedName("cpuallocatedpercentage") - @Param(description = "the amount of the host's CPU currently allocated in percentage") + @Param(description = "The amount of the host's CPU currently allocated in percentage") private String cpuAllocatedPercentage; @SerializedName("cpuallocatedwithoverprovisioning") - @Param(description = "the amount of the host's CPU currently allocated after applying the cpu.overprovisioning.factor") + @Param(description = "The amount of the host's CPU currently allocated after applying the cpu.overprovisioning.factor") private String cpuAllocatedWithOverprovisioning; @SerializedName("cpuused") - @Param(description = "the amount of the host's CPU currently used") + @Param(description = "The amount of the host's CPU currently used") private String cpuUsed; @SerializedName("cpuwithoverprovisioning") - @Param(description = "the amount of the host's CPU after applying the cpu.overprovisioning.factor") + @Param(description = "The amount of the host's CPU after applying the cpu.overprovisioning.factor") private String cpuWithOverprovisioning; @SerializedName(ApiConstants.CPU_LOAD_AVERAGE) - @Param(description = "the cpu average load on the host") + @Param(description = "The average CPU load on the host") private Double cpuloadaverage; @SerializedName("networkkbsread") - @Param(description = "the incoming network traffic on the host") + @Param(description = "The incoming Network traffic on the host") private Long networkKbsRead; @SerializedName("networkkbswrite") - @Param(description = "the outgoing network traffic on the host") + @Param(description = "The outgoing Network traffic on the host") private Long networkKbsWrite; @Deprecated @SerializedName("memorytotal") - @Param(description = "the memory total of the host, this parameter is deprecated use memorywithoverprovisioning") + @Param(description = "The memory total of the host, this parameter is deprecated use memorywithoverprovisioning") private Long memoryTotal; @SerializedName("memorywithoverprovisioning") - @Param(description = "the amount of the host's memory after applying the mem.overprovisioning.factor") + @Param(description = "The amount of the host's memory after applying the mem.overprovisioning.factor") private String memWithOverprovisioning; @Deprecated @SerializedName("memoryallocated") - @Param(description = "the amount of the host's memory currently allocated") + @Param(description = "The amount of the host's memory currently allocated") private long memoryAllocated; @SerializedName("memoryallocatedpercentage") - @Param(description = "the amount of the host's memory currently allocated in percentage") + @Param(description = "The amount of the host's memory currently allocated in percentage") private String memoryAllocatedPercentage; @SerializedName("memoryallocatedbytes") - @Param(description = "the amount of the host's memory currently allocated in bytes") + @Param(description = "The amount of the host's memory currently allocated in bytes") private Long memoryAllocatedBytes; @SerializedName("memoryused") - @Param(description = "the amount of the host's memory currently used") + @Param(description = "The amount of the host's memory currently used") private Long memoryUsed; @SerializedName("gputotal") @@ -178,19 +178,19 @@ public class HostResponse extends BaseResponseWithAnnotations { private List gpuGroup; @SerializedName("disksizetotal") - @Param(description = "the total disk size of the host") + @Param(description = "The total disk size of the host") private Long diskSizeTotal; @SerializedName("disksizeallocated") - @Param(description = "the host's currently allocated disk size") + @Param(description = "The host's currently allocated disk size") private Long diskSizeAllocated; @SerializedName("capabilities") - @Param(description = "capabilities of the host") + @Param(description = "Capabilities of the host") private String capabilities; @SerializedName("lastpinged") - @Param(description = "the date and time the host was last pinged") + @Param(description = "The date and time the host was last pinged") private Date lastPinged; @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) @@ -198,7 +198,7 @@ public class HostResponse extends BaseResponseWithAnnotations { private String virtualMachineId; @SerializedName(ApiConstants.MANAGEMENT_SERVER_ID) - @Param(description = "the management server ID of the host") + @Param(description = "The management server ID of the host") private String managementServerId; @SerializedName(ApiConstants.MANAGEMENT_SERVER_NAME) @@ -208,35 +208,35 @@ public class HostResponse extends BaseResponseWithAnnotations { private transient long clusterInternalId; @SerializedName("clusterid") - @Param(description = "the cluster ID of the host") + @Param(description = "The cluster ID of the host") private String clusterId; @SerializedName("clustername") - @Param(description = "the cluster name of the host") + @Param(description = "The cluster name of the host") private String clusterName; @SerializedName("clustertype") - @Param(description = "the cluster type of the cluster that host belongs to") + @Param(description = "The cluster type of the cluster that host belongs to") private String clusterType; @SerializedName("islocalstorageactive") - @Param(description = "true if local storage is active, false otherwise") + @Param(description = "True if local storage is active, false otherwise") private Boolean localStorageActive; @SerializedName(ApiConstants.CREATED) - @Param(description = "the date and time the host was created") + @Param(description = "The date and time the host was created") private Date created; @SerializedName("removed") - @Param(description = "the date and time the host was removed") + @Param(description = "The date and time the host was removed") private Date removed; @SerializedName("events") - @Param(description = "events available for the host") + @Param(description = "Events available for the host") private String events; @SerializedName("hosttags") - @Param(description = "comma-separated list of tags for the host") + @Param(description = "Comma-separated list of tags for the host") private String hostTags; @SerializedName("explicithosttags") @@ -252,31 +252,31 @@ public class HostResponse extends BaseResponseWithAnnotations { private Boolean isTagARule; @SerializedName("hasenoughcapacity") - @Param(description = "true if this host has enough CPU and RAM capacity to migrate a VM to it, false otherwise") + @Param(description = "True if this host has enough CPU and RAM capacity to migrate an Instance to it, false otherwise") private Boolean hasEnoughCapacity; @SerializedName("suitableformigration") - @Param(description = "true if this host is suitable(has enough capacity and satisfies all conditions like hosttags, max guests vm limit etc) to migrate a VM to it , false otherwise") + @Param(description = "True if this host is suitable(has enough capacity and satisfies all conditions like hosttags, max guests Instance limit etc) to migrate an Instance to it , false otherwise") private Boolean suitableForMigration; @SerializedName("hostha") - @Param(description = "the host HA information information") + @Param(description = "The host HA information information") private HostHAResponse hostHAResponse; @SerializedName("outofbandmanagement") - @Param(description = "the host out-of-band management information") + @Param(description = "The host out-of-band management information") private OutOfBandManagementResponse outOfBandManagementResponse; @SerializedName("resourcestate") - @Param(description = "the resource state of the host") + @Param(description = "The resource state of the host") private String resourceState; @SerializedName(ApiConstants.HYPERVISOR_VERSION) - @Param(description = "the hypervisor version") + @Param(description = "The hypervisor version") private String hypervisorVersion; @SerializedName(ApiConstants.HA_HOST) - @Param(description = "true if the host is Ha host (dedicated to vms started by HA process; false otherwise") + @Param(description = "True if the host is Ha host (dedicated to Instances started by HA process; false otherwise") private Boolean haHost; @SerializedName(ApiConstants.DETAILS) @@ -284,23 +284,23 @@ public class HostResponse extends BaseResponseWithAnnotations { private Map details; @SerializedName(ApiConstants.ANNOTATION) - @Param(description = "the last annotation set on this host by an admin", since = "4.11") + @Param(description = "The last annotation set on this host by an admin", since = "4.11") private String annotation; @SerializedName(ApiConstants.LAST_ANNOTATED) - @Param(description = "the last time this host was annotated", since = "4.11") + @Param(description = "The last time this host was annotated", since = "4.11") private Date lastAnnotated; @SerializedName(ApiConstants.USERNAME) - @Param(description = "the admin that annotated this host", since = "4.11") + @Param(description = "The admin that annotated this host", since = "4.11") private String username; @SerializedName("ueficapability") - @Param(description = "true if the host has capability to support UEFI boot") + @Param(description = "True if the host has capability to support UEFI boot") private Boolean uefiCapability; @SerializedName(ApiConstants.ENCRYPTION_SUPPORTED) - @Param(description = "true if the host supports encryption", since = "4.18") + @Param(description = "True if the host supports encryption", since = "4.18") private Boolean encryptionSupported; @SerializedName(ApiConstants.INSTANCE_CONVERSION_SUPPORTED) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/HostTagResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/HostTagResponse.java index f772da6dcb66..fac30cae8c03 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/HostTagResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/HostTagResponse.java @@ -24,15 +24,15 @@ public class HostTagResponse extends BaseResponse { @SerializedName("id") - @Param(description = "the ID of the host tag") + @Param(description = "The ID of the host tag") private String id; @SerializedName("hostid") - @Param(description = "the host ID of the host tag") + @Param(description = "The host ID of the host tag") private long hostId; @SerializedName("name") - @Param(description = "the name of the host tag") + @Param(description = "The name of the host tag") private String name; @SerializedName(ApiConstants.IS_IMPLICIT) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/HypervisorCapabilitiesResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/HypervisorCapabilitiesResponse.java index c19397e0c835..a835b2376272 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/HypervisorCapabilitiesResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/HypervisorCapabilitiesResponse.java @@ -27,39 +27,39 @@ @EntityReference(value = HypervisorCapabilities.class) public class HypervisorCapabilitiesResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the hypervisor capabilities row") + @Param(description = "The hypervisor capability ID") private String id; @SerializedName(ApiConstants.HYPERVISOR_VERSION) - @Param(description = "the hypervisor version") + @Param(description = "The hypervisor version") private String hypervisorVersion; @SerializedName(ApiConstants.HYPERVISOR) - @Param(description = "the hypervisor type") + @Param(description = "The hypervisor type") private String hypervisor; @SerializedName(ApiConstants.MAX_GUESTS_LIMIT) - @Param(description = "the maximum number of guest vms recommended for this hypervisor") + @Param(description = "The maximum number of guest Instances recommended for this hypervisor") private Long maxGuestsLimit; @SerializedName(ApiConstants.SECURITY_GROUP_EANBLED) - @Param(description = "true if security group is supported") + @Param(description = "True if security group is supported") private boolean isSecurityGroupEnabled; @SerializedName(ApiConstants.MAX_DATA_VOLUMES_LIMIT) - @Param(description = "the maximum number of Data Volumes that can be attached for this hypervisor") + @Param(description = "The maximum number of Data Volumes that can be attached for this hypervisor") private Integer maxDataVolumesLimit; @SerializedName(ApiConstants.MAX_HOSTS_PER_CLUSTER) - @Param(description = "the maximum number of Hosts per cluster for this hypervisor") + @Param(description = "The maximum number of Hosts per cluster for this hypervisor") private Integer maxHostsPerCluster; @SerializedName(ApiConstants.STORAGE_MOTION_ENABLED) - @Param(description = "true if storage motion is supported") + @Param(description = "True if storage motion is supported") private boolean isStorageMotionSupported; @SerializedName(ApiConstants.VM_SNAPSHOT_ENABELD) - @Param(description = "true if VM snapshots are enabled for this hypervisor") + @Param(description = "True if Instance Snapshots are enabled for this hypervisor") private boolean isVmSnapshotEnabled; public HypervisorCapabilitiesResponse(){ diff --git a/api/src/main/java/org/apache/cloudstack/api/response/HypervisorGuestOsNamesResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/HypervisorGuestOsNamesResponse.java index 52f55bf45693..e6441690083d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/HypervisorGuestOsNamesResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/HypervisorGuestOsNamesResponse.java @@ -27,19 +27,19 @@ public class HypervisorGuestOsNamesResponse extends BaseResponse { @SerializedName(ApiConstants.HYPERVISOR) - @Param(description = "the hypervisor") + @Param(description = "The hypervisor") private String hypervisor; @SerializedName(ApiConstants.HYPERVISOR_VERSION) - @Param(description = "version of the hypervisor for guest os names") + @Param(description = "Version of the hypervisor for guest os names") private String hypervisorVersion; @SerializedName(ApiConstants.GUEST_OS_LIST) - @Param(description = "the guest OS list of the hypervisor", responseObject = HypervisorGuestOsResponse.class) + @Param(description = "The guest OS list of the hypervisor", responseObject = HypervisorGuestOsResponse.class) private List guestOSList; @SerializedName(ApiConstants.GUEST_OS_COUNT) - @Param(description = "the guest OS count of the hypervisor") + @Param(description = "The guest OS count of the hypervisor") private Integer guestOSCount; public String getHypervisor() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/HypervisorGuestOsResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/HypervisorGuestOsResponse.java index e9ef630e17fc..53da01a98549 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/HypervisorGuestOsResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/HypervisorGuestOsResponse.java @@ -26,11 +26,11 @@ public class HypervisorGuestOsResponse extends BaseResponse { @SerializedName(ApiConstants.OS_DISPLAY_NAME) - @Param(description = "standard display name for the Guest OS") + @Param(description = "Standard display name for the Guest OS") private String osStdName; @SerializedName(ApiConstants.OS_NAME_FOR_HYPERVISOR) - @Param(description = "hypervisor specific name for the Guest OS") + @Param(description = "Hypervisor specific name for the Guest OS") private String osNameForHypervisor; public String getOsStdName() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/IPAddressResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/IPAddressResponse.java index 8b0e3cc02016..cdc3115c8293 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/IPAddressResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/IPAddressResponse.java @@ -32,47 +32,47 @@ @SuppressWarnings("unused") public class IPAddressResponse extends BaseResponseWithAnnotations implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "public IP address id") + @Param(description = "Public IP address ID") private String id; @SerializedName(ApiConstants.IP_ADDRESS) - @Param(description = "public IP address") + @Param(description = "Public IP address") private String ipAddress; @SerializedName("allocated") - @Param(description = "date the public IP address was acquired") + @Param(description = "Date the public IP address was acquired") private Date allocated; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the ID of the zone the public IP address belongs to") + @Param(description = "The ID of the zone the public IP address belongs to") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the name of the zone the public IP address belongs to") + @Param(description = "The name of the zone the public IP address belongs to") private String zoneName; @SerializedName("issourcenat") - @Param(description = "true if the IP address is a source nat address, false otherwise") + @Param(description = "True if the IP address is a source NAT address, false otherwise") private Boolean sourceNat; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account the public IP address is associated with") + @Param(description = "The Account the public IP address is associated with") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the ipaddress") + @Param(description = "The project id of the IP address") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the address") + @Param(description = "The project name of the address") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID the public IP address is associated with") + @Param(description = "The domain ID the public IP address is associated with") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain the public IP address is associated with") + @Param(description = "The domain the public IP address is associated with") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -80,95 +80,95 @@ public class IPAddressResponse extends BaseResponseWithAnnotations implements Co private String domainPath; @SerializedName(ApiConstants.FOR_VIRTUAL_NETWORK) - @Param(description = "the virtual network for the IP address") + @Param(description = "The virtual Network for the IP address") private Boolean forVirtualNetwork; @SerializedName(ApiConstants.VLAN_ID) - @Param(description = "the ID of the VLAN associated with the IP address." + " This parameter is visible to ROOT admins only") + @Param(description = "The ID of the VLAN associated with the IP address." + " This parameter is visible to ROOT admins only") private String vlanId; @SerializedName("vlanname") - @Param(description = "the VLAN associated with the IP address") + @Param(description = "The VLAN associated with the IP address") private String vlanName; @SerializedName("isstaticnat") - @Param(description = "true if this ip is for static nat, false otherwise") + @Param(description = "True if this IP is for static NAT, false otherwise") private Boolean staticNat; @SerializedName(ApiConstants.IS_SYSTEM) - @Param(description = "true if this ip is system ip (was allocated as a part of deployVm or createLbRule)") + @Param(description = "True if this IP is system IP (was allocated as a part of deployVm or createLbRule)") private Boolean isSystem; @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) - @Param(description = "virtual machine id the ip address is assigned to") + @Param(description = "Instance id the IP address is assigned to") private String virtualMachineId; @SerializedName(ApiConstants.VIRTUAL_MACHINE_TYPE) - @Param(description = "virtual machine type the ip address is assigned to", since = "4.19.0") + @Param(description = "Instance type the IP address is assigned to", since = "4.19.0") private String virtualMachineType; @SerializedName("vmipaddress") - @Param(description = "virtual machine (dnat) ip address (not null only for static nat Ip)") + @Param(description = "Instance (DNAT) IP address (not null only for static NAT IP)") private String virtualMachineIp; @SerializedName("virtualmachinename") - @Param(description = "virtual machine name the ip address is assigned to") + @Param(description = "Instance name the IP address is assigned to") private String virtualMachineName; @SerializedName("virtualmachinedisplayname") - @Param(description = "virtual machine display name the ip address is assigned to (not null only for static nat Ip)") + @Param(description = "Instance display name the IP address is assigned to (not null only for static NAT IP)") private String virtualMachineDisplayName; @SerializedName(ApiConstants.ASSOCIATED_NETWORK_ID) - @Param(description = "the ID of the Network associated with the IP address") + @Param(description = "The ID of the Network associated with the IP address") private String associatedNetworkId; @SerializedName(ApiConstants.ASSOCIATED_NETWORK_NAME) - @Param(description = "the name of the Network associated with the IP address") + @Param(description = "The name of the Network associated with the IP address") private String associatedNetworkName; @SerializedName(ApiConstants.NETWORK_ID) - @Param(description = "the ID of the Network where ip belongs to") + @Param(description = "The ID of the Network where IP belongs to") private String networkId; @SerializedName(ApiConstants.STATE) - @Param(description = "State of the ip address. Can be: Allocating, Allocated, Releasing, Reserved and Free") + @Param(description = "State of the IP address. Can be: Allocating, Allocated, Releasing, Reserved and Free") private String state; @SerializedName(ApiConstants.PHYSICAL_NETWORK_ID) - @Param(description = "the physical network this belongs to") + @Param(description = "The physical Network this belongs to") private String physicalNetworkId; @SerializedName(ApiConstants.PURPOSE) - @Param(description = "purpose of the IP address. In Acton this value is not null for Ips with isSystem=true, and can have either StaticNat or LB value") + @Param(description = "Purpose of the IP address. In Acton this value is not null for IPs with isSystem=true, and can have either StaticNat or LB value") private String purpose; @SerializedName(ApiConstants.VPC_ID) - @Param(description = "VPC id the ip belongs to") + @Param(description = "VPC ID the IP belongs to") private String vpcId; @SerializedName(ApiConstants.VPC_NAME) - @Param(description = "VPC name the ip belongs to", since = "4.13.2") + @Param(description = "VPC name the IP belongs to", since = "4.13.2") private String vpcName; @SerializedName(ApiConstants.TAGS) - @Param(description = "the list of resource tags associated with ip address", responseObject = ResourceTagResponse.class) + @Param(description = "The list of resource tags associated with IP address", responseObject = ResourceTagResponse.class) private List tags; @SerializedName(ApiConstants.IS_PORTABLE) - @Param(description = "is public IP portable across the zones") + @Param(description = "Is public IP portable across the zones") private Boolean isPortable; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is public ip for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is public IP for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; @SerializedName(ApiConstants.NETWORK_NAME) - @Param(description="the name of the Network where ip belongs to") + @Param(description = "The name of the Network where IP belongs to") private String networkName; @SerializedName(ApiConstants.HAS_RULES) - @Param(description="whether the ip address has Firewall/PortForwarding/LoadBalancing rules defined") + @Param(description = "Whether the IP address has Firewall/PortForwarding/LoadBalancing rules defined") private boolean hasRules; @SerializedName(ApiConstants.FOR_SYSTEM_VMS) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ImageStoreDetailResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ImageStoreDetailResponse.java index 8863b632681d..0afef6166f8b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ImageStoreDetailResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ImageStoreDetailResponse.java @@ -24,11 +24,11 @@ public class ImageStoreDetailResponse extends BaseResponse { @SerializedName("name") - @Param(description = "detail property name of the image store") + @Param(description = "Detail property name of the image store") private String name; @SerializedName("value") - @Param(description = "detail property value of the image store") + @Param(description = "Detail property value of the image store") private String value; public ImageStoreDetailResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ImageStoreResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ImageStoreResponse.java index ee44b6bc4745..79f7eb295ea2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ImageStoreResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ImageStoreResponse.java @@ -28,47 +28,47 @@ @EntityReference(value = ImageStore.class) public class ImageStoreResponse extends BaseResponseWithAnnotations { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the image store") + @Param(description = "The ID of the image store") private String id; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the Zone ID of the image store") + @Param(description = "The Zone ID of the image store") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the Zone name of the image store") + @Param(description = "The Zone name of the image store") private String zoneName; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the image store") + @Param(description = "The name of the image store") private String name; @SerializedName(ApiConstants.URL) - @Param(description = "the url of the image store") + @Param(description = "The URL of the image store") private String url; @SerializedName(ApiConstants.PROTOCOL) - @Param(description = "the protocol of the image store") + @Param(description = "The protocol of the image store") private String protocol; @SerializedName("providername") - @Param(description = "the provider name of the image store") + @Param(description = "The provider name of the image store") private String providerName; @SerializedName(ApiConstants.SCOPE) - @Param(description = "the scope of the image store") + @Param(description = "The scope of the image store") private ScopeType scope; @SerializedName(ApiConstants.READ_ONLY) - @Param(description = "defines if store is read-only") + @Param(description = "Defines if store is read-only") private Boolean readonly; @SerializedName("disksizetotal") - @Param(description = "the total disk size of the host") + @Param(description = "The total disk size of the host") private Long diskSizeTotal; @SerializedName("disksizeused") - @Param(description = "the host's currently used disk size") + @Param(description = "The host's currently used disk size") private Long diskSizeUsed; public ImageStoreResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/InstanceGroupResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/InstanceGroupResponse.java index 9c7a4fc09a17..f15ccf611965 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/InstanceGroupResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/InstanceGroupResponse.java @@ -32,35 +32,35 @@ public class InstanceGroupResponse extends BaseResponseWithAnnotations implements ControlledViewEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the instance group") + @Param(description = "The ID of the Instance group") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the instance group") + @Param(description = "The name of the Instance group") private String name; @SerializedName(ApiConstants.CREATED) - @Param(description = "time and date the instance group was created") + @Param(description = "Time and date the Instance group was created") private Date created; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account owning the instance group") + @Param(description = "The Account owning the Instance group") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project ID of the instance group") + @Param(description = "The project ID of the Instance group") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the instance group") + @Param(description = "The project name of the Instance group") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID of the instance group") + @Param(description = "The domain ID of the Instance group") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the instance group") + @Param(description = "The domain name of the Instance group") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/InternalLoadBalancerElementResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/InternalLoadBalancerElementResponse.java index 15b17d88851c..59726e1c3fbf 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/InternalLoadBalancerElementResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/InternalLoadBalancerElementResponse.java @@ -29,11 +29,11 @@ @SuppressWarnings("unused") public class InternalLoadBalancerElementResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the id of the internal load balancer element") + @Param(description = "The ID of the internal Load balancer element") private String id; @SerializedName(ApiConstants.NSP_ID) - @Param(description = "the physical network service provider id of the element") + @Param(description = "The physical Network service provider ID of the element") private String nspId; @SerializedName(ApiConstants.ENABLED) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/IpForwardingRuleResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/IpForwardingRuleResponse.java index e9856c7af1a7..ba3a0ae3edb8 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/IpForwardingRuleResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/IpForwardingRuleResponse.java @@ -25,43 +25,43 @@ public class IpForwardingRuleResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the port forwarding rule") + @Param(description = "The ID of the port forwarding rule") private String id; @SerializedName(ApiConstants.PROTOCOL) - @Param(description = "the protocol of the port forwarding rule") + @Param(description = "The protocol of the port forwarding rule") private String protocol; @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) - @Param(description = "the VM ID for the port forwarding rule") + @Param(description = "The Instance ID for the port forwarding rule") private String virtualMachineId; @SerializedName("virtualmachinename") - @Param(description = "the VM name for the port forwarding rule") + @Param(description = "The Instance name for the port forwarding rule") private String virtualMachineName; @SerializedName("virtualmachinedisplayname") - @Param(description = "the VM display name for the port forwarding rule") + @Param(description = "The Instance display name for the port forwarding rule") private String virtualMachineDisplayName; @SerializedName(ApiConstants.IP_ADDRESS_ID) - @Param(description = "the public ip address id for the port forwarding rule") + @Param(description = "The public IP address id for the port forwarding rule") private Long publicIpAddressId; @SerializedName(ApiConstants.IP_ADDRESS) - @Param(description = "the public ip address for the port forwarding rule") + @Param(description = "The public IP address for the port forwarding rule") private String publicIpAddress; @SerializedName(ApiConstants.START_PORT) - @Param(description = "the start port of the rule") + @Param(description = "The start port of the rule") private Integer startPort; @SerializedName(ApiConstants.END_PORT) - @Param(description = "the end port of the rule") + @Param(description = "The end port of the rule") private Integer endPort; @SerializedName(ApiConstants.STATE) - @Param(description = "state of the ip forwarding rule") + @Param(description = "State of the IP forwarding rule") private String state; public String getId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/IpRangeResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/IpRangeResponse.java index 364c19f2df0b..5c93287ad07a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/IpRangeResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/IpRangeResponse.java @@ -26,27 +26,27 @@ public class IpRangeResponse extends BaseResponse { @SerializedName(ApiConstants.GATEWAY) - @Param(description = "the gateway for the range") + @Param(description = "The gateway for the range") private String gateway; @SerializedName(ApiConstants.CIDR) - @Param(description = "the CIDR for the range") + @Param(description = "The CIDR for the range") private String cidr; @SerializedName(ApiConstants.START_IP) - @Param(description = "the starting IP for the range") + @Param(description = "The starting IP for the range") private String startIp; @SerializedName(ApiConstants.END_IP) - @Param(description = "the ending IP for the range") + @Param(description = "The ending IP for the range") private String endIp; @SerializedName(ApiConstants.FOR_SYSTEM_VMS) - @Param(description = "indicates if range is dedicated for CPVM and SSVM") + @Param(description = "Indicates if range is dedicated for CPVM and SSVM") private String forSystemVms; @SerializedName(ApiConstants.VLAN_ID) - @Param(description = "indicates Vlan ID for the range") + @Param(description = "Indicates VLAN ID for the range") private String vlanId; public String getGateway() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/Ipv6RouteResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/Ipv6RouteResponse.java index 4111ed94d5b8..68f05cdd6ce9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/Ipv6RouteResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/Ipv6RouteResponse.java @@ -26,11 +26,11 @@ public class Ipv6RouteResponse extends BaseResponse { @SerializedName(ApiConstants.SUBNET) - @Param(description = "the guest IPv6 cidr for route") + @Param(description = "The guest IPv6 CIDR for route") private String subnet; @SerializedName(ApiConstants.GATEWAY) - @Param(description = "the outbound IPv6 gateway") + @Param(description = "The outbound IPv6 gateway") private String gateway; public Ipv6RouteResponse(String subnet, String gateway) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/IsAccountAllowedToCreateOfferingsWithTagsResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/IsAccountAllowedToCreateOfferingsWithTagsResponse.java index 5c763c2058a7..ed7f3b57a9d1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/IsAccountAllowedToCreateOfferingsWithTagsResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/IsAccountAllowedToCreateOfferingsWithTagsResponse.java @@ -23,7 +23,7 @@ public class IsAccountAllowedToCreateOfferingsWithTagsResponse extends BaseResponse { @SerializedName("isallowed") - @Param(description = "is domain admin allowed to create offerings with tags") + @Param(description = "Is domain admin allowed to create offerings with tags") private Boolean isAllowed; diff --git a/api/src/main/java/org/apache/cloudstack/api/response/IsoVmResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/IsoVmResponse.java index 27f286dfca5d..1b4b90d4dc4b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/IsoVmResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/IsoVmResponse.java @@ -28,47 +28,47 @@ @SuppressWarnings("unused") public class IsoVmResponse extends BaseResponse { @SerializedName("id") - @Param(description = "the ISO ID") + @Param(description = "The ISO ID") private String id; @SerializedName("name") - @Param(description = "the ISO name") + @Param(description = "The ISO name") private String name; @SerializedName("displaytext") - @Param(description = "the ISO display text") + @Param(description = "The ISO display text") private String displayText; @SerializedName("bootable") - @Param(description = "true if the ISO is bootable, false otherwise") + @Param(description = "True if the ISO is bootable, false otherwise") private Boolean bootable; @SerializedName("isfeatured") - @Param(description = "true if this template is a featured template, false otherwise") + @Param(description = "True if this Template is a featured Template, false otherwise") private Boolean featured; @SerializedName("ostypeid") - @Param(description = "the ID of the OS type for this template.") + @Param(description = "The ID of the OS type for this Template.") private String osTypeId; @SerializedName("ostypename") - @Param(description = "the name of the OS type for this template.") + @Param(description = "The name of the OS type for this Template.") private String osTypeName; @SerializedName("virtualmachineid") - @Param(description = "id of the virtual machine") + @Param(description = "ID of the Instance") private String virtualMachineId; @SerializedName("vmname") - @Param(description = "name of the virtual machine") + @Param(description = "Name of the Instance") private String virtualMachineName; @SerializedName("vmdisplayname") - @Param(description = "display name of the virtual machine") + @Param(description = "Display name of the Instance") private String virtualMachineDisplayName; @SerializedName("vmstate") - @Param(description = "state of the virtual machine") + @Param(description = "State of the Instance") private String virtualMachineState; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/response/LBHealthCheckPolicyResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/LBHealthCheckPolicyResponse.java index df3a7a0fb7b9..6355b03b18da 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/LBHealthCheckPolicyResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/LBHealthCheckPolicyResponse.java @@ -26,19 +26,19 @@ public class LBHealthCheckPolicyResponse extends BaseResponse { @SerializedName("id") - @Param(description = "the LB HealthCheck policy ID") + @Param(description = "The LB HealthCheck policy ID") private String id; @SerializedName("pingpath") - @Param(description = "the pingpath of the healthcheck policy") + @Param(description = "The pingpath of the healthcheck policy") private String pingpath; @SerializedName("description") - @Param(description = "the description of the healthcheck policy") + @Param(description = "The description of the healthcheck policy") private String description; @SerializedName("state") - @Param(description = "the state of the policy") + @Param(description = "The state of the policy") private String state; @SerializedName("responsetime") @@ -50,15 +50,15 @@ public class LBHealthCheckPolicyResponse extends BaseResponse { private int healthcheckInterval; @SerializedName("healthcheckthresshold") - @Param(description = "Number of consecutive health check success before declaring an instance healthy") + @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.") + @Param(description = "Number of consecutive health check failures before declaring an Instance unhealthy.") private int unhealthcheckthresshold; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is policy for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is policy for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/LBHealthCheckResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/LBHealthCheckResponse.java index cbd953d34a30..f796a1c4d6c5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/LBHealthCheckResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/LBHealthCheckResponse.java @@ -30,27 +30,27 @@ @EntityReference(value = HealthCheckPolicy.class) public class LBHealthCheckResponse extends BaseResponse { @SerializedName("lbruleid") - @Param(description = "the LB rule ID") + @Param(description = "The LB rule ID") private String lbRuleId; @SerializedName("account") - @Param(description = "the account of the HealthCheck policy") + @Param(description = "The Account of the HealthCheck policy") private String accountName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID of the HealthCheck policy") + @Param(description = "The domain ID of the HealthCheck policy") private String domainId; @SerializedName("domain") - @Param(description = "the domain of the HealthCheck policy") + @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") + @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) + @Param(description = "The list of healthcheckpolicies", responseObject = LBHealthCheckPolicyResponse.class) private List healthCheckPolicies; public void setlbRuleId(String lbRuleId) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/LBStickinessPolicyResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/LBStickinessPolicyResponse.java index 82078b483622..db0a908dc72a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/LBStickinessPolicyResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/LBStickinessPolicyResponse.java @@ -32,27 +32,27 @@ public class LBStickinessPolicyResponse extends BaseResponse { @SerializedName("id") - @Param(description = "the LB Stickiness policy ID") + @Param(description = "The LB Stickiness policy ID") private String id; @SerializedName("name") - @Param(description = "the name of the Stickiness policy") + @Param(description = "The name of the Stickiness policy") private String name; @SerializedName("methodname") - @Param(description = "the method name of the Stickiness policy") + @Param(description = "The method name of the Stickiness policy") private String methodName; @SerializedName("description") - @Param(description = "the description of the Stickiness policy") + @Param(description = "The description of the Stickiness policy") private String description;; @SerializedName("state") - @Param(description = "the state of the policy") + @Param(description = "The state of the policy") private String state; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is policy for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is policy for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; // FIXME : if params with the same name exist more than once then values are concatenated with ":" as delimiter . @@ -60,7 +60,7 @@ public class LBStickinessPolicyResponse extends BaseResponse { // Example: {indirect=null, name=testcookie, nocache=null, domain=www.yahoo.com:www.google.com, postonly=null} // in the above there are two domains with values www.yahoo.com and www.google.com @SerializedName("params") - @Param(description = "the params of the policy") + @Param(description = "The params of the policy") private Map params; public Map getParams() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/LBStickinessResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/LBStickinessResponse.java index 75c00acfab04..7abcf307cedf 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/LBStickinessResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/LBStickinessResponse.java @@ -30,39 +30,39 @@ @EntityReference(value = StickinessPolicy.class) public class LBStickinessResponse extends BaseResponse { @SerializedName("lbruleid") - @Param(description = "the LB rule ID") + @Param(description = "The LB rule ID") private String lbRuleId; @SerializedName("name") - @Param(description = "the name of the Stickiness policy") + @Param(description = "The name of the Stickiness policy") private String name; @SerializedName("description") - @Param(description = "the description of the Stickiness policy") + @Param(description = "The description of the Stickiness policy") private String description;; @SerializedName("account") - @Param(description = "the account of the Stickiness policy") + @Param(description = "The Account of the Stickiness policy") private String accountName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID of the Stickiness policy") + @Param(description = "The domain ID of the Stickiness policy") private String domainId; @SerializedName("domain") - @Param(description = "the domain of the Stickiness policy") + @Param(description = "The domain of the Stickiness policy") private String domainName; @SerializedName("state") - @Param(description = "the state of the policy") + @Param(description = "The state of the policy") private String state; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the id of the zone the Stickiness policy belongs to") + @Param(description = "The ID of the zone the Stickiness policy belongs to") private String zoneId; @SerializedName("stickinesspolicy") - @Param(description = "the list of stickinesspolicies", responseObject = LBStickinessPolicyResponse.class) + @Param(description = "The list of stickinesspolicies", responseObject = LBStickinessPolicyResponse.class) private List stickinessPolicies; public void setlbRuleId(String lbRuleId) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/LoadBalancerResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/LoadBalancerResponse.java index e520dec09e7a..c57323d439dd 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/LoadBalancerResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/LoadBalancerResponse.java @@ -28,63 +28,63 @@ @SuppressWarnings("unused") public class LoadBalancerResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the load balancer rule ID") + @Param(description = "The Load balancer rule ID") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the load balancer") + @Param(description = "The name of the Load balancer") private String name; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the description of the load balancer") + @Param(description = "The description of the Load balancer") private String description; @SerializedName(ApiConstants.PUBLIC_IP_ID) - @Param(description = "the public ip address id") + @Param(description = "The public IP address ID") private String publicIpId; @SerializedName(ApiConstants.PUBLIC_IP) - @Param(description = "the public ip address") + @Param(description = "The public IP address") private String publicIp; @SerializedName(ApiConstants.PUBLIC_PORT) - @Param(description = "the public port") + @Param(description = "The public port") private String publicPort; @SerializedName(ApiConstants.PRIVATE_PORT) - @Param(description = "the private port") + @Param(description = "The private port") private String privatePort; @SerializedName(ApiConstants.ALGORITHM) - @Param(description = "the load balancer algorithm (source, roundrobin, leastconn)") + @Param(description = "The Load balancer algorithm (source, roundrobin, leastconn)") private String algorithm; @SerializedName(ApiConstants.NETWORK_ID) - @Param(description = "the id of the guest network the lb rule belongs to") + @Param(description = "The ID of the guest Network the LB rule belongs to") private String networkId; @SerializedName(ApiConstants.CIDR_LIST) - @Param(description = "the CIDR list to allow traffic, all other CIDRs will be blocked. Multiple entries must be separated by a single comma character (,).") + @Param(description = "The CIDR list to allow traffic, all other CIDRs will be blocked. Multiple entries must be separated by a single comma character (,).") private String cidrList; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account of the load balancer rule") + @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") + @Param(description = "The project ID of the Load balancer") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the load balancer") + @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") + @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") + @Param(description = "The domain of the Load balancer rule") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -92,27 +92,27 @@ public class LoadBalancerResponse extends BaseResponse implements ControlledEnti private String domainPath; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the rule") + @Param(description = "The state of the rule") private String state; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the id of the zone the rule belongs to") + @Param(description = "The ID of the zone the rule belongs to") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the name of the zone the load balancer rule belongs to", since = "4.11") + @Param(description = "The name of the zone the Load balancer rule belongs to", since = "4.11") private String zoneName; @SerializedName(ApiConstants.PROTOCOL) - @Param(description = "the protocol of the loadbalanacer rule") + @Param(description = "The protocol of the Load Balancer rule") private String lbProtocol; @SerializedName(ApiConstants.TAGS) - @Param(description = "the list of resource tags associated with load balancer", responseObject = ResourceTagResponse.class) + @Param(description = "The list of resource tags associated with Load balancer", responseObject = ResourceTagResponse.class) private List tags; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is rule for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is rule for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/LoadBalancerRuleVmMapResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/LoadBalancerRuleVmMapResponse.java index 57c45e643242..497339938bb0 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/LoadBalancerRuleVmMapResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/LoadBalancerRuleVmMapResponse.java @@ -34,11 +34,11 @@ public class LoadBalancerRuleVmMapResponse extends BaseResponse { @SerializedName("loadbalancerruleinstance") - @Param(description = "the user vm set for lb rule") + @Param(description = "The user Instance set for LB rule") private UserVmResponse UserVmResponse; @SerializedName("lbvmipaddresses") - @Param(description = "IP addresses of the vm set of lb rule") + @Param(description = "IP addresses of the Instance set of LB rule") private List ipAddr; public void setIpAddr(List ipAddr) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/LoginCmdResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/LoginCmdResponse.java index 43f92db84cb5..c20f700fe08e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/LoginCmdResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/LoginCmdResponse.java @@ -35,31 +35,31 @@ public class LoginCmdResponse extends AuthenticationCmdResponse { private String domainId; @SerializedName(value = ApiConstants.TIMEOUT) - @Param(description = "the time period before the session has expired") + @Param(description = "The time period before the session has expired") private Integer timeout; @SerializedName(value = ApiConstants.ACCOUNT) - @Param(description = "the account name the user belongs to") + @Param(description = "The Account name the User belongs to") private String account; @SerializedName(value = ApiConstants.FIRSTNAME) - @Param(description = "first name of the user") + @Param(description = "First name of the user") private String firstName; @SerializedName(value = ApiConstants.LASTNAME) - @Param(description = "last name of the user") + @Param(description = "Last name of the user") private String lastName; @SerializedName(value = ApiConstants.TYPE) - @Param(description = "the account type (admin, domain-admin, read-only-admin, user)") + @Param(description = "The Account type (admin, domain-admin, read-only-admin, user)") private String type; @SerializedName(value = ApiConstants.TIMEZONE) - @Param(description = "user time zone") + @Param(description = "User time zone") private String timeZone; @SerializedName(value = ApiConstants.TIMEZONEOFFSET) - @Param(description = "user time zoneoffset") + @Param(description = "User time zoneoffset") private String timeZoneOffset; @SerializedName(value = ApiConstants.REGISTERED) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ManagementServerResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ManagementServerResponse.java index 8592a762c616..c1f24c63230d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ManagementServerResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ManagementServerResponse.java @@ -31,52 +31,52 @@ @EntityReference(value = ManagementServerHost.class) public class ManagementServerResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the management server") + @Param(description = "The ID of the management server") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the management server") + @Param(description = "The name of the management server") private String name; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the management server") + @Param(description = "The state of the management server") private State state; @SerializedName(ApiConstants.VERSION) - @Param(description = "the version of the management server") + @Param(description = "The version of the management server") private String version; @SerializedName(ApiConstants.JAVA_DISTRIBUTION) - @Param(description = "the java distribution name running the management server process") + @Param(description = "The java distribution name running the management server process") private String javaDistribution; @SerializedName(ApiConstants.JAVA_VERSION) - @Param(description = "the version of the java distribution running the management server process") + @Param(description = "The version of the java distribution running the management server process") private String javaVersion; @SerializedName(ApiConstants.OS_DISTRIBUTION) - @Param(description = "the name of the OS distribution running on the management server") + @Param(description = "The name of the OS distribution running on the management server") private String osDistribution; @SerializedName(ApiConstants.LAST_SERVER_START) - @Param(description = "the last time this Management Server was started") + @Param(description = "The last time this Management Server was started") private Date lastServerStart; @SerializedName(ApiConstants.LAST_SERVER_STOP) - @Param(description = "the last time this Management Server was stopped") + @Param(description = "The last time this Management Server was stopped") private Date lastServerStop; @SerializedName(ApiConstants.LAST_BOOT) - @Param(description = "the last time the host on which this Management Server runs was booted") + @Param(description = "The last time the host on which this Management Server runs was booted") private Date lastBoot; @SerializedName(ApiConstants.KERNEL_VERSION) - @Param(description = "the running OS kernel version for this Management Server") + @Param(description = "The running OS kernel version for this Management Server") private String kernelVersion; @Deprecated @SerializedName(ApiConstants.SERVICE_IP) - @Param(description = "the IP Address for this Management Server. This is deprecated, please use 'ipaddress' instead.") + @Param(description = "The IP Address for this Management Server. This is deprecated, please use 'ipaddress' instead.") private String serviceIp; @SerializedName(ApiConstants.IP_ADDRESS) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/MigrationResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/MigrationResponse.java index c67b1d2d13ee..62934151b38b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/MigrationResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/MigrationResponse.java @@ -35,7 +35,7 @@ public class MigrationResponse extends BaseResponse { private String migrationType; @SerializedName("success") - @Param(description = "true if operation is executed successfully") + @Param(description = "True if operation is executed successfully") private boolean success; MigrationResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/NetworkACLItemResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/NetworkACLItemResponse.java index f63cbbf4cb51..7af7ea2610b6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/NetworkACLItemResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/NetworkACLItemResponse.java @@ -30,51 +30,51 @@ @EntityReference(value = NetworkACLItem.class) public class NetworkACLItemResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the ACL Item") + @Param(description = "The ID of the ACL Item") private String id; @SerializedName(ApiConstants.PROTOCOL) - @Param(description = "the protocol of the ACL") + @Param(description = "The protocol of the ACL") private String protocol; @SerializedName(ApiConstants.START_PORT) - @Param(description = "the starting port of ACL's port range") + @Param(description = "The starting port of ACL's port range") private String startPort; @SerializedName(ApiConstants.END_PORT) - @Param(description = "the ending port of ACL's port range") + @Param(description = "The ending port of ACL's port range") private String endPort; @SerializedName(ApiConstants.TRAFFIC_TYPE) - @Param(description = "the traffic type for the ACL") + @Param(description = "The traffic type for the ACL") private String trafficType; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the rule") + @Param(description = "The state of the rule") private String state; @SerializedName(ApiConstants.CIDR_LIST) - @Param(description = "the cidr list to forward traffic from. Multiple entries are separated by a single comma character (,).") + @Param(description = "The CIDR list to forward traffic from. Multiple entries are separated by a single comma character (,).") private String cidrList; @SerializedName(ApiConstants.ICMP_TYPE) - @Param(description = "type of the icmp message being sent") + @Param(description = "Type of the icmp message being sent") private Integer icmpType; @SerializedName(ApiConstants.ICMP_CODE) - @Param(description = "error code for this icmp message") + @Param(description = "Error code for this icmp message") private Integer icmpCode; @SerializedName(ApiConstants.TAGS) - @Param(description = "the list of resource tags associated with the network ACLs", responseObject = ResourceTagResponse.class) + @Param(description = "The list of resource tags associated with the Network ACLs", responseObject = ResourceTagResponse.class) private List tags; @SerializedName(ApiConstants.ACL_ID) - @Param(description = "the ID of the ACL this item belongs to") + @Param(description = "The ID of the ACL this item belongs to") private String aclId; @SerializedName(ApiConstants.ACL_NAME) - @Param(description = "the name of the ACL this item belongs to") + @Param(description = "The name of the ACL this item belongs to") private String aclName; @SerializedName(ApiConstants.NUMBER) @@ -86,11 +86,11 @@ public class NetworkACLItemResponse extends BaseResponse { private String action; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is rule for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is rule for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; @SerializedName(ApiConstants.ACL_REASON) - @Param(description = "an explanation on why this ACL rule is being applied", since = "4.12") + @Param(description = "An explanation on why this ACL rule is being applied", since = "4.12") private String reason; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/NetworkACLResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/NetworkACLResponse.java index 72ee80a2b0a0..7c120c59c810 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/NetworkACLResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/NetworkACLResponse.java @@ -28,11 +28,11 @@ @EntityReference(value = NetworkACL.class) public class NetworkACLResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the ACL") + @Param(description = "The ID of the ACL") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the Name of the ACL") + @Param(description = "The Name of the ACL") private String name; @SerializedName(ApiConstants.DESCRIPTION) @@ -48,7 +48,7 @@ public class NetworkACLResponse extends BaseResponse { private String vpcName; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is ACL for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is ACL for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/NetworkDeviceResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/NetworkDeviceResponse.java index a991c7ae2b05..0d6f7be45575 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/NetworkDeviceResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/NetworkDeviceResponse.java @@ -25,7 +25,7 @@ public class NetworkDeviceResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the network device") + @Param(description = "The ID of the Network device") private String id; public String getId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/NetworkOfferingResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/NetworkOfferingResponse.java index 81a8129ecb76..87f960590283 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/NetworkOfferingResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/NetworkOfferingResponse.java @@ -32,71 +32,71 @@ @SuppressWarnings("unused") public class NetworkOfferingResponse extends BaseResponseWithAnnotations { @SerializedName("id") - @Param(description = "the id of the network offering") + @Param(description = "The ID of the Network offering") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the network offering") + @Param(description = "The name of the Network offering") private String name; @SerializedName(ApiConstants.DISPLAY_TEXT) - @Param(description = "an alternate display text of the network offering.") + @Param(description = "An alternate display text of the Network offering.") private String displayText; @SerializedName(ApiConstants.TAGS) - @Param(description = "the tags for the network offering") + @Param(description = "The tags for the Network offering") private String tags; @SerializedName(ApiConstants.CREATED) - @Param(description = "the date this network offering was created") + @Param(description = "The date this Network offering was created") private Date created; @SerializedName(ApiConstants.TRAFFIC_TYPE) - @Param(description = "the traffic type for the network offering, supported types are Public, Management, Control, Guest, Vlan or Storage.") + @Param(description = "The traffic type for the Network offering, supported types are Public, Management, Control, Guest, VLAN or Storage.") private String trafficType; @SerializedName(ApiConstants.IS_DEFAULT) - @Param(description = "true if network offering is default, false otherwise") + @Param(description = "True if Network offering is default, false otherwise") private Boolean isDefault; @SerializedName(ApiConstants.SPECIFY_VLAN) - @Param(description = "true if network offering supports vlans, false otherwise") + @Param(description = "True if Network offering supports VLANs, false otherwise") private Boolean specifyVlan; @SerializedName(ApiConstants.CONSERVE_MODE) - @Param(description = "true if network offering is ip conserve mode enabled") + @Param(description = "True if Network offering is IP conserve mode enabled") private Boolean conserveMode; @SerializedName(ApiConstants.SPECIFY_IP_RANGES) - @Param(description = "true if network offering supports specifying ip ranges, false otherwise") + @Param(description = "True if Network offering supports specifying IP ranges, false otherwise") private Boolean specifyIpRanges; @SerializedName(ApiConstants.AVAILABILITY) - @Param(description = "availability of the network offering") + @Param(description = "Availability of the Network offering") private String availability; @SerializedName(ApiConstants.NETWORKRATE) - @Param(description = "data transfer rate in megabits per second allowed.") + @Param(description = "Data transfer rate in megabits per second allowed.") private Integer networkRate; @SerializedName(ApiConstants.STATE) - @Param(description = "state of the network offering. Can be Disabled/Enabled/Inactive") + @Param(description = "State of the Network offering. Can be Disabled/Enabled/Inactive") private String state; @SerializedName(ApiConstants.GUEST_IP_TYPE) - @Param(description = "guest type of the network offering, can be Shared or Isolated") + @Param(description = "Guest type of the Network offering, can be Shared or Isolated") private String guestIpType; @SerializedName(ApiConstants.SERVICE_OFFERING_ID) - @Param(description = "the ID of the service offering used by virtual router provider") + @Param(description = "The ID of the service offering used by virtual router provider") private String serviceOfferingId; @SerializedName(ApiConstants.SERVICE) - @Param(description = "the list of supported services", responseObject = ServiceResponse.class) + @Param(description = "The list of supported services", responseObject = ServiceResponse.class) private List services; @SerializedName(ApiConstants.FOR_VPC) - @Param(description = "true if network offering can be used by VPC networks only") + @Param(description = "True if Network offering can be used by VPC Networks only") private Boolean forVpc; @SerializedName(ApiConstants.FOR_NSX) @@ -104,7 +104,7 @@ public class NetworkOfferingResponse extends BaseResponseWithAnnotations { private Boolean forNsx; @SerializedName(ApiConstants.FOR_TUNGSTEN) - @Param(description = "true if network offering can be used by Tungsten-Fabric networks only") + @Param(description = "True if Network offering can be used by Tungsten-Fabric Networks only") private Boolean forTungsten; @SerializedName(ApiConstants.NETWORK_MODE) @@ -112,27 +112,27 @@ public class NetworkOfferingResponse extends BaseResponseWithAnnotations { private String networkMode; @SerializedName(ApiConstants.IS_PERSISTENT) - @Param(description = "true if network offering supports persistent networks, false otherwise") + @Param(description = "True if Network offering supports persistent networks, false otherwise") private Boolean isPersistent; @SerializedName(ApiConstants.DETAILS) - @Param(description = "additional key/value details tied with network offering", since = "4.2.0") + @Param(description = "Additional key/value details tied with network offering", since = "4.2.0") private Map details; @SerializedName(ApiConstants.EGRESS_DEFAULT_POLICY) - @Param(description = "true if guest network default egress policy is allow; false if default egress policy is deny") + @Param(description = "True if guest network default egress policy is allow; false if default egress policy is deny") private Boolean egressDefaultPolicy; @SerializedName(ApiConstants.MAX_CONNECTIONS) - @Param(description = "maximum number of concurrents connections to be handled by lb") + @Param(description = "Maximum number of concurrent connections to be handled by LB") private Integer concurrentConnections; @SerializedName(ApiConstants.SUPPORTS_STRECHED_L2_SUBNET) - @Param(description = "true if network offering supports network that span multiple zones", since = "4.4") + @Param(description = "True if network offering supports network that span multiple zones", since = "4.4") private Boolean supportsStrechedL2Subnet; @SerializedName(ApiConstants.SUPPORTS_PUBLIC_ACCESS) - @Param(description = "true if network offering supports public access for guest networks", since = "4.10.0") + @Param(description = "True if network offering supports public access for guest networks", since = "4.10.0") private Boolean supportsPublicAccess; @SerializedName(ApiConstants.SUPPORTS_INTERNAL_LB) @@ -140,23 +140,23 @@ public class NetworkOfferingResponse extends BaseResponseWithAnnotations { private Boolean supportsInternalLb; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") + @Param(description = "The domain ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") + @Param(description = "The domain name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") private String domain; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the zone ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") + @Param(description = "The zone ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") private String zoneId; @SerializedName(ApiConstants.ZONE) - @Param(description = "the zone name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") + @Param(description = "The zone name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") private String zone; @SerializedName(ApiConstants.INTERNET_PROTOCOL) - @Param(description = "the internet protocol of the network offering") + @Param(description = "The internet protocol of the network offering") private String internetProtocol; @SerializedName(ApiConstants.SPECIFY_AS_NUMBER) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/NetworkPermissionsResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/NetworkPermissionsResponse.java index fcecd14e2820..27be4a51514d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/NetworkPermissionsResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/NetworkPermissionsResponse.java @@ -29,31 +29,31 @@ @SuppressWarnings("unused") public class NetworkPermissionsResponse extends BaseResponse { @SerializedName(ApiConstants.NETWORK_ID) - @Param(description = "the network ID") + @Param(description = "The Network ID") private String networkId; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the ID of the domain to which the network belongs") + @Param(description = "The ID of the domain to which the Network belongs") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the name of the domain to which the network belongs") + @Param(description = "The name of the domain to which the Network belongs") private String domainName; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account the network is available for") + @Param(description = "The Account the Network is available for") private String accountName; @SerializedName(ApiConstants.ACCOUNT_ID) - @Param(description = "the ID of account the network is available for") + @Param(description = "The ID of Account the Network is available for") private String accountId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project the network is available for") + @Param(description = "The project the Network is available for") private String projectName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the ID of project the network is available for") + @Param(description = "The ID of project the Network is available for") private String projectId; diff --git a/api/src/main/java/org/apache/cloudstack/api/response/NetworkResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/NetworkResponse.java index d5db8b4dabbf..7c4b733a80f5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/NetworkResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/NetworkResponse.java @@ -36,103 +36,103 @@ public class NetworkResponse extends BaseResponseWithAssociatedNetwork implements ControlledEntityResponse, SetResourceIconResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the id of the network") + @Param(description = "The ID of the Network") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the network") + @Param(description = "The name of the Network") private String name; @SerializedName(ApiConstants.DISPLAY_TEXT) - @Param(description = "the displaytext of the network") + @Param(description = "The displaytext of the Network") private String displaytext; @SerializedName("broadcastdomaintype") - @Param(description = "Broadcast domain type of the network") + @Param(description = "Broadcast domain type of the Network") private String broadcastDomainType; @SerializedName(ApiConstants.TRAFFIC_TYPE) - @Param(description = "the traffic type of the network") + @Param(description = "The traffic type of the Network") private String trafficType; @SerializedName(ApiConstants.GATEWAY) - @Param(description = "the network's gateway") + @Param(description = "The Network's gateway") private String gateway; @SerializedName(ApiConstants.NETMASK) - @Param(description = "the network's netmask") + @Param(description = "The Network's netmask") private String netmask; @SerializedName(ApiConstants.CIDR) - @Param(description = "Cloudstack managed address space, all CloudStack managed VMs get IP address from CIDR") + @Param(description = "CloudStack managed address space, all CloudStack managed Instances 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") + @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") + @Param(description = "The Network's IP range not to be used by CloudStack guest Instances and can be used for non CloudStack purposes") private String reservedIpRange; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "zone id of the network") + @Param(description = "Zone ID of the Network") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the name of the zone the network belongs to") + @Param(description = "The name of the zone the Network belongs to") private String zoneName; @SerializedName("networkofferingid") - @Param(description = "network offering id the network is created from") + @Param(description = "Network offering ID the Network is created from") private String networkOfferingId; @SerializedName("networkofferingname") - @Param(description = "name of the network offering the network is created from") + @Param(description = "Name of the Network offering the Network is created from") private String networkOfferingName; @SerializedName("networkofferingdisplaytext") - @Param(description = "display text of the network offering the network is created from") + @Param(description = "Display text of the Network offering the Network is created from") private String networkOfferingDisplayText; @SerializedName("networkofferingconservemode") - @Param(description = "true if network offering is ip conserve mode enabled") + @Param(description = "True if Network offering is IP conserve mode enabled") private Boolean networkOfferingConserveMode; @SerializedName("networkofferingavailability") - @Param(description = "availability of the network offering the network is created from") + @Param(description = "Availability of the Network offering the Network is created from") private String networkOfferingAvailability; @SerializedName(ApiConstants.IS_SYSTEM) - @Param(description = "true if network is system, false otherwise") + @Param(description = "True if Network is system, false otherwise") private Boolean isSystem; @SerializedName(ApiConstants.STATE) - @Param(description = "state of the network") + @Param(description = "State of the Network") private String state; @SerializedName("related") - @Param(description = "related to what other network configuration") + @Param(description = "Related to what other Network configuration") private String related; @SerializedName("broadcasturi") - @Param(description = "broadcast uri of the network. This parameter is visible to ROOT admins only") + @Param(description = "Broadcast URI of the Network. This parameter is visible to ROOT admins only") private String broadcastUri; @SerializedName(ApiConstants.DNS1) - @Param(description = "the first IPv4 DNS for the network") + @Param(description = "The first IPv4 DNS for the Network") private String dns1; @SerializedName(ApiConstants.DNS2) - @Param(description = "the second IPv4 DNS for the network") + @Param(description = "The second IPv4 DNS for the Network") private String dns2; @SerializedName(ApiConstants.TYPE) - @Param(description = "the type of the network") + @Param(description = "The type of the Network") private String type; @SerializedName(ApiConstants.VLAN) - @Param(description = "The vlan of the network. This parameter is visible to ROOT admins only") + @Param(description = "The VLAN of the Network. This parameter is visible to ROOT admins only") private String vlan; @SerializedName(ApiConstants.AS_NUMBER_ID) @@ -144,131 +144,131 @@ public class NetworkResponse extends BaseResponseWithAssociatedNetwork implement private Long asNumber; @SerializedName(ApiConstants.ACL_TYPE) - @Param(description = "acl type - access type to the network") + @Param(description = "ACL type - access type to the Network") private String aclType; @SerializedName(ApiConstants.SUBDOMAIN_ACCESS) - @Param(description = "true if users from subdomains can access the domain level network") + @Param(description = "True if users from subdomains can access the domain level Network") private Boolean subdomainAccess; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the owner of the network") + @Param(description = "The owner of the Network") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the ipaddress") + @Param(description = "The project ID of the IP address") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the address") + @Param(description = "The project name of the address") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain id of the network owner") + @Param(description = "The domain ID of the Network owner") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the network owner") + @Param(description = "The domain name of the Network owner") private String domain; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the Domain the network belongs to", since = "4.19.0.0") + @Param(description = "Path of the Domain the network belongs to", since = "4.19.0.0") private String domainPath; @SerializedName("isdefault") - @Param(description = "true if network is default, false otherwise") + @Param(description = "True if Network is default, false otherwise") private Boolean isDefault; @SerializedName("service") - @Param(description = "the list of services", responseObject = ServiceResponse.class) + @Param(description = "The list of services", responseObject = ServiceResponse.class) private List services; @SerializedName(ApiConstants.NETWORK_DOMAIN) - @Param(description = "the network domain") + @Param(description = "The Network domain") private String networkDomain; @SerializedName(ApiConstants.PHYSICAL_NETWORK_ID) - @Param(description = "the physical network id") + @Param(description = "The physical Network id") private String physicalNetworkId; @SerializedName(ApiConstants.RESTART_REQUIRED) - @Param(description = "true network requires restart") + @Param(description = "True if Network requires restart") private Boolean restartRequired; @SerializedName(ApiConstants.SPECIFY_VLAN) - @Param(description = "true if network supports specifying vlan, false otherwise") + @Param(description = "True if network supports specifying vlan, false otherwise") private Boolean specifyVlan; @SerializedName(ApiConstants.SPECIFY_IP_RANGES) - @Param(description = "true if network supports specifying ip ranges, false otherwise") + @Param(description = "True if Network supports specifying IP ranges, false otherwise") private Boolean specifyIpRanges; @SerializedName(ApiConstants.VPC_ID) - @Param(description = "VPC the network belongs to") + @Param(description = "VPC the Network belongs to") private String vpcId; @SerializedName(ApiConstants.VPC_NAME) - @Param(description = "Name of the VPC to which this network belongs", since = "4.15") + @Param(description = "Name of the VPC to which this Network belongs", since = "4.15") private String vpcName; @SerializedName(ApiConstants.TUNGSTEN_VIRTUAL_ROUTER_UUID) - @Param(description = "Tungsten-Fabric virtual router the network belongs to") + @Param(description = "Tungsten-Fabric virtual router the Network belongs to") private String tungstenVirtualRouterUuid; @SerializedName(ApiConstants.CAN_USE_FOR_DEPLOY) - @Param(description = "list networks available for vm deployment") + @Param(description = "List Networks available for Instance deployment") private Boolean canUseForDeploy; @SerializedName(ApiConstants.IS_PERSISTENT) - @Param(description = "list networks that are 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) + @Param(description = "The list of resource tags associated with Network", responseObject = ResourceTagResponse.class) private List tags; @SerializedName(ApiConstants.DETAILS) - @Param(description = "the details of the network") + @Param(description = "The details of the Network") private Map details; @SerializedName(ApiConstants.IP6_GATEWAY) - @Param(description = "the gateway of IPv6 network") + @Param(description = "The gateway of IPv6 Network") private String ip6Gateway; @SerializedName(ApiConstants.IP6_CIDR) - @Param(description = "the cidr of IPv6 network") + @Param(description = "The CIDR of IPv6 Network") private String ip6Cidr; @SerializedName(ApiConstants.DISPLAY_NETWORK) - @Param(description = "an optional field, whether to the display the network to the end user or not.", authorized = {RoleType.Admin}) + @Param(description = "An optional field, whether to the display the Network to the end user or not.", authorized = {RoleType.Admin}) private Boolean displayNetwork; @SerializedName(ApiConstants.ACL_ID) - @Param(description = "ACL Id associated with the VPC network") + @Param(description = "ACL ID associated with the VPC Network") private String aclId; @SerializedName(ApiConstants.ACL_NAME) - @Param(description = "ACL name associated with the VPC network") + @Param(description = "ACL name associated with the VPC Network") private String aclName; @SerializedName(ApiConstants.STRECHED_L2_SUBNET) - @Param(description = "true if network can span multiple zones", since = "4.4") + @Param(description = "True if Network can span multiple zones", since = "4.4") private Boolean strechedL2Subnet; @SerializedName(ApiConstants.NETWORK_SPANNED_ZONES) - @Param(description = "If a network is enabled for 'streched l2 subnet' then represents zones on which network currently spans", since = "4.4") + @Param(description = "If a Network is enabled for 'stretched L2 subnet' then represents zones on which Network currently spans", since = "4.4") private Set networkSpannedZones; @SerializedName(ApiConstants.EXTERNAL_ID) - @Param(description = "The external id of the network", since = "4.11") + @Param(description = "The external ID of the Network", since = "4.11") private String externalId; @SerializedName(ApiConstants.REDUNDANT_ROUTER) - @Param(description = "If the network has redundant routers enabled", since = "4.11.1") + @Param(description = "If the Network has redundant routers enabled", since = "4.11.1") private Boolean redundantRouter; @SerializedName(ApiConstants.SUPPORTS_VM_AUTOSCALING) - @Param(description = "if network offering supports vm autoscaling feature", since = "4.18.0") + @Param(description = "If Network offering supports Instance autoscaling feature", since = "4.18.0") private Boolean supportsVmAutoScaling; @SerializedName(ApiConstants.RESOURCE_ICON) @@ -276,35 +276,35 @@ public class NetworkResponse extends BaseResponseWithAssociatedNetwork implement ResourceIconResponse icon; @SerializedName(ApiConstants.CREATED) - @Param(description = "the date this network was created", since = "4.16.0") + @Param(description = "The date this Network was created", since = "4.16.0") private Date created; @SerializedName(ApiConstants.RECEIVED_BYTES) - @Param(description = "the total number of network traffic bytes received") + @Param(description = "The total number of Network traffic bytes received") private Long bytesReceived; @SerializedName(ApiConstants.SENT_BYTES) - @Param(description = "the total number of network traffic bytes sent") + @Param(description = "The total number of Network traffic bytes sent") private Long bytesSent; @SerializedName((ApiConstants.EGRESS_DEFAULT_POLICY)) - @Param(description = "true if guest network default egress policy is allow; false if default egress policy is deny") + @Param(description = "True if guest Network default egress policy is allow; false if default egress policy is deny") private Boolean egressDefaultPolicy; @SerializedName(ApiConstants.INTERNET_PROTOCOL) - @Param(description = "The internet protocol of network offering") + @Param(description = "The internet protocol of Network offering") private String internetProtocol; @SerializedName(ApiConstants.IPV6_ROUTING) - @Param(description = "The Ipv6 routing type of network offering", since = "4.17.0") + @Param(description = "The IPv6 routing type of network offering", since = "4.17.0") private String ipv6Routing; @SerializedName(ApiConstants.IPV6_ROUTES) - @Param(description = "The routes for the network to ease adding route in upstream router", since = "4.17.0") + @Param(description = "The routes for the Network to ease adding route in upstream router", since = "4.17.0") private Set ipv6Routes; @SerializedName(ApiConstants.PUBLIC_MTU) - @Param(description = "MTU configured on the network VR's public facing interfaces") + @Param(description = "MTU configured on the Network VR's public facing interfaces") private Integer publicMtu; @SerializedName(ApiConstants.PRIVATE_MTU) @@ -312,11 +312,11 @@ public class NetworkResponse extends BaseResponseWithAssociatedNetwork implement private Integer privateMtu; @SerializedName(ApiConstants.IP6_DNS1) - @Param(description = "the first IPv6 DNS for the network", since = "4.18.0") + @Param(description = "The first IPv6 DNS for the network", since = "4.18.0") private String ipv6Dns1; @SerializedName(ApiConstants.IP6_DNS2) - @Param(description = "the second IPv6 DNS for the network", since = "4.18.0") + @Param(description = "The second IPv6 DNS for the network", since = "4.18.0") private String ipv6Dns2; @SerializedName(ApiConstants.IPV4_ROUTING) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/NicExtraDhcpOptionResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/NicExtraDhcpOptionResponse.java index 4af89a37d8dd..7d0007373681 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/NicExtraDhcpOptionResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/NicExtraDhcpOptionResponse.java @@ -28,23 +28,23 @@ public class NicExtraDhcpOptionResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the extra dhcp option") + @Param(description = "The ID of the extra DHCP option") private String id; @SerializedName(ApiConstants.NIC_ID) - @Param(description = "the ID of the nic") + @Param(description = "The ID of the NIC") private String nicId; @SerializedName(ApiConstants.EXTRA_DHCP_OPTION_NAME) - @Param(description = "the name of the extra DHCP option") + @Param(description = "The name of the extra DHCP option") private String codeName; @SerializedName(ApiConstants.EXTRA_DHCP_OPTION_CODE) - @Param(description = "the extra DHCP option code") + @Param(description = "The extra DHCP option code") private int code; @SerializedName(ApiConstants.EXTRA_DHCP_OPTION_VALUE) - @Param(description = "the extra DHCP option value") + @Param(description = "The extra DHCP option value") private String value; public NicExtraDhcpOptionResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/NicResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/NicResponse.java index 65e126de545f..f992514b8db2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/NicResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/NicResponse.java @@ -31,79 +31,79 @@ public class NicResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the nic") + @Param(description = "The ID of the NIC") private String id; @SerializedName(ApiConstants.NETWORK_ID) - @Param(description = "the ID of the corresponding network") + @Param(description = "The ID of the corresponding Network") private String networkId; @SerializedName(ApiConstants.NETWORK_NAME) - @Param(description = "the name of the corresponding network") + @Param(description = "The name of the corresponding Network") private String networkName; @SerializedName(ApiConstants.NETMASK) - @Param(description = "the netmask of the nic") + @Param(description = "The netmask of the NIC") private String netmask; @SerializedName(ApiConstants.GATEWAY) - @Param(description = "the gateway of the nic") + @Param(description = "The gateway of the NIC") private String gateway; @SerializedName(ApiConstants.IP_ADDRESS) - @Param(description = "the ip address of the nic") + @Param(description = "The IP address of the NIC") private String ipaddress; @SerializedName(ApiConstants.ISOLATION_URI) - @Param(description = "the isolation uri of the nic") + @Param(description = "The isolation URI of the NIC") private String isolationUri; @SerializedName(ApiConstants.BROADCAST_URI) - @Param(description = "the broadcast uri of the nic") + @Param(description = "The broadcast URI of the NIC") private String broadcastUri; @SerializedName(ApiConstants.TRAFFIC_TYPE) - @Param(description = "the traffic type of the nic") + @Param(description = "The traffic type of the NIC") private String trafficType; @SerializedName(ApiConstants.TYPE) - @Param(description = "the type of the nic") + @Param(description = "The type of the NIC") private String type; @SerializedName(ApiConstants.IS_DEFAULT) - @Param(description = "true if nic is default, false otherwise") + @Param(description = "True if NIC is default, false otherwise") private Boolean isDefault; @SerializedName(ApiConstants.MAC_ADDRESS) - @Param(description = "true if nic is default, false otherwise") + @Param(description = "True if NIC is default, false otherwise") private String macAddress; @SerializedName(ApiConstants.IP6_GATEWAY) - @Param(description = "the gateway of IPv6 network") + @Param(description = "The gateway of IPv6 Network") private String ip6Gateway; @SerializedName(ApiConstants.IP6_CIDR) - @Param(description = "the cidr of IPv6 network") + @Param(description = "The CIDR of IPv6 Network") private String ip6Cidr; @SerializedName(ApiConstants.IP6_ADDRESS) - @Param(description = "the IPv6 address of network") + @Param(description = "The IPv6 address of Network") private String ip6Address; @SerializedName(ApiConstants.SECONDARY_IP) - @Param(description = "the Secondary ipv4 addr of nic") + @Param(description = "The Secondary IPv4 addr of NIC") private List secondaryIps; @SerializedName(ApiConstants.EXTRA_DHCP_OPTION) - @Param(description = "the extra dhcp options on the nic", since = "4.11.0") + @Param(description = "The extra DHCP options on the NIC", since = "4.11.0") private List extraDhcpOptions; @SerializedName(ApiConstants.DEVICE_ID) - @Param(description = "device id for the network when plugged into the virtual machine", since = "4.4") + @Param(description = "Device ID for the Network when plugged into the Instance", since = "4.4") private String deviceId; @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) - @Param(description = "Id of the vm to which the nic belongs") + @Param(description = "Id of the Instance to which the NIC belongs") private String vmId; @SerializedName(ApiConstants.NSX_LOGICAL_SWITCH) @@ -119,11 +119,11 @@ public class NicResponse extends BaseResponse { private Integer vlanId; @SerializedName(ApiConstants.ISOLATED_PVLAN) - @Param(description = "the isolated private VLAN if available", since="4.14.0") + @Param(description = "The isolated private VLAN if available", since="4.14.0") private Integer isolatedPvlanId; @SerializedName(ApiConstants.ISOLATED_PVLAN_TYPE) - @Param(description = "the isolated private VLAN type if available", since="4.14.0") + @Param(description = "The isolated private VLAN type if available", since="4.14.0") private String isolatedPvlanType; @SerializedName(ApiConstants.ADAPTER_TYPE) @@ -131,7 +131,7 @@ public class NicResponse extends BaseResponse { private String adapterType; @SerializedName(ApiConstants.IP_ADDRESSES) - @Param(description = "IP addresses associated with NIC found for unmanaged VM", since="4.14.0") + @Param(description = "IP addresses associated with NIC found for unmanaged Instance", since="4.14.0") private List ipAddresses; @SerializedName(ApiConstants.MTU) @@ -139,11 +139,11 @@ public class NicResponse extends BaseResponse { private Integer mtu; @SerializedName(ApiConstants.PUBLIC_IP_ID) - @Param(description = "public IP address id associated with this nic via Static nat rule") + @Param(description = "Public IP address ID associated with this NIC via Static NAT rule") private String publicIpId; @SerializedName(ApiConstants.PUBLIC_IP) - @Param(description = "public IP address associated with this nic via Static nat rule") + @Param(description = "Public IP address associated with this NIC via Static NAT rule") private String publicIp; public void setVmId(String vmId) { @@ -223,11 +223,11 @@ public void setExtraDhcpOptions(List extraDhcpOption } @SerializedName(ApiConstants.VPC_ID) - @Param(description = "Id of the vpc to which the nic belongs") + @Param(description = "ID of the VPC to which the NIC belongs") private String vpcId; @SerializedName(ApiConstants.VPC_NAME) - @Param(description = "name of the vpc to which the nic belongs") + @Param(description = "Name of the VPC to which the NIC belongs") private String vpcName; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/response/NicSecondaryIpResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/NicSecondaryIpResponse.java index 467a1c9e987a..eba00da25cfe 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/NicSecondaryIpResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/NicSecondaryIpResponse.java @@ -30,11 +30,11 @@ public class NicSecondaryIpResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the secondary private IP addr") + @Param(description = "The ID of the secondary private IP addr") private String id; @SerializedName("secondaryip") - @Param(description = "the list of Secondary ipv4 addr of nic") + @Param(description = "The list of Secondary IPv4 addr of NIC") private List secondaryIpsList; @SerializedName(ApiConstants.IP_ADDRESS) @@ -42,15 +42,15 @@ public class NicSecondaryIpResponse extends BaseResponse { private String ipAddr; @SerializedName(ApiConstants.NIC_ID) - @Param(description = "the ID of the nic") + @Param(description = "The ID of the NIC") private String nicId; @SerializedName(ApiConstants.NETWORK_ID) - @Param(description = "the ID of the network") + @Param(description = "The ID of the Network") private String nwId; @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) - @Param(description = "the ID of the vm") + @Param(description = "The ID of the Instance") private String vmId; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/response/OutOfBandManagementResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/OutOfBandManagementResponse.java index 3a8f5fb55ab1..5ce75e44efa6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/OutOfBandManagementResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/OutOfBandManagementResponse.java @@ -28,47 +28,47 @@ @EntityReference(value = Host.class) public class OutOfBandManagementResponse extends BaseResponse { @SerializedName(ApiConstants.HOST_ID) - @Param(description = "the ID of the host") + @Param(description = "The ID of the host") private String id; @SerializedName(ApiConstants.POWER_STATE) - @Param(description = "the out-of-band management interface powerState of the host") + @Param(description = "The out-of-band management interface powerState of the host") private OutOfBandManagement.PowerState powerState; @SerializedName(ApiConstants.ENABLED) - @Param(description = "true if out-of-band management is enabled for the host") + @Param(description = "True if out-of-band management is enabled for the host") private Boolean enabled; @SerializedName(ApiConstants.DRIVER) - @Param(description = "the out-of-band management driver for the host") + @Param(description = "The out-of-band management driver for the host") private String driver; @SerializedName(ApiConstants.ADDRESS) - @Param(description = "the out-of-band management interface address") + @Param(description = "The out-of-band management interface address") private String ipAddress; @SerializedName(ApiConstants.PORT) - @Param(description = "the out-of-band management interface port") + @Param(description = "The out-of-band management interface port") private String port; @SerializedName(ApiConstants.USERNAME) - @Param(description = "the out-of-band management interface username") + @Param(description = "The out-of-band management interface username") private String username; @SerializedName(ApiConstants.PASSWORD) - @Param(description = "the out-of-band management interface password") + @Param(description = "The out-of-band management interface password") private String password; @SerializedName(ApiConstants.ACTION) - @Param(description = "the out-of-band management action (if issued)") + @Param(description = "The out-of-band management action (if issued)") private String outOfBandManagementAction; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the operation result description") + @Param(description = "The operation result description") private String resultDescription; @SerializedName(ApiConstants.STATUS) - @Param(description = "the operation result") + @Param(description = "The operation result") private Boolean success; public OutOfBandManagementResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/OvsProviderResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/OvsProviderResponse.java index 2b67e1618dc2..9ed7247e403e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/OvsProviderResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/OvsProviderResponse.java @@ -29,33 +29,33 @@ public class OvsProviderResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the id of the ovs") + @Param(description = "The ID of the ovs") private String id; @SerializedName(ApiConstants.NSP_ID) - @Param(description = "the physical network service provider id of the provider") + @Param(description = "The physical Network service provider id of the provider") private String nspId; @SerializedName(ApiConstants.ENABLED) @Param(description = "Enabled/Disabled the service provider") private Boolean enabled; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account associated with the provider") + @Param(description = "The Account associated with the provider") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the ipaddress") + @Param(description = "The project ID of the IP address") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the address") + @Param(description = "The project name of the address") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID associated with the provider") + @Param(description = "The domain ID associated with the provider") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain associated with the provider") + @Param(description = "The domain associated with the provider") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the domain to which the provider belongs", since = "4.19.2.0") + @Param(description = "Path of the domain to which the provider belongs", since = "4.19.2.0") private String domainPath; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/response/PhysicalNetworkResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/PhysicalNetworkResponse.java index f5116829305a..46cf233e279b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/PhysicalNetworkResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/PhysicalNetworkResponse.java @@ -32,47 +32,47 @@ public class PhysicalNetworkResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the uuid of the physical network") + @Param(description = "The UUID of the physical Network") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "name of the physical network") + @Param(description = "Name of the physical Network") private String name; @SerializedName(ApiConstants.BROADCAST_DOMAIN_RANGE) - @Param(description = "Broadcast domain range of the physical network") + @Param(description = "Broadcast domain range of the physical Network") private String broadcastDomainRange; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "zone id of the physical network") + @Param(description = "Zone ID of the physical Network") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "zone name of the physical network") + @Param(description = "Zone name of the physical Network") private String zoneName; @SerializedName(ApiConstants.STATE) - @Param(description = "state of the physical network") + @Param(description = "State of the physical Network") private String state; @SerializedName(ApiConstants.VLAN) - @Param(description = "the vlan of the physical network") + @Param(description = "The VLAN of the physical Network") private String vlan; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain id of the physical network owner") + @Param(description = "The domain ID of the physical Network owner") private String domainId; @SerializedName(ApiConstants.TAGS) - @Param(description = "comma separated tag") + @Param(description = "Comma separated tag") private String tags; @SerializedName(ApiConstants.ISOLATION_METHODS) - @Param(description = "isolation methods") + @Param(description = "Isolation methods") private String isolationMethods; @SerializedName(ApiConstants.NETWORK_SPEED) - @Param(description = "the speed of the physical network") + @Param(description = "The speed of the physical Network") private String networkSpeed; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/response/PodResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/PodResponse.java index 6a1afaecbcfc..51cad6381f73 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/PodResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/PodResponse.java @@ -30,59 +30,59 @@ @EntityReference(value = Pod.class) public class PodResponse extends BaseResponseWithAnnotations { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the Pod") + @Param(description = "The ID of the Pod") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the Pod") + @Param(description = "The name of the Pod") private String name; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the Zone ID of the Pod") + @Param(description = "The Zone ID of the Pod") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the Zone name of the Pod") + @Param(description = "The Zone name of the Pod") private String zoneName; @SerializedName(ApiConstants.GATEWAY) - @Param(description = "the gateway of the Pod") + @Param(description = "The gateway of the Pod") private String gateway; @SerializedName(ApiConstants.NETMASK) - @Param(description = "the netmask of the Pod") + @Param(description = "The netmask of the Pod") private String netmask; @SerializedName(ApiConstants.IP_RANGES) - @Param(description = "the IP ranges for the Pod", responseObject = IpRangeResponse.class, since = "4.16.0") + @Param(description = "The IP ranges for the Pod", responseObject = IpRangeResponse.class, since = "4.16.0") private List ipRanges; @Deprecated(since = "4.16") @SerializedName(ApiConstants.START_IP) - @Param(description = "the starting IP for the Pod. This parameter is deprecated, please use 'startip' from ipranges parameter.") + @Param(description = "The starting IP for the Pod. This parameter is deprecated, please use 'startip' from ipranges parameter.") private List startIp; @Deprecated(since = "4.16") @SerializedName(ApiConstants.END_IP) - @Param(description = "the ending IP for the Pod. This parameter is deprecated, please use 'endip' from ipranges parameter.") + @Param(description = "The ending IP for the Pod. This parameter is deprecated, please use 'endip' from ipranges parameter.") private List endIp; @Deprecated(since = "4.16") @SerializedName(ApiConstants.FOR_SYSTEM_VMS) - @Param(description = "indicates if range is dedicated for CPVM and SSVM. This parameter is deprecated, please use 'forsystemvms' from ipranges parameter.") + @Param(description = "Indicates if range is dedicated for CPVM and SSVM. This parameter is deprecated, please use 'forsystemvms' from ipranges parameter.") private List forSystemVms; @Deprecated(since = "4.16") @SerializedName(ApiConstants.VLAN_ID) - @Param(description = "indicates Vlan ID for the range. This parameter is deprecated, please use 'vlanid' from ipranges parameter.") + @Param(description = "Indicates VLAN ID for the range. This parameter is deprecated, please use 'vlanid' from ipranges parameter.") private List vlanId; @SerializedName(ApiConstants.ALLOCATION_STATE) - @Param(description = "the allocation state of the Pod") + @Param(description = "The allocation state of the Pod") private String allocationState; @SerializedName(ApiConstants.CAPACITY) - @Param(description = "the capacity of the Pod", responseObject = CapacityResponse.class) + @Param(description = "The capacity of the Pod", responseObject = CapacityResponse.class) private List capacities; @SerializedName(ApiConstants.STORAGE_ACCESS_GROUPS) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/PortableIpRangeResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/PortableIpRangeResponse.java index ddb2f9052d87..45316c8b642f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/PortableIpRangeResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/PortableIpRangeResponse.java @@ -32,31 +32,31 @@ public class PortableIpRangeResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "portable IP range ID") + @Param(description = "Portable IP range ID") private String id; @SerializedName(ApiConstants.REGION_ID) - @Param(description = "Region Id in which portable ip range is provisioned") + @Param(description = "Region ID in which portable IP range is provisioned") private Integer regionId; @SerializedName(ApiConstants.GATEWAY) - @Param(description = "the gateway of the VLAN IP range") + @Param(description = "The gateway of the VLAN IP range") private String gateway; @SerializedName(ApiConstants.NETMASK) - @Param(description = "the netmask of the VLAN IP range") + @Param(description = "The netmask of the VLAN IP range") private String netmask; @SerializedName(ApiConstants.VLAN) - @Param(description = "the ID or VID of the VLAN.") + @Param(description = "The ID or VID of the VLAN.") private String vlan; @SerializedName(ApiConstants.START_IP) - @Param(description = "the start ip of the portable IP range") + @Param(description = "The start IP of the portable IP range") private String startIp; @SerializedName(ApiConstants.END_IP) - @Param(description = "the end ip of the portable IP range") + @Param(description = "The end IP of the portable IP range") private String endIp; @SerializedName(ApiConstants.PORTABLE_IP_ADDRESS) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/PortableIpResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/PortableIpResponse.java index e477b1115616..98279aaa1c57 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/PortableIpResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/PortableIpResponse.java @@ -32,43 +32,43 @@ public class PortableIpResponse extends BaseResponse { @SerializedName(ApiConstants.REGION_ID) - @Param(description = "Region Id in which global load balancer is created") + @Param(description = "Region ID in which global Load balancer is created") private Integer regionId; @SerializedName(ApiConstants.IP_ADDRESS) - @Param(description = "public IP address") + @Param(description = "Public IP address") private String ipAddress; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the ID of the zone the public IP address belongs to") + @Param(description = "The ID of the zone the public IP address belongs to") private String zoneId; @SerializedName(ApiConstants.NETWORK_ID) - @Param(description = "the ID of the Network where ip belongs to") + @Param(description = "The ID of the Network where IP belongs to") private String networkId; @SerializedName(ApiConstants.VPC_ID) - @Param(description = "VPC the ip belongs to") + @Param(description = "VPC the IP belongs to") private String vpcId; @SerializedName(ApiConstants.PHYSICAL_NETWORK_ID) - @Param(description = "the physical network this belongs to") + @Param(description = "The physical Network this belongs to") private String physicalNetworkId; @SerializedName(ApiConstants.ACCOUNT_ID) - @Param(description = "the account ID the portable IP address is associated with") + @Param(description = "The Account ID the portable IP address is associated with") private String accountId; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID the portable IP address is associated with") + @Param(description = "The domain ID the portable IP address is associated with") private String domainId; @SerializedName("allocated") - @Param(description = "date the portal IP address was acquired") + @Param(description = "Date the portal IP address was acquired") private Date allocated; @SerializedName(ApiConstants.STATE) - @Param(description = "State of the ip address. Can be: Allocating, Allocated, Releasing and Free") + @Param(description = "State of the IP address. Can be: Allocating, Allocated, Releasing and Free") private String state; public void setRegionId(Integer regionId) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/PrivateGatewayResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/PrivateGatewayResponse.java index 414aed94bad3..7a6d443c14ad 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/PrivateGatewayResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/PrivateGatewayResponse.java @@ -30,35 +30,35 @@ public class PrivateGatewayResponse extends BaseResponseWithAssociatedNetwork implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the id of the private gateway") + @Param(description = "The ID of the private gateway") private String id; @SerializedName(ApiConstants.GATEWAY) - @Param(description = "the gateway") + @Param(description = "The gateway") private String gateway; @SerializedName(ApiConstants.NETMASK) - @Param(description = "the private gateway's netmask") + @Param(description = "The private gateway's netmask") private String netmask; @SerializedName(ApiConstants.IP_ADDRESS) - @Param(description = "the private gateway's ip address") + @Param(description = "The private gateway's IP address") private String address; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "zone id of the private gateway") + @Param(description = "Zone ID of the private gateway") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the name of the zone the private gateway belongs to") + @Param(description = "The name of the zone the private gateway belongs to") private String zoneName; @SerializedName(ApiConstants.VLAN) - @Param(description = "the network implementation uri for the private gateway") + @Param(description = "The Network implementation uri for the private gateway") private String broadcastUri; @SerializedName(ApiConstants.VPC_ID) - @Param(description = "VPC id the private gateway belongs to") + @Param(description = "VPC ID the private gateway belongs to") private String vpcId; @SerializedName(ApiConstants.VPC_NAME) @@ -66,31 +66,31 @@ public class PrivateGatewayResponse extends BaseResponseWithAssociatedNetwork im private String vpcName; @SerializedName(ApiConstants.PHYSICAL_NETWORK_ID) - @Param(description = "the physical network id") + @Param(description = "The physical Network id") private String physicalNetworkId; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account associated with the private gateway") + @Param(description = "The Account associated with the private gateway") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the private gateway") + @Param(description = "The project ID of the private gateway") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the private gateway") + @Param(description = "The project name of the private gateway") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the ID of the domain associated with the private gateway") + @Param(description = "The ID of the domain associated with the private gateway") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain associated with the private gateway") + @Param(description = "The domain associated with the private gateway") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the domain to which the private gateway belongs", since = "4.19.2.0") + @Param(description = "Path of the domain to which the private gateway belongs", since = "4.19.2.0") private String domainPath; @SerializedName(ApiConstants.STATE) @@ -102,7 +102,7 @@ public class PrivateGatewayResponse extends BaseResponseWithAssociatedNetwork im private Boolean sourceNat; @SerializedName(ApiConstants.ACL_ID) - @Param(description = "ACL Id set for private gateway") + @Param(description = "ACL ID set for private gateway") private String aclId; @SerializedName(ApiConstants.ACL_NAME) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ProjectAccountResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ProjectAccountResponse.java index d035622f65f1..89e0c38a48e8 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ProjectAccountResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ProjectAccountResponse.java @@ -30,19 +30,19 @@ @SuppressWarnings("unused") public class ProjectAccountResponse extends BaseResponse implements ControlledViewEntityResponse { @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "project id") + @Param(description = "Project ID") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "project name") + @Param(description = "Project name") private String projectName; @SerializedName(ApiConstants.ACCOUNT_ID) - @Param(description = "the id of the account") + @Param(description = "The ID of the Account") private String accountId; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the name of the account") + @Param(description = "The name of the Account") private String accountName; @SerializedName(ApiConstants.USERNAME) @@ -50,35 +50,35 @@ public class ProjectAccountResponse extends BaseResponse implements ControlledVi private String username; @SerializedName(ApiConstants.ACCOUNT_TYPE) - @Param(description = "account type (admin, domain-admin, user)") + @Param(description = "Account type (admin, domain-admin, user)") private Integer accountType; @SerializedName(ApiConstants.USER_ID) - @Param(description = "Id of the user") + @Param(description = "ID of the user") private String userId; @SerializedName(ApiConstants.PROJECT_ROLE_ID) - @Param(description = "Id of the project role associated with the account/user") + @Param(description = "ID of the project role associated with the Account/User") private String projectRoleId; @SerializedName(ApiConstants.ROLE) - @Param(description = "account role in the project (regular,owner)") + @Param(description = "Account role in the project (regular, owner)") private String role; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "id of the Domain the account belongs too") + @Param(description = "ID of the Domain the Account belongs too") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "name of the Domain the account belongs too") + @Param(description = "Name of the Domain the Account belongs too") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the Domain the account belongs to", since = "4.19.2.0") + @Param(description = "Path of the Domain the Account belongs to", since = "4.19.2.0") private String domainPath; @SerializedName(ApiConstants.USER) - @Param(description = "the list of users associated with account", responseObject = UserResponse.class) + @Param(description = "The list of users associated with Account", responseObject = UserResponse.class) private List users; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ProjectInvitationResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ProjectInvitationResponse.java index ad3f99f6b3ff..c99e3edf6db1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ProjectInvitationResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ProjectInvitationResponse.java @@ -28,43 +28,43 @@ @SuppressWarnings("unused") public class ProjectInvitationResponse extends BaseResponse implements ControlledViewEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the id of the invitation") + @Param(description = "The ID of the invitation") private String id; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the id of the project") + @Param(description = "The ID of the project") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the name of the project") + @Param(description = "The name of the project") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain id the project belongs to") + @Param(description = "The domain ID the project belongs to") private String domainId; @SerializedName(ApiConstants.USER_ID) - @Param(description = "the User ID") + @Param(description = "The User ID") private String userId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name where the project belongs to") + @Param(description = "The domain name where the project belongs to") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the Domain the project belongs to", since = "4.19.2.0") + @Param(description = "Path of the Domain the project belongs to", since = "4.19.2.0") private String domainPath; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account name of the project's owner") + @Param(description = "The Account name of the project's owner") private String accountName; @SerializedName(ApiConstants.EMAIL) - @Param(description = "the email the invitation was sent to") + @Param(description = "The email the invitation was sent to") private String email; @SerializedName(ApiConstants.STATE) - @Param(description = "the invitation state") + @Param(description = "The invitation state") private String invitationState; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ProjectResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ProjectResponse.java index e72f6b860369..40f9405d0fc5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ProjectResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ProjectResponse.java @@ -33,87 +33,87 @@ public class ProjectResponse extends BaseResponse implements ResourceLimitAndCountResponse, SetResourceIconResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the id of the project") + @Param(description = "The ID of the project") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the project") + @Param(description = "The name of the project") private String name; @SerializedName(ApiConstants.DISPLAY_TEXT) - @Param(description = "the displaytext of the project") + @Param(description = "The displaytext of the project") private String displaytext; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain id the project belongs to") + @Param(description = "The domain ID the project belongs to") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name where the project belongs to") + @Param(description = "The domain name where the project belongs to") private String domain; @SerializedName(ApiConstants.OWNER) - @Param(description = "the account name of the project's owners") + @Param(description = "The Account name of the project's owners") private List> owners; @SerializedName("projectaccountname") - @Param(description="the project account name of the project") + @Param(description = "The project Account name of the project") private String projectAccountName; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the project") + @Param(description = "The state of the project") private String state; @SerializedName(ApiConstants.TAGS) - @Param(description = "the list of resource tags associated with vm", responseObject = ResourceTagResponse.class) + @Param(description = "The list of resource tags associated with Instance", responseObject = ResourceTagResponse.class) private List tags = new ArrayList(); @SerializedName("networklimit") - @Param(description = "the total number of networks the project can own", since = "4.2.0") + @Param(description = "The total number of Networks the project can own", since = "4.2.0") private String networkLimit; @SerializedName("networktotal") - @Param(description = "the total number of networks owned by project", since = "4.2.0") + @Param(description = "The total number of Networks owned by project", since = "4.2.0") private Long networkTotal; @SerializedName("networkavailable") - @Param(description = "the total number of networks available to be created for this project", since = "4.2.0") + @Param(description = "The total number of Networks available to be created for this project", since = "4.2.0") private String networkAvailable; @SerializedName("vpclimit") - @Param(description = "the total number of vpcs the project can own", since = "4.2.0") + @Param(description = "The total number of VPCs the project can own", since = "4.2.0") private String vpcLimit; @SerializedName("vpctotal") - @Param(description = "the total number of vpcs owned by project", since = "4.2.0") + @Param(description = "The total number of VPCs owned by project", since = "4.2.0") private Long vpcTotal; @SerializedName("vpcavailable") - @Param(description = "the total number of vpcs available to be created for this project", since = "4.2.0") + @Param(description = "The total number of VPCs available to be created for this project", since = "4.2.0") private String vpcAvailable; @SerializedName("cpulimit") - @Param(description = "the total number of cpu cores the project can own", since = "4.2.0") + @Param(description = "The total number of CPU cores the project can own", since = "4.2.0") private String cpuLimit; @SerializedName("cputotal") - @Param(description = "the total number of cpu cores owned by project", since = "4.2.0") + @Param(description = "The total number of CPU cores owned by project", since = "4.2.0") private Long cpuTotal; @SerializedName("cpuavailable") - @Param(description = "the total number of cpu cores available to be created for this project", since = "4.2.0") + @Param(description = "The total number of CPU cores available to be created for this project", since = "4.2.0") private String cpuAvailable; @SerializedName("memorylimit") - @Param(description = "the total memory (in MB) the project can own", since = "4.2.0") + @Param(description = "The total memory (in MB) the project can own", since = "4.2.0") private String memoryLimit; @SerializedName("memorytotal") - @Param(description = "the total memory (in MB) owned by project", since = "4.2.0") + @Param(description = "The total memory (in MB) owned by project", since = "4.2.0") private Long memoryTotal; @SerializedName("memoryavailable") - @Param(description = "the total memory (in MB) available to be created for this project", since = "4.2.0") + @Param(description = "The total memory (in MB) available to be created for this project", since = "4.2.0") private String memoryAvailable; @SerializedName("gpulimit") @@ -129,27 +129,27 @@ public class ProjectResponse extends BaseResponse implements ResourceLimitAndCou private String gpuAvailable; @SerializedName("primarystoragelimit") - @Param(description = "the total primary storage space (in GiB) the project can own", since = "4.2.0") + @Param(description = "The total primary storage space (in GiB) the project can own", since = "4.2.0") private String primaryStorageLimit; @SerializedName("primarystoragetotal") - @Param(description = "the total primary storage space (in GiB) owned by project", since = "4.2.0") + @Param(description = "The total primary storage space (in GiB) owned by project", since = "4.2.0") private Long primaryStorageTotal; @SerializedName("primarystorageavailable") - @Param(description = "the total primary storage space (in GiB) available to be used for this project", since = "4.2.0") + @Param(description = "The total primary storage space (in GiB) available to be used for this project", since = "4.2.0") private String primaryStorageAvailable; @SerializedName("secondarystoragelimit") - @Param(description = "the total secondary storage space (in GiB) the project can own", since = "4.2.0") + @Param(description = "The total secondary storage space (in GiB) the project can own", since = "4.2.0") private String secondaryStorageLimit; @SerializedName("secondarystoragetotal") - @Param(description = "the total secondary storage space (in GiB) owned by project", since = "4.2.0") + @Param(description = "The total secondary storage space (in GiB) owned by project", since = "4.2.0") private float secondaryStorageTotal; @SerializedName("secondarystorageavailable") - @Param(description = "the total secondary storage space (in GiB) available to be used for this project", since = "4.2.0") + @Param(description = "The total secondary storage space (in GiB) available to be used for this project", since = "4.2.0") private String secondaryStorageAvailable; @SerializedName(ApiConstants.BUCKET_LIMIT) @@ -177,51 +177,51 @@ public class ProjectResponse extends BaseResponse implements ResourceLimitAndCou private String objectStorageAvailable; @SerializedName(ApiConstants.VM_LIMIT) - @Param(description = "the total number of virtual machines that can be deployed by this project", since = "4.2.0") + @Param(description = "The total number of Instances that can be deployed by this project", since = "4.2.0") private String vmLimit; @SerializedName(ApiConstants.VM_TOTAL) - @Param(description = "the total number of virtual machines deployed by this project", since = "4.2.0") + @Param(description = "The total number of Instances deployed by this project", since = "4.2.0") private Long vmTotal; @SerializedName(ApiConstants.VM_AVAILABLE) - @Param(description = "the total number of virtual machines available for this project to acquire", since = "4.2.0") + @Param(description = "The total number of Instances available for this project to acquire", since = "4.2.0") private String vmAvailable; @SerializedName(ApiConstants.IP_LIMIT) - @Param(description = "the total number of public ip addresses this project can acquire", since = "4.2.0") + @Param(description = "The total number of public IP addresses this project can acquire", since = "4.2.0") private String ipLimit; @SerializedName(ApiConstants.IP_TOTAL) - @Param(description = "the total number of public ip addresses allocated for this project", since = "4.2.0") + @Param(description = "The total number of public IP addresses allocated for this project", since = "4.2.0") private Long ipTotal; @SerializedName(ApiConstants.IP_AVAILABLE) - @Param(description = "the total number of public ip addresses available for this project to acquire", since = "4.2.0") + @Param(description = "The total number of public IP addresses available for this project to acquire", since = "4.2.0") private String ipAvailable; @SerializedName("volumelimit") - @Param(description = "the total volume which can be used by this project", since = "4.2.0") + @Param(description = "The total volume which can be used by this project", since = "4.2.0") private String volumeLimit; @SerializedName("volumetotal") - @Param(description = "the total volume being used by this project", since = "4.2.0") + @Param(description = "The total volume being used by this project", since = "4.2.0") private Long volumeTotal; @SerializedName("volumeavailable") - @Param(description = "the total volume available for this project", since = "4.2.0") + @Param(description = "The total volume available for this project", since = "4.2.0") private String volumeAvailable; @SerializedName("snapshotlimit") - @Param(description = "the total number of snapshots which can be stored by this project", since = "4.2.0") + @Param(description = "The total number of Snapshots which can be stored by this project", since = "4.2.0") private String snapshotLimit; @SerializedName("snapshottotal") - @Param(description = "the total number of snapshots stored by this project", since = "4.2.0") + @Param(description = "The total number of Snapshots stored by this project", since = "4.2.0") private Long snapshotTotal; @SerializedName("snapshotavailable") - @Param(description = "the total number of snapshots available for this project", since = "4.2.0") + @Param(description = "The total number of Snapshots available for this project", since = "4.2.0") private String snapshotAvailable; @SerializedName(ApiConstants.BACKUP_LIMIT) @@ -249,23 +249,23 @@ public class ProjectResponse extends BaseResponse implements ResourceLimitAndCou private String backupStorageAvailable; @SerializedName("templatelimit") - @Param(description = "the total number of templates which can be created by this project", since = "4.2.0") + @Param(description = "The total number of Templates which can be created by this project", since = "4.2.0") private String templateLimit; @SerializedName("templatetotal") - @Param(description = "the total number of templates which have been created by this project", since = "4.2.0") + @Param(description = "The total number of Templates which have been created by this project", since = "4.2.0") private Long templateTotal; @SerializedName("templateavailable") - @Param(description = "the total number of templates available to be created by this project", since = "4.2.0") + @Param(description = "The total number of Templates available to be created by this project", since = "4.2.0") private String templateAvailable; @SerializedName("vmstopped") - @Param(description = "the total number of virtual machines stopped for this project", since = "4.2.0") + @Param(description = "The total number of Instances stopped for this project", since = "4.2.0") private Integer vmStopped; @SerializedName("vmrunning") - @Param(description = "the total number of virtual machines running for this project", since = "4.2.0") + @Param(description = "The total number of Instances running for this project", since = "4.2.0") private Integer vmRunning; @SerializedName(ApiConstants.RESOURCE_ICON) @@ -273,7 +273,7 @@ public class ProjectResponse extends BaseResponse implements ResourceLimitAndCou ResourceIconResponse icon; @SerializedName(ApiConstants.CREATED) - @Param(description = "the date this project was created", since = "4.16.0") + @Param(description = "The date this project was created", since = "4.16.0") private Date created; @SerializedName(ApiConstants.TAGGED_RESOURCES) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ProjectRolePermissionResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ProjectRolePermissionResponse.java index 91b2036d3e61..55abd80c59b4 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ProjectRolePermissionResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ProjectRolePermissionResponse.java @@ -27,19 +27,19 @@ @EntityReference(value = ProjectRolePermission.class) public class ProjectRolePermissionResponse extends BaseRolePermissionResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the project role permission") + @Param(description = "The ID of the project role permission") private String id; @SerializedName(ApiConstants.PROJECT_ROLE_ID) - @Param(description = "the ID of the project role to which the role permission belongs") + @Param(description = "The ID of the project role to which the role permission belongs") private String projectRoleId; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the ID of the project") + @Param(description = "The ID of the project") private String projectId; @SerializedName(ApiConstants.PROJECT_ROLE_NAME) - @Param(description = "the name of the project role to which the role permission belongs") + @Param(description = "The name of the project role to which the role permission belongs") private String projectRoleName; public String getId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ProjectRoleResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ProjectRoleResponse.java index 230329f0ee13..05df8d635ae6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ProjectRoleResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ProjectRoleResponse.java @@ -27,7 +27,7 @@ @EntityReference(value = ProjectRole.class) public class ProjectRoleResponse extends BaseRoleResponse { @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the id of the project") + @Param(description = "The ID of the project") private String projectId; public String getProjectId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ProviderResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ProviderResponse.java index 4d410837476e..7f08ee88a7df 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ProviderResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ProviderResponse.java @@ -31,31 +31,31 @@ public class ProviderResponse extends BaseResponse { @SerializedName(ApiConstants.NAME) - @Param(description = "the provider name") + @Param(description = "The provider name") private String name; @SerializedName(ApiConstants.PHYSICAL_NETWORK_ID) - @Param(description = "the physical network this belongs to") + @Param(description = "The physical Network this belongs to") private String physicalNetworkId; @SerializedName(ApiConstants.DEST_PHYSICAL_NETWORK_ID) - @Param(description = "the destination physical network") + @Param(description = "The destination physical Network") private String destinationPhysicalNetworkId; @SerializedName(ApiConstants.STATE) - @Param(description = "state of the network provider") + @Param(description = "State of the Network provider") private String state; @SerializedName(ApiConstants.ID) - @Param(description = "uuid of the network provider") + @Param(description = "UUID of the Network provider") private String id; @SerializedName(ApiConstants.SERVICE_LIST) - @Param(description = "services for this provider") + @Param(description = "Services for this provider") private List services; @SerializedName(ApiConstants.CAN_ENABLE_INDIVIDUAL_SERVICE) - @Param(description = "true if individual services can be enabled/disabled") + @Param(description = "True if individual services can be enabled/disabled") private Boolean canEnableIndividualServices; public void setName(String name) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/RegionResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/RegionResponse.java index 6c74fa623ce0..785bd1f6c238 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/RegionResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/RegionResponse.java @@ -28,23 +28,23 @@ @EntityReference(value = Region.class) public class RegionResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the region") + @Param(description = "The ID of the region") private Integer id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the region") + @Param(description = "The name of the region") private String name; @SerializedName(ApiConstants.END_POINT) - @Param(description = "the end point of the region") + @Param(description = "The end point of the region") private String endPoint; @SerializedName("gslbserviceenabled") - @Param(description = "true if GSLB service is enabled in the region, false otherwise") + @Param(description = "True if GSLB service is enabled in the region, false otherwise") private boolean gslbServiceEnabled; @SerializedName("portableipserviceenabled") - @Param(description = "true if security groups support is enabled, false otherwise") + @Param(description = "True if security groups support is enabled, false otherwise") private boolean portableipServiceEnabled; public Integer getId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/RegisterResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/RegisterUserKeyResponse.java similarity index 87% rename from api/src/main/java/org/apache/cloudstack/api/response/RegisterResponse.java rename to api/src/main/java/org/apache/cloudstack/api/response/RegisterUserKeyResponse.java index dd17cc5cc8af..4a5fb6b222e6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/RegisterResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/RegisterUserKeyResponse.java @@ -23,17 +23,17 @@ import com.cloud.serializer.Param; -public class RegisterResponse extends BaseResponse { +public class RegisterUserKeyResponse extends BaseResponse { @SerializedName(ApiConstants.API_KEY) - @Param(description = "the api key of the registered user", isSensitive = true) + @Param(description = "The API key of the registered user", isSensitive = true) private String apiKey; @SerializedName(ApiConstants.SECRET_KEY) - @Param(description = "the secret key of the registered user", isSensitive = true) + @Param(description = "The secret key of the registered user", isSensitive = true) private String secretKey; @SerializedName(ApiConstants.API_KEY_ACCESS) - @Param(description = "whether api key access is allowed or not", isSensitive = true) + @Param(description = "Whether API key access is allowed or not", isSensitive = true) private Boolean apiKeyAccess; public String getApiKey() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/RemoteAccessVpnResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/RemoteAccessVpnResponse.java index 54164e3ac34a..9fe5052b39d9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/RemoteAccessVpnResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/RemoteAccessVpnResponse.java @@ -30,55 +30,55 @@ public class RemoteAccessVpnResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.PUBLIC_IP_ID) - @Param(description = "the public ip address of the vpn server") + @Param(description = "The public IP address of the VPN server") private String publicIpId; @SerializedName(ApiConstants.PUBLIC_IP) - @Param(description = "the public ip address of the vpn server") + @Param(description = "The public IP address of the VPN server") private String publicIp; @SerializedName("iprange") - @Param(description = "the range of ips to allocate to the clients") + @Param(description = "The range of IPs to allocate to the clients") private String ipRange; @SerializedName("presharedkey") - @Param(description = "the ipsec preshared key", isSensitive = true) + @Param(description = "The IPSec preshared key", isSensitive = true) private String presharedKey; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account of the remote access vpn") + @Param(description = "The Account of the remote access VPN") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the vpn") + @Param(description = "The project ID of the VPN") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the vpn") + @Param(description = "The project name of the VPN") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain id of the account of the remote access vpn") + @Param(description = "The domain ID of the Account of the remote access VPN") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the account of the remote access vpn") + @Param(description = "The domain name of the Account of the remote access VPN") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the domain to which the remote access vpn belongs", since = "4.19.2.0") + @Param(description = "Path of the domain to which the remote access VPN belongs", since = "4.19.2.0") private String domainPath; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the rule") + @Param(description = "The state of the rule") private String state; @SerializedName(ApiConstants.ID) - @Param(description = "the id of the remote access vpn") + @Param(description = "The ID of the remote access VPN") private String id; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is vpn for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is VPN for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; public void setPublicIp(String publicIp) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ResourceCountResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ResourceCountResponse.java index 74511a0f7430..d44e6c8fef5d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ResourceCountResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ResourceCountResponse.java @@ -26,35 +26,35 @@ @SuppressWarnings("unused") public class ResourceCountResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account for which resource count's are updated") + @Param(description = "The Account for which resource count's are updated") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id for which resource count's are updated") + @Param(description = "The project ID for which resource count's are updated") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name for which resource count's are updated") + @Param(description = "The project name for which resource count's are updated") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID for which resource count's are updated") + @Param(description = "The domain ID for which resource count's are updated") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name for which resource count's are updated") + @Param(description = "The domain name for which resource count's are updated") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the domain to which the resource counts are updated", since = "4.19.2.0") + @Param(description = "Path of the domain to which the resource counts are updated", since = "4.19.2.0") private String domainPath; @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.") + @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(ApiConstants.RESOURCE_TYPE_NAME) - @Param(description = "resource type name. Values include user_vm, public_ip, volume, snapshot, template, project, network, vpc, cpu, memory, primary_storage, secondary_storage.") + @Param(description = "Resource type name. Values include user_vm, public_ip, volume, Snapshot, Template, project, Network, VPC, CPU, memory, primary_storage, secondary_storage.") private String resourceTypeName; @SerializedName(ApiConstants.RESOURCE_COUNT) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ResourceDetailResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ResourceDetailResponse.java index 3ebb9c737ec4..bf5031a03ea4 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ResourceDetailResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ResourceDetailResponse.java @@ -34,15 +34,15 @@ public class ResourceDetailResponse extends BaseResponse { private String resourceType; @SerializedName(ApiConstants.KEY) - @Param(description = "key of the resource detail") + @Param(description = "Key of the resource detail") private String name; @SerializedName(ApiConstants.VALUE) - @Param(description = "value of the resource detail") + @Param(description = "Value of the resource detail") private String value; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "if detail is returned to the regular user", since = "4.3") + @Param(description = "If detail is returned to the regular user", since = "4.3") private boolean forDisplay; public String getResourceId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ResourceIconResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ResourceIconResponse.java index 403a91c88945..1b2055483887 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ResourceIconResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ResourceIconResponse.java @@ -24,15 +24,15 @@ public class ResourceIconResponse extends BaseResponse { @SerializedName(ApiConstants.RESOURCE_TYPE) - @Param(description = "resource type") + @Param(description = "Resource type") private ResourceTag.ResourceObjectType resourceType; @SerializedName(ApiConstants.RESOURCE_ID) - @Param(description = "id of the resource") + @Param(description = "ID of the resource") private String resourceId; @SerializedName(ApiConstants.BASE64_IMAGE) - @Param(description = "base64 representation of resource icon") + @Param(description = "Base64 representation of resource icon") private String image; public ResourceTag.ResourceObjectType getResourceType() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ResourceLimitResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ResourceLimitResponse.java index b5b03873f3f1..7b4a23444e5e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ResourceLimitResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ResourceLimitResponse.java @@ -29,39 +29,39 @@ @SuppressWarnings("unused") public class ResourceLimitResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account of the resource limit") + @Param(description = "The Account of the resource limit") private String accountName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID of the resource limit") + @Param(description = "The domain ID of the resource limit") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the resource limit") + @Param(description = "The domain name of the resource limit") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the domain to which the resource limit belongs", since = "4.19.2.0") + @Param(description = "Path of the domain to which the resource limit belongs", since = "4.19.2.0") private String domainPath; @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.") + @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(ApiConstants.RESOURCE_TYPE_NAME) - @Param(description = "resource type name. Values include user_vm, public_ip, volume, snapshot, template, project, network, vpc, cpu, memory, primary_storage, secondary_storage.") + @Param(description = "Resource type name. Values include user_vm, public_ip, volume, Snapshot, Template, project, Network, VPC, CPU, memory, primary_storage, secondary_storage.") private String resourceTypeName; @SerializedName("max") - @Param(description = "the maximum number of the resource. A -1 means the resource currently has no limit.") + @Param(description = "The maximum number of the resource. A -1 means the resource currently has no limit.") private Long max; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the resource limit") + @Param(description = "The project ID of the resource limit") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the resource limit") + @Param(description = "The project name of the resource limit") private String projectName; @SerializedName(ApiConstants.TAG) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ResourceTagResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ResourceTagResponse.java index 26e4d19cdba7..af90d68dd66c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ResourceTagResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ResourceTagResponse.java @@ -26,47 +26,47 @@ @SuppressWarnings("unused") public class ResourceTagResponse extends BaseResponse implements ControlledViewEntityResponse { @SerializedName(ApiConstants.KEY) - @Param(description = "tag key name") + @Param(description = "Tag key name") private String key; @SerializedName(ApiConstants.VALUE) - @Param(description = "tag value") + @Param(description = "Tag value") private String value; @SerializedName(ApiConstants.RESOURCE_TYPE) - @Param(description = "resource type") + @Param(description = "Resource type") private String resourceType; @SerializedName(ApiConstants.RESOURCE_ID) - @Param(description = "id of the resource") + @Param(description = "ID of the resource") private String resourceId; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account associated with the tag") + @Param(description = "The Account associated with the tag") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id the tag belongs to") + @Param(description = "The project ID the tag belongs to") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name where tag belongs to") + @Param(description = "The project name where tag belongs to") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the ID of the domain associated with the tag") + @Param(description = "The ID of the domain associated with the tag") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain associated with the tag") + @Param(description = "The domain associated with the tag") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the Domain associated with the tag", since = "4.19.2.0") + @Param(description = "Path of the Domain associated with the tag", since = "4.19.2.0") private String domainPath; @SerializedName(ApiConstants.CUSTOMER) - @Param(description = "customer associated with the tag") + @Param(description = "Customer associated with the tag") private String customer; public void setKey(String key) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/RolePermissionResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/RolePermissionResponse.java index 7bff8764cbe7..6b47cae45734 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/RolePermissionResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/RolePermissionResponse.java @@ -27,15 +27,15 @@ @EntityReference(value = RolePermission.class) public class RolePermissionResponse extends BaseRolePermissionResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the role permission") + @Param(description = "The ID of the role permission") private String id; @SerializedName(ApiConstants.ROLE_ID) - @Param(description = "the ID of the role to which the role permission belongs") + @Param(description = "The ID of the role to which the role permission belongs") private String roleId; @SerializedName(ApiConstants.ROLE_NAME) - @Param(description = "the name of the role to which the role permission belongs") + @Param(description = "The name of the role to which the role permission belongs") private String roleName; public String getId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/RoleResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/RoleResponse.java index 92e3b46139f3..b394e83dca53 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/RoleResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/RoleResponse.java @@ -29,11 +29,11 @@ public class RoleResponse extends BaseRoleResponse { @SerializedName(ApiConstants.TYPE) - @Param(description = "the type of the role") + @Param(description = "The type of the role") private String roleType; @SerializedName(ApiConstants.IS_DEFAULT) - @Param(description = "true if role is default, false otherwise") + @Param(description = "True if role is default, false otherwise") private Boolean isDefault; @SerializedName(ApiConstants.STATE) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/RollingMaintenanceHostSkippedResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/RollingMaintenanceHostSkippedResponse.java index 8d304543fb97..0071498f4270 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/RollingMaintenanceHostSkippedResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/RollingMaintenanceHostSkippedResponse.java @@ -24,15 +24,15 @@ public class RollingMaintenanceHostSkippedResponse extends BaseResponse { @SerializedName(ApiConstants.HOST_ID) - @Param(description = "the ID of the skipped host") + @Param(description = "The ID of the skipped host") private String hostId; @SerializedName(ApiConstants.HOST_NAME) - @Param(description = "the name of the skipped host") + @Param(description = "The name of the skipped host") private String hostName; @SerializedName(ApiConstants.ACL_REASON) - @Param(description = "the reason to skip the host") + @Param(description = "The reason to skip the host") private String reason; public String getHostId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/RollingMaintenanceHostUpdatedResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/RollingMaintenanceHostUpdatedResponse.java index 821257d4e076..a1670831af23 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/RollingMaintenanceHostUpdatedResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/RollingMaintenanceHostUpdatedResponse.java @@ -24,23 +24,23 @@ public class RollingMaintenanceHostUpdatedResponse extends BaseResponse { @SerializedName(ApiConstants.HOST_ID) - @Param(description = "the ID of the updated host") + @Param(description = "The ID of the updated host") private String hostId; @SerializedName(ApiConstants.HOST_NAME) - @Param(description = "the name of the updated host") + @Param(description = "The name of the updated host") private String hostName; @SerializedName(ApiConstants.START_DATE) - @Param(description = "start date of the update on the host") + @Param(description = "Start date of the update on the host") private String startDate; @SerializedName(ApiConstants.END_DATE) - @Param(description = "end date of the update on the host") + @Param(description = "End date of the update on the host") private String endDate; @SerializedName(ApiConstants.OUTPUT) - @Param(description = "output of the maintenance script on the host") + @Param(description = "Output of the maintenance script on the host") private String output; public String getHostId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/RollingMaintenanceResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/RollingMaintenanceResponse.java index 89b838c2843f..56427d7eaca9 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/RollingMaintenanceResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/RollingMaintenanceResponse.java @@ -25,19 +25,19 @@ public class RollingMaintenanceResponse extends BaseResponse { @SerializedName("success") - @Param(description = "indicates if the rolling maintenance operation was successful") + @Param(description = "Indicates if the rolling maintenance operation was successful") private Boolean success; @SerializedName("details") - @Param(description = "in case of failure, details are displayed") + @Param(description = "In case of failure, details are displayed") private String details; @SerializedName("hostsupdated") - @Param(description = "the hosts updated", responseObject = RollingMaintenanceHostUpdatedResponse.class) + @Param(description = "The hosts updated", responseObject = RollingMaintenanceHostUpdatedResponse.class) private List updatedHosts; @SerializedName("hostsskipped") - @Param(description = "the hosts skipped", responseObject = RollingMaintenanceHostSkippedResponse.class) + @Param(description = "The hosts skipped", responseObject = RollingMaintenanceHostSkippedResponse.class) private List skippedHosts; public RollingMaintenanceResponse(Boolean success, String details) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/RouterHealthCheckResultResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/RouterHealthCheckResultResponse.java index 96364d0190c2..9716c564634e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/RouterHealthCheckResultResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/RouterHealthCheckResultResponse.java @@ -28,15 +28,15 @@ public class RouterHealthCheckResultResponse extends BaseResponse { @SerializedName(ApiConstants.ROUTER_CHECK_NAME) - @Param(description = "the name of the health check on the router") + @Param(description = "The name of the health check on the router") private String checkName; @SerializedName(ApiConstants.ROUTER_CHECK_TYPE) - @Param(description = "the type of the health check - basic or advanced") + @Param(description = "The type of the health check - basic or advanced") private String checkType; @SerializedName(ApiConstants.SUCCESS) - @Param(description = "result of the health check if available") + @Param(description = "The result of the health check if available") private boolean result; @SerializedName(ApiConstants.STATUS) @@ -44,11 +44,11 @@ public class RouterHealthCheckResultResponse extends BaseResponse { private RouterHealthStatus state; @SerializedName(ApiConstants.LAST_UPDATED) - @Param(description = "the date this VPC was created") + @Param(description = "The date this VPC was created") private Date lastUpdated; @SerializedName(ApiConstants.DETAILS) - @Param(description = "detailed response generated on running health check") + @Param(description = "Detailed response generated on running health check") private String details; public String getCheckName() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/RouterHealthCheckResultsListResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/RouterHealthCheckResultsListResponse.java index e56f70d2c59c..0d2d6cf88825 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/RouterHealthCheckResultsListResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/RouterHealthCheckResultsListResponse.java @@ -27,11 +27,11 @@ public class RouterHealthCheckResultsListResponse extends BaseResponse { @SerializedName(ApiConstants.ROUTER_ID) - @Param(description = "the id of the router") + @Param(description = "The ID of the router") private String routerId; @SerializedName(ApiConstants.ROUTER_HEALTH_CHECKS) - @Param(description = "the id of the router") + @Param(description = "The ID of the router") private List healthChecks; public String getRouterId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/RunDiagnosticsResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/RunDiagnosticsResponse.java index 4c8a923613ab..0583020c7da8 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/RunDiagnosticsResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/RunDiagnosticsResponse.java @@ -29,15 +29,15 @@ @EntityReference(value = VirtualMachine.class) public class RunDiagnosticsResponse extends BaseResponse { @SerializedName(ApiConstants.STDOUT) - @Param(description = "the standard output from the command execution") + @Param(description = "The standard output from the command execution") private String stdout; @SerializedName(ApiConstants.STDERR) - @Param(description = "the standard error output from the command execution") + @Param(description = "The standard error output from the command execution") private String stderr; @SerializedName(ApiConstants.EXITCODE) - @Param(description = "the command execution return code") + @Param(description = "The command execution return code") private String exitCode; public String getStdout() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/SSHKeyPairResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/SSHKeyPairResponse.java index 65e5c5b74131..a2b9788f9f04 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/SSHKeyPairResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/SSHKeyPairResponse.java @@ -30,28 +30,28 @@ public class SSHKeyPairResponse extends BaseResponseWithAnnotations { @SerializedName(ApiConstants.ID) - @Param(description = "ID of the ssh keypair") + @Param(description = "ID of the SSH keypair") private String id; @SerializedName(ApiConstants.NAME) @Param(description = "Name of the keypair") private String name; - @SerializedName(ApiConstants.ACCOUNT) @Param(description="the owner of the keypair") + @SerializedName(ApiConstants.ACCOUNT) @Param(description = "The owner of the keypair") private String accountName; - @SerializedName(ApiConstants.DOMAIN_ID) @Param(description="the domain id of the keypair owner") + @SerializedName(ApiConstants.DOMAIN_ID) @Param(description = "The domain id of the keypair owner") private String domainId; - @SerializedName(ApiConstants.DOMAIN) @Param(description="the domain name of the keypair owner") + @SerializedName(ApiConstants.DOMAIN) @Param(description = "The domain name of the keypair owner") private String domain; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the keypair owner") + @Param(description = "The project id of the keypair owner") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the keypair owner") + @Param(description = "The project name of the keypair owner") private String projectName; @SerializedName("fingerprint") diff --git a/api/src/main/java/org/apache/cloudstack/api/response/SecurityGroupResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/SecurityGroupResponse.java index de486b5a3746..2085e6089737 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/SecurityGroupResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/SecurityGroupResponse.java @@ -32,35 +32,35 @@ public class SecurityGroupResponse extends BaseResponse implements ControlledViewEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the security group") + @Param(description = "The ID of the security group") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the security group") + @Param(description = "The name of the security group") private String name; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the description of the security group") + @Param(description = "The description of the security group") private String description; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account owning the security group") + @Param(description = "The Account owning the security group") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the group") + @Param(description = "The project id of the group") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the group") + @Param(description = "The project name of the group") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID of the security group") + @Param(description = "The domain ID of the security group") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the security group") + @Param(description = "The domain name of the security group") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -68,23 +68,23 @@ public class SecurityGroupResponse extends BaseResponse implements ControlledVie private String domainPath; @SerializedName("ingressrule") - @Param(description = "the list of ingress rules associated with the security group", responseObject = SecurityGroupRuleResponse.class) + @Param(description = "The list of ingress rules associated with the security group", responseObject = SecurityGroupRuleResponse.class) private Set ingressRules; @SerializedName("egressrule") - @Param(description = "the list of egress rules associated with the security group", responseObject = SecurityGroupRuleResponse.class) + @Param(description = "The list of egress rules associated with the security group", responseObject = SecurityGroupRuleResponse.class) private Set egressRules; @SerializedName(ApiConstants.TAGS) - @Param(description = "the list of resource tags associated with the rule", responseObject = ResourceTagResponse.class) + @Param(description = "The list of resource tags associated with the rule", responseObject = ResourceTagResponse.class) private Set tags; @SerializedName(ApiConstants.VIRTUAL_MACHINE_COUNT) - @Param(description = "the number of virtualmachines associated with this securitygroup", since = "4.6.0") + @Param(description = "The number of Instances associated with this Security Group", since = "4.6.0") private Integer virtualMachineCount; @SerializedName(ApiConstants.VIRTUAL_MACHINE_IDS) - @Param(description = "the list of virtualmachine ids associated with this securitygroup", since = "4.6.0") + @Param(description = "The list of Instance IDs associated with this Security Group", since = "4.6.0") private Set virtualMachineIds; public SecurityGroupResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/SecurityGroupRuleResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/SecurityGroupRuleResponse.java index 9e553aa32ccb..734fa50acb16 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/SecurityGroupRuleResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/SecurityGroupRuleResponse.java @@ -30,43 +30,43 @@ @EntityReference(value = SecurityRule.class) public class SecurityGroupRuleResponse extends BaseResponse { @SerializedName("ruleid") - @Param(description = "the id of the security group rule") + @Param(description = "The ID of the security group rule") private String ruleId; @SerializedName("protocol") - @Param(description = "the protocol of the security group rule") + @Param(description = "The protocol of the security group rule") private String protocol; @SerializedName(ApiConstants.ICMP_TYPE) - @Param(description = "the type of the ICMP message response") + @Param(description = "The type of the ICMP message response") private Integer icmpType; @SerializedName(ApiConstants.ICMP_CODE) - @Param(description = "the code for the ICMP message response") + @Param(description = "The code for the ICMP message response") private Integer icmpCode; @SerializedName(ApiConstants.START_PORT) - @Param(description = "the starting IP of the security group rule") + @Param(description = "The starting IP of the security group rule") private Integer startPort; @SerializedName(ApiConstants.END_PORT) - @Param(description = "the ending IP of the security group rule ") + @Param(description = "The ending IP of the security group rule ") private Integer endPort; @SerializedName(ApiConstants.SECURITY_GROUP_NAME) - @Param(description = "security group name") + @Param(description = "Security group name") private String securityGroupName; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "account owning the security group rule") + @Param(description = "Account owning the security group rule") private String accountName; @SerializedName(ApiConstants.CIDR) - @Param(description = "the CIDR notation for the base IP address of the security group rule") + @Param(description = "The CIDR notation for the base IP address of the security group rule") private String cidr; @SerializedName(ApiConstants.TAGS) - @Param(description = "the list of resource tags associated with the rule", responseObject = ResourceTagResponse.class) + @Param(description = "The list of resource tags associated with the rule", responseObject = ResourceTagResponse.class) private java.util.Set tags; public String getRuleId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ServiceOfferingResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ServiceOfferingResponse.java index 69f80b54010e..99c50829f048 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ServiceOfferingResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ServiceOfferingResponse.java @@ -30,178 +30,178 @@ @EntityReference(value = ServiceOffering.class) public class ServiceOfferingResponse extends BaseResponseWithAnnotations { @SerializedName("id") - @Param(description = "the id of the service offering") + @Param(description = "The ID of the service offering") private String id; @SerializedName("name") - @Param(description = "the name of the service offering") + @Param(description = "The name of the service offering") private String name; @SerializedName("state") - @Param(description = "state of the service offering") + @Param(description = "State of the service offering") private String state; @SerializedName("displaytext") - @Param(description = "an alternate display text of the service offering.") + @Param(description = "An alternate display text of the service offering.") private String displayText; @SerializedName("cpunumber") - @Param(description = "the number of CPU") + @Param(description = "The number of CPU") private Integer cpuNumber; @SerializedName("cpuspeed") - @Param(description = "the clock rate CPU speed in Mhz") + @Param(description = "The clock rate CPU speed in Mhz") private Integer cpuSpeed; @SerializedName("memory") - @Param(description = "the memory in MB") + @Param(description = "The memory in MB") private Integer memory; @SerializedName("created") - @Param(description = "the date this service offering was created") + @Param(description = "The date this service offering was created") private Date created; @SerializedName("storagetype") - @Param(description = "the storage type for this service offering") + @Param(description = "The storage type for this service offering") private String storageType; - @SerializedName("provisioningtype") @Param(description="provisioning type used to create volumes. Valid values are thin, sparse, fat.", since = "4.4.0") + @SerializedName("provisioningtype") @Param(description = "Provisioning type used to create volumes. Valid values are thin, sparse, fat.", since = "4.4.0") private String provisioningType; @SerializedName("offerha") - @Param(description = "the ha support in the service offering") + @Param(description = "The HA support in the service offering") private Boolean offerHa; @SerializedName("limitcpuuse") - @Param(description = "restrict the CPU usage to committed service offering") + @Param(description = "Restrict the CPU usage to committed service offering") private Boolean limitCpuUse; @SerializedName("isvolatile") - @Param(description = "true if the vm needs to be volatile, i.e., on every reboot of vm from API root disk is discarded and creates a new root disk") + @Param(description = "True if the Instance needs to be volatile, i.e., on every reboot of Instance from API root disk is discarded and creates a new root disk") private Boolean isVolatile; @SerializedName(ApiConstants.STORAGE_TAGS) - @Param(description = "the tags for the service offering") + @Param(description = "The tags for the service offering") private String tags; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") + @Param(description = "The domain ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") + @Param(description = "The domain name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") private String domain; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the zone ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") + @Param(description = "The zone ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") private String zoneId; @SerializedName(ApiConstants.ZONE) - @Param(description = "the zone name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") + @Param(description = "The zone name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") private String zone; @SerializedName(ApiConstants.HOST_TAGS) - @Param(description = "the host tag for the service offering") + @Param(description = "The host tag for the service offering") private String hostTag; @SerializedName(ApiConstants.IS_SYSTEM_OFFERING) - @Param(description = "is this a system vm offering") + @Param(description = "Is this a System VM offering") private Boolean isSystem; @SerializedName(ApiConstants.IS_DEFAULT_USE) - @Param(description = "is this a default system vm offering") + @Param(description = "Is this a default System VM offering") private Boolean defaultUse; @SerializedName(ApiConstants.SYSTEM_VM_TYPE) - @Param(description = "is this a the systemvm type for system vm offering") + @Param(description = "Is this a the System VM type for System VM offering") private String vmType; @SerializedName(ApiConstants.NETWORKRATE) - @Param(description = "data transfer rate in megabits per second allowed.") + @Param(description = "Data transfer rate in megabits per second allowed.") private Integer networkRate; @SerializedName("iscustomizediops") - @Param(description = "true if disk offering uses custom iops, false otherwise", since = "4.4") + @Param(description = "True if disk offering uses custom IOPS, false otherwise", since = "4.4") private Boolean customizedIops; @SerializedName(ApiConstants.MIN_IOPS) - @Param(description = "the min iops of the disk offering", since = "4.4") + @Param(description = "The min IOPS of the disk offering", since = "4.4") private Long minIops; @SerializedName(ApiConstants.MAX_IOPS) - @Param(description = "the max iops of the disk offering", since = "4.4") + @Param(description = "The max IOPS of the disk offering", since = "4.4") private Long maxIops; @SerializedName(ApiConstants.HYPERVISOR_SNAPSHOT_RESERVE) - @Param(description = "Hypervisor snapshot reserve space as a percent of a volume (for managed storage using Xen or VMware)", since = "4.4") + @Param(description = "Hypervisor Snapshot reserve space as a percent of a volume (for managed storage using Xen or VMware)", since = "4.4") private Integer hypervisorSnapshotReserve; @SerializedName("diskBytesReadRate") - @Param(description = "bytes read rate of the service offering") + @Param(description = "Bytes read rate of the service offering") private Long bytesReadRate; @SerializedName("diskBytesReadRateMax") - @Param(description = "burst bytes read rate of the disk offering") + @Param(description = "Burst bytes read rate of the disk offering") private Long bytesReadRateMax; @SerializedName("diskBytesReadRateMaxLength") - @Param(description = "length (in seconds) of the burst") + @Param(description = "Length (in seconds) of the burst") private Long bytesReadRateMaxLength; @SerializedName("diskBytesWriteRate") - @Param(description = "bytes write rate of the service offering") + @Param(description = "Bytes write rate of the service offering") private Long bytesWriteRate; @SerializedName("diskBytesWriteRateMax") - @Param(description = "burst bytes write rate of the disk offering") + @Param(description = "Burst bytes write rate of the disk offering") private Long bytesWriteRateMax; @SerializedName("diskBytesWriteRateMaxLength") - @Param(description = "length (in seconds) of the burst") + @Param(description = "Length (in seconds) of the burst") private Long bytesWriteRateMaxLength; @SerializedName("diskIopsReadRate") - @Param(description = "io requests read rate of the service offering") + @Param(description = "I/O requests read rate of the service offering") private Long iopsReadRate; @SerializedName("diskIopsReadRateMax") - @Param(description = "burst io requests read rate of the disk offering") + @Param(description = "Burst io requests read rate of the disk offering") private Long iopsReadRateMax; @SerializedName("diskIopsReadRateMaxLength") - @Param(description = "length (in second) of the burst") + @Param(description = "Length (in second) of the burst") private Long iopsReadRateMaxLength; @SerializedName("diskIopsWriteRate") - @Param(description = "io requests write rate of the service offering") + @Param(description = "I/O requests write rate of the service offering") private Long iopsWriteRate; @SerializedName("diskIopsWriteRateMax") - @Param(description = "burst io requests write rate of the disk offering") + @Param(description = "Burst I/O requests write rate of the disk offering") private Long iopsWriteRateMax; @SerializedName("diskIopsWriteRateMaxLength") - @Param(description = "length (in seconds) of the burst") + @Param(description = "Length (in seconds) of the burst") private Long iopsWriteRateMaxLength; @SerializedName(ApiConstants.DEPLOYMENT_PLANNER) - @Param(description = "deployment strategy used to deploy VM.") + @Param(description = "Deployment strategy used to deploy Instance.") private String deploymentPlanner; @SerializedName(ApiConstants.SERVICE_OFFERING_DETAILS) - @Param(description = "additional key/value details tied with this service offering", since = "4.2.0") + @Param(description = "Additional key/value details tied with this service offering", since = "4.2.0") private Map details; @SerializedName("iscustomized") - @Param(description = "is true if the offering is customized", since = "4.3.0") + @Param(description = "Is true if the offering is customized", since = "4.3.0") private Boolean isCustomized; @SerializedName("cacheMode") - @Param(description = "the cache mode to use for this disk offering. none, writeback, writethrough or hypervisor default", since = "4.14") + @Param(description = "The cache mode to use for this disk offering. none, writeback, writethrough or hypervisor default", since = "4.14") private String cacheMode; @SerializedName("vspherestoragepolicy") - @Param(description = "the vsphere storage policy tagged to the service offering in case of VMware", since = "4.15") + @Param(description = "The vsphere storage policy tagged to the service offering in case of VMware", since = "4.15") private String vsphereStoragePolicy; @SerializedName(ApiConstants.ROOT_DISK_SIZE) @@ -209,29 +209,29 @@ public class ServiceOfferingResponse extends BaseResponseWithAnnotations { private Long rootDiskSize; @SerializedName(ApiConstants.DYNAMIC_SCALING_ENABLED) - @Param(description = "true if virtual machine needs to be dynamically scalable of cpu or memory", since = "4.16") + @Param(description = "True if Instance needs to be dynamically scalable of CPU or memory", since = "4.16") private Boolean dynamicScalingEnabled; @SerializedName(ApiConstants.DISK_OFFERING_STRICTNESS) @Param(description = "True/False to indicate the strictness of the disk offering association with the compute offering. " + - "When set to true, override of disk offering is not allowed when VM is deployed and " + - "change disk offering is not allowed for the ROOT disk after the VM is deployed", since = "4.17") + "When set to true, override of disk offering is not allowed when Instance is deployed and " + + "change disk offering is not allowed for the ROOT disk after the Instance is deployed", since = "4.17") private Boolean diskOfferingStrictness; @SerializedName(ApiConstants.DISK_OFFERING_ID) - @Param(description = "the ID of the disk offering to which service offering is linked", since = "4.17") + @Param(description = "The ID of the disk offering to which service offering is linked", since = "4.17") private String diskOfferingId; @SerializedName("diskofferingname") - @Param(description = "name of the disk offering", since = "4.17") + @Param(description = "Name of the disk offering", since = "4.17") private String diskOfferingName; @SerializedName("diskofferingdisplaytext") - @Param(description = "the display text of the disk offering", since = "4.17") + @Param(description = "The display text of the disk offering", since = "4.17") private String diskOfferingDisplayText; @SerializedName(ApiConstants.ENCRYPT_ROOT) - @Param(description = "true if virtual machine root disk will be encrypted on storage", since = "4.18") + @Param(description = "True if Instance root disk will be encrypted on storage", since = "4.18") private Boolean encryptRoot; @SerializedName(ApiConstants.GPU_CARD_ID) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ServiceResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ServiceResponse.java index 9f5acc13f8bb..9d1470b64d70 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ServiceResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ServiceResponse.java @@ -29,15 +29,15 @@ public class ServiceResponse extends BaseResponse { @SerializedName(ApiConstants.NAME) - @Param(description = "the service name") + @Param(description = "The service name") private String name; @SerializedName(ApiConstants.PROVIDER) - @Param(description = "the service provider name", responseObject = ProviderResponse.class) + @Param(description = "The service provider name", responseObject = ProviderResponse.class) private List providers; @SerializedName("capability") - @Param(description = "the list of capabilities", responseObject = CapabilityResponse.class) + @Param(description = "The list of capabilities", responseObject = CapabilityResponse.class) private List capabilities; public void setName(String name) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteCustomerGatewayResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteCustomerGatewayResponse.java index 4ae140ec573d..4e5820279a2e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteCustomerGatewayResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteCustomerGatewayResponse.java @@ -31,23 +31,23 @@ @SuppressWarnings("unused") public class Site2SiteCustomerGatewayResponse extends BaseResponseWithAnnotations implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the vpn gateway ID") + @Param(description = "The VPN gateway ID") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "name of the customer gateway") + @Param(description = "Name of the customer gateway") private String name; @SerializedName(ApiConstants.GATEWAY) - @Param(description = "public ip address id of the customer gateway") + @Param(description = "Public IP address ID of the customer gateway") private String gatewayIp; @SerializedName(ApiConstants.IP_ADDRESS) - @Param(description = "guest ip of the customer gateway") + @Param(description = "Guest IP of the customer gateway") private String guestIp; @SerializedName(ApiConstants.CIDR_LIST) - @Param(description = "guest cidr list of the customer gateway. Multiple entries are separated by a single comma character (,).") + @Param(description = "Guest CIDR list of the customer gateway. Multiple entries are separated by a single comma character (,).") private String guestCidrList; @SerializedName(ApiConstants.IPSEC_PSK) @@ -71,47 +71,47 @@ public class Site2SiteCustomerGatewayResponse extends BaseResponseWithAnnotation private Long espLifetime; @SerializedName(ApiConstants.DPD) - @Param(description = "if DPD is enabled for customer gateway") + @Param(description = "If DPD is enabled for customer gateway") private Boolean dpd; @SerializedName(ApiConstants.FORCE_ENCAP) - @Param(description = "if Force NAT Encapsulation is enabled for customer gateway") + @Param(description = "If Force NAT Encapsulation is enabled for customer gateway") private Boolean encap; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the owner") + @Param(description = "The owner") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id") + @Param(description = "The project ID") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name") + @Param(description = "The project name") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain id of the owner") + @Param(description = "The domain ID of the owner") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the owner") + @Param(description = "The domain name of the owner") private String domain; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "the domain path of the owner", since = "4.19.2.0") + @Param(description = "The domain path of the owner", since = "4.19.2.0") private String domainPath; @SerializedName(ApiConstants.REMOVED) - @Param(description = "the date and time the host was removed") + @Param(description = "The date and time the host was removed") private Date removed; @SerializedName(ApiConstants.SPLIT_CONNECTIONS) - @Param(description = "For IKEv2, whether to split multiple right subnet cidrs into multiple connection statements.") + @Param(description = "For IKEv2, whether to split multiple right subnet CIDRs into multiple connection statements.") private Boolean splitConnections; @SerializedName(ApiConstants.IKE_VERSION) - @Param(description = "Which IKE Version to use, one of ike (autoselect), ikev1, or ikev2. Defaults to ike") + @Param(description = "Which IKE Version to use, one of ike (autoselect), IKEv1, or IKEv2. Defaults to ike") private String ikeVersion; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteVpnConnectionResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteVpnConnectionResponse.java index a9fd0f9703cc..e668b7d948fd 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteVpnConnectionResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteVpnConnectionResponse.java @@ -31,29 +31,29 @@ @SuppressWarnings("unused") public class Site2SiteVpnConnectionResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the connection ID") + @Param(description = "The connection ID") private String id; @SerializedName(ApiConstants.S2S_VPN_GATEWAY_ID) - @Param(description = "the vpn gateway ID") + @Param(description = "The VPN gateway ID") private String vpnGatewayId; @SerializedName(ApiConstants.PUBLIC_IP) - @Param(description = "the public IP address") + @Param(description = "The public IP address") //from VpnGateway private String ip; @SerializedName(ApiConstants.S2S_CUSTOMER_GATEWAY_ID) - @Param(description = "the customer gateway ID") + @Param(description = "The customer gateway ID") private String customerGatewayId; @SerializedName(ApiConstants.GATEWAY) - @Param(description = "public ip address id of the customer gateway") + @Param(description = "Public IP address id of the customer gateway") //from CustomerGateway private String gatewayIp; @SerializedName(ApiConstants.CIDR_LIST) - @Param(description = "guest cidr list of the customer gateway. Multiple entries are separated by a single comma character (,).") + @Param(description = "Guest CIDR list of the customer gateway. Multiple entries are separated by a single comma character (,).") //from CustomerGateway private String guestCidrList; @@ -83,41 +83,41 @@ public class Site2SiteVpnConnectionResponse extends BaseResponse implements Cont private Long espLifetime; @SerializedName(ApiConstants.DPD) - @Param(description = "if DPD is enabled for customer gateway") + @Param(description = "If DPD is enabled for customer gateway") //from CustomerGateway private Boolean dpd; @SerializedName(ApiConstants.FORCE_ENCAP) - @Param(description = "if Force NAT Encapsulation is enabled for customer gateway") + @Param(description = "If Force NAT Encapsulation is enabled for customer gateway") //from CustomerGateway private Boolean encap; @SerializedName(ApiConstants.STATE) - @Param(description = "State of vpn connection") + @Param(description = "State of VPN connection") private String state; @SerializedName(ApiConstants.PASSIVE) - @Param(description = "State of vpn connection") + @Param(description = "State of VPN connection") private boolean passive; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the owner") + @Param(description = "The owner") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id") + @Param(description = "The project id") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name") + @Param(description = "The project name") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain id of the owner") + @Param(description = "The domain id of the owner") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the owner") + @Param(description = "The domain name of the owner") private String domain; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -125,23 +125,23 @@ public class Site2SiteVpnConnectionResponse extends BaseResponse implements Cont private String domainPath; @SerializedName(ApiConstants.CREATED) - @Param(description = "the date and time the host was created") + @Param(description = "The date and time the host was created") private Date created; @SerializedName(ApiConstants.REMOVED) - @Param(description = "the date and time the host was removed") + @Param(description = "The date and time the host was removed") private Date removed; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is connection for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is connection for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; @SerializedName(ApiConstants.SPLIT_CONNECTIONS) - @Param(description = "Split multiple remote networks into multiple phase 2 SAs. Often used with Cisco some products.") + @Param(description = "Split multiple remote Networks into multiple phase 2 SAs. Often used with Cisco some products.") private Boolean splitConnections; @SerializedName(ApiConstants.IKE_VERSION) - @Param(description = "Which IKE Version to use, one of ike (autoselect), ikev1, or ikev2. Defaults to ike") + @Param(description = "Which IKE Version to use, one of ike (autoselect), IKEv1, or IKEv2. Defaults to ike") private String ikeVersion; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteVpnGatewayResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteVpnGatewayResponse.java index 1e63ba896c7b..9f997ca5bb7b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteVpnGatewayResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/Site2SiteVpnGatewayResponse.java @@ -31,39 +31,39 @@ @SuppressWarnings("unused") public class Site2SiteVpnGatewayResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the vpn gateway ID") + @Param(description = "The VPN gateway ID") private String id; @SerializedName(ApiConstants.PUBLIC_IP) - @Param(description = "the public IP address") + @Param(description = "The public IP address") private String ip; @SerializedName(ApiConstants.VPC_ID) - @Param(description = "the vpc id of this gateway") + @Param(description = "The VPC id of this gateway") private String vpcId; @SerializedName(ApiConstants.VPC_NAME) - @Param(description = "the vpc name of this gateway", since = "4.13.2") + @Param(description = "The VPC name of this gateway", since = "4.13.2") private String vpcName; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the owner") + @Param(description = "The owner") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id") + @Param(description = "The project id") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name") + @Param(description = "The project name") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain id of the owner") + @Param(description = "The domain id of the owner") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the owner") + @Param(description = "The domain name of the owner") private String domain; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -71,11 +71,11 @@ public class Site2SiteVpnGatewayResponse extends BaseResponse implements Control private String domainPath; @SerializedName(ApiConstants.REMOVED) - @Param(description = "the date and time the host was removed") + @Param(description = "The date and time the host was removed") private Date removed; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is vpn gateway for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is VPN gateway for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/SnapshotPolicyResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/SnapshotPolicyResponse.java index 998d6af871dc..3a40f3dfa982 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/SnapshotPolicyResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/SnapshotPolicyResponse.java @@ -30,11 +30,11 @@ @EntityReference(value = SnapshotPolicy.class) public class SnapshotPolicyResponse extends BaseResponseWithTagInformation { @SerializedName("id") - @Param(description = "the ID of the snapshot policy") + @Param(description = "The ID of the Snapshot policy") private String id; @SerializedName("volumeid") - @Param(description = "the ID of the disk volume") + @Param(description = "The ID of the disk volume") private String volumeId; @SerializedName("volumename") @@ -42,23 +42,23 @@ public class SnapshotPolicyResponse extends BaseResponseWithTagInformation { private String volumeName; @SerializedName("schedule") - @Param(description = "time the snapshot is scheduled to be taken.") + @Param(description = "Time the Snapshot is scheduled to be taken.") private String schedule; @SerializedName("intervaltype") - @Param(description = "the interval type of the snapshot policy") + @Param(description = "The interval type of the Snapshot policy") private short intervalType; @SerializedName("maxsnaps") - @Param(description = "maximum number of snapshots retained") + @Param(description = "Maximum number of Snapshots retained") private int maxSnaps; @SerializedName("timezone") - @Param(description = "the time zone of the snapshot policy") + @Param(description = "The time zone of the Snapshot policy") private String timezone; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is this policy for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is this policy for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; @SerializedName(ApiConstants.ZONE) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/SnapshotResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/SnapshotResponse.java index 5d6756c950d6..827a55b18754 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/SnapshotResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/SnapshotResponse.java @@ -32,19 +32,19 @@ @EntityReference(value = Snapshot.class) public class SnapshotResponse extends BaseResponseWithTagInformation implements ControlledViewEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "ID of the snapshot") + @Param(description = "ID of the Snapshot") private String id; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account associated with the snapshot") + @Param(description = "The Account associated with the Snapshot") private String accountName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID of the snapshot's account") + @Param(description = "The domain ID of the Snapshot's Account") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the snapshot's account") + @Param(description = "The domain name of the Snapshot's Account") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -52,15 +52,15 @@ public class SnapshotResponse extends BaseResponseWithTagInformation implements private String domainPath; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the snapshot") + @Param(description = "The project id of the Snapshot") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the snapshot") + @Param(description = "The project name of the Snapshot") private String projectName; @SerializedName(ApiConstants.SNAPSHOT_TYPE) - @Param(description = "the type of the snapshot") + @Param(description = "The type of the Snapshot") private String snapshotType; @SerializedName(ApiConstants.VOLUME_ID) @@ -68,11 +68,11 @@ public class SnapshotResponse extends BaseResponseWithTagInformation implements private String volumeId; @SerializedName(ApiConstants.VOLUME_NAME) - @Param(description = "name of the disk volume") + @Param(description = "Name of the disk volume") private String volumeName; @SerializedName("volumetype") - @Param(description = "type of the disk volume") + @Param(description = "Type of the disk volume") private String volumeType; @SerializedName(ApiConstants.VOLUME_STATE) @@ -80,23 +80,23 @@ public class SnapshotResponse extends BaseResponseWithTagInformation implements private String volumeState; @SerializedName(ApiConstants.CREATED) - @Param(description = " the date the snapshot was created") + @Param(description = "The date the Snapshot was created") private Date created; @SerializedName(ApiConstants.NAME) - @Param(description = "name of the snapshot") + @Param(description = "Name of the Snapshot") private String name; @SerializedName(ApiConstants.INTERVAL_TYPE) - @Param(description = "valid types are hourly, daily, weekly, monthy, template, and none.") + @Param(description = "Valid types are hourly, daily, weekly, monthy, Template, and none.") private String intervalType; @SerializedName(ApiConstants.LOCATION_TYPE) - @Param(description = "valid location types are primary and secondary.") + @Param(description = "Valid location types are primary and secondary.") private String locationType; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the snapshot. BackedUp means that snapshot is ready to be used; Creating - the snapshot is being allocated on the primary storage; BackingUp - the snapshot is being backed up on secondary storage") + @Param(description = "The state of the Snapshot. BackedUp means that Snapshot is ready to be used; Creating - the Snapshot is being allocated on the primary storage; BackingUp - the Snapshot is being backed up on secondary storage") private Snapshot.State state; @SerializedName(ApiConstants.STATUS) @@ -104,7 +104,7 @@ public class SnapshotResponse extends BaseResponseWithTagInformation implements private String status; @SerializedName(ApiConstants.PHYSICAL_SIZE) - @Param(description = "physical size of backedup snapshot on image store") + @Param(description = "Physical size of backed up Snapshot on image store") private long physicalSize; @SerializedName(ApiConstants.CHAIN_SIZE) @@ -112,7 +112,7 @@ public class SnapshotResponse extends BaseResponseWithTagInformation implements private Long chainSize; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "id of the availability zone") + @Param(description = "ID of the availability zone") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) @@ -120,19 +120,19 @@ public class SnapshotResponse extends BaseResponseWithTagInformation implements private String zoneName; @SerializedName(ApiConstants.REVERTABLE) - @Param(description = "indicates whether the underlying storage supports reverting the volume to this snapshot") + @Param(description = "Indicates whether the underlying storage supports reverting the volume to this Snapshot") private boolean revertable; @SerializedName(ApiConstants.OS_TYPE_ID) - @Param(description = "id of the os on volume", since = "4.10") + @Param(description = "ID of the os on volume", since = "4.10") private String osTypeId; @SerializedName(ApiConstants.OS_DISPLAY_NAME) - @Param(description = "display name of the os on volume") + @Param(description = "Display name of the os on volume") private String osDisplayName; @SerializedName(ApiConstants.VIRTUAL_SIZE) - @Param(description = "virtual size of backedup snapshot on image store") + @Param(description = "Virtual size of backedup Snapshot on image store") private long virtualSize; @SerializedName(ApiConstants.DATASTORE_ID) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/SnapshotScheduleResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/SnapshotScheduleResponse.java index 7bc8ee8cba26..d8ce673d335f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/SnapshotScheduleResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/SnapshotScheduleResponse.java @@ -26,19 +26,19 @@ public class SnapshotScheduleResponse extends BaseResponse { @SerializedName("id") - @Param(description = "the ID of the snapshot schedule") + @Param(description = "The ID of the Snapshot schedule") private String id; @SerializedName("volumeid") - @Param(description = "the volume ID the snapshot schedule applied for") + @Param(description = "The volume ID the Snapshot schedule applied for") private String volumeId; @SerializedName("snapshotpolicyid") - @Param(description = "the snapshot policy ID used by the snapshot schedule") + @Param(description = "The Snapshot policy ID used by the Snapshot schedule") private String snapshotPolicyId; @SerializedName("scheduled") - @Param(description = "time the snapshot is scheduled to be taken") + @Param(description = "Time the Snapshot is scheduled to be taken") private Date scheduled; public String getId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/SslCertResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/SslCertResponse.java index aa729f123b44..d4add82f666c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/SslCertResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/SslCertResponse.java @@ -27,8 +27,6 @@ import org.apache.cloudstack.network.tls.SslCert; import com.cloud.serializer.Param; -//import org.apache.cloudstack.api.EntityReference; - @EntityReference(value = SslCert.class) public class SslCertResponse extends BaseResponse { @@ -37,35 +35,35 @@ public class SslCertResponse extends BaseResponse { private String id; @SerializedName(ApiConstants.CERTIFICATE) - @Param(description = "certificate") + @Param(description = "Certificate") private String certificate; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "account for the certificate") + @Param(description = "Account for the certificate") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the certificate") + @Param(description = "The project id of the certificate") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the certificate") + @Param(description = "The project name of the certificate") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain id of the network owner") + @Param(description = "The domain id of the Network owner") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the network owner") + @Param(description = "The domain name of the Network owner") private String domain; @SerializedName(ApiConstants.CERTIFICATE_CHAIN) - @Param(description = "certificate chain") + @Param(description = "Certificate chain") private String certchain; @SerializedName(ApiConstants.CERTIFICATE_FINGERPRINT) - @Param(description = "certificate fingerprint") + @Param(description = "Certificate fingerprint") private String fingerprint; @SerializedName(ApiConstants.LOAD_BALANCER_RULE_LIST) @@ -73,7 +71,7 @@ public class SslCertResponse extends BaseResponse { List lbIds; @SerializedName(ApiConstants.NAME) - @Param(description = "name") + @Param(description = "Name") private String name; public SslCertResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/StaticRouteResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/StaticRouteResponse.java index 9008fce2392b..ed0e050b9652 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/StaticRouteResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/StaticRouteResponse.java @@ -31,11 +31,11 @@ @SuppressWarnings("unused") public class StaticRouteResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of static route") + @Param(description = "The ID of static route") private String id; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the static route") + @Param(description = "The state of the static route") private String state; @SerializedName(ApiConstants.VPC_ID) @@ -55,27 +55,27 @@ public class StaticRouteResponse extends BaseResponse implements ControlledEntit private String nextHop; @SerializedName(ApiConstants.CIDR) - @Param(description = "static route CIDR") + @Param(description = "Static route CIDR") private String cidr; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account associated with the static route") + @Param(description = "The Account associated with the static route") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the static route") + @Param(description = "The project ID of the static route") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the static route") + @Param(description = "The project name of the static route") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the ID of the domain associated with the static route") + @Param(description = "The ID of the domain associated with the static route") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain associated with the static route") + @Param(description = "The domain associated with the static route") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -83,7 +83,7 @@ public class StaticRouteResponse extends BaseResponse implements ControlledEntit private String domainPath; @SerializedName(ApiConstants.TAGS) - @Param(description = "the list of resource tags associated with static route", responseObject = ResourceTagResponse.class) + @Param(description = "The list of resource tags associated with static route", responseObject = ResourceTagResponse.class) private List tags; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/response/StatsResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/StatsResponse.java index 287d78bb612f..232daa4f4a9a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/StatsResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/StatsResponse.java @@ -27,59 +27,59 @@ public class StatsResponse extends BaseResponse { @SerializedName("timestamp") - @Param(description = "the time when the VM stats were collected. The format is 'yyyy-MM-dd hh:mm:ss'") + @Param(description = "The time when the Instance stats were collected. The format is 'yyyy-MM-dd hh:mm:ss'") private Date timestamp; @SerializedName("cpuused") - @Param(description = "the amount (percentage) of the VM's CPU currently used") + @Param(description = "The amount (percentage) of the Instance's CPU currently used") private String cpuUsed; @SerializedName(ApiConstants.DISK_IO_READ) - @Param(description = "the VM's disk number of read requests (IO) made in the last collection cycle as defined by vm.stats.interval configuration") + @Param(description = "The Instance's disk number of read requests (IO) made in the last collection cycle as defined by vm.stats.interval configuration") protected Long diskIORead; @SerializedName(ApiConstants.DISK_IO_WRITE) - @Param(description = "the VM's disk number of write requests (IO) made in the last collection cycle as defined by vm.stats.interval configuration") + @Param(description = "The Instance's disk number of write requests (IO) made in the last collection cycle as defined by vm.stats.interval configuration") protected Long diskIOWrite; @SerializedName(ApiConstants.DISK_IO_PSTOTAL) - @Param(description = "the total disk iops since the last stats retrieval") + @Param(description = "The total disk IOPS since the last stats retrieval") protected Long diskIopsTotal = 0L; @SerializedName(ApiConstants.DISK_KBS_READ) - @Param(description = "the VM's disk read in KiB") + @Param(description = "The Instance's disk read in KiB") private Long diskKbsRead; @SerializedName(ApiConstants.DISK_KBS_WRITE) - @Param(description = "the VM's disk write in KiB") + @Param(description = "The Instance's disk write in KiB") private Long diskKbsWrite; @SerializedName("memoryintfreekbs") - @Param(description = "the VM's free memory in KB or -1 if it cannot be gathered") + @Param(description = "The Instance's free memory in KB or -1 if it cannot be gathered") private Long memoryIntFreeKBs; @SerializedName("memorykbs") - @Param(description = "the memory used by the VM in KB") + @Param(description = "The memory used by the Instance in KB") private Long memoryKBs; @SerializedName("memorytargetkbs") - @Param(description = "the target memory in VM (KB)") + @Param(description = "The target memory in Instance (KB)") private Long memoryTargetKBs; @SerializedName("networkkbsread") - @Param(description = "the incoming network traffic on the VM in KiB") + @Param(description = "The incoming Network traffic on the Instance in KiB") protected Long networkKbsRead; @SerializedName("networkkbswrite") - @Param(description = "the outgoing network traffic on the host in KiB") + @Param(description = "The outgoing Network traffic on the host in KiB") protected Long networkKbsWrite; @SerializedName("networkread") - @Param(description = "the amount of downloaded data by the VM in MiB") + @Param(description = "The amount of downloaded data by the Instance in MiB") protected String networkRead; @SerializedName("networkwrite") - @Param(description = "the amount of uploaded data by the VM in MiB") + @Param(description = "The amount of uploaded data by the Instance in MiB") protected String networkWrite; public void setTimestamp(Date timestamp) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/StorageNetworkIpRangeResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/StorageNetworkIpRangeResponse.java index 1dc60ce67f39..963d4d18ba60 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/StorageNetworkIpRangeResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/StorageNetworkIpRangeResponse.java @@ -28,39 +28,39 @@ @EntityReference(value = StorageNetworkIpRange.class) public class StorageNetworkIpRangeResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the uuid of storage network IP range.") + @Param(description = "The UUID of storage Network IP range.") private String uuid; @SerializedName(ApiConstants.VLAN) - @Param(description = "the ID or VID of the VLAN.") + @Param(description = "The ID or VID of the VLAN.") private Integer vlan; @SerializedName(ApiConstants.POD_ID) - @Param(description = "the Pod uuid for the storage network IP range") + @Param(description = "The Pod UUID for the storage Network IP range") private String podUuid; @SerializedName(ApiConstants.START_IP) - @Param(description = "the start ip of the storage network IP range") + @Param(description = "The start IP of the storage Network IP range") private String startIp; @SerializedName(ApiConstants.END_IP) - @Param(description = "the end ip of the storage network IP range") + @Param(description = "The end IP of the storage Network IP range") private String endIp; @SerializedName(ApiConstants.GATEWAY) - @Param(description = "the gateway of the storage network IP range") + @Param(description = "The gateway of the storage Network IP range") private String gateway; @SerializedName(ApiConstants.NETWORK_ID) - @Param(description = "the network uuid of storage network IP range") + @Param(description = "The Network UUID of storage Network IP range") private String networkUuid; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the Zone uuid of the storage network IP range") + @Param(description = "The Zone UUID of the storage Network IP range") private String zoneUuid; @SerializedName(ApiConstants.NETMASK) - @Param(description = "the netmask of the storage network IP range") + @Param(description = "The netmask of the storage Network IP range") private String netmask; public void setUuid(String uuid) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/StoragePoolResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/StoragePoolResponse.java index 7867c685bbab..25e67115ab4a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/StoragePoolResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/StoragePoolResponse.java @@ -30,51 +30,51 @@ @EntityReference(value = StoragePool.class) public class StoragePoolResponse extends BaseResponseWithAnnotations { @SerializedName("id") - @Param(description = "the ID of the storage pool") + @Param(description = "The ID of the storage pool") private String id; @SerializedName("zoneid") - @Param(description = "the Zone ID of the storage pool") + @Param(description = "The Zone ID of the storage pool") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the Zone name of the storage pool") + @Param(description = "The Zone name of the storage pool") private String zoneName; @SerializedName("podid") - @Param(description = "the Pod ID of the storage pool") + @Param(description = "The Pod ID of the storage pool") private String podId; @SerializedName("podname") - @Param(description = "the Pod name of the storage pool") + @Param(description = "The Pod name of the storage pool") private String podName; @SerializedName("name") - @Param(description = "the name of the storage pool") + @Param(description = "The name of the storage pool") private String name; @SerializedName("ipaddress") - @Param(description = "the IP address of the storage pool") + @Param(description = "The IP address of the storage pool") private String ipAddress; @SerializedName("path") - @Param(description = "the storage pool path") + @Param(description = "The storage pool path") private String path; @SerializedName("created") - @Param(description = "the date and time the storage pool was created") + @Param(description = "The date and time the storage pool was created") private Date created; @SerializedName("type") - @Param(description = "the storage pool type") + @Param(description = "The storage pool type") private String type; @SerializedName("clusterid") - @Param(description = "the ID of the cluster for the storage pool") + @Param(description = "The ID of the cluster for the storage pool") private String clusterId; @SerializedName("clustername") - @Param(description = "the name of the cluster for the storage pool") + @Param(description = "The name of the cluster for the storage pool") private String clusterName; @SerializedName(ApiConstants.CAPACITY_BYTES) @@ -83,15 +83,15 @@ public class StoragePoolResponse extends BaseResponseWithAnnotations { @Deprecated(since = "4.22.0") @SerializedName("disksizetotal") - @Param(description = "the total disk size of the storage pool") + @Param(description = "The total disk size of the storage pool") private Long diskSizeTotal; @SerializedName("disksizeallocated") - @Param(description = "the pool's currently allocated disk size") + @Param(description = "The pool's currently allocated disk size") private Long diskSizeAllocated; @SerializedName("disksizeused") - @Param(description = "the pool's currently used disk size") + @Param(description = "The pool's currently used disk size") private Long diskSizeUsed; @SerializedName(ApiConstants.CAPACITY_IOPS) @@ -99,7 +99,7 @@ public class StoragePoolResponse extends BaseResponseWithAnnotations { private Long capacityIops; @SerializedName("allocatediops") - @Param(description = "total min IOPS currently in use by volumes") + @Param(description = "Total min IOPS currently in use by volumes") private Long allocatedIops; @SerializedName(ApiConstants.USED_IOPS) @@ -111,7 +111,7 @@ public class StoragePoolResponse extends BaseResponseWithAnnotations { private Map customStats; @SerializedName("tags") - @Param(description = "the tags for the storage pool") + @Param(description = "The tags for the storage pool") private String tags; @SerializedName(ApiConstants.STORAGE_ACCESS_GROUPS) @@ -127,23 +127,23 @@ public class StoragePoolResponse extends BaseResponseWithAnnotations { private Boolean isTagARule; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the storage pool") + @Param(description = "The state of the storage pool") private StoragePoolStatus state; @SerializedName(ApiConstants.SCOPE) - @Param(description = "the scope of the storage pool") + @Param(description = "The scope of the storage pool") private String scope; @SerializedName("overprovisionfactor") - @Param(description = "the overprovisionfactor for the storage pool", since = "4.4") + @Param(description = "The overprovisionfactor for the storage pool", since = "4.4") private String overProvisionFactor; @SerializedName(ApiConstants.HYPERVISOR) - @Param(description = "the hypervisor type of the storage pool") + @Param(description = "The hypervisor type of the storage pool") private String hypervisor; @SerializedName("suitableformigration") - @Param(description = "true if this pool is suitable to migrate a volume," + " false otherwise") + @Param(description = "True if this pool is suitable to migrate a volume," + " false otherwise") private Boolean suitableForMigration; @SerializedName("provider") @@ -151,7 +151,7 @@ public class StoragePoolResponse extends BaseResponseWithAnnotations { private String provider; @SerializedName(ApiConstants.STORAGE_CAPABILITIES) - @Param(description = "the storage pool capabilities") + @Param(description = "The storage pool capabilities") private Map caps; @SerializedName(ApiConstants.MANAGED) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/StorageProviderResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/StorageProviderResponse.java index d68979a5bcde..e063b88335a5 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/StorageProviderResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/StorageProviderResponse.java @@ -26,11 +26,11 @@ public class StorageProviderResponse extends BaseResponse { @SerializedName("name") - @Param(description = "the name of the storage provider") + @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") + @Param(description = "The type of the storage provider: primary or image provider") private String type; /** diff --git a/api/src/main/java/org/apache/cloudstack/api/response/StorageTagResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/StorageTagResponse.java index 7d8db39b4e92..fc6527f7e4c8 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/StorageTagResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/StorageTagResponse.java @@ -22,15 +22,15 @@ public class StorageTagResponse extends BaseResponse { @SerializedName("id") - @Param(description = "the ID of the storage tag") + @Param(description = "The ID of the storage tag") private String id; @SerializedName("poolid") - @Param(description = "the pool ID of the storage tag") + @Param(description = "The pool ID of the storage tag") private long poolId; @SerializedName("name") - @Param(description = "the name of the storage tag") + @Param(description = "The name of the storage tag") private String name; public String getId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/SuccessResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/SuccessResponse.java index 0dde6d0e4230..3c03fb7b3bc4 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/SuccessResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/SuccessResponse.java @@ -24,11 +24,11 @@ public class SuccessResponse extends BaseResponse { @SerializedName("success") - @Param(description = "true if operation is executed successfully") + @Param(description = "True if operation is executed successfully") private Boolean success = true; @SerializedName("displaytext") - @Param(description = "any text associated with the success or failure") + @Param(description = "Any text associated with the success or failure") private String displayText; public Boolean getSuccess() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/SystemVmInstanceResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/SystemVmInstanceResponse.java index 5e0638080b9e..5f94537d4dbd 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/SystemVmInstanceResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/SystemVmInstanceResponse.java @@ -27,27 +27,27 @@ */ public class SystemVmInstanceResponse extends BaseResponse { @SerializedName("id") - @Param(description = "the ID of the system VM") + @Param(description = "The ID of the System VM") private String id; @SerializedName("systemvmtype") - @Param(description = "the system VM type") + @Param(description = "The System VM type") private String systemVmType; @SerializedName("name") - @Param(description = "the name of the system VM") + @Param(description = "The name of the System VM") private String name; @SerializedName("hostid") - @Param(description = "the host ID for the system VM") + @Param(description = "The host ID for the System VM") private String hostId; @SerializedName("state") - @Param(description = "the state of the system VM") + @Param(description = "The state of the System VM") private String state; @SerializedName("role") - @Param(description = "the role of the system VM") + @Param(description = "The role of the System VM") private String role; public String getId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/SystemVmResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/SystemVmResponse.java index 7b1784fc7673..e69f6366742c 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/SystemVmResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/SystemVmResponse.java @@ -31,143 +31,143 @@ @EntityReference(value = VirtualMachine.class) public class SystemVmResponse extends BaseResponseWithAnnotations { @SerializedName("id") - @Param(description = "the ID of the system VM") + @Param(description = "The ID of the System VM") private String id; @SerializedName("systemvmtype") - @Param(description = "the system VM type") + @Param(description = "The System VM type") private String systemVmType; @SerializedName("zoneid") - @Param(description = "the Zone ID for the system VM") + @Param(description = "The Zone ID for the System VM") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the Zone name for the system VM") + @Param(description = "The Zone name for the System VM") private String zoneName; @SerializedName("dns1") - @Param(description = "the first DNS for the system VM") + @Param(description = "The first DNS for the System VM") private String dns1; @SerializedName("dns2") - @Param(description = "the second DNS for the system VM") + @Param(description = "The second DNS for the System VM") private String dns2; @SerializedName("networkdomain") - @Param(description = "the network domain for the system VM") + @Param(description = "The Network domain for the System VM") private String networkDomain; @SerializedName("gateway") - @Param(description = "the gateway for the system VM") + @Param(description = "The gateway for the System VM") private String gateway; @SerializedName("name") - @Param(description = "the name of the system VM") + @Param(description = "The name of the System VM") private String name; @SerializedName("podid") - @Param(description = "the Pod ID for the system VM") + @Param(description = "The Pod ID for the System VM") private String podId; @SerializedName("podname") - @Param(description = "the Pod name for the system VM", since = "4.13.2") + @Param(description = "The Pod name for the System VM", since = "4.13.2") private String podName; @SerializedName("hostid") - @Param(description = "the host ID for the system VM") + @Param(description = "The host ID for the System VM") private String hostId; @SerializedName("hostname") - @Param(description = "the hostname for the system VM") + @Param(description = "The hostname for the System VM") private String hostName; @SerializedName(ApiConstants.HOST_CONTROL_STATE) - @Param(description = "the control state of the host for the system VM") + @Param(description = "The control state of the host for the System VM") private String hostControlState; @SerializedName("hypervisor") - @Param(description = "the hypervisor on which the template runs") + @Param(description = "The hypervisor on which the Template runs") private String hypervisor; @SerializedName(ApiConstants.PRIVATE_IP) - @Param(description = "the private IP address for the system VM") + @Param(description = "The private IP address for the System VM") private String privateIp; @SerializedName(ApiConstants.PRIVATE_MAC_ADDRESS) - @Param(description = "the private MAC address for the system VM") + @Param(description = "The private MAC address for the System VM") private String privateMacAddress; @SerializedName(ApiConstants.PRIVATE_NETMASK) - @Param(description = "the private netmask for the system VM") + @Param(description = "The private netmask for the System VM") private String privateNetmask; @SerializedName(ApiConstants.LINK_LOCAL_IP) - @Param(description = "the link local IP address for the system vm") + @Param(description = "The Control IP address for the System VM") private String linkLocalIp; @SerializedName(ApiConstants.LINK_LOCAL_MAC_ADDRESS) - @Param(description = "the link local MAC address for the system vm") + @Param(description = "The link local MAC address for the System VM") private String linkLocalMacAddress; @SerializedName(ApiConstants.LINK_LOCAL_MAC_NETMASK) - @Param(description = "the link local netmask for the system vm") + @Param(description = "The link local netmask for the System VM") private String linkLocalNetmask; @SerializedName("publicip") - @Param(description = "the public IP address for the system VM") + @Param(description = "The public IP address for the System VM") private String publicIp; @SerializedName("publicmacaddress") - @Param(description = "the public MAC address for the system VM") + @Param(description = "The public MAC address for the System VM") private String publicMacAddress; @SerializedName("publicnetmask") - @Param(description = "the public netmask for the system VM") + @Param(description = "The public netmask for the System VM") private String publicNetmask; @SerializedName("templateid") - @Param(description = "the template ID for the system VM") + @Param(description = "The Template ID for the System VM") private String templateId; @SerializedName("templatename") - @Param(description = "the template name for the system VM", since = "4.13.2") + @Param(description = "The Template name for the System VM", since = "4.13.2") private String templateName; @SerializedName("created") - @Param(description = "the date and time the system VM was created") + @Param(description = "The date and time the System VM was created") private Date created; @SerializedName("state") - @Param(description = "the state of the system VM") + @Param(description = "The state of the System VM") private String state; @SerializedName("agentstate") - @Param(description = "the agent state of the system VM", since = "4.13.1") + @Param(description = "The agent state of the System VM", since = "4.13.1") private String agentState; @SerializedName("activeviewersessions") - @Param(description = "the number of active console sessions for the console proxy system vm") + @Param(description = "The number of active console sessions for the console proxy System VM") private Integer activeViewerSessions; @SerializedName("guestvlan") - @Param(description = "guest vlan range") + @Param(description = "Guest VLAN range") private String guestVlan; @SerializedName("publicvlan") - @Param(description = "public vlan range") + @Param(description = "Public VLAN range") private List publicVlan; @SerializedName("disconnected") - @Param(description = "the last disconnected date of host", since = "4.13.1") + @Param(description = "The last disconnected date of host", since = "4.13.1") private Date disconnectedOn; @SerializedName("version") - @Param(description = "the systemvm agent version", since = "4.13.1") + @Param(description = "The systemvm agent version", since = "4.13.1") private String version; @SerializedName(ApiConstants.IS_DYNAMICALLY_SCALABLE) - @Param(description = "true if vm contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory.") + @Param(description = "True if the Instance contains XS/VMWare tools in order to support dynamic scaling of Instance CPU/memory.") private Boolean isDynamicallyScalable; @SerializedName(ApiConstants.SERVICE_OFFERING_ID) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/TemplateOVFPropertyResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/TemplateOVFPropertyResponse.java index ebe0d1cfd0db..715d0e980ef4 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/TemplateOVFPropertyResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/TemplateOVFPropertyResponse.java @@ -27,43 +27,43 @@ public class TemplateOVFPropertyResponse extends BaseResponse { @SerializedName(ApiConstants.KEY) - @Param(description = "the ovf property key") + @Param(description = "The ovf property key") private String key; @SerializedName(ApiConstants.TYPE) - @Param(description = "the ovf property type") + @Param(description = "The ovf property type") private String type; @SerializedName(ApiConstants.VALUE) - @Param(description = "the ovf property value") + @Param(description = "The ovf property value") private String value; @SerializedName(ApiConstants.PASSWORD) - @Param(description = "is the ovf property a password") + @Param(description = "Is the ovf property a password") private Boolean password; @SerializedName(ApiConstants.QUALIFIERS) - @Param(description = "the ovf property qualifiers") + @Param(description = "The ovf property qualifiers") private String qualifiers; @SerializedName(ApiConstants.USER_CONFIGURABLE) - @Param(description = "is the ovf property user configurable") + @Param(description = "Is the ovf property user configurable") private Boolean userConfigurable; @SerializedName(ApiConstants.LABEL) - @Param(description = "the ovf property label") + @Param(description = "The ovf property label") private String label; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the ovf property label") + @Param(description = "The ovf property label") private String description; @SerializedName(ApiConstants.INDEX) - @Param(description = "the ovf property index") + @Param(description = "The ovf property index") private Integer index; @SerializedName(ApiConstants.CATEGORY) - @Param(description = "the ovf property category") + @Param(description = "The ovf property category") private String category; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/response/TemplatePermissionsResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/TemplatePermissionsResponse.java index 5f0b9a58c7c8..c489deaffe5b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/TemplatePermissionsResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/TemplatePermissionsResponse.java @@ -31,23 +31,23 @@ @SuppressWarnings("unused") public class TemplatePermissionsResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the template ID") + @Param(description = "The Template ID") private String id; @SerializedName(ApiConstants.IS_PUBLIC) - @Param(description = "true if this template is a public template, false otherwise") + @Param(description = "True if this Template is a public Template, false otherwise") private Boolean publicTemplate; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the ID of the domain to which the template belongs") + @Param(description = "The ID of the domain to which the Template belongs") private String domainId; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the list of accounts the template is available for") + @Param(description = "The list of Accounts the Template is available for") private List accountNames; @SerializedName(ApiConstants.PROJECT_IDS) - @Param(description = "the list of projects the template is available for") + @Param(description = "The list of projects the Template is available for") private List projectIds; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/TemplateResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/TemplateResponse.java index a94dbd95a56f..2e706586f01d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/TemplateResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/TemplateResponse.java @@ -36,153 +36,153 @@ @SuppressWarnings("unused") public class TemplateResponse extends BaseResponseWithTagInformation implements ControlledViewEntityResponse, SetResourceIconResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the template ID") + @Param(description = "The Template ID") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the template name") + @Param(description = "The Template name") private String name; @SerializedName(ApiConstants.DISPLAY_TEXT) - @Param(description = "the template display text") + @Param(description = "The Template display text") private String displayText; @SerializedName(ApiConstants.IS_PUBLIC) // propName="public" (FIXME: this used to be part of Param annotation, do we need it?) - @Param(description = "true if this template is a public template, false otherwise") + @Param(description = "True if this Template is a public Template, false otherwise") private boolean isPublic; @SerializedName(ApiConstants.CREATED) - @Param(description = "the date this template was created") + @Param(description = "The date this Template was created") private Date created; @SerializedName(ApiConstants.REMOVED) - @Param(description = "the date this template was removed") + @Param(description = "The date this Template was removed") private Date removed; @SerializedName(ApiConstants.IS_READY) // propName="ready" (FIXME: this used to be part of Param annotation, do we need it?) - @Param(description = "true if the template is ready to be deployed from, false otherwise.") + @Param(description = "True if the Template is ready to be deployed from, false otherwise.") private boolean isReady; @SerializedName(ApiConstants.PASSWORD_ENABLED) - @Param(description = "true if the reset password feature is enabled, false otherwise") + @Param(description = "True if the reset password feature is enabled, false otherwise") private Boolean passwordEnabled; @SerializedName(ApiConstants.FORMAT) - @Param(description = "the format of the template.") + @Param(description = "The format of the Template.") private ImageFormat format; @SerializedName(ApiConstants.BOOTABLE) - @Param(description = "true if the ISO is bootable, false otherwise") + @Param(description = "True if the ISO is bootable, false otherwise") private Boolean bootable; @SerializedName(ApiConstants.IS_FEATURED) - @Param(description = "true if this template is a featured template, false otherwise") + @Param(description = "True if this Template is a featured Template, false otherwise") private boolean featured; @SerializedName(ApiConstants.CROSS_ZONES) - @Param(description = "true if the template is managed across all Zones, false otherwise") + @Param(description = "True if the Template is managed across all Zones, false otherwise") private boolean crossZones; @SerializedName(ApiConstants.OS_TYPE_ID) - @Param(description = "the ID of the OS type for this template.") + @Param(description = "The ID of the OS type for this Template.") private String osTypeId; @SerializedName("ostypename") - @Param(description = "the name of the OS type for this template.") + @Param(description = "The name of the OS type for this Template.") private String osTypeName; private transient Long osTypeCategoryId; @SerializedName(ApiConstants.ACCOUNT_ID) - @Param(description = "the account id to which the template belongs") + @Param(description = "The Account id to which the Template belongs") private String accountId; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account name to which the template belongs") + @Param(description = "The Account name to which the Template belongs") private String account; //TODO: since a template can be associated to more than one zones, this model is not accurate. For backward-compatibility, keep these fields // here, but add a zones field to capture multiple zones. @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the ID of the zone for this template") + @Param(description = "The ID of the zone for this Template") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the name of the zone for this template") + @Param(description = "The name of the zone for this Template") private String zoneName; @SerializedName(ApiConstants.STATUS) - @Param(description = "the status of the template") + @Param(description = "The status of the Template") private String status; @SerializedName(ApiConstants.SIZE) - @Param(description = "the size of the template") + @Param(description = "The size of the Template") private Long size; @SerializedName(ApiConstants.PHYSICAL_SIZE) - @Param(description = "the physical size of the template") + @Param(description = "The physical size of the Template") private Long physicalSize; @SerializedName(ApiConstants.TEMPLATE_TYPE) - @Param(description = "the type of the template") + @Param(description = "The type of the Template") private String templateType; @SerializedName(ApiConstants.HYPERVISOR) - @Param(description = "the hypervisor on which the template runs") + @Param(description = "The hypervisor on which the Template runs") private String hypervisor; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the name of the domain to which the template belongs") + @Param(description = "The name of the domain to which the Template belongs") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the Domain the template belongs to", since = "4.19.2.0") + @Param(description = "Path of the Domain the template belongs to", since = "4.19.2.0") private String domainPath; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the ID of the domain to which the template belongs") + @Param(description = "The ID of the domain to which the Template belongs") private String domainId; @SerializedName(ApiConstants.IS_EXTRACTABLE) - @Param(description = "true if the template is extractable, false otherwise") + @Param(description = "True if the Template is extractable, false otherwise") private Boolean extractable; @SerializedName(ApiConstants.CHECKSUM) - @Param(description = "checksum of the template") + @Param(description = "Checksum of the Template") private String checksum; @SerializedName(ApiConstants.SOURCETEMPLATEID) - @Param(description = "the template ID of the parent template if present") + @Param(description = "The Template ID of the parent Template if present") private String sourcetemplateId; @SerializedName(ApiConstants.HOST_ID) - @Param(description = "the ID of the secondary storage host for the template") + @Param(description = "The ID of the secondary storage host for the Template") private String hostId; @SerializedName(ApiConstants.HOST_NAME) - @Param(description = "the name of the secondary storage host for the template") + @Param(description = "The name of the secondary storage host for the Template") private String hostName; @SerializedName(ApiConstants.TEMPLATE_TAG) - @Param(description = "the tag of this template") + @Param(description = "The tag of this Template") private String templateTag; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the template") + @Param(description = "The project ID of the Template") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the template") + @Param(description = "The project name of the Template") private String projectName; @SerializedName(ApiConstants.DETAILS) - @Param(description = "additional key/value details tied with template") + @Param(description = "Additional key/value details tied with Template") private Map details; @SerializedName(ApiConstants.DOWNLOAD_DETAILS) - @Param(description = "Lists the download progress of a template across all secondary storages") + @Param(description = "Lists the download progress of a Template across all secondary storages") private List> downloadDetails; @SerializedName(ApiConstants.ARCH) @@ -190,23 +190,23 @@ public class TemplateResponse extends BaseResponseWithTagInformation implements private String arch; @SerializedName(ApiConstants.BITS) - @Param(description = "the processor bit size", since = "4.10") + @Param(description = "The processor bit size", since = "4.10") private int bits; @SerializedName(ApiConstants.SSHKEY_ENABLED) - @Param(description = "true if template is sshkey enabled, false otherwise") + @Param(description = "True if Template is sshkey enabled, false otherwise") private Boolean sshKeyEnabled; @SerializedName(ApiConstants.IS_DYNAMICALLY_SCALABLE) - @Param(description = "true if template contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory") + @Param(description = "True if Template contains XS/VMWare tools in order to support dynamic scaling of Instance CPU/memory") private Boolean isDynamicallyScalable; @SerializedName(ApiConstants.DIRECT_DOWNLOAD) - @Param(description = "KVM Only: true if template is directly downloaded to Primary Storage bypassing Secondary Storage") + @Param(description = "KVM Only: true if Template is directly downloaded to Primary Storage bypassing Secondary Storage") private Boolean directDownload; @SerializedName(ApiConstants.DEPLOY_AS_IS) - @Param(description = "VMware only: true if template is deployed without orchestrating disks and networks but \"as-is\" defined in the template.", + @Param(description = "VMware only: true if Template is deployed without orchestrating disks and Networks but \"as-is\" defined in the Template.", since = "4.15") private Boolean deployAsIs; @@ -216,42 +216,42 @@ public class TemplateResponse extends BaseResponseWithTagInformation implements private Boolean forCks; @SerializedName(ApiConstants.DEPLOY_AS_IS_DETAILS) - @Param(description = "VMware only: additional key/value details tied with deploy-as-is template", + @Param(description = "VMware only: additional key/value details tied with deploy-as-is Template", since = "4.15") private Map deployAsIsDetails; @SerializedName("parenttemplateid") - @Param(description = "if Datadisk template, then id of the root disk template this template belongs to") + @Param(description = "If Datadisk Template, then id of the root disk Template this Template belongs to") @Deprecated(since = "4.15") private String parentTemplateId; @SerializedName("childtemplates") - @Param(description = "if root disk template, then ids of the datas disk templates this template owns") + @Param(description = "If root disk Template, then IDs of the datas disk Templates this Template owns") @Deprecated(since = "4.15") private Set childTemplates; @SerializedName(ApiConstants.REQUIRES_HVM) - @Param(description = "true if template requires HVM enabled, false otherwise") + @Param(description = "True if Template requires HVM enabled, false otherwise") private Boolean requiresHvm; @SerializedName(ApiConstants.URL) - @Param(description = "the URL which the template/iso is registered from") + @Param(description = "The URL which the Template/ISO is registered from") private String url; @SerializedName(ApiConstants.RESOURCE_ICON) @Param(description = "Base64 string representation of the resource icon", since = "4.16.0.0") ResourceIconResponse icon; - @SerializedName(ApiConstants.USER_DATA_ID) @Param(description="the id of userdata linked to this template", since = "4.18.0") + @SerializedName(ApiConstants.USER_DATA_ID) @Param(description = "The id of userdata linked to this Template", since = "4.18.0") private String userDataId; - @SerializedName(ApiConstants.USER_DATA_NAME) @Param(description="the name of userdata linked to this template", since = "4.18.0") + @SerializedName(ApiConstants.USER_DATA_NAME) @Param(description = "The name of userdata linked to this Template", since = "4.18.0") private String userDataName; - @SerializedName(ApiConstants.USER_DATA_POLICY) @Param(description="the userdata override policy with the userdata provided while deploying VM", since = "4.18.0") + @SerializedName(ApiConstants.USER_DATA_POLICY) @Param(description = "The userdata override policy with the userdata provided while deploying Instance", since = "4.18.0") private String userDataPolicy; - @SerializedName(ApiConstants.USER_DATA_PARAMS) @Param(description="list of parameters which contains the list of keys or string parameters that are needed to be passed for any variables declared in userdata", since = "4.18.0") + @SerializedName(ApiConstants.USER_DATA_PARAMS) @Param(description = "List of parameters which contains the list of keys or string parameters that are needed to be passed for any variables declared in userdata", since = "4.18.0") private String userDataParams; @SerializedName(ApiConstants.EXTENSION_ID) @Param(description="The ID of extension linked to this template", since = "4.21.0") diff --git a/api/src/main/java/org/apache/cloudstack/api/response/TrafficMonitorResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/TrafficMonitorResponse.java index b19c422a5af0..0251b2ab4550 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/TrafficMonitorResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/TrafficMonitorResponse.java @@ -26,23 +26,23 @@ public class TrafficMonitorResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the external firewall") + @Param(description = "The ID of the external firewall") private String id; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the zone ID of the external firewall") + @Param(description = "The zone ID of the external firewall") private String zoneId; @SerializedName(ApiConstants.IP_ADDRESS) - @Param(description = "the management IP address of the external firewall") + @Param(description = "The management IP address of the external firewall") private String ipAddress; @SerializedName(ApiConstants.NUM_RETRIES) - @Param(description = "the number of times to retry requests to the external firewall") + @Param(description = "The number of times to retry requests to the external firewall") private String numRetries; @SerializedName(ApiConstants.TIMEOUT) - @Param(description = "the timeout (in seconds) for requests to the external firewall") + @Param(description = "The timeout (in seconds) for requests to the external firewall") private String timeout; public String getId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/TrafficTypeImplementorResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/TrafficTypeImplementorResponse.java index ebcd7c9a0d4b..29512c2cdd5d 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/TrafficTypeImplementorResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/TrafficTypeImplementorResponse.java @@ -25,11 +25,11 @@ public class TrafficTypeImplementorResponse extends BaseResponse { @SerializedName(ApiConstants.TRAFFIC_TYPE) - @Param(description = "network traffic type") + @Param(description = "Network traffic type") private String trafficType; @SerializedName(ApiConstants.TRAFFIC_TYPE_IMPLEMENTOR) - @Param(description = "implementor of network traffic type") + @Param(description = "Implementor of Network traffic type") private String implementor; public void setTrafficType(String type) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/TrafficTypeResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/TrafficTypeResponse.java index 9a79b0724658..2b8af97f160e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/TrafficTypeResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/TrafficTypeResponse.java @@ -29,35 +29,43 @@ public class TrafficTypeResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "id of the network provider") + @Param(description = "ID of the Network provider") private String id; @SerializedName(ApiConstants.TRAFFIC_TYPE) - @Param(description = "the trafficType to be added to the physical network") + @Param(description = "The trafficType to be added to the physical Network") private String trafficType; @SerializedName(ApiConstants.PHYSICAL_NETWORK_ID) - @Param(description = "the physical network this belongs to") + @Param(description = "The physical Network this belongs to") private String physicalNetworkId; @SerializedName(ApiConstants.XENSERVER_NETWORK_LABEL) - @Param(description = "The network name label of the physical device dedicated to this traffic on a XenServer host") + @Param(description = "The Network name label of the physical device dedicated to this traffic on a XenServer host") private String xenNetworkLabel; @SerializedName(ApiConstants.KVM_NETWORK_LABEL) - @Param(description = "The network name label of the physical device dedicated to this traffic on a KVM host") + @Param(description = "The Network name label of the physical device dedicated to this traffic on a KVM host") private String kvmNetworkLabel; @SerializedName(ApiConstants.VMWARE_NETWORK_LABEL) - @Param(description = "The network name label of the physical device dedicated to this traffic on a VMware host") + @Param(description = "The Network name label of the physical device dedicated to this traffic on a VMware host") private String vmwareNetworkLabel; @SerializedName(ApiConstants.HYPERV_NETWORK_LABEL) - @Param(description = "The network name label of the physical device dedicated to this traffic on a HyperV host") + @Param(description = "The Network name label of the physical device dedicated to this traffic on a HyperV host") private String hypervNetworkLabel; + @SerializedName(ApiConstants.VLAN) + @Param(description = "The VLAN id to be used for Management traffic by VMware host") + private String vlan; + + @SerializedName(ApiConstants.ISOLATION_METHODS) + @Param(description = "isolation methods for the physical network traffic") + private String isolationMethods; + @SerializedName(ApiConstants.OVM3_NETWORK_LABEL) - @Param(description = "The network name of the physical device dedicated to this traffic on an OVM3 host") + @Param(description = "The Network name of the physical device dedicated to this traffic on an OVM3 host") private String ovm3NetworkLabel; @Override @@ -128,4 +136,20 @@ public String getOvm3Label() { public void setOvm3Label(String ovm3Label) { this.ovm3NetworkLabel = ovm3Label; } + + public String getIsolationMethods() { + return isolationMethods; + } + + public void setIsolationMethods(String isolationMethods) { + this.isolationMethods = isolationMethods; + } + + public String getVlan() { + return vlan; + } + + public void setVlan(String vlan) { + this.vlan = vlan; + } } diff --git a/api/src/main/java/org/apache/cloudstack/api/response/UnmanageVMInstanceResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/UnmanageVMInstanceResponse.java index bd95ecee5ae3..5b3f15b0ddce 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/UnmanageVMInstanceResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/UnmanageVMInstanceResponse.java @@ -25,11 +25,11 @@ public class UnmanageVMInstanceResponse extends BaseResponse { @SerializedName(ApiConstants.SUCCESS) - @Param(description = "result of the unmanage VM operation") + @Param(description = "Result of the unmanage Instance operation") private boolean success; @SerializedName(ApiConstants.DETAILS) - @Param(description = "details of the unmanage VM operation") + @Param(description = "Details of the unmanage Instance operation") private String details; @SerializedName(ApiConstants.HOST_ID) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/UnmanagedInstanceDiskResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/UnmanagedInstanceDiskResponse.java index 083c83fbf85a..4367164722b7 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/UnmanagedInstanceDiskResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/UnmanagedInstanceDiskResponse.java @@ -26,47 +26,47 @@ public class UnmanagedInstanceDiskResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the disk") + @Param(description = "The ID of the disk") private String diskId; @SerializedName(ApiConstants.LABEL) - @Param(description = "the label of the disk") + @Param(description = "The label of the disk") private String label; @SerializedName(ApiConstants.CAPACITY) - @Param(description = "the capacity of the disk in bytes") + @Param(description = "The capacity of the disk in bytes") private Long capacity; @SerializedName(ApiConstants.IMAGE_PATH) - @Param(description = "the file path of the disk image") + @Param(description = "The file path of the disk image") private String imagePath; @SerializedName(ApiConstants.CONTROLLER) - @Param(description = "the controller of the disk") + @Param(description = "The controller of the disk") private String controller; @SerializedName(ApiConstants.CONTROLLER_UNIT) - @Param(description = "the controller unit of the disk") + @Param(description = "The controller unit of the disk") private Integer controllerUnit; @SerializedName(ApiConstants.POSITION) - @Param(description = "the position of the disk") + @Param(description = "The position of the disk") private Integer position; @SerializedName(ApiConstants.DATASTORE_NAME) - @Param(description = "the controller of the disk") + @Param(description = "The controller of the disk") private String datastoreName; @SerializedName(ApiConstants.DATASTORE_HOST) - @Param(description = "the controller of the disk") + @Param(description = "The controller of the disk") private String datastoreHost; @SerializedName(ApiConstants.DATASTORE_PATH) - @Param(description = "the controller of the disk") + @Param(description = "The controller of the disk") private String datastorePath; @SerializedName(ApiConstants.DATASTORE_TYPE) - @Param(description = "the controller of the disk") + @Param(description = "The controller of the disk") private String datastoreType; public String getDiskId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/UnmanagedInstanceResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/UnmanagedInstanceResponse.java index c1156f5f23a5..195323b741d2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/UnmanagedInstanceResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/UnmanagedInstanceResponse.java @@ -32,11 +32,11 @@ public class UnmanagedInstanceResponse extends BaseResponse { @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the virtual machine") + @Param(description = "The name of the Instance") private String name; @SerializedName(ApiConstants.CLUSTER_ID) - @Param(description = "the ID of the cluster to which virtual machine belongs") + @Param(description = "The ID of the cluster to which Instance belongs") private String clusterId; @SerializedName(ApiConstants.CLUSTER_NAME) @@ -44,39 +44,39 @@ public class UnmanagedInstanceResponse extends BaseResponse { private String clusterName; @SerializedName(ApiConstants.HOST_ID) - @Param(description = "the ID of the host to which virtual machine belongs") + @Param(description = "The ID of the host to which Instance belongs") private String hostId; @SerializedName(ApiConstants.HOST_NAME) - @Param(description = "the name of the host to which virtual machine belongs") + @Param(description = "The name of the host to which Instance belongs") private String hostName; @SerializedName(ApiConstants.POWER_STATE) - @Param(description = "the power state of the virtual machine") + @Param(description = "The power state of the Instance") private String powerState; @SerializedName(ApiConstants.CPU_NUMBER) - @Param(description = "the CPU cores of the virtual machine") + @Param(description = "The CPU cores of the Instance") private Integer cpuCores; @SerializedName(ApiConstants.CPU_CORE_PER_SOCKET) - @Param(description = "the CPU cores per socket for the virtual machine. VMware specific") + @Param(description = "The CPU cores per socket for the Instance. VMware specific") private Integer cpuCoresPerSocket; @SerializedName(ApiConstants.CPU_SPEED) - @Param(description = "the CPU speed of the virtual machine") + @Param(description = "The CPU speed of the Instance") private Integer cpuSpeed; @SerializedName(ApiConstants.MEMORY) - @Param(description = "the memory of the virtual machine in MB") + @Param(description = "The memory of the Instance in MB") private Integer memory; @SerializedName(ApiConstants.OS_ID) - @Param(description = "the operating system ID of the virtual machine") + @Param(description = "The operating system ID of the Instance") private String operatingSystemId; @SerializedName(ApiConstants.OS_DISPLAY_NAME) - @Param(description = "the operating system of the virtual machine") + @Param(description = "The operating system of the Instance") private String operatingSystem; @SerializedName(ApiConstants.BOOT_MODE) @@ -88,11 +88,11 @@ public class UnmanagedInstanceResponse extends BaseResponse { private String bootType; @SerializedName(ApiConstants.DISK) - @Param(description = "the list of disks associated with the virtual machine", responseObject = UnmanagedInstanceDiskResponse.class) + @Param(description = "The list of disks associated with the Instance", responseObject = UnmanagedInstanceDiskResponse.class) private Set disks; @SerializedName(ApiConstants.NIC) - @Param(description = "the list of nics associated with the virtual machine", responseObject = NicResponse.class) + @Param(description = "The list of NICs associated with the Instance", responseObject = NicResponse.class) private Set nics; public UnmanagedInstanceResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/UsageRecordResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/UsageRecordResponse.java index 4aeded642871..21b421e66bfd 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/UsageRecordResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/UsageRecordResponse.java @@ -29,119 +29,119 @@ @SuppressWarnings("unused") public class UsageRecordResponse extends BaseResponseWithTagInformation implements ControlledEntityResponse { @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the user account name") + @Param(description = "The user Account name") private String accountName; @SerializedName(ApiConstants.ACCOUNT_ID) - @Param(description = "the user account Id") + @Param(description = "The user Account ID") private String accountId; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the resource") + @Param(description = "The project ID of the resource") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the resource") + @Param(description = "The project name of the resource") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID") + @Param(description = "The domain ID") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain the resource is associated with") + @Param(description = "The domain the resource is associated with") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the domain to which the usage reocrd belongs", since = "4.19.2.0") + @Param(description = "Path of the domain to which the usage reocrd belongs", since = "4.19.2.0") private String domainPath; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the zone ID") + @Param(description = "The zone ID") private String zoneId; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "description of the usage record") + @Param(description = "Description of the usage record") private String description; @SerializedName("usage") - @Param(description = "usage in hours") + @Param(description = "Usage in hours") private String usage; @SerializedName("usagetype") - @Param(description = "usage type ID") + @Param(description = "Usage type ID") private Integer usageType; @SerializedName("rawusage") - @Param(description = "raw usage in hours") + @Param(description = "Raw usage in hours") private String rawUsage; @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) - @Param(description = "virtual machine ID") + @Param(description = "Instance ID") private String virtualMachineId; @SerializedName(ApiConstants.NAME) - @Param(description = "resource or virtual machine name") + @Param(description = "Resource or Instance name") private String resourceName; @SerializedName("offeringid") - @Param(description = "offering ID") + @Param(description = "Offering ID") private String offeringId; @SerializedName(ApiConstants.TEMPLATE_ID) - @Param(description = "template ID") + @Param(description = "Template ID") private String templateId; @SerializedName(ApiConstants.OS_TYPE_ID) - @Param(description = "virtual machine os type ID") + @Param(description = "Instance os type ID") private String osTypeId; @SerializedName(ApiConstants.OS_DISPLAY_NAME) - @Param(description = "virtual machine os display name") + @Param(description = "Instance os display name") private String osDisplayName; @SerializedName(ApiConstants.OS_CATEGORY_ID) - @Param(description = "virtual machine guest os category ID") + @Param(description = "Instance guest os category ID") private String osCategoryId; @SerializedName(ApiConstants.OS_CATEGORY_NAME) - @Param(description = "virtual machine os category name") + @Param(description = "Instance os category name") private String osCategoryName; @SerializedName("usageid") - @Param(description = "id of the resource") + @Param(description = "ID of the resource") private String usageId; @SerializedName(ApiConstants.TYPE) - @Param(description = "resource type") + @Param(description = "Resource type") private String type; @SerializedName(ApiConstants.SIZE) - @Param(description = "resource size") + @Param(description = "Resource size") private Long size; @SerializedName("virtualsize") - @Param(description = "virtual size of resource") + @Param(description = "Virtual size of resource") private Long virtualSize; @SerializedName(ApiConstants.CPU_NUMBER) - @Param(description = "number of cpu of resource") + @Param(description = "Number of CPU of resource") private Long cpuNumber; @SerializedName(ApiConstants.CPU_SPEED) - @Param(description = "speed of each cpu of resource") + @Param(description = "Speed of each CPU of resource") private Long cpuSpeed; @SerializedName(ApiConstants.MEMORY) - @Param(description = "memory allocated for the resource") + @Param(description = "Memory allocated for the resource") private Long memory; @SerializedName(ApiConstants.START_DATE) - @Param(description = "start date of the usage record") + @Param(description = "Start date of the usage record") private Date startDate; @SerializedName(ApiConstants.END_DATE) - @Param(description = "end date of the usage record") + @Param(description = "End date of the usage record") private Date endDate; @SerializedName("issourcenat") @@ -149,11 +149,11 @@ public class UsageRecordResponse extends BaseResponseWithTagInformation implemen private Boolean isSourceNat; @SerializedName(ApiConstants.IS_SYSTEM) - @Param(description = "True if the IPAddress is system IP - allocated during vm deploy or lb rule create") + @Param(description = "True if the IPAddress is system IP - allocated during Instance deploy or LB rule create") private Boolean isSystem; @SerializedName("networkid") - @Param(description = "id of the network") + @Param(description = "ID of the Network") private String networkId; @SerializedName("isdefault") @@ -161,7 +161,7 @@ public class UsageRecordResponse extends BaseResponseWithTagInformation implemen private Boolean isDefault; @SerializedName("vpcid") - @Param(description = "id of the vpc") + @Param(description = "ID of the VPC") private String vpcId; public UsageRecordResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/UserDataResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/UserDataResponse.java index ce344596aebc..5871ae6ee7a2 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/UserDataResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/UserDataResponse.java @@ -34,34 +34,34 @@ public class UserDataResponse extends BaseResponseWithAnnotations implements Con @Param(description = "Name of the User Data") private String name; - @SerializedName(ApiConstants.ACCOUNT_ID) @Param(description="the owner id of the User Data") + @SerializedName(ApiConstants.ACCOUNT_ID) @Param(description="The owner id of the User Data") private String accountId; - @SerializedName(ApiConstants.ACCOUNT) @Param(description="the owner of the User Data") + @SerializedName(ApiConstants.ACCOUNT) @Param(description="The owner of the User Data") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the User Data", since = "4.19.1") + @Param(description = "The project id of the User Data", since = "4.19.1") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the User Data", since = "4.19.1") + @Param(description = "The project name of the User Data", since = "4.19.1") private String projectName; - @SerializedName(ApiConstants.DOMAIN_ID) @Param(description="the domain id of the User Data owner") + @SerializedName(ApiConstants.DOMAIN_ID) @Param(description="The domain id of the User Data owner") private String domainId; - @SerializedName(ApiConstants.DOMAIN) @Param(description="the domain name of the User Data owner") + @SerializedName(ApiConstants.DOMAIN) @Param(description="The domain name of the User Data owner") private String domain; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the domain to which the User Data owner belongs", since = "4.19.2.0") + @Param(description = "Path of the domain to which the User Data owner belongs", since = "4.19.2.0") private String domainPath; - @SerializedName(ApiConstants.USER_DATA) @Param(description="base64 encoded User Data content") + @SerializedName(ApiConstants.USER_DATA) @Param(description="Base64 encoded User Data content") private String userData; - @SerializedName(ApiConstants.PARAMS) @Param(description="list of parameters which contains the list of keys or string parameters that are needed to be passed for any variables declared in the User Data") + @SerializedName(ApiConstants.PARAMS) @Param(description="List of parameters which contains the list of keys or string parameters that are needed to be passed for any variables declared in the User Data") private String params; public UserDataResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/UserResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/UserResponse.java index 5e4e6e1f3c8b..3b1c1a10885a 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/UserResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/UserResponse.java @@ -32,88 +32,88 @@ @EntityReference(value = User.class) public class UserResponse extends BaseResponse implements SetResourceIconResponse { @SerializedName("id") - @Param(description = "the user ID") + @Param(description = "The user ID") private String id; @SerializedName("username") - @Param(description = "the user name") + @Param(description = "The user name") private String username; @SerializedName("firstname") - @Param(description = "the user firstname") + @Param(description = "The user firstname") private String firstname; @SerializedName("lastname") - @Param(description = "the user lastname") + @Param(description = "The user lastname") private String lastname; @SerializedName("email") - @Param(description = "the user email address") + @Param(description = "The user email address") private String email; @SerializedName("created") - @Param(description = "the date and time the user account was created") + @Param(description = "The date and time the user Account was created") private Date created; @SerializedName("state") - @Param(description = "the user state") + @Param(description = "The user state") private String state; @SerializedName("account") - @Param(description = "the account name of the user") + @Param(description = "The Account name of the user") private String accountName; @SerializedName("accounttype") - @Param(description = "the account type of the user") + @Param(description = "The Account type of the user") private Integer accountType; @SerializedName(ApiConstants.USER_SOURCE) - @Param(description = "the source type of the user in lowercase, such as native, ldap, saml2") + @Param(description = "The source type of the user in lowercase, such as native, ldap, saml2") private String userSource; @SerializedName(ApiConstants.ROLE_ID) - @Param(description = "the ID of the role") + @Param(description = "The ID of the role") private String roleId; @SerializedName(ApiConstants.ROLE_TYPE) - @Param(description = "the type of the role") + @Param(description = "The type of the role") private String roleType; @SerializedName(ApiConstants.ROLE_NAME) - @Param(description = "the name of the role") + @Param(description = "The name of the role") private String roleName; @SerializedName("domainid") - @Param(description = "the domain ID of the user") + @Param(description = "The domain ID of the user") private String domainId; @SerializedName("domain") - @Param(description = "the domain name of the user") + @Param(description = "The domain name of the user") private String domainName; @SerializedName("timezone") - @Param(description = "the timezone user was created in") + @Param(description = "The timezone user was created in") private String timezone; @SerializedName("apikey") - @Param(description = "the api key of the user", isSensitive = true) + @Param(description = "The API key of the user", isSensitive = true) private String apiKey; @Deprecated @SerializedName("secretkey") - @Param(description = "the secret key of the user", isSensitive = true) + @Param(description = "The secret key of the user", isSensitive = true) private String secretKey; @SerializedName("accountid") - @Param(description = "the account ID of the user") + @Param(description = "The Account ID of the user") private String accountId; @SerializedName("iscallerchilddomain") - @Param(description = "the boolean value representing if the updating target is in caller's child domain") + @Param(description = "The boolean value representing if the updating target is in caller's child domain") private boolean isCallerChildDomain; @SerializedName(ApiConstants.IS_DEFAULT) - @Param(description = "true if user is default, false otherwise", since = "4.2.0") + @Param(description = "True if user is default, false otherwise", since = "4.2.0") private Boolean isDefault; @SerializedName(ApiConstants.RESOURCE_ICON) @@ -121,15 +121,15 @@ public class UserResponse extends BaseResponse implements SetResourceIconRespons ResourceIconResponse icon; @SerializedName(ApiConstants.IS_2FA_ENABLED) - @Param(description = "true if user has two factor authentication enabled", since = "4.18.0.0") + @Param(description = "True if user has two factor authentication enabled", since = "4.18.0.0") private Boolean is2FAenabled; @SerializedName(ApiConstants.IS_2FA_MANDATED) - @Param(description = "true if user has two factor authentication is mandated", since = "4.18.0.0") + @Param(description = "True if user has two factor authentication is mandated", since = "4.18.0.0") private Boolean is2FAmandated; @SerializedName(ApiConstants.API_KEY_ACCESS) - @Param(description = "whether api key access is Enabled, Disabled or set to Inherit (it inherits the value from the parent)", since = "4.20.1.0") + @Param(description = "Whether api key access is Enabled, Disabled or set to Inherit (it inherits the value from the parent)", since = "4.20.1.0") ApiConstants.ApiKeyAccess apiKeyAccess; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/response/UserTwoFactorAuthenticationSetupResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/UserTwoFactorAuthenticationSetupResponse.java index 35beefde4031..43118a4c474b 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/UserTwoFactorAuthenticationSetupResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/UserTwoFactorAuthenticationSetupResponse.java @@ -26,19 +26,19 @@ public class UserTwoFactorAuthenticationSetupResponse extends BaseResponse { @SerializedName("id") - @Param(description = "the user ID") + @Param(description = "The user ID") private String id; @SerializedName("username") - @Param(description = "the user name") + @Param(description = "The user name") private String username; @SerializedName("accountid") - @Param(description = "the account ID of the user") + @Param(description = "The Account ID of the user") private String accountId; @SerializedName(ApiConstants.SECRET_CODE) - @Param(description = "secret code that needs to be registered with authenticator") + @Param(description = "Secret code that needs to be registered with authenticator") private String secretCode; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/UserTwoFactorAuthenticatorProviderResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/UserTwoFactorAuthenticatorProviderResponse.java index 4101dc375ed1..7b0057d66ea6 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/UserTwoFactorAuthenticatorProviderResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/UserTwoFactorAuthenticatorProviderResponse.java @@ -27,11 +27,11 @@ public class UserTwoFactorAuthenticatorProviderResponse extends BaseResponse { @SerializedName(ApiConstants.NAME) - @Param(description = "the user two factor authenticator provider name") + @Param(description = "The user two factor authenticator provider name") private String name; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the description of the user two factor authenticator provider") + @Param(description = "The description of the user two factor authenticator provider") private String description; public String getName() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java index 29681b5e38fc..745c0ba46832 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/UserVmResponse.java @@ -43,143 +43,143 @@ @EntityReference(value = {VirtualMachine.class, UserVm.class, VirtualRouter.class}) public class UserVmResponse extends BaseResponseWithTagInformation implements ControlledViewEntityResponse, SetResourceIconResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the virtual machine") + @Param(description = "The ID of the Instance") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the virtual machine") + @Param(description = "The name of the Instance") private String name; @SerializedName("displayname") - @Param(description = "user generated name. The name of the virtual machine is returned if no displayname exists.") + @Param(description = "User generated name. The name of the Instance is returned if no displayname exists.") private String displayName; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account associated with the virtual machine") + @Param(description = "The Account associated with the Instance") private String accountName; @SerializedName(ApiConstants.USER_ID) - @Param(description = "the user's ID who deployed the virtual machine") + @Param(description = "The User's ID who deployed the Instance") private String userId; @SerializedName(ApiConstants.USERNAME) - @Param(description = "the user's name who deployed the virtual machine") + @Param(description = "The User's name who deployed the Instance") private String userName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the vm") + @Param(description = "The project ID of the Instance") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the vm") + @Param(description = "The project name of the Instance") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the ID of the domain in which the virtual machine exists") + @Param(description = "The ID of the domain in which the Instance exists") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the name of the domain in which the virtual machine exists") + @Param(description = "The name of the domain in which the Instance exists") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the domain in which the virtual machine exists", since = "4.19.2.0") + @Param(description = "Path of the domain in which the virtual machine exists", since = "4.19.2.0") private String domainPath; @SerializedName(ApiConstants.CREATED) - @Param(description = "the date when this virtual machine was created") + @Param(description = "The date when this Instance was created") private Date created; @SerializedName("lastupdated") - @Param(description="the date when this virtual machine was updated last time", since="4.16.0") + @Param(description = "The date when this Instance was updated last time", since="4.16.0") private Date lastUpdated; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the virtual machine") + @Param(description = "The state of the Instance") private String state; @SerializedName(ApiConstants.HA_ENABLE) - @Param(description = "true if high-availability is enabled, false otherwise") + @Param(description = "True if high-availability is enabled, false otherwise") private Boolean haEnable; @SerializedName(ApiConstants.GROUP_ID) - @Param(description = "the group ID of the virtual machine") + @Param(description = "The group ID of the Instance") private String groupId; @SerializedName(ApiConstants.GROUP) - @Param(description = "the group name of the virtual machine") + @Param(description = "The group name of the Instance") private String group; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the ID of the availability zone for the virtual machine") + @Param(description = "The ID of the availability zone for the Instance") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the name of the availability zone for the virtual machine") + @Param(description = "The name of the availability zone for the Instance") private String zoneName; @SerializedName(ApiConstants.HOST_ID) - @Param(description = "the ID of the host for the virtual machine") + @Param(description = "The ID of the host for the Instance") private String hostId; @SerializedName("hostname") - @Param(description = "the name of the host for the virtual machine") + @Param(description = "The name of the host for the Instance") private String hostName; @SerializedName(ApiConstants.HOST_CONTROL_STATE) - @Param(description = "the control state of the host for the virtual machine") + @Param(description = "The control state of the host for the Instance") private String hostControlState; @SerializedName(ApiConstants.TEMPLATE_ID) - @Param(description = "the ID of the template for the virtual machine. A -1 is returned if the virtual machine was created from an ISO file.") + @Param(description = "The ID of the Template for the Instance. A -1 is returned if the Instance was created from an ISO file.") private String templateId; @SerializedName("templatename") - @Param(description = "the name of the template for the virtual machine") + @Param(description = "The name of the Template for the Instance") private String templateName; @SerializedName(ApiConstants.TEMPLATE_TYPE) - @Param(description = "the type of the template for the virtual machine", since = "4.19.0") + @Param(description = "The type of the template for the virtual machine", since = "4.19.0") private String templateType; @SerializedName(ApiConstants.TEMPLATE_FORMAT) - @Param(description = "the format of the template for the virtual machine", since = "4.19.1") + @Param(description = "The format of the template for the virtual machine", since = "4.19.1") private String templateFormat; @SerializedName("templatedisplaytext") - @Param(description = " an alternate display text of the template for the virtual machine") + @Param(description = "An alternate display text of the Template for the Instance") private String templateDisplayText; @SerializedName(ApiConstants.PASSWORD_ENABLED) - @Param(description = "true if the password rest feature is enabled, false otherwise") + @Param(description = "True if the password rest feature is enabled, false otherwise") private Boolean passwordEnabled; @SerializedName("isoid") - @Param(description = "the ID of the ISO attached to the virtual machine") + @Param(description = "The ID of the ISO attached to the Instance") private String isoId; @SerializedName("isoname") - @Param(description = "the name of the ISO attached to the virtual machine") + @Param(description = "The name of the ISO attached to the Instance") private String isoName; @SerializedName("isodisplaytext") - @Param(description = "an alternate display text of the ISO attached to the virtual machine") + @Param(description = "An alternate display text of the ISO attached to the Instance") private String isoDisplayText; @SerializedName(ApiConstants.SERVICE_OFFERING_ID) - @Param(description = "the ID of the service offering of the virtual machine") + @Param(description = "The ID of the service offering of the Instance") private String serviceOfferingId; @SerializedName("serviceofferingname") - @Param(description = "the name of the service offering of the virtual machine") + @Param(description = "The name of the service offering of the Instance") private String serviceOfferingName; @SerializedName(ApiConstants.DISK_OFFERING_ID) - @Param(description = "the ID of the disk offering of the virtual machine. This parameter should not be used for retrieving disk offering details of DATA volumes. Use listVolumes API instead", since = "4.4") + @Param(description = "The ID of the disk offering of the Instance. This parameter should not be used for retrieving disk offering details of DATA volumes. Use listVolumes API instead", since = "4.4") private String diskOfferingId; @SerializedName("diskofferingname") - @Param(description = "the name of the disk offering of the virtual machine. This parameter should not be used for retrieving disk offering details of DATA volumes. Use listVolumes API instead", since = "4.4") + @Param(description = "The name of the disk offering of the Instance. This parameter should not be used for retrieving disk offering details of DATA volumes. Use listVolumes API instead", since = "4.4") private String diskOfferingName; @SerializedName(ApiConstants.GPU_CARD_ID) @@ -219,99 +219,99 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co private Integer gpuCount; @SerializedName(ApiConstants.BACKUP_OFFERING_ID) - @Param(description = "the ID of the backup offering of the virtual machine", since = "4.14") + @Param(description = "The ID of the backup offering of the Instance", since = "4.14") private String backupOfferingId; @SerializedName(ApiConstants.BACKUP_OFFERING_NAME) - @Param(description = "the name of the backup offering of the virtual machine", since = "4.14") + @Param(description = "The name of the backup offering of the Instance", since = "4.14") private String backupOfferingName; @SerializedName("forvirtualnetwork") - @Param(description = "the virtual network for the service offering") + @Param(description = "The virtual Network for the service offering") private Boolean forVirtualNetwork; @SerializedName(ApiConstants.CPU_NUMBER) - @Param(description = "the number of vCPUs this virtual machine is using") + @Param(description = "The number of vCPUs this Instance is using") private Integer cpuNumber; @SerializedName(ApiConstants.CPU_SPEED) - @Param(description = "the speed of each vCPU") + @Param(description = "The speed of each vCPU") private Integer cpuSpeed; @SerializedName(ApiConstants.MEMORY) - @Param(description = "the memory allocated for the virtual machine") + @Param(description = "The memory allocated for the Instance") private Integer memory; @SerializedName(ApiConstants.VGPU) - @Param(description = "the vGPU type used by the virtual machine", since = "4.4") + @Param(description = "The vGPU type used by the Instance", since = "4.4") private String vgpu; @SerializedName("cpuused") - @Param(description = "the amount of the vm's CPU currently used") + @Param(description = "The amount of the Instance's CPU currently used") private String cpuUsed; @SerializedName("networkkbsread") - @Param(description = "the incoming network traffic on the VM in KiB") + @Param(description = "The incoming Network traffic on the Instance in KiB") private Long networkKbsRead; @SerializedName("networkkbswrite") - @Param(description = "the outgoing network traffic on the host in KiB") + @Param(description = "The outgoing Network traffic on the host in KiB") private Long networkKbsWrite; @SerializedName(ApiConstants.DISK_KBS_READ) - @Param(description = "the VM's disk read in KiB") + @Param(description = "The Instance's disk read in KiB") private Long diskKbsRead; @SerializedName(ApiConstants.DISK_KBS_WRITE) - @Param(description = "the VM's disk write in KiB") + @Param(description = "The Instance's disk write in KiB") private Long diskKbsWrite; @SerializedName("memorykbs") - @Param(description = "the memory used by the VM in KiB") + @Param(description = "The memory used by the Instance in KiB") private Long memoryKBs; @SerializedName("memoryintfreekbs") - @Param(description = "the internal memory (KiB) that's free in VM or zero if it can not be calculated") + @Param(description = "The internal memory (KiB) that's free in Instance or zero if it can not be calculated") private Long memoryIntFreeKBs; @SerializedName("memorytargetkbs") - @Param(description = "the target memory in VM (KiB)") + @Param(description = "The target memory in Instance (KiB)") private Long memoryTargetKBs; @SerializedName(ApiConstants.DISK_IO_READ) - @Param(description = "the read (IO) of disk on the VM") + @Param(description = "The read (IO) of disk on the Instance") private Long diskIORead; @SerializedName(ApiConstants.DISK_IO_WRITE) - @Param(description = "the write (IO) of disk on the VM") + @Param(description = "The write (IO) of disk on the Instance") private Long diskIOWrite; @SerializedName("guestosid") - @Param(description = "Os type ID of the virtual machine") + @Param(description = "OS type ID of the Instance") private String guestOsId; @SerializedName("rootdeviceid") - @Param(description = "device ID of the root volume") + @Param(description = "Device ID of the root volume") private Long rootDeviceId; @SerializedName("rootdevicetype") - @Param(description = "device type of the root volume") + @Param(description = "Device type of the root volume") private String rootDeviceType; @SerializedName("securitygroup") - @Param(description = "list of security groups associated with the virtual machine", responseObject = SecurityGroupResponse.class) + @Param(description = "List of security groups associated with the Instance", responseObject = SecurityGroupResponse.class) private Set securityGroupList; @SerializedName(ApiConstants.PASSWORD) - @Param(description = "the password (if exists) of the virtual machine", isSensitive = true) + @Param(description = "The password (if exists) of the Instance", isSensitive = true) private String password; @SerializedName("nic") - @Param(description = "the list of nics associated with vm", responseObject = NicResponse.class) + @Param(description = "The list of NICs associated with Instance", responseObject = NicResponse.class) private Set nics; @SerializedName("hypervisor") - @Param(description = "the hypervisor on which the template runs") + @Param(description = "The hypervisor on which the Template runs") private String hypervisor; @SerializedName(ApiConstants.IP_ADDRESS) @@ -319,41 +319,41 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co private String ipAddress; @SerializedName(ApiConstants.PUBLIC_IP_ID) - @Param(description = "public IP address id associated with vm via Static nat rule") + @Param(description = "Public IP address id associated with Instance via Static NAT rule") private String publicIpId; @SerializedName(ApiConstants.PUBLIC_IP) - @Param(description = "public IP address id associated with vm via Static nat rule") + @Param(description = "Public IP address id associated with Instance via Static NAT rule") private String publicIp; @SerializedName(ApiConstants.INSTANCE_NAME) - @Param(description = "instance name of the user vm; this parameter is returned to the ROOT admin only", since = "3.0.1") + @Param(description = "Instance name of the user Instance; this parameter is returned to the ROOT admin only", since = "3.0.1") private String instanceName; transient Set tagIds; @SerializedName(ApiConstants.DETAILS) - @Param(description = "Vm details in key/value pairs.", since = "4.2.1") + @Param(description = "Instance details in key/value pairs.", since = "4.2.1") private Map details; @SerializedName("readonlydetails") - @Param(description = "List of read-only Vm details as comma separated string.", since = "4.16.0") + @Param(description = "List of read-only Instance details as comma separated string.", since = "4.16.0") private String readOnlyDetails; @SerializedName(ApiConstants.SSH_KEYPAIRS) - @Param(description = "ssh key-pairs") + @Param(description = "SSH key-pairs") private String keyPairNames; @SerializedName("affinitygroup") - @Param(description = "list of affinity groups associated with the virtual machine", responseObject = AffinityGroupResponse.class) + @Param(description = "List of Affinity groups associated with the Instance", responseObject = AffinityGroupResponse.class) private Set affinityGroupList; @SerializedName(ApiConstants.DISPLAY_VM) - @Param(description = "an optional field whether to the display the vm to the end user or not.", authorized = {RoleType.Admin}) + @Param(description = "An optional field whether to the display the Instance to the end user or not.", authorized = {RoleType.Admin}) private Boolean displayVm; @SerializedName(ApiConstants.IS_DYNAMICALLY_SCALABLE) - @Param(description = "true if vm contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory.") + @Param(description = "True if Instance contains XS/VMWare tools in order to support dynamic scaling of Instance CPU/memory.") private Boolean isDynamicallyScalable; @SerializedName(ApiConstants.DELETE_PROTECTION) @@ -365,31 +365,31 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co private String serviceState; @SerializedName(ApiConstants.OS_TYPE_ID) - @Param(description = "OS type id of the vm", since = "4.4") + @Param(description = "OS type id of the Instance", since = "4.4") private String osTypeId; @SerializedName(ApiConstants.OS_DISPLAY_NAME) - @Param(description = "OS name of the vm", since = "4.13.2") + @Param(description = "OS name of the Instance", since = "4.13.2") private String osDisplayName; @SerializedName(ApiConstants.BOOT_MODE) - @Param(description = "Guest vm Boot Mode") + @Param(description = "Guest Instance Boot Mode") private String bootMode; @SerializedName(ApiConstants.BOOT_TYPE) - @Param(description = "Guest vm Boot Type") + @Param(description = "Guest Instance Boot Type") private String bootType; @SerializedName(ApiConstants.POOL_TYPE) - @Param(description = "the pool type of the virtual machine", since = "4.16") + @Param(description = "The pool type of the Instance", since = "4.16") private String poolType; @SerializedName(ApiConstants.RECEIVED_BYTES) - @Param(description = "the total number of network traffic bytes received") + @Param(description = "The total number of Network traffic bytes received") private Long bytesReceived; @SerializedName(ApiConstants.SENT_BYTES) - @Param(description = "the total number of network traffic bytes sent") + @Param(description = "The total number of Network traffic bytes sent") private Long bytesSent; @SerializedName(ApiConstants.RESOURCE_ICON) @@ -397,27 +397,27 @@ public class UserVmResponse extends BaseResponseWithTagInformation implements Co ResourceIconResponse resourceIconResponse; @SerializedName(ApiConstants.AUTOSCALE_VMGROUP_ID) - @Param(description = "ID of AutoScale VM group", since = "4.18.0") + @Param(description = "ID of AutoScale Instance group", since = "4.18.0") String autoScaleVmGroupId; @SerializedName(ApiConstants.AUTOSCALE_VMGROUP_NAME) - @Param(description = "Name of AutoScale VM group", since = "4.18.0") + @Param(description = "Name of AutoScale Instance group", since = "4.18.0") String autoScaleVmGroupName; @SerializedName(ApiConstants.USER_DATA) @Param(description = "Base64 string containing the user data", since = "4.18.0.0") private String userData; - @SerializedName(ApiConstants.USER_DATA_ID) @Param(description="the id of userdata used for the VM", since = "4.18.0") + @SerializedName(ApiConstants.USER_DATA_ID) @Param(description = "The ID of userdata used for the Instance", since = "4.18.0") private String userDataId; - @SerializedName(ApiConstants.USER_DATA_NAME) @Param(description="the name of userdata used for the VM", since = "4.18.0") + @SerializedName(ApiConstants.USER_DATA_NAME) @Param(description = "The name of userdata used for the Instance", since = "4.18.0") private String userDataName; - @SerializedName(ApiConstants.USER_DATA_POLICY) @Param(description="the userdata override policy with the userdata provided while deploying VM", since = "4.18.0") + @SerializedName(ApiConstants.USER_DATA_POLICY) @Param(description = "The userdata override policy with the userdata provided while deploying Instance", since = "4.18.0") private String userDataPolicy; - @SerializedName(ApiConstants.USER_DATA_DETAILS) @Param(description="list of variables and values for the variables declared in userdata", since = "4.18.0") + @SerializedName(ApiConstants.USER_DATA_DETAILS) @Param(description = "List of variables and values for the variables declared in userdata", since = "4.18.0") private String userDataDetails; @SerializedName(ApiConstants.VNF_NICS) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/VMScheduleResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/VMScheduleResponse.java index 813a48e572c5..6800c25b0234 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/VMScheduleResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/VMScheduleResponse.java @@ -30,19 +30,19 @@ @EntityReference(value = VMSchedule.class) public class VMScheduleResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of VM schedule") + @Param(description = "The ID of Instance schedule") private String id; @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) - @Param(description = "ID of virtual machine") + @Param(description = "ID of Instance") private String vmId; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "Description of VM schedule") + @Param(description = "Description of Instance schedule") private String description; @SerializedName(ApiConstants.SCHEDULE) - @Param(description = "Cron formatted VM schedule") + @Param(description = "Cron formatted Instance schedule") private String schedule; @SerializedName(ApiConstants.TIMEZONE) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/VMSnapshotResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/VMSnapshotResponse.java index 703f27b537c2..46d5c548eb0f 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/VMSnapshotResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/VMSnapshotResponse.java @@ -33,87 +33,87 @@ public class VMSnapshotResponse extends BaseResponseWithTagInformation implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the vm snapshot") + @Param(description = "The ID of the Instance Snapshot") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the vm snapshot") + @Param(description = "The name of the Instance Snapshot") private String name; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the vm snapshot") + @Param(description = "The state of the Instance Snapshot") private VMSnapshot.State state; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the description of the vm snapshot") + @Param(description = "The description of the Instance Snapshot") private String description; @SerializedName(ApiConstants.DISPLAY_NAME) - @Param(description = "the display name of the vm snapshot") + @Param(description = "The display name of the Instance Snapshot") private String displayName; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the Zone ID of the vm snapshot") + @Param(description = "The Zone ID of the Instance Snapshot") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the Zone name of the vm snapshot", since = "4.15.1") + @Param(description = "The Zone name of the Instance Snapshot", since = "4.15.1") private String zoneName; @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) - @Param(description = "the vm ID of the vm snapshot") + @Param(description = "The Instance ID of the Instance Snapshot") private String virtualMachineId; @SerializedName(ApiConstants.VIRTUAL_MACHINE_NAME) - @Param(description = "the vm name of the vm snapshot", since = "4.15.1") + @Param(description = "The Instance name of the Instance Snapshot", since = "4.15.1") private String virtualMachineName; @SerializedName("parent") - @Param(description = "the parent ID of the vm snapshot") + @Param(description = "The parent ID of the Instance Snapshot") private String parent; @SerializedName("parentName") - @Param(description = "the parent displayName of the vm snapshot") + @Param(description = "The parent displayName of the Instance Snapshot") private String parentName; @SerializedName("current") - @Param(description = "indicates if this is current snapshot") + @Param(description = "Indicates if this is current Snapshot") private Boolean current; @SerializedName("type") - @Param(description = "VM Snapshot type") + @Param(description = "Instance Snapshot type") private String type; @SerializedName(ApiConstants.CREATED) - @Param(description = "the create date of the vm snapshot") + @Param(description = "The create date of the Instance Snapshot") private Date created; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account associated with the disk volume") + @Param(description = "The Account associated with the disk volume") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the vpn") + @Param(description = "The project ID of the VPN") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the vpn") + @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") + @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") + @Param(description = "The domain associated with the disk volume") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the domain to which the disk volume belongs", since = "4.19.2.0") + @Param(description = "Path of the domain to which the disk volume belongs", since = "4.19.2.0") private String domainPath; @SerializedName(ApiConstants.HYPERVISOR) - @Param(description = "the type of hypervisor on which snapshot is stored") + @Param(description = "The type of hypervisor on which Snapshot is stored") private String hypervisor; public VMSnapshotResponse() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/VMUserDataResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/VMUserDataResponse.java index cf819491c2c0..4ff7891a8e27 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/VMUserDataResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/VMUserDataResponse.java @@ -26,11 +26,11 @@ public class VMUserDataResponse extends BaseResponse { @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) - @Param(description = "the ID of the virtual machine") + @Param(description = "The ID of the Instance") private String vmId; @SerializedName(ApiConstants.USER_DATA) - @Param(description = "Base64 encoded VM user data") + @Param(description = "Base64 encoded Instance User Data") private String userData; public void setUserData(String userData) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/VgpuResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/VgpuResponse.java index c51dc8d0f667..bf0968dd9bf1 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/VgpuResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/VgpuResponse.java @@ -46,15 +46,15 @@ public class VgpuResponse extends BaseResponse { private Long maxResolutionY; @SerializedName(ApiConstants.MAXVGPUPERPGPU) - @Param(description = "Maximum no. of vgpu per gpu card (pgpu)") + @Param(description = "Maximum no. of vGPU per GPU card (pgpu)") private Long maxVgpuPerPgpu; @SerializedName(ApiConstants.REMAININGCAPACITY) - @Param(description = "Remaining capacity in terms of no. of more VMs that can be deployped with this vGPU type") + @Param(description = "Remaining capacity in terms of no. of more Instances that can be deployed with this vGPU type") private Long remainingCapacity; @SerializedName(ApiConstants.MAXCAPACITY) - @Param(description = "Maximum vgpu can be created with this vgpu type on the given gpu group") + @Param(description = "Maximum vGPU can be created with this vGPU type on the given GPU group") private Long maxCapacity; public void setName(String name) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/VirtualRouterProviderResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/VirtualRouterProviderResponse.java index b9d18e238104..6d6be1677e45 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/VirtualRouterProviderResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/VirtualRouterProviderResponse.java @@ -29,11 +29,11 @@ @SuppressWarnings("unused") public class VirtualRouterProviderResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the id of the router") + @Param(description = "The ID of the router") private String id; @SerializedName(ApiConstants.NSP_ID) - @Param(description = "the physical network service provider id of the provider") + @Param(description = "The physical Network service provider ID of the provider") private String nspId; @SerializedName(ApiConstants.ENABLED) @@ -41,27 +41,27 @@ public class VirtualRouterProviderResponse extends BaseResponse implements Contr private Boolean enabled; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account associated with the provider") + @Param(description = "The Account associated with the provider") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the ipaddress") + @Param(description = "The project ID of the IP address") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the address") + @Param(description = "The project name of the address") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID associated with the provider") + @Param(description = "The domain ID associated with the provider") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain associated with the provider") + @Param(description = "The domain associated with the provider") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the domain to which the provider belongs", since = "4.19.2.0") + @Param(description = "Path of the domain to which the provider belongs", since = "4.19.2.0") private String domainPath; @Override diff --git a/api/src/main/java/org/apache/cloudstack/api/response/VlanIpRangeResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/VlanIpRangeResponse.java index 2be08bb7fcbb..9a171ef96ffc 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/VlanIpRangeResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/VlanIpRangeResponse.java @@ -28,103 +28,103 @@ @SuppressWarnings("unused") public class VlanIpRangeResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the VLAN IP range") + @Param(description = "The ID of the VLAN IP range") private String id; @SerializedName("forvirtualnetwork") - @Param(description = "the virtual network for the VLAN IP range") + @Param(description = "The virtual Network for the VLAN IP range") private Boolean forVirtualNetwork; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the Zone ID of the VLAN IP range") + @Param(description = "The Zone ID of the VLAN IP range") private String zoneId; @SerializedName(ApiConstants.VLAN) - @Param(description = "the ID or VID of the VLAN.") + @Param(description = "The ID or VID of the VLAN.") private String vlan; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account of the VLAN IP range") + @Param(description = "The Account of the VLAN IP range") private String accountName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID of the VLAN IP range") + @Param(description = "The domain ID of the VLAN IP range") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the VLAN IP range") + @Param(description = "The domain name of the VLAN IP range") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the domain to which the VLAN IP range belongs", since = "4.19.2.0") + @Param(description = "Path of the domain to which the VLAN IP range belongs", since = "4.19.2.0") private String domainPath; @SerializedName(ApiConstants.POD_ID) - @Param(description = "the Pod ID for the VLAN IP range") + @Param(description = "The Pod ID for the VLAN IP range") private String podId; @SerializedName("podname") - @Param(description = "the Pod name for the VLAN IP range") + @Param(description = "The Pod name for the VLAN IP range") private String podName; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the description of the VLAN IP range") + @Param(description = "The description of the VLAN IP range") private String description; @SerializedName(ApiConstants.GATEWAY) - @Param(description = "the gateway of the VLAN IP range") + @Param(description = "The gateway of the VLAN IP range") private String gateway; @SerializedName(ApiConstants.NETMASK) - @Param(description = "the netmask of the VLAN IP range") + @Param(description = "The netmask of the VLAN IP range") private String netmask; @SerializedName(ApiConstants.CIDR) - @Param(description = "the cidr of the VLAN IP range") + @Param(description = "The CIDR of the VLAN IP range") private String cidr; @SerializedName(ApiConstants.START_IP) - @Param(description = "the start ip of the VLAN IP range") + @Param(description = "The start IP of the VLAN IP range") private String startIp; @SerializedName(ApiConstants.END_IP) - @Param(description = "the end ip of the VLAN IP range") + @Param(description = "The end IP of the VLAN IP range") private String endIp; @SerializedName(ApiConstants.NETWORK_ID) - @Param(description = "the network id of vlan range") + @Param(description = "The Network ID of VLAN range") private String networkId; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the vlan range") + @Param(description = "The project ID of the VLAN range") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the vlan range") + @Param(description = "The project name of the VLAN range") private String projectName; @SerializedName(ApiConstants.PHYSICAL_NETWORK_ID) - @Param(description = "the physical network this belongs to") + @Param(description = "The physical Network this belongs to") private String physicalNetworkId; @SerializedName(ApiConstants.START_IPV6) - @Param(description = "the start ipv6 of the VLAN IP range") + @Param(description = "The start IPv6 of the VLAN IP range") private String startIpv6; @SerializedName(ApiConstants.END_IPV6) - @Param(description = "the end ipv6 of the VLAN IP range") + @Param(description = "The end IPv6 of the VLAN IP range") private String endIpv6; @SerializedName(ApiConstants.IP6_GATEWAY) - @Param(description = "the gateway of IPv6 network") + @Param(description = "The gateway of IPv6 Network") private String ip6Gateway; @SerializedName(ApiConstants.IP6_CIDR) - @Param(description = "the cidr of IPv6 network") + @Param(description = "The CIDR of IPv6 Network") private String ip6Cidr; @SerializedName(ApiConstants.FOR_SYSTEM_VMS) - @Param(description = "indicates whether VLAN IP range is dedicated to system vms or not") + @Param(description = "Indicates whether VLAN IP range is dedicated to System VMs or not") private Boolean forSystemVms; @SerializedName(ApiConstants.PROVIDER) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/VmwareDatacenterResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/VmwareDatacenterResponse.java index 3cf06f382428..3bfe61db5ff4 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/VmwareDatacenterResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/VmwareDatacenterResponse.java @@ -33,7 +33,7 @@ public class VmwareDatacenterResponse extends BaseResponse { private String id; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the Zone ID associated with this VMware Datacenter") + @Param(description = "The Zone ID associated with this VMware Datacenter") private Long zoneId; @SerializedName(ApiConstants.NAME) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/VolumeResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/VolumeResponse.java index 209ca57c50d2..058ea50f991e 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/VolumeResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/VolumeResponse.java @@ -38,7 +38,7 @@ public class VolumeResponse extends BaseResponseWithTagInformation implements Co private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "name of the disk volume") + @Param(description = "Name of the disk volume") private String name; @SerializedName(ApiConstants.ZONE_ID) @@ -46,103 +46,103 @@ public class VolumeResponse extends BaseResponseWithTagInformation implements Co private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "name of the availability zone") + @Param(description = "Name of the availability zone") private String zoneName; @SerializedName(ApiConstants.TYPE) - @Param(description = "type of the disk volume (ROOT or DATADISK)") + @Param(description = "Type of the disk volume (ROOT or DATADISK)") private String volumeType; @SerializedName(ApiConstants.DEVICE_ID) - @Param(description = "the ID of the device on user vm the volume is attahed to. This tag is not returned when the volume is detached.") + @Param(description = "The ID of the device on User Instance the volume is attached to. This tag is not returned when the volume is detached.") private Long deviceId; @SerializedName(ApiConstants.VIRTUAL_MACHINE_ID) - @Param(description = "id of the virtual machine") + @Param(description = "ID of the Instance") private String virtualMachineId; @SerializedName("isoid") - @Param(description = "the ID of the ISO attached to the virtual machine") + @Param(description = "The ID of the ISO attached to the Instance") private String isoId; @SerializedName("isoname") - @Param(description = "the name of the ISO attached to the virtual machine") + @Param(description = "The name of the ISO attached to the Instance") private String isoName; @SerializedName("isodisplaytext") - @Param(description = "an alternate display text of the ISO attached to the virtual machine") + @Param(description = "An alternate display text of the ISO attached to the Instance") private String isoDisplayText; @SerializedName(ApiConstants.TEMPLATE_ID) - @Param(description = "the ID of the template for the virtual machine. A -1 is returned if the virtual machine was created from an ISO file.") + @Param(description = "The ID of the Template for the Instance. A -1 is returned if the Instance was created from an ISO file.") private String templateId; @SerializedName("templatename") - @Param(description = "the name of the template for the virtual machine") + @Param(description = "The name of the Template for the Instance") private String templateName; @SerializedName("templatedisplaytext") - @Param(description = " an alternate display text of the template for the virtual machine") + @Param(description = "An alternate display text of the Template for the Instance") private String templateDisplayText; @SerializedName("vmname") - @Param(description = "name of the virtual machine") + @Param(description = "Name of the Instance") private String virtualMachineName; @SerializedName("vmdisplayname") - @Param(description = "display name of the virtual machine") + @Param(description = "Display name of the Instance") private String virtualMachineDisplayName; @SerializedName(ApiConstants.VIRTUAL_MACHINE_STATE) - @Param(description = "state of the virtual machine") + @Param(description = "State of the Instance") private String virtualMachineState; @SerializedName(ApiConstants.VM_TYPE) - @Param(description = "type of the virtual machine") + @Param(description = "Type of the Instance") private String vmType; @SerializedName(ApiConstants.PROVISIONINGTYPE) - @Param(description = "provisioning type used to create volumes.") + @Param(description = "Provisioning type used to create volumes.") private String provisioningType; @SerializedName(ApiConstants.SIZE) - @Param(description = "size of the disk volume") + @Param(description = "Size of the disk volume") private Long size; @SerializedName(ApiConstants.MIN_IOPS) - @Param(description = "min iops of the disk volume") + @Param(description = "Min IOPS of the disk volume") private Long minIops; @SerializedName(ApiConstants.MAX_IOPS) - @Param(description = "max iops of the disk volume") + @Param(description = "Max IOPS of the disk volume") private Long maxIops; @SerializedName(ApiConstants.CREATED) - @Param(description = "the date the disk volume was created") + @Param(description = "The date the disk volume was created") private Date created; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the disk volume") + @Param(description = "The state of the disk volume") private String state; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account associated with the disk volume") + @Param(description = "The Account associated with the disk volume") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the vpn") + @Param(description = "The project id of the VPN") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the vpn") + @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") + @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") + @Param(description = "The domain associated with the disk volume") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) @@ -150,15 +150,15 @@ public class VolumeResponse extends BaseResponseWithTagInformation implements Co private String domainPath; @SerializedName("storagetype") - @Param(description = "shared or local storage") + @Param(description = "Shared or local storage") private String storageType; @SerializedName("diskBytesReadRate") - @Param(description = "bytes read rate of the disk volume") + @Param(description = "Bytes read rate of the disk volume") private Long bytesReadRate; @SerializedName("diskBytesWriteRate") - @Param(description = "bytes write rate of the disk volume") + @Param(description = "Bytes write rate of the disk volume") private Long bytesWriteRate; @SerializedName("diskIopsReadRate") @@ -170,19 +170,19 @@ public class VolumeResponse extends BaseResponseWithTagInformation implements Co private Long iopsWriteRate; @SerializedName(ApiConstants.DISK_KBS_READ) - @Param(description = "the VM's disk read in KiB") + @Param(description = "The Instance's disk read in KiB") private Long diskKbsRead; @SerializedName(ApiConstants.DISK_KBS_WRITE) - @Param(description = "the VM's disk write in KiB") + @Param(description = "The Instance's disk write in KiB") private Long diskKbsWrite; @SerializedName(ApiConstants.DISK_IO_READ) - @Param(description = "the read (IO) of disk on the vm") + @Param(description = "The read (IO) of disk on the Instance") private Long diskIORead; @SerializedName(ApiConstants.DISK_IO_WRITE) - @Param(description = "the write (IO) of disk on the vm") + @Param(description = "The write (IO) of disk on the Instance") private Long diskIOWrite; @SerializedName(ApiConstants.HYPERVISOR) @@ -194,27 +194,27 @@ public class VolumeResponse extends BaseResponseWithTagInformation implements Co private String diskOfferingId; @SerializedName("diskofferingname") - @Param(description = "name of the disk offering") + @Param(description = "Name of the disk offering") private String diskOfferingName; @SerializedName("diskofferingdisplaytext") - @Param(description = "the display text of the disk offering") + @Param(description = "The display text of the disk offering") private String diskOfferingDisplayText; @SerializedName("storage") - @Param(description = "name of the primary storage hosting the disk volume") + @Param(description = "Name of the primary storage hosting the disk volume") private String storagePoolName; @SerializedName(ApiConstants.SNAPSHOT_ID) - @Param(description = "ID of the snapshot from which this volume was created") + @Param(description = "ID of the Snapshot from which this volume was created") private String snapshotId; @SerializedName("attached") - @Param(description = "the date the volume was attached to a VM instance") + @Param(description = "The date the volume was attached to an Instance") private Date attached; @SerializedName("destroyed") - @Param(description = "the boolean state of whether the volume is destroyed or not") + @Param(description = "The boolean state of whether the volume is destroyed or not") private boolean destroyed; @SerializedName(ApiConstants.SERVICE_OFFERING_ID) @@ -222,43 +222,43 @@ public class VolumeResponse extends BaseResponseWithTagInformation implements Co private String serviceOfferingId; @SerializedName("serviceofferingname") - @Param(description = "name of the service offering for root disk") + @Param(description = "Name of the service offering for root disk") private String serviceOfferingName; @SerializedName("serviceofferingdisplaytext") - @Param(description = "the display text of the service offering for root disk") + @Param(description = "The display text of the service offering for root disk") private String serviceOfferingDisplayText; @SerializedName("isextractable") - @Param(description = "true if the volume is extractable, false otherwise") + @Param(description = "True if the volume is extractable, false otherwise") private boolean extractable; @SerializedName(ApiConstants.STATUS) - @Param(description = "the status of the volume") + @Param(description = "The status of the volume") private String status; @SerializedName(ApiConstants.DISPLAY_VOLUME) - @Param(description = "an optional field whether to the display the volume to the end user or not.", authorized = {RoleType.Admin}) + @Param(description = "An optional field whether to the display the volume to the end User or not.", authorized = {RoleType.Admin}) private boolean displayVolume; @SerializedName(ApiConstants.PATH) - @Param(description = "the path of the volume") + @Param(description = "The path of the volume") private String path; @SerializedName(ApiConstants.STORAGE_ID) - @Param(description = "id of the primary storage hosting the disk volume; returned to admin user only", since = "4.3") + @Param(description = "ID of the primary storage hosting the disk volume; returned to admin User only", since = "4.3") private String storagePoolId; @SerializedName(ApiConstants.CHAIN_INFO) - @Param(description = "the chain info of the volume", since = "4.4") + @Param(description = "The chain info of the volume", since = "4.4") String chainInfo; @SerializedName(ApiConstants.SNAPSHOT_QUIESCEVM) - @Param(description = "need quiesce vm or not when taking snapshot", since = "4.3") + @Param(description = "Need quiesce Instance or not when taking Snapshot", since = "4.3") private boolean needQuiescevm; @SerializedName(ApiConstants.SUPPORTS_STORAGE_SNAPSHOT) - @Param(description = "true if storage snapshot is supported for the volume, false otherwise", since = "4.16") + @Param(description = "True if storage Snapshot is supported for the volume, false otherwise", since = "4.16") private boolean supportsStorageSnapshot; @SerializedName(ApiConstants.DELETE_PROTECTION) @@ -266,35 +266,35 @@ public class VolumeResponse extends BaseResponseWithTagInformation implements Co private boolean deleteProtection; @SerializedName(ApiConstants.PHYSICAL_SIZE) - @Param(description = "the bytes actually consumed on disk") + @Param(description = "The bytes actually consumed on disk") private Long physicalsize; @SerializedName(ApiConstants.VIRTUAL_SIZE) - @Param(description = "the bytes allocated") + @Param(description = "The bytes allocated") private Long virtualsize; @SerializedName(ApiConstants.UTILIZATION) - @Param(description = "the disk utilization") + @Param(description = "The disk utilization") private String utilization; @SerializedName(ApiConstants.CLUSTER_ID) - @Param(description = "cluster id of the volume") + @Param(description = "Cluster id of the volume") private String clusterId; @SerializedName(ApiConstants.CLUSTER_NAME) - @Param(description = "cluster name where the volume is allocated") + @Param(description = "Cluster name where the volume is allocated") private String clusterName; @SerializedName(ApiConstants.POD_ID) - @Param(description = "pod id of the volume") + @Param(description = "Pod id of the volume") private String podId; @SerializedName(ApiConstants.POD_NAME) - @Param(description = "pod name of the volume") + @Param(description = "Pod name of the volume") private String podName; @SerializedName(ApiConstants.EXTERNAL_UUID) - @Param(description = "volume uuid that is given by virtualisation provider (only for VMware)") + @Param(description = "Volume UUID that is given by virtualisation provider (only for VMware)") private String externalUuid; @SerializedName(ApiConstants.VOLUME_CHECK_RESULT) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/VpcOfferingResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/VpcOfferingResponse.java index b11764da7d98..a0516e660e48 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/VpcOfferingResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/VpcOfferingResponse.java @@ -31,43 +31,43 @@ @SuppressWarnings("unused") public class VpcOfferingResponse extends BaseResponse { @SerializedName("id") - @Param(description = "the id of the vpc offering") + @Param(description = "The ID of the VPC offering") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the vpc offering") + @Param(description = "The name of the VPC offering") private String name; @SerializedName(ApiConstants.DISPLAY_TEXT) - @Param(description = "an alternate display text of the vpc offering.") + @Param(description = "An alternate display text of the VPC offering.") private String displayText; @SerializedName(ApiConstants.CREATED) - @Param(description = "the date this vpc offering was created") + @Param(description = "The date this VPC offering was created") private Date created; @SerializedName(ApiConstants.IS_DEFAULT) - @Param(description = "true if vpc offering is default, false otherwise") + @Param(description = "True if VPC offering is default, false otherwise") private Boolean isDefault; @SerializedName(ApiConstants.STATE) - @Param(description = "state of the vpc offering. Can be Disabled/Enabled") + @Param(description = "State of the VPC offering. Can be Disabled/Enabled") private String state; @SerializedName(ApiConstants.SERVICE) - @Param(description = "the list of supported services", responseObject = ServiceResponse.class) + @Param(description = "The list of supported services", responseObject = ServiceResponse.class) private List services; @SerializedName(ApiConstants.DISTRIBUTED_VPC_ROUTER) - @Param(description = " indicates if the vpc offering supports distributed router for one-hop forwarding", since = "4.4") + @Param(description = "Indicates if the VPC offering supports distributed router for one-hop forwarding", since = "4.4") private Boolean supportsDistributedRouter; @SerializedName((ApiConstants.SUPPORTS_REGION_LEVEL_VPC)) - @Param(description = "indicated if the offering can support region level vpc", since = "4.4") + @Param(description = "Indicated if the offering can support region level VPC", since = "4.4") private Boolean supportsRegionLevelVpc; @SerializedName(ApiConstants.FOR_NSX) - @Param(description = "true if vpc offering can be used by NSX networks only") + @Param(description = "True if VPC offering can be used by NSX networks only") private Boolean forNsx; @SerializedName(ApiConstants.NETWORK_MODE) @@ -75,31 +75,31 @@ public class VpcOfferingResponse extends BaseResponse { private String networkMode; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") + @Param(description = "The domain ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") + @Param(description = "The domain name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.") private String domain; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the zone ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") + @Param(description = "The zone ID(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") private String zoneId; @SerializedName(ApiConstants.ZONE) - @Param(description = "the zone name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") + @Param(description = "The zone name(s) this disk offering belongs to. Ignore this information as it is not currently applicable.", since = "4.13.0") private String zone; @SerializedName(ApiConstants.INTERNET_PROTOCOL) - @Param(description = "the internet protocol of the vpc offering") + @Param(description = "The internet protocol of the VPC offering") private String internetProtocol; @SerializedName(ApiConstants.SPECIFY_AS_NUMBER) - @Param(description = "true if network offering supports choosing AS numbers") + @Param(description = "True if network offering supports choosing AS numbers") private Boolean specifyAsNumber; @SerializedName(ApiConstants.ROUTING_MODE) - @Param(description = "the routing mode for the network offering, supported types are Static or Dynamic.") + @Param(description = "The routing mode for the network offering, supported types are Static or Dynamic.") private String routingMode; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/VpcResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/VpcResponse.java index 56479506686a..2648ba836785 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/VpcResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/VpcResponse.java @@ -34,103 +34,103 @@ @SuppressWarnings("unused") public class VpcResponse extends BaseResponseWithAnnotations implements ControlledEntityResponse, SetResourceIconResponse { @SerializedName("id") - @Param(description = "the id of the VPC") + @Param(description = "The ID of the VPC") private String id; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the VPC") + @Param(description = "The name of the VPC") private String name; @SerializedName(ApiConstants.DISPLAY_TEXT) - @Param(description = "an alternate display text of the VPC.") + @Param(description = "An alternate display text of the VPC.") private String displayText; @SerializedName(ApiConstants.STATE) - @Param(description = "state of the VPC. Can be Inactive/Enabled") + @Param(description = "State of the VPC. Can be Inactive/Enabled") private String state; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "zone id of the vpc") + @Param(description = "Zone ID of the VPC") private String zoneId; @SerializedName(ApiConstants.ZONE_NAME) - @Param(description = "the name of the zone the VPC belongs to") + @Param(description = "The name of the zone the VPC belongs to") private String zoneName; @SerializedName(ApiConstants.SERVICE) - @Param(description = "the list of supported services", responseObject = ServiceResponse.class) + @Param(description = "The list of supported services", responseObject = ServiceResponse.class) private List services; @SerializedName(ApiConstants.CIDR) - @Param(description = "the cidr the VPC") + @Param(description = "The CIDR the VPC") private String cidr; @SerializedName(ApiConstants.VPC_OFF_ID) - @Param(description = "vpc offering id the VPC is created from") + @Param(description = "VPC offering ID the VPC is created from") private String vpcOfferingId; @SerializedName(ApiConstants.VPC_OFF_NAME) - @Param(description = "vpc offering name the VPC is created from", since = "4.13.2") + @Param(description = "VPC offering name the VPC is created from", since = "4.13.2") private String vpcOfferingName; @SerializedName(ApiConstants.CREATED) - @Param(description = "the date this VPC was created") + @Param(description = "The date this VPC was created") private Date created; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the owner of the VPC") + @Param(description = "The owner of the VPC") private String accountName; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the VPC") + @Param(description = "The project ID of the VPC") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the VPC") + @Param(description = "The project name of the VPC") private String projectName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain id of the VPC owner") + @Param(description = "The domain ID of the VPC owner") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the owner") + @Param(description = "The domain name of the owner") private String domain; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "the domain path of the owner", since = "4.19.2.0") + @Param(description = "The domain path of the owner", since = "4.19.2.0") private String domainPath; @SerializedName(ApiConstants.NETWORK) - @Param(description = "the list of networks belongign to the VPC", responseObject = NetworkResponse.class) + @Param(description = "The list of Networks belonging to the VPC", responseObject = NetworkResponse.class) private List networks; @SerializedName(ApiConstants.RESTART_REQUIRED) - @Param(description = "true VPC requires restart") + @Param(description = "True VPC requires restart") private Boolean restartRequired; @SerializedName(ApiConstants.NETWORK_DOMAIN) - @Param(description = "the network domain of the VPC") + @Param(description = "The Network domain of the VPC") private String networkDomain; @SerializedName(ApiConstants.TAGS) - @Param(description = "the list of resource tags associated with the project", responseObject = ResourceTagResponse.class) + @Param(description = "The list of resource tags associated with the project", responseObject = ResourceTagResponse.class) private List tags; @SerializedName(ApiConstants.FOR_DISPLAY) - @Param(description = "is vpc for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) + @Param(description = "Is VPC for display to the regular user", since = "4.4", authorized = {RoleType.Admin}) private Boolean forDisplay; @SerializedName(ApiConstants.DISTRIBUTED_VPC_ROUTER) - @Param(description = "is VPC uses distributed router for one hop forwarding and host based network ACL's", since = "4.4") + @Param(description = "Does VPC use distributed router for one hop forwarding and host based Network ACL's", since = "4.4") private boolean usesDistributedRouter; @SerializedName(ApiConstants.REGION_LEVEL_VPC) - @Param(description = "true if VPC is region level", since = "4.4") + @Param(description = "True if VPC is region level", since = "4.4") private Boolean regionLevelVpc; @SerializedName(ApiConstants.REDUNDANT_VPC_ROUTER) - @Param(description = "if this VPC has redundant router", since = "4.6") + @Param(description = "If this VPC has redundant router", since = "4.6") private boolean redundantRouter; @SerializedName(ApiConstants.RESOURCE_ICON) @@ -138,7 +138,7 @@ public class VpcResponse extends BaseResponseWithAnnotations implements Controll ResourceIconResponse icon; @SerializedName(ApiConstants.IPV6_ROUTES) - @Param(description = "The routes for the network to ease adding route in upstream router", since = "4.17.0") + @Param(description = "The routes for the Network to ease adding route in upstream router", since = "4.17.0") private Set ipv6Routes; @SerializedName(ApiConstants.PUBLIC_MTU) @@ -146,19 +146,19 @@ public class VpcResponse extends BaseResponseWithAnnotations implements Controll private Integer publicMtu; @SerializedName(ApiConstants.DNS1) - @Param(description = "the first IPv4 DNS for the VPC") + @Param(description = "The first IPv4 DNS for the VPC") private String dns1; @SerializedName(ApiConstants.DNS2) - @Param(description = "the second IPv4 DNS for the VPC") + @Param(description = "The second IPv4 DNS for the VPC") private String dns2; @SerializedName(ApiConstants.IP6_DNS1) - @Param(description = "the first IPv6 DNS for the VPC", since = "4.18.0") + @Param(description = "The first IPv6 DNS for the VPC", since = "4.18.0") private String ipv6Dns1; @SerializedName(ApiConstants.IP6_DNS2) - @Param(description = "the second IPv6 DNS for the VPC", since = "4.18.0") + @Param(description = "The second IPv6 DNS for the VPC", since = "4.18.0") private String ipv6Dns2; @SerializedName(ApiConstants.IPV4_ROUTING) diff --git a/api/src/main/java/org/apache/cloudstack/api/response/VpnUsersResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/VpnUsersResponse.java index 3247f534133c..cdf4dbe32b81 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/VpnUsersResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/VpnUsersResponse.java @@ -29,39 +29,39 @@ @SuppressWarnings("unused") public class VpnUsersResponse extends BaseResponse implements ControlledEntityResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the vpn userID") + @Param(description = "The VPN user ID") private String id; @SerializedName(ApiConstants.USERNAME) - @Param(description = "the username of the vpn user") + @Param(description = "The username of the VPN user") private String userName; @SerializedName(ApiConstants.ACCOUNT) - @Param(description = "the account of the remote access vpn") + @Param(description = "The Account of the remote access VPN") private String accountName; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the domain id of the account of the remote access vpn") + @Param(description = "The domain ID of the Account of the remote access VPN") private String domainId; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "the domain name of the account of the remote access vpn") + @Param(description = "The domain name of the Account of the remote access VPN") private String domainName; @SerializedName(ApiConstants.DOMAIN_PATH) - @Param(description = "path of the domain to which the remote access vpn belongs", since = "4.19.2.0") + @Param(description = "Path of the domain to which the remote access VPN belongs", since = "4.19.2.0") private String domainPath; @SerializedName(ApiConstants.PROJECT_ID) - @Param(description = "the project id of the vpn") + @Param(description = "The project ID of the VPN") private String projectId; @SerializedName(ApiConstants.PROJECT) - @Param(description = "the project name of the vpn") + @Param(description = "The project name of the VPN") private String projectName; @SerializedName(ApiConstants.STATE) - @Param(description = "the state of the Vpn User, can be 'Add', 'Revoke' or 'Active'.") + @Param(description = "The state of the VPN User, can be 'Add', 'Revoke' or 'Active'.") private String state; public void setId(String id) { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/VsphereStoragePoliciesResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/VsphereStoragePoliciesResponse.java index 63c49f148790..3d1518a1cae3 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/VsphereStoragePoliciesResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/VsphereStoragePoliciesResponse.java @@ -28,23 +28,23 @@ public class VsphereStoragePoliciesResponse extends BaseResponse { @SerializedName(ApiConstants.ID) - @Param(description = "the ID of the Storage Policy") + @Param(description = "The ID of the Storage Policy") private String id; @SerializedName(ApiConstants.ZONE_ID) - @Param(description = "the ID of the Zone") + @Param(description = "The ID of the Zone") private String zoneId; @SerializedName(ApiConstants.POLICY_ID) - @Param(description = "the identifier of the Storage Policy in vSphere DataCenter") + @Param(description = "The identifier of the Storage Policy in vSphere DataCenter") private String policyId; @SerializedName(ApiConstants.NAME) - @Param(description = "the name of the Storage Policy") + @Param(description = "The name of the Storage Policy") private String name; @SerializedName(ApiConstants.DESCRIPTION) - @Param(description = "the description of the Storage Policy") + @Param(description = "The description of the Storage Policy") private String description; public String getId() { diff --git a/api/src/main/java/org/apache/cloudstack/api/response/ZoneResponse.java b/api/src/main/java/org/apache/cloudstack/api/response/ZoneResponse.java index 09e53dbb1462..a05ee925ac09 100644 --- a/api/src/main/java/org/apache/cloudstack/api/response/ZoneResponse.java +++ b/api/src/main/java/org/apache/cloudstack/api/response/ZoneResponse.java @@ -46,55 +46,55 @@ public class ZoneResponse extends BaseResponseWithAnnotations implements SetReso private String description; @SerializedName(ApiConstants.DNS1) - @Param(description = "the first DNS for the Zone") + @Param(description = "The first DNS for the Zone") private String dns1; @SerializedName(ApiConstants.DNS2) - @Param(description = "the second DNS for the Zone") + @Param(description = "The second DNS for the Zone") private String dns2; @SerializedName(ApiConstants.IP6_DNS1) - @Param(description = "the first IPv6 DNS for the Zone") + @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") + @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") + @Param(description = "The first internal DNS for the Zone") private String internalDns1; @SerializedName(ApiConstants.INTERNAL_DNS2) - @Param(description = "the second internal DNS for the Zone") + @Param(description = "The second internal DNS for the Zone") private String internalDns2; @SerializedName(ApiConstants.GUEST_CIDR_ADDRESS) - @Param(description = "the guest CIDR address for the Zone") + @Param(description = "The guest CIDR address for the Zone") private String guestCidrAddress; @SerializedName(ApiConstants.DISPLAY_TEXT) - @Param(description = "the display text of the zone") + @Param(description = "The display text of the zone") private String displayText; @SerializedName(ApiConstants.DOMAIN) - @Param(description = "Network domain name for the networks in the zone") + @Param(description = "Network domain name for the Networks in the zone") private String domain; @SerializedName(ApiConstants.DOMAIN_ID) - @Param(description = "the UUID of the containing domain, null for public zones") + @Param(description = "The UUID of the containing domain, null for public zones") private String domainId; @SerializedName("domainname") - @Param(description = "the name of the containing domain, null for public zones") + @Param(description = "The name of the containing domain, null for public zones") private String domainName; @SerializedName(ApiConstants.NETWORK_TYPE) - @Param(description = "the network type of the zone; can be Basic or Advanced") + @Param(description = "The Network type of the zone; can be Basic or Advanced") private String networkType; @SerializedName("securitygroupsenabled") - @Param(description = "true if security groups support is enabled, false otherwise") + @Param(description = "True if security groups support is enabled, false otherwise") private Boolean securityGroupsEnabled; @SerializedName("gputotal") @@ -106,7 +106,7 @@ public class ZoneResponse extends BaseResponseWithAnnotations implements SetReso private Long gpuUsed; @SerializedName("allocationstate") - @Param(description = "the allocation state of the cluster") + @Param(description = "The allocation state of the cluster") private String allocationState; @SerializedName(ApiConstants.ZONE_TOKEN) @@ -114,19 +114,19 @@ public class ZoneResponse extends BaseResponseWithAnnotations implements SetReso private String zoneToken; @SerializedName(ApiConstants.DHCP_PROVIDER) - @Param(description = "the dhcp Provider for the Zone") + @Param(description = "The DHCP Provider for the Zone") private String dhcpProvider; @SerializedName("capacity") - @Param(description = "the capacity of the Zone", responseObject = CapacityResponse.class) + @Param(description = "The capacity of the Zone", responseObject = CapacityResponse.class) private List capacities; @SerializedName(ApiConstants.LOCAL_STORAGE_ENABLED) - @Param(description = "true if local storage offering enabled, false otherwise") + @Param(description = "True if local storage offering enabled, false otherwise") private Boolean localStorageEnabled; @SerializedName(ApiConstants.TAGS) - @Param(description = "the list of resource tags associated with zone.", responseObject = ResourceTagResponse.class, since = "4.3") + @Param(description = "The list of resource tags associated with zone.", responseObject = ResourceTagResponse.class, since = "4.3") private Set tags; @SerializedName(ApiConstants.RESOURCE_DETAILS) @@ -150,12 +150,12 @@ public class ZoneResponse extends BaseResponseWithAnnotations implements SetReso private Integer routerPublicInterfaceMaxMtu; @SerializedName(ApiConstants.TYPE) - @Param(description = "the type of the zone - core or edge", since = "4.18.0") + @Param(description = "The type of the zone - core or edge", since = "4.18.0") String type; @Deprecated(since = "4.21.0") @SerializedName(ApiConstants.NSX_ENABLED) - @Param(description = "true, if zone is NSX enabled", since = "4.20.0") + @Param(description = "True, if zone is NSX enabled", since = "4.20.0") private boolean nsxEnabled = false; @SerializedName(ApiConstants.PROVIDER) @@ -163,7 +163,7 @@ public class ZoneResponse extends BaseResponseWithAnnotations implements SetReso private String provider = null; @SerializedName(ApiConstants.MULTI_ARCH) - @Param(description = "true, if zone contains clusters and hosts from different CPU architectures", since = "4.20") + @Param(description = "True, if zone contains clusters and hosts from different CPU architectures", since = "4.20") private boolean multiArch; @SerializedName(ApiConstants.ASN_RANGE) @@ -171,7 +171,7 @@ public class ZoneResponse extends BaseResponseWithAnnotations implements SetReso private String asnRange; @SerializedName(ApiConstants.ROUTED_MODE_ENABLED) - @Param(description = "true, if routed network/vpc is enabled", since = "4.20.1") + @Param(description = "True, if routed Network/VPC is enabled", since = "4.20.1") private boolean routedModeEnabled = false; @SerializedName(ApiConstants.STORAGE_ACCESS_GROUPS) diff --git a/api/src/main/java/org/apache/cloudstack/backup/BackupProvider.java b/api/src/main/java/org/apache/cloudstack/backup/BackupProvider.java index 32a714370dfc..23b8092425d9 100644 --- a/api/src/main/java/org/apache/cloudstack/backup/BackupProvider.java +++ b/api/src/main/java/org/apache/cloudstack/backup/BackupProvider.java @@ -124,6 +124,10 @@ public interface BackupProvider { */ boolean supportsInstanceFromBackup(); + default boolean supportsMemoryVmSnapshot() { + return true; + } + /** * Returns the backup storage usage (Used, Total) for a backup provider * @param zoneId the zone for which to return metrics diff --git a/api/src/main/java/org/apache/cloudstack/backup/BackupService.java b/api/src/main/java/org/apache/cloudstack/backup/BackupService.java index d4beb629fe0f..3ba2978c0fa5 100644 --- a/api/src/main/java/org/apache/cloudstack/backup/BackupService.java +++ b/api/src/main/java/org/apache/cloudstack/backup/BackupService.java @@ -34,4 +34,11 @@ public interface BackupService { * @return backup provider */ BackupProvider getBackupProvider(final Long zoneId); + + /** + * Find backup provider by name + * @param name backup provider name + * @return backup provider + */ + BackupProvider getBackupProvider(final String name); } diff --git a/api/src/main/java/org/apache/cloudstack/cluster/ClusterDrsAlgorithm.java b/api/src/main/java/org/apache/cloudstack/cluster/ClusterDrsAlgorithm.java index 665f95842b0d..368487c2b9b0 100644 --- a/api/src/main/java/org/apache/cloudstack/cluster/ClusterDrsAlgorithm.java +++ b/api/src/main/java/org/apache/cloudstack/cluster/ClusterDrsAlgorithm.java @@ -22,10 +22,10 @@ import com.cloud.host.Host; import com.cloud.offering.ServiceOffering; import com.cloud.org.Cluster; -import com.cloud.utils.Pair; import com.cloud.utils.Ternary; import com.cloud.utils.component.Adapter; import com.cloud.vm.VirtualMachine; +import org.apache.commons.collections.CollectionUtils; import org.apache.commons.math3.stat.descriptive.moment.Mean; import org.apache.commons.math3.stat.descriptive.moment.StandardDeviation; @@ -40,6 +40,9 @@ public interface ClusterDrsAlgorithm extends Adapter { + Mean MEAN_CALCULATOR = new Mean(); + StandardDeviation STDDEV_CALCULATOR = new StandardDeviation(false); + /** * Determines whether a DRS operation is needed for a given cluster and host-VM * mapping. @@ -59,79 +62,121 @@ public interface ClusterDrsAlgorithm extends Adapter { boolean needsDrs(Cluster cluster, List> cpuList, List> memoryList) throws ConfigurationException; - /** - * Determines the metrics for a given virtual machine and destination host in a DRS cluster. - * - * @param clusterId - * the ID of the cluster to check - * @param vm - * the virtual machine to check - * @param serviceOffering - * the service offering for the virtual machine - * @param destHost - * the destination host for the virtual machine - * @param hostCpuMap - * a map of host IDs to the Ternary of used, reserved and total CPU on each host - * @param hostMemoryMap - * a map of host IDs to the Ternary of used, reserved and total memory on each host - * @param requiresStorageMotion - * whether storage motion is required for the virtual machine + * Calculates the metrics (improvement, cost, benefit) for migrating a VM to a destination host. Improvement is + * calculated based on the change in cluster imbalance before and after the migration. * + * @param cluster the cluster to check + * @param vm the virtual machine to check + * @param serviceOffering the service offering for the virtual machine + * @param destHost the destination host for the virtual machine + * @param hostCpuMap a map of host IDs to the Ternary of used, reserved and total CPU on each host + * @param hostMemoryMap a map of host IDs to the Ternary of used, reserved and total memory on each host + * @param requiresStorageMotion whether storage motion is required for the virtual machine + * @param preImbalance the pre-calculated cluster imbalance before migration (null to calculate it) + * @param baseMetricsArray pre-calculated array of all host metrics before migration + * @param hostIdToIndexMap mapping from host ID to index in the metrics array * @return a ternary containing improvement, cost, benefit */ Ternary getMetrics(Cluster cluster, VirtualMachine vm, ServiceOffering serviceOffering, Host destHost, Map> hostCpuMap, Map> hostMemoryMap, - Boolean requiresStorageMotion) throws ConfigurationException; + Boolean requiresStorageMotion, Double preImbalance, + double[] baseMetricsArray, Map hostIdToIndexMap) throws ConfigurationException; /** - * Calculates the imbalance of the cluster after a virtual machine migration. + * Calculates the cluster imbalance after migrating a VM to a destination host. * - * @param serviceOffering - * the service offering for the virtual machine - * @param vm - * the virtual machine being migrated - * @param destHost - * the destination host for the virtual machine - * @param hostCpuMap - * a map of host IDs to the Ternary of used, reserved and total CPU on each host - * @param hostMemoryMap - * a map of host IDs to the Ternary of used, reserved and total memory on each host + * @param vm the virtual machine being migrated + * @param destHost the destination host for the virtual machine + * @param clusterId the cluster ID + * @param vmMetric the VM's resource consumption metric + * @param baseMetricsArray pre-calculated array of all host metrics before migration + * @param hostIdToIndexMap mapping from host ID to index in the metrics array + * @return the cluster imbalance after migration + */ + default Double getImbalancePostMigration(VirtualMachine vm, + Host destHost, Long clusterId, long vmMetric, double[] baseMetricsArray, + Map hostIdToIndexMap, Map> hostCpuMap, + Map> hostMemoryMap) { + // Create a copy of the base array and adjust only the two affected hosts + double[] adjustedMetrics = new double[baseMetricsArray.length]; + System.arraycopy(baseMetricsArray, 0, adjustedMetrics, 0, baseMetricsArray.length); + + long destHostId = destHost.getId(); + long vmHostId = vm.getHostId(); + + // Adjust source host (remove VM resources) + Integer sourceIndex = hostIdToIndexMap.get(vmHostId); + if (sourceIndex != null && sourceIndex < adjustedMetrics.length) { + Map> sourceMetricsMap = getClusterDrsMetric(clusterId).equals("cpu") ? hostCpuMap : hostMemoryMap; + Ternary sourceMetrics = sourceMetricsMap.get(vmHostId); + if (sourceMetrics != null) { + adjustedMetrics[sourceIndex] = getMetricValuePostMigration(clusterId, sourceMetrics, vmMetric, vmHostId, destHostId, vmHostId); + } + } + + // Adjust destination host (add VM resources) + Integer destIndex = hostIdToIndexMap.get(destHostId); + if (destIndex != null && destIndex < adjustedMetrics.length) { + Map> destMetricsMap = getClusterDrsMetric(clusterId).equals("cpu") ? hostCpuMap : hostMemoryMap; + Ternary destMetrics = destMetricsMap.get(destHostId); + if (destMetrics != null) { + adjustedMetrics[destIndex] = getMetricValuePostMigration(clusterId, destMetrics, vmMetric, destHostId, destHostId, vmHostId); + } + } + + return calculateImbalance(adjustedMetrics); + } + + /** + * Calculate imbalance from an array of metric values. + * Imbalance is defined as standard deviation divided by mean. * - * @return a pair containing the CPU and memory imbalance of the cluster after the migration + * Uses reusable stateless calculator objects to avoid object creation overhead. + * @param values array of metric values + * @return calculated imbalance */ - default Double getImbalancePostMigration(ServiceOffering serviceOffering, VirtualMachine vm, - Host destHost, Map> hostCpuMap, - Map> hostMemoryMap) throws ConfigurationException { - Pair>> pair = getHostMetricsMapAndType(destHost.getClusterId(), serviceOffering, hostCpuMap, hostMemoryMap); - long vmMetric = pair.first(); - Map> hostMetricsMap = pair.second(); + private static double calculateImbalance(double[] values) { + if (values == null || values.length == 0) { + return 0.0; + } - List list = new ArrayList<>(); - for (Long hostId : hostMetricsMap.keySet()) { - list.add(getMetricValuePostMigration(destHost.getClusterId(), hostMetricsMap.get(hostId), vmMetric, hostId, destHost.getId(), vm.getHostId())); + double mean = MEAN_CALCULATOR.evaluate(values); + if (mean == 0.0) { + return 0.0; // Avoid division by zero } - return getImbalance(list); + double stdDev = STDDEV_CALCULATOR.evaluate(values, mean); + return stdDev / mean; } - private Pair>> getHostMetricsMapAndType(Long clusterId, - ServiceOffering serviceOffering, Map> hostCpuMap, - Map> hostMemoryMap) throws ConfigurationException { + /** + * Helper method to get VM metric based on cluster configuration. + */ + static long getVmMetric(ServiceOffering serviceOffering, Long clusterId) throws ConfigurationException { String metric = getClusterDrsMetric(clusterId); - Pair>> pair; switch (metric) { case "cpu": - pair = new Pair<>((long) serviceOffering.getCpu() * serviceOffering.getSpeed(), hostCpuMap); - break; + return (long) serviceOffering.getCpu() * serviceOffering.getSpeed(); case "memory": - pair = new Pair<>(serviceOffering.getRamSize() * 1024L * 1024L, hostMemoryMap); - break; + return serviceOffering.getRamSize() * 1024L * 1024L; default: throw new ConfigurationException( String.format("Invalid metric: %s for cluster: %d", metric, clusterId)); } - return pair; + } + + /** + * Helper method to calculate metrics from pre and post imbalance values. + */ + default Ternary calculateMetricsFromImbalances(Double preImbalance, Double postImbalance) { + // This needs more research to determine the cost and benefit of a migration + // TODO: Cost should be a factor of the VM size and the host capacity + // TODO: Benefit should be a factor of the VM size and the host capacity and the number of VMs on the host + final double improvement = preImbalance - postImbalance; + final double cost = 0.0; + final double benefit = 1.0; + return new Ternary<>(improvement, cost, benefit); } private Double getMetricValuePostMigration(Long clusterId, Ternary metrics, long vmMetric, @@ -151,9 +196,26 @@ private Double getMetricValuePostMigration(Long clusterId, Ternary metricList) { - Double clusterMeanMetric = getClusterMeanMetric(metricList); - Double clusterStandardDeviation = getClusterStandardDeviation(metricList, clusterMeanMetric); - return clusterStandardDeviation / clusterMeanMetric; + if (CollectionUtils.isEmpty(metricList)) { + return 0.0; + } + // Convert List to double[] once, avoiding repeated conversions + double[] values = new double[metricList.size()]; + int index = 0; + for (Double value : metricList) { + if (value != null) { + values[index++] = value; + } + } + + // Trim array if some values were null + if (index < values.length) { + double[] trimmed = new double[index]; + System.arraycopy(values, 0, trimmed, 0, index); + values = trimmed; + } + + return calculateImbalance(values); } static String getClusterDrsMetric(long clusterId) { @@ -181,36 +243,6 @@ static Double getMetricValue(long clusterId, long used, long free, long total, F return null; } - /** - * Mean is the average of a collection or set of metrics. In context of a DRS - * cluster, the cluster metrics defined as the average metrics value for some - * metric (such as CPU, memory etc.) for every resource such as host. - * Cluster Mean Metric, mavg = (∑mi) / N, where mi is a measurable metric for a - * resource ‘i’ in a cluster with total N number of resources. - */ - static Double getClusterMeanMetric(List metricList) { - return new Mean().evaluate(metricList.stream().mapToDouble(i -> i).toArray()); - } - - /** - * Standard deviation is defined as the square root of the absolute squared sum - * of difference of a metric from its mean for every resource divided by the - * total number of resources. In context of the DRS, the cluster standard - * deviation is the standard deviation based on a metric of resources in a - * cluster such as for the allocation or utilisation CPU/memory metric of hosts - * in a cluster. - * Cluster Standard Deviation, σc = sqrt((∑∣mi−mavg∣^2) / N), where mavg is the - * mean metric value and mi is a measurable metric for some resource ‘i’ in the - * cluster with total N number of resources. - */ - static Double getClusterStandardDeviation(List metricList, Double mean) { - if (mean != null) { - return new StandardDeviation(false).evaluate(metricList.stream().mapToDouble(i -> i).toArray(), mean); - } else { - return new StandardDeviation(false).evaluate(metricList.stream().mapToDouble(i -> i).toArray()); - } - } - static boolean getDrsMetricUseRatio(long clusterId) { return ClusterDrsMetricUseRatio.valueIn(clusterId); } diff --git a/api/src/main/java/org/apache/cloudstack/config/ApiServiceConfiguration.java b/api/src/main/java/org/apache/cloudstack/config/ApiServiceConfiguration.java index a4aa860487f3..113b97f43c8f 100644 --- a/api/src/main/java/org/apache/cloudstack/config/ApiServiceConfiguration.java +++ b/api/src/main/java/org/apache/cloudstack/config/ApiServiceConfiguration.java @@ -16,10 +16,15 @@ // under the License. package org.apache.cloudstack.config; +import com.cloud.exception.InvalidParameterValueException; import org.apache.cloudstack.framework.config.ConfigKey; import org.apache.cloudstack.framework.config.Configurable; +import org.apache.commons.lang3.StringUtils; +import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; public class ApiServiceConfiguration implements Configurable { + protected static Logger LOGGER = LogManager.getLogger(ApiServiceConfiguration.class); public static final ConfigKey ManagementServerAddresses = new ConfigKey<>(String.class, "host", "Advanced", "localhost", "The ip address of management server. This can also accept comma separated addresses.", true, ConfigKey.Scope.Global, null, null, null, null, null, ConfigKey.Kind.CSV, null); public static final ConfigKey ApiServletPath = new ConfigKey("Advanced", String.class, "endpoint.url", "http://localhost:8080/client/api", "API end point. Can be used by CS components/services deployed remotely, for sending CS API requests", true); @@ -29,6 +34,20 @@ public class ApiServiceConfiguration implements Configurable { "true", "Are the source checks on API calls enabled (true) or not (false)? See api.allowed.source.cidr.list", true, ConfigKey.Scope.Global); public static final ConfigKey ApiAllowedSourceCidrList = new ConfigKey<>(String.class, "api.allowed.source.cidr.list", "Advanced", "0.0.0.0/0,::/0", "Comma separated list of IPv4/IPv6 CIDRs from which API calls can be performed. Can be set on Global and Account levels.", true, ConfigKey.Scope.Account, null, null, null, null, null, ConfigKey.Kind.CSV, null); + + + public static void validateEndpointUrl() { + String csUrl = getApiServletPathValue(); + if (StringUtils.isBlank(csUrl) || StringUtils.containsAny(csUrl, "localhost", "127.0.0.1", "[::1]")) { + LOGGER.error("Global setting [{}] cannot contain localhost or be blank. Current value: {}", ApiServletPath.key(), csUrl); + throw new InvalidParameterValueException("Unable to complete this operation. Contact your cloud admin."); + } + } + + public static String getApiServletPathValue() { + return ApiServletPath.value(); + } + @Override public String getConfigComponentName() { return ApiServiceConfiguration.class.getSimpleName(); diff --git a/api/src/main/java/org/apache/cloudstack/context/CallContext.java b/api/src/main/java/org/apache/cloudstack/context/CallContext.java index 69376e4f6d7d..4cefd7847fdd 100644 --- a/api/src/main/java/org/apache/cloudstack/context/CallContext.java +++ b/api/src/main/java/org/apache/cloudstack/context/CallContext.java @@ -180,9 +180,7 @@ protected static CallContext register(User callingUser, Account callingAccount, } s_currentContext.set(callingContext); ThreadContext.push("ctx-" + UuidUtils.first(contextId)); - if (LOGGER.isTraceEnabled()) { - LOGGER.trace("Registered: " + callingContext); - } + LOGGER.trace("Registered: {}", callingContext); s_currentContextStack.get().push(callingContext); @@ -279,9 +277,7 @@ public static CallContext unregister() { return null; } s_currentContext.remove(); - if (LOGGER.isTraceEnabled()) { - LOGGER.trace("Unregistered: " + context); - } + LOGGER.trace("Unregistered: {}", context); String contextId = context.getContextId(); String sessionIdOnStack = null; String sessionIdPushedToNDC = "ctx-" + UuidUtils.first(contextId); @@ -289,9 +285,7 @@ public static CallContext unregister() { if (sessionIdOnStack.isEmpty() || sessionIdPushedToNDC.equals(sessionIdOnStack)) { break; } - if (LOGGER.isTraceEnabled()) { - LOGGER.trace("Popping from NDC: " + contextId); - } + LOGGER.trace("Popping from NDC: {}", contextId); } Stack stack = s_currentContextStack.get(); diff --git a/api/src/main/java/org/apache/cloudstack/context/LogContext.java b/api/src/main/java/org/apache/cloudstack/context/LogContext.java index c367975aba3b..24b92090e7f8 100644 --- a/api/src/main/java/org/apache/cloudstack/context/LogContext.java +++ b/api/src/main/java/org/apache/cloudstack/context/LogContext.java @@ -136,9 +136,7 @@ protected static LogContext register(User callingUser, Account callingAccount, L } s_currentContext.set(callingContext); ThreadContext.put("logcontextid", UuidUtils.first(contextId)); - if (LOGGER.isTraceEnabled()) { - LOGGER.trace("Registered for log: " + callingContext); - } + LOGGER.trace("Registered for log: {}", callingContext); return callingContext; } @@ -207,9 +205,7 @@ public static void unregister() { LogContext context = s_currentContext.get(); if (context != null) { s_currentContext.remove(); - if (LOGGER.isTraceEnabled()) { - LOGGER.trace("Unregistered: " + context); - } + LOGGER.trace("Unregistered: {}", context); } ThreadContext.clearMap(); } diff --git a/api/src/main/java/org/apache/cloudstack/query/QueryService.java b/api/src/main/java/org/apache/cloudstack/query/QueryService.java index 6a20c2fa2486..3c9110595a07 100644 --- a/api/src/main/java/org/apache/cloudstack/query/QueryService.java +++ b/api/src/main/java/org/apache/cloudstack/query/QueryService.java @@ -132,10 +132,10 @@ public interface QueryService { "Determines whether users can view all user accounts within the same domain", true, ConfigKey.Scope.Domain); ConfigKey AllowUserViewAllDataCenters = new ConfigKey<>("Advanced", Boolean.class, "allow.user.view.all.zones", "true", - "Determines whether for instance a Resource Admin can view zones that are not dedicated to them.", true, ConfigKey.Scope.Domain); + "Determines whether for Instance a Resource Admin can view zones that are not dedicated to them.", true, ConfigKey.Scope.Domain); ConfigKey SharePublicTemplatesWithOtherDomains = new ConfigKey<>("Advanced", Boolean.class, "share.public.templates.with.other.domains", "true", - "If false, templates of this domain will not show up in the list templates of other domains.", true, ConfigKey.Scope.Domain); + "If false, Templates of this domain will not show up in the list Templates of other domains.", true, ConfigKey.Scope.Domain); ConfigKey ReturnVmStatsOnVmList = new ConfigKey<>("Advanced", Boolean.class, "list.vm.default.details.stats", "true", "Determines whether VM stats should be returned when details are not explicitly specified in listVirtualMachines API request. When false, details default to [group, nics, secgrp, tmpl, servoff, diskoff, backoff, iso, volume, min, affgrp]. When true, all details are returned including 'stats'.", true, ConfigKey.Scope.Global); diff --git a/api/src/test/java/com/cloud/agent/api/storage/OVFHelperTest.java b/api/src/test/java/com/cloud/agent/api/storage/OVFHelperTest.java index c8f7ef3ec9ba..5192f182a524 100644 --- a/api/src/test/java/com/cloud/agent/api/storage/OVFHelperTest.java +++ b/api/src/test/java/com/cloud/agent/api/storage/OVFHelperTest.java @@ -40,7 +40,7 @@ public class OVFHelperTest { "This will enable the SSHD service and configure the specified public key" + "" + "" + - "" + + "" + "This allows to pass any text to the appliance. The value should be encoded in base64" + "" + ""; @@ -576,15 +576,15 @@ public class OVFHelperTest { " SSO Configuration\n" + " \n" + " \n" + - " For the first instance of the identity domain, this is the username with Administrator privileges. Otherwise, this is the username of the replication partner.\n" + + " For the first Instance of the identity domain, this is the username with Administrator privileges. Otherwise, this is the username of the replication partner.\n" + " \n" + " \n" + " \n" + - " For the first instance of the identity domain, this is the password given to the Administrator account. Otherwise, this is the password of the Administrator account of the replication partner.\n" + + " For the first Instance of the identity domain, this is the password given to the Administrator account. Otherwise, this is the password of the Administrator account of the replication partner.\n" + " \n" + " \n" + " \n" + - " For the first instance of the identity domain, this is the name of the newly created domain.\n" + + " For the first Instance of the identity domain, this is the name of the newly created domain.\n" + " \n" + " \n" + " \n" + @@ -592,11 +592,11 @@ public class OVFHelperTest { " \n" + " \n" + " \n" + - " If this parameter is set to True, the VMware directory instance is setup as the first instance of a new identity domain. Otherwise, the instance is setup as a replication partner.\n" + + " If this parameter is set to True, the VMware directory Instance is setup as the first Instance of a new identity domain. Otherwise, the Instance is setup as a replication partner.\n" + " \n" + " \n" + " \n" + - " The hostname of the VMware directory replication partner. This value is ignored for the first instance of the identity domain.\n" + + " The hostname of the VMware directory replication partner. This value is ignored for the first Instance of the identity domain.\n" + " \n" + " Database Configuration\n" + " \n" + @@ -625,7 +625,7 @@ public class OVFHelperTest { " \n" + " \n" + " \n" + - " String describing the external database instance. Values could be anything depending on what the database instance name the DBA creates in the external db. (ignored when the db.type is 'embedded').\n" + + " String describing the external database Instance. Values could be anything depending on what the database Instance name the DBA creates in the external db. (ignored when the db.type is 'embedded').\n" + " \n" + " System Configuration\n" + " \n" + diff --git a/api/src/test/java/com/cloud/cpu/CPUTest.java b/api/src/test/java/com/cloud/cpu/CPUTest.java index dfedf21864cc..0a059cf9a90a 100644 --- a/api/src/test/java/com/cloud/cpu/CPUTest.java +++ b/api/src/test/java/com/cloud/cpu/CPUTest.java @@ -28,6 +28,7 @@ public void testCPUArchGetType() { assertEquals("i686", CPU.CPUArch.x86.getType()); assertEquals("x86_64", CPU.CPUArch.amd64.getType()); assertEquals("aarch64", CPU.CPUArch.arm64.getType()); + assertEquals("s390x", CPU.CPUArch.s390x.getType()); } @Test @@ -35,6 +36,7 @@ public void testCPUArchGetBits() { assertEquals(32, CPU.CPUArch.x86.getBits()); assertEquals(64, CPU.CPUArch.amd64.getBits()); assertEquals(64, CPU.CPUArch.arm64.getBits()); + assertEquals(64, CPU.CPUArch.s390x.getBits()); } @Test @@ -42,6 +44,7 @@ public void testCPUArchFromTypeWithValidValues() { assertEquals(CPU.CPUArch.x86, CPU.CPUArch.fromType("i686")); assertEquals(CPU.CPUArch.amd64, CPU.CPUArch.fromType("x86_64")); assertEquals(CPU.CPUArch.arm64, CPU.CPUArch.fromType("aarch64")); + assertEquals(CPU.CPUArch.s390x, CPU.CPUArch.fromType("s390x")); } @Test @@ -61,7 +64,7 @@ public void testCPUArchFromTypeWithInvalidValue() { @Test public void testCPUArchGetTypesAsCSV() { - String expectedCSV = "i686,x86_64,aarch64"; + String expectedCSV = "i686,x86_64,aarch64,s390x"; assertEquals(expectedCSV, CPU.CPUArch.getTypesAsCSV()); } } diff --git a/api/src/test/java/com/cloud/network/NetworksTest.java b/api/src/test/java/com/cloud/network/NetworksTest.java index ef5829243421..6f0f3fbd1efe 100644 --- a/api/src/test/java/com/cloud/network/NetworksTest.java +++ b/api/src/test/java/com/cloud/network/NetworksTest.java @@ -37,6 +37,24 @@ public class NetworksTest { public void setUp() { } + @Test + public void nullBroadcastDomainTypeTest() throws URISyntaxException { + BroadcastDomainType type = BroadcastDomainType.getTypeOf(null); + Assert.assertEquals("a null uri should mean a broadcasttype of undecided", BroadcastDomainType.UnDecided, type); + } + + @Test + public void nullBroadcastDomainTypeValueTest() { + URI uri = null; + Assert.assertNull(BroadcastDomainType.getValue(uri)); + } + + @Test + public void nullBroadcastDomainTypeStringValueTest() throws URISyntaxException { + String uriString = null; + Assert.assertNull(BroadcastDomainType.getValue(uriString)); + } + @Test public void emptyBroadcastDomainTypeTest() throws URISyntaxException { BroadcastDomainType type = BroadcastDomainType.getTypeOf(""); diff --git a/api/src/test/java/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmdTest.java b/api/src/test/java/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmdTest.java new file mode 100644 index 000000000000..51b1cd9e14b7 --- /dev/null +++ b/api/src/test/java/org/apache/cloudstack/api/command/admin/config/UpdateCfgCmdTest.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.api.command.admin.config; + +import org.apache.cloudstack.api.response.ConfigurationResponse; +import org.apache.cloudstack.config.Configuration; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.MockedStatic; +import org.mockito.Mockito; +import org.mockito.junit.MockitoJUnitRunner; + +import com.cloud.utils.crypt.DBEncryptionUtil; + +@RunWith(MockitoJUnitRunner.class) +public class UpdateCfgCmdTest { + + private UpdateCfgCmd updateCfgCmd; + + private MockedStatic mockedStatic; + + @Before + public void setUp() { + updateCfgCmd = new UpdateCfgCmd(); + mockedStatic = Mockito.mockStatic(DBEncryptionUtil.class); + } + + @After + public void tearDown() { + mockedStatic.close(); + } + + @Test + public void setResponseValueSetsEncryptedValueWhenConfigurationIsEncrypted() { + ConfigurationResponse response = new ConfigurationResponse(); + Configuration cfg = Mockito.mock(Configuration.class); + Mockito.when(cfg.isEncrypted()).thenReturn(true); + Mockito.when(cfg.getValue()).thenReturn("testValue"); + Mockito.when(DBEncryptionUtil.encrypt("testValue")).thenReturn("encryptedValue"); + updateCfgCmd.setResponseValue(response, cfg); + Assert.assertEquals("encryptedValue", response.getValue()); + } + + @Test + public void setResponseValueSetsPlainValueWhenConfigurationIsNotEncrypted() { + ConfigurationResponse response = new ConfigurationResponse(); + Configuration cfg = Mockito.mock(Configuration.class); + Mockito.when(cfg.isEncrypted()).thenReturn(false); + Mockito.when(cfg.getValue()).thenReturn("testValue"); + updateCfgCmd.setResponseValue(response, cfg); + Assert.assertEquals("testValue", response.getValue()); + } + + @Test + public void setResponseValueHandlesNullConfigurationValueGracefully() { + ConfigurationResponse response = new ConfigurationResponse(); + Configuration cfg = Mockito.mock(Configuration.class); + Mockito.when(cfg.isEncrypted()).thenReturn(false); + Mockito.when(cfg.getValue()).thenReturn(null); + updateCfgCmd.setResponseValue(response, cfg); + Assert.assertNull(response.getValue()); + } + +} diff --git a/api/src/test/java/org/apache/cloudstack/api/command/admin/vlan/UpdateVlanIpRangeCmdTest.java b/api/src/test/java/org/apache/cloudstack/api/command/admin/vlan/UpdateVlanIpRangeCmdTest.java index c1bf6b151f7f..f2c23edbc7fe 100644 --- a/api/src/test/java/org/apache/cloudstack/api/command/admin/vlan/UpdateVlanIpRangeCmdTest.java +++ b/api/src/test/java/org/apache/cloudstack/api/command/admin/vlan/UpdateVlanIpRangeCmdTest.java @@ -71,7 +71,7 @@ public void testUpdateFailure() throws ResourceAllocationException, ResourceUnav try { updateVlanIpRangeCmd.execute(); } catch (ServerApiException ex) { - assertEquals("Failed to Update vlan ip range", ex.getMessage()); + assertEquals("Failed to Update VLAN IP range", ex.getMessage()); } } diff --git a/api/src/test/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmdTest.java b/api/src/test/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmdTest.java index 4fec90217fd8..c0e3b1aba321 100644 --- a/api/src/test/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmdTest.java +++ b/api/src/test/java/org/apache/cloudstack/api/command/admin/vm/MigrateVirtualMachineWithVolumeCmdTest.java @@ -103,7 +103,7 @@ public void executeTestRequiredArgsNullThrowsInvalidParameterValueException() { cmdSpy.execute(); } catch (Exception e) { Assert.assertEquals(InvalidParameterValueException.class, e.getClass()); - String expected = String.format("Either %s or %s must be passed or %s must be true for migrating the VM.", ApiConstants.HOST_ID, ApiConstants.MIGRATE_TO, ApiConstants.AUTO_SELECT); + String expected = String.format("Either %s or %s must be passed or %s must be true for migrating the Instance.", ApiConstants.HOST_ID, ApiConstants.MIGRATE_TO, ApiConstants.AUTO_SELECT); Assert.assertEquals(expected , e.getMessage()); } } @@ -161,7 +161,7 @@ public void executeTestHostIdIsNullThrowsInvalidParameterValueException() { cmdSpy.execute(); } catch (Exception e) { Assert.assertEquals(InvalidParameterValueException.class, e.getClass()); - String expected = "Unable to find the specified host to migrate the VM."; + String expected = "Unable to find the specified host to migrate the Instance."; Assert.assertEquals(expected , e.getMessage()); } } @@ -187,7 +187,7 @@ public void executeTestHostIsNotNullMigratedVMIsNullThrowsServerApiException() t cmdSpy.execute(); } catch (Exception e) { Assert.assertEquals(ServerApiException.class, e.getClass()); - String expected = "Failed to migrate vm"; + String expected = "Failed to migrate Instance"; Assert.assertEquals(expected , e.getMessage()); } } @@ -205,7 +205,7 @@ public void executeTestHostIsNullMigratedVMIsNullThrowsServerApiException() { cmdSpy.execute(); } catch (Exception e) { Assert.assertEquals(ServerApiException.class, e.getClass()); - String expected = "Failed to migrate vm"; + String expected = "Failed to migrate Instance"; Assert.assertEquals(expected , e.getMessage()); } } diff --git a/api/src/test/java/org/apache/cloudstack/api/command/test/AddVpnUserCmdTest.java b/api/src/test/java/org/apache/cloudstack/api/command/test/AddVpnUserCmdTest.java index 8b933534cea2..89693f0d0675 100644 --- a/api/src/test/java/org/apache/cloudstack/api/command/test/AddVpnUserCmdTest.java +++ b/api/src/test/java/org/apache/cloudstack/api/command/test/AddVpnUserCmdTest.java @@ -111,7 +111,7 @@ public void testCreateFailure() { try { addVpnUserCmd.create(); } catch (ServerApiException exception) { - Assert.assertEquals("Failed to add vpn user", exception.getDescription()); + Assert.assertEquals("Failed to add VPN User", exception.getDescription()); } } diff --git a/api/src/test/java/org/apache/cloudstack/api/command/test/CreateAutoScaleVmProfileCmdTest.java b/api/src/test/java/org/apache/cloudstack/api/command/test/CreateAutoScaleVmProfileCmdTest.java index b459b1a358cc..8e48cb16a3b4 100644 --- a/api/src/test/java/org/apache/cloudstack/api/command/test/CreateAutoScaleVmProfileCmdTest.java +++ b/api/src/test/java/org/apache/cloudstack/api/command/test/CreateAutoScaleVmProfileCmdTest.java @@ -122,7 +122,7 @@ public void verifyCreateAutoScaleVmProfileCmd() { Assert.assertEquals("autoscalevmprofileresponse", createAutoScaleVmProfileCmd.getCommandName()); Assert.assertEquals("autoscalevmprofile", CreateAutoScaleVmProfileCmd.getResultObjectName()); Assert.assertEquals(EventTypes.EVENT_AUTOSCALEVMPROFILE_CREATE, createAutoScaleVmProfileCmd.getEventType()); - Assert.assertEquals("creating AutoScale Vm Profile", createAutoScaleVmProfileCmd.getEventDescription()); + Assert.assertEquals("Creating AutoScale Instance Profile", createAutoScaleVmProfileCmd.getEventDescription()); Assert.assertEquals(ApiCommandResourceType.AutoScaleVmProfile, createAutoScaleVmProfileCmd.getApiResourceType()); } diff --git a/api/src/test/java/org/apache/cloudstack/api/command/test/CreateSnapshotCmdTest.java b/api/src/test/java/org/apache/cloudstack/api/command/test/CreateSnapshotCmdTest.java index 5fa46ec97e52..8188a2e0bb05 100644 --- a/api/src/test/java/org/apache/cloudstack/api/command/test/CreateSnapshotCmdTest.java +++ b/api/src/test/java/org/apache/cloudstack/api/command/test/CreateSnapshotCmdTest.java @@ -137,7 +137,7 @@ public void testCreateFailure() { try { createSnapshotCmd.execute(); } catch (ServerApiException exception) { - Assert.assertEquals("Failed to create snapshot due to an internal error creating snapshot for volume 123", exception.getDescription()); + Assert.assertEquals("Failed to create Snapshot due to an internal error creating Snapshot for volume 123", exception.getDescription()); } } diff --git a/api/src/test/java/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java b/api/src/test/java/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java index 3ed1d9389d42..1150c40ba488 100644 --- a/api/src/test/java/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java +++ b/api/src/test/java/org/apache/cloudstack/api/command/test/ScaleVMCmdTest.java @@ -78,10 +78,6 @@ public void testCreateSuccess() { scaleVMCmd._responseGenerator = responseGenerator; UserVmResponse userVmResponse = Mockito.mock(UserVmResponse.class); - //List list = Mockito.mock(UserVmResponse.class); - //list.add(userVmResponse); - //LinkedList mockedList = Mockito.mock(LinkedList.class); - //Mockito.when(mockedList.get(0)).thenReturn(userVmResponse); List list = new LinkedList(); list.add(userVmResponse); @@ -111,7 +107,7 @@ public void testCreateFailure() { try { scaleVMCmd.execute(); } catch (ServerApiException exception) { - Assert.assertEquals("Failed to scale vm", exception.getDescription()); + Assert.assertEquals("Failed to scale Instance", exception.getDescription()); } } diff --git a/api/src/test/java/org/apache/cloudstack/api/command/test/UpdateAutoScaleVmProfileCmdTest.java b/api/src/test/java/org/apache/cloudstack/api/command/test/UpdateAutoScaleVmProfileCmdTest.java index bf387e8216e8..da6ed31eaa2a 100644 --- a/api/src/test/java/org/apache/cloudstack/api/command/test/UpdateAutoScaleVmProfileCmdTest.java +++ b/api/src/test/java/org/apache/cloudstack/api/command/test/UpdateAutoScaleVmProfileCmdTest.java @@ -100,7 +100,7 @@ public void verifyUpdateAutoScaleVmProfileCmd() { Assert.assertEquals("updateautoscalevmprofileresponse", updateAutoScaleVmProfileCmd.getCommandName()); Assert.assertEquals(EventTypes.EVENT_AUTOSCALEVMPROFILE_UPDATE, updateAutoScaleVmProfileCmd.getEventType()); - Assert.assertEquals("Updating AutoScale Vm Profile. Vm Profile Id: " + profileId, updateAutoScaleVmProfileCmd.getEventDescription()); + Assert.assertEquals("Updating AutoScale Instance Profile. Instance Profile Id: " + profileId, updateAutoScaleVmProfileCmd.getEventDescription()); } @Test diff --git a/api/src/test/java/org/apache/cloudstack/api/command/test/UpdateVmNicIpTest.java b/api/src/test/java/org/apache/cloudstack/api/command/test/UpdateVmNicIpTest.java index 9a42aa1fbc00..8727bab6f105 100644 --- a/api/src/test/java/org/apache/cloudstack/api/command/test/UpdateVmNicIpTest.java +++ b/api/src/test/java/org/apache/cloudstack/api/command/test/UpdateVmNicIpTest.java @@ -84,7 +84,7 @@ public void testFailure() throws ResourceAllocationException, ResourceUnavailabl try { updateVmNicIpCmd.execute(); } catch (ServerApiException exception) { - Assert.assertEquals("Failed to update ip address on vm NIC. Refer to server logs for details.", exception.getDescription()); + Assert.assertEquals("Failed to update IP address on Instance NIC. Refer to server logs for details.", exception.getDescription()); } } diff --git a/api/src/test/java/org/apache/cloudstack/config/ApiServiceConfigurationTest.java b/api/src/test/java/org/apache/cloudstack/config/ApiServiceConfigurationTest.java new file mode 100644 index 000000000000..4e96af3ead41 --- /dev/null +++ b/api/src/test/java/org/apache/cloudstack/config/ApiServiceConfigurationTest.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.config; + +import com.cloud.exception.InvalidParameterValueException; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.mockito.MockedStatic; +import org.mockito.Mockito; +import org.mockito.junit.MockitoJUnitRunner; + +@RunWith(MockitoJUnitRunner.class) +public class ApiServiceConfigurationTest { + + private static final String LOCALHOST = "http://localhost"; + + private static final String ENDPOINT_URL = "https://acs.clouds.com/client/api"; + + private static final String WHITE_SPACE = " "; + + private static final String BLANK_STRING = ""; + + private static final String NULL_STRING = null; + + private static final String LOCALHOST_IP = "127.0.0.1"; + + @Test(expected = InvalidParameterValueException.class) + public void validateEndpointUrlTestIfEndpointUrlContainLocalhostShouldThrowInvalidParameterValueException() { + try (MockedStatic apiServiceConfigurationMockedStatic = Mockito.mockStatic(ApiServiceConfiguration.class)) { + apiServiceConfigurationMockedStatic.when(ApiServiceConfiguration::getApiServletPathValue).thenReturn(LOCALHOST); + apiServiceConfigurationMockedStatic.when(ApiServiceConfiguration::validateEndpointUrl).thenCallRealMethod(); + ApiServiceConfiguration.validateEndpointUrl(); + } + } + + @Test + public void validateEndpointUrlTestIfEndpointUrlContainLocalhostShouldNotThrowInvalidParameterValueException() { + try (MockedStatic apiServiceConfigurationMockedStatic = Mockito.mockStatic(ApiServiceConfiguration.class)) { + apiServiceConfigurationMockedStatic.when(ApiServiceConfiguration::getApiServletPathValue).thenReturn(ENDPOINT_URL); + apiServiceConfigurationMockedStatic.when(ApiServiceConfiguration::validateEndpointUrl).thenCallRealMethod(); + ApiServiceConfiguration.validateEndpointUrl(); + } + } + + @Test(expected = InvalidParameterValueException.class) + public void validateEndpointUrlTestIfEndpointUrlIsNullShouldThrowInvalidParameterValueException() { + try (MockedStatic apiServiceConfigurationMockedStatic = Mockito.mockStatic(ApiServiceConfiguration.class)) { + apiServiceConfigurationMockedStatic.when(ApiServiceConfiguration::getApiServletPathValue).thenReturn(NULL_STRING); + apiServiceConfigurationMockedStatic.when(ApiServiceConfiguration::validateEndpointUrl).thenCallRealMethod(); + ApiServiceConfiguration.validateEndpointUrl(); + } + } + + @Test(expected = InvalidParameterValueException.class) + public void validateEndpointUrlTestIfEndpointUrlIsBlankShouldThrowInvalidParameterValueException() { + try (MockedStatic apiServiceConfigurationMockedStatic = Mockito.mockStatic(ApiServiceConfiguration.class)) { + apiServiceConfigurationMockedStatic.when(ApiServiceConfiguration::getApiServletPathValue).thenReturn(BLANK_STRING); + apiServiceConfigurationMockedStatic.when(ApiServiceConfiguration::validateEndpointUrl).thenCallRealMethod(); + ApiServiceConfiguration.validateEndpointUrl(); + } + } + + @Test(expected = InvalidParameterValueException.class) + public void validateEndpointUrlTestIfEndpointUrlIsWhiteSpaceShouldThrowInvalidParameterValueException() { + try (MockedStatic apiServiceConfigurationMockedStatic = Mockito.mockStatic(ApiServiceConfiguration.class)) { + apiServiceConfigurationMockedStatic.when(ApiServiceConfiguration::getApiServletPathValue).thenReturn(WHITE_SPACE); + apiServiceConfigurationMockedStatic.when(ApiServiceConfiguration::validateEndpointUrl).thenCallRealMethod(); + ApiServiceConfiguration.validateEndpointUrl(); + } + } + + @Test(expected = InvalidParameterValueException.class) + public void validateEndpointUrlTestIfEndpointUrlContainLocalhostIpShouldThrowInvalidParameterValueException() { + try (MockedStatic apiServiceConfigurationMockedStatic = Mockito.mockStatic(ApiServiceConfiguration.class)) { + apiServiceConfigurationMockedStatic.when(ApiServiceConfiguration::getApiServletPathValue).thenReturn(LOCALHOST_IP); + apiServiceConfigurationMockedStatic.when(ApiServiceConfiguration::validateEndpointUrl).thenCallRealMethod(); + ApiServiceConfiguration.validateEndpointUrl(); + } + } +} diff --git a/client/bindir/cloud-setup-management.in b/client/bindir/cloud-setup-management.in index 84c87ae2e442..b4fe76cc8d8a 100755 --- a/client/bindir/cloud-setup-management.in +++ b/client/bindir/cloud-setup-management.in @@ -36,6 +36,106 @@ from cloudutils.cloudException import CloudRuntimeException, CloudInternalExcept from cloudutils.globalEnv import globalEnv from cloudutils.serviceConfigServer import cloudManagementConfig from optparse import OptionParser +import urllib.request +import configparser +import hashlib + +SYSTEMVM_TEMPLATES_PATH = "/usr/share/cloudstack-management/templates/systemvm" +SYSTEMVM_TEMPLATES_METADATA_FILE = SYSTEMVM_TEMPLATES_PATH + "/metadata.ini" + +def verify_sha512_checksum(file_path, expected_checksum): + sha512 = hashlib.sha512() + try: + with open(file_path, "rb") as f: + for chunk in iter(lambda: f.read(8192), b""): + sha512.update(chunk) + return sha512.hexdigest().lower() == expected_checksum.lower() + except Exception as e: + print(f"Failed to verify checksum for {file_path}: {e}") + return False + +def download_file(url, dest_path, chunk_size=8 * 1024 * 1024): + """ + Downloads a file from the given URL to the specified destination path in chunks. + """ + try: + with urllib.request.urlopen(url) as response: + total_size = response.length if response.length else None + downloaded = 0 + try: + with open(dest_path, 'wb') as out_file: + while True: + chunk = response.read(chunk_size) + if not chunk: + break + out_file.write(chunk) + downloaded += len(chunk) + if total_size: + print(f"Downloaded {downloaded / (1024 * 1024):.2f}MB of {total_size / (1024 * 1024):.2f}MB", end='\r') + except PermissionError as pe: + print(f"Permission denied: {dest_path}") + raise + print(f"\nDownloaded file from {url} to {dest_path}") + except Exception as e: + print(f"Failed to download file: {e}") + raise + +def download_template_if_needed(template, url, filename, checksum): + dest_path = os.path.join(SYSTEMVM_TEMPLATES_PATH, filename) + if os.path.exists(dest_path): + if checksum and verify_sha512_checksum(dest_path, checksum): + print(f"{template} System VM template already exists at {dest_path} with valid checksum, skipping download.") + return + else: + print(f"{template} System VM template at {dest_path} has invalid or missing checksum, re-downloading...") + else: + print(f"Downloading {template} System VM template from {url} to {dest_path}...") + try: + download_file(url, dest_path) + #After download, verify checksum if provided + if checksum: + if verify_sha512_checksum(dest_path, checksum): + print(f"{template} System VM template downloaded and verified successfully.") + else: + print(f"ERROR: Checksum verification failed for {template} System VM template after download.") + except Exception as e: + print(f"ERROR: Failed to download {template} System VM template: {e}") + +def collect_template_metadata(selected_templates, options): + template_metadata_list = [] + if not os.path.exists(SYSTEMVM_TEMPLATES_METADATA_FILE): + print(f"ERROR: System VM templates metadata file not found at {SYSTEMVM_TEMPLATES_METADATA_FILE}, cannot download templates.") + sys.exit(1) + config = configparser.ConfigParser() + config.read(SYSTEMVM_TEMPLATES_METADATA_FILE) + template_repo_url = None + if options.systemvm_templates_repository: + if "default" in config and "downloadrepository" in config["default"]: + template_repo_url = config["default"]["downloadrepository"].strip() + if not template_repo_url: + print("ERROR: downloadrepository value is empty in metadata file, cannot use --systemvm-template-repository option.") + sys.exit(1) + for template in selected_templates: + if template in config: + url = config[template].get("downloadurl") + filename = config[template].get("filename") + checksum = config[template].get("checksum") + if url and filename: + if template_repo_url: + url = url.replace(template_repo_url, options.systemvm_templates_repository) + template_metadata_list.append({ + "template": template, + "url": url, + "filename": filename, + "checksum": checksum + }) + else: + print(f"ERROR: URL or filename not found for {template} System VM template in metadata.") + sys.exit(1) + else: + print(f"ERROR: No metadata found for {template} System VM template.") + sys.exit(1) + return template_metadata_list if __name__ == '__main__': initLoging("@MSLOGDIR@/setupManagement.log") @@ -45,6 +145,16 @@ if __name__ == '__main__': parser.add_option("--https", action="store_true", dest="https", help="Enable HTTPs connection of management server") parser.add_option("--tomcat7", action="store_true", dest="tomcat7", help="Depreciated option, don't use it") parser.add_option("--no-start", action="store_true", dest="nostart", help="Do not start management server after successful configuration") + parser.add_option( + "--systemvm-templates", + dest="systemvm_templates", + help="Specify System VM templates to download: all, kvm-aarch64, kvm-x86_64, xenserver, vmware or comma-separated list of hypervisor combinations (e.g., kvm-x86_64,xenserver). Default is kvm-x86_64.", + ) + parser.add_option( + "--systemvm-templates-repository", + dest="systemvm_templates_repository", + help="Specify the URL to download System VM templates from." + ) (options, args) = parser.parse_args() if options.https: glbEnv.svrMode = "HttpsServer" @@ -53,6 +163,34 @@ if __name__ == '__main__': if options.nostart: glbEnv.noStart = True + available_templates = ["kvm-aarch64", "kvm-x86_64", "xenserver", "vmware"] + templates_arg = options.systemvm_templates + + selected_templates = ["kvm-x86_64"] + if templates_arg: + templates_list = [t.strip().lower() for t in templates_arg.split(",")] + if "all" in templates_list: + if len(templates_list) > 1: + print("WARNING: 'all' specified for System VM templates, ignoring other specified templates.") + selected_templates = available_templates + else: + invalid_templates = [] + for t in templates_list: + if t in available_templates: + if t not in selected_templates: + selected_templates.append(t) + else: + if t not in invalid_templates: + invalid_templates.append(t) + if invalid_templates: + print(f"ERROR: Invalid System VM template names provided: {', '.join(invalid_templates)}") + sys.exit(1) + print(f"Selected systemvm templates to download: {', '.join(selected_templates) if selected_templates else 'None'}") + + template_metadata_list = [] + if selected_templates: + template_metadata_list = collect_template_metadata(selected_templates, options) + glbEnv.mode = "Server" print("Starting to configure CloudStack Management Server:") @@ -74,3 +212,6 @@ if __name__ == '__main__': syscfg.restore() except: pass + + for meta in template_metadata_list: + download_template_if_needed(meta["template"], meta["url"], meta["filename"], meta["checksum"]) diff --git a/client/conf/server.properties.in b/client/conf/server.properties.in index 5958486b4dff..7c5e3f925b08 100644 --- a/client/conf/server.properties.in +++ b/client/conf/server.properties.in @@ -62,3 +62,8 @@ extensions.deployment.mode=@EXTENSIONSDEPLOYMENTMODE@ # Thread pool configuration #threads.min=10 #threads.max=500 + +# The URL prefix for the system VM templates repository. When downloading system VM templates, the server replaces the +# `downloadrepository` key value from the metadata file in template URLs. If not specified, the original template URL +# will be used for download. +# system.vm.templates.download.repository=http://download.cloudstack.org/systemvm/ diff --git a/client/pom.xml b/client/pom.xml index 605487404a87..d8fa433d5be3 100644 --- a/client/pom.xml +++ b/client/pom.xml @@ -25,7 +25,7 @@ org.apache.cloudstack cloudstack - 4.22.0.0-SNAPSHOT + 4.23.0.0-SNAPSHOT diff --git a/core/pom.xml b/core/pom.xml index e4cd84357d1b..f91a330b7ba9 100644 --- a/core/pom.xml +++ b/core/pom.xml @@ -24,7 +24,7 @@ org.apache.cloudstack cloudstack - 4.22.0.0-SNAPSHOT + 4.23.0.0-SNAPSHOT diff --git a/core/src/main/java/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java b/core/src/main/java/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java index bd632632ae89..b9ac455130f3 100644 --- a/core/src/main/java/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java +++ b/core/src/main/java/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResource.java @@ -267,13 +267,13 @@ private Answer execute(UpdateNetworkCommand cmd) { if (result.getDetails().contains(String.format("Interface with IP %s not found", ipAddressTO.getPublicIp()))) { logger.warn(String.format("Skipping IP: %s as it isn't configured on router interface", ipAddressTO.getPublicIp())); } else if (ipAddressTO.getDetails().get(ApiConstants.REDUNDANT_STATE).equals(VirtualRouter.RedundantState.PRIMARY.name())) { - logger.warn(String.format("Failed to update interface mtu to %s on interface with ip: %s", + logger.warn(String.format("Failed to update interface MTU to %s on interface with IP: %s", ipAddressTO.getMtu(), ipAddressTO.getPublicIp())); finalResult = false; } continue; } - logger.info(String.format("Successfully updated mtu to %s on interface with ip: %s", + logger.info(String.format("Successfully updated MTU to %s on interface with IP: %s", ipAddressTO.getMtu(), ipAddressTO.getPublicIp())); finalResult &= true; } catch (Exception e) { diff --git a/core/src/main/java/com/cloud/network/HAProxyConfigurator.java b/core/src/main/java/com/cloud/network/HAProxyConfigurator.java index 7736bea3cdaf..128652fc64fa 100644 --- a/core/src/main/java/com/cloud/network/HAProxyConfigurator.java +++ b/core/src/main/java/com/cloud/network/HAProxyConfigurator.java @@ -629,9 +629,6 @@ public String[] generateConfiguration(final LoadBalancerConfigCommand lbCmd) { } } result.addAll(gSection); - // TODO decide under what circumstances these options are needed - // result.add("\tnokqueue"); - // result.add("\tnopoll"); result.add(blankLine); final List dSection = Arrays.asList(defaultsSection); diff --git a/core/src/main/java/com/cloud/storage/template/HttpTemplateDownloader.java b/core/src/main/java/com/cloud/storage/template/HttpTemplateDownloader.java index 4c056f256cf0..cf49217ef5ba 100755 --- a/core/src/main/java/com/cloud/storage/template/HttpTemplateDownloader.java +++ b/core/src/main/java/com/cloud/storage/template/HttpTemplateDownloader.java @@ -578,7 +578,7 @@ public VerifyFormat invoke() { logger.debug("Error on http connection : " + ex.getMessage()); } status = Status.UNRECOVERABLE_ERROR; - errorString = "Template content is unsupported, or mismatch between selected format and template content. Found : " + unsupportedFormat; + errorString = "Template content is unsupported, or mismatch between selected format and Template content. Found : " + unsupportedFormat; throw new CloudRuntimeException(errorString); } else { logger.debug("Verified format of downloading file " + file.getAbsolutePath() + " is supported"); diff --git a/core/src/main/java/com/cloud/storage/template/IsoProcessor.java b/core/src/main/java/com/cloud/storage/template/IsoProcessor.java index 6ab42effb524..76d19d53453b 100644 --- a/core/src/main/java/com/cloud/storage/template/IsoProcessor.java +++ b/core/src/main/java/com/cloud/storage/template/IsoProcessor.java @@ -48,7 +48,7 @@ public FormatInfo process(String templatePath, ImageFormat format, String templa String isoPath = templatePath + File.separator + templateName + "." + ImageFormat.ISO.getFileExtension(); if (!_storage.exists(isoPath)) { - logger.debug("Unable to find the iso file: " + isoPath); + logger.debug("Unable to find the ISO file: " + isoPath); return null; } diff --git a/core/src/main/java/com/cloud/storage/template/MetalinkTemplateDownloader.java b/core/src/main/java/com/cloud/storage/template/MetalinkTemplateDownloader.java index 2e62809dfeda..95ed0d1e76d0 100644 --- a/core/src/main/java/com/cloud/storage/template/MetalinkTemplateDownloader.java +++ b/core/src/main/java/com/cloud/storage/template/MetalinkTemplateDownloader.java @@ -108,7 +108,7 @@ private boolean performDownload() { ) { IOUtils.copy(in, out); } catch (IOException e) { - logger.error("Error downloading template from: " + _downloadUrl + " due to: " + e.getMessage()); + logger.error("Error downloading Template from: " + _downloadUrl + " due to: " + e.getMessage()); return false; } return true; diff --git a/core/src/main/java/com/cloud/storage/template/OVAProcessor.java b/core/src/main/java/com/cloud/storage/template/OVAProcessor.java index ab3aa0d0e3a5..28ab3b58d45d 100644 --- a/core/src/main/java/com/cloud/storage/template/OVAProcessor.java +++ b/core/src/main/java/com/cloud/storage/template/OVAProcessor.java @@ -68,7 +68,7 @@ public FormatInfo process(String templatePath, ImageFormat format, String templa String templateFilePath = templatePath + File.separator + templateName + "." + ImageFormat.OVA.getFileExtension(); if (!_storage.exists(templateFilePath)) { if (logger.isInfoEnabled()) { - logger.info("Unable to find the vmware template file: " + templateFilePath); + logger.info("Unable to find the VMware Template file: " + templateFilePath); } return null; } @@ -113,7 +113,7 @@ private OVFInformationTO createOvfInformationTO(OVFHelper ovfHelper, Document do List disks = ovfHelper.getOVFVolumeInfoFromFile(ovfFilePath, doc, null); if (CollectionUtils.isNotEmpty(disks)) { if (logger.isTraceEnabled()) { - logger.trace(String.format("Found %d disks in template %s", disks.size(), ovfFilePath)); + logger.trace(String.format("Found %d disks in Template %s", disks.size(), ovfFilePath)); } ovfInformationTO.setDisks(disks); } @@ -122,14 +122,14 @@ private OVFInformationTO createOvfInformationTO(OVFHelper ovfHelper, Document do logger.info("Found " + nets.size() + " prerequisite networks"); ovfInformationTO.setNetworks(nets); } else if (logger.isTraceEnabled()) { - logger.trace(String.format("no net prerequisites found in template %s", ovfFilePath)); + logger.trace(String.format("No net prerequisites found in Template %s", ovfFilePath)); } List ovfProperties = ovfHelper.getConfigurableOVFPropertiesFromDocument(doc); if (CollectionUtils.isNotEmpty(ovfProperties)) { logger.info("Found " + ovfProperties.size() + " configurable OVF properties"); ovfInformationTO.setProperties(ovfProperties); } else if (logger.isTraceEnabled()) { - logger.trace(String.format("no ovf properties found in template %s", ovfFilePath)); + logger.trace(String.format("No OVF properties found in Template %s", ovfFilePath)); } OVFVirtualHardwareSectionTO hardwareSection = ovfHelper.getVirtualHardwareSectionFromDocument(doc); List configurations = hardwareSection.getConfigurations(); @@ -213,7 +213,7 @@ public long getVirtualSize(File file) { return size; } catch (Exception e) { logger.info("[ignored]" - + "failed to get virtual template size for ova: " + e.getLocalizedMessage()); + + "failed to get virtual Template size for ova: " + e.getLocalizedMessage()); } return file.length(); } @@ -231,7 +231,7 @@ public long getTemplateVirtualSize(String templatePath, String templateName) thr String ovfFileName = getOVFFilePath(templateFileFullPath); OVFHelper ovfHelper = new OVFHelper(); if (ovfFileName == null) { - String msg = "Unable to locate OVF file in template package directory: " + templatePath; + String msg = "Unable to locate OVF file in Template package directory: " + templatePath; logger.error(msg); throw new InternalErrorException(msg); } diff --git a/core/src/main/java/com/cloud/storage/template/QCOW2Processor.java b/core/src/main/java/com/cloud/storage/template/QCOW2Processor.java index df1722a0201d..547c990fbafa 100644 --- a/core/src/main/java/com/cloud/storage/template/QCOW2Processor.java +++ b/core/src/main/java/com/cloud/storage/template/QCOW2Processor.java @@ -81,7 +81,7 @@ public long getVirtualSize(File file) throws IOException { long size = getTemplateVirtualSize(file); return size; } catch (Exception e) { - logger.info("[ignored]" + "failed to get template virtual size for QCOW2: " + e.getLocalizedMessage()); + logger.info("[ignored]" + "failed to get Template virtual size for QCOW2: " + e.getLocalizedMessage()); } return file.length(); } diff --git a/core/src/main/java/com/cloud/storage/template/S3TemplateDownloader.java b/core/src/main/java/com/cloud/storage/template/S3TemplateDownloader.java index c24a4cc221fc..70df906d1ce3 100644 --- a/core/src/main/java/com/cloud/storage/template/S3TemplateDownloader.java +++ b/core/src/main/java/com/cloud/storage/template/S3TemplateDownloader.java @@ -150,7 +150,7 @@ public long download(boolean resume, DownloadCompleteCallback callback) { } if (remoteSize > maxTemplateSizeInByte) { - errorString = "Remote size is too large for template " + downloadUrl + " remote size is " + remoteSize + " max allowed is " + maxTemplateSizeInByte; + errorString = "Remote size is too large for Template " + downloadUrl + " remote size is " + remoteSize + " max allowed is " + maxTemplateSizeInByte; logger.warn(errorString); status = Status.UNRECOVERABLE_ERROR; @@ -162,7 +162,7 @@ public long download(boolean resume, DownloadCompleteCallback callback) { try { inputStream = new BufferedInputStream(getMethod.getResponseBodyAsStream()); } catch (IOException e) { - errorString = "Exception occurred while opening InputStream for template " + downloadUrl; + errorString = "Exception occurred while opening InputStream for Template " + downloadUrl; logger.warn(errorString); status = Status.UNRECOVERABLE_ERROR; diff --git a/core/src/main/java/com/cloud/storage/template/TemplateLocation.java b/core/src/main/java/com/cloud/storage/template/TemplateLocation.java index 563c642f292e..4cd4d32d255c 100644 --- a/core/src/main/java/com/cloud/storage/template/TemplateLocation.java +++ b/core/src/main/java/com/cloud/storage/template/TemplateLocation.java @@ -103,7 +103,7 @@ public boolean load() throws IOException { try (FileInputStream strm = new FileInputStream(_file);) { _props.load(strm); } catch (IOException e) { - logger.warn("Unable to load the template properties for '" + _file + "': ", e); + logger.warn("Unable to load the Template properties for '" + _file + "': ", e); } for (ImageFormat format : ImageFormat.values()) { @@ -161,7 +161,7 @@ public boolean save() { try (FileOutputStream strm = new FileOutputStream(_file);) { _props.store(strm, ""); } catch (IOException e) { - logger.warn("Unable to save the template properties ", e); + logger.warn("Unable to save the Template properties ", e); return false; } return true; diff --git a/core/src/main/java/com/cloud/storage/template/VhdProcessor.java b/core/src/main/java/com/cloud/storage/template/VhdProcessor.java index 9f18d782b426..e9be8054506d 100644 --- a/core/src/main/java/com/cloud/storage/template/VhdProcessor.java +++ b/core/src/main/java/com/cloud/storage/template/VhdProcessor.java @@ -95,7 +95,7 @@ public long getVirtualSize(File file) throws IOException { long size = getTemplateVirtualSize(file); return size; } catch (Exception e) { - logger.info("[ignored]" + "failed to get template virtual size for VHD: " + e.getLocalizedMessage()); + logger.info("[ignored]" + "failed to get Template virtual size for VHD: " + e.getLocalizedMessage()); } return file.length(); } diff --git a/core/src/main/java/com/cloud/storage/template/VmdkProcessor.java b/core/src/main/java/com/cloud/storage/template/VmdkProcessor.java index 4f53c556667f..292c1f4f52e4 100644 --- a/core/src/main/java/com/cloud/storage/template/VmdkProcessor.java +++ b/core/src/main/java/com/cloud/storage/template/VmdkProcessor.java @@ -60,7 +60,7 @@ public FormatInfo process(String templatePath, ImageFormat format, String templa String templateFilePath = templatePath + File.separator + templateName + "." + ImageFormat.VMDK.getFileExtension(); if (!_storage.exists(templateFilePath)) { if (logger.isInfoEnabled()) { - logger.info("Unable to find the vmware template file: " + templateFilePath); + logger.info("Unable to find the VMware Template file: " + templateFilePath); } return null; } @@ -81,7 +81,7 @@ public long getVirtualSize(File file) { return size; } catch (Exception e) { logger.info("[ignored]" - + "failed to get template virtual size for vmdk: " + e.getLocalizedMessage()); + + "failed to get Template virtual size for vmdk: " + e.getLocalizedMessage()); } return file.length(); } diff --git a/core/src/main/java/org/apache/cloudstack/direct/download/DirectTemplateDownloaderImpl.java b/core/src/main/java/org/apache/cloudstack/direct/download/DirectTemplateDownloaderImpl.java index d22c803818be..a1485463eaa0 100644 --- a/core/src/main/java/org/apache/cloudstack/direct/download/DirectTemplateDownloaderImpl.java +++ b/core/src/main/java/org/apache/cloudstack/direct/download/DirectTemplateDownloaderImpl.java @@ -147,16 +147,16 @@ public boolean validateChecksum() { try { while (!valid && retry > 0) { retry--; - logger.info("Performing checksum validation for downloaded template " + templateId + " using " + checksum + ", retries left: " + retry); + logger.info("Performing checksum validation for downloaded Template " + templateId + " using " + checksum + ", retries left: " + retry); valid = DigestHelper.check(checksum, new FileInputStream(downloadedFilePath)); if (!valid && retry > 0) { - logger.info("Checksum validation failed, re-downloading template"); + logger.info("Checksum validation failed, re-downloading Template"); redownload = true; resetDownloadFile(); downloadTemplate(); } } - logger.info("Checksum validation for template " + templateId + ": " + (valid ? "succeeded" : "failed")); + logger.info("Checksum validation for Template " + templateId + ": " + (valid ? "succeeded" : "failed")); return valid; } catch (IOException e) { throw new CloudRuntimeException("could not check sum for file: " + downloadedFilePath, e); @@ -173,7 +173,7 @@ public boolean validateChecksum() { */ private void resetDownloadFile() { File f = new File(getDownloadedFilePath()); - logger.info("Resetting download file: " + getDownloadedFilePath() + ", in order to re-download and persist template " + templateId + " on it"); + logger.info("Resetting download file: " + getDownloadedFilePath() + ", in order to re-download and persist Template " + templateId + " on it"); try { if (f.exists()) { f.delete(); diff --git a/core/src/main/java/org/apache/cloudstack/direct/download/HttpDirectTemplateDownloader.java b/core/src/main/java/org/apache/cloudstack/direct/download/HttpDirectTemplateDownloader.java index 8c4147fad606..c4a802ecdbc6 100644 --- a/core/src/main/java/org/apache/cloudstack/direct/download/HttpDirectTemplateDownloader.java +++ b/core/src/main/java/org/apache/cloudstack/direct/download/HttpDirectTemplateDownloader.java @@ -82,7 +82,7 @@ public Pair downloadTemplate() { try { int status = client.executeMethod(request); if (status != HttpStatus.SC_OK) { - logger.warn("Not able to download template, status code: " + status); + logger.warn("Not able to download Template, status code: " + status); return new Pair<>(false, null); } return performDownload(); @@ -94,14 +94,14 @@ public Pair downloadTemplate() { } protected Pair performDownload() { - logger.info("Downloading template " + getTemplateId() + " from " + getUrl() + " to: " + getDownloadedFilePath()); + logger.info("Downloading Template " + getTemplateId() + " from " + getUrl() + " to: " + getDownloadedFilePath()); try ( InputStream in = request.getResponseBodyAsStream(); OutputStream out = new FileOutputStream(getDownloadedFilePath()) ) { IOUtils.copy(in, out); } catch (IOException e) { - logger.error("Error downloading template " + getTemplateId() + " due to: " + e.getMessage()); + logger.error("Error downloading Template " + getTemplateId() + " due to: " + e.getMessage()); return new Pair<>(false, null); } return new Pair<>(true, getDownloadedFilePath()); diff --git a/core/src/main/java/org/apache/cloudstack/direct/download/HttpsDirectTemplateDownloader.java b/core/src/main/java/org/apache/cloudstack/direct/download/HttpsDirectTemplateDownloader.java index b84718e4f932..34ab94d55b19 100644 --- a/core/src/main/java/org/apache/cloudstack/direct/download/HttpsDirectTemplateDownloader.java +++ b/core/src/main/java/org/apache/cloudstack/direct/download/HttpsDirectTemplateDownloader.java @@ -149,7 +149,7 @@ public Pair downloadTemplate() { * Consume response and persist it on getDownloadedFilePath() file */ protected Pair consumeResponse(CloseableHttpResponse response) { - logger.info("Downloading template " + getTemplateId() + " from " + getUrl() + " to: " + getDownloadedFilePath()); + logger.info("Downloading Template " + getTemplateId() + " from " + getUrl() + " to: " + getDownloadedFilePath()); if (response.getStatusLine().getStatusCode() != 200) { throw new CloudRuntimeException("Error on HTTPS response"); } @@ -159,7 +159,7 @@ protected Pair consumeResponse(CloseableHttpResponse response) OutputStream out = new FileOutputStream(getDownloadedFilePath()); IOUtils.copy(in, out); } catch (Exception e) { - logger.error("Error parsing response for template " + getTemplateId() + " due to: " + e.getMessage()); + logger.error("Error parsing response for Template " + getTemplateId() + " due to: " + e.getMessage()); return new Pair<>(false, null); } return new Pair<>(true, getDownloadedFilePath()); diff --git a/core/src/main/java/org/apache/cloudstack/direct/download/MetalinkDirectTemplateDownloader.java b/core/src/main/java/org/apache/cloudstack/direct/download/MetalinkDirectTemplateDownloader.java index 5335da991506..2050b9ef09f7 100644 --- a/core/src/main/java/org/apache/cloudstack/direct/download/MetalinkDirectTemplateDownloader.java +++ b/core/src/main/java/org/apache/cloudstack/direct/download/MetalinkDirectTemplateDownloader.java @@ -72,10 +72,10 @@ public MetalinkDirectTemplateDownloader(String url, String destPoolPath, Long te metalinkUrls = downloader.getMetalinkUrls(url); metalinkChecksums = downloader.getMetalinkChecksums(url); if (CollectionUtils.isEmpty(metalinkUrls)) { - logger.error(String.format("No urls found on metalink file: %s. Not possible to download template %s ", url, templateId)); + logger.error(String.format("No URLs found on metalink file: %s. Not possible to download Template %s ", url, templateId)); } else { setUrl(metalinkUrls.get(0)); - logger.info("Metalink downloader created, metalink url: " + url + " parsed - " + + logger.info("Metalink downloader created, metalink URL: " + url + " parsed - " + metalinkUrls.size() + " urls and " + (CollectionUtils.isNotEmpty(metalinkChecksums) ? metalinkChecksums.size() : "0") + " checksums found"); } @@ -93,7 +93,7 @@ public Pair downloadTemplate() { if (!isRedownload()) { setUrl(metalinkUrls.get(i)); } - logger.info("Trying to download template from url: " + getUrl()); + logger.info("Trying to download Template from URL: " + getUrl()); DirectTemplateDownloader urlDownloader = createDownloaderForMetalinks(getUrl(), getTemplateId(), getDestPoolPath(), getChecksum(), headers, connectTimeout, soTimeout, null, temporaryDownloadPath); try { @@ -106,10 +106,10 @@ public Pair downloadTemplate() { Pair downloadResult = urlDownloader.downloadTemplate(); downloaded = downloadResult.first(); if (downloaded) { - logger.info("Successfully downloaded template from url: " + getUrl()); + logger.info("Successfully downloaded Template from URL: " + getUrl()); } } catch (Exception e) { - logger.error(String.format("Error downloading template: %s from URL: %s due to: %s", getTemplateId(), getUrl(), e.getMessage()), e); + logger.error(String.format("Error downloading Template: %s from URL: %s due to: %s", getTemplateId(), getUrl(), e.getMessage()), e); } i++; } diff --git a/core/src/test/java/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResourceTest.java b/core/src/test/java/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResourceTest.java index 201242564ba6..4196587cc3f2 100644 --- a/core/src/test/java/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResourceTest.java +++ b/core/src/test/java/com/cloud/agent/resource/virtualnetwork/VirtualRoutingResourceTest.java @@ -417,8 +417,6 @@ private void verifyArgs(final SetNetworkACLCommand cmd, final String script, fin // FIXME Check the json content assertEquals(VRScripts.UPDATE_CONFIG, script); assertEquals(VRScripts.NETWORK_ACL_CONFIG, args); - // assertEquals(args, " -d eth3 -M 01:23:45:67:89:AB -i 192.168.1.1 -m 24 -a Egress:ALL:0:0:192.168.0.1/24-192.168.0.2/24:ACCEPT:," + - // "Ingress:ICMP:0:0:192.168.0.1/24-192.168.0.2/24:DROP:,Ingress:TCP:20:80:192.168.0.1/24-192.168.0.2/24:ACCEPT:,"); break; case 2: assertEquals(VRScripts.UPDATE_CONFIG, script); @@ -464,8 +462,6 @@ protected SetupGuestNetworkCommand generateSetupGuestNetworkCommand() { private void verifyArgs(final SetupGuestNetworkCommand cmd, final String script, final String args) { // TODO Check the contents of the json file - //assertEquals(script, VRScripts.VPC_GUEST_NETWORK); - //assertEquals(args, " -C -M 01:23:45:67:89:AB -d eth4 -i 10.1.1.2 -g 10.1.1.1 -m 24 -n 10.1.1.0 -s 8.8.8.8,8.8.4.4 -e cloud.test"); } @Test diff --git a/debian/changelog b/debian/changelog index ace6697a09e5..02251137e9d0 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,12 @@ -cloudstack (4.22.0.0-SNAPSHOT) unstable; urgency=low +cloudstack (4.23.0.0-SNAPSHOT) unstable; urgency=low - * Update the version to 4.22.0.0-SNAPSHOT + * Update the version to 4.23.0.0-SNAPSHOT + + -- the Apache CloudStack project Thu, 30 Oct 2025 19:23:55 +0530 + +cloudstack (4.23.0.0-SNAPSHOT-SNAPSHOT) unstable; urgency=low + + * Update the version to 4.23.0.0-SNAPSHOT-SNAPSHOT -- the Apache CloudStack project Thu, Aug 28 11:58:36 2025 +0530 diff --git a/debian/cloudstack-agent.install b/debian/cloudstack-agent.install index 58715e0746ba..0b9e874cb423 100644 --- a/debian/cloudstack-agent.install +++ b/debian/cloudstack-agent.install @@ -16,6 +16,7 @@ # under the License. /etc/cloudstack/agent/agent.properties +/etc/cloudstack/agent/uefi.properties /etc/cloudstack/agent/environment.properties /etc/cloudstack/agent/log4j-cloud.xml /etc/default/cloudstack-agent diff --git a/debian/cloudstack-agent.postinst b/debian/cloudstack-agent.postinst index 758af6e068ff..cd070c2f7853 100755 --- a/debian/cloudstack-agent.postinst +++ b/debian/cloudstack-agent.postinst @@ -23,7 +23,7 @@ case "$1" in configure) OLDCONFDIR="/etc/cloud/agent" NEWCONFDIR="/etc/cloudstack/agent" - CONFFILES="agent.properties log4j.xml log4j-cloud.xml" + CONFFILES="agent.properties uefi.properties log4j.xml log4j-cloud.xml" mkdir -m 0755 -p /usr/share/cloudstack-agent/tmp diff --git a/debian/control b/debian/control index 1292639ef304..78842e38ed27 100644 --- a/debian/control +++ b/debian/control @@ -24,7 +24,7 @@ Description: CloudStack server library Package: cloudstack-agent Architecture: all -Depends: ${python:Depends}, ${python3:Depends}, openjdk-17-jre-headless | java17-runtime-headless | java17-runtime | zulu-17, cloudstack-common (= ${source:Version}), lsb-base (>= 9), openssh-client, qemu-kvm (>= 2.5) | qemu-system-x86 (>= 5.2), libvirt-bin (>= 1.3) | libvirt-daemon-system (>= 3.0), iproute2, ebtables, vlan, ipset, python3-libvirt, ethtool, iptables, cryptsetup, rng-tools, rsync, lsb-release, ufw, apparmor, cpu-checker, libvirt-daemon-driver-storage-rbd, sysstat +Depends: ${python:Depends}, ${python3:Depends}, openjdk-17-jre-headless | java17-runtime-headless | java17-runtime | zulu-17, cloudstack-common (= ${source:Version}), lsb-base (>= 9), openssh-client, qemu-kvm (>= 2.5) | qemu-system-x86 (>= 5.2), libvirt-bin (>= 1.3) | libvirt-daemon-system (>= 3.0), iproute2, ebtables, vlan, ipset, python3-libvirt, ethtool, iptables, cryptsetup, rng-tools, rsync, ovmf, swtpm, lsb-release, ufw, apparmor, cpu-checker, libvirt-daemon-driver-storage-rbd, sysstat Recommends: init-system-helpers Conflicts: cloud-agent, cloud-agent-libs, cloud-agent-deps, cloud-agent-scripts Description: CloudStack agent diff --git a/debian/rules b/debian/rules index 4c3023aeae2f..842fc2408af7 100755 --- a/debian/rules +++ b/debian/rules @@ -4,7 +4,6 @@ VERSION := $(shell grep '' pom.xml | head -2 | tail -1 | cut -d'>' -f2 PACKAGE = $(shell dh_listpackages|head -n 1|cut -d '-' -f 1) SYSCONFDIR = "/etc" DESTDIR = "debian/tmp" -CMK_REL := $(shell wget -O - "https://api.github.com/repos/apache/cloudstack-cloudmonkey/releases" 2>/dev/null | jq -r '.[0].tag_name') %: dh $@ --with systemd @@ -90,7 +89,7 @@ override_dh_auto_install: rm -rf $(DESTDIR)/usr/share/$(PACKAGE)-management/templates/systemvm/sha512sum.txt # Bundle cmk in cloudstack-management - wget https://github.com/apache/cloudstack-cloudmonkey/releases/download/$(CMK_REL)/cmk.linux.x86-64 -O $(DESTDIR)/usr/bin/cmk + wget https://github.com/apache/cloudstack-cloudmonkey/releases/latest/download/cmk.linux.x86-64 -O $(DESTDIR)/usr/bin/cmk chmod +x $(DESTDIR)/usr/bin/cmk # nast hack for a couple of configuration files diff --git a/developer/pom.xml b/developer/pom.xml index c11415e04fa2..e2fd782fd25f 100644 --- a/developer/pom.xml +++ b/developer/pom.xml @@ -25,7 +25,7 @@ org.apache.cloudstack cloudstack - 4.22.0.0-SNAPSHOT + 4.23.0.0-SNAPSHOT diff --git a/engine/api/pom.xml b/engine/api/pom.xml index 9dcdb8e8f52c..cb50ef0cd46b 100644 --- a/engine/api/pom.xml +++ b/engine/api/pom.xml @@ -24,7 +24,7 @@ org.apache.cloudstack cloud-engine - 4.22.0.0-SNAPSHOT + 4.23.0.0-SNAPSHOT ../pom.xml diff --git a/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java b/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java index 31b08429cc44..947cbd8e6182 100644 --- a/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java +++ b/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/NetworkOrchestrationService.java @@ -80,7 +80,7 @@ public interface NetworkOrchestrationService { "What version should the Virtual Routers report", true, ConfigKey.Scope.Zone, null); ConfigKey NetworkLockTimeout = new ConfigKey<>(Integer.class, NetworkLockTimeoutCK, "Network", "600", - "Lock wait timeout (seconds) while implementing network", true, Scope.Global, null); + "Lock wait timeout (seconds) while implementing Network", true, Scope.Global, null); ConfigKey DeniedRoutes = new ConfigKey<>(String.class, "denied.routes", "Network", "", "Routes that are denied, can not be used for Static Routes creation for the VPC Private Gateway", true, ConfigKey.Scope.Zone, null); @@ -92,13 +92,13 @@ public interface NetworkOrchestrationService { "Default data transfer rate in megabits per second allowed in network.", true, ConfigKey.Scope.Zone); ConfigKey PromiscuousMode = new ConfigKey<>("Advanced", Boolean.class, "network.promiscuous.mode", "false", - "Whether to allow or deny promiscuous mode on nics for applicable network elements such as for vswitch/dvswitch portgroups.", true); + "Whether to allow or deny promiscuous mode on NICs for applicable network elements such as for vswitch/dvswitch portgroups.", true); ConfigKey MacAddressChanges = new ConfigKey<>("Advanced", Boolean.class, "network.mac.address.changes", "true", - "Whether to allow or deny mac address changes on nics for applicable network elements such as for vswitch/dvswitch porgroups.", true); + "Whether to allow or deny mac address changes on NICs for applicable network elements such as for vswitch/dvswitch porgroups.", true); ConfigKey ForgedTransmits = new ConfigKey<>("Advanced", Boolean.class, "network.forged.transmits", "true", - "Whether to allow or deny forged transmits on nics for applicable network elements such as for vswitch/dvswitch portgroups.", true); + "Whether to allow or deny forged transmits on NICs for applicable network elements such as for vswitch/dvswitch portgroups.", true); ConfigKey MacLearning = new ConfigKey<>("Advanced", Boolean.class, "network.mac.learning", "false", "Whether to allow or deny MAC learning on nics for applicable network elements such as for dvswitch portgroups.", true); diff --git a/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/StorageOrchestrationService.java b/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/StorageOrchestrationService.java index 481d0ebbc769..8be2015bfef6 100644 --- a/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/StorageOrchestrationService.java +++ b/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/StorageOrchestrationService.java @@ -18,12 +18,18 @@ package org.apache.cloudstack.engine.orchestration.service; import java.util.List; +import java.util.concurrent.Future; import org.apache.cloudstack.api.response.MigrationResponse; +import org.apache.cloudstack.engine.subsystem.api.storage.DataStore; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateInfo; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateService.TemplateApiResult; import org.apache.cloudstack.storage.ImageStoreService.MigrationPolicy; public interface StorageOrchestrationService { MigrationResponse migrateData(Long srcDataStoreId, List destDatastores, MigrationPolicy migrationPolicy); MigrationResponse migrateResources(Long srcImgStoreId, Long destImgStoreId, List templateIdList, List snapshotIdList); + + Future orchestrateTemplateCopyToImageStore(TemplateInfo source, DataStore destStore); } diff --git a/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/VolumeOrchestrationService.java b/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/VolumeOrchestrationService.java index 168822c21ebc..6f8c46304567 100644 --- a/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/VolumeOrchestrationService.java +++ b/engine/api/src/main/java/org/apache/cloudstack/engine/orchestration/service/VolumeOrchestrationService.java @@ -90,11 +90,11 @@ public interface VolumeOrchestrationService { "volume.allocation.algorithm", "Advanced", "random", - "Order in which storage pool within a cluster will be considered for volume allocation. The value can be 'random', 'firstfit', 'userdispersing', 'userconcentratedpod_random', 'userconcentratedpod_firstfit', or 'firstfitleastconsumed'.", + "Order in which storage pool within a cluster will be considered for volume allocation. The value can be 'random', 'firstfit', 'userdispersing', or 'firstfitleastconsumed'.", true, ConfigKey.Scope.Global, null, null, null, null, null, ConfigKey.Kind.Select, - "random,firstfit,userdispersing,userconcentratedpod_random,userconcentratedpod_firstfit,firstfitleastconsumed"); + "random,firstfit,userdispersing,firstfitleastconsumed"); VolumeInfo moveVolume(VolumeInfo volume, long destPoolDcId, Long destPoolPodId, Long destPoolClusterId, HypervisorType dataDiskHyperType) throws ConcurrentOperationException, StorageUnavailableException; diff --git a/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java b/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java index ce9f4a67a732..b30083cf3156 100644 --- a/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java +++ b/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/ObjectInDataStoreStateMachine.java @@ -32,8 +32,9 @@ enum State { Migrated("The object has been migrated"), Destroying("Template is destroying"), Destroyed("Template is destroyed"), - Failed("Failed to download template"), + Failed("Failed to download Template"), Hidden("The object is hidden from the user"); + String _description; private State(String description) { diff --git a/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java b/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java index d47aa5865a0f..997a66ec5901 100644 --- a/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java +++ b/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/SnapshotInfo.java @@ -25,7 +25,7 @@ public interface SnapshotInfo extends DataObject, Snapshot { ConfigKey BackupSnapshotAfterTakingSnapshot = new ConfigKey<>(Boolean.class, "snapshot.backup.to.secondary", "Snapshots", "true", "Indicates whether to always" - + " backup primary storage snapshot to secondary storage. Keeping snapshots only on Primary storage is applicable for KVM + Ceph only.", false, ConfigKey.Scope.Global, + + " backup primary storage Snapshot to secondary storage. Keeping Snapshots only on Primary storage is applicable for KVM + Ceph only.", false, ConfigKey.Scope.Global, null); SnapshotInfo getParent(); diff --git a/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/TemplateService.java b/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/TemplateService.java index 115cf024617f..a8861d5acc68 100644 --- a/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/TemplateService.java +++ b/engine/api/src/main/java/org/apache/cloudstack/engine/subsystem/api/storage/TemplateService.java @@ -78,4 +78,6 @@ public TemplateInfo getTemplate() { AsyncCallFuture createDatadiskTemplateAsync(TemplateInfo parentTemplate, TemplateInfo dataDiskTemplate, String path, String diskId, long fileSize, boolean bootable); List getTemplateDatadisksOnImageStore(TemplateInfo templateInfo, String configurationId); + + AsyncCallFuture copyTemplateToImageStore(DataObject source, DataStore destStore); } diff --git a/engine/components-api/pom.xml b/engine/components-api/pom.xml index ed67de2e0d88..49d41d36f83d 100644 --- a/engine/components-api/pom.xml +++ b/engine/components-api/pom.xml @@ -24,7 +24,7 @@ org.apache.cloudstack cloud-engine - 4.22.0.0-SNAPSHOT + 4.23.0.0-SNAPSHOT ../pom.xml diff --git a/engine/components-api/src/main/java/com/cloud/event/UsageEventUtils.java b/engine/components-api/src/main/java/com/cloud/event/UsageEventUtils.java index 94fbb7a80af8..1c88c7df124c 100644 --- a/engine/components-api/src/main/java/com/cloud/event/UsageEventUtils.java +++ b/engine/components-api/src/main/java/com/cloud/event/UsageEventUtils.java @@ -94,6 +94,14 @@ public static void publishUsageEvent(String usageType, long accountId, long zone } + public static void publishUsageEvent(String usageType, long accountId, long zoneId, long resourceId, String resourceName, Long offeringId, Long templateId, + Long size, String entityType, String entityUUID, Long vmId, boolean displayResource) { + if (displayResource) { + saveUsageEvent(usageType, accountId, zoneId, resourceId, offeringId, templateId, size, vmId, resourceName); + } + publishUsageEvent(usageType, accountId, zoneId, entityType, entityUUID); + } + public static void publishUsageEvent(String usageType, long accountId, long zoneId, long resourceId, String resourceName, Long offeringId, Long templateId, Long size, Long virtualSize, String entityType, String entityUUID, Map details) { saveUsageEvent(usageType, accountId, zoneId, resourceId, resourceName, offeringId, templateId, size, virtualSize, details); @@ -202,6 +210,10 @@ public static void saveUsageEvent(String usageType, long accountId, long zoneId, s_usageEventDao.persist(new UsageEventVO(usageType, accountId, zoneId, vmId, securityGroupId)); } + public static void saveUsageEvent(String usageType, long accountId, long zoneId, long resourceId, Long offeringId, Long templateId, Long size, Long vmId, String resourceName) { + s_usageEventDao.persist(new UsageEventVO(usageType, accountId, zoneId, resourceId, offeringId, templateId, size, vmId, resourceName)); + } + private static void publishUsageEvent(String usageEventType, Long accountId, Long zoneId, String resourceType, String resourceUUID) { String configKey = "publish.usage.events"; String value = s_configDao.getValue(configKey); diff --git a/engine/components-api/src/main/java/com/cloud/storage/StorageManager.java b/engine/components-api/src/main/java/com/cloud/storage/StorageManager.java index dbaffa8b3b5c..99504d4bc458 100644 --- a/engine/components-api/src/main/java/com/cloud/storage/StorageManager.java +++ b/engine/components-api/src/main/java/com/cloud/storage/StorageManager.java @@ -161,22 +161,22 @@ public interface StorageManager extends StorageService { ConfigKey.Scope.StoragePool, null); - ConfigKey PRIMARY_STORAGE_DOWNLOAD_WAIT = new ConfigKey("Storage", Integer.class, "primary.storage.download.wait", "10800", + ConfigKey PRIMARY_STORAGE_DOWNLOAD_WAIT = new ConfigKey<>("Storage", Integer.class, "primary.storage.download.wait", "10800", "In second, timeout for download template to primary storage", false); - ConfigKey SecStorageMaxMigrateSessions = new ConfigKey("Advanced", Integer.class, "secstorage.max.migrate.sessions", "2", + ConfigKey SecStorageMaxMigrateSessions = new ConfigKey<>("Advanced", Integer.class, "secstorage.max.migrate.sessions", "2", "The max number of concurrent copy command execution sessions that an SSVM can handle", false, ConfigKey.Scope.Global); - ConfigKey SecStorageVMAutoScaleDown = new ConfigKey("Advanced", Boolean.class, "secstorage.vm.auto.scale.down", "false", + ConfigKey SecStorageVMAutoScaleDown = new ConfigKey<>("Advanced", Boolean.class, "secstorage.vm.auto.scale.down", "false", "Setting this to 'true' will auto scale down SSVMs", true, ConfigKey.Scope.Global); - ConfigKey MaxDataMigrationWaitTime = new ConfigKey("Advanced", Integer.class, "max.data.migration.wait.time", "15", + ConfigKey MaxDataMigrationWaitTime = new ConfigKey<>("Advanced", Integer.class, "max.data.migration.wait.time", "15", "Maximum wait time (in minutes) for a data migration task before spawning a new SSVM", false, ConfigKey.Scope.Global); - ConfigKey DiskProvisioningStrictness = new ConfigKey("Storage", Boolean.class, "disk.provisioning.type.strictness", "false", + ConfigKey DiskProvisioningStrictness = new ConfigKey<>("Storage", Boolean.class, "disk.provisioning.type.strictness", "false", "If set to true, the disk is created only when there is a suitable storage pool that supports the disk provisioning type specified by the service/disk offering. " + "If set to false, the disk is created with a disk provisioning type supported by the pool. Default value is false, and this is currently supported for VMware only.", true, ConfigKey.Scope.Zone); - ConfigKey PreferredStoragePool = new ConfigKey(String.class, "preferred.storage.pool", "Advanced", "", + ConfigKey PreferredStoragePool = new ConfigKey<>(String.class, "preferred.storage.pool", "Advanced", "", "The UUID of preferred storage pool for allocation.", true, ConfigKey.Scope.Account, null); ConfigKey MountDisabledStoragePool = new ConfigKey<>(Boolean.class, @@ -203,7 +203,7 @@ public interface StorageManager extends StorageService { true, ConfigKey.Scope.Global, null); - static final ConfigKey DataStoreDownloadFollowRedirects = new ConfigKey<>(ConfigKey.CATEGORY_ADVANCED, + ConfigKey DataStoreDownloadFollowRedirects = new ConfigKey<>(ConfigKey.CATEGORY_ADVANCED, Boolean.class, "store.download.follow.redirects", "false", "Whether HTTP redirect is followed during store downloads for objects such as template, volume etc.", true, ConfigKey.Scope.Global); @@ -211,7 +211,7 @@ public interface StorageManager extends StorageService { ConfigKey HEURISTICS_SCRIPT_TIMEOUT = new ConfigKey<>("Advanced", Long.class, "heuristics.script.timeout", "3000", "The maximum runtime, in milliseconds, to execute the heuristic rule; if it is reached, a timeout will happen.", true); - ConfigKey AllowVolumeReSizeBeyondAllocation = new ConfigKey("Advanced", Boolean.class, "volume.resize.allowed.beyond.allocation", "false", + ConfigKey AllowVolumeReSizeBeyondAllocation = new ConfigKey<>("Advanced", Boolean.class, "volume.resize.allowed.beyond.allocation", "false", "Determines whether volume size can exceed the pool capacity allocation disable threshold (pool.storage.allocated.capacity.disablethreshold) " + "when resize a volume upto resize capacity disable threshold (pool.storage.allocated.resize.capacity.disablethreshold)", true, List.of(ConfigKey.Scope.StoragePool, ConfigKey.Scope.Zone)); @@ -228,9 +228,13 @@ public interface StorageManager extends StorageService { ConfigKey.Scope.Global, null); + ConfigKey COPY_PUBLIC_TEMPLATES_FROM_OTHER_STORAGES = new ConfigKey<>(Boolean.class, "copy.public.templates.from.other.storages", + "Storage", "true", "Allow SSVMs to try copying public templates from one secondary storage to another instead of downloading them from the source.", + true, ConfigKey.Scope.Zone, null); + /** * should we execute in sequence not involving any storages? - * @return tru if commands should execute in sequence + * @return true if commands should execute in sequence */ static boolean shouldExecuteInSequenceOnVmware() { return shouldExecuteInSequenceOnVmware(null, null); @@ -252,14 +256,14 @@ static Boolean getFullCloneConfiguration(Long storeId) { /** * Returns a comma separated list of tags for the specified storage pool - * @param poolId + * @param poolId the id of the pool to get tags for * @return comma separated list of tags */ String getStoragePoolTags(long poolId); /** * Returns a list of Strings with tags for the specified storage pool - * @param poolId + * @param poolId the id of the pool to get tags for * @return comma separated list of tags */ List getStoragePoolTagList(long poolId); @@ -276,7 +280,7 @@ static Boolean getFullCloneConfiguration(Long storeId) { Pair sendToPool(StoragePool pool, long[] hostIdsToTryFirst, List hostIdsToAvoid, Command cmd) throws StorageUnavailableException; - public Answer getVolumeStats(StoragePool pool, Command cmd); + Answer getVolumeStats(StoragePool pool, Command cmd); boolean canPoolProvideStorageStats(StoragePool pool); diff --git a/engine/components-api/src/main/java/com/cloud/template/TemplateManager.java b/engine/components-api/src/main/java/com/cloud/template/TemplateManager.java index f363deffc1fe..168b48709093 100644 --- a/engine/components-api/src/main/java/com/cloud/template/TemplateManager.java +++ b/engine/components-api/src/main/java/com/cloud/template/TemplateManager.java @@ -47,7 +47,7 @@ public interface TemplateManager { static final String TemplatePreloaderPoolSizeCK = "template.preloader.pool.size"; static final ConfigKey AllowPublicUserTemplates = new ConfigKey("Advanced", Boolean.class, AllowPublicUserTemplatesCK, "true", - "If false, users will not be able to create public templates.", true, ConfigKey.Scope.Account); + "If false, users will not be able to create public Templates.", true, ConfigKey.Scope.Account); static final ConfigKey TemplatePreloaderPoolSize = new ConfigKey("Advanced", Integer.class, TemplatePreloaderPoolSizeCK, "8", "Size of the TemplateManager threadpool", false, ConfigKey.Scope.Global); diff --git a/engine/components-api/src/main/java/com/cloud/vm/VmWorkSerializer.java b/engine/components-api/src/main/java/com/cloud/vm/VmWorkSerializer.java index bd6b52d261fa..e4fdc0c4f375 100644 --- a/engine/components-api/src/main/java/com/cloud/vm/VmWorkSerializer.java +++ b/engine/components-api/src/main/java/com/cloud/vm/VmWorkSerializer.java @@ -61,7 +61,6 @@ public static String serialize(VmWork work) { // use java binary serialization instead // return JobSerializerHelper.toObjectSerializedString(work); - // return s_gson.toJson(work); } public static T deserialize(Class clazz, String workInJsonText) { @@ -69,6 +68,5 @@ public static T deserialize(Class clazz, String workInJson // use java binary serialization instead // return (T)JobSerializerHelper.fromObjectSerializedString(workInJsonText); - // return (T)s_gson.fromJson(workInJsonText, clazz); } } diff --git a/engine/components-api/src/main/java/com/cloud/vm/snapshot/VMSnapshotManager.java b/engine/components-api/src/main/java/com/cloud/vm/snapshot/VMSnapshotManager.java index 997b413c099c..6478469f190c 100644 --- a/engine/components-api/src/main/java/com/cloud/vm/snapshot/VMSnapshotManager.java +++ b/engine/components-api/src/main/java/com/cloud/vm/snapshot/VMSnapshotManager.java @@ -42,7 +42,7 @@ public interface VMSnapshotManager extends VMSnapshotService, Manager { boolean deleteAllVMSnapshots(long id, VMSnapshot.Type type); /** - * Sync VM snapshot state when VM snapshot in reverting or snapshoting or expunging state + * Sync VM snapshot state when VM snapshot in reverting or snapshotting or expunging state * Used for fullsync after agent connects * * @param vm, the VM in question diff --git a/engine/orchestration/pom.xml b/engine/orchestration/pom.xml index c5040b6382b4..fda63d2558b0 100755 --- a/engine/orchestration/pom.xml +++ b/engine/orchestration/pom.xml @@ -24,7 +24,7 @@ org.apache.cloudstack cloud-engine - 4.22.0.0-SNAPSHOT + 4.23.0.0-SNAPSHOT ../pom.xml diff --git a/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java b/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java index 3d398ca5dd95..439bdf92ddd7 100644 --- a/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java +++ b/engine/orchestration/src/main/java/com/cloud/agent/manager/AgentManagerImpl.java @@ -1652,7 +1652,6 @@ protected void processRequest(final Link link, final Request request) { final String reason = shutdown.getReason(); logger.info("Host {} has informed us that it is shutting down with reason {} and detail {}", attache, reason, shutdown.getDetail()); if (reason.equals(ShutdownCommand.Update)) { - // disconnectWithoutInvestigation(attache, Event.UpdateNeeded); throw new CloudRuntimeException("Agent update not implemented"); } else if (reason.equals(ShutdownCommand.Requested)) { disconnectWithoutInvestigation(attache, Event.ShutdownRequested); @@ -1753,7 +1752,6 @@ protected void doTask(final Task task) throws TaskExecutionException { } } catch (final UnsupportedVersionException e) { logger.warn(e.getMessage()); - // upgradeAgent(task.getLink(), data, e.getReason()); } catch (final ClassNotFoundException e) { final String message = String.format("Exception occurred when executing tasks! Error '%s'", e.getMessage()); logger.error(message); diff --git a/engine/orchestration/src/main/java/com/cloud/agent/manager/ClusteredAgentManagerImpl.java b/engine/orchestration/src/main/java/com/cloud/agent/manager/ClusteredAgentManagerImpl.java index c64489828033..cfa0949883fd 100644 --- a/engine/orchestration/src/main/java/com/cloud/agent/manager/ClusteredAgentManagerImpl.java +++ b/engine/orchestration/src/main/java/com/cloud/agent/manager/ClusteredAgentManagerImpl.java @@ -539,7 +539,7 @@ public SocketChannel connectToPeer(final String peerName, final SocketChannel pr ch1.close(); throw new IOException("SSL: Fail to init SSL! " + e); } - logger.debug("Connection to peer opened: {}, ip: {}", peerName, ip); + logger.debug("Connection to peer opened: {}, IP: {}", peerName, ip); _peers.put(peerName, ch1); _sslEngines.put(peerName, sslEngine); return ch1; @@ -551,7 +551,7 @@ public SocketChannel connectToPeer(final String peerName, final SocketChannel pr logger.error("failed to close failed peer socket: {}", ex); } } - logger.warn("Unable to connect to peer management server: {}, ip {} due to {}", peerName, ip, e.getMessage(), e); + logger.warn("Unable to connect to peer management server: {}, IP {} due to {}", peerName, ip, e.getMessage(), e); return null; } } @@ -965,7 +965,6 @@ protected void runInContext() { synchronized (_agentToTransferIds) { if (!_agentToTransferIds.isEmpty()) { logger.debug("Found {} agents to transfer", _agentToTransferIds.size()); - // for (Long hostId : _agentToTransferIds) { for (final Iterator iterator = _agentToTransferIds.iterator(); iterator.hasNext(); ) { final Long hostId = iterator.next(); final AgentAttache attache = findAttache(hostId); diff --git a/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java b/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java index b3e672e2c17d..f9238fa0e717 100755 --- a/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java +++ b/engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java @@ -539,7 +539,7 @@ public void allocate(final String vmInstanceName, final VirtualMachineTemplate t final Map> extraDhcpOptions, final Map datadiskTemplateToDiskOfferingMap, Volume volume, Snapshot snapshot) throws InsufficientCapacityException { - logger.info("allocating virtual machine from template: {} with hostname: {} and {} networks", template, vmInstanceName, auxiliaryNetworks.size()); + logger.info("Allocating Instance from Template: {} with hostname: {} and {} networks", template, vmInstanceName, auxiliaryNetworks.size()); VMInstanceVO persistedVm = null; try { final VMInstanceVO vm = _vmDao.findVMByInstanceName(vmInstanceName); @@ -562,7 +562,7 @@ public void allocate(final String vmInstanceName, final VirtualMachineTemplate t } final Long rootDiskSizeFinal = rootDiskSize; - logger.debug("Allocating nics for {}", persistedVm); + logger.debug("Allocating NICs for {}", persistedVm); try { if (!vmProfile.getBootArgs().contains("ExternalLoadBalancerVm")) { @@ -1023,7 +1023,7 @@ public Ternary doInTransaction(final final State state = instance.getState(); if (state == State.Running) { - logger.debug("VM is already started: " + vm); + logger.debug("Instance is already started: " + vm); return null; } @@ -1384,14 +1384,14 @@ public void orchestrateStart(final String vmUuid, final Map vols = _volsDao.findReadyRootVolumesByInstance(vm.getId()); for (final VolumeVO vol : vols) { final Long volTemplateId = vol.getTemplateId(); if (volTemplateId != null && volTemplateId != template.getId()) { - logger.debug("{} of {} is READY, but template ids don't match, let the planner reassign a new pool", vol, vm); + logger.debug("{} of {} is READY, but Template IDs don't match, let the planner reassign a new pool", vol, vm); continue; } @@ -1651,8 +1651,8 @@ public void orchestrateStart(final String vmUuid, final Map prepareVmStorageMigration(VMInstanceVO vm, Map< clusterId = cluster.getId(); } if (dataCenterId == null) { - String msg = "Unable to migrate vm: failed to create deployment destination with given volume to pool map"; + String msg = "Unable to migrate Instance: failed to create deployment destination with given volume to pool map"; logger.debug(msg); throw new CloudRuntimeException(msg); } @@ -2920,7 +2920,7 @@ private Map prepareVmStorageMigration(VMInstanceVO vm, Map< try { stateTransitTo(vm, Event.StorageMigrationRequested, null); } catch (final NoTransitionException e) { - String msg = String.format("Unable to migrate vm: %s", vm.getUuid()); + String msg = String.format("Unable to migrate Instance: %s", vm.getUuid()); logger.warn(msg, e); throw new CloudRuntimeException(msg, e); } @@ -3046,8 +3046,8 @@ public void migrate(final String vmUuid, final long srcHostId, final DeployDesti private void orchestrateMigrate(final String vmUuid, final long srcHostId, final DeployDestination dest) throws ResourceUnavailableException, ConcurrentOperationException { final VMInstanceVO vm = _vmDao.findByUuid(vmUuid); if (vm == null) { - logger.debug("Unable to find the vm {}", vmUuid); - throw new CloudRuntimeException("Unable to find a virtual machine with id " + vmUuid); + logger.debug("Unable to find the Instance {}", vmUuid); + throw new CloudRuntimeException("Unable to find a Instance with ID: " + vmUuid); } migrate(vm, srcHostId, dest); } @@ -4018,8 +4018,8 @@ private void orchestrateReboot(final String vmUuid, final Map details) throws ResourceUnavailableException, InsufficientCapacityException { - logger.debug("Restoring vm {} with templateId: {}, diskOfferingId: {}, details: {}", vmId, newTemplateId, rootDiskOfferingId, details); + logger.debug("Restoring Instance {} with templateId: {}, diskOfferingId: {}, details: {}", vmId, newTemplateId, rootDiskOfferingId, details); final CallContext context = CallContext.current(); final Account account = context.getCallingAccount(); return _userVmService.restoreVirtualMachine(account, vmId, newTemplateId, rootDiskOfferingId, expunge, details); diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java index 2ad8d15d0b71..7f6571becc83 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/datacenter/entity/api/db/dao/EngineHostDaoImpl.java @@ -213,7 +213,6 @@ public EngineHostDaoImpl() { SequenceSearch = createSearchBuilder(); SequenceSearch.and("id", SequenceSearch.entity().getId(), SearchCriteria.Op.EQ); - // SequenceSearch.addRetrieve("sequence", SequenceSearch.entity().getSequence()); SequenceSearch.done(); DirectlyConnectedSearch = createSearchBuilder(); diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/DataMigrationUtility.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/DataMigrationUtility.java index 9609ba7751d9..5a8dc3038aa8 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/DataMigrationUtility.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/DataMigrationUtility.java @@ -22,10 +22,12 @@ import java.util.Collections; import java.util.Comparator; import java.util.HashMap; +import java.util.HashSet; import java.util.LinkedHashMap; import java.util.LinkedList; import java.util.List; import java.util.Map; +import java.util.Set; import javax.inject.Inject; @@ -206,12 +208,22 @@ public int compare(DataObject o1, DataObject o2) { protected List getAllReadyTemplates(DataStore srcDataStore, Map, Long>> childTemplates, List templates) { List files = new LinkedList<>(); + Set idsForMigration = new HashSet<>(); + for (TemplateDataStoreVO template : templates) { - VMTemplateVO templateVO = templateDao.findById(template.getTemplateId()); - if (shouldMigrateTemplate(template, templateVO)) { - files.add(templateFactory.getTemplate(template.getTemplateId(), srcDataStore)); + long templateId = template.getTemplateId(); + if (idsForMigration.contains(templateId)) { + logger.warn("Template store reference [{}] is duplicated; not considering it for migration.", template); + continue; + } + VMTemplateVO templateVO = templateDao.findById(templateId); + if (!shouldMigrateTemplate(template, templateVO)) { + continue; } + files.add(templateFactory.getTemplate(template.getTemplateId(), srcDataStore)); + idsForMigration.add(templateId); } + for (TemplateInfo template: files) { List children = templateDao.listByParentTemplatetId(template.getId()); List temps = new ArrayList<>(); @@ -221,6 +233,7 @@ protected List getAllReadyTemplates(DataStore srcDataStore, Map(temps, getTotalChainSize(temps))); } + return (List) (List) files; } @@ -263,16 +276,37 @@ protected boolean shouldMigrateTemplate(TemplateDataStoreVO template, VMTemplate */ protected List getAllReadySnapshotsAndChains(DataStore srcDataStore, Map, Long>> snapshotChains, List snapshots) { List files = new LinkedList<>(); + Set idsForMigration = new HashSet<>(); + for (SnapshotDataStoreVO snapshot : snapshots) { - SnapshotVO snapshotVO = snapshotDao.findById(snapshot.getSnapshotId()); - if (snapshot.getState() == ObjectInDataStoreStateMachine.State.Ready && - snapshotVO != null && snapshotVO.getHypervisorType() != Hypervisor.HypervisorType.Simulator - && snapshot.getParentSnapshotId() == 0 ) { - SnapshotInfo snap = snapshotFactory.getSnapshot(snapshotVO.getSnapshotId(), snapshot.getDataStoreId(), snapshot.getRole()); - if (snap != null) { - files.add(snap); - } + long snapshotId = snapshot.getSnapshotId(); + if (idsForMigration.contains(snapshotId)) { + logger.warn("Snapshot store reference [{}] is duplicated; not considering it for migration.", snapshot); + continue; + } + if (snapshot.getState() != ObjectInDataStoreStateMachine.State.Ready) { + logger.warn("Not migrating snapshot [{}] because its state is not ready.", snapshot); + continue; + } + SnapshotVO snapshotVO = snapshotDao.findById(snapshotId); + if (snapshotVO == null) { + logger.debug("Not migrating snapshot [{}] because we could not find its database entry.", snapshot); + continue; + } + if (snapshotVO.getHypervisorType() == Hypervisor.HypervisorType.Simulator) { + logger.debug("Not migrating snapshot [{}] because its hypervisor type is simulator.", snapshot); + continue; } + if (snapshot.getParentSnapshotId() != 0) { + continue; // The child snapshot will be migrated in the for loop below. + } + SnapshotInfo snap = snapshotFactory.getSnapshot(snapshotVO.getSnapshotId(), snapshot.getDataStoreId(), snapshot.getRole()); + if (snap == null) { + logger.debug("Not migrating snapshot [{}] because we could not get its information.", snapshot); + continue; + } + files.add(snap); + idsForMigration.add(snapshotId); } for (SnapshotInfo parent : files) { @@ -285,7 +319,7 @@ protected List getAllReadySnapshotsAndChains(DataStore srcDataStore, chain.addAll(children); } } - snapshotChains.put(parent, new Pair, Long>(chain, getTotalChainSize(chain))); + snapshotChains.put(parent, new Pair<>(chain, getTotalChainSize(chain))); } return (List) (List) files; @@ -306,14 +340,31 @@ protected Long getTotalChainSize(List chain) { protected List getAllReadyVolumes(DataStore srcDataStore, List volumes) { List files = new LinkedList<>(); + Set idsForMigration = new HashSet<>(); + for (VolumeDataStoreVO volume : volumes) { - if (volume.getState() == ObjectInDataStoreStateMachine.State.Ready) { - VolumeInfo volumeInfo = volumeFactory.getVolume(volume.getVolumeId(), srcDataStore); - if (volumeInfo != null && volumeInfo.getHypervisorType() != Hypervisor.HypervisorType.Simulator) { - files.add(volumeInfo); - } + long volumeId = volume.getVolumeId(); + if (idsForMigration.contains(volumeId)) { + logger.warn("Volume store reference [{}] is duplicated; not considering it for migration.", volume); + continue; } + if (volume.getState() != ObjectInDataStoreStateMachine.State.Ready) { + logger.debug("Not migrating volume [{}] because its state is not ready.", volume); + continue; + } + VolumeInfo volumeInfo = volumeFactory.getVolume(volume.getVolumeId(), srcDataStore); + if (volumeInfo == null) { + logger.debug("Not migrating volume [{}] because we could not get its information.", volume); + continue; + } + if (volumeInfo.getHypervisorType() == Hypervisor.HypervisorType.Simulator) { + logger.debug("Not migrating volume [{}] because its hypervisor type is simulator.", volume); + continue; + } + files.add(volumeInfo); + idsForMigration.add(volumeId); } + return files; } @@ -325,10 +376,9 @@ protected List getAllReadyVolumes(DataStore srcDataStore) { /** Returns the count of active SSVMs - SSVM with agents in connected state, so as to dynamically increase the thread pool * size when SSVMs scale */ - protected int activeSSVMCount(DataStore dataStore) { - long datacenterId = dataStore.getScope().getScopeId(); + protected int activeSSVMCount(Long zoneId) { List ssvms = - secStorageVmDao.getSecStorageVmListInStates(null, datacenterId, VirtualMachine.State.Running, VirtualMachine.State.Migrating); + secStorageVmDao.getSecStorageVmListInStates(null, zoneId, VirtualMachine.State.Running, VirtualMachine.State.Migrating); int activeSSVMs = 0; for (SecondaryStorageVmVO vm : ssvms) { String name = "s-"+vm.getId()+"-VM"; diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java index ae07c4c7bc46..ebf3415b2f2d 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/NetworkOrchestrator.java @@ -934,17 +934,17 @@ private Pair addRequestedNicToNicListWithDeviceNumberAndRet final int devId = vmNic.getDeviceId(); if (devId >= deviceIds.length) { - throw new IllegalArgumentException("Device id for nic is too large: " + vmNic); + throw new IllegalArgumentException("Device ID for NIC is too large: " + vmNic); } if (deviceIds[devId]) { - throw new IllegalArgumentException("Conflicting device id for two different nics: " + vmNic); + throw new IllegalArgumentException("Conflicting device ID for two different NICs: " + vmNic); } deviceIds[devId] = true; if (vmNic.isDefaultNic()) { if (defaultNic != null) { - throw new IllegalArgumentException("You cannot specify two nics as default nics: nic 1 = " + defaultNic + "; nic 2 = " + vmNic); + throw new IllegalArgumentException("You cannot specify two NICs as default NICs: NIC 1 = " + defaultNic + "; NIC 2 = " + vmNic); } defaultNic = vmNic; } @@ -1025,9 +1025,9 @@ private int determineNumberOfNicsRequired(final VirtualMachineProfile vm, final */ private void createExtraNics(final VirtualMachineProfile vm, int size, List nics, Network finalNetwork) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException { if (nics.size() != size) { - logger.warn("Number of nics {} doesn't match number of requested nics {}", nics.size(), size); + logger.warn("Number of NICs {} doesn't match number of requested NICs {}", nics.size(), size); if (nics.size() > size) { - throw new CloudRuntimeException("Number of nics " + nics.size() + " doesn't match number of requested networks " + size); + throw new CloudRuntimeException("Number of NICs " + nics.size() + " doesn't match number of requested networks " + size); } else { if (finalNetwork == null) { throw new CloudRuntimeException(String.format("can not assign network to %d remaining required NICs", size - nics.size())); @@ -1077,7 +1077,7 @@ public NicVO doInTransaction(TransactionStatus status) { private NicVO checkForRaceAndAllocateNic(final NicProfile requested, final Network network, final Boolean isDefaultNic, int deviceId, final VirtualMachineProfile vm) throws InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException { final NetworkVO ntwkVO = _networksDao.findById(network.getId()); - logger.debug("Allocating nic for vm {} in network {} with requested profile {}", vm.getVirtualMachine(), network, requested); + logger.debug("Allocating NIC for Instance {} in Network {} with requested profile {}", vm.getVirtualMachine(), network, requested); final NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, ntwkVO.getGuruName()); NicVO vo; @@ -1657,13 +1657,13 @@ public void implementNetworkElementsAndResources(final DeployDestination dest, f ips = _ipAddressDao.listByAssociatedVpc(network.getVpcId(), true); if (ips.isEmpty()) { final Vpc vpc = _vpcMgr.getActiveVpc(network.getVpcId()); - logger.debug("Creating a source nat ip for vpc {}", vpc); + logger.debug("Creating a source NAT IP for VPC {}", vpc); _vpcMgr.assignSourceNatIpAddressToVpc(owner, vpc, null); } } else { ips = _ipAddressDao.listByAssociatedNetwork(network.getId(), true); if (ips.isEmpty()) { - logger.debug("Creating a source nat ip for network {}", network); + logger.debug("Creating a source NAT IP for Network {}", network); _ipAddrMgr.assignSourceNatIpAddressToGuestNetwork(owner, network); } } @@ -1768,13 +1768,13 @@ protected boolean reprogramNetworkRules(final long networkId, final Account call _firewallMgr.applyDefaultEgressFirewallRule(network.getId(), offering.isEgressDefaultPolicy(), true); } if (!_firewallMgr.applyFirewallRules(firewallEgressRulesToApply, false, caller)) { - logger.warn("Failed to reapply firewall Egress rule(s) as a part of network {} restart", network); + logger.warn("Failed to reapply firewall Egress rule(s) as a part of Network {} restart", network); success = false; } // associate all ip addresses if (!_ipAddrMgr.applyIpAssociations(network, false)) { - logger.warn("Failed to apply ip addresses as a part of network {} restart", network); + logger.warn("Failed to apply IP addresses as a part of Network {} restart", network); success = false; } @@ -2121,7 +2121,7 @@ public void doInTransactionWithoutResult(final TransactionStatus status) { _nicDao.update(nic.getId(), nic); if (nic.getVmType() == VirtualMachine.Type.User) { - logger.debug(String.format("Changing active number of nics for network id=%s on %d", network, count)); + logger.debug(String.format("Changing active number of NICs for Network ID=%s on %d", network, count)); _networksDao.changeActiveNicsBy(network.getId(), count); } @@ -2155,8 +2155,8 @@ public int compare(final NicVO nic1, final NicVO nic2) { final Pair implemented = implementNetwork(nic.getNetworkId(), dest, context, vmProfile.getVirtualMachine().getType() == Type.DomainRouter); if (implemented == null || implemented.first() == null) { NetworkVO network = _networksDao.findById(nic.getNetworkId()); - logger.warn("Failed to implement network: {} as a part of preparing nic {}", network, nic); - throw new CloudRuntimeException(String.format("Failed to implement network id=%s as a part preparing nic %s", network, nic)); + logger.warn("Failed to implement Network: {} as a part of preparing NIC {}", network, nic); + throw new CloudRuntimeException(String.format("Failed to implement Network ID=%s as a part preparing NIC %s", network, nic)); } final NetworkVO network = implemented.second(); @@ -2354,7 +2354,7 @@ public void prepareAllNicsForMigration(final VirtualMachineProfile vm, final Dep final NetworkVO network = _networksDao.findById(ntwkId); final NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, network.getGuruName()); final NicProfile profile = new NicProfile(); - logger.debug("Creating nic profile for migration. BroadcastUri: {} NetworkId: {} VM: {}", broadcastUri.toString(), network, vm); + logger.debug("Creating NIC profile for migration. BroadcastUri: {} NetworkId: {} Instance: {}", broadcastUri.toString(), network, vm); profile.setDeviceId(255); //dummyId profile.setIPv4Address(userIp.getAddress().toString()); profile.setIPv4Netmask(publicIp.getNetmask()); @@ -2476,7 +2476,7 @@ protected void releaseNic(final VirtualMachineProfile vmProfile, final long nicI public Pair doInTransaction(final TransactionStatus status) { final NicVO nic = _nicDao.lockRow(nicId, true); if (nic == null) { - throw new ConcurrentOperationException(String.format("Unable to acquire lock on nic id=%d", nicId)); + throw new ConcurrentOperationException(String.format("Unable to acquire lock on NIC ID=%d", nicId)); } final Nic.State originalState = nic.getState(); @@ -2540,7 +2540,7 @@ public Pair doInTransaction(final TransactionStatus status) @Override public void cleanupNics(final VirtualMachineProfile vm) { - logger.debug("Cleaning network for vm: {}", vm); + logger.debug("Cleaning Network for Instance: {}", vm); final List nics = _nicDao.listByVmId(vm.getId()); for (final NicVO nic : nics) { @@ -2561,7 +2561,7 @@ protected void removeNic(final VirtualMachineProfile vm, final NicVO nic) { try { releaseNic(vm, nic.getId()); } catch (final Exception ex) { - logger.warn("Failed to release nic: {} as part of remove operation due to", nic.toString(), ex); + logger.warn("Failed to release NIC: {} as part of remove operation due to", nic.toString(), ex); } } @@ -2596,9 +2596,9 @@ protected void removeNic(final VirtualMachineProfile vm, final NicVO nic) { try { element.release(network, profile, vm, null); } catch (final ConcurrentOperationException ex) { - logger.warn("release failed during the nic " + nic.toString() + " removeNic due to ", ex); + logger.warn("Release failed during the NIC " + nic.toString() + " removeNic due to ", ex); } catch (final ResourceUnavailableException ex) { - logger.warn("release failed during the nic " + nic.toString() + " removeNic due to ", ex); + logger.warn("Release failed during the NIC " + nic.toString() + " removeNic due to ", ex); } } } @@ -2621,11 +2621,11 @@ && isDhcpAccrossMultipleSubnetsSupported(dhcpServiceProvider)) { if (dnsServiceProvider != null) { try { if (!dnsServiceProvider.removeDnsSupportForSubnet(network)) { - logger.warn("Failed to remove the ip alias on the dns server"); + logger.warn("Failed to remove the IP alias on the DNS server"); } } catch (final ResourceUnavailableException e) { //failed to remove the dnsconfig. - logger.info("Unable to delete the ip alias due to unable to contact the dns server."); + logger.info("Unable to delete the IP alias due to unable to contact the DNS server."); } } } @@ -2637,7 +2637,7 @@ && isDhcpAccrossMultipleSubnetsSupported(dhcpServiceProvider)) { _nicDao.remove(nic.getId()); } - logger.debug("Removed nic {}", nic); + logger.debug("Removed NIC ID=" + nic.getId()); // release assigned IPv6 for Isolated Network VR NIC if (Type.User.equals(vm.getType()) && GuestType.Isolated.equals(network.getGuestType()) @@ -2650,7 +2650,7 @@ && isDhcpAccrossMultipleSubnetsSupported(dhcpServiceProvider)) { //remove the secondary ip addresses corresponding to this nic if (!removeVmSecondaryIpsOfNic(nic.getId())) { - logger.debug("Removing nic {} secondary ip addresses failed", nic); + logger.debug("Removing NIC {} secondary IP addresses failed", nic); } } @@ -2689,12 +2689,12 @@ public void doInTransactionWithoutResult(final TransactionStatus status) { } }); if (!dhcpServiceProvider.removeDhcpSupportForSubnet(network)) { - logger.warn("Failed to remove the ip alias on the router, marking it as removed in db and freed the allocated ip {}", ipAlias.getIp4Address()); + logger.warn("Failed to remove the IP alias on the router, marking it as removed in db and freed the allocated IP {}", ipAlias.getIp4Address()); } } } catch (final ResourceUnavailableException e) { //failed to remove the dhcpconfig on the router. - logger.info("Unable to delete the ip alias due to unable to contact the virtualrouter."); + logger.info("Unable to delete the IP alias due to unable to contact the virtualrouter."); } } @@ -3371,7 +3371,7 @@ public boolean destroyNetwork(final long networkId, final ReservationContext con for (final UserVmVO vm : userVms) { if (!(vm.getState() == VirtualMachine.State.Expunging && vm.getRemoved() != null)) { - logger.warn("Can't delete the network, not all user vms are expunged. Vm {} is in {} state", vm, vm.getState()); + logger.warn("Can't delete the Network, not all User Instances are expunged. Instance {} is in {} state", vm, vm.getState()); return false; } } @@ -3379,7 +3379,7 @@ public boolean destroyNetwork(final long networkId, final ReservationContext con // Don't allow to delete network via api call when it has vms assigned to it final int nicCount = getActiveNicsInNetwork(networkId); if (nicCount > 0) { - logger.debug("The network {} has active Nics, but shouldn't.", network); + logger.debug("The Network {} has active NICs, but shouldn't.", network); // at this point we have already determined that there are no active user vms in network // if the op_networks table shows active nics, it's a bug in releasing nics updating op_networks _networksDao.changeActiveNicsBy(networkId, -1 * nicCount); @@ -3390,7 +3390,7 @@ public boolean destroyNetwork(final long networkId, final ReservationContext con if (zone.getNetworkType() == NetworkType.Basic) { final List systemVms = _vmDao.listNonRemovedVmsByTypeAndNetwork(network.getId(), Type.ConsoleProxy, Type.SecondaryStorageVm); if (systemVms != null && !systemVms.isEmpty()) { - logger.warn("Can't delete the network, not all consoleProxy/secondaryStorage vms are expunged"); + logger.warn("Can't delete the Network, not all consoleProxy/secondaryStorage VMs are expunged"); return false; } } @@ -3448,12 +3448,12 @@ public List doInTransaction(TransactionStatus status) { final NetworkGuru guru = AdapterBase.getAdapterByName(networkGurus, networkFinal.getGuruName()); if (!guru.trash(networkFinal, _networkOfferingDao.findById(networkFinal.getNetworkOfferingId()))) { - throw new CloudRuntimeException("Failed to trash network."); + throw new CloudRuntimeException("Failed to trash Network."); } Pair> deletedVlans = deleteVlansInNetwork(networkFinal, context.getCaller().getId(), callerAccount); if (!deletedVlans.first()) { - logger.warn("Failed to delete network " + networkFinal + "; was unable to cleanup corresponding ip ranges"); - throw new CloudRuntimeException("Failed to delete network " + networkFinal + "; was unable to cleanup corresponding ip ranges"); + logger.warn("Failed to delete Network " + networkFinal + "; was unable to cleanup corresponding IP ranges"); + throw new CloudRuntimeException("Failed to delete Network " + networkFinal + "; was unable to cleanup corresponding IP ranges"); } else { // commit transaction only when ips and vlans for the network are released successfully @@ -3546,7 +3546,7 @@ protected Pair> deleteVlansInNetwork(final NetworkVO netwo //cleanup private vlans final int privateIpAllocCount = _privateIpDao.countAllocatedByNetworkId(networkId); if (privateIpAllocCount > 0) { - logger.warn("Can't delete Private ip range for network {} as it has allocated ip addresses", network); + logger.warn("Can't delete Private IP range for Network {} as it has allocated IP addresses", network); result = false; } else { _privateIpDao.deleteByNetworkId(networkId); @@ -3695,7 +3695,7 @@ public boolean restartNetwork(final Long networkId, final Account callerAccount, try { VMInstanceVO instanceVO = _vmDao.findById(router.getId()); if (instanceVO == null) { - logger.info("Did not find a virtual router instance for the network"); + logger.info("Did not find a virtual router Instance for the Network"); continue; } Pair patched = mgr.updateSystemVM(instanceVO, true); @@ -4496,7 +4496,7 @@ public NicProfile createNicForVm(final Network network, final NicProfile request nic = allocateNic(requested, network, isDefaultNic, deviceId, vmProfile).first(); if (nic == null) { - throw new CloudRuntimeException("Failed to allocate nic for vm " + vm + " in network " + network); + throw new CloudRuntimeException("Failed to allocate nic for Instance " + vm + " in network " + network); } //Update vm_network_map table @@ -4504,18 +4504,18 @@ public NicProfile createNicForVm(final Network network, final NicProfile request final VMNetworkMapVO vno = new VMNetworkMapVO(vm.getId(), network.getId()); _vmNetworkMapDao.persist(vno); } - logger.debug("Nic is allocated successfully for vm {} in network {}", vm, network); + logger.debug("NIC is allocated successfully for Instance {} in Network {}", vm, network); } //2) prepare nic if (prepare) { final Pair implemented = implementNetwork(nic.getNetworkId(), dest, context, vmProfile.getVirtualMachine().getType() == Type.DomainRouter); if (implemented == null || implemented.first() == null) { - logger.warn("Failed to implement network {} as a part of preparing nic {}", network, nic); - throw new CloudRuntimeException(String.format("Failed to implement network %s as a part preparing nic %s", network, nic)); + logger.warn("Failed to implement Network {} as a part of preparing NIC {}", network, nic); + throw new CloudRuntimeException(String.format("Failed to implement Network %s as a part preparing NIC %s", network, nic)); } nic = prepareNic(vmProfile, dest, context, nic.getId(), implemented.second()); - logger.debug("Nic is prepared successfully for vm {} in network {}", vm, network); + logger.debug("NIC is prepared successfully for Instance {} in Network {}", vm, network); } return nic; @@ -4733,7 +4733,7 @@ public NicVO savePlaceholderNic(final Network network, final String ip4Address, @Override public Pair importNic(final String macAddress, int deviceId, final Network network, final Boolean isDefaultNic, final VirtualMachine vm, final Network.IpAddresses ipAddresses, final DataCenter dataCenter, final boolean forced) throws ConcurrentOperationException, InsufficientVirtualNetworkCapacityException, InsufficientAddressCapacityException { - logger.debug("Allocating nic for vm {} in network {} during import", vm, network); + logger.debug("Allocating NIC for Instance {} in Network {} during import", vm, network); String selectedIp = null; if (ipAddresses != null && StringUtils.isNotEmpty(ipAddresses.getIp4Address())) { if (ipAddresses.getIp4Address().equals("auto")) { diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/StorageOrchestrator.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/StorageOrchestrator.java index 0773c20b6b98..37a1f8dc196e 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/StorageOrchestrator.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/StorageOrchestrator.java @@ -46,6 +46,8 @@ 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.TemplateService; +import org.apache.cloudstack.engine.subsystem.api.storage.TemplateService.TemplateApiResult; import org.apache.cloudstack.framework.async.AsyncCallFuture; import org.apache.cloudstack.framework.config.ConfigKey; import org.apache.cloudstack.framework.config.Configurable; @@ -71,9 +73,12 @@ import com.cloud.utils.Pair; import com.cloud.utils.component.ManagerBase; import com.cloud.utils.exception.CloudRuntimeException; +import org.apache.logging.log4j.ThreadContext; public class StorageOrchestrator extends ManagerBase implements StorageOrchestrationService, Configurable { + private static final String LOGCONTEXTID = "logcontextid"; + @Inject SnapshotDataStoreDao snapshotDataStoreDao; @Inject @@ -91,6 +96,8 @@ public class StorageOrchestrator extends ManagerBase implements StorageOrchestra @Inject private SecondaryStorageService secStgSrv; @Inject + TemplateService templateService; + @Inject TemplateDataStoreDao templateDataStoreDao; @Inject VolumeDataStoreDao volumeDataStoreDao; @@ -106,6 +113,9 @@ public class StorageOrchestrator extends ManagerBase implements StorageOrchestra Integer numConcurrentCopyTasksPerSSVM = 2; + private final Map zoneExecutorMap = new HashMap<>(); + private final Map zonePendingWorkCountMap = new HashMap<>(); + @Override public String getConfigComponentName() { return StorageOrchestrationService.class.getName(); @@ -167,8 +177,6 @@ public MigrationResponse migrateData(Long srcDataStoreId, List destDatasto double meanstddev = getStandardDeviation(storageCapacities); double threshold = ImageStoreImbalanceThreshold.value(); MigrationResponse response = null; - ThreadPoolExecutor executor = new ThreadPoolExecutor(numConcurrentCopyTasksPerSSVM , numConcurrentCopyTasksPerSSVM, 30, - TimeUnit.MINUTES, new MigrateBlockingQueue<>(numConcurrentCopyTasksPerSSVM)); Date start = new Date(); if (meanstddev < threshold && migrationPolicy == MigrationPolicy.BALANCE) { logger.debug("mean std deviation of the image stores is below threshold, no migration required"); @@ -177,7 +185,7 @@ public MigrationResponse migrateData(Long srcDataStoreId, List destDatasto } int skipped = 0; - List>> futures = new ArrayList<>(); + List> futures = new ArrayList<>(); while (true) { DataObject chosenFileForMigration = null; if (files.size() > 0) { @@ -206,7 +214,7 @@ public MigrationResponse migrateData(Long srcDataStoreId, List destDatasto } if (shouldMigrate(chosenFileForMigration, srcDatastore.getId(), destDatastoreId, storageCapacities, snapshotChains, childTemplates, migrationPolicy)) { - storageCapacities = migrateAway(chosenFileForMigration, storageCapacities, snapshotChains, childTemplates, srcDatastore, destDatastoreId, executor, futures); + storageCapacities = migrateAway(chosenFileForMigration, storageCapacities, snapshotChains, childTemplates, srcDatastore, destDatastoreId, futures); } else { if (migrationPolicy == MigrationPolicy.BALANCE) { continue; @@ -217,7 +225,7 @@ public MigrationResponse migrateData(Long srcDataStoreId, List destDatasto } } Date end = new Date(); - handleSnapshotMigration(srcDataStoreId, start, end, migrationPolicy, futures, storageCapacities, executor); + handleSnapshotMigration(srcDataStoreId, start, end, migrationPolicy, futures, storageCapacities); return handleResponse(futures, migrationPolicy, message, success); } @@ -250,9 +258,7 @@ public MigrationResponse migrateResources(Long srcImgStoreId, Long destImgStoreI storageCapacities = getStorageCapacities(storageCapacities, srcImgStoreId); storageCapacities = getStorageCapacities(storageCapacities, destImgStoreId); - ThreadPoolExecutor executor = new ThreadPoolExecutor(numConcurrentCopyTasksPerSSVM, numConcurrentCopyTasksPerSSVM, 30, - TimeUnit.MINUTES, new MigrateBlockingQueue<>(numConcurrentCopyTasksPerSSVM)); - List>> futures = new ArrayList<>(); + List> futures = new ArrayList<>(); Date start = new Date(); while (true) { @@ -272,7 +278,7 @@ public MigrationResponse migrateResources(Long srcImgStoreId, Long destImgStoreI } if (storageCapacityBelowThreshold(storageCapacities, destImgStoreId)) { - storageCapacities = migrateAway(chosenFileForMigration, storageCapacities, snapshotChains, childTemplates, srcDatastore, destImgStoreId, executor, futures); + storageCapacities = migrateAway(chosenFileForMigration, storageCapacities, snapshotChains, childTemplates, srcDatastore, destImgStoreId, futures); } else { message = "Migration failed. Destination store doesn't have enough capacity for migration"; success = false; @@ -289,7 +295,7 @@ public MigrationResponse migrateResources(Long srcImgStoreId, Long destImgStoreI SnapshotInfo snapshotInfo = snapshotFactory.getSnapshot(snap.getSnapshotId(), snap.getDataStoreId(), DataStoreRole.Image); SnapshotInfo parentSnapshot = snapshotInfo.getParent(); if (snapshotInfo.getDataStore().getId() == srcImgStoreId && parentSnapshot != null && migratedSnapshotIdList.contains(parentSnapshot.getSnapshotId())) { - futures.add(executor.submit(new MigrateDataTask(snapshotInfo, srcDatastore, dataStoreManager.getDataStore(destImgStoreId, DataStoreRole.Image)))); + futures.add(submit(srcDatastore.getScope().getScopeId(), new MigrateDataTask(snapshotInfo, srcDatastore, dataStoreManager.getDataStore(destImgStoreId, DataStoreRole.Image)))); } }); } @@ -297,6 +303,11 @@ public MigrationResponse migrateResources(Long srcImgStoreId, Long destImgStoreI return handleResponse(futures, null, message, success); } + @Override + public Future orchestrateTemplateCopyToImageStore(TemplateInfo source, DataStore destStore) { + return submit(destStore.getScope().getScopeId(), new CopyTemplateTask(source, destStore)); + } + protected Pair migrateCompleted(Long destDatastoreId, DataStore srcDatastore, List files, MigrationPolicy migrationPolicy, int skipped) { String message = ""; boolean success = true; @@ -332,19 +343,10 @@ protected Map> migrateAway( Map, Long>> templateChains, DataStore srcDatastore, Long destDatastoreId, - ThreadPoolExecutor executor, - List>> futures) { + List> futures) { Long fileSize = migrationHelper.getFileSize(chosenFileForMigration, snapshotChains, templateChains); - storageCapacities = assumeMigrate(storageCapacities, srcDatastore.getId(), destDatastoreId, fileSize); - long activeSsvms = migrationHelper.activeSSVMCount(srcDatastore); - long totalJobs = activeSsvms * numConcurrentCopyTasksPerSSVM; - // Increase thread pool size with increase in number of SSVMs - if ( totalJobs > executor.getCorePoolSize()) { - executor.setMaximumPoolSize((int) (totalJobs)); - executor.setCorePoolSize((int) (totalJobs)); - } MigrateDataTask task = new MigrateDataTask(chosenFileForMigration, srcDatastore, dataStoreManager.getDataStore(destDatastoreId, DataStoreRole.Image)); if (chosenFileForMigration instanceof SnapshotInfo ) { @@ -353,19 +355,64 @@ protected Map> migrateAway( if (chosenFileForMigration instanceof TemplateInfo) { task.setTemplateChain(templateChains); } - futures.add((executor.submit(task))); + futures.add(submit(srcDatastore.getScope().getScopeId(), task)); logger.debug("Migration of {}: {} is initiated.", chosenFileForMigration.getType().name(), chosenFileForMigration.getUuid()); return storageCapacities; } + protected Future submit(Long zoneId, Callable task) { + ThreadPoolExecutor executor; + synchronized (this) { + if (!zoneExecutorMap.containsKey(zoneId)) { + zoneExecutorMap.put(zoneId, new ThreadPoolExecutor(numConcurrentCopyTasksPerSSVM, numConcurrentCopyTasksPerSSVM, + 30, TimeUnit.MINUTES, new MigrateBlockingQueue<>(numConcurrentCopyTasksPerSSVM))); + zonePendingWorkCountMap.put(zoneId, 0); + } + zonePendingWorkCountMap.merge(zoneId, 1, Integer::sum); + scaleExecutorIfNecessary(zoneId); + executor = zoneExecutorMap.get(zoneId); + } + return executor.submit(task); + + } + + protected void scaleExecutorIfNecessary(Long zoneId) { + long activeSsvms = migrationHelper.activeSSVMCount(zoneId); + long totalJobs = activeSsvms * numConcurrentCopyTasksPerSSVM; + ThreadPoolExecutor executor = zoneExecutorMap.get(zoneId); + if (totalJobs > executor.getCorePoolSize()) { + logger.debug("Scaling up executor of zone [{}] from [{}] to [{}] threads.", zoneId, executor.getCorePoolSize(), + totalJobs); + executor.setMaximumPoolSize((int) (totalJobs)); + executor.setCorePoolSize((int) (totalJobs)); + } + } + + protected synchronized void tryCleaningUpExecutor(Long zoneId) { + if (!zoneExecutorMap.containsKey(zoneId)) { + logger.debug("No executor exists for zone [{}].", zoneId); + return; + } + + zonePendingWorkCountMap.merge(zoneId, -1, Integer::sum); + Integer pendingWorkCount = zonePendingWorkCountMap.get(zoneId); + if (pendingWorkCount > 0) { + logger.debug("Not cleaning executor of zone [{}] yet, as there is [{}] pending work.", zoneId, pendingWorkCount); + return; + } + logger.debug("Cleaning executor of zone [{}].", zoneId); + ThreadPoolExecutor executor = zoneExecutorMap.get(zoneId); + zoneExecutorMap.remove(zoneId); + executor.shutdown(); + } - private MigrationResponse handleResponse(List>> futures, MigrationPolicy migrationPolicy, String message, boolean success) { + private MigrationResponse handleResponse(List> futures, MigrationPolicy migrationPolicy, String message, boolean success) { int successCount = 0; - for (Future> future : futures) { + for (Future future : futures) { try { - AsyncCallFuture res = future.get(); - if (res.get().isSuccess()) { + DataObjectResult res = future.get(); + if (res.isSuccess()) { successCount++; } } catch ( InterruptedException | ExecutionException e) { @@ -379,7 +426,7 @@ private MigrationResponse handleResponse(List>> futures, Map> storageCapacities, ThreadPoolExecutor executor) { + List> futures, Map> storageCapacities) { DataStore srcDatastore = dataStoreManager.getDataStore(srcDataStoreId, DataStoreRole.Image); List snaps = snapshotDataStoreDao.findSnapshots(srcDataStoreId, start, end); if (!snaps.isEmpty()) { @@ -395,12 +442,12 @@ private void handleSnapshotMigration(Long srcDataStoreId, Date start, Date end, storeId = dstores.get(1); } DataStore datastore = dataStoreManager.getDataStore(storeId, DataStoreRole.Image); - futures.add(executor.submit(new MigrateDataTask(snapshotInfo, srcDatastore, datastore))); + futures.add(submit(srcDatastore.getScope().getScopeId(), new MigrateDataTask(snapshotInfo, srcDatastore, datastore))); } if (parentSnapshot != null) { DataStore parentDS = dataStoreManager.getDataStore(parentSnapshot.getDataStore().getId(), DataStoreRole.Image); if (parentDS.getId() != snapshotInfo.getDataStore().getId()) { - futures.add(executor.submit(new MigrateDataTask(snapshotInfo, srcDatastore, parentDS))); + futures.add(submit(srcDatastore.getScope().getScopeId(), new MigrateDataTask(snapshotInfo, srcDatastore, parentDS))); } } } @@ -527,16 +574,19 @@ private double calculateStorageStandardDeviation(double[] metricValues, double m return standardDeviation.evaluate(metricValues, mean); } - private class MigrateDataTask implements Callable> { + private class MigrateDataTask implements Callable { private DataObject file; private DataStore srcDataStore; private DataStore destDataStore; private Map, Long>> snapshotChain; private Map, Long>> templateChain; + private String logid; + public MigrateDataTask(DataObject file, DataStore srcDataStore, DataStore destDataStore) { this.file = file; this.srcDataStore = srcDataStore; this.destDataStore = destDataStore; + this.logid = ThreadContext.get(LOGCONTEXTID); } public void setSnapshotChains(Map, Long>> snapshotChain) { @@ -557,8 +607,50 @@ public DataObject getFile() { } @Override - public AsyncCallFuture call() throws Exception { - return secStgSrv.migrateData(file, srcDataStore, destDataStore, snapshotChain, templateChain); + public DataObjectResult call() { + ThreadContext.put(LOGCONTEXTID, logid); + DataObjectResult result; + AsyncCallFuture future = secStgSrv.migrateData(file, srcDataStore, destDataStore, snapshotChain, templateChain); + try { + result = future.get(); + } catch (ExecutionException | InterruptedException e) { + logger.warn("Exception while migrating data to another secondary storage: {}", e.toString()); + result = new DataObjectResult(file); + result.setResult(e.toString()); + } + tryCleaningUpExecutor(srcDataStore.getScope().getScopeId()); + ThreadContext.clearAll(); + return result; + } + } + + private class CopyTemplateTask implements Callable { + private TemplateInfo sourceTmpl; + private DataStore destStore; + private String logid; + + public CopyTemplateTask(TemplateInfo sourceTmpl, DataStore destStore) { + this.sourceTmpl = sourceTmpl; + this.destStore = destStore; + this.logid = ThreadContext.get(LOGCONTEXTID); + } + + @Override + public TemplateApiResult call() { + ThreadContext.put(LOGCONTEXTID, logid); + TemplateApiResult result; + AsyncCallFuture future = templateService.copyTemplateToImageStore(sourceTmpl, destStore); + try { + result = future.get(); + } catch (ExecutionException | InterruptedException e) { + logger.warn("Exception while copying template [{}] from image store [{}] to image store [{}]: {}", + sourceTmpl.getUniqueName(), sourceTmpl.getDataStore().getName(), destStore.getName(), e.toString()); + result = new TemplateApiResult(sourceTmpl); + result.setResult(e.getMessage()); + } + tryCleaningUpExecutor(destStore.getScope().getScopeId()); + ThreadContext.clearAll(); + return result; } } } diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java index 2b759235ac81..a07fd13e1da0 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/orchestration/VolumeOrchestrator.java @@ -627,13 +627,13 @@ public VolumeInfo createVolumeFromSnapshot(Volume volume, Snapshot snapshot, Use try { VolumeApiResult result = future.get(); if (result.isFailed()) { - String logMsg = String.format("Failed to create volume from snapshot [%s] due to [%s].", snapshotToString, result.getResult()); + String logMsg = String.format("Failed to create volume from Snapshot [%s] due to [%s].", snapshotToString, result.getResult()); logger.error(logMsg); throw new CloudRuntimeException(logMsg); } return result.getVolume(); } catch (InterruptedException | ExecutionException e) { - String message = String.format("Failed to create volume from snapshot [%s] due to [%s].", snapshotToString, e.getMessage()); + String message = String.format("Failed to create volume from Snapshot [%s] due to [%s].", snapshotToString, e.getMessage()); logger.error(message); logger.debug("Exception: ", e); throw new CloudRuntimeException(message, e); @@ -759,7 +759,7 @@ public VolumeInfo createVolume(VolumeInfo volumeInfo, VirtualMachine vm, Virtual VolumeApiResult result = future.get(); if (result.isFailed()) { if (result.getResult().contains(REQUEST_TEMPLATE_RELOAD) && (i == 0)) { - logger.debug("Retrying to deploy template [{}] for VMware, attempt 2/2. ", templateToString); + logger.debug("Retrying to deploy Template [{}] for VMware, attempt 2/2. ", templateToString); continue; } else { String msg = String.format("Failed to create volume [%s] due to [%s].", volumeToString, result.getResult()); @@ -775,7 +775,7 @@ public VolumeInfo createVolume(VolumeInfo volumeInfo, VirtualMachine vm, Virtual throw new CloudRuntimeException(msg, e); } } - throw new CloudRuntimeException(String.format("Failed to create volume [%s] even after retrying to deploy the template.", volumeToString)); + throw new CloudRuntimeException(String.format("Failed to create volume [%s] even after retrying to deploy the Template.", volumeToString)); } private String getReflectOnlySelectedFields(Object obj) { @@ -903,7 +903,7 @@ public DiskProfile allocateRawVolume(Type type, String name, DiskOffering offeri // Save usage event and update resource count for user vm volumes if (vm.getType() == VirtualMachine.Type.User) { UsageEventUtils.publishUsageEvent(EventTypes.EVENT_VOLUME_CREATE, vol.getAccountId(), vol.getDataCenterId(), vol.getId(), vol.getName(), offering.getId(), null, size, - Volume.class.getName(), vol.getUuid(), vol.isDisplayVolume()); + Volume.class.getName(), vol.getUuid(), vol.getInstanceId(), vol.isDisplayVolume()); _resourceLimitMgr.incrementVolumeResourceCount(vm.getAccountId(), vol.isDisplayVolume(), vol.getSize(), offering); } DiskProfile diskProfile = toDiskProfile(vol, offering); @@ -981,7 +981,7 @@ private DiskProfile allocateTemplatedVolume(Type type, String name, DiskOffering } UsageEventUtils.publishUsageEvent(EventTypes.EVENT_VOLUME_CREATE, vol.getAccountId(), vol.getDataCenterId(), vol.getId(), vol.getName(), offeringId, vol.getTemplateId(), size, - Volume.class.getName(), vol.getUuid(), vol.isDisplayVolume()); + Volume.class.getName(), vol.getUuid(), vol.getInstanceId(), vol.isDisplayVolume()); _resourceLimitMgr.incrementVolumeResourceCount(vm.getAccountId(), vol.isDisplayVolume(), vol.getSize(), offering); } @@ -1501,7 +1501,7 @@ public void migrateVolumes(VirtualMachine vm, VirtualMachineTO vmTo, Host srcHos String storagePoolToString = getReflectOnlySelectedFields(storagePool); if (volume.getInstanceId() != vm.getId()) { - throw new CloudRuntimeException(String.format("Volume [%s] that has to be migrated, but it doesn't belong to the instance [%s].", volumeToString, vm)); + throw new CloudRuntimeException(String.format("Volume [%s] that has to be migrated, but it doesn't belong to the Instance [%s].", volumeToString, vm)); } if (destPool == null) { @@ -1583,12 +1583,8 @@ public void prepareForMigration(VirtualMachineProfile vm, DeployDestination dest vm.addDisk(disk); } - //if (vm.getType() == VirtualMachine.Type.User && vm.getTemplate().getFormat() == ImageFormat.ISO) { if (vm.getType() == VirtualMachine.Type.User) { _tmpltMgr.prepareIsoForVmProfile(vm, dest); - //DataTO dataTO = tmplFactory.getTemplate(vm.getTemplate().getId(), DataStoreRole.Image, vm.getVirtualMachine().getDataCenterId()).getTO(); - //DiskTO iso = new DiskTO(dataTO, 3L, null, Volume.Type.ISO); - //vm.addDisk(iso); } } diff --git a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/service/api/ProvisioningServiceImpl.java b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/service/api/ProvisioningServiceImpl.java index 51e87663919b..ff75aa0cbb65 100644 --- a/engine/orchestration/src/main/java/org/apache/cloudstack/engine/service/api/ProvisioningServiceImpl.java +++ b/engine/orchestration/src/main/java/org/apache/cloudstack/engine/service/api/ProvisioningServiceImpl.java @@ -140,20 +140,12 @@ public List listHosts() { @Override public List listPods() { - /* - * Not in use now, just commented out. - */ - //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; } diff --git a/engine/pom.xml b/engine/pom.xml index b771138dc8c6..2de84eab85af 100644 --- a/engine/pom.xml +++ b/engine/pom.xml @@ -25,7 +25,7 @@ org.apache.cloudstack cloudstack - 4.22.0.0-SNAPSHOT + 4.23.0.0-SNAPSHOT ../pom.xml diff --git a/engine/schema/pom.xml b/engine/schema/pom.xml index 2f216884c8b9..654cd14a25d3 100644 --- a/engine/schema/pom.xml +++ b/engine/schema/pom.xml @@ -24,7 +24,7 @@ org.apache.cloudstack cloud-engine - 4.22.0.0-SNAPSHOT + 4.23.0.0-SNAPSHOT ../pom.xml diff --git a/engine/schema/src/main/java/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java b/engine/schema/src/main/java/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java index 02a7ac6977c2..76058d213338 100644 --- a/engine/schema/src/main/java/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/dc/dao/ClusterVSMMapDaoImpl.java @@ -36,7 +36,6 @@ public class ClusterVSMMapDaoImpl extends GenericDaoBase final SearchBuilder VsmSearch; public ClusterVSMMapDaoImpl() { - //super(); ClusterSearch = createSearchBuilder(); ClusterSearch.and("clusterId", ClusterSearch.entity().getClusterId(), SearchCriteria.Op.EQ); @@ -82,8 +81,6 @@ public boolean remove(Long id) { TransactionLegacy txn = TransactionLegacy.currentTxn(); txn.start(); ClusterVSMMapVO cluster = createForUpdate(); - //cluster.setClusterId(null); - //cluster.setVsmId(null); update(id, cluster); diff --git a/engine/schema/src/main/java/com/cloud/dc/dao/DataCenterDetailsDaoImpl.java b/engine/schema/src/main/java/com/cloud/dc/dao/DataCenterDetailsDaoImpl.java index bb03a96d02ee..aec54e20d989 100644 --- a/engine/schema/src/main/java/com/cloud/dc/dao/DataCenterDetailsDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/dc/dao/DataCenterDetailsDaoImpl.java @@ -31,7 +31,8 @@ public class DataCenterDetailsDaoImpl extends ResourceDetailsDaoBase DetailSearch; - DataCenterDetailsDaoImpl() { + public DataCenterDetailsDaoImpl() { + super(); DetailSearch = createSearchBuilder(); DetailSearch.and("zoneId", DetailSearch.entity().getResourceId(), SearchCriteria.Op.EQ); DetailSearch.and("name", DetailSearch.entity().getName(), SearchCriteria.Op.EQ); diff --git a/engine/schema/src/main/java/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java b/engine/schema/src/main/java/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java index ba01e31f80a8..6c1d944ca3e7 100644 --- a/engine/schema/src/main/java/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/dc/dao/DataCenterIpAddressDaoImpl.java @@ -161,14 +161,14 @@ public void addIpRange(long dcId, long podId, String start, String end, boolean } txn.commit(); } catch (SQLException ex) { - throw new CloudRuntimeException("Unable to persist ip address range ", ex); + throw new CloudRuntimeException("Unable to persist IP address range ", ex); } } @Override public void releaseIpAddress(String ipAddress, long dcId, Long nicId) { if (logger.isDebugEnabled()) { - logger.debug("Releasing ip address: " + ipAddress + " data center " + dcId); + logger.debug("Releasing IP address: " + ipAddress + " data center " + dcId); } SearchCriteria sc = AllFieldsSearch.create(); sc.setParameters("ip", ipAddress); @@ -186,7 +186,7 @@ public void releaseIpAddress(String ipAddress, long dcId, Long nicId) { @Override public void releaseIpAddress(long nicId, String reservationId) { if (logger.isDebugEnabled()) { - logger.debug("Releasing ip address for reservationId=" + reservationId + ", nic=" + nicId); + logger.debug("Releasing IP address for reservationId=" + reservationId + ", nic=" + nicId); } SearchCriteria sc = AllFieldsSearch.create(); sc.setParameters("nic", nicId); @@ -202,7 +202,7 @@ public void releaseIpAddress(long nicId, String reservationId) { @Override public void releasePodIpAddress(long id) { if (logger.isDebugEnabled()) { - logger.debug("Releasing ip address for ID=" + id); + logger.debug("Releasing IP address for ID=" + id); } DataCenterIpAddressVO vo = this.findById(id); @@ -215,7 +215,7 @@ public void releasePodIpAddress(long id) { @Override public void releaseIpAddress(long nicId) { if (logger.isDebugEnabled()) { - logger.debug("Releasing ip address for nic=" + nicId); + logger.debug("Releasing IP address for nic=" + nicId); } SearchCriteria sc = AllFieldsSearch.create(); sc.setParameters("nic", nicId); diff --git a/engine/schema/src/main/java/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.java b/engine/schema/src/main/java/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.java index 517f02edde78..1c9d8b439cbd 100644 --- a/engine/schema/src/main/java/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/dc/dao/DataCenterLinkLocalIpAddressDaoImpl.java @@ -104,7 +104,7 @@ public void addIpRange(long dcId, long podId, String start, String end) { @Override public void releaseIpAddress(String ipAddress, long dcId, long instanceId) { if (logger.isDebugEnabled()) { - logger.debug("Releasing ip address: " + ipAddress + " data center " + dcId); + logger.debug("Releasing IP address: " + ipAddress + " data center " + dcId); } SearchCriteria sc = AllFieldsSearch.create(); sc.setParameters("ip", ipAddress); diff --git a/engine/schema/src/main/java/com/cloud/event/UsageEventVO.java b/engine/schema/src/main/java/com/cloud/event/UsageEventVO.java index 3fc9fda94873..41ecec0c7fb8 100644 --- a/engine/schema/src/main/java/com/cloud/event/UsageEventVO.java +++ b/engine/schema/src/main/java/com/cloud/event/UsageEventVO.java @@ -75,6 +75,9 @@ public enum DynamicParameters { @Column(name = "virtual_size") private Long virtualSize; + @Column(name = "vm_id") + private Long vmId; + public UsageEventVO() { } @@ -143,6 +146,18 @@ public UsageEventVO(String usageType, long accountId, long zoneId, long vmId, lo this.offeringId = securityGroupId; } + public UsageEventVO(String usageType, long accountId, long zoneId, long resourceId, Long offeringId, Long templateId, Long size, Long vmId, String resourceName) { + this.type = usageType; + this.accountId = accountId; + this.zoneId = zoneId; + this.resourceId = resourceId; + this.offeringId = offeringId; + this.templateId = templateId; + this.size = size; + this.vmId = vmId; + this.resourceName = resourceName; + } + @Override public long getId() { return id; @@ -248,4 +263,11 @@ public void setVirtualSize(Long virtualSize) { this.virtualSize = virtualSize; } + public Long getVmId() { + return vmId; + } + + public void setVmId(Long vmId) { + this.vmId = vmId; + } } diff --git a/engine/schema/src/main/java/com/cloud/event/dao/UsageEventDaoImpl.java b/engine/schema/src/main/java/com/cloud/event/dao/UsageEventDaoImpl.java index fdef509da5bd..bce9c474e2d2 100644 --- a/engine/schema/src/main/java/com/cloud/event/dao/UsageEventDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/event/dao/UsageEventDaoImpl.java @@ -45,11 +45,11 @@ public class UsageEventDaoImpl extends GenericDaoBase implem private final SearchBuilder latestEventsSearch; private final SearchBuilder IpeventsSearch; private static final String COPY_EVENTS = - "INSERT INTO cloud_usage.usage_event (id, type, account_id, created, zone_id, resource_id, resource_name, offering_id, template_id, size, resource_type, virtual_size) " - + "SELECT id, type, account_id, created, zone_id, resource_id, resource_name, offering_id, template_id, size, resource_type, virtual_size FROM cloud.usage_event vmevt WHERE vmevt.id > ? and vmevt.id <= ? "; + "INSERT INTO cloud_usage.usage_event (id, type, account_id, created, zone_id, resource_id, resource_name, offering_id, template_id, size, resource_type, virtual_size, vm_id) " + + "SELECT id, type, account_id, created, zone_id, resource_id, resource_name, offering_id, template_id, size, resource_type, virtual_size, vm_id FROM cloud.usage_event vmevt WHERE vmevt.id > ? and vmevt.id <= ? "; private static final String COPY_ALL_EVENTS = - "INSERT INTO cloud_usage.usage_event (id, type, account_id, created, zone_id, resource_id, resource_name, offering_id, template_id, size, resource_type, virtual_size) " - + "SELECT id, type, account_id, created, zone_id, resource_id, resource_name, offering_id, template_id, size, resource_type, virtual_size FROM cloud.usage_event vmevt WHERE vmevt.id <= ?"; + "INSERT INTO cloud_usage.usage_event (id, type, account_id, created, zone_id, resource_id, resource_name, offering_id, template_id, size, resource_type, virtual_size, vm_id) " + + "SELECT id, type, account_id, created, zone_id, resource_id, resource_name, offering_id, template_id, size, resource_type, virtual_size, vm_id FROM cloud.usage_event vmevt WHERE vmevt.id <= ?"; private static final String COPY_EVENT_DETAILS = "INSERT INTO cloud_usage.usage_event_details (id, usage_event_id, name, value) " + "SELECT id, usage_event_id, name, value FROM cloud.usage_event_details vmevtDetails WHERE vmevtDetails.usage_event_id > ? and vmevtDetails.usage_event_id <= ? "; private static final String COPY_ALL_EVENT_DETAILS = "INSERT INTO cloud_usage.usage_event_details (id, usage_event_id, name, value) " diff --git a/engine/schema/src/main/java/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java b/engine/schema/src/main/java/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java index 9a9ca80bce59..7ed0ad0bcc54 100644 --- a/engine/schema/src/main/java/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/network/security/dao/VmRulesetLogDaoImpl.java @@ -76,7 +76,6 @@ public VmRulesetLogVO findByVmId(long vmId) { @Override public int createOrUpdate(Set workItems) { - //return createOrUpdateUsingBatch(workItems); return createOrUpdateUsingMultiInsert(workItems); } diff --git a/engine/schema/src/main/java/com/cloud/storage/dao/LaunchPermissionDaoImpl.java b/engine/schema/src/main/java/com/cloud/storage/dao/LaunchPermissionDaoImpl.java index b4fdb4b6394e..f154692c6c87 100644 --- a/engine/schema/src/main/java/com/cloud/storage/dao/LaunchPermissionDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/storage/dao/LaunchPermissionDaoImpl.java @@ -143,7 +143,7 @@ public List listPermittedTemplates(long accountId) { permittedTemplates.add(template); } } catch (Exception e) { - logger.warn("Error listing permitted templates", e); + logger.warn("Error listing permitted Templates", e); } return permittedTemplates; } diff --git a/engine/schema/src/main/java/com/cloud/storage/dao/VMTemplateDao.java b/engine/schema/src/main/java/com/cloud/storage/dao/VMTemplateDao.java index 6785c3653290..4c9f906b68a9 100644 --- a/engine/schema/src/main/java/com/cloud/storage/dao/VMTemplateDao.java +++ b/engine/schema/src/main/java/com/cloud/storage/dao/VMTemplateDao.java @@ -94,7 +94,7 @@ public interface VMTemplateDao extends GenericDao, StateDao< List listByParentTemplatetId(long parentTemplatetId); - VMTemplateVO findLatestTemplateByName(String name, CPU.CPUArch arch); + VMTemplateVO findLatestTemplateByName(String name, HypervisorType hypervisorType, CPU.CPUArch arch); List findTemplatesLinkedToUserdata(long userdataId); @@ -103,4 +103,7 @@ public interface VMTemplateDao extends GenericDao, StateDao< List listIdsByTemplateTag(String tag); List listIdsByExtensionId(long extensionId); + + VMTemplateVO findActiveSystemTemplateByHypervisorArchAndUrlPath(HypervisorType hypervisorType, + CPU.CPUArch arch, String urlPathSuffix); } diff --git a/engine/schema/src/main/java/com/cloud/storage/dao/VMTemplateDaoImpl.java b/engine/schema/src/main/java/com/cloud/storage/dao/VMTemplateDaoImpl.java index 08b82cbb45bc..bcf8b39a291f 100644 --- a/engine/schema/src/main/java/com/cloud/storage/dao/VMTemplateDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/storage/dao/VMTemplateDaoImpl.java @@ -100,7 +100,6 @@ public class VMTemplateDaoImpl extends GenericDaoBase implem private SearchBuilder PublicIsoSearch; private SearchBuilder UserIsoSearch; private GenericSearchBuilder CountTemplatesByAccount; - // private SearchBuilder updateStateSearch; private SearchBuilder AllFieldsSearch; protected SearchBuilder ParentTemplateIdSearch; private SearchBuilder InactiveUnremovedTmpltSearch; @@ -246,13 +245,17 @@ public List listReadyTemplates() { @Override - public VMTemplateVO findLatestTemplateByName(String name, CPU.CPUArch arch) { + public VMTemplateVO findLatestTemplateByName(String name, HypervisorType hypervisorType, CPU.CPUArch arch) { SearchBuilder sb = createSearchBuilder(); sb.and("name", sb.entity().getName(), SearchCriteria.Op.EQ); + sb.and("hypervisorType", sb.entity().getHypervisorType(), SearchCriteria.Op.EQ); sb.and("arch", sb.entity().getArch(), SearchCriteria.Op.EQ); sb.done(); SearchCriteria sc = sb.create(); sc.setParameters("name", name); + if (hypervisorType != null) { + sc.setParameters("hypervisorType", hypervisorType); + } if (arch != null) { sc.setParameters("arch", arch); } @@ -315,7 +318,7 @@ public boolean configure(String name, Map params) throws Configu consoleProxyTmpltName = "routing"; } if (logger.isDebugEnabled()) { - logger.debug("Use console proxy template : " + consoleProxyTmpltName); + logger.debug("Use console proxy Template : " + consoleProxyTmpltName); } UniqueNameSearch = createSearchBuilder(); @@ -404,12 +407,6 @@ public boolean configure(String name, Map params) throws Configu CountTemplatesByAccount.and("state", CountTemplatesByAccount.entity().getState(), SearchCriteria.Op.EQ); CountTemplatesByAccount.done(); - // 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(); - AllFieldsSearch = createSearchBuilder(); AllFieldsSearch.and("state", AllFieldsSearch.entity().getState(), SearchCriteria.Op.EQ); AllFieldsSearch.and("accountId", AllFieldsSearch.entity().getAccountId(), SearchCriteria.Op.EQ); @@ -478,7 +475,7 @@ public long addTemplateToZone(VMTemplateVO tmplt, long zoneId) { VMTemplateVO tmplt2 = findById(tmplt.getId()); if (tmplt2 == null) { if (persist(tmplt) == null) { - throw new CloudRuntimeException("Failed to persist the template " + tmplt); + throw new CloudRuntimeException("Failed to persist the Template " + tmplt); } if (tmplt.getDetails() != null) { @@ -857,6 +854,37 @@ public List listIdsByExtensionId(long extensionId) { return customSearch(sc, null); } + @Override + public VMTemplateVO findActiveSystemTemplateByHypervisorArchAndUrlPath(HypervisorType hypervisorType, + CPU.CPUArch arch, String urlPathSuffix) { + if (StringUtils.isBlank(urlPathSuffix)) { + return null; + } + SearchBuilder sb = createSearchBuilder(); + sb.and("templateType", sb.entity().getTemplateType(), SearchCriteria.Op.EQ); + sb.and("hypervisorType", sb.entity().getHypervisorType(), SearchCriteria.Op.EQ); + sb.and("arch", sb.entity().getArch(), SearchCriteria.Op.EQ); + sb.and("urlPathSuffix", sb.entity().getUrl(), SearchCriteria.Op.LIKE); + sb.and("state", sb.entity().getState(), SearchCriteria.Op.EQ); + sb.done(); + SearchCriteria sc = sb.create(); + sc.setParameters("templateType", TemplateType.SYSTEM); + if (hypervisorType != null) { + sc.setParameters("hypervisorType", hypervisorType); + } + if (arch != null) { + sc.setParameters("arch", arch); + } + sc.setParameters("urlPathSuffix", "%" + urlPathSuffix); + sc.setParameters("state", VirtualMachineTemplate.State.Active); + Filter filter = new Filter(VMTemplateVO.class, "id", false, null, 1L); + List templates = listBy(sc, filter); + if (CollectionUtils.isNotEmpty(templates)) { + return templates.get(0); + } + return null; + } + @Override public boolean updateState( com.cloud.template.VirtualMachineTemplate.State currentState, @@ -912,7 +940,7 @@ public boolean updateState( .append("; updatedTime=") .append(oldUpdatedTime); } else { - logger.debug("Unable to update template: id=" + vo.getId() + ", as no such template exists in the database anymore"); + logger.debug("Unable to update Template: id=" + vo.getId() + ", as no such template exists in the database anymore"); } } return rows > 0; diff --git a/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java b/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java index c211b3e97280..0e784d961b3d 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java @@ -33,11 +33,10 @@ import javax.inject.Inject; -import com.cloud.utils.FileUtil; import org.apache.cloudstack.utils.CloudStackVersion; import org.apache.commons.lang3.StringUtils; -import org.apache.logging.log4j.Logger; import org.apache.logging.log4j.LogManager; +import org.apache.logging.log4j.Logger; import com.cloud.upgrade.dao.DbUpgrade; import com.cloud.upgrade.dao.DbUpgradeSystemVmTemplate; @@ -91,8 +90,10 @@ import com.cloud.upgrade.dao.Upgrade42000to42010; import com.cloud.upgrade.dao.Upgrade42010to42100; import com.cloud.upgrade.dao.Upgrade42100to42200; +import com.cloud.upgrade.dao.Upgrade42200to42210; import com.cloud.upgrade.dao.Upgrade420to421; import com.cloud.upgrade.dao.Upgrade421to430; +import com.cloud.upgrade.dao.Upgrade42210to42300; import com.cloud.upgrade.dao.Upgrade430to440; import com.cloud.upgrade.dao.Upgrade431to440; import com.cloud.upgrade.dao.Upgrade432to440; @@ -121,12 +122,17 @@ import com.cloud.upgrade.dao.VersionDaoImpl; import com.cloud.upgrade.dao.VersionVO; import com.cloud.upgrade.dao.VersionVO.Step; +import com.cloud.utils.FileUtil; import com.cloud.utils.component.SystemIntegrityChecker; import com.cloud.utils.crypt.DBEncryptionUtil; import com.cloud.utils.db.GlobalLock; import com.cloud.utils.db.ScriptRunner; +import com.cloud.utils.db.Transaction; +import com.cloud.utils.db.TransactionCallback; import com.cloud.utils.db.TransactionLegacy; +import com.cloud.utils.db.TransactionStatus; import com.cloud.utils.exception.CloudRuntimeException; + import com.google.common.annotations.VisibleForTesting; public class DatabaseUpgradeChecker implements SystemIntegrityChecker { @@ -236,6 +242,8 @@ public DatabaseUpgradeChecker() { .next("4.20.0.0", new Upgrade42000to42010()) .next("4.20.1.0", new Upgrade42010to42100()) .next("4.21.0.0", new Upgrade42100to42200()) + .next("4.22.0.0", new Upgrade42200to42210()) + .next("4.22.1.0", new Upgrade42210to42300()) .build(); } @@ -251,7 +259,6 @@ protected void runScript(Connection conn, InputStream file) { LOGGER.error("Unable to execute upgrade script", e); throw new CloudRuntimeException("Unable to execute upgrade script", e); } - } @VisibleForTesting @@ -313,20 +320,20 @@ protected void upgrade(CloudStackVersion dbVersion, CloudStackVersion currentVer } protected void executeProcedureScripts() { - LOGGER.info(String.format("Executing Stored Procedure scripts that are under resource directory [%s].", PROCEDURES_DIRECTORY)); + LOGGER.info("Executing Stored Procedure scripts that are under resource directory [{}].", PROCEDURES_DIRECTORY); List filesPathUnderViewsDirectory = FileUtil.getFilesPathsUnderResourceDirectory(PROCEDURES_DIRECTORY); try (TransactionLegacy txn = TransactionLegacy.open("execute-procedure-scripts")) { Connection conn = txn.getConnection(); for (String filePath : filesPathUnderViewsDirectory) { - LOGGER.debug(String.format("Executing PROCEDURE script [%s].", filePath)); + LOGGER.debug("Executing PROCEDURE script [{}].", filePath); InputStream viewScript = Thread.currentThread().getContextClassLoader().getResourceAsStream(filePath); runScript(conn, viewScript); } - LOGGER.info(String.format("Finished execution of PROCEDURE scripts that are under resource directory [%s].", PROCEDURES_DIRECTORY)); + LOGGER.info("Finished execution of PROCEDURE scripts that are under resource directory [{}].", PROCEDURES_DIRECTORY); } catch (SQLException e) { String message = String.format("Unable to execute PROCEDURE scripts due to [%s].", e.getMessage()); LOGGER.error(message, e); @@ -335,7 +342,7 @@ protected void executeProcedureScripts() { } private DbUpgrade[] executeUpgrades(CloudStackVersion dbVersion, CloudStackVersion currentVersion) { - LOGGER.info("Database upgrade must be performed from " + dbVersion + " to " + currentVersion); + LOGGER.info("Database upgrade must be performed from {} to {}", dbVersion, currentVersion); final DbUpgrade[] upgrades = calculateUpgradePath(dbVersion, currentVersion); @@ -348,8 +355,8 @@ private DbUpgrade[] executeUpgrades(CloudStackVersion dbVersion, CloudStackVersi private VersionVO executeUpgrade(DbUpgrade upgrade) { VersionVO version; - LOGGER.debug("Running upgrade " + upgrade.getClass().getSimpleName() + " to upgrade from " + upgrade.getUpgradableVersionRange()[0] + "-" + upgrade - .getUpgradableVersionRange()[1] + " to " + upgrade.getUpgradedVersion()); + LOGGER.debug("Running upgrade {} to upgrade from {}-{} to {}", upgrade.getClass().getSimpleName(), upgrade.getUpgradableVersionRange()[0], upgrade + .getUpgradableVersionRange()[1], upgrade.getUpgradedVersion()); TransactionLegacy txn = TransactionLegacy.open("Upgrade"); txn.start(); try { @@ -392,8 +399,8 @@ private void executeUpgradeCleanup(DbUpgrade upgrade, VersionVO version) { // Run the corresponding '-cleanup.sql' script txn = TransactionLegacy.open("Cleanup"); try { - LOGGER.info("Cleanup upgrade " + upgrade.getClass().getSimpleName() + " to upgrade from " + upgrade.getUpgradableVersionRange()[0] + "-" + upgrade - .getUpgradableVersionRange()[1] + " to " + upgrade.getUpgradedVersion()); + LOGGER.info("Cleanup upgrade {} to upgrade from {}-{} to {}", upgrade.getClass().getSimpleName(), upgrade.getUpgradableVersionRange()[0], upgrade + .getUpgradableVersionRange()[1], upgrade.getUpgradedVersion()); txn.start(); Connection conn; @@ -408,7 +415,7 @@ private void executeUpgradeCleanup(DbUpgrade upgrade, VersionVO version) { if (scripts != null) { for (InputStream script : scripts) { runScript(conn, script); - LOGGER.debug("Cleanup script " + upgrade.getClass().getSimpleName() + " is executed successfully"); + LOGGER.debug("Cleanup script {} is executed successfully", upgrade.getClass().getSimpleName()); } } txn.commit(); @@ -418,27 +425,27 @@ private void executeUpgradeCleanup(DbUpgrade upgrade, VersionVO version) { version.setUpdated(new Date()); _dao.update(version.getId(), version); txn.commit(); - LOGGER.debug("Upgrade completed for version " + version.getVersion()); + LOGGER.debug("Upgrade completed for version {}", version.getVersion()); } finally { txn.close(); } } protected void executeViewScripts() { - LOGGER.info(String.format("Executing VIEW scripts that are under resource directory [%s].", VIEWS_DIRECTORY)); + LOGGER.info("Executing VIEW scripts that are under resource directory [{}].", VIEWS_DIRECTORY); List filesPathUnderViewsDirectory = FileUtil.getFilesPathsUnderResourceDirectory(VIEWS_DIRECTORY); try (TransactionLegacy txn = TransactionLegacy.open("execute-view-scripts")) { Connection conn = txn.getConnection(); for (String filePath : filesPathUnderViewsDirectory) { - LOGGER.debug(String.format("Executing VIEW script [%s].", filePath)); + LOGGER.debug("Executing VIEW script [{}].", filePath); InputStream viewScript = Thread.currentThread().getContextClassLoader().getResourceAsStream(filePath); runScript(conn, viewScript); } - LOGGER.info(String.format("Finished execution of VIEW scripts that are under resource directory [%s].", VIEWS_DIRECTORY)); + LOGGER.info("Finished execution of VIEW scripts that are under resource directory [{}].", VIEWS_DIRECTORY); } catch (SQLException e) { String message = String.format("Unable to execute VIEW scripts due to [%s].", e.getMessage()); LOGGER.error(message, e); @@ -455,43 +462,101 @@ public void check() { throw new CloudRuntimeException("Unable to acquire lock to check for database integrity."); } - try { - initializeDatabaseEncryptors(); - - final CloudStackVersion dbVersion = CloudStackVersion.parse(_dao.getCurrentVersion()); - final String currentVersionValue = this.getClass().getPackage().getImplementationVersion(); + doUpgrades(lock); + } finally { + lock.releaseRef(); + } + } - if (StringUtils.isBlank(currentVersionValue)) { - return; + boolean isStandalone() throws CloudRuntimeException { + return Transaction.execute(new TransactionCallback<>() { + @Override + public Boolean doInTransaction(TransactionStatus status) { + String sql = "SELECT COUNT(*) FROM `cloud`.`mshost` WHERE `state` = 'UP'"; + try (Connection conn = TransactionLegacy.getStandaloneConnection(); + PreparedStatement pstmt = conn.prepareStatement(sql); + ResultSet rs = pstmt.executeQuery()) { + if (rs.next()) { + int count = rs.getInt(1); + return count == 0; + } + } catch (SQLException e) { + String errorMessage = "Unable to check if the management server is running in standalone mode."; + LOGGER.error(errorMessage, e); + return false; + } catch (NullPointerException npe) { + String errorMessage = "Unable to check if the management server is running in standalone mode. Not able to get a Database connection."; + LOGGER.error(errorMessage, npe); + return false; } + return true; + } + }); + } - String csVersion = SystemVmTemplateRegistration.parseMetadataFile(); - final CloudStackVersion sysVmVersion = CloudStackVersion.parse(csVersion); - final CloudStackVersion currentVersion = CloudStackVersion.parse(currentVersionValue); - SystemVmTemplateRegistration.CS_MAJOR_VERSION = String.valueOf(sysVmVersion.getMajorRelease()) + "." + String.valueOf(sysVmVersion.getMinorRelease()); - SystemVmTemplateRegistration.CS_TINY_VERSION = String.valueOf(sysVmVersion.getPatchRelease()); + @VisibleForTesting + protected void doUpgrades(GlobalLock lock) { + try { + initializeDatabaseEncryptors(); - LOGGER.info("DB version = " + dbVersion + " Code Version = " + currentVersion); + final CloudStackVersion dbVersion = CloudStackVersion.parse(_dao.getCurrentVersion()); + final String currentVersionValue = getImplementationVersion(); - if (dbVersion.compareTo(currentVersion) > 0) { - throw new CloudRuntimeException("Database version " + dbVersion + " is higher than management software version " + currentVersionValue); - } + if (StringUtils.isBlank(currentVersionValue)) { + return; + } - if (dbVersion.compareTo(currentVersion) == 0) { - LOGGER.info("DB version and code version matches so no upgrade needed."); - return; - } + String csVersion = parseSystemVmMetadata(); + final CloudStackVersion sysVmVersion = CloudStackVersion.parse(csVersion); + final CloudStackVersion currentVersion = CloudStackVersion.parse(currentVersionValue); + SystemVmTemplateRegistration.CS_MAJOR_VERSION = sysVmVersion.getMajorRelease() + "." + sysVmVersion.getMinorRelease(); + SystemVmTemplateRegistration.CS_TINY_VERSION = String.valueOf(sysVmVersion.getPatchRelease()); + + LOGGER.info("DB version = {} Code Version = {}", dbVersion, currentVersion); + if (dbVersion.compareTo(currentVersion) > 0) { + throw new CloudRuntimeException("Database version " + dbVersion + " is higher than management software version " + currentVersionValue); + } + + if (dbVersion.compareTo(currentVersion) == 0) { + LOGGER.info("DB version and code version matches so no upgrade needed."); + return; + } + + if (isStandalone()) { upgrade(dbVersion, currentVersion); - } finally { - lock.unlock(); + } else { + String errorMessage = "Database upgrade is required but the management server is running in a clustered environment. " + + "Please perform the database upgrade when the management server is not running in a clustered environment."; + LOGGER.error(errorMessage); + handleClusteredUpgradeRequired(); // allow tests to override behavior } } finally { - lock.releaseRef(); + lock.unlock(); } } - private void initializeDatabaseEncryptors() { + /** + * Hook that is called when an upgrade is required but the management server is clustered. + * Default behavior is to exit the JVM, tests can override to throw instead. + */ + @VisibleForTesting + protected void handleClusteredUpgradeRequired() { + System.exit(5); // I would prefer ServerDaemon.abort(errorMessage) but that would create a dependency hell + } + + @VisibleForTesting + protected String getImplementationVersion() { + return this.getClass().getPackage().getImplementationVersion(); + } + + @VisibleForTesting + protected String parseSystemVmMetadata() { + return SystemVmTemplateRegistration.parseMetadataFile(); + } + + // Make this protected so tests can noop it out + protected void initializeDatabaseEncryptors() { TransactionLegacy txn = TransactionLegacy.open("initializeDatabaseEncryptors"); txn.start(); String errorMessage = "Unable to get the database connections"; @@ -520,7 +585,7 @@ private void decryptInit(Connection conn) throws SQLException { ResultSet result = pstmt.executeQuery()) { if (result.next()) { String init = result.getString(1); - LOGGER.info("init = " + DBEncryptionUtil.decrypt(init)); + LOGGER.info("init = {}", DBEncryptionUtil.decrypt(init)); } } } @@ -551,21 +616,11 @@ public String getUpgradedVersion() { return upgradedVersion; } - @Override - public boolean supportsRollingUpgrade() { - return false; - } - @Override public InputStream[] getPrepareScripts() { return new InputStream[0]; } - @Override - public void performDataMigration(Connection conn) { - - } - @Override public InputStream[] getCleanupScripts() { return new InputStream[0]; diff --git a/engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java b/engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java index 9b1420f22c37..79a4bd6d6d8e 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/SystemVmTemplateRegistration.java @@ -28,7 +28,6 @@ import java.sql.Date; import java.util.ArrayList; import java.util.Arrays; -import java.util.Collection; import java.util.HashMap; import java.util.List; import java.util.Locale; @@ -51,6 +50,7 @@ import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao; import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO; import org.apache.cloudstack.utils.security.DigestHelper; +import org.apache.cloudstack.utils.server.ServerPropertiesUtil; import org.apache.commons.lang3.StringUtils; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; @@ -62,6 +62,8 @@ import com.cloud.dc.dao.ClusterDaoImpl; import com.cloud.dc.dao.DataCenterDao; import com.cloud.dc.dao.DataCenterDaoImpl; +import com.cloud.dc.dao.DataCenterDetailsDao; +import com.cloud.dc.dao.DataCenterDetailsDaoImpl; import com.cloud.hypervisor.Hypervisor; import com.cloud.storage.DataStoreRole; import com.cloud.storage.GuestOSVO; @@ -103,14 +105,20 @@ public class SystemVmTemplateRegistration { private static final String METADATA_FILE = TEMPLATES_PATH + METADATA_FILE_NAME; public static final String TEMPORARY_SECONDARY_STORE = "tmp"; private static final String PARTIAL_TEMPLATE_FOLDER = String.format("/template/tmpl/%d/", Account.ACCOUNT_ID_SYSTEM); - private static final String storageScriptsDir = "scripts/storage/secondary"; + protected static final String STORAGE_SCRIPTS_DIR = "scripts/storage/secondary"; private static final Integer OTHER_LINUX_ID = 99; - private static Integer LINUX_12_ID = 363; + protected static Integer LINUX_12_ID = 363; private static final Integer SCRIPT_TIMEOUT = 1800000; private static final Integer LOCK_WAIT_TIMEOUT = 1200; + protected static final String TEMPLATE_DOWNLOAD_URL_KEY = "downloadurl"; + protected static final String TEMPLATES_DOWNLOAD_REPOSITORY_KEY = "downloadrepository"; + protected static final String TEMPLATES_CUSTOM_DOWNLOAD_REPOSITORY_KEY = "system.vm.templates.download.repository"; protected static final List DOWNLOADABLE_TEMPLATE_ARCH_TYPES = Arrays.asList( + CPU.CPUArch.amd64, CPU.CPUArch.arm64 ); + protected static final String MINIMUM_SYSTEM_VM_VERSION_KEY = "minreq.sysvmtemplate.version"; + protected static final String DEFAULT_SYSTEM_VM_GUEST_OS_NAME = "Debian GNU/Linux 12 (64-bit)"; public static String CS_MAJOR_VERSION = null; public static String CS_TINY_VERSION = null; @@ -134,7 +142,9 @@ public class SystemVmTemplateRegistration { @Inject ConfigurationDao configurationDao; @Inject - private GuestOSDao guestOSDao; + DataCenterDetailsDao dataCenterDetailsDao; + @Inject + GuestOSDao guestOSDao; private String systemVmTemplateVersion; @@ -142,6 +152,7 @@ public class SystemVmTemplateRegistration { public SystemVmTemplateRegistration() { dataCenterDao = new DataCenterDaoImpl(); + dataCenterDetailsDao = new DataCenterDetailsDaoImpl(); vmTemplateDao = new VMTemplateDaoImpl(); vmTemplateZoneDao = new VMTemplateZoneDaoImpl(); templateDataStoreDao = new BasicTemplateDataStoreDaoImpl(); @@ -155,33 +166,14 @@ public SystemVmTemplateRegistration() { } /** - * Convenience constructor method to use when there is no system VM template change for a new version. + * Convenience constructor method to use when there is no system VM Template change for a new version. */ public SystemVmTemplateRegistration(String systemVmTemplateVersion) { this(); this.systemVmTemplateVersion = systemVmTemplateVersion; } - public static String getMountCommand(String nfsVersion, String device, String dir) { - String cmd = MOUNT_COMMAND_BASE; - if (StringUtils.isNotBlank(nfsVersion)) { - cmd = String.format("%s -o vers=%s", cmd, nfsVersion); - } - return String.format("%s %s %s", cmd, device, dir); - } - - public String getSystemVmTemplateVersion() { - if (StringUtils.isEmpty(systemVmTemplateVersion)) { - return String.format("%s.%s", CS_MAJOR_VERSION, CS_TINY_VERSION); - } - return systemVmTemplateVersion; - } - - public File getTempDownloadDir() { - return tempDownloadDir; - } - - private static class SystemVMTemplateDetails { + protected static class SystemVMTemplateDetails { Long id; String uuid; String name; @@ -312,19 +304,19 @@ public void setUpdated(Date updated) { } } - public static final List> hypervisorList = Arrays.asList( + protected static final List> AVAILABLE_SYSTEM_TEMPLATES_HYPERVISOR_ARCH_LIST = Arrays.asList( new Pair<>(Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64), new Pair<>(Hypervisor.HypervisorType.KVM, CPU.CPUArch.arm64), - new Pair<>(Hypervisor.HypervisorType.VMware, null), - new Pair<>(Hypervisor.HypervisorType.XenServer, null), - new Pair<>(Hypervisor.HypervisorType.Hyperv, null), - new Pair<>(Hypervisor.HypervisorType.LXC, null), - new Pair<>(Hypervisor.HypervisorType.Ovm3, null) + new Pair<>(Hypervisor.HypervisorType.VMware, CPU.CPUArch.amd64), + new Pair<>(Hypervisor.HypervisorType.XenServer, CPU.CPUArch.amd64), + new Pair<>(Hypervisor.HypervisorType.Hyperv, CPU.CPUArch.amd64), + new Pair<>(Hypervisor.HypervisorType.LXC, CPU.CPUArch.amd64), + new Pair<>(Hypervisor.HypervisorType.Ovm3, CPU.CPUArch.amd64) ); - public static final Map NewTemplateMap = new HashMap<>(); + protected static final List METADATA_TEMPLATE_LIST = new ArrayList<>(); - public static final Map RouterTemplateConfigurationNames = new HashMap<>() { + protected static final Map ROUTER_TEMPLATE_CONFIGURATION_NAMES = new HashMap<>() { { put(Hypervisor.HypervisorType.KVM, "router.template.kvm"); put(Hypervisor.HypervisorType.VMware, "router.template.vmware"); @@ -335,18 +327,7 @@ public void setUpdated(Date updated) { } }; - public static Map hypervisorGuestOsMap = new HashMap<>() { - { - put(Hypervisor.HypervisorType.KVM, LINUX_12_ID); - put(Hypervisor.HypervisorType.XenServer, OTHER_LINUX_ID); - put(Hypervisor.HypervisorType.VMware, OTHER_LINUX_ID); - put(Hypervisor.HypervisorType.Hyperv, LINUX_12_ID); - put(Hypervisor.HypervisorType.LXC, LINUX_12_ID); - put(Hypervisor.HypervisorType.Ovm3, LINUX_12_ID); - } - }; - - public static final Map hypervisorImageFormat = new HashMap() { + protected static final Map HYPERVISOR_IMAGE_FORMAT_MAP = new HashMap<>() { { put(Hypervisor.HypervisorType.KVM, ImageFormat.QCOW2); put(Hypervisor.HypervisorType.XenServer, ImageFormat.VHD); @@ -357,69 +338,27 @@ public void setUpdated(Date updated) { } }; - public boolean validateIfSeeded(TemplateDataStoreVO templDataStoreVO, String url, String path, String nfsVersion) { - String filePath = null; - try { - filePath = Files.createTempDirectory(TEMPORARY_SECONDARY_STORE).toString(); - if (filePath == null) { - throw new CloudRuntimeException("Failed to create temporary directory to mount secondary store"); - } - mountStore(url, filePath, nfsVersion); - int lastIdx = path.lastIndexOf(File.separator); - String partialDirPath = path.substring(0, lastIdx); - String templatePath = filePath + File.separator + partialDirPath; - File templateProps = new File(templatePath + "/template.properties"); - if (templateProps.exists()) { - Pair templateSizes = readTemplatePropertiesSizes(templatePath + "/template.properties"); - updateSeededTemplateDetails(templDataStoreVO.getTemplateId(), templDataStoreVO.getDataStoreId(), - templateSizes.first(), templateSizes.second()); - LOGGER.info("SystemVM template already seeded, skipping registration"); - return true; - } - LOGGER.info("SystemVM template not seeded"); - return false; - } catch (Exception e) { - LOGGER.error("Failed to verify if the template is seeded", e); - throw new CloudRuntimeException("Failed to verify if the template is seeded", e); - } finally { - unmountStore(filePath); - try { - Files.delete(Path.of(filePath)); - } catch (IOException e) { - LOGGER.error(String.format("Failed to delete temporary directory: %s", filePath)); - } + protected static Map hypervisorGuestOsMap = new HashMap<>() { + { + put(Hypervisor.HypervisorType.KVM, LINUX_12_ID); + put(Hypervisor.HypervisorType.XenServer, OTHER_LINUX_ID); + put(Hypervisor.HypervisorType.VMware, OTHER_LINUX_ID); + put(Hypervisor.HypervisorType.Hyperv, LINUX_12_ID); + put(Hypervisor.HypervisorType.LXC, LINUX_12_ID); + put(Hypervisor.HypervisorType.Ovm3, LINUX_12_ID); } + }; + + private static boolean isRunningInTest() { + return "true".equalsIgnoreCase(System.getProperty("test.mode")); } private static String getHypervisorArchLog(Hypervisor.HypervisorType hypervisorType, CPU.CPUArch arch) { StringBuilder sb = new StringBuilder("hypervisor: ").append(hypervisorType.name()); - if (Hypervisor.HypervisorType.KVM.equals(hypervisorType)) { - sb.append(", arch: ").append(arch == null ? CPU.CPUArch.amd64.getType() : arch.getType()); - } + sb.append(", arch: ").append(arch == null ? CPU.CPUArch.amd64.getType() : arch.getType()); return sb.toString(); } - protected static String getHypervisorArchKey(Hypervisor.HypervisorType hypervisorType, CPU.CPUArch arch) { - if (Hypervisor.HypervisorType.KVM.equals(hypervisorType)) { - return String.format("%s-%s", hypervisorType.name().toLowerCase(), - arch == null ? CPU.CPUArch.amd64.getType() : arch.getType()); - } - return hypervisorType.name().toLowerCase(); - } - - protected static MetadataTemplateDetails getMetadataTemplateDetails(Hypervisor.HypervisorType hypervisorType, - CPU.CPUArch arch) { - return NewTemplateMap.get(getHypervisorArchKey(hypervisorType, arch)); - } - - public VMTemplateVO getRegisteredTemplate(String templateName, CPU.CPUArch arch) { - return vmTemplateDao.findLatestTemplateByName(templateName, arch); - } - - private static boolean isRunningInTest() { - return "true".equalsIgnoreCase(System.getProperty("test.mode")); - } - /** * Attempts to determine the templates directory path by locating the metadata file. *

@@ -460,28 +399,124 @@ private static String fetchTemplatesPath() { throw new CloudRuntimeException(errMsg); } - private List getEligibleZoneIds() { - List zoneIds = new ArrayList<>(); - List stores = imageStoreDao.findByProtocol("nfs"); - for (ImageStoreVO store : stores) { - if (!zoneIds.contains(store.getDataCenterId())) { - zoneIds.add(store.getDataCenterId()); + protected static void cleanupStore(Long templateId, String filePath) { + String destTempFolder = filePath + PARTIAL_TEMPLATE_FOLDER + String.valueOf(templateId); + try { + Files.deleteIfExists(Paths.get(destTempFolder)); + } catch (IOException e) { + LOGGER.error("Failed to cleanup mounted store at: {}", filePath, e); + } + } + + protected static Pair readTemplatePropertiesSizes(String path) { + File tmpFile = new File(path); + Long size = null; + Long physicalSize = 0L; + try (FileReader fr = new FileReader(tmpFile); BufferedReader brf = new BufferedReader(fr);) { + String line = null; + while ((line = brf.readLine()) != null) { + if (line.startsWith("size=")) { + physicalSize = Long.parseLong(line.split("=")[1]); + } else if (line.startsWith("virtualsize=")) { + size = Long.parseLong(line.split("=")[1]); + } + if (size == null) { + size = physicalSize; + } } + } catch (IOException ex) { + LOGGER.warn("Failed to read from template.properties", ex); } - return zoneIds; + return new Pair<>(size, physicalSize); } - protected Pair getNfsStoreInZone(Long zoneId) { - ImageStoreVO storeVO = imageStoreDao.findOneByZoneAndProtocol(zoneId, "nfs"); - if (storeVO == null) { - String errMsg = String.format("Failed to fetch NFS store in zone = %s for SystemVM template registration", - zoneId); + protected static MetadataTemplateDetails getMetadataTemplateDetails(Hypervisor.HypervisorType hypervisorType, + CPU.CPUArch arch) { + return METADATA_TEMPLATE_LIST + .stream() + .filter(x -> Objects.equals(x.getHypervisorType(), hypervisorType) && + Objects.equals(x.getArch(), arch)) + .findFirst() + .orElse(null); + } + + protected static String getMetadataFilePath() { + return METADATA_FILE; + } + + protected static Ini.Section getMetadataSectionForHypervisorAndArch(Ini ini, + Hypervisor.HypervisorType hypervisorType, CPU.CPUArch arch) { + String key = String.format("%s-%s", hypervisorType.name().toLowerCase(), + arch.getType().toLowerCase()); + Ini.Section section = ini.get(key); + if (section == null && !Hypervisor.HypervisorType.KVM.equals(hypervisorType)) { + key = String.format("%s", hypervisorType.name().toLowerCase()); + section = ini.get(key); + } + return section; + } + + protected static String getMountCommand(String nfsVersion, String device, String dir) { + String cmd = MOUNT_COMMAND_BASE; + if (StringUtils.isNotBlank(nfsVersion)) { + cmd = String.format("%s -o vers=%s", cmd, nfsVersion); + } + return String.format("%s %s %s", cmd, device, dir); + } + + /** + * This method parses the metadata file consisting of the system VM Templates information + * @return the version of the system VM Template that is to be used. This is done in order + * to fallback on the latest available version of the system VM Template when there doesn't + * exist a template corresponding to the current code version. + */ + public static String parseMetadataFile() { + String metadataFilePath = getMetadataFilePath(); + String errMsg = String.format("Failed to parse system VM Template metadata file: %s", metadataFilePath); + final Ini ini = new Ini(); + try (FileReader reader = new FileReader(metadataFilePath)) { + ini.load(reader); + } catch (IOException e) { + LOGGER.error(errMsg, e); + throw new CloudRuntimeException(errMsg, e); + } + if (!ini.containsKey("default")) { + errMsg = String.format("%s as unable to default section", errMsg); LOGGER.error(errMsg); throw new CloudRuntimeException(errMsg); } - String url = storeVO.getUrl(); - Long storeId = storeVO.getId(); - return new Pair<>(url, storeId); + Ini.Section defaultSection = ini.get("default"); + String defaultDownloadRepository = defaultSection.get(TEMPLATES_DOWNLOAD_REPOSITORY_KEY); + String customDownloadRepository = ServerPropertiesUtil.getProperty(TEMPLATES_CUSTOM_DOWNLOAD_REPOSITORY_KEY); + boolean updateCustomDownloadRepository = StringUtils.isNotBlank(customDownloadRepository) && + StringUtils.isNotBlank(defaultDownloadRepository); + for (Pair hypervisorTypeArchPair : AVAILABLE_SYSTEM_TEMPLATES_HYPERVISOR_ARCH_LIST) { + String key = String.format("%s-%s", hypervisorTypeArchPair.first().name().toLowerCase(), + hypervisorTypeArchPair.second().getType().toLowerCase()); + Ini.Section section = getMetadataSectionForHypervisorAndArch(ini, hypervisorTypeArchPair.first(), + hypervisorTypeArchPair.second()); + if (section == null) { + LOGGER.error("Failed to find details for {} in template metadata file: {}", + getHypervisorArchLog(hypervisorTypeArchPair.first(), hypervisorTypeArchPair.second()), + metadataFilePath); + continue; + } + String url = section.get(TEMPLATE_DOWNLOAD_URL_KEY); + if (StringUtils.isNotBlank(url) && updateCustomDownloadRepository) { + url = url.replaceFirst(defaultDownloadRepository.trim(), + customDownloadRepository.trim()); + LOGGER.debug("Updated download URL for {} using custom repository to {}", key, url); + } + METADATA_TEMPLATE_LIST.add(new MetadataTemplateDetails( + hypervisorTypeArchPair.first(), + section.get("templatename"), + section.get("filename"), + url, + section.get("checksum"), + hypervisorTypeArchPair.second(), + section.get("guestos"))); + } + return defaultSection.get("version").trim(); } public static void mountStore(String storeUrl, String path, String nfsVersion) { @@ -500,6 +535,64 @@ public static void mountStore(String storeUrl, String path, String nfsVersion) { } } + public static void unmountStore(String filePath) { + try { + LOGGER.info("Unmounting store"); + String umountCmd = String.format(UMOUNT_COMMAND, filePath); + Script.runSimpleBashScript(umountCmd); + try { + Files.deleteIfExists(Paths.get(filePath)); + } catch (IOException e) { + LOGGER.error(String.format("Failed to cleanup mounted store at: %s", filePath), e); + } + } catch (Exception e) { + String msg = String.format("Failed to unmount store mounted at %s", filePath); + LOGGER.error(msg, e); + throw new CloudRuntimeException(msg, e); + } + } + + protected File getTempDownloadDir() { + return tempDownloadDir; + } + + protected void readTemplateProperties(String path, SystemVMTemplateDetails details) { + Pair templateSizes = readTemplatePropertiesSizes(path); + details.setSize(templateSizes.first()); + details.setPhysicalSize(templateSizes.second()); + } + + protected List getEligibleZoneIds() { + List zoneIds = new ArrayList<>(); + List stores = imageStoreDao.findByProtocol("nfs"); + for (ImageStoreVO store : stores) { + if (!zoneIds.contains(store.getDataCenterId())) { + zoneIds.add(store.getDataCenterId()); + } + } + return zoneIds; + } + + protected Pair getNfsStoreInZone(Long zoneId) { + ImageStoreVO storeVO = imageStoreDao.findOneByZoneAndProtocol(zoneId, "nfs"); + if (storeVO == null) { + String errMsg = String.format("Failed to fetch NFS store in zone = %s for SystemVM Template registration", + zoneId); + LOGGER.error(errMsg); + throw new CloudRuntimeException(errMsg); + } + String url = storeVO.getUrl(); + Long storeId = storeVO.getId(); + return new Pair<>(url, storeId); + } + + protected String getSystemVmTemplateVersion() { + if (StringUtils.isEmpty(systemVmTemplateVersion)) { + return String.format("%s.%s", CS_MAJOR_VERSION, CS_TINY_VERSION); + } + return systemVmTemplateVersion; + } + private VMTemplateVO createTemplateObjectInDB(SystemVMTemplateDetails details) { Long templateId = vmTemplateDao.getNextInSequence(Long.class, "id"); VMTemplateVO template = new VMTemplateVO(); @@ -527,7 +620,7 @@ private VMTemplateVO createTemplateObjectInDB(SystemVMTemplateDetails details) { return template; } - private VMTemplateZoneVO createOrUpdateTemplateZoneEntry(long zoneId, long templateId) { + protected VMTemplateZoneVO createOrUpdateTemplateZoneEntry(long zoneId, long templateId) { VMTemplateZoneVO templateZoneVO = vmTemplateZoneDao.findByZoneTemplate(zoneId, templateId); if (templateZoneVO == null) { templateZoneVO = new VMTemplateZoneVO(zoneId, templateId, new java.util.Date()); @@ -541,33 +634,37 @@ private VMTemplateZoneVO createOrUpdateTemplateZoneEntry(long zoneId, long templ return templateZoneVO; } - private void createCrossZonesTemplateZoneRefEntries(Long templateId) { + protected void createCrossZonesTemplateZoneRefEntries(Long templateId) { List dcs = dataCenterDao.listAll(); for (DataCenterVO dc : dcs) { VMTemplateZoneVO templateZoneVO = createOrUpdateTemplateZoneEntry(dc.getId(), templateId); if (templateZoneVO == null) { - throw new CloudRuntimeException(String.format("Failed to create template_zone_ref record for the systemVM template (id: %s) and zone: %s", templateId, dc)); + throw new CloudRuntimeException(String.format("Failed to create template-zone record for the system " + + "VM Template (ID : %d) and zone: %s", templateId, dc)); } } } - private void createTemplateStoreRefEntry(SystemVMTemplateDetails details) { - TemplateDataStoreVO templateDataStoreVO = new TemplateDataStoreVO(details.storeId, details.getId(), details.getCreated(), 0, - VMTemplateStorageResourceAssoc.Status.NOT_DOWNLOADED, null, null, null, details.getInstallPath(), details.getUrl()); + protected void createTemplateStoreRefEntry(SystemVMTemplateDetails details) { + TemplateDataStoreVO templateDataStoreVO = new TemplateDataStoreVO(details.getStoreId(), details.getId(), + details.getCreated(), 0, VMTemplateStorageResourceAssoc.Status.NOT_DOWNLOADED, + null, null, null, details.getInstallPath(), details.getUrl()); templateDataStoreVO.setDataStoreRole(DataStoreRole.Image); templateDataStoreVO = templateDataStoreDao.persist(templateDataStoreVO); if (templateDataStoreVO == null) { - throw new CloudRuntimeException(String.format("Failed to create template_store_ref record for the systemVM template for hypervisor: %s", details.getHypervisorType().name())); + throw new CloudRuntimeException(String.format("Failed to create template-store record for the system VM " + + "template (ID : %d) and store (ID: %d)", details.getId(), details.getStoreId())); } } - public void updateTemplateDetails(SystemVMTemplateDetails details) { + protected void updateTemplateDetails(SystemVMTemplateDetails details) { VMTemplateVO template = vmTemplateDao.findById(details.getId()); template.setSize(details.getSize()); template.setState(VirtualMachineTemplate.State.Active); vmTemplateDao.update(template.getId(), template); - TemplateDataStoreVO templateDataStoreVO = templateDataStoreDao.findByStoreTemplate(details.getStoreId(), template.getId()); + TemplateDataStoreVO templateDataStoreVO = templateDataStoreDao.findByStoreTemplate(details.getStoreId(), + template.getId()); templateDataStoreVO.setSize(details.getSize()); templateDataStoreVO.setPhysicalSize(details.getPhysicalSize()); templateDataStoreVO.setDownloadPercent(100); @@ -576,11 +673,11 @@ public void updateTemplateDetails(SystemVMTemplateDetails details) { templateDataStoreVO.setState(ObjectInDataStoreStateMachine.State.Ready); boolean updated = templateDataStoreDao.update(templateDataStoreVO.getId(), templateDataStoreVO); if (!updated) { - throw new CloudRuntimeException("Failed to update template_store_ref entry for registered systemVM template"); + throw new CloudRuntimeException("Failed to update template-store record for registered system VM Template"); } } - public void updateSeededTemplateDetails(long templateId, long storeId, long size, long physicalSize) { + protected void updateSeededTemplateDetails(long templateId, long storeId, long size, long physicalSize) { VMTemplateVO template = vmTemplateDao.findById(templateId); template.setSize(size); vmTemplateDao.update(template.getId(), template); @@ -591,128 +688,113 @@ public void updateSeededTemplateDetails(long templateId, long storeId, long size templateDataStoreVO.setLastUpdated(new Date(DateUtil.currentGMTTime().getTime())); boolean updated = templateDataStoreDao.update(templateDataStoreVO.getId(), templateDataStoreVO); if (!updated) { - throw new CloudRuntimeException("Failed to update template_store_ref entry for seeded systemVM template"); + throw new CloudRuntimeException("Failed to update template-store record for seeded system VM Template"); } } - public void updateSystemVMEntries(Long templateId, Hypervisor.HypervisorType hypervisorType) { + protected void updateSystemVMEntries(Long templateId, Hypervisor.HypervisorType hypervisorType) { vmInstanceDao.updateSystemVmTemplateId(templateId, hypervisorType); } - private void updateSystemVmTemplateGuestOsId() { - String systemVmGuestOsName = "Debian GNU/Linux 12 (64-bit)"; // default + protected void updateHypervisorGuestOsMap() { try { - GuestOSVO guestOS = guestOSDao.findOneByDisplayName(systemVmGuestOsName); - if (guestOS != null) { - LOGGER.debug("Updating SystemVM Template Guest OS [{}] id", systemVmGuestOsName); - SystemVmTemplateRegistration.LINUX_12_ID = Math.toIntExact(guestOS.getId()); - hypervisorGuestOsMap.put(Hypervisor.HypervisorType.KVM, LINUX_12_ID); - hypervisorGuestOsMap.put(Hypervisor.HypervisorType.Hyperv, LINUX_12_ID); - hypervisorGuestOsMap.put(Hypervisor.HypervisorType.LXC, LINUX_12_ID); - hypervisorGuestOsMap.put(Hypervisor.HypervisorType.Ovm3, LINUX_12_ID); + GuestOSVO guestOS = guestOSDao.findOneByDisplayName(DEFAULT_SYSTEM_VM_GUEST_OS_NAME); + if (guestOS == null) { + LOGGER.warn("Couldn't find Guest OS by name [{}] to update system VM Template guest OS ID", + DEFAULT_SYSTEM_VM_GUEST_OS_NAME); + return; } + LOGGER.debug("Updating system VM Template guest OS [{}] ID", DEFAULT_SYSTEM_VM_GUEST_OS_NAME); + SystemVmTemplateRegistration.LINUX_12_ID = Math.toIntExact(guestOS.getId()); + hypervisorGuestOsMap.put(Hypervisor.HypervisorType.KVM, LINUX_12_ID); + hypervisorGuestOsMap.put(Hypervisor.HypervisorType.Hyperv, LINUX_12_ID); + hypervisorGuestOsMap.put(Hypervisor.HypervisorType.LXC, LINUX_12_ID); + hypervisorGuestOsMap.put(Hypervisor.HypervisorType.Ovm3, LINUX_12_ID); } catch (Exception e) { - LOGGER.warn("Couldn't update SystemVM Template Guest OS id, due to {}", e.getMessage()); + LOGGER.warn("Couldn't update System VM template guest OS ID, due to {}", e.getMessage()); } } - public void updateConfigurationParams(Map configParams) { - for (Map.Entry config : configParams.entrySet()) { - boolean updated = configurationDao.update(config.getKey(), config.getValue()); - if (!updated) { - throw new CloudRuntimeException(String.format("Failed to update configuration parameter %s", config.getKey())); - } + protected void updateConfigurationParams(Hypervisor.HypervisorType hypervisorType, String templateName, Long zoneId) { + String configName = ROUTER_TEMPLATE_CONFIGURATION_NAMES.get(hypervisorType); + boolean updated = configurationDao.update(configName, templateName); + if (!updated) { + throw new CloudRuntimeException(String.format("Failed to update configuration parameter %s", configName)); } - } - - private static Pair readTemplatePropertiesSizes(String path) { - File tmpFile = new File(path); - Long size = null; - Long physicalSize = 0L; - try (FileReader fr = new FileReader(tmpFile); BufferedReader brf = new BufferedReader(fr);) { - String line = null; - while ((line = brf.readLine()) != null) { - if (line.startsWith("size=")) { - physicalSize = Long.parseLong(line.split("=")[1]); - } else if (line.startsWith("virtualsize=")) { - size = Long.parseLong(line.split("=")[1]); - } - if (size == null) { - size = physicalSize; - } - } - } catch (IOException ex) { - LOGGER.warn("Failed to read from template.properties", ex); + if (zoneId != null) { + dataCenterDetailsDao.removeDetail(zoneId, configName); + } + updated = configurationDao.update(MINIMUM_SYSTEM_VM_VERSION_KEY, getSystemVmTemplateVersion()); + if (!updated) { + throw new CloudRuntimeException(String.format("Failed to update configuration parameter %s", configName)); + } + if (zoneId != null) { + dataCenterDetailsDao.removeDetail(zoneId, MINIMUM_SYSTEM_VM_VERSION_KEY); } - return new Pair<>(size, physicalSize); - } - - public static void readTemplateProperties(String path, SystemVMTemplateDetails details) { - Pair templateSizes = readTemplatePropertiesSizes(path); - details.setSize(templateSizes.first()); - details.setPhysicalSize(templateSizes.second()); } - private void updateTemplateTablesOnFailure(long templateId) { + protected void updateTemplateEntriesOnFailure(long templateId) { VMTemplateVO template = vmTemplateDao.createForUpdate(templateId); template.setState(VirtualMachineTemplate.State.Inactive); vmTemplateDao.update(template.getId(), template); vmTemplateDao.remove(templateId); - TemplateDataStoreVO templateDataStoreVO = templateDataStoreDao.findByTemplate(template.getId(), DataStoreRole.Image); - templateDataStoreDao.remove(templateDataStoreVO.getId()); - } - - public static void unmountStore(String filePath) { - try { - LOGGER.info("Unmounting store"); - String umountCmd = String.format(UMOUNT_COMMAND, filePath); - Script.runSimpleBashScript(umountCmd); - try { - Files.deleteIfExists(Paths.get(filePath)); - } catch (IOException e) { - LOGGER.error(String.format("Failed to cleanup mounted store at: %s", filePath), e); - } - } catch (Exception e) { - String msg = String.format("Failed to unmount store mounted at %s", filePath); - LOGGER.error(msg, e); - throw new CloudRuntimeException(msg, e); + TemplateDataStoreVO templateDataStoreVO = templateDataStoreDao.findByTemplate(template.getId(), + DataStoreRole.Image); + if (templateDataStoreVO == null) { + return; } + templateDataStoreDao.remove(templateDataStoreVO.getId()); } - private void setupTemplate(String templateName, Hypervisor.HypervisorType hypervisor, CPU.CPUArch arch, - String destTempFolder) throws CloudRuntimeException { - String setupTmpltScript = Script.findScript(storageScriptsDir, "setup-sysvm-tmplt"); + protected void setupTemplateOnStore(String templateName, MetadataTemplateDetails templateDetails, + String destTempFolder) throws CloudRuntimeException { + String setupTmpltScript = Script.findScript(STORAGE_SCRIPTS_DIR, "setup-sysvm-tmplt"); if (setupTmpltScript == null) { - throw new CloudRuntimeException("Unable to find the createtmplt.sh"); + throw new CloudRuntimeException("Unable to find the setup-sysvm-tmplt script"); } Script scr = new Script(setupTmpltScript, SCRIPT_TIMEOUT, LOGGER); scr.add("-u", templateName); - MetadataTemplateDetails templateDetails = NewTemplateMap.get(getHypervisorArchKey(hypervisor, arch)); String filePath = StringUtils.isNotBlank(templateDetails.getDownloadedFilePath()) ? templateDetails.getDownloadedFilePath() : templateDetails.getDefaultFilePath(); scr.add("-f", filePath); - scr.add("-h", hypervisor.name().toLowerCase(Locale.ROOT)); + scr.add("-h", templateDetails.getHypervisorType().name().toLowerCase(Locale.ROOT)); scr.add("-d", destTempFolder); String result = scr.execute(); if (result != null) { - String errMsg = String.format("failed to create template: %s ", result); + String errMsg = String.format("Failed to create Template: %s ", result); LOGGER.error(errMsg); throw new CloudRuntimeException(errMsg); } } - private Long performTemplateRegistrationOperations(Hypervisor.HypervisorType hypervisor, - String name, CPU.CPUArch arch, String url, String checksum, ImageFormat format, long guestOsId, - Long storeId, Long templateId, String filePath, TemplateDataStoreVO templateDataStoreVO) { + /** + * Register or update a system VM Template record and seed it on the target store. + * + * @param name display name of the template + * @param templateDetails metadata for the template + * @param url download URL of the template + * @param checksum expected checksum of the template file + * @param format image format of the template + * @param guestOsId guest OS id + * @param storeId target image store id + * @param templateId existing template id if present, otherwise {@code null} + * @param filePath temporary mount path for the store + * @param templateDataStoreVO existing template-store mapping; may be {@code null} + * @return the id of the template that was created or updated + */ + protected Long performTemplateRegistrationOperations(String name, MetadataTemplateDetails templateDetails, + String url, String checksum, ImageFormat format, long guestOsId, Long storeId, Long templateId, + String filePath, TemplateDataStoreVO templateDataStoreVO) { String templateName = UUID.randomUUID().toString(); Date created = new Date(DateUtil.currentGMTTime().getTime()); - SystemVMTemplateDetails details = new SystemVMTemplateDetails(templateName, name, created, - url, checksum, format, (int) guestOsId, hypervisor, arch, storeId); + SystemVMTemplateDetails details = new SystemVMTemplateDetails(templateName, name, created, url, checksum, + format, (int) guestOsId, templateDetails.getHypervisorType(), templateDetails.getArch(), storeId); if (templateId == null) { VMTemplateVO template = createTemplateObjectInDB(details); if (template == null) { - throw new CloudRuntimeException(String.format("Failed to register template for hypervisor: %s", hypervisor.name())); + throw new CloudRuntimeException(String.format("Failed to register Template for hypervisor: %s", + templateDetails.getHypervisorType().name())); } templateId = template.getId(); } @@ -721,153 +803,126 @@ private Long performTemplateRegistrationOperations(Hypervisor.HypervisorType hyp details.setId(templateId); String destTempFolderName = String.valueOf(templateId); String destTempFolder = filePath + PARTIAL_TEMPLATE_FOLDER + destTempFolderName; - details.setInstallPath(PARTIAL_TEMPLATE_FOLDER + destTempFolderName + File.separator + templateName + "." + hypervisorImageFormat.get(hypervisor).getFileExtension()); + details.setInstallPath(String.format("%s%s%s%s.%s", PARTIAL_TEMPLATE_FOLDER, destTempFolderName, + File.separator, templateName, + HYPERVISOR_IMAGE_FORMAT_MAP.get(templateDetails.getHypervisorType()).getFileExtension())); if (templateDataStoreVO == null) { createTemplateStoreRefEntry(details); } - setupTemplate(templateName, hypervisor, arch, destTempFolder); + setupTemplateOnStore(templateName, templateDetails, destTempFolder); readTemplateProperties(destTempFolder + "/template.properties", details); details.setUpdated(new Date(DateUtil.currentGMTTime().getTime())); updateTemplateDetails(details); return templateId; } - public void registerTemplate(Hypervisor.HypervisorType hypervisor, String name, Long storeId, - VMTemplateVO templateVO, TemplateDataStoreVO templateDataStoreVO, String filePath) { + /** + * Add an existing system VM Template to a secondary image store and update related DB entries. + * + * @param templateVO the existing VM template (must not be null) + * @param templateDetails the metadata details of the template to be added + * @param templateDataStoreVO optional existing template-store mapping; may be null + * @param zoneId zone id where the operation is performed + * @param storeId target image store id + * @param filePath temporary mount path for the store + * @throws CloudRuntimeException on failure; the method attempts rollback/cleanup + */ + protected void addExistingTemplateToStore(VMTemplateVO templateVO, MetadataTemplateDetails templateDetails, + TemplateDataStoreVO templateDataStoreVO, long zoneId, Long storeId, String filePath) { try { - performTemplateRegistrationOperations(hypervisor, name, templateVO.getArch(), templateVO.getUrl(), + performTemplateRegistrationOperations(templateVO.getName(), templateDetails, templateVO.getUrl(), templateVO.getChecksum(), templateVO.getFormat(), templateVO.getGuestOSId(), storeId, templateVO.getId(), filePath, templateDataStoreVO); } catch (Exception e) { - String errMsg = String.format("Failed to register template for hypervisor: %s", hypervisor); + String errMsg = String.format("Failed to add %s to store ID: %d, zone ID: %d", templateVO, storeId, zoneId); LOGGER.error(errMsg, e); - updateTemplateTablesOnFailure(templateVO.getId()); cleanupStore(templateVO.getId(), filePath); throw new CloudRuntimeException(errMsg, e); } } - public void registerTemplateForNonExistingEntries(Hypervisor.HypervisorType hypervisor, CPU.CPUArch arch, - String name, Pair storeUrlAndId, String filePath) { + /** + * Registers a new system VM Template for the given hypervisor/arch when no existing template is present. + * + * @param name the name of the new template + * @param templateDetails the metadata details of the template to be registered + * @param zoneId the zone id for which the new template should be seeded + * @param storeId the store id on which the new template will be seeded + * @param filePath temporary mount path for the store + * @throws CloudRuntimeException on failure; the method attempts rollback/cleanup + */ + protected void registerNewTemplate(String name, MetadataTemplateDetails templateDetails, long zoneId, Long storeId, + String filePath) { Long templateId = null; + Hypervisor.HypervisorType hypervisor = templateDetails.getHypervisorType(); try { - MetadataTemplateDetails templateDetails = getMetadataTemplateDetails(hypervisor, arch); - templateId = performTemplateRegistrationOperations(hypervisor, name, - templateDetails.getArch(), templateDetails.getUrl(), - templateDetails.getChecksum(), hypervisorImageFormat.get(hypervisor), - hypervisorGuestOsMap.get(hypervisor), storeUrlAndId.second(), null, filePath, null); - Map configParams = new HashMap<>(); - configParams.put(RouterTemplateConfigurationNames.get(hypervisor), templateDetails.getName()); - configParams.put("minreq.sysvmtemplate.version", getSystemVmTemplateVersion()); - updateConfigurationParams(configParams); + templateId = performTemplateRegistrationOperations(name, templateDetails, templateDetails.getUrl(), + templateDetails.getChecksum(), HYPERVISOR_IMAGE_FORMAT_MAP.get(hypervisor), + hypervisorGuestOsMap.get(hypervisor), storeId, null, filePath, null); + updateConfigurationParams(hypervisor, name, zoneId); updateSystemVMEntries(templateId, hypervisor); } catch (Exception e) { - String errMsg = String.format("Failed to register template for hypervisor: %s", hypervisor); + String errMsg = String.format("Failed to register Template for hypervisor: %s", hypervisor); LOGGER.error(errMsg, e); if (templateId != null) { - updateTemplateTablesOnFailure(templateId); + updateTemplateEntriesOnFailure(templateId); cleanupStore(templateId, filePath); } throw new CloudRuntimeException(errMsg, e); } } - protected void validateTemplateFileForHypervisorAndArch(Hypervisor.HypervisorType hypervisor, CPU.CPUArch arch) { + /** + * Validate presence and integrity of metadata and local template file for the given hypervisor/arch. + * + * @param hypervisor target hypervisor type + * @param arch target CPU architecture + * @return validated MetadataTemplateDetails + * @throws CloudRuntimeException if template is not available, missing, or checksum validation fails + */ + protected MetadataTemplateDetails getValidatedTemplateDetailsForHypervisorAndArch( + Hypervisor.HypervisorType hypervisor, CPU.CPUArch arch) { + if (!AVAILABLE_SYSTEM_TEMPLATES_HYPERVISOR_ARCH_LIST.contains(new Pair<>(hypervisor, arch))) { + throw new CloudRuntimeException("No system VM Template available for the given hypervisor and arch"); + } MetadataTemplateDetails templateDetails = getMetadataTemplateDetails(hypervisor, arch); + if (templateDetails == null) { + throw new CloudRuntimeException("No template details found for the given hypervisor and arch"); + } File templateFile = getTemplateFile(templateDetails); if (templateFile == null) { throw new CloudRuntimeException("Failed to find local template file"); } - if (isTemplateFileChecksumDifferent(templateDetails, templateFile)) { + if (templateDetails.isFileChecksumDifferent(templateFile)) { throw new CloudRuntimeException("Checksum failed for local template file"); } - } - - public void validateAndRegisterTemplate(Hypervisor.HypervisorType hypervisor, String name, Long storeId, - VMTemplateVO templateVO, TemplateDataStoreVO templateDataStoreVO, String filePath) { - validateTemplateFileForHypervisorAndArch(hypervisor, templateVO.getArch()); - registerTemplate(hypervisor, name, storeId, templateVO, templateDataStoreVO, filePath); - } - - public void validateAndRegisterTemplateForNonExistingEntries(Hypervisor.HypervisorType hypervisor, - CPU.CPUArch arch, String name, Pair storeUrlAndId, String filePath) { - validateTemplateFileForHypervisorAndArch(hypervisor, arch); - registerTemplateForNonExistingEntries(hypervisor, arch, name, storeUrlAndId, filePath); - } - - protected static String getMetadataFilePath() { - return METADATA_FILE; + return templateDetails; } /** - * This method parses the metadata file consisting of the systemVM templates information - * @return the version of the systemvm template that is to be used. This is done in order - * to fallback on the latest available version of the systemVM template when there doesn't - * exist a template corresponding to the current code version. + * Return the local template file. Downloads it if not present locally and url is present. + * + * @param templateDetails template metadata; may set `downloadedFilePath` + * @return the template {@code File} on disk, or {@code null} if not found/downloaded */ - public static String parseMetadataFile() { - String metadataFilePath = getMetadataFilePath(); - String errMsg = String.format("Failed to parse systemVM template metadata file: %s", metadataFilePath); - final Ini ini = new Ini(); - try (FileReader reader = new FileReader(metadataFilePath)) { - ini.load(reader); - } catch (IOException e) { - LOGGER.error(errMsg, e); - throw new CloudRuntimeException(errMsg, e); - } - if (!ini.containsKey("default")) { - errMsg = String.format("%s as unable to default section", errMsg); - LOGGER.error(errMsg); - throw new CloudRuntimeException(errMsg); - } - for (Pair hypervisorType : hypervisorList) { - String key = getHypervisorArchKey(hypervisorType.first(), hypervisorType.second()); - Ini.Section section = ini.get(key); - if (section == null) { - LOGGER.error("Failed to find details for {} in template metadata file: {}", - key, metadataFilePath); - continue; - } - NewTemplateMap.put(key, new MetadataTemplateDetails( - hypervisorType.first(), - section.get("templatename"), - section.get("filename"), - section.get("downloadurl"), - section.get("checksum"), - hypervisorType.second(), - section.get("guestos"))); - } - Ini.Section defaultSection = ini.get("default"); - return defaultSection.get("version").trim(); - } - - - private static void cleanupStore(Long templateId, String filePath) { - String destTempFolder = filePath + PARTIAL_TEMPLATE_FOLDER + String.valueOf(templateId); - try { - Files.deleteIfExists(Paths.get(destTempFolder)); - } catch (IOException e) { - LOGGER.error(String.format("Failed to cleanup mounted store at: %s", filePath), e); - } - } - protected File getTemplateFile(MetadataTemplateDetails templateDetails) { File templateFile = new File(templateDetails.getDefaultFilePath()); if (templateFile.exists()) { return templateFile; } LOGGER.debug("{} is not present", templateFile.getAbsolutePath()); - if (DOWNLOADABLE_TEMPLATE_ARCH_TYPES.contains(templateDetails.getArch()) && - StringUtils.isNotBlank(templateDetails.getUrl())) { + if (StringUtils.isNotBlank(templateDetails.getUrl())) { LOGGER.debug("Downloading the template file {} for {}", templateDetails.getUrl(), templateDetails.getHypervisorArchLog()); Path path = Path.of(TEMPLATES_PATH); if (!Files.isWritable(path)) { - templateFile = new File(tempDownloadDir, templateDetails.getFilename()); + templateFile = new File(getTempDownloadDir(), templateDetails.getFilename()); } if (!templateFile.exists() && !HttpUtils.downloadFileWithProgress(templateDetails.getUrl(), templateFile.getAbsolutePath(), LOGGER)) { + LOGGER.error("Failed to download template for {} using url: {}", + templateDetails.getHypervisorArchLog(), templateDetails.getUrl()); return null; } templateDetails.setDownloadedFilePath(templateFile.getAbsolutePath()); @@ -875,47 +930,53 @@ protected File getTemplateFile(MetadataTemplateDetails templateDetails) { return templateFile; } - protected boolean isTemplateFileChecksumDifferent(MetadataTemplateDetails templateDetails, File templateFile) { - String templateChecksum = DigestHelper.calculateChecksum(templateFile); - if (!templateChecksum.equals(templateDetails.getChecksum())) { - LOGGER.error("Checksum {} for file {} does not match checksum {} from metadata", - templateChecksum, templateFile, templateDetails.getChecksum()); - return true; - } - return false; - } - - protected void validateTemplates(List> hypervisorsArchInUse) { + /** + * Validate that templates for the provided hypervisor/architecture pairs which are in use and are valid. + * + * If a template is missing or validation fails for any required pair, a + * {@link CloudRuntimeException} is thrown to abort the upgrade. If system VM Template for a hypervisor/arch is + * not considered available then validation is skipped for that pair. + * + * @param hypervisorArchList list of hypervisor/architecture pairs to validate + */ + protected void validateTemplates(List> hypervisorArchList) { boolean templatesFound = true; - for (Pair hypervisorArch : hypervisorsArchInUse) { - MetadataTemplateDetails matchedTemplate = getMetadataTemplateDetails(hypervisorArch.first(), - hypervisorArch.second()); - if (matchedTemplate == null) { - templatesFound = false; - break; - } - File tempFile = getTemplateFile(matchedTemplate); - if (tempFile == null) { - LOGGER.warn("Failed to download template for {}, moving ahead", - matchedTemplate.getHypervisorArchLog()); + for (Pair hypervisorArch : hypervisorArchList) { + if (!AVAILABLE_SYSTEM_TEMPLATES_HYPERVISOR_ARCH_LIST.contains(hypervisorArch)) { + LOGGER.info("No system VM Template available for {}. Skipping validation.", + getHypervisorArchLog(hypervisorArch.first(), hypervisorArch.second())); continue; } - if (isTemplateFileChecksumDifferent(matchedTemplate, tempFile)) { + try { + getValidatedTemplateDetailsForHypervisorAndArch(hypervisorArch.first(), hypervisorArch.second()); + } catch (CloudRuntimeException e) { + LOGGER.error("Validation failed for {}: {}", + getHypervisorArchLog(hypervisorArch.first(), hypervisorArch.second()), e.getMessage()); templatesFound = false; break; } } if (!templatesFound) { - String errMsg = "SystemVm template not found. Cannot upgrade system Vms"; + String errMsg = "SystemVM Template not found. Cannot upgrade system VMs"; LOGGER.error(errMsg); throw new CloudRuntimeException(errMsg); } } - protected void registerTemplatesForZone(long zoneId, String filePath) { + /** + * Register or ensure system VM Templates are present on the NFS store for a given zone. + * + * Mounts the zone image store, enumerates hypervisors and architectures in the zone, + * and for each template either adds an existing template to the store or registers + * a new template as required. + * + * @param zoneId the zone id + * @param storeMountPath temporary mount path for the store + */ + protected void registerTemplatesForZone(long zoneId, String storeMountPath) { Pair storeUrlAndId = getNfsStoreInZone(zoneId); String nfsVersion = getNfsVersion(storeUrlAndId.second()); - mountStore(storeUrlAndId.first(), filePath, nfsVersion); + mountStore(storeUrlAndId.first(), storeMountPath, nfsVersion); List> hypervisorArchList = clusterDao.listDistinctHypervisorsAndArchExcludingExternalType(zoneId); for (Pair hypervisorArch : hypervisorArchList) { @@ -925,7 +986,8 @@ protected void registerTemplatesForZone(long zoneId, String filePath) { if (templateDetails == null) { continue; } - VMTemplateVO templateVO = getRegisteredTemplate(templateDetails.getName(), templateDetails.getArch()); + VMTemplateVO templateVO = getRegisteredTemplate(templateDetails.getName(), + templateDetails.getHypervisorType(), templateDetails.getArch(), templateDetails.getUrl()); if (templateVO != null) { TemplateDataStoreVO templateDataStoreVO = templateDataStoreDao.findByStoreTemplate(storeUrlAndId.second(), templateVO.getId()); @@ -935,22 +997,22 @@ protected void registerTemplatesForZone(long zoneId, String filePath) { continue; } } - registerTemplate(hypervisorType, templateDetails.getName(), storeUrlAndId.second(), templateVO, - templateDataStoreVO, filePath); - updateRegisteredTemplateDetails(templateVO.getId(), templateDetails); + addExistingTemplateToStore(templateVO, templateDetails, templateDataStoreVO, zoneId, + storeUrlAndId.second(), storeMountPath); + updateRegisteredTemplateDetails(templateVO.getId(), templateDetails, zoneId); continue; } - registerTemplateForNonExistingEntries(hypervisorType, templateDetails.getArch(), templateDetails.getName(), - storeUrlAndId, filePath); + registerNewTemplate(templateDetails.getName(), templateDetails, zoneId, storeUrlAndId.second(), + storeMountPath); } } - public void registerTemplates(List> hypervisorsArchInUse) { + protected void registerTemplates(List> hypervisorsArchInUse) { GlobalLock lock = GlobalLock.getInternLock("UpgradeDatabase-Lock"); try { - LOGGER.info("Grabbing lock to register templates."); + LOGGER.info("Grabbing lock to register Templates."); if (!lock.lock(LOCK_WAIT_TIMEOUT)) { - throw new CloudRuntimeException("Unable to acquire lock to register SystemVM template."); + throw new CloudRuntimeException("Unable to acquire lock to register system VM Template."); } try { validateTemplates(hypervisorsArchInUse); @@ -970,13 +1032,13 @@ public void doInTransactionWithoutResult(final TransactionStatus status) { unmountStore(filePath); } catch (Exception e) { unmountStore(filePath); - throw new CloudRuntimeException("Failed to register systemVM template. Upgrade Failed"); + throw new CloudRuntimeException("Failed to register system VM Template. Upgrade Failed"); } } } }); } catch (Exception e) { - throw new CloudRuntimeException("Failed to register systemVM template. Upgrade Failed"); + throw new CloudRuntimeException("Failed to register system VM Template. Upgrade Failed"); } } finally { lock.unlock(); @@ -984,7 +1046,18 @@ public void doInTransactionWithoutResult(final TransactionStatus status) { } } - private void updateRegisteredTemplateDetails(Long templateId, MetadataTemplateDetails templateDetails) { + /** + * Update the DB record for an existing template to mark it as a system template, + * set the guest OS (if resolvable), and propagate the change to system VM entries + * and related configuration for the template's hypervisor. + * + * @param templateId id of the template to update + * @param templateDetails metadata used to update the template record + * @param zoneId zone id whose per-zone details (if any) should be cleared; may be null + * @throws CloudRuntimeException if updating the template record fails + */ + protected void updateRegisteredTemplateDetails(Long templateId, MetadataTemplateDetails templateDetails, + Long zoneId) { VMTemplateVO templateVO = vmTemplateDao.findById(templateId); templateVO.setTemplateType(Storage.TemplateType.SYSTEM); GuestOSVO guestOS = guestOSDao.findOneByDisplayName(templateDetails.getGuestOs()); @@ -993,20 +1066,18 @@ private void updateRegisteredTemplateDetails(Long templateId, MetadataTemplateDe } boolean updated = vmTemplateDao.update(templateVO.getId(), templateVO); if (!updated) { - String errMsg = String.format("updateSystemVmTemplates:Exception while updating template with id %s to be marked as 'system'", templateId); + String errMsg = String.format("Exception while updating template with id %s to be marked as 'system'", + templateId); LOGGER.error(errMsg); throw new CloudRuntimeException(errMsg); } Hypervisor.HypervisorType hypervisorType = templateDetails.getHypervisorType(); updateSystemVMEntries(templateId, hypervisorType); - // Change value of global configuration parameter router.template.* for the corresponding hypervisor and minreq.sysvmtemplate.version for the ACS version - Map configParams = new HashMap<>(); - configParams.put(RouterTemplateConfigurationNames.get(hypervisorType), templateDetails.getName()); - configParams.put("minreq.sysvmtemplate.version", getSystemVmTemplateVersion()); - updateConfigurationParams(configParams); + updateConfigurationParams(hypervisorType, templateDetails.getName(), zoneId); } - private void updateTemplateUrlChecksumAndGuestOsId(VMTemplateVO templateVO, MetadataTemplateDetails templateDetails) { + protected void updateTemplateUrlChecksumAndGuestOsId(VMTemplateVO templateVO, + MetadataTemplateDetails templateDetails) { templateVO.setUrl(templateDetails.getUrl()); templateVO.setChecksum(templateDetails.getChecksum()); GuestOSVO guestOS = guestOSDao.findOneByDisplayName(templateDetails.getGuestOs()); @@ -1015,51 +1086,193 @@ private void updateTemplateUrlChecksumAndGuestOsId(VMTemplateVO templateVO, Meta } boolean updated = vmTemplateDao.update(templateVO.getId(), templateVO); if (!updated) { - String errMsg = String.format("updateSystemVmTemplates:Exception while updating 'url' and 'checksum' for hypervisor type %s", templateDetails.getHypervisorType()); + String errMsg = String.format("Exception while updating 'url' and 'checksum' for hypervisor type %s", + templateDetails.getHypervisorType()); LOGGER.error(errMsg); throw new CloudRuntimeException(errMsg); } } - protected boolean registerOrUpdateSystemVmTemplate(MetadataTemplateDetails templateDetails, - List> hypervisorsInUse) { - LOGGER.debug("Updating System VM template for {}", templateDetails.getHypervisorArchLog()); - VMTemplateVO registeredTemplate = getRegisteredTemplate(templateDetails.getName(), templateDetails.getArch()); - // change template type to SYSTEM + /** + * Updates or registers the system VM Template for the given hypervisor/arch if not already present. + * Returns true if a new template was registered. + * If there is an existing system VM Template for the given hypervisor/arch, its details are updated. + * If no existing template is found, new templates are registered for the valid hypervisor/arch which are in use. + */ + protected boolean updateOrRegisterSystemVmTemplate(MetadataTemplateDetails templateDetails, + List> hypervisorArchInUse) { + String systemVmTemplateLog = String.format("%s system VM Template for %s", getSystemVmTemplateVersion(), + templateDetails.getHypervisorArchLog()); + LOGGER.debug("Registering or updating {}", systemVmTemplateLog, + templateDetails.getHypervisorArchLog()); + VMTemplateVO registeredTemplate = getRegisteredTemplate(templateDetails.getName(), + templateDetails.getHypervisorType(), templateDetails.getArch(), templateDetails.getUrl()); if (registeredTemplate != null) { - updateRegisteredTemplateDetails(registeredTemplate.getId(), templateDetails); - } else { - boolean isHypervisorArchMatchMetadata = hypervisorsInUse.stream() - .anyMatch(p -> p.first().equals(templateDetails.getHypervisorType()) - && Objects.equals(p.second(), templateDetails.getArch())); - if (isHypervisorArchMatchMetadata) { - try { - registerTemplates(hypervisorsInUse); - return true; - } catch (final Exception e) { - throw new CloudRuntimeException(String.format("Failed to register %s templates for hypervisors: [%s]. " + - "Cannot upgrade system VMs", - getSystemVmTemplateVersion(), - StringUtils.join(hypervisorsInUse.stream() - .map(x -> getHypervisorArchKey(x.first(), x.second())) - .collect(Collectors.toList()), ",")), e); - } - } else { - LOGGER.warn("Cannot upgrade {} system VM template for {} as it is not used, not failing upgrade", - getSystemVmTemplateVersion(), templateDetails.getHypervisorArchLog()); - VMTemplateVO templateVO = vmTemplateDao.findLatestTemplateByTypeAndHypervisorAndArch( - templateDetails.getHypervisorType(), templateDetails.getArch(), Storage.TemplateType.SYSTEM); - if (templateVO != null) { - updateTemplateUrlChecksumAndGuestOsId(templateVO, templateDetails); - } + LOGGER.info("{} is already registered, updating details for: {}", + systemVmTemplateLog, templateDetails.getHypervisorArchLog(), registeredTemplate); + updateRegisteredTemplateDetails(registeredTemplate.getId(), templateDetails, null); + return false; + } + boolean isHypervisorArchMatchMetadata = hypervisorArchInUse.stream() + .anyMatch(p -> p.first().equals(templateDetails.getHypervisorType()) + && Objects.equals(p.second(), templateDetails.getArch())); + if (!isHypervisorArchMatchMetadata) { + LOGGER.warn("Skipping upgrading {} as it is not used, not failing upgrade", + getSystemVmTemplateVersion(), templateDetails.getHypervisorArchLog()); + VMTemplateVO templateVO = vmTemplateDao.findLatestTemplateByTypeAndHypervisorAndArch( + templateDetails.getHypervisorType(), templateDetails.getArch(), Storage.TemplateType.SYSTEM); + if (templateVO != null) { + updateTemplateUrlChecksumAndGuestOsId(templateVO, templateDetails); + } + return false; + } + try { + registerTemplates(hypervisorArchInUse); + return true; + } catch (final Exception e) { + throw new CloudRuntimeException(String.format("Failed to register %s templates for hypervisors: [%s]. " + + "Cannot upgrade system VMs", + getSystemVmTemplateVersion(), + StringUtils.join(hypervisorArchInUse.stream() + .map(x -> String.format("%s-%s", x.first().name(), x.second().name())) + .collect(Collectors.toList()), ",")), e); + } + } + + /** + * Return NFS version for the store: store-specific config if present + * or global config if absent. Returns null if not set. + */ + protected String getNfsVersion(long storeId) { + final String configKey = "secstorage.nfs.version"; + final Map storeDetails = imageStoreDetailsDao.getDetails(storeId); + if (storeDetails != null && storeDetails.containsKey(configKey)) { + return storeDetails.get(configKey); + } + ConfigurationVO globalNfsVersion = configurationDao.findByName(configKey); + if (globalNfsVersion != null) { + return globalNfsVersion.getValue(); + } + return null; + } + + /** + * Validate metadata for the given template's hypervisor/arch and add the existing template + * to the specified secondary store. On success, database entries are created/updated. + * + * @param templateVO template to add + * @param templateDataStoreVO existing template-store mapping; may be null + * @param zoneId zone id where the operation is performed + * @param storeId target image store id + * @param filePath temporary mount path for the store + * @throws CloudRuntimeException on failure; the method attempts rollback/cleanup + */ + public void validateAndAddTemplateToStore(VMTemplateVO templateVO, TemplateDataStoreVO templateDataStoreVO, + long zoneId, long storeId, String filePath) { + MetadataTemplateDetails templateDetails = getValidatedTemplateDetailsForHypervisorAndArch( + templateVO.getHypervisorType(), templateVO.getArch()); + addExistingTemplateToStore(templateVO, templateDetails, templateDataStoreVO, zoneId, storeId, filePath); + } + + /** + * Validate metadata for the given hypervisor/arch and register a new system VM Template + * on the specified store and zone. Creates DB entries and seeds the template on the store. + * + * @param hypervisor hypervisor type + * @param arch cpu architecture + * @param name template name to register + * @param zoneId zone id where the operation is performed + * @param storeId target image store id + * @param filePath temporary mount path for the store + * @throws CloudRuntimeException on failure; the method attempts rollback/cleanup + */ + public void validateAndRegisterNewTemplate(Hypervisor.HypervisorType hypervisor, CPU.CPUArch arch, String name, + long zoneId, long storeId, String filePath) { + MetadataTemplateDetails templateDetails = getValidatedTemplateDetailsForHypervisorAndArch(hypervisor, arch); + registerNewTemplate(name, templateDetails, zoneId, storeId, filePath); + } + + /** + * Check whether the template at the given `path` on NFS `url` is already seeded. + * If found, updates DB with sizes and returns true; otherwise returns false. + * + * @throws CloudRuntimeException on any error + */ + public boolean validateIfSeeded(TemplateDataStoreVO templDataStoreVO, String url, String path, String nfsVersion) { + String filePath = null; + try { + filePath = Files.createTempDirectory(TEMPORARY_SECONDARY_STORE).toString(); + if (filePath == null) { + throw new CloudRuntimeException("Failed to create temporary directory to mount secondary store"); + } + mountStore(url, filePath, nfsVersion); + int lastIdx = path.lastIndexOf(File.separator); + String partialDirPath = path.substring(0, lastIdx); + String templatePath = filePath + File.separator + partialDirPath; + File templateProps = new File(templatePath + "/template.properties"); + if (templateProps.exists()) { + Pair templateSizes = readTemplatePropertiesSizes(templatePath + "/template.properties"); + updateSeededTemplateDetails(templDataStoreVO.getTemplateId(), templDataStoreVO.getDataStoreId(), + templateSizes.first(), templateSizes.second()); + LOGGER.info("System VM template already seeded, skipping registration"); + return true; + } + LOGGER.info("System VM template not seeded"); + return false; + } catch (Exception e) { + LOGGER.error("Failed to verify if the template is seeded", e); + throw new CloudRuntimeException("Failed to verify if the template is seeded", e); + } finally { + unmountStore(filePath); + try { + Files.delete(Path.of(filePath)); + } catch (IOException e) { + LOGGER.error("Failed to delete temporary directory: {}", filePath); } } - return false; } + /** + * Finds a registered system VM Template matching the provided criteria. + * + *

The method first attempts to locate the latest template by {@code templateName}, + * {@code hypervisorType} and {@code arch}. If none is found and a non-blank {@code url} + * is provided, it falls back to searching for an active system template by the + * URL path segment (the substring after the last '/' in the URL).

+ * + * @param templateName the template name to search for + * @param hypervisorType the hypervisor type + * @param arch the CPU architecture + * @param url optional download URL used as a fallback; may be {@code null} or blank + * @return the matching {@code VMTemplateVO} if found; {@code null} otherwise + */ + public VMTemplateVO getRegisteredTemplate(String templateName, Hypervisor.HypervisorType hypervisorType, + CPU.CPUArch arch, String url) { + VMTemplateVO registeredTemplate = vmTemplateDao.findLatestTemplateByName(templateName, hypervisorType, arch); + if (registeredTemplate == null && StringUtils.isNotBlank(url)) { + String urlPath = url.substring(url.lastIndexOf("/") + 1); + LOGGER.debug("No template found by name, falling back to search existing SYSTEM template by " + + "urlPath: {}, hypervisor: {}, arch:{}", urlPath, hypervisorType, arch); + registeredTemplate = vmTemplateDao.findActiveSystemTemplateByHypervisorArchAndUrlPath(hypervisorType, arch, + urlPath); + } + LOGGER.debug("Found existing registered template for hypervisor: {}, arch: {}: {}", hypervisorType, + arch, registeredTemplate); + return registeredTemplate; + } + + /** + * Update or register system VM Templates based on metadata. + * + * Runs the registration logic inside a database transaction: obtains the + * set of hypervisors/architectures in use, iterates over metadata entries + * and attempts to register or update each template. + * + * @param conn retained for compatibility with callers (not used directly) + */ public void updateSystemVmTemplates(final Connection conn) { - LOGGER.debug("Updating System Vm template IDs"); - updateSystemVmTemplateGuestOsId(); + LOGGER.debug("Updating System VM templates"); + updateHypervisorGuestOsMap(); Transaction.execute(new TransactionCallbackNoReturn() { @Override public void doInTransactionWithoutResult(final TransactionStatus status) { @@ -1069,36 +1282,22 @@ public void doInTransactionWithoutResult(final TransactionStatus status) { } catch (final Exception e) { throw new CloudRuntimeException("Exception while getting hypervisor types from clusters", e); } - Collection templateEntries = NewTemplateMap.values(); - for (MetadataTemplateDetails templateDetails : templateEntries) { + for (MetadataTemplateDetails templateDetails : METADATA_TEMPLATE_LIST) { try { - if (registerOrUpdateSystemVmTemplate(templateDetails, hypervisorsInUse)) { + if (updateOrRegisterSystemVmTemplate(templateDetails, hypervisorsInUse)) { break; } } catch (final Exception e) { - String errMsg = "Exception while registering/updating system VM templates for hypervisors in metadata"; + String errMsg = "Exception while registering/updating system VM Templates for hypervisors in metadata"; LOGGER.error(errMsg, e); throw new CloudRuntimeException(errMsg, e); } } - LOGGER.debug("Updating System Vm Template IDs Complete"); + LOGGER.debug("Updating System VM Templates Complete"); } }); } - public String getNfsVersion(long storeId) { - final String configKey = "secstorage.nfs.version"; - final Map storeDetails = imageStoreDetailsDao.getDetails(storeId); - if (storeDetails != null && storeDetails.containsKey(configKey)) { - return storeDetails.get(configKey); - } - ConfigurationVO globalNfsVersion = configurationDao.findByName(configKey); - if (globalNfsVersion != null) { - return globalNfsVersion.getValue(); - } - return null; - } - protected static class MetadataTemplateDetails { private final Hypervisor.HypervisorType hypervisorType; private final String name; @@ -1160,6 +1359,16 @@ public String getDefaultFilePath() { return TEMPLATES_PATH + filename; } + public boolean isFileChecksumDifferent(File file) { + String fileChecksum = DigestHelper.calculateChecksum(file); + if (!fileChecksum.equals(getChecksum())) { + LOGGER.error("Checksum {} for file {} does not match checksum {} from metadata", + fileChecksum, file, getChecksum()); + return true; + } + return false; + } + public String getHypervisorArchLog() { return SystemVmTemplateRegistration.getHypervisorArchLog(hypervisorType, arch); } diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade218to22.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade218to22.java index 171357578ee9..a73c458c948a 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade218to22.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade218to22.java @@ -140,7 +140,7 @@ protected void upgradeInstanceGroups(Connection conn) { } } catch (SQLException e) { - throw new CloudRuntimeException("Can't update instance groups ", e); + throw new CloudRuntimeException("Can't update Instance groups ", e); } } @@ -464,7 +464,7 @@ protected void upgradeUserVms(Connection conn, long domainRouterId, long network vm[4] = rs.getString(5); // vm state vms.add(vm); } - logger.debug("Upgrading " + vms.size() + " vms for router " + domainRouterId); + logger.debug("Upgrading " + vms.size() + " Instances for router " + domainRouterId); for (Object[] vm : vms) { String state = (String)vm[4]; @@ -1218,7 +1218,7 @@ private void updateUserStats(Connection conn) { } } } else { - logger.debug("Account id=" + accountId + " doesn't own any user vms and domRs, so skipping user_statistics update"); + logger.debug("Account id=" + accountId + " doesn't own any user Instances and domRs, so skipping user_statistics update"); continue; } } diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade2214to30.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade2214to30.java index 524b6a34893b..d4cdbcb9707d 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade2214to30.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade2214to30.java @@ -77,8 +77,6 @@ public void performDataMigration(Connection conn) { encryptData(conn); // drop keys dropKeysIfExist(conn); - //update template ID for system Vms - //updateSystemVms(conn); This is not required as system template update is handled during 4.2 upgrade // update domain network ref updateDomainNetworkRef(conn); // update networks that use redundant routers to the new network offering diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade222to224.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade222to224.java index b891b02ea572..5cb7d4287956 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade222to224.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade222to224.java @@ -153,7 +153,7 @@ private void updateGuestOsType(Connection conn) { } } catch (SQLException e) { - throw new CloudRuntimeException("Unable to update the guest os type for default template as a part of 222 to 224 upgrade", e); + throw new CloudRuntimeException("Unable to update the guest os type for default Template as a part of 222 to 224 upgrade", e); } } diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade302to40.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade302to40.java index aa427252585f..bd8ddaa7c498 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade302to40.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade302to40.java @@ -62,7 +62,6 @@ public InputStream[] getPrepareScripts() { @Override public void performDataMigration(Connection conn) { - //updateVmWareSystemVms(conn); This is not required as system template update is handled during 4.2 upgrade correctVRProviders(conn); correctMultiplePhysicaNetworkSetups(conn); addHostDetailsUniqueKey(conn); diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade304to305.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade304to305.java index bb4c73f67b68..38dc90b460dd 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade304to305.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade304to305.java @@ -65,7 +65,6 @@ public void performDataMigration(Connection conn) { addVpcProvider(conn); updateRouterNetworkRef(conn); fixZoneUsingExternalDevices(conn); -// updateSystemVms(conn); fixForeignKeys(conn); encryptClusterDetails(conn); } @@ -81,57 +80,9 @@ public InputStream[] getCleanupScripts() { return new InputStream[] {script}; } - private void updateSystemVms(Connection conn) { - PreparedStatement pstmt = null; - ResultSet rs = null; - boolean VMware = false; - try { - pstmt = conn.prepareStatement("select distinct(hypervisor_type) from `cloud`.`cluster` where removed is null"); - rs = pstmt.executeQuery(); - while (rs.next()) { - if ("VMware".equals(rs.getString(1))) { - VMware = true; - } - } - } catch (SQLException e) { - throw new CloudRuntimeException("Error while iterating through list of hypervisors in use", e); - } - // Just update the VMware system template. Other hypervisor templates are unchanged from previous 3.0.x versions. - logger.debug("Updating VMware System Vms"); - try { - //Get 3.0.5 VMware system Vm template Id - pstmt = conn.prepareStatement("select id from `cloud`.`vm_template` where name = 'systemvm-vmware-3.0.5' and removed is null"); - rs = pstmt.executeQuery(); - if (rs.next()) { - long templateId = rs.getLong(1); - rs.close(); - pstmt.close(); - // change template type to SYSTEM - pstmt = conn.prepareStatement("update `cloud`.`vm_template` set type='SYSTEM' where id = ?"); - pstmt.setLong(1, templateId); - pstmt.executeUpdate(); - pstmt.close(); - // update template ID of system Vms - pstmt = conn.prepareStatement("update `cloud`.`vm_instance` set vm_template_id = ? where type <> 'User' and hypervisor_type = 'VMware'"); - pstmt.setLong(1, templateId); - pstmt.executeUpdate(); - pstmt.close(); - } else { - if (VMware) { - throw new CloudRuntimeException("3.0.5 VMware SystemVm template not found. Cannot upgrade system Vms"); - } else { - logger.warn("3.0.5 VMware SystemVm template not found. VMware hypervisor is not used, so not failing upgrade"); - } - } - } catch (SQLException e) { - throw new CloudRuntimeException("Error while updating VMware systemVm template", e); - } - logger.debug("Updating System Vm Template IDs Complete"); - } - private void addVpcProvider(Connection conn) { //Encrypt config params and change category to Hidden - logger.debug("Adding vpc provider to all physical networks in the system"); + logger.debug("Adding VPC provider to all physical Networks in the system"); PreparedStatement pstmt = null; ResultSet rs = null; try { diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade410to420.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade410to420.java index b78aed3119a4..a78f93fbdd4f 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade410to420.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade410to420.java @@ -665,25 +665,25 @@ private void upgradeVmwareLabels(Connection conn) { newLabel = getNewLabel(rsLabel, trafficTypeVswitchParamValue); try(PreparedStatement update_pstmt = conn.prepareStatement("update physical_network_traffic_types set vmware_network_label = ? where traffic_type = ? and vmware_network_label is not NULL;");) { - logger.debug("Updating vmware label for " + trafficType + " traffic. Update SQL statement is " + pstmt); + logger.debug("Updating VMware label for " + trafficType + " traffic. Update SQL statement is " + pstmt); pstmt.setString(1, newLabel); pstmt.setString(2, trafficType); update_pstmt.executeUpdate(); }catch (SQLException e) { - throw new CloudRuntimeException("Unable to set vmware traffic labels ", e); + throw new CloudRuntimeException("Unable to set VMware traffic labels ", e); } }catch (SQLException e) { - throw new CloudRuntimeException("Unable to set vmware traffic labels ", e); + throw new CloudRuntimeException("Unable to set VMware traffic labels ", e); } }catch (SQLException e) { - throw new CloudRuntimeException("Unable to set vmware traffic labels ", e); + throw new CloudRuntimeException("Unable to set VMware traffic labels ", e); } } }catch (SQLException e) { - throw new CloudRuntimeException("Unable to set vmware traffic labels ", e); + throw new CloudRuntimeException("Unable to set VMware traffic labels ", e); } } catch (SQLException e) { - throw new CloudRuntimeException("Unable to set vmware traffic labels ", e); + throw new CloudRuntimeException("Unable to set VMware traffic labels ", e); } } @@ -1195,9 +1195,9 @@ private void updateGlobalDeploymentPlanner(Connection conn) { plannerName = "FirstFitPlanner"; } else if (globalValue.equals(DeploymentPlanner.AllocationAlgorithm.firstfit.toString())) { plannerName = "FirstFitPlanner"; - } else if (globalValue.equals(DeploymentPlanner.AllocationAlgorithm.userconcentratedpod_firstfit.toString())) { + } else if (globalValue.equals("userconcentratedpod_firstfit")) { plannerName = "UserConcentratedPodPlanner"; - } else if (globalValue.equals(DeploymentPlanner.AllocationAlgorithm.userconcentratedpod_random.toString())) { + } else if (globalValue.equals("userconcentratedpod_random")) { plannerName = "UserConcentratedPodPlanner"; } else if (globalValue.equals(DeploymentPlanner.AllocationAlgorithm.userdispersing.toString())) { plannerName = "UserDispersingPlanner"; diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41500to41510.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41500to41510.java index a6b77813fa15..c7295414326d 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41500to41510.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41500to41510.java @@ -74,7 +74,7 @@ public void performDataMigration(Connection conn) { @Override @SuppressWarnings("serial") public void updateSystemVmTemplates(final Connection conn) { - logger.debug("Updating System Vm template IDs"); + logger.debug("Updating System VM Template IDs"); final Set hypervisorsListInUse = new HashSet(); try (PreparedStatement pstmt = conn.prepareStatement("select distinct(hypervisor_type) from `cloud`.`cluster` where removed is null"); ResultSet rs = pstmt.executeQuery()) { while (rs.next()) { @@ -153,8 +153,8 @@ public void updateSystemVmTemplates(final Connection conn) { templateId = rs.getLong(1); } } catch (final SQLException e) { - logger.error("updateSystemVmTemplates: Exception caught while getting ids of templates: " + e.getMessage()); - throw new CloudRuntimeException("updateSystemVmTemplates: Exception caught while getting ids of templates", e); + logger.error("updateSystemVmTemplates: Exception caught while getting IDs of Templates: " + e.getMessage()); + throw new CloudRuntimeException("updateSystemVmTemplates: Exception caught while getting IDs of Templates", e); } // change template type to SYSTEM @@ -163,8 +163,8 @@ public void updateSystemVmTemplates(final Connection conn) { templ_type_pstmt.setLong(1, templateId); templ_type_pstmt.executeUpdate(); } catch (final SQLException e) { - logger.error("updateSystemVmTemplates:Exception while updating template with id " + templateId + " to be marked as 'system': " + e.getMessage()); - throw new CloudRuntimeException("updateSystemVmTemplates:Exception while updating template with id " + templateId + " to be marked as 'system'", e); + logger.error("updateSystemVmTemplates:Exception while updating Template with ID: " + templateId + " to be marked as 'system': " + e.getMessage()); + throw new CloudRuntimeException("updateSystemVmTemplates:Exception while updating Template with ID: " + templateId + " to be marked as 'system'", e); } // update template ID of system Vms try (PreparedStatement update_templ_id_pstmt = conn @@ -173,9 +173,9 @@ public void updateSystemVmTemplates(final Connection conn) { update_templ_id_pstmt.setString(2, hypervisorAndTemplateName.getKey().toString()); update_templ_id_pstmt.executeUpdate(); } catch (final Exception e) { - logger.error("updateSystemVmTemplates:Exception while setting template for " + hypervisorAndTemplateName.getKey().toString() + " to " + templateId + logger.error("updateSystemVmTemplates:Exception while setting Template for " + hypervisorAndTemplateName.getKey().toString() + " to " + templateId + ": " + e.getMessage()); - throw new CloudRuntimeException("updateSystemVmTemplates:Exception while setting template for " + hypervisorAndTemplateName.getKey().toString() + " to " + throw new CloudRuntimeException("updateSystemVmTemplates:Exception while setting Template for " + hypervisorAndTemplateName.getKey().toString() + " to " + templateId, e); } @@ -225,8 +225,8 @@ public void updateSystemVmTemplates(final Connection conn) { } } } catch (final SQLException e) { - logger.error("updateSystemVmTemplates:Exception while getting ids of templates: " + e.getMessage()); - throw new CloudRuntimeException("updateSystemVmTemplates:Exception while getting ids of templates", e); + logger.error("updateSystemVmTemplates:Exception while getting IDs of Templates: " + e.getMessage()); + throw new CloudRuntimeException("updateSystemVmTemplates:Exception while getting IDs of Templates", e); } } logger.debug("Updating System Vm Template IDs Complete"); diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41520to41600.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41520to41600.java index 76227d434173..f13e0ffb1169 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41520to41600.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41520to41600.java @@ -94,7 +94,7 @@ private void checkAndPersistAnnotationPermissions(Connection conn, RoleType role } private void generateUuidForExistingSshKeyPairs(Connection conn) { - logger.debug("Generating uuid for existing ssh key-pairs"); + logger.debug("Generating UUID for existing SSH key-pairs"); try { PreparedStatement pstmt = conn.prepareStatement("SELECT id FROM `cloud`.`ssh_keypairs` WHERE uuid is null"); ResultSet rs = pstmt.executeQuery(); @@ -110,9 +110,9 @@ private void generateUuidForExistingSshKeyPairs(Connection conn) { if (!pstmt.isClosed()) { pstmt.close(); } - logger.debug("Successfully generated uuid for existing ssh key-pairs"); + logger.debug("Successfully generated UUID for existing SSH key-pairs"); } catch (SQLException e) { - String errMsg = "Exception while generating uuid for existing ssh key-pairs: " + e.getMessage(); + String errMsg = "Exception while generating UUID for existing SSh key-pairs: " + e.getMessage(); logger.error(errMsg, e); throw new CloudRuntimeException(errMsg, e); } @@ -125,7 +125,7 @@ private void initSystemVmTemplateRegistration() { @Override @SuppressWarnings("serial") public void updateSystemVmTemplates(final Connection conn) { - logger.debug("Updating System Vm template IDs"); + logger.debug("Updating System VM Template IDs"); initSystemVmTemplateRegistration(); try { systemVmTemplateRegistration.updateSystemVmTemplates(conn); diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41600to41610.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41600to41610.java index 3208b4ad8f97..07446a64a8c9 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41600to41610.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41600to41610.java @@ -75,12 +75,12 @@ private void initSystemVmTemplateRegistration() { @Override public void updateSystemVmTemplates(Connection conn) { - logger.debug("Updating System Vm template IDs"); + logger.debug("Updating System VM Template IDs"); initSystemVmTemplateRegistration(); try { systemVmTemplateRegistration.updateSystemVmTemplates(conn); } catch (Exception e) { - throw new CloudRuntimeException("Failed to find / register SystemVM template(s)"); + throw new CloudRuntimeException("Failed to find / register SystemVM Template(s)"); } } } diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41610to41700.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41610to41700.java index 0a0ab0b9f5a9..10404deac924 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41610to41700.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41610to41700.java @@ -80,12 +80,12 @@ private void initSystemVmTemplateRegistration() { @Override public void updateSystemVmTemplates(Connection conn) { - logger.debug("Updating System Vm template IDs"); + logger.debug("Updating System VM Template IDs"); initSystemVmTemplateRegistration(); try { systemVmTemplateRegistration.updateSystemVmTemplates(conn); } catch (Exception e) { - throw new CloudRuntimeException("Failed to find / register SystemVM template(s)"); + throw new CloudRuntimeException("Failed to find / register SystemVM Template(s)"); } } diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41700to41710.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41700to41710.java index 266401e0c31c..1f0d7c49a054 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41700to41710.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41700to41710.java @@ -90,12 +90,12 @@ private void initSystemVmTemplateRegistration() { @Override public void updateSystemVmTemplates(Connection conn) { - logger.debug("Updating System Vm template IDs"); + logger.debug("Updating System VM Template IDs"); initSystemVmTemplateRegistration(); try { systemVmTemplateRegistration.updateSystemVmTemplates(conn); } catch (Exception e) { - throw new CloudRuntimeException("Failed to find / register SystemVM template(s)"); + throw new CloudRuntimeException("Failed to find / register System VM Template(s)"); } } diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41710to41720.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41710to41720.java index 9854268c1ff1..2e17fa297c27 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41710to41720.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41710to41720.java @@ -62,12 +62,12 @@ private void initSystemVmTemplateRegistration() { @Override public void updateSystemVmTemplates(Connection conn) { - logger.debug("Updating System Vm template IDs"); + logger.debug("Updating System VM Template IDs"); initSystemVmTemplateRegistration(); try { systemVmTemplateRegistration.updateSystemVmTemplates(conn); } catch (Exception e) { - throw new CloudRuntimeException("Failed to find / register SystemVM template(s)"); + throw new CloudRuntimeException("Failed to find / register System VM Template(s)"); } } } diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41720to41800.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41720to41800.java index 6a90396deb0b..2f15b85af8e3 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41720to41800.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41720to41800.java @@ -99,12 +99,12 @@ private void initSystemVmTemplateRegistration() { @Override public void updateSystemVmTemplates(Connection conn) { - logger.debug("Updating System Vm template IDs"); + logger.debug("Updating System VM Template IDs"); initSystemVmTemplateRegistration(); try { systemVmTemplateRegistration.updateSystemVmTemplates(conn); } catch (Exception e) { - throw new CloudRuntimeException("Failed to find / register SystemVM template(s)"); + throw new CloudRuntimeException("Failed to find / register System VM Template(s)"); } } diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41810to41900.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41810to41900.java index e2b1ae1399b6..35e706595ec1 100644 --- a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41810to41900.java +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade41810to41900.java @@ -95,12 +95,12 @@ private void initSystemVmTemplateRegistration() { @Override public void updateSystemVmTemplates(Connection conn) { - logger.debug("Updating System Vm template IDs"); + logger.debug("Updating System VM Template IDs"); initSystemVmTemplateRegistration(); try { systemVmTemplateRegistration.updateSystemVmTemplates(conn); } catch (Exception e) { - throw new CloudRuntimeException("Failed to find / register SystemVM template(s)"); + throw new CloudRuntimeException("Failed to find / register System VM Template(s)"); } } @@ -159,7 +159,7 @@ private void modifyDateColumnNameAndCreateNewOne(Connection conn) { try (PreparedStatement pstmt = conn.prepareStatement(createNewColumn)) { pstmt.execute(); } catch (SQLException e) { - String message = String.format("Unable to crate new backups' column date due to [%s].", e.getMessage()); + String message = String.format("Unable to create new backups' column date due to [%s].", e.getMessage()); logger.error(message, e); throw new CloudRuntimeException(message, e); } diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42200to42210.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42200to42210.java new file mode 100644 index 000000000000..c9610f7b9ff5 --- /dev/null +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42200to42210.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 com.cloud.upgrade.dao; + +public class Upgrade42200to42210 extends DbUpgradeAbstractImpl implements DbUpgrade, DbUpgradeSystemVmTemplate { + + @Override + public String[] getUpgradableVersionRange() { + return new String[] {"4.22.0.0", "4.22.1.0"}; + } + + @Override + public String getUpgradedVersion() { + return "4.22.1.0"; + } +} diff --git a/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42210to42300.java b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42210to42300.java new file mode 100644 index 000000000000..df4743894c9d --- /dev/null +++ b/engine/schema/src/main/java/com/cloud/upgrade/dao/Upgrade42210to42300.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.upgrade.dao; + +import java.io.InputStream; + +import com.cloud.utils.exception.CloudRuntimeException; + +public class Upgrade42210to42300 extends DbUpgradeAbstractImpl implements DbUpgrade, DbUpgradeSystemVmTemplate { + + @Override + public String[] getUpgradableVersionRange() { + return new String[]{"4.22.1.0", "4.23.0.0"}; + } + + @Override + public String getUpgradedVersion() { + return "4.23.0.0"; + } + + @Override + public InputStream[] getPrepareScripts() { + final String scriptFile = "META-INF/db/schema-42210to42300.sql"; + final InputStream script = Thread.currentThread().getContextClassLoader().getResourceAsStream(scriptFile); + if (script == null) { + throw new CloudRuntimeException("Unable to find " + scriptFile); + } + + return new InputStream[] {script}; + } +} diff --git a/engine/schema/src/main/java/com/cloud/usage/UsageVolumeVO.java b/engine/schema/src/main/java/com/cloud/usage/UsageVolumeVO.java index 96abd2d69c08..6d5315e33464 100644 --- a/engine/schema/src/main/java/com/cloud/usage/UsageVolumeVO.java +++ b/engine/schema/src/main/java/com/cloud/usage/UsageVolumeVO.java @@ -59,6 +59,9 @@ public class UsageVolumeVO implements InternalIdentity { @Column(name = "size") private long size; + @Column(name = "vm_id") + private Long vmId; + @Column(name = "created") @Temporal(value = TemporalType.TIMESTAMP) private Date created = null; @@ -70,13 +73,14 @@ public class UsageVolumeVO implements InternalIdentity { protected UsageVolumeVO() { } - public UsageVolumeVO(long id, long zoneId, long accountId, long domainId, Long diskOfferingId, Long templateId, long size, Date created, Date deleted) { + public UsageVolumeVO(long id, long zoneId, long accountId, long domainId, Long diskOfferingId, Long templateId, Long vmId, long size, Date created, Date deleted) { this.volumeId = id; this.zoneId = zoneId; this.accountId = accountId; this.domainId = domainId; this.diskOfferingId = diskOfferingId; this.templateId = templateId; + this.vmId = vmId; this.size = size; this.created = created; this.deleted = deleted; @@ -126,4 +130,12 @@ public void setDeleted(Date deleted) { public long getVolumeId() { return volumeId; } + + public Long getVmId() { + return vmId; + } + + public void setVmId(Long vmId) { + this.vmId = vmId; + } } diff --git a/engine/schema/src/main/java/com/cloud/usage/dao/UsageDaoImpl.java b/engine/schema/src/main/java/com/cloud/usage/dao/UsageDaoImpl.java index fb925a285136..d863aacfd446 100644 --- a/engine/schema/src/main/java/com/cloud/usage/dao/UsageDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/usage/dao/UsageDaoImpl.java @@ -107,7 +107,7 @@ public void deleteRecordsForAccount(Long accountId) { txn.commit(); } catch (Exception ex) { txn.rollback(); - logger.error("error retrieving usage vm instances for account id: " + accountId, ex); + logger.error("Error retrieving usage Instances for Account ID: " + accountId, ex); } finally { txn.close(); } @@ -369,7 +369,7 @@ public List listPublicTemplatesByAccount(long accountId) { templateList.add(Long.valueOf(rs.getLong(1))); } } catch (Exception ex) { - logger.error("error listing public templates", ex); + logger.error("Error listing public Templates", ex); } return templateList; } diff --git a/engine/schema/src/main/java/com/cloud/usage/dao/UsageStorageDaoImpl.java b/engine/schema/src/main/java/com/cloud/usage/dao/UsageStorageDaoImpl.java index 1da533493997..f863cd1e3a35 100644 --- a/engine/schema/src/main/java/com/cloud/usage/dao/UsageStorageDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/usage/dao/UsageStorageDaoImpl.java @@ -57,6 +57,7 @@ public UsageStorageDaoImpl() { IdSearch.and("accountId", IdSearch.entity().getAccountId(), SearchCriteria.Op.EQ); IdSearch.and("id", IdSearch.entity().getEntityId(), SearchCriteria.Op.EQ); IdSearch.and("type", IdSearch.entity().getStorageType(), SearchCriteria.Op.EQ); + IdSearch.and("deleted", IdSearch.entity().getDeleted(), SearchCriteria.Op.NULL); IdSearch.done(); IdZoneSearch = createSearchBuilder(); @@ -74,6 +75,7 @@ public List listById(long accountId, long id, int type) { sc.setParameters("accountId", accountId); sc.setParameters("id", id); sc.setParameters("type", type); + sc.setParameters("deleted", null); return listBy(sc, null); } diff --git a/engine/schema/src/main/java/com/cloud/usage/dao/UsageVMInstanceDaoImpl.java b/engine/schema/src/main/java/com/cloud/usage/dao/UsageVMInstanceDaoImpl.java index 2fd453013bd1..41138bae2bdc 100644 --- a/engine/schema/src/main/java/com/cloud/usage/dao/UsageVMInstanceDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/usage/dao/UsageVMInstanceDaoImpl.java @@ -81,7 +81,7 @@ public void delete(UsageVMInstanceVO instance) { txn.commit(); } catch (Exception ex) { txn.rollback(); - logger.error("error deleting usage vm instance with vmId: " + instance.getVmInstanceId() + ", for account with id: " + instance.getAccountId()); + logger.error("Error deleting usage Instance with vmId: " + instance.getVmInstanceId() + ", for account with id: " + instance.getAccountId()); } finally { txn.close(); } @@ -139,7 +139,7 @@ public List getUsageRecords(long accountId, Date startDate, D usageInstances.add(usageInstance); } } catch (Exception ex) { - logger.error("error retrieving usage vm instances for account id: " + accountId, ex); + logger.error("Error retrieving usage Instances for Account ID: " + accountId, ex); } finally { txn.close(); } diff --git a/engine/schema/src/main/java/com/cloud/usage/dao/UsageVolumeDao.java b/engine/schema/src/main/java/com/cloud/usage/dao/UsageVolumeDao.java index 09590b739930..05287240f254 100644 --- a/engine/schema/src/main/java/com/cloud/usage/dao/UsageVolumeDao.java +++ b/engine/schema/src/main/java/com/cloud/usage/dao/UsageVolumeDao.java @@ -23,9 +23,7 @@ import com.cloud.utils.db.GenericDao; public interface UsageVolumeDao extends GenericDao { - public void removeBy(long userId, long id); - - public void update(UsageVolumeVO usage); - public List getUsageRecords(Long accountId, Long domainId, Date startDate, Date endDate, boolean limit, int page); + + List listByVolumeId(long volumeId, long accountId); } diff --git a/engine/schema/src/main/java/com/cloud/usage/dao/UsageVolumeDaoImpl.java b/engine/schema/src/main/java/com/cloud/usage/dao/UsageVolumeDaoImpl.java index 4662a6f26ce8..095070feac1c 100644 --- a/engine/schema/src/main/java/com/cloud/usage/dao/UsageVolumeDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/usage/dao/UsageVolumeDaoImpl.java @@ -18,81 +18,46 @@ 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.TimeZone; -import com.cloud.exception.CloudException; +import javax.annotation.PostConstruct; + import org.springframework.stereotype.Component; import com.cloud.usage.UsageVolumeVO; import com.cloud.utils.DateUtil; import com.cloud.utils.db.GenericDaoBase; +import com.cloud.utils.db.SearchBuilder; +import com.cloud.utils.db.SearchCriteria; import com.cloud.utils.db.TransactionLegacy; @Component public class UsageVolumeDaoImpl extends GenericDaoBase implements UsageVolumeDao { - protected static final String REMOVE_BY_USERID_VOLID = "DELETE FROM usage_volume WHERE account_id = ? AND volume_id = ?"; - protected static final String UPDATE_DELETED = "UPDATE usage_volume SET deleted = ? WHERE account_id = ? AND volume_id = ? and deleted IS NULL"; - protected static final String GET_USAGE_RECORDS_BY_ACCOUNT = "SELECT volume_id, zone_id, account_id, domain_id, disk_offering_id, template_id, size, created, deleted " + protected static final String GET_USAGE_RECORDS_BY_ACCOUNT = "SELECT volume_id, zone_id, account_id, domain_id, disk_offering_id, template_id, vm_id, size, created, deleted " + "FROM usage_volume " + "WHERE account_id = ? AND ((deleted IS NULL) OR (created BETWEEN ? AND ?) OR " + " (deleted BETWEEN ? AND ?) OR ((created <= ?) AND (deleted >= ?)))"; - protected static final String GET_USAGE_RECORDS_BY_DOMAIN = "SELECT volume_id, zone_id, account_id, domain_id, disk_offering_id, template_id, size, created, deleted " + protected static final String GET_USAGE_RECORDS_BY_DOMAIN = "SELECT volume_id, zone_id, account_id, domain_id, disk_offering_id, template_id, vm_id, size, created, deleted " + "FROM usage_volume " + "WHERE domain_id = ? AND ((deleted IS NULL) OR (created BETWEEN ? AND ?) OR " + " (deleted BETWEEN ? AND ?) OR ((created <= ?) AND (deleted >= ?)))"; - protected static final String GET_ALL_USAGE_RECORDS = "SELECT volume_id, zone_id, account_id, domain_id, disk_offering_id, template_id, size, created, deleted " + protected static final String GET_ALL_USAGE_RECORDS = "SELECT volume_id, zone_id, account_id, domain_id, disk_offering_id, template_id, vm_id, size, created, deleted " + "FROM usage_volume " + "WHERE (deleted IS NULL) OR (created BETWEEN ? AND ?) OR " + " (deleted BETWEEN ? AND ?) OR ((created <= ?) AND (deleted >= ?))"; + private SearchBuilder volumeSearch; public UsageVolumeDaoImpl() { } - @Override - public void removeBy(long accountId, long volId) { - TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB); - try { - txn.start(); - try(PreparedStatement pstmt = txn.prepareStatement(REMOVE_BY_USERID_VOLID);) { - if (pstmt != null) { - pstmt.setLong(1, accountId); - pstmt.setLong(2, volId); - pstmt.executeUpdate(); - } - }catch (SQLException e) { - throw new CloudException("Error removing usageVolumeVO:"+e.getMessage(), e); - } - txn.commit(); - } catch (Exception e) { - txn.rollback(); - logger.warn("Error removing usageVolumeVO:"+e.getMessage(), e); - } finally { - txn.close(); - } - } - - @Override - public void update(UsageVolumeVO usage) { - TransactionLegacy txn = TransactionLegacy.open(TransactionLegacy.USAGE_DB); - PreparedStatement pstmt = null; - try { - txn.start(); - if (usage.getDeleted() != null) { - pstmt = txn.prepareAutoCloseStatement(UPDATE_DELETED); - pstmt.setString(1, DateUtil.getDateDisplayString(TimeZone.getTimeZone("GMT"), usage.getDeleted())); - pstmt.setLong(2, usage.getAccountId()); - pstmt.setLong(3, usage.getVolumeId()); - pstmt.executeUpdate(); - } - txn.commit(); - } catch (Exception e) { - txn.rollback(); - logger.warn("Error updating UsageVolumeVO", e); - } finally { - txn.close(); - } + @PostConstruct + protected void init() { + volumeSearch = createSearchBuilder(); + volumeSearch.and("accountId", volumeSearch.entity().getAccountId(), SearchCriteria.Op.EQ); + volumeSearch.and("volumeId", volumeSearch.entity().getVolumeId(), SearchCriteria.Op.EQ); + volumeSearch.and("deleted", volumeSearch.entity().getDeleted(), SearchCriteria.Op.NULL); + volumeSearch.done(); } @Override @@ -150,11 +115,15 @@ public List getUsageRecords(Long accountId, Long domainId, Date s if (tId == 0) { tId = null; } - long size = Long.valueOf(rs.getLong(7)); + Long vmId = Long.valueOf(rs.getLong(7)); + if (vmId == 0) { + vmId = null; + } + long size = Long.valueOf(rs.getLong(8)); Date createdDate = null; Date deletedDate = null; - String createdTS = rs.getString(8); - String deletedTS = rs.getString(9); + String createdTS = rs.getString(9); + String deletedTS = rs.getString(10); if (createdTS != null) { createdDate = DateUtil.parseDateString(s_gmtTimeZone, createdTS); @@ -163,7 +132,7 @@ public List getUsageRecords(Long accountId, Long domainId, Date s deletedDate = DateUtil.parseDateString(s_gmtTimeZone, deletedTS); } - usageRecords.add(new UsageVolumeVO(vId, zoneId, acctId, dId, doId, tId, size, createdDate, deletedDate)); + usageRecords.add(new UsageVolumeVO(vId, zoneId, acctId, dId, doId, tId, vmId, size, createdDate, deletedDate)); } } catch (Exception e) { txn.rollback(); @@ -174,4 +143,13 @@ public List getUsageRecords(Long accountId, Long domainId, Date s return usageRecords; } + + @Override + public List listByVolumeId(long volumeId, long accountId) { + SearchCriteria sc = volumeSearch.create(); + sc.setParameters("accountId", accountId); + sc.setParameters("volumeId", volumeId); + sc.setParameters("deleted", null); + return listBy(sc); + } } diff --git a/engine/schema/src/main/java/com/cloud/user/UserAccountVO.java b/engine/schema/src/main/java/com/cloud/user/UserAccountVO.java index e4fcbad6b02f..c5ca410fc530 100644 --- a/engine/schema/src/main/java/com/cloud/user/UserAccountVO.java +++ b/engine/schema/src/main/java/com/cloud/user/UserAccountVO.java @@ -226,10 +226,6 @@ public Date getCreated() { return created; } -// public void setCreated(Date created) { -// this.created = created; -// } - @Override public Date getRemoved() { return removed; diff --git a/engine/schema/src/main/java/com/cloud/vm/dao/UserVmDaoImpl.java b/engine/schema/src/main/java/com/cloud/vm/dao/UserVmDaoImpl.java index 41bcb3155e54..761053a89f0c 100644 --- a/engine/schema/src/main/java/com/cloud/vm/dao/UserVmDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/vm/dao/UserVmDaoImpl.java @@ -101,7 +101,7 @@ public class UserVmDaoImpl extends GenericDaoBase implements Use ReservationDao reservationDao; private static final String LIST_PODS_HAVING_VMS_FOR_ACCOUNT = - "SELECT pod_id FROM cloud.vm_instance WHERE data_center_id = ? AND account_id = ? AND pod_id IS NOT NULL AND (state = 'Running' OR state = 'Stopped') " + "SELECT pod_id FROM cloud.vm_instance WHERE data_center_id = ? AND account_id = ? AND pod_id IS NOT NULL AND state IN ('Starting', 'Running', 'Stopped') " + "GROUP BY pod_id HAVING count(id) > 0 ORDER BY count(id) DESC"; private static final String VM_DETAILS = "select vm_instance.id, " @@ -782,7 +782,7 @@ public List> countVmsBySize(long dcId, int li result.add(new Ternary(rs.getInt(1), rs.getInt(2), rs.getInt(3))); } } catch (Exception e) { - logger.warn("Error counting vms by size for dcId= " + dcId, e); + logger.warn("Error counting Instances by size for Data Center ID = " + dcId, e); } return result; } diff --git a/engine/schema/src/main/java/com/cloud/vm/dao/VMInstanceDaoImpl.java b/engine/schema/src/main/java/com/cloud/vm/dao/VMInstanceDaoImpl.java index 6ac49967540a..5fe6e2e547e3 100755 --- a/engine/schema/src/main/java/com/cloud/vm/dao/VMInstanceDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/vm/dao/VMInstanceDaoImpl.java @@ -886,7 +886,7 @@ public Long countByZoneAndStateAndHostTag(long dcId, State state, String hostTag return rs.getLong(1); } } catch (Exception e) { - logger.warn(String.format("Error counting vms by host tag for dcId= %s, hostTag= %s", dcId, hostTag), e); + logger.warn("Error counting Instances by host tag for dcId = {}, hostTag = {}", dcId, hostTag, e); } return 0L; } diff --git a/engine/schema/src/main/java/com/cloud/vm/snapshot/dao/VMSnapshotDaoImpl.java b/engine/schema/src/main/java/com/cloud/vm/snapshot/dao/VMSnapshotDaoImpl.java index 83411b3cf8f7..7f74d2338e43 100644 --- a/engine/schema/src/main/java/com/cloud/vm/snapshot/dao/VMSnapshotDaoImpl.java +++ b/engine/schema/src/main/java/com/cloud/vm/snapshot/dao/VMSnapshotDaoImpl.java @@ -203,7 +203,7 @@ public boolean updateState(State currentState, Event event, State nextState, VMS .append("; updatedTime=") .append(oldUpdatedTime); } else { - logger.debug("Unable to update VM snapshot: {}, as there is no such snapshot exists in the database anymore", vo); + logger.debug("Unable to update Instance Snapshot: {}, as there is no such Snapshot exists in the database anymore", vo); } } return rows > 0; diff --git a/engine/schema/src/main/java/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java b/engine/schema/src/main/java/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java index d57dec8fbfd5..c475a4203a73 100644 --- a/engine/schema/src/main/java/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java +++ b/engine/schema/src/main/java/org/apache/cloudstack/storage/datastore/db/VolumeDataStoreVO.java @@ -209,10 +209,8 @@ public VolumeDataStoreVO(long hostId, long volumeId) { public VolumeDataStoreVO(long hostId, long volumeId, Date lastUpdated, int downloadPercent, Status downloadState, String localDownloadPath, String errorString, String jobId, String installPath, String downloadUrl, String checksum) { - // super(); dataStoreId = hostId; this.volumeId = volumeId; - // this.zoneId = zoneId; this.lastUpdated = lastUpdated; this.downloadPercent = downloadPercent; this.downloadState = downloadState; diff --git a/engine/schema/src/main/resources/META-INF/db/schema-307to410.sql b/engine/schema/src/main/resources/META-INF/db/schema-307to410.sql index 55d78b594377..3b0cfa8e6ce3 100644 --- a/engine/schema/src/main/resources/META-INF/db/schema-307to410.sql +++ b/engine/schema/src/main/resources/META-INF/db/schema-307to410.sql @@ -3,7 +3,7 @@ -- distributed with this work for additional information -- regarding copyright ownership. The ASF licenses this file -- to you under the Apache License, Version 2.0 (the --- "License"); you may not use this file except in compliances +-- "License"); you may not use this file except in compliance -- with the License. You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 diff --git a/engine/schema/src/main/resources/META-INF/db/schema-42200to42210-cleanup.sql b/engine/schema/src/main/resources/META-INF/db/schema-42200to42210-cleanup.sql new file mode 100644 index 000000000000..54baf226ac43 --- /dev/null +++ b/engine/schema/src/main/resources/META-INF/db/schema-42200to42210-cleanup.sql @@ -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. + +--; +-- Schema upgrade cleanup from 4.22.0.0 to 4.22.1.0 +--; diff --git a/engine/schema/src/main/resources/META-INF/db/schema-42200to42210.sql b/engine/schema/src/main/resources/META-INF/db/schema-42200to42210.sql new file mode 100644 index 000000000000..6aafa7ba81e2 --- /dev/null +++ b/engine/schema/src/main/resources/META-INF/db/schema-42200to42210.sql @@ -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. + +--; +-- Schema upgrade from 4.22.0.0 to 4.22.1.0 +--; + +-- Add vm_id column to usage_event table for volume usage events +CALL `cloud`.`IDEMPOTENT_ADD_COLUMN`('cloud.usage_event','vm_id', 'bigint UNSIGNED NULL COMMENT "VM ID associated with volume usage events"'); +CALL `cloud_usage`.`IDEMPOTENT_ADD_COLUMN`('cloud_usage.usage_event','vm_id', 'bigint UNSIGNED NULL COMMENT "VM ID associated with volume usage events"'); + +-- Add vm_id column to cloud_usage.usage_volume table +CALL `cloud_usage`.`IDEMPOTENT_ADD_COLUMN`('cloud_usage.usage_volume','vm_id', 'bigint UNSIGNED NULL COMMENT "VM ID associated with the volume usage"'); diff --git a/engine/schema/src/main/resources/META-INF/db/schema-42210to42300-cleanup.sql b/engine/schema/src/main/resources/META-INF/db/schema-42210to42300-cleanup.sql new file mode 100644 index 000000000000..e2b066af7800 --- /dev/null +++ b/engine/schema/src/main/resources/META-INF/db/schema-42210to42300-cleanup.sql @@ -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. + +--; +-- Schema upgrade cleanup from 4.22.1.0 to 4.23.0.0 +--; diff --git a/engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql b/engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql new file mode 100644 index 000000000000..01d528f4a92c --- /dev/null +++ b/engine/schema/src/main/resources/META-INF/db/schema-42210to42300.sql @@ -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. + +--; +-- Schema upgrade from 4.22.1.0 to 4.23.0.0 +--; + +-- Update value to random for the config 'vm.allocation.algorithm' or 'volume.allocation.algorithm' if configured as userconcentratedpod_random +-- Update value to firstfit for the config 'vm.allocation.algorithm' or 'volume.allocation.algorithm' if configured as userconcentratedpod_firstfit +UPDATE `cloud`.`configuration` SET value='random' WHERE name IN ('vm.allocation.algorithm', 'volume.allocation.algorithm') AND value='userconcentratedpod_random'; +UPDATE `cloud`.`configuration` SET value='firstfit' WHERE name IN ('vm.allocation.algorithm', 'volume.allocation.algorithm') AND value='userconcentratedpod_firstfit'; diff --git a/engine/schema/src/test/java/com/cloud/storage/dao/VMTemplateDaoImplTest.java b/engine/schema/src/test/java/com/cloud/storage/dao/VMTemplateDaoImplTest.java index 3c8e4c046ae7..5cff77869be8 100644 --- a/engine/schema/src/test/java/com/cloud/storage/dao/VMTemplateDaoImplTest.java +++ b/engine/schema/src/test/java/com/cloud/storage/dao/VMTemplateDaoImplTest.java @@ -76,7 +76,8 @@ public void testFindLatestTemplateByName_ReturnsTemplate() { VMTemplateVO expectedTemplate = new VMTemplateVO(); List returnedList = Collections.singletonList(expectedTemplate); doReturn(returnedList).when(templateDao).listBy(any(SearchCriteria.class), any(Filter.class)); - VMTemplateVO result = templateDao.findLatestTemplateByName("test", CPU.CPUArch.getDefault()); + VMTemplateVO result = templateDao.findLatestTemplateByName("test", Hypervisor.HypervisorType.KVM, + CPU.CPUArch.getDefault()); assertNotNull("Expected a non-null template", result); assertEquals("Expected the returned template to be the first element", expectedTemplate, result); } @@ -85,7 +86,8 @@ public void testFindLatestTemplateByName_ReturnsTemplate() { public void testFindLatestTemplateByName_ReturnsNullWhenNoTemplateFound() { List emptyList = Collections.emptyList(); doReturn(emptyList).when(templateDao).listBy(any(SearchCriteria.class), any(Filter.class)); - VMTemplateVO result = templateDao.findLatestTemplateByName("test", CPU.CPUArch.getDefault()); + VMTemplateVO result = templateDao.findLatestTemplateByName("test", Hypervisor.HypervisorType.VMware, + CPU.CPUArch.getDefault()); assertNull("Expected null when no templates are found", result); } @@ -94,7 +96,8 @@ public void testFindLatestTemplateByName_NullArch() { VMTemplateVO expectedTemplate = new VMTemplateVO(); List returnedList = Collections.singletonList(expectedTemplate); doReturn(returnedList).when(templateDao).listBy(any(SearchCriteria.class), any(Filter.class)); - VMTemplateVO result = templateDao.findLatestTemplateByName("test", null); + VMTemplateVO result = templateDao.findLatestTemplateByName("test", Hypervisor.HypervisorType.XenServer, + null); assertNotNull("Expected a non-null template even if arch is null", result); assertEquals("Expected the returned template to be the first element", expectedTemplate, result); } @@ -337,4 +340,82 @@ public void testFindSystemVMReadyTemplate() { VMTemplateVO readyTemplate = templateDao.findSystemVMReadyTemplate(zoneId, Hypervisor.HypervisorType.KVM, CPU.CPUArch.arm64.getType()); Assert.assertEquals(CPU.CPUArch.arm64, readyTemplate.getArch()); } + + @Test + public void findActiveSystemTemplateByHypervisorArchAndUrlPath_ReturnsTemplate() { + VMTemplateVO expectedTemplate = mock(VMTemplateVO.class); + SearchBuilder sb = mock(SearchBuilder.class); + when(sb.entity()).thenReturn(expectedTemplate); + SearchCriteriasc = mock(SearchCriteria.class); + when(sb.create()).thenReturn(sc); + when(templateDao.createSearchBuilder()).thenReturn(sb); + List templates = Collections.singletonList(expectedTemplate); + doReturn(templates).when(templateDao).listBy(any(SearchCriteria.class), any(Filter.class)); + + VMTemplateVO result = templateDao.findActiveSystemTemplateByHypervisorArchAndUrlPath( + Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64, "testPath"); + + assertNotNull(result); + assertEquals(expectedTemplate, result); + } + + @Test + public void findActiveSystemTemplateByHypervisorArchAndUrlPath_ReturnsNullWhenNoTemplatesFound() { + VMTemplateVO template = mock(VMTemplateVO.class); + SearchBuilder sb = mock(SearchBuilder.class); + when(sb.entity()).thenReturn(template); + SearchCriteriasc = mock(SearchCriteria.class); + when(sb.create()).thenReturn(sc); + when(templateDao.createSearchBuilder()).thenReturn(sb); + doReturn(Collections.emptyList()).when(templateDao).listBy(any(SearchCriteria.class), any(Filter.class)); + + VMTemplateVO result = templateDao.findActiveSystemTemplateByHypervisorArchAndUrlPath( + Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64, "testPath"); + + assertNull(result); + } + + @Test + public void findActiveSystemTemplateByHypervisorArchAndUrlPath_NullHypervisor() { + VMTemplateVO expectedTemplate = mock(VMTemplateVO.class); + SearchBuilder sb = mock(SearchBuilder.class); + when(sb.entity()).thenReturn(expectedTemplate); + SearchCriteriasc = mock(SearchCriteria.class); + when(sb.create()).thenReturn(sc); + when(templateDao.createSearchBuilder()).thenReturn(sb); + List templates = Collections.singletonList(expectedTemplate); + doReturn(templates).when(templateDao).listBy(any(SearchCriteria.class), any(Filter.class)); + + VMTemplateVO result = templateDao.findActiveSystemTemplateByHypervisorArchAndUrlPath( + null, CPU.CPUArch.amd64, "testPath"); + + assertNotNull(result); + assertEquals(expectedTemplate, result); + } + + @Test + public void findActiveSystemTemplateByHypervisorArchAndUrlPath_NullArch() { + VMTemplateVO expectedTemplate = mock(VMTemplateVO.class); + SearchBuilder sb = mock(SearchBuilder.class); + when(sb.entity()).thenReturn(expectedTemplate); + SearchCriteriasc = mock(SearchCriteria.class); + when(sb.create()).thenReturn(sc); + when(templateDao.createSearchBuilder()).thenReturn(sb); + List templates = Collections.singletonList(expectedTemplate); + doReturn(templates).when(templateDao).listBy(any(SearchCriteria.class), any(Filter.class)); + + VMTemplateVO result = templateDao.findActiveSystemTemplateByHypervisorArchAndUrlPath( + Hypervisor.HypervisorType.KVM, null, "testPath"); + + assertNotNull(result); + assertEquals(expectedTemplate, result); + } + + @Test + public void findActiveSystemTemplateByHypervisorArchAndUrlPath_EmptyUrlPathSuffix() { + VMTemplateVO result = templateDao.findActiveSystemTemplateByHypervisorArchAndUrlPath( + Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64, ""); + + assertNull(result); + } } diff --git a/engine/schema/src/test/java/com/cloud/upgrade/DatabaseUpgradeCheckerDoUpgradesTest.java b/engine/schema/src/test/java/com/cloud/upgrade/DatabaseUpgradeCheckerDoUpgradesTest.java new file mode 100644 index 000000000000..6241bd7cede0 --- /dev/null +++ b/engine/schema/src/test/java/com/cloud/upgrade/DatabaseUpgradeCheckerDoUpgradesTest.java @@ -0,0 +1,173 @@ +// Licensed to the Apache Software Foundation (ASF) under one +// or more contributor license agreements. See the NOTICE file +// distributed with this work for additional information +// regarding copyright ownership. The ASF licenses this file +// to you under the Apache License, Version 2.0 (the +// "License"); you may not use this file except in compliance +// with the License. You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, +// software distributed under the License is distributed on an +// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +// KIND, either express or implied. See the License for the +// specific language governing permissions and limitations +// under the License. +package com.cloud.upgrade; + +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; + +import com.cloud.upgrade.dao.VersionDao; +import com.cloud.upgrade.dao.VersionDaoImpl; +import com.cloud.upgrade.dao.VersionVO; +import com.cloud.utils.db.GlobalLock; +import org.junit.Test; + +public class DatabaseUpgradeCheckerDoUpgradesTest { + + static class StubVersionDao extends VersionDaoImpl implements VersionDao { + private final String currentVersion; + + StubVersionDao(String currentVersion) { + this.currentVersion = currentVersion; + } + + @Override + public VersionVO findByVersion(String version, VersionVO.Step step) { + return null; + } + + @Override + public String getCurrentVersion() { + return currentVersion; + } + + } + + private static class TestableChecker extends DatabaseUpgradeChecker { + boolean initializeCalled = false; + boolean upgradeCalled = false; + boolean clusterHandlerCalled = false; + String implVersionOverride = null; + String sysVmMetadataOverride = "4.8.0"; + boolean standaloneOverride = true; + + TestableChecker(String daoVersion) { + // set a stub DAO + this._dao = new StubVersionDao(daoVersion); + } + + @Override + protected void initializeDatabaseEncryptors() { + initializeCalled = true; + // noop instead of doing DB work + } + + @Override + protected String getImplementationVersion() { + return implVersionOverride; + } + + @Override + protected String parseSystemVmMetadata() { + return sysVmMetadataOverride; + } + + @Override + boolean isStandalone() { + return standaloneOverride; + } + + @Override + protected void upgrade(org.apache.cloudstack.utils.CloudStackVersion dbVersion, org.apache.cloudstack.utils.CloudStackVersion currentVersion) { + upgradeCalled = true; + } + + @Override + protected void handleClusteredUpgradeRequired() { + clusterHandlerCalled = true; + } + } + + @Test + public void testDoUpgrades_noImplementationVersion_returnsEarly() { + TestableChecker checker = new TestableChecker("4.8.0"); + checker.implVersionOverride = ""; // blank -> should return early + + GlobalLock lock = GlobalLock.getInternLock("test-noimpl"); + try { + // acquire lock so doUpgrades can safely call unlock in finally + lock.lock(1); + checker.doUpgrades(lock); + } finally { + // ensure lock released if still held + lock.releaseRef(); + } + + assertTrue("initializeDatabaseEncryptors should be called before returning", checker.initializeCalled); + assertFalse("upgrade should not be called when implementation version is blank", checker.upgradeCalled); + assertFalse("cluster handler should not be called", checker.clusterHandlerCalled); + } + + @Test + public void testDoUpgrades_dbUpToDate_noUpgrade() { + // DB version = code version -> no upgrade + TestableChecker checker = new TestableChecker("4.8.1"); + checker.implVersionOverride = "4.8.1"; + checker.sysVmMetadataOverride = "4.8.1"; + + GlobalLock lock = GlobalLock.getInternLock("test-uptodate"); + try { + lock.lock(1); + checker.doUpgrades(lock); + } finally { + lock.releaseRef(); + } + + assertTrue(checker.initializeCalled); + assertFalse(checker.upgradeCalled); + assertFalse(checker.clusterHandlerCalled); + } + + @Test + public void testDoUpgrades_requiresUpgrade_standalone_invokesUpgrade() { + TestableChecker checker = new TestableChecker("4.8.0"); + checker.implVersionOverride = "4.8.2"; // code is newer than DB + checker.sysVmMetadataOverride = "4.8.2"; + checker.standaloneOverride = true; + + GlobalLock lock = GlobalLock.getInternLock("test-upgrade-standalone"); + try { + lock.lock(1); + checker.doUpgrades(lock); + } finally { + lock.releaseRef(); + } + + assertTrue(checker.initializeCalled); + assertTrue("upgrade should be invoked in standalone mode", checker.upgradeCalled); + assertFalse(checker.clusterHandlerCalled); + } + + @Test + public void testDoUpgrades_requiresUpgrade_clustered_invokesHandler() { + TestableChecker checker = new TestableChecker("4.8.0"); + checker.implVersionOverride = "4.8.2"; // code is newer than DB + checker.sysVmMetadataOverride = "4.8.2"; + checker.standaloneOverride = false; + + GlobalLock lock = GlobalLock.getInternLock("test-upgrade-clustered"); + try { + lock.lock(1); + checker.doUpgrades(lock); + } finally { + lock.releaseRef(); + } + + assertTrue(checker.initializeCalled); + assertFalse("upgrade should not be invoked in clustered mode", checker.upgradeCalled); + assertTrue("cluster handler should be invoked in clustered mode", checker.clusterHandlerCalled); + } +} diff --git a/engine/schema/src/test/java/com/cloud/upgrade/DatabaseUpgradeCheckerTest.java b/engine/schema/src/test/java/com/cloud/upgrade/DatabaseUpgradeCheckerTest.java index 1a9372f73eaf..27995eb179af 100644 --- a/engine/schema/src/test/java/com/cloud/upgrade/DatabaseUpgradeCheckerTest.java +++ b/engine/schema/src/test/java/com/cloud/upgrade/DatabaseUpgradeCheckerTest.java @@ -16,14 +16,24 @@ // under the License. package com.cloud.upgrade; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import java.sql.SQLException; +import java.lang.reflect.Field; +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; -import java.util.Arrays; +import javax.sql.DataSource; import org.apache.cloudstack.utils.CloudStackVersion; import org.junit.Test; +import org.junit.Before; +import org.junit.After; +import org.junit.runner.RunWith; + +import org.mockito.ArgumentMatchers; +import org.mockito.Mock; +import org.mockito.Mockito; +import org.mockito.junit.MockitoJUnitRunner; import com.cloud.upgrade.DatabaseUpgradeChecker.NoopDbUpgrade; import com.cloud.upgrade.dao.DbUpgrade; @@ -43,8 +53,51 @@ import com.cloud.upgrade.dao.Upgrade480to481; import com.cloud.upgrade.dao.Upgrade490to4910; +import com.cloud.utils.db.TransactionLegacy; + +import static org.junit.Assert.assertTrue; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertArrayEquals; + + +@RunWith(MockitoJUnitRunner.class) public class DatabaseUpgradeCheckerTest { + @Mock + DataSource dataSource; + + @Mock + Connection connection; + + @Mock + PreparedStatement preparedStatement; + + @Mock + ResultSet resultSet; + + private DataSource backupDataSource; + + @Before + public void setup() throws Exception { + Field dsField = TransactionLegacy.class.getDeclaredField("s_ds"); + dsField.setAccessible(true); + backupDataSource = (DataSource) dsField.get(null); + dsField.set(null, dataSource); + + Mockito.when(dataSource.getConnection()).thenReturn(connection); + Mockito.when(connection.prepareStatement(ArgumentMatchers.anyString())).thenReturn(preparedStatement); + Mockito.when(preparedStatement.executeQuery()).thenReturn(resultSet); + } + + @After + public void cleanup() throws Exception { + Field dsField = TransactionLegacy.class.getDeclaredField("s_ds"); + dsField.setAccessible(true); + dsField.set(null, backupDataSource); + } + @Test public void testCalculateUpgradePath480to481() { @@ -79,7 +132,7 @@ public void testCalculateUpgradePath490to4910() { assertTrue(upgrades.length >= 1); assertTrue(upgrades[0] instanceof Upgrade490to4910); - assertTrue(Arrays.equals(new String[] {"4.9.0", currentVersion.toString()}, upgrades[0].getUpgradableVersionRange())); + assertArrayEquals(new String[]{"4.9.0", currentVersion.toString()}, upgrades[0].getUpgradableVersionRange()); assertEquals(currentVersion.toString(), upgrades[0].getUpgradedVersion()); } @@ -104,7 +157,7 @@ public void testCalculateUpgradePath410to412() { assertTrue(upgrades[3] instanceof Upgrade41120to41130); assertTrue(upgrades[4] instanceof Upgrade41120to41200); - assertTrue(Arrays.equals(new String[] {"4.11.0.0", "4.11.1.0"}, upgrades[1].getUpgradableVersionRange())); + assertArrayEquals(new String[]{"4.11.0.0", "4.11.1.0"}, upgrades[1].getUpgradableVersionRange()); assertEquals(currentVersion.toString(), upgrades[4].getUpgradedVersion()); } @@ -151,12 +204,12 @@ public void testFindUpgradePath452to490() { assertTrue(upgrades[5] instanceof Upgrade471to480); assertTrue(upgrades[6] instanceof Upgrade480to481); - assertTrue(Arrays.equals(new String[] {"4.8.1", currentVersion.toString()}, upgrades[upgrades.length - 1].getUpgradableVersionRange())); + assertArrayEquals(new String[]{"4.8.1", currentVersion.toString()}, upgrades[upgrades.length - 1].getUpgradableVersionRange()); assertEquals(currentVersion.toString(), upgrades[upgrades.length - 1].getUpgradedVersion()); } @Test - public void testCalculateUpgradePathUnkownDbVersion() { + public void testCalculateUpgradePathUnknownDbVersion() { final CloudStackVersion dbVersion = CloudStackVersion.parse("4.99.0.0"); assertNotNull(dbVersion); @@ -173,7 +226,7 @@ public void testCalculateUpgradePathUnkownDbVersion() { } @Test - public void testCalculateUpgradePathFromKownDbVersion() { + public void testCalculateUpgradePathFromKnownDbVersion() { final CloudStackVersion dbVersion = CloudStackVersion.parse("4.17.0.0"); assertNotNull(dbVersion); @@ -306,4 +359,25 @@ public void testCalculateUpgradePathFromSecurityReleaseToNextSecurityRelease() { assertEquals(upgrades.length + 1, upgradesFromSecurityReleaseToNext.length); assertTrue(upgradesFromSecurityReleaseToNext[upgradesFromSecurityReleaseToNext.length - 1] instanceof NoopDbUpgrade); } + + @Test + public void isStandalone() throws SQLException { + // simulate zero 'UP' hosts -> standalone + Mockito.when(resultSet.next()).thenReturn(true); + Mockito.when(resultSet.getInt(1)).thenReturn(0); + + final DatabaseUpgradeChecker checker = new DatabaseUpgradeChecker(); + assertTrue("DatabaseUpgradeChecker should be a standalone component", checker.isStandalone()); + } + + @Test + public void isNotStandalone() throws SQLException { + // simulate at least one 'UP' host -> not standalone + Mockito.when(resultSet.next()).thenReturn(true); + Mockito.when(resultSet.getInt(1)).thenReturn(1); + + final DatabaseUpgradeChecker checker = new DatabaseUpgradeChecker(); + assertFalse("DatabaseUpgradeChecker should not be a standalone component", checker.isStandalone()); + } + } diff --git a/engine/schema/src/test/java/com/cloud/upgrade/SystemVmTemplateRegistrationTest.java b/engine/schema/src/test/java/com/cloud/upgrade/SystemVmTemplateRegistrationTest.java index dceb8e07b07d..8028e78c9073 100644 --- a/engine/schema/src/test/java/com/cloud/upgrade/SystemVmTemplateRegistrationTest.java +++ b/engine/schema/src/test/java/com/cloud/upgrade/SystemVmTemplateRegistrationTest.java @@ -17,6 +17,7 @@ package com.cloud.upgrade; +import static com.cloud.upgrade.SystemVmTemplateRegistration.DEFAULT_SYSTEM_VM_GUEST_OS_NAME; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertNotNull; @@ -25,24 +26,41 @@ import static org.junit.Assert.assertTrue; import static org.junit.Assert.fail; import static org.mockito.ArgumentMatchers.any; +import static org.mockito.ArgumentMatchers.anyInt; +import static org.mockito.ArgumentMatchers.anyList; +import static org.mockito.ArgumentMatchers.anyLong; import static org.mockito.ArgumentMatchers.anyString; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doNothing; import static org.mockito.Mockito.doReturn; +import static org.mockito.Mockito.doThrow; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.never; import static org.mockito.Mockito.times; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; import java.io.File; +import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.util.ArrayList; +import java.util.Date; import java.util.List; +import java.util.Map; +import org.apache.cloudstack.engine.subsystem.api.storage.ObjectInDataStoreStateMachine; +import org.apache.cloudstack.framework.config.dao.ConfigurationDao; +import org.apache.cloudstack.framework.config.impl.ConfigurationVO; +import org.apache.cloudstack.storage.datastore.db.ImageStoreDao; +import org.apache.cloudstack.storage.datastore.db.ImageStoreDetailsDao; +import org.apache.cloudstack.storage.datastore.db.ImageStoreVO; +import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreDao; import org.apache.cloudstack.storage.datastore.db.TemplateDataStoreVO; import org.apache.cloudstack.utils.security.DigestHelper; import org.apache.commons.lang3.StringUtils; +import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InjectMocks; @@ -53,15 +71,27 @@ import org.mockito.junit.MockitoJUnitRunner; import com.cloud.cpu.CPU; +import com.cloud.dc.DataCenterVO; import com.cloud.dc.dao.ClusterDao; +import com.cloud.dc.dao.DataCenterDao; +import com.cloud.dc.dao.DataCenterDetailsDao; import com.cloud.hypervisor.Hypervisor; +import com.cloud.storage.DataStoreRole; +import com.cloud.storage.GuestOSVO; +import com.cloud.storage.Storage; +import com.cloud.storage.VMTemplateStorageResourceAssoc; import com.cloud.storage.VMTemplateVO; +import com.cloud.storage.VMTemplateZoneVO; +import com.cloud.storage.dao.GuestOSDao; import com.cloud.storage.dao.VMTemplateDao; +import com.cloud.storage.dao.VMTemplateZoneDao; +import com.cloud.template.VirtualMachineTemplate; import com.cloud.utils.HttpUtils; import com.cloud.utils.Pair; import com.cloud.utils.UriUtils; import com.cloud.utils.exception.CloudRuntimeException; import com.cloud.utils.script.Script; +import com.cloud.vm.dao.VMInstanceDao; @RunWith(MockitoJUnitRunner.class) public class SystemVmTemplateRegistrationTest { @@ -72,10 +102,42 @@ public class SystemVmTemplateRegistrationTest { @Mock VMTemplateDao vmTemplateDao; + @Mock + GuestOSDao guestOSDao; + + @Mock + TemplateDataStoreDao templateDataStoreDao; + + @Mock + ConfigurationDao configurationDao; + + @Mock + DataCenterDao dataCenterDao; + + @Mock + DataCenterDetailsDao dataCenterDetailsDao; + + @Mock + VMTemplateZoneDao vmTemplateZoneDao; + + @Mock + ImageStoreDao imageStoreDao; + + @Mock + ImageStoreDetailsDao imageStoreDetailsDao; + + @Mock + VMInstanceDao vmInstanceDao; + @Spy @InjectMocks SystemVmTemplateRegistration systemVmTemplateRegistration = new SystemVmTemplateRegistration(); + @Before + public void setup() { + SystemVmTemplateRegistration.METADATA_TEMPLATE_LIST.clear(); + } + private void setupMetadataFile(MockedStatic mockedStatic, String content) { try { String location = "metadata.ini"; @@ -98,7 +160,7 @@ public void test_parseMetadataFile_noFile() { setupMetadataFile(mockedStatic, null); CloudRuntimeException exception = assertThrows(CloudRuntimeException.class, SystemVmTemplateRegistration::parseMetadataFile); - assertTrue(exception.getMessage().contains("Failed to parse systemVM template metadata file")); + assertTrue(exception.getMessage().contains("Failed to parse system VM Template metadata file")); } } @@ -109,7 +171,7 @@ public void test_parseMetadataFile_invalidContent() { setupMetadataFile(mockedStatic, "abc"); CloudRuntimeException exception = assertThrows(CloudRuntimeException.class, SystemVmTemplateRegistration::parseMetadataFile); - assertTrue(exception.getMessage().contains("Failed to parse systemVM template metadata file")); + assertTrue(exception.getMessage().contains("Failed to parse system VM Template metadata file")); } } @@ -141,21 +203,25 @@ public void test_parseMetadataFile_success() { String version = SystemVmTemplateRegistration.parseMetadataFile(); assertEquals("x.y.z.0", version); } - assertNull(SystemVmTemplateRegistration.NewTemplateMap.get("xenserver")); + assertNull(SystemVmTemplateRegistration.getMetadataTemplateDetails(Hypervisor.HypervisorType.XenServer, + CPU.CPUArch.getDefault())); SystemVmTemplateRegistration.MetadataTemplateDetails templateDetails = - SystemVmTemplateRegistration.NewTemplateMap.get("kvm-x86_64"); + SystemVmTemplateRegistration.getMetadataTemplateDetails(Hypervisor.HypervisorType.KVM, + CPU.CPUArch.amd64); assertNotNull(templateDetails); assertEquals(CPU.CPUArch.amd64, templateDetails.getArch()); assertEquals(Hypervisor.HypervisorType.KVM, templateDetails.getHypervisorType()); templateDetails = - SystemVmTemplateRegistration.NewTemplateMap.get("kvm-aarch64"); + SystemVmTemplateRegistration.getMetadataTemplateDetails(Hypervisor.HypervisorType.KVM, + CPU.CPUArch.arm64); assertNotNull(templateDetails); assertEquals(CPU.CPUArch.arm64, templateDetails.getArch()); assertEquals(Hypervisor.HypervisorType.KVM, templateDetails.getHypervisorType()); templateDetails = - SystemVmTemplateRegistration.NewTemplateMap.get("vmware"); + SystemVmTemplateRegistration.getMetadataTemplateDetails(Hypervisor.HypervisorType.VMware, + CPU.CPUArch.getDefault()); assertNotNull(templateDetails); - assertNull(templateDetails.getArch()); + assertEquals(CPU.CPUArch.getDefault(), templateDetails.getArch()); assertEquals(Hypervisor.HypervisorType.VMware, templateDetails.getHypervisorType()); } @@ -193,11 +259,10 @@ public void testValidateTemplateFile_fileNotFound() { SystemVmTemplateRegistration.MetadataTemplateDetails details = new SystemVmTemplateRegistration.MetadataTemplateDetails(Hypervisor.HypervisorType.KVM, "name", "file", "url", "checksum", CPU.CPUArch.amd64, "guestos"); - SystemVmTemplateRegistration.NewTemplateMap.put(SystemVmTemplateRegistration.getHypervisorArchKey( - details.getHypervisorType(), details.getArch()), details); + SystemVmTemplateRegistration.METADATA_TEMPLATE_LIST.add(details); doReturn(null).when(systemVmTemplateRegistration).getTemplateFile(details); try { - systemVmTemplateRegistration.validateTemplateFileForHypervisorAndArch(details.getHypervisorType(), + systemVmTemplateRegistration.getValidatedTemplateDetailsForHypervisorAndArch(details.getHypervisorType(), details.getArch()); fail("Expected CloudRuntimeException due to missing template file"); } catch (CloudRuntimeException e) { @@ -211,12 +276,11 @@ public void testValidateTemplateFile_checksumMismatch() { new SystemVmTemplateRegistration.MetadataTemplateDetails(Hypervisor.HypervisorType.KVM, "name", "file", "url", "checksum", CPU.CPUArch.amd64, "guestos"); File dummyFile = new File("dummy.txt"); - SystemVmTemplateRegistration.NewTemplateMap.put(SystemVmTemplateRegistration.getHypervisorArchKey( - details.getHypervisorType(), details.getArch()), details); + SystemVmTemplateRegistration.METADATA_TEMPLATE_LIST.add(details); doReturn(dummyFile).when(systemVmTemplateRegistration).getTemplateFile(details); - doReturn(true).when(systemVmTemplateRegistration).isTemplateFileChecksumDifferent(details, dummyFile); - try { - systemVmTemplateRegistration.validateTemplateFileForHypervisorAndArch(details.getHypervisorType(), + try (MockedStatic digestMock = Mockito.mockStatic(DigestHelper.class)) { + digestMock.when(() -> DigestHelper.calculateChecksum(dummyFile)).thenReturn("differentChecksum"); + systemVmTemplateRegistration.getValidatedTemplateDetailsForHypervisorAndArch(details.getHypervisorType(), details.getArch()); fail("Expected CloudRuntimeException due to checksum failure"); } catch (CloudRuntimeException e) { @@ -230,42 +294,55 @@ public void testValidateTemplateFile_success() { new SystemVmTemplateRegistration.MetadataTemplateDetails(Hypervisor.HypervisorType.KVM, "name", "file", "url", "checksum", CPU.CPUArch.amd64, "guestos"); File dummyFile = new File("dummy.txt"); - SystemVmTemplateRegistration.NewTemplateMap.put(SystemVmTemplateRegistration.getHypervisorArchKey( - details.getHypervisorType(), details.getArch()), details); + SystemVmTemplateRegistration.METADATA_TEMPLATE_LIST.add(details); doReturn(dummyFile).when(systemVmTemplateRegistration).getTemplateFile(details); - doReturn(false).when(systemVmTemplateRegistration).isTemplateFileChecksumDifferent(details, dummyFile); - systemVmTemplateRegistration.validateTemplateFileForHypervisorAndArch(details.getHypervisorType(), - details.getArch()); + try (MockedStatic digestMock = Mockito.mockStatic(DigestHelper.class)) { + digestMock.when(() -> DigestHelper.calculateChecksum(dummyFile)).thenReturn("checksum"); + systemVmTemplateRegistration.getValidatedTemplateDetailsForHypervisorAndArch(details.getHypervisorType(), + details.getArch()); + } } @Test - public void testValidateAndRegisterTemplate() { + public void testValidateAndAddExistingTemplateToStore() { + long zoneId = 1L; Hypervisor.HypervisorType hypervisor = Hypervisor.HypervisorType.KVM; - String name = "TestTemplate"; - Long storeId = 123L; VMTemplateVO templateVO = new VMTemplateVO(); - templateVO.setArch(CPU.CPUArch.x86); + templateVO.setHypervisorType(hypervisor); + templateVO.setArch(CPU.CPUArch.getDefault()); TemplateDataStoreVO templateDataStoreVO = new TemplateDataStoreVO(); + Long storeId = 123L; String filePath = "/dummy/path"; - doNothing().when(systemVmTemplateRegistration).validateTemplateFileForHypervisorAndArch(hypervisor, templateVO.getArch()); - doNothing().when(systemVmTemplateRegistration).registerTemplate(hypervisor, name, storeId, templateVO, templateDataStoreVO, filePath); - systemVmTemplateRegistration.validateAndRegisterTemplate(hypervisor, name, storeId, templateVO, templateDataStoreVO, filePath); - verify(systemVmTemplateRegistration).validateTemplateFileForHypervisorAndArch(eq(hypervisor), eq(templateVO.getArch())); - verify(systemVmTemplateRegistration).registerTemplate(eq(hypervisor), eq(name), eq(storeId), eq(templateVO), eq(templateDataStoreVO), eq(filePath)); + SystemVmTemplateRegistration.MetadataTemplateDetails details = + mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); + doReturn(details).when(systemVmTemplateRegistration) + .getValidatedTemplateDetailsForHypervisorAndArch(hypervisor, templateVO.getArch()); + doNothing().when(systemVmTemplateRegistration).addExistingTemplateToStore(templateVO, details, + templateDataStoreVO, zoneId, storeId, filePath); + systemVmTemplateRegistration.validateAndAddTemplateToStore(templateVO, templateDataStoreVO, zoneId, storeId, + filePath); + verify(systemVmTemplateRegistration) + .getValidatedTemplateDetailsForHypervisorAndArch(hypervisor, templateVO.getArch()); + verify(systemVmTemplateRegistration).addExistingTemplateToStore(templateVO, details, templateDataStoreVO, + zoneId, storeId, filePath); } @Test - public void testValidateAndRegisterTemplateForNonExistingEntries() { + public void testValidateAndAddExistingTemplateToStoreForNonExistingEntries() { + long zoneId = 1L; Hypervisor.HypervisorType hypervisor = Hypervisor.HypervisorType.KVM; CPU.CPUArch arch = CPU.CPUArch.amd64; String name = "TestTemplateNonExisting"; - Pair storeUrlAndId = new Pair<>("nfs://dummy", 456L); + long storeId = 123L; String filePath = "/dummy/path/nonexisting"; - doNothing().when(systemVmTemplateRegistration).validateTemplateFileForHypervisorAndArch(hypervisor, arch); - doNothing().when(systemVmTemplateRegistration).registerTemplateForNonExistingEntries(hypervisor, arch, name, storeUrlAndId, filePath); - systemVmTemplateRegistration.validateAndRegisterTemplateForNonExistingEntries(hypervisor, arch, name, storeUrlAndId, filePath); - verify(systemVmTemplateRegistration).validateTemplateFileForHypervisorAndArch(eq(hypervisor), eq(arch)); - verify(systemVmTemplateRegistration).registerTemplateForNonExistingEntries(eq(hypervisor), eq(arch), eq(name), eq(storeUrlAndId), eq(filePath)); + SystemVmTemplateRegistration.MetadataTemplateDetails details = + mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); + doReturn(details).when(systemVmTemplateRegistration) + .getValidatedTemplateDetailsForHypervisorAndArch(hypervisor, arch); + doNothing().when(systemVmTemplateRegistration).registerNewTemplate(name, details, zoneId, storeId, filePath); + systemVmTemplateRegistration.validateAndRegisterNewTemplate(hypervisor, arch, name, zoneId, storeId, filePath); + verify(systemVmTemplateRegistration).getValidatedTemplateDetailsForHypervisorAndArch(hypervisor, arch); + verify(systemVmTemplateRegistration).registerNewTemplate(name, details, zoneId, storeId, filePath); } @Test @@ -316,86 +393,73 @@ public void testGetTemplateFile_fileDoesNotExist_downloadSucceeds() { } @Test - public void testIsTemplateFileChecksumDifferent_noMismatch() { - SystemVmTemplateRegistration.MetadataTemplateDetails details = - Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); - when(details.getChecksum()).thenReturn("dummyChecksum"); - File file = new File("dummy.txt"); - try (MockedStatic digestMock = Mockito.mockStatic(DigestHelper.class)) { - digestMock.when(() -> DigestHelper.calculateChecksum(file)).thenReturn("dummyChecksum"); - boolean result = systemVmTemplateRegistration.isTemplateFileChecksumDifferent(details, file); - assertFalse(result); - } - } - - @Test - public void testIsTemplateFileChecksumDifferent_mismatch() { - SystemVmTemplateRegistration.MetadataTemplateDetails details = - Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); - when(details.getChecksum()).thenReturn("expectedChecksum"); - File file = new File("dummy.txt"); - try (MockedStatic digestMock = Mockito.mockStatic(DigestHelper.class)) { - digestMock.when(() -> DigestHelper.calculateChecksum(file)).thenReturn("actualChecksum"); - boolean result = systemVmTemplateRegistration.isTemplateFileChecksumDifferent(details, file); - assertTrue(result); - } - } - - @Test(expected = CloudRuntimeException.class) - public void testValidateTemplates_metadataTemplateFailure() { + public void testValidateTemplates_metadataTemplateSkip() { + Hypervisor.HypervisorType hypervisorType = Hypervisor.HypervisorType.VMware; + CPU.CPUArch arch = CPU.CPUArch.arm64; List> list = new ArrayList<>(); - list.add(new Pair<>(Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64)); + list.add(new Pair<>(hypervisorType, arch)); systemVmTemplateRegistration.validateTemplates(list); + verify(systemVmTemplateRegistration, never()).getValidatedTemplateDetailsForHypervisorAndArch(hypervisorType, + arch); } @Test(expected = CloudRuntimeException.class) public void testValidateTemplates_fileFailure() { + Hypervisor.HypervisorType hypervisorType = Hypervisor.HypervisorType.KVM; + CPU.CPUArch arch = CPU.CPUArch.amd64; List> list = new ArrayList<>(); - list.add(new Pair<>(Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64)); - + list.add(new Pair<>(hypervisorType, arch)); SystemVmTemplateRegistration.MetadataTemplateDetails details = Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); - SystemVmTemplateRegistration.NewTemplateMap.put(SystemVmTemplateRegistration.getHypervisorArchKey( - Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64), details); + when(details.getHypervisorType()).thenReturn(hypervisorType); + when(details.getArch()).thenReturn(arch); File mockFile = Mockito.mock(File.class); + when(details.isFileChecksumDifferent(mockFile)).thenReturn(true); + SystemVmTemplateRegistration.METADATA_TEMPLATE_LIST.add(details); doReturn(mockFile).when(systemVmTemplateRegistration).getTemplateFile(details); - doReturn(true).when(systemVmTemplateRegistration).isTemplateFileChecksumDifferent(details, mockFile); systemVmTemplateRegistration.validateTemplates(list); } + @Test(expected = CloudRuntimeException.class) public void testValidateTemplates_downloadableFileNotFound() { CPU.CPUArch arch = SystemVmTemplateRegistration.DOWNLOADABLE_TEMPLATE_ARCH_TYPES.get(0); List> list = new ArrayList<>(); - list.add(new Pair<>(Hypervisor.HypervisorType.KVM, arch)); + Hypervisor.HypervisorType hypervisorType = Hypervisor.HypervisorType.KVM; + list.add(new Pair<>(hypervisorType, arch)); SystemVmTemplateRegistration.MetadataTemplateDetails details = Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); - SystemVmTemplateRegistration.NewTemplateMap.put(SystemVmTemplateRegistration.getHypervisorArchKey( - Hypervisor.HypervisorType.KVM, arch), details); + when(details.getHypervisorType()).thenReturn(hypervisorType); + when(details.getArch()).thenReturn(arch); + SystemVmTemplateRegistration.METADATA_TEMPLATE_LIST.add(details); doReturn(null).when(systemVmTemplateRegistration).getTemplateFile(details); systemVmTemplateRegistration.validateTemplates(list); } @Test public void testValidateTemplates_success() { + Hypervisor.HypervisorType hypervisorType = Hypervisor.HypervisorType.KVM; + CPU.CPUArch arch = CPU.CPUArch.amd64; List> list = new ArrayList<>(); - list.add(new Pair<>(Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64)); - + list.add(new Pair<>(hypervisorType, arch)); SystemVmTemplateRegistration.MetadataTemplateDetails details = Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); - SystemVmTemplateRegistration.NewTemplateMap.put(SystemVmTemplateRegistration.getHypervisorArchKey( - Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64), details); + when(details.getHypervisorType()).thenReturn(hypervisorType); + when(details.getArch()).thenReturn(arch); File mockFile = Mockito.mock(File.class); + when(details.isFileChecksumDifferent(mockFile)).thenReturn(false); + SystemVmTemplateRegistration.METADATA_TEMPLATE_LIST.add(details); doReturn(mockFile).when(systemVmTemplateRegistration).getTemplateFile(details); - doReturn(false).when(systemVmTemplateRegistration).isTemplateFileChecksumDifferent(details, mockFile); systemVmTemplateRegistration.validateTemplates(list); } @Test - public void testRegisterTemplatesForZone() { + public void testAddExistingTemplatesForZoneToStore() { long zoneId = 1L; String filePath = "dummyFilePath"; String nfsVersion = "nfs3"; Pair storeUrlAndId = new Pair<>("nfs://dummy", 100L); + String name = "existing"; + String url = "url"; doReturn(storeUrlAndId).when(systemVmTemplateRegistration).getNfsStoreInZone(zoneId); doReturn(nfsVersion).when(systemVmTemplateRegistration).getNfsVersion(storeUrlAndId.second()); try (MockedStatic mockedStatic = Mockito.mockStatic( @@ -407,21 +471,1169 @@ public void testRegisterTemplatesForZone() { doReturn(hypervisorArchList).when(clusterDao).listDistinctHypervisorsAndArchExcludingExternalType(zoneId); SystemVmTemplateRegistration.MetadataTemplateDetails details = Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); - String name = "existing"; - Mockito.when(details.getArch()).thenReturn(CPU.CPUArch.getDefault()); - Mockito.when(details.getName()).thenReturn(name); + when(details.getArch()).thenReturn(CPU.CPUArch.getDefault()); + when(details.getName()).thenReturn(name); + when(details.getUrl()).thenReturn(url); mockedStatic.when(() -> SystemVmTemplateRegistration.getMetadataTemplateDetails(Mockito.any(), Mockito.any())).thenReturn(details); - when(systemVmTemplateRegistration.getRegisteredTemplate(name, arch)) - .thenReturn(null); - doNothing().when(systemVmTemplateRegistration).registerTemplateForNonExistingEntries( - hypervisorType, arch, - name, storeUrlAndId, filePath); + doNothing().when(systemVmTemplateRegistration).registerNewTemplate(name, details, zoneId, + storeUrlAndId.second(), filePath); systemVmTemplateRegistration.registerTemplatesForZone(zoneId, filePath); mockedStatic.verify(() -> SystemVmTemplateRegistration.mountStore(storeUrlAndId.first(), filePath, nfsVersion)); - verify(systemVmTemplateRegistration).registerTemplateForNonExistingEntries(hypervisorType, - arch, name, storeUrlAndId, filePath); + verify(systemVmTemplateRegistration).registerNewTemplate(name, details, zoneId, + storeUrlAndId.second(), filePath); + } + } + + @Test + public void updateOrRegisterSystemVmTemplate_UpdatesRegisteredTemplate() { + SystemVmTemplateRegistration.MetadataTemplateDetails templateDetails = Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); + when(templateDetails.getName()).thenReturn("templateName"); + when(templateDetails.getHypervisorType()).thenReturn(Hypervisor.HypervisorType.KVM); + when(templateDetails.getArch()).thenReturn(CPU.CPUArch.amd64); + when(templateDetails.getUrl()).thenReturn("http://example.com/template"); + VMTemplateVO registeredTemplate = Mockito.mock(VMTemplateVO.class); + when(registeredTemplate.getId()).thenReturn(1L); + doReturn(registeredTemplate).when(systemVmTemplateRegistration).getRegisteredTemplate( + "templateName", Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64, "http://example.com/template"); + doNothing().when(systemVmTemplateRegistration).updateRegisteredTemplateDetails(1L, templateDetails, + null); + + boolean result = systemVmTemplateRegistration.updateOrRegisterSystemVmTemplate(templateDetails, + new ArrayList<>()); + + assertFalse(result); + verify(systemVmTemplateRegistration).updateRegisteredTemplateDetails(1L, templateDetails, null); + } + + @Test + public void updateOrRegisterSystemVmTemplate_SkipsUnusedHypervisorArch() { + SystemVmTemplateRegistration.MetadataTemplateDetails templateDetails = Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); + when(templateDetails.getName()).thenReturn("templateName"); + when(templateDetails.getHypervisorType()).thenReturn(Hypervisor.HypervisorType.KVM); + when(templateDetails.getArch()).thenReturn(CPU.CPUArch.amd64); + when(templateDetails.getUrl()).thenReturn("http://example.com/template"); + doReturn(null).when(systemVmTemplateRegistration).getRegisteredTemplate( + "templateName", Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64, "http://example.com/template"); + doReturn(null).when(vmTemplateDao).findLatestTemplateByTypeAndHypervisorAndArch( + Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64, Storage.TemplateType.SYSTEM); + + boolean result = systemVmTemplateRegistration.updateOrRegisterSystemVmTemplate(templateDetails, new ArrayList<>()); + + assertFalse(result); + verify(systemVmTemplateRegistration, never()).registerTemplates(anyList()); + } + + @Test + public void updateOrRegisterSystemVmTemplate_RegistersNewTemplate() { + SystemVmTemplateRegistration.MetadataTemplateDetails templateDetails = Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); + when(templateDetails.getName()).thenReturn("templateName"); + when(templateDetails.getHypervisorType()).thenReturn(Hypervisor.HypervisorType.KVM); + when(templateDetails.getArch()).thenReturn(CPU.CPUArch.amd64); + when(templateDetails.getUrl()).thenReturn("http://example.com/template"); + doReturn(null).when(systemVmTemplateRegistration).getRegisteredTemplate( + "templateName", Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64, "http://example.com/template"); + List> hypervisorsInUse = new ArrayList<>(); + hypervisorsInUse.add(new Pair<>(Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64)); + doNothing().when(systemVmTemplateRegistration).registerTemplates(hypervisorsInUse); + + boolean result = systemVmTemplateRegistration.updateOrRegisterSystemVmTemplate(templateDetails, hypervisorsInUse); + + assertTrue(result); + verify(systemVmTemplateRegistration).registerTemplates(eq(hypervisorsInUse)); + } + + @Test + public void updateOrRegisterSystemVmTemplate_ThrowsExceptionOnRegistrationFailure() { + SystemVmTemplateRegistration.MetadataTemplateDetails templateDetails = Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); + when(templateDetails.getName()).thenReturn("templateName"); + when(templateDetails.getHypervisorType()).thenReturn(Hypervisor.HypervisorType.KVM); + when(templateDetails.getArch()).thenReturn(CPU.CPUArch.amd64); + when(templateDetails.getUrl()).thenReturn("http://example.com/template"); + doReturn(null).when(systemVmTemplateRegistration).getRegisteredTemplate( + "templateName", Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64, "http://example.com/template"); + List> hypervisorsInUse = new ArrayList<>(); + hypervisorsInUse.add(new Pair<>(Hypervisor.HypervisorType.KVM, CPU.CPUArch.amd64)); + doThrow(new CloudRuntimeException("Registration failed")).when(systemVmTemplateRegistration).registerTemplates(hypervisorsInUse); + + CloudRuntimeException exception = assertThrows(CloudRuntimeException.class, + () -> systemVmTemplateRegistration.updateOrRegisterSystemVmTemplate(templateDetails, hypervisorsInUse)); + + assertTrue(exception.getMessage().contains("Failed to register")); + } + + @Test + public void updateRegisteredTemplateDetails_UpdatesTemplateSuccessfully() { + Long templateId = 1L; + Long zoneId = 2L; + SystemVmTemplateRegistration.MetadataTemplateDetails templateDetails = + Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); + VMTemplateVO templateVO = Mockito.mock(VMTemplateVO.class); + GuestOSVO guestOS = Mockito.mock(GuestOSVO.class); + + when(templateDetails.getGuestOs()).thenReturn("Debian"); + when(templateDetails.getHypervisorType()).thenReturn(Hypervisor.HypervisorType.KVM); + when(templateDetails.getName()).thenReturn("templateName"); + when(vmTemplateDao.findById(templateId)).thenReturn(templateVO); + when(guestOSDao.findOneByDisplayName("Debian")).thenReturn(guestOS); + when(guestOS.getId()).thenReturn(10L); + when(vmTemplateDao.update(templateVO.getId(), templateVO)).thenReturn(true); + doNothing().when(systemVmTemplateRegistration).updateSystemVMEntries(templateId, Hypervisor.HypervisorType.KVM); + doNothing().when(systemVmTemplateRegistration).updateConfigurationParams(Hypervisor.HypervisorType.KVM, + "templateName", zoneId); + + systemVmTemplateRegistration.updateRegisteredTemplateDetails(templateId, templateDetails, zoneId); + + verify(templateVO).setTemplateType(Storage.TemplateType.SYSTEM); + verify(templateVO).setGuestOSId(10); + verify(vmTemplateDao).update(templateVO.getId(), templateVO); + verify(systemVmTemplateRegistration).updateSystemVMEntries(templateId, Hypervisor.HypervisorType.KVM); + verify(systemVmTemplateRegistration).updateConfigurationParams(Hypervisor.HypervisorType.KVM, + "templateName", zoneId); + } + + @Test + public void updateRegisteredTemplateDetails_ThrowsExceptionWhenUpdateFails() { + Long templateId = 1L; + Long zoneId = 2L; + SystemVmTemplateRegistration.MetadataTemplateDetails templateDetails = + Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); + VMTemplateVO templateVO = Mockito.mock(VMTemplateVO.class); + + when(templateDetails.getGuestOs()).thenReturn("Debian"); + when(vmTemplateDao.findById(templateId)).thenReturn(templateVO); + when(vmTemplateDao.update(templateVO.getId(), templateVO)).thenReturn(false); + + CloudRuntimeException exception = assertThrows(CloudRuntimeException.class, + () -> systemVmTemplateRegistration.updateRegisteredTemplateDetails(templateId, templateDetails, zoneId)); + + assertTrue(exception.getMessage().contains("Exception while updating template with id")); + verify(systemVmTemplateRegistration, never()).updateSystemVMEntries(anyLong(), any()); + verify(systemVmTemplateRegistration, never()).updateConfigurationParams(any(), any(), any()); + } + + @Test + public void updateRegisteredTemplateDetails_SkipsGuestOSUpdateWhenNotFound() { + Long templateId = 1L; + Long zoneId = 2L; + SystemVmTemplateRegistration.MetadataTemplateDetails templateDetails = + Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); + VMTemplateVO templateVO = Mockito.mock(VMTemplateVO.class); + + when(templateDetails.getGuestOs()).thenReturn("NonExistentOS"); + when(templateDetails.getHypervisorType()).thenReturn(Hypervisor.HypervisorType.KVM); + when(templateDetails.getName()).thenReturn("templateName"); + when(vmTemplateDao.findById(templateId)).thenReturn(templateVO); + when(guestOSDao.findOneByDisplayName("NonExistentOS")).thenReturn(null); + when(vmTemplateDao.update(templateVO.getId(), templateVO)).thenReturn(true); + doNothing().when(systemVmTemplateRegistration).updateSystemVMEntries(templateId, Hypervisor.HypervisorType.KVM); + doNothing().when(systemVmTemplateRegistration).updateConfigurationParams(Hypervisor.HypervisorType.KVM, + "templateName", zoneId); + + systemVmTemplateRegistration.updateRegisteredTemplateDetails(templateId, templateDetails, zoneId); + + verify(templateVO, never()).setGuestOSId(anyInt()); + verify(vmTemplateDao).update(templateVO.getId(), templateVO); + verify(systemVmTemplateRegistration).updateSystemVMEntries(templateId, Hypervisor.HypervisorType.KVM); + verify(systemVmTemplateRegistration).updateConfigurationParams(Hypervisor.HypervisorType.KVM, + "templateName", zoneId); + } + + @Test + public void registerTemplatesForZone_SuccessfullyRegistersNewTemplate() { + long zoneId = 1L; + String storeMountPath = "/mnt/nfs"; + Pair storeUrlAndId = new Pair<>("nfs://dummy", 100L); + String nfsVersion = "nfs3"; + List> hypervisorArchList = new ArrayList<>(); + Hypervisor.HypervisorType hypervisorType = Hypervisor.HypervisorType.KVM; + CPU.CPUArch arch = CPU.CPUArch.amd64; + hypervisorArchList.add(new Pair<>(hypervisorType, arch)); + SystemVmTemplateRegistration.MetadataTemplateDetails templateDetails = + Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); + when(templateDetails.getHypervisorType()).thenReturn(hypervisorType); + when(templateDetails.getArch()).thenReturn(arch); + String name = "TestTemplate"; + String url = "http://example.com/template"; + when(templateDetails.getName()).thenReturn(name); + when(templateDetails.getUrl()).thenReturn(url); + doReturn(storeUrlAndId).when(systemVmTemplateRegistration).getNfsStoreInZone(zoneId); + doReturn(nfsVersion).when(systemVmTemplateRegistration).getNfsVersion(storeUrlAndId.second()); + doReturn(null).when(systemVmTemplateRegistration).getRegisteredTemplate( + name, hypervisorType, arch, url); + doNothing().when(systemVmTemplateRegistration).registerNewTemplate( + name, templateDetails, zoneId, storeUrlAndId.second(), storeMountPath); + doReturn(hypervisorArchList).when(clusterDao).listDistinctHypervisorsAndArchExcludingExternalType(zoneId); + try (MockedStatic mockedStatic = + Mockito.mockStatic(SystemVmTemplateRegistration.class)) { + mockedStatic.when(() -> SystemVmTemplateRegistration.getMetadataTemplateDetails( + hypervisorType, arch)).thenReturn(templateDetails); + + systemVmTemplateRegistration.registerTemplatesForZone(zoneId, storeMountPath); + + mockedStatic.verify(() -> SystemVmTemplateRegistration.mountStore( + eq(storeUrlAndId.first()), eq(storeMountPath), eq(nfsVersion)), times(1)); + verify(systemVmTemplateRegistration).registerNewTemplate( + templateDetails.getName(), templateDetails, zoneId, storeUrlAndId.second(), storeMountPath); + } + } + + @Test + public void registerTemplatesForZone_SkipsWhenTemplateDetailsNotFound() { + long zoneId = 1L; + String storeMountPath = "/mnt/nfs"; + Pair storeUrlAndId = new Pair<>("nfs://dummy", 100L); + String nfsVersion = "nfs3"; + List> hypervisorArchList = new ArrayList<>(); + Hypervisor.HypervisorType hypervisorType = Hypervisor.HypervisorType.KVM; + CPU.CPUArch arch = CPU.CPUArch.amd64; + hypervisorArchList.add(new Pair<>(hypervisorType, arch)); + doReturn(storeUrlAndId).when(systemVmTemplateRegistration).getNfsStoreInZone(zoneId); + doReturn(nfsVersion).when(systemVmTemplateRegistration).getNfsVersion(storeUrlAndId.second()); + doReturn(hypervisorArchList).when(clusterDao).listDistinctHypervisorsAndArchExcludingExternalType(zoneId); + + try (MockedStatic mockedStatic = + Mockito.mockStatic(SystemVmTemplateRegistration.class)) { + mockedStatic.when(() -> SystemVmTemplateRegistration.getMetadataTemplateDetails( + hypervisorType, arch)).thenReturn(null); + + systemVmTemplateRegistration.registerTemplatesForZone(zoneId, storeMountPath); + + mockedStatic.verify(() -> SystemVmTemplateRegistration.mountStore( + eq(storeUrlAndId.first()), eq(storeMountPath), eq(nfsVersion)), times(1)); + verify(systemVmTemplateRegistration, never()).registerNewTemplate(any(), any(), anyLong(), anyLong(), any()); + } + } + + @Test + public void registerTemplatesForZone_AddsExistingTemplateToStore() { + long zoneId = 1L; + String storeMountPath = "/mnt/nfs"; + Pair storeUrlAndId = new Pair<>("nfs://dummy", 100L); + String nfsVersion = "nfs3"; + List> hypervisorArchList = new ArrayList<>(); + Hypervisor.HypervisorType hypervisorType = Hypervisor.HypervisorType.KVM; + CPU.CPUArch arch = CPU.CPUArch.amd64; + hypervisorArchList.add(new Pair<>(hypervisorType, arch)); + SystemVmTemplateRegistration.MetadataTemplateDetails templateDetails = + Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); + when(templateDetails.getHypervisorType()).thenReturn(hypervisorType); + when(templateDetails.getArch()).thenReturn(arch); + String name = "TestTemplate"; + String url = "http://example.com/template"; + when(templateDetails.getName()).thenReturn(name); + when(templateDetails.getUrl()).thenReturn(url); + VMTemplateVO templateVO = Mockito.mock(VMTemplateVO.class); + long templateId = 100L; + when(templateVO.getId()).thenReturn(templateId); + TemplateDataStoreVO templateDataStoreVO = Mockito.mock(TemplateDataStoreVO.class); + String installPath = "/template/install/path"; + when(templateDataStoreVO.getInstallPath()).thenReturn(installPath); + + doReturn(storeUrlAndId).when(systemVmTemplateRegistration).getNfsStoreInZone(zoneId); + doReturn(nfsVersion).when(systemVmTemplateRegistration).getNfsVersion(storeUrlAndId.second()); + doReturn(hypervisorArchList).when(clusterDao).listDistinctHypervisorsAndArchExcludingExternalType(zoneId); + doReturn(templateVO).when(systemVmTemplateRegistration).getRegisteredTemplate(name, hypervisorType, arch, url); + doReturn(templateDataStoreVO).when(templateDataStoreDao) + .findByStoreTemplate(storeUrlAndId.second(), templateId); + doReturn(false).when(systemVmTemplateRegistration).validateIfSeeded( + templateDataStoreVO, storeUrlAndId.first(), installPath, nfsVersion); + doNothing().when(systemVmTemplateRegistration).addExistingTemplateToStore( + templateVO, templateDetails, templateDataStoreVO, zoneId, storeUrlAndId.second(), storeMountPath); + doNothing().when(systemVmTemplateRegistration).updateRegisteredTemplateDetails( + templateId, templateDetails, zoneId); + + try (MockedStatic mockedStatic = + Mockito.mockStatic(SystemVmTemplateRegistration.class)) { + mockedStatic.when(() -> SystemVmTemplateRegistration.getMetadataTemplateDetails( + hypervisorType, arch)).thenReturn(templateDetails); + + systemVmTemplateRegistration.registerTemplatesForZone(zoneId, storeMountPath); + + verify(systemVmTemplateRegistration).addExistingTemplateToStore( + templateVO, templateDetails, templateDataStoreVO, zoneId, storeUrlAndId.second(), storeMountPath); + verify(systemVmTemplateRegistration).updateRegisteredTemplateDetails(templateId, templateDetails, zoneId); + } + } + + @Test + public void performTemplateRegistrationOperations_CreatesNewTemplateWhenNotExists() { + String name = "TestTemplate"; + String url = "http://example.com/template"; + String checksum = "abc123"; + Storage.ImageFormat format = Storage.ImageFormat.QCOW2; + long guestOsId = 1L; + Long storeId = 100L; + Long templateId = null; + String filePath = "/mnt/nfs"; + TemplateDataStoreVO templateDataStoreVO = null; + SystemVmTemplateRegistration.MetadataTemplateDetails templateDetails = Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); + + when(templateDetails.getHypervisorType()).thenReturn(Hypervisor.HypervisorType.KVM); + when(templateDetails.getArch()).thenReturn(CPU.CPUArch.amd64); + doReturn(new VMTemplateVO()).when(vmTemplateDao).persist(any()); + doNothing().when(systemVmTemplateRegistration).createCrossZonesTemplateZoneRefEntries(anyLong()); + doNothing().when(systemVmTemplateRegistration).createTemplateStoreRefEntry(any()); + doNothing().when(systemVmTemplateRegistration).setupTemplateOnStore(anyString(), any(), anyString()); + doNothing().when(systemVmTemplateRegistration).readTemplateProperties(anyString(), any()); + doNothing().when(systemVmTemplateRegistration).updateTemplateDetails(any()); + + Long result = systemVmTemplateRegistration.performTemplateRegistrationOperations(name, templateDetails, url, checksum, format, guestOsId, storeId, templateId, filePath, templateDataStoreVO); + + assertNotNull(result); + verify(vmTemplateDao).persist(any()); + verify(systemVmTemplateRegistration).createCrossZonesTemplateZoneRefEntries(anyLong()); + verify(systemVmTemplateRegistration).createTemplateStoreRefEntry(any()); + verify(systemVmTemplateRegistration).setupTemplateOnStore(anyString(), any(), anyString()); + verify(systemVmTemplateRegistration).updateTemplateDetails(any()); + } + + @Test + public void performTemplateRegistrationOperations_UpdatesExistingTemplate() { + String name = "TestTemplate"; + String url = "http://example.com/template"; + String checksum = "abc123"; + Storage.ImageFormat format = Storage.ImageFormat.QCOW2; + long guestOsId = 1L; + Long storeId = 100L; + Long templateId = 1L; + String filePath = "/mnt/nfs"; + TemplateDataStoreVO templateDataStoreVO = Mockito.mock(TemplateDataStoreVO.class); + SystemVmTemplateRegistration.MetadataTemplateDetails templateDetails = Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); + + when(templateDetails.getHypervisorType()).thenReturn(Hypervisor.HypervisorType.KVM); + when(templateDetails.getArch()).thenReturn(CPU.CPUArch.amd64); + doNothing().when(systemVmTemplateRegistration).createCrossZonesTemplateZoneRefEntries(anyLong()); + doNothing().when(systemVmTemplateRegistration).setupTemplateOnStore(anyString(), any(), anyString()); + doNothing().when(systemVmTemplateRegistration).readTemplateProperties(anyString(), any()); + doNothing().when(systemVmTemplateRegistration).updateTemplateDetails(any()); + + Long result = systemVmTemplateRegistration.performTemplateRegistrationOperations(name, templateDetails, url, checksum, format, guestOsId, storeId, templateId, filePath, templateDataStoreVO); + + assertNotNull(result); + assertEquals(templateId, result); + verify(vmTemplateDao, never()).persist(any()); + verify(systemVmTemplateRegistration).createCrossZonesTemplateZoneRefEntries(anyLong()); + verify(systemVmTemplateRegistration, never()).createTemplateStoreRefEntry(any()); + verify(systemVmTemplateRegistration).setupTemplateOnStore(anyString(), any(), anyString()); + verify(systemVmTemplateRegistration).updateTemplateDetails(any()); + } + + @Test + public void performTemplateRegistrationOperations_ThrowsExceptionWhenTemplateCreationFails() { + String name = "TestTemplate"; + String url = "http://example.com/template"; + String checksum = "abc123"; + Storage.ImageFormat format = Storage.ImageFormat.QCOW2; + long guestOsId = 1L; + Long storeId = 100L; + Long templateId = null; + String filePath = "/mnt/nfs"; + TemplateDataStoreVO templateDataStoreVO = null; + SystemVmTemplateRegistration.MetadataTemplateDetails templateDetails = Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); + + when(templateDetails.getHypervisorType()).thenReturn(Hypervisor.HypervisorType.KVM); + when(templateDetails.getArch()).thenReturn(CPU.CPUArch.amd64); + doReturn(null).when(vmTemplateDao).persist(any()); + + assertThrows(CloudRuntimeException.class, () -> { + systemVmTemplateRegistration.performTemplateRegistrationOperations(name, templateDetails, url, checksum, format, guestOsId, storeId, templateId, filePath, templateDataStoreVO); + }); + + verify(vmTemplateDao).persist(any()); + verify(systemVmTemplateRegistration, never()).createCrossZonesTemplateZoneRefEntries(anyLong()); + verify(systemVmTemplateRegistration, never()).createTemplateStoreRefEntry(any()); + verify(systemVmTemplateRegistration, never()).setupTemplateOnStore(anyString(), any(), anyString()); + verify(systemVmTemplateRegistration, never()).updateTemplateDetails(any()); + } + + @Test + public void setupTemplateOnStore_ThrowsExceptionWhenScriptNotFound() { + String templateName = "templateName"; + String destTempFolder = "/tmp/folder"; + SystemVmTemplateRegistration.MetadataTemplateDetails templateDetails = + Mockito.mock(SystemVmTemplateRegistration.MetadataTemplateDetails.class); + + try (MockedStatic