mirror of https://github.com/apache/cloudstack.git
Compare commits
222 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
a7f9756d62 | |
|
|
6bc83a3c46 | |
|
|
a1959f2dc2 | |
|
|
be51948146 | |
|
|
7308dad19a | |
|
|
c0ce5b461f | |
|
|
e3245515e8 | |
|
|
6786d45951 | |
|
|
3f6866d70a | |
|
|
7f849e9362 | |
|
|
b16340399b | |
|
|
583a1e0dfb | |
|
|
2ae1015073 | |
|
|
ea771a7013 | |
|
|
a0aafe2fa7 | |
|
|
67b849f3ef | |
|
|
21b2025c50 | |
|
|
6b831f5196 | |
|
|
850b44317a | |
|
|
d1e1aa5d20 | |
|
|
1fe486f493 | |
|
|
a47091431a | |
|
|
3c1f03144f | |
|
|
35ac91e58b | |
|
|
ca4645320e | |
|
|
c267ad39bc | |
|
|
38c001296a | |
|
|
c165806d3b | |
|
|
68221cf101 | |
|
|
3285e2fad8 | |
|
|
522283bdec | |
|
|
94d911be9a | |
|
|
4a49ffa9aa | |
|
|
79bb8ef1cc | |
|
|
5893ba5a8c | |
|
|
e1521f139b | |
|
|
a4a52c9665 | |
|
|
72b99a3f8c | |
|
|
4425ee4234 | |
|
|
f6efda50d2 | |
|
|
cbc1ae7388 | |
|
|
96ca1b2a7c | |
|
|
a7c2a059f5 | |
|
|
1e512ab9c6 | |
|
|
a17bff9ba8 | |
|
|
08b1d38755 | |
|
|
8906aa1d46 | |
|
|
c07f1fd5d2 | |
|
|
c45596cca3 | |
|
|
a73cc9a22c | |
|
|
089eb36e47 | |
|
|
e2c13da419 | |
|
|
6f4445c5c1 | |
|
|
856d83a15e | |
|
|
9f96c9d5eb | |
|
|
3166e64891 | |
|
|
f820d0125d | |
|
|
2d6280b9da | |
|
|
82bfa9fb3f | |
|
|
ed575cc0a1 | |
|
|
5b696c0ec7 | |
|
|
9f57a4dd19 | |
|
|
11538df710 | |
|
|
c3614098da | |
|
|
30dd234b00 | |
|
|
e2d18c0748 | |
|
|
4f93ba888c | |
|
|
5d61ba3538 | |
|
|
5d95bdd0eb | |
|
|
7eea9ed448 | |
|
|
18075ae4a9 | |
|
|
cf9bda2050 | |
|
|
6bcbb008b4 | |
|
|
1bff543e58 | |
|
|
b744824f65 | |
|
|
3bd5410f9a | |
|
|
93239e09f1 | |
|
|
8c579538f9 | |
|
|
faaf7669c5 | |
|
|
d8f748ad0e | |
|
|
74af9b9875 | |
|
|
9bbd32a8ef | |
|
|
7ad68aafa5 | |
|
|
75620309c2 | |
|
|
9cc6c09b9e | |
|
|
608345d165 | |
|
|
da85858e93 | |
|
|
a8bd02f8ba | |
|
|
17ec4fc31c | |
|
|
30e6c224bd | |
|
|
c0db75b9fa | |
|
|
a1bcae9213 | |
|
|
62eb4b7828 | |
|
|
22cda0c77b | |
|
|
a7dc5efad5 | |
|
|
c79b33c1fb | |
|
|
b1edfb8d60 | |
|
|
d3e1976912 | |
|
|
408e8c079d | |
|
|
e929f2024a | |
|
|
e32d08e50e | |
|
|
a5b6bc3be6 | |
|
|
7b94ccc443 | |
|
|
a38205ebf0 | |
|
|
a7178ee687 | |
|
|
18972caf5f | |
|
|
9d523cbbfe | |
|
|
bb391c3deb | |
|
|
bac3421da4 | |
|
|
bb8e7d39e6 | |
|
|
8bea89a80b | |
|
|
ffb8b91ff5 | |
|
|
8c2a030816 | |
|
|
0b62fb5e20 | |
|
|
a55f85af50 | |
|
|
c681d0d0a2 | |
|
|
9b4f16b73f | |
|
|
10e0d42f45 | |
|
|
98debd235f | |
|
|
106f478e2c | |
|
|
d83c2e4225 | |
|
|
ded975ceb8 | |
|
|
69c69dc537 | |
|
|
37507e8799 | |
|
|
38e30a116c | |
|
|
0e7f74839a | |
|
|
434e472ef8 | |
|
|
7001d43dbf | |
|
|
25cb545325 | |
|
|
66665b883c | |
|
|
5aced73250 | |
|
|
cb822feb72 | |
|
|
d6c192c0f0 | |
|
|
cd2d71104e | |
|
|
416568a373 | |
|
|
ac2242ece2 | |
|
|
f292143af8 | |
|
|
88181ebe72 | |
|
|
7178bfe9eb | |
|
|
e3999923a7 | |
|
|
4bcf3ea57d | |
|
|
420bf6dff8 | |
|
|
1b0a036a5b | |
|
|
e2f4ed9dcf | |
|
|
04b58acdd6 | |
|
|
8b2f1f19c2 | |
|
|
002d9768b2 | |
|
|
b31c2f4cae | |
|
|
a566af35f5 | |
|
|
507c4cd128 | |
|
|
538578366a | |
|
|
b8813c7b24 | |
|
|
2358632253 | |
|
|
2811217578 | |
|
|
1b861dad48 | |
|
|
1ef6365771 | |
|
|
bc76f2042d | |
|
|
fd1c67f473 | |
|
|
e47d7bc6ff | |
|
|
eedd32971f | |
|
|
c465caf81e | |
|
|
4628385051 | |
|
|
cd55796972 | |
|
|
81b991ae9c | |
|
|
46cb805c90 | |
|
|
40d21f093f | |
|
|
34b8870f59 | |
|
|
5bf869c803 | |
|
|
e0c13cc3ec | |
|
|
22da57f922 | |
|
|
e2d3773362 | |
|
|
eb93f0105e | |
|
|
558232e8e6 | |
|
|
13f805fbf3 | |
|
|
bb5da0e49c | |
|
|
28820f6e25 | |
|
|
91376c7994 | |
|
|
e21aacf5be | |
|
|
10d76d3384 | |
|
|
2ac2e5ba33 | |
|
|
124fcde59c | |
|
|
53a39d3ff7 | |
|
|
f06ac512fa | |
|
|
da1c7cebf9 | |
|
|
39d0d62fdd | |
|
|
f570e16836 | |
|
|
1919dcfb7c | |
|
|
f417c6b0a1 | |
|
|
78f9e6584b | |
|
|
cfe96026dc | |
|
|
3c6484792d | |
|
|
51910cd260 | |
|
|
5151f8dc6a | |
|
|
c81295439f | |
|
|
b0d74fe00c | |
|
|
26009659f9 | |
|
|
f3a112fd9e | |
|
|
db6147060b | |
|
|
5798fb43a3 | |
|
|
4e61ddd1bc | |
|
|
9032fe3fb5 | |
|
|
8171d9568c | |
|
|
6dc259c7da | |
|
|
39126a4339 | |
|
|
aa18188d30 | |
|
|
4ed86a2627 | |
|
|
86ae1fee7f | |
|
|
ac3b18095a | |
|
|
fff4cafdca | |
|
|
a5b455ff3a | |
|
|
8b034dc439 | |
|
|
dc8f465527 | |
|
|
f985a67f4d | |
|
|
5f9e131198 | |
|
|
23fb0e2ccb | |
|
|
40c8bc528d | |
|
|
8c86f24261 | |
|
|
a50de029bf | |
|
|
81b2c38be9 | |
|
|
dbda673e1f | |
|
|
e66926e6a4 | |
|
|
15c2e50338 |
15
.asf.yaml
15
.asf.yaml
|
|
@ -50,16 +50,13 @@ github:
|
||||||
rebase: false
|
rebase: false
|
||||||
|
|
||||||
collaborators:
|
collaborators:
|
||||||
- acs-robot
|
- ingox
|
||||||
- gpordeus
|
- gp-santos
|
||||||
- hsato03
|
|
||||||
- FelipeM525
|
|
||||||
- lucas-a-martins
|
|
||||||
- nicoschmdt
|
|
||||||
- abh1sar
|
|
||||||
- rosi-shapeblue
|
|
||||||
- sudo87
|
|
||||||
- erikbocks
|
- erikbocks
|
||||||
|
- Imvedansh
|
||||||
|
- Damans227
|
||||||
|
- jmsperu
|
||||||
|
- GaOrtiga
|
||||||
|
|
||||||
protected_branches: ~
|
protected_branches: ~
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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.
|
||||||
|
|
||||||
|
[codespell]
|
||||||
|
ignore-words = .github/linters/codespell.txt
|
||||||
|
skip = systemvm/agent/noVNC/*,ui/package.json,ui/package-lock.json,ui/public/js/less.min.js,ui/public/locales/*.json,server/src/test/java/org/apache/cloudstack/network/ssl/CertServiceTest.java,test/integration/smoke/test_ssl_offloading.py
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
.github/workflows/*.lock.yml linguist-generated=true merge=ours
|
||||||
|
|
@ -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.
|
||||||
|
|
||||||
|
/plugins/storage/volume/linstor @rp-
|
||||||
|
/plugins/storage/volume/storpool @slavkap
|
||||||
|
/plugins/storage/volume/ontap @rajiv1 @sandeeplocharla @piyush5 @suryag
|
||||||
|
|
||||||
|
.pre-commit-config.yaml @jbampton
|
||||||
|
/.github/linters/ @jbampton
|
||||||
|
|
||||||
|
/plugins/network-elements/nsx/ @Pearl1594 @nvazquez
|
||||||
|
|
@ -0,0 +1,31 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
name: 'Install CloudStack Non-OSS'
|
||||||
|
description: 'Clones and installs the shapeblue/cloudstack-nonoss repository.'
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Install cloudstack-nonoss
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
git clone --depth 1 https://github.com/shapeblue/cloudstack-nonoss.git nonoss
|
||||||
|
cd nonoss
|
||||||
|
bash -x install-non-oss.sh
|
||||||
|
cd ..
|
||||||
|
rm -fr nonoss
|
||||||
|
|
@ -0,0 +1,58 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
name: 'Setup CloudStack Environment'
|
||||||
|
description: 'Sets up JDK (with Maven cache), optionally Python, and optionally APT build dependencies for CloudStack.'
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
java-version:
|
||||||
|
description: 'The JDK version to use'
|
||||||
|
required: false
|
||||||
|
default: '17'
|
||||||
|
install-python:
|
||||||
|
description: 'Whether to install Python 3.10'
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
|
install-apt-deps:
|
||||||
|
description: 'Whether to install CloudStack APT build dependencies'
|
||||||
|
required: false
|
||||||
|
default: 'false'
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Set up JDK ${{ inputs.java-version }}
|
||||||
|
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
|
||||||
|
with:
|
||||||
|
java-version: ${{ inputs.java-version }}
|
||||||
|
distribution: 'adopt'
|
||||||
|
architecture: x64
|
||||||
|
cache: 'maven'
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
if: ${{ inputs.install-python == 'true' }}
|
||||||
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||||
|
with:
|
||||||
|
python-version: '3.10'
|
||||||
|
architecture: x64
|
||||||
|
|
||||||
|
- name: Install Build Dependencies
|
||||||
|
if: ${{ inputs.install-apt-deps == 'true' }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y git uuid-runtime genisoimage netcat-openbsd ipmitool build-essential libgcrypt20 libgpg-error-dev libgpg-error0 libopenipmi0 libpython3-dev libssl-dev libffi-dev python3-openssl python3-dev python3-setuptools
|
||||||
|
|
@ -0,0 +1,56 @@
|
||||||
|
{
|
||||||
|
"entries": {
|
||||||
|
"actions/github-script@v9.0.0": {
|
||||||
|
"repo": "actions/github-script",
|
||||||
|
"version": "v9.0.0",
|
||||||
|
"sha": "3a2844b7e9c422d3c10d287c895573f7108da1b3"
|
||||||
|
},
|
||||||
|
"github/gh-aw-actions/setup@v0.76.1": {
|
||||||
|
"repo": "github/gh-aw-actions/setup",
|
||||||
|
"version": "v0.76.1",
|
||||||
|
"sha": "46d564922b082d0db93244972e8005ea6904ee5f"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"containers": {
|
||||||
|
"ghcr.io/github/gh-aw-firewall/agent:0.18.0": {
|
||||||
|
"image": "ghcr.io/github/gh-aw-firewall/agent:0.18.0",
|
||||||
|
"digest": "sha256:ab84dfc7f5998cb8cd0c596526dd573b7e7d06c6a740266a1e6df879fa16c866",
|
||||||
|
"pinned_image": "ghcr.io/github/gh-aw-firewall/agent:0.18.0@sha256:ab84dfc7f5998cb8cd0c596526dd573b7e7d06c6a740266a1e6df879fa16c866"
|
||||||
|
},
|
||||||
|
"ghcr.io/github/gh-aw-firewall/agent:0.25.55": {
|
||||||
|
"image": "ghcr.io/github/gh-aw-firewall/agent:0.25.55",
|
||||||
|
"digest": "sha256:138c363411decc9a61a5af9b95e8d64c76648b00add0ba06fc7ba786f0e72731",
|
||||||
|
"pinned_image": "ghcr.io/github/gh-aw-firewall/agent:0.25.55@sha256:138c363411decc9a61a5af9b95e8d64c76648b00add0ba06fc7ba786f0e72731"
|
||||||
|
},
|
||||||
|
"ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55": {
|
||||||
|
"image": "ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55",
|
||||||
|
"digest": "sha256:4142b873b678cd3279b98dcbe464857d56ea2f2348719b00379cdf35dd843ff3",
|
||||||
|
"pinned_image": "ghcr.io/github/gh-aw-firewall/api-proxy:0.25.55@sha256:4142b873b678cd3279b98dcbe464857d56ea2f2348719b00379cdf35dd843ff3"
|
||||||
|
},
|
||||||
|
"ghcr.io/github/gh-aw-firewall/squid:0.18.0": {
|
||||||
|
"image": "ghcr.io/github/gh-aw-firewall/squid:0.18.0",
|
||||||
|
"digest": "sha256:82a5d062a5612a57a43a171a5b79ddbb690a86a8ddda02339cc1675131ae9f8b",
|
||||||
|
"pinned_image": "ghcr.io/github/gh-aw-firewall/squid:0.18.0@sha256:82a5d062a5612a57a43a171a5b79ddbb690a86a8ddda02339cc1675131ae9f8b"
|
||||||
|
},
|
||||||
|
"ghcr.io/github/gh-aw-firewall/squid:0.25.55": {
|
||||||
|
"image": "ghcr.io/github/gh-aw-firewall/squid:0.25.55",
|
||||||
|
"digest": "sha256:74084b704d8d3664a363655986664d70bd9cdb4830532d0b35cd784d867aabca",
|
||||||
|
"pinned_image": "ghcr.io/github/gh-aw-firewall/squid:0.25.55@sha256:74084b704d8d3664a363655986664d70bd9cdb4830532d0b35cd784d867aabca"
|
||||||
|
},
|
||||||
|
"ghcr.io/github/gh-aw-mcpg:v0.1.4": {
|
||||||
|
"image": "ghcr.io/github/gh-aw-mcpg:v0.1.4",
|
||||||
|
"digest": "sha256:0acf25aa1d409f9c73be9e39ac84f4bd4b90d8bfa1db4dc6d7f47d38ccd58914",
|
||||||
|
"pinned_image": "ghcr.io/github/gh-aw-mcpg:v0.1.4@sha256:0acf25aa1d409f9c73be9e39ac84f4bd4b90d8bfa1db4dc6d7f47d38ccd58914"
|
||||||
|
},
|
||||||
|
"ghcr.io/github/gh-aw-mcpg:v0.3.19": {
|
||||||
|
"image": "ghcr.io/github/gh-aw-mcpg:v0.3.19",
|
||||||
|
"digest": "sha256:a6c890d7c24d7190c9ef97b9c954cc4cffaae6b01c371ced1f959f1370b1f68f",
|
||||||
|
"pinned_image": "ghcr.io/github/gh-aw-mcpg:v0.3.19@sha256:a6c890d7c24d7190c9ef97b9c954cc4cffaae6b01c371ced1f959f1370b1f68f"
|
||||||
|
},
|
||||||
|
"ghcr.io/github/github-mcp-server:v0.30.3": {
|
||||||
|
"image": "ghcr.io/github/github-mcp-server:v0.30.3",
|
||||||
|
"digest": "sha256:a2b5fb79b1cee851bfc3532dfe480c3dc5736974ca9d93a7a9f68e52ce4b62a0",
|
||||||
|
"pinned_image": "ghcr.io/github/github-mcp-server:v0.30.3@sha256:a2b5fb79b1cee851bfc3532dfe480c3dc5736974ca9d93a7a9f68e52ce4b62a0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Mark all cached import files as generated
|
||||||
|
* linguist-generated=true
|
||||||
|
|
||||||
|
# Use 'ours' merge strategy to keep local cached versions
|
||||||
|
* merge=ours
|
||||||
73
.github/aw/imports/github/gh-aw/359795d49ada21681ab616bd4cbcb144a7387115/.github_workflows_shared_reporting.md
generated
vendored
Normal file
73
.github/aw/imports/github/gh-aw/359795d49ada21681ab616bd4cbcb144a7387115/.github_workflows_shared_reporting.md
generated
vendored
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
---
|
||||||
|
# Report formatting guidelines
|
||||||
|
---
|
||||||
|
|
||||||
|
## Report Structure Guidelines
|
||||||
|
|
||||||
|
### 1. Header Levels
|
||||||
|
**Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
|
||||||
|
|
||||||
|
When creating GitHub issues or discussions:
|
||||||
|
- Use `###` (h3) for main sections (e.g., "### Test Summary")
|
||||||
|
- Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
|
||||||
|
- Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
|
||||||
|
|
||||||
|
### 2. Progressive Disclosure
|
||||||
|
**Wrap detailed test results in `<details><summary>Section Name</summary>` tags to improve readability and reduce scrolling.**
|
||||||
|
|
||||||
|
Use collapsible sections for:
|
||||||
|
- Verbose details (full test logs, raw data)
|
||||||
|
- Secondary information (minor warnings, extra context)
|
||||||
|
- Per-item breakdowns when there are many items
|
||||||
|
|
||||||
|
Always keep critical information visible (summary, critical issues, key metrics).
|
||||||
|
|
||||||
|
### 3. Report Structure Pattern
|
||||||
|
|
||||||
|
1. **Overview**: 1-2 paragraphs summarizing key findings
|
||||||
|
2. **Critical Information**: Show immediately (summary stats, critical issues)
|
||||||
|
3. **Details**: Use `<details><summary>Section Name</summary>` for expanded content
|
||||||
|
4. **Context**: Add helpful metadata (workflow run, date, trigger)
|
||||||
|
|
||||||
|
### Design Principles (Airbnb-Inspired)
|
||||||
|
|
||||||
|
Reports should:
|
||||||
|
- **Build trust through clarity**: Most important info immediately visible
|
||||||
|
- **Exceed expectations**: Add helpful context like trends, comparisons
|
||||||
|
- **Create delight**: Use progressive disclosure to reduce overwhelm
|
||||||
|
- **Maintain consistency**: Follow patterns across all reports
|
||||||
|
|
||||||
|
### Example Report Structure
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
### Summary
|
||||||
|
- Key metric 1: value
|
||||||
|
- Key metric 2: value
|
||||||
|
- Status: ✅/⚠️/❌
|
||||||
|
|
||||||
|
### Critical Issues
|
||||||
|
[Always visible - these are important]
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>View Detailed Results</summary>
|
||||||
|
|
||||||
|
[Comprehensive details, logs, traces]
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>View All Warnings</summary>
|
||||||
|
|
||||||
|
[Minor issues and potential problems]
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### Recommendations
|
||||||
|
[Actionable next steps - keep visible]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Workflow Run References
|
||||||
|
|
||||||
|
- Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
|
||||||
|
- Include up to 3 most relevant run URLs at end under `**References:**`
|
||||||
|
- Do NOT add footer attribution (system adds automatically)
|
||||||
73
.github/aw/imports/github/gh-aw/94662b1dee8ce96c876ba9f33b3ab8be32de82a4/.github_workflows_shared_reporting.md
generated
vendored
Normal file
73
.github/aw/imports/github/gh-aw/94662b1dee8ce96c876ba9f33b3ab8be32de82a4/.github_workflows_shared_reporting.md
generated
vendored
Normal file
|
|
@ -0,0 +1,73 @@
|
||||||
|
---
|
||||||
|
# Report formatting guidelines
|
||||||
|
---
|
||||||
|
|
||||||
|
## Report Structure Guidelines
|
||||||
|
|
||||||
|
### 1. Header Levels
|
||||||
|
**Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
|
||||||
|
|
||||||
|
When creating GitHub issues or discussions:
|
||||||
|
- Use `###` (h3) for main sections (e.g., "### Test Summary")
|
||||||
|
- Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
|
||||||
|
- Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
|
||||||
|
|
||||||
|
### 2. Progressive Disclosure
|
||||||
|
**Wrap detailed test results in `<details><summary><b>Section Name</b></summary>` tags to improve readability and reduce scrolling.**
|
||||||
|
|
||||||
|
Use collapsible sections for:
|
||||||
|
- Verbose details (full test logs, raw data)
|
||||||
|
- Secondary information (minor warnings, extra context)
|
||||||
|
- Per-item breakdowns when there are many items
|
||||||
|
|
||||||
|
Always keep critical information visible (summary, critical issues, key metrics).
|
||||||
|
|
||||||
|
### 3. Report Structure Pattern
|
||||||
|
|
||||||
|
1. **Overview**: 1-2 paragraphs summarizing key findings
|
||||||
|
2. **Critical Information**: Show immediately (summary stats, critical issues)
|
||||||
|
3. **Details**: Use `<details><summary><b>Section Name</b></summary>` for expanded content
|
||||||
|
4. **Context**: Add helpful metadata (workflow run, date, trigger)
|
||||||
|
|
||||||
|
### Design Principles (Airbnb-Inspired)
|
||||||
|
|
||||||
|
Reports should:
|
||||||
|
- **Build trust through clarity**: Most important info immediately visible
|
||||||
|
- **Exceed expectations**: Add helpful context like trends, comparisons
|
||||||
|
- **Create delight**: Use progressive disclosure to reduce overwhelm
|
||||||
|
- **Maintain consistency**: Follow patterns across all reports
|
||||||
|
|
||||||
|
### Example Report Structure
|
||||||
|
|
||||||
|
```markdown
|
||||||
|
### Summary
|
||||||
|
- Key metric 1: value
|
||||||
|
- Key metric 2: value
|
||||||
|
- Status: ✅/⚠️/❌
|
||||||
|
|
||||||
|
### Critical Issues
|
||||||
|
[Always visible - these are important]
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><b>View Detailed Results</b></summary>
|
||||||
|
|
||||||
|
[Comprehensive details, logs, traces]
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><b>View All Warnings</b></summary>
|
||||||
|
|
||||||
|
[Minor issues and potential problems]
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
### Recommendations
|
||||||
|
[Actionable next steps - keep visible]
|
||||||
|
```
|
||||||
|
|
||||||
|
## Workflow Run References
|
||||||
|
|
||||||
|
- Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
|
||||||
|
- Include up to 3 most relevant run URLs at end under `**References:**`
|
||||||
|
- Do NOT add footer attribution (system adds automatically)
|
||||||
|
|
@ -0,0 +1,43 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
# 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: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
open-pull-requests-limit: 2
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
groups:
|
||||||
|
github-actions-dependencies:
|
||||||
|
patterns:
|
||||||
|
- "*"
|
||||||
|
ignore:
|
||||||
|
- dependency-name: "github/gh-aw-actions/**" # Managed by gh aw compile. Version-locked to the gh-aw compiler; do not bump.
|
||||||
|
cooldown:
|
||||||
|
default-days: 7
|
||||||
|
- package-ecosystem: "maven"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "daily"
|
||||||
|
cooldown:
|
||||||
|
default-days: 7
|
||||||
|
|
@ -15,13 +15,14 @@
|
||||||
# specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
---
|
---
|
||||||
extends: relaxed
|
extends: default
|
||||||
|
|
||||||
rules:
|
rules:
|
||||||
line-length:
|
line-length:
|
||||||
max: 400 # Very forgiving for GitHub Actions and infrastructure files
|
max: 400 # Very forgiving for GitHub Actions and infrastructure files
|
||||||
indentation: disable # Disable indentation checking for existing files
|
indentation: disable # Disable indentation checking for existing files
|
||||||
comments: disable # Disable comment formatting checks
|
comments: disable # Disable comment formatting checks
|
||||||
|
braces: disable
|
||||||
brackets: disable # Disable bracket spacing checks
|
brackets: disable # Disable bracket spacing checks
|
||||||
colons:
|
colons:
|
||||||
max-spaces-after: -1 # Allow any number of spaces after colon
|
max-spaces-after: -1 # Allow any number of spaces after colon
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ acount
|
||||||
actuall
|
actuall
|
||||||
acuiring
|
acuiring
|
||||||
acumulate
|
acumulate
|
||||||
|
addin
|
||||||
addreess
|
addreess
|
||||||
addtion
|
addtion
|
||||||
adminstrator
|
adminstrator
|
||||||
|
|
@ -12,10 +13,8 @@ afrer
|
||||||
afterall
|
afterall
|
||||||
againt
|
againt
|
||||||
ags
|
ags
|
||||||
aktive
|
|
||||||
algoritm
|
algoritm
|
||||||
allo
|
allo
|
||||||
alloacate
|
|
||||||
allocted
|
allocted
|
||||||
alocation
|
alocation
|
||||||
alogrithm
|
alogrithm
|
||||||
|
|
@ -65,6 +64,7 @@ bject
|
||||||
boardcast
|
boardcast
|
||||||
bootstraper
|
bootstraper
|
||||||
bu
|
bu
|
||||||
|
callin
|
||||||
cant
|
cant
|
||||||
capabilites
|
capabilites
|
||||||
capablity
|
capablity
|
||||||
|
|
@ -73,6 +73,7 @@ carrefully
|
||||||
cavaet
|
cavaet
|
||||||
chaing
|
chaing
|
||||||
checkd
|
checkd
|
||||||
|
checkin
|
||||||
childs
|
childs
|
||||||
choosen
|
choosen
|
||||||
chould
|
chould
|
||||||
|
|
@ -93,7 +94,6 @@ confg
|
||||||
configruation
|
configruation
|
||||||
configuable
|
configuable
|
||||||
conneciton
|
conneciton
|
||||||
connexion
|
|
||||||
constrait
|
constrait
|
||||||
constraits
|
constraits
|
||||||
containg
|
containg
|
||||||
|
|
@ -101,9 +101,7 @@ contex
|
||||||
continuesly
|
continuesly
|
||||||
contro
|
contro
|
||||||
controler
|
controler
|
||||||
controles
|
|
||||||
controll
|
controll
|
||||||
convienient
|
|
||||||
convinience
|
convinience
|
||||||
coputer
|
coputer
|
||||||
correcponding
|
correcponding
|
||||||
|
|
@ -158,13 +156,13 @@ differnet
|
||||||
differnt
|
differnt
|
||||||
direcotry
|
direcotry
|
||||||
directroy
|
directroy
|
||||||
disale
|
|
||||||
disbale
|
disbale
|
||||||
discrepency
|
discrepency
|
||||||
disover
|
disover
|
||||||
dissapper
|
dissapper
|
||||||
dissassociated
|
dissassociated
|
||||||
divice
|
divice
|
||||||
|
dockin
|
||||||
doesn'
|
doesn'
|
||||||
doesnot
|
doesnot
|
||||||
doesnt
|
doesnt
|
||||||
|
|
@ -175,7 +173,6 @@ eanbled
|
||||||
earch
|
earch
|
||||||
ect
|
ect
|
||||||
elemnt
|
elemnt
|
||||||
eles
|
|
||||||
elments
|
elments
|
||||||
emmited
|
emmited
|
||||||
enble
|
enble
|
||||||
|
|
@ -187,22 +184,19 @@ environmnet
|
||||||
equivalant
|
equivalant
|
||||||
erro
|
erro
|
||||||
erronous
|
erronous
|
||||||
everthing
|
|
||||||
everytime
|
everytime
|
||||||
excute
|
excute
|
||||||
execept
|
execept
|
||||||
execption
|
execption
|
||||||
|
exects
|
||||||
execut
|
execut
|
||||||
executeable
|
executeable
|
||||||
exeeded
|
exeeded
|
||||||
exisitng
|
exisitng
|
||||||
exisits
|
exisits
|
||||||
existin
|
|
||||||
existsing
|
existsing
|
||||||
exitting
|
|
||||||
expcted
|
expcted
|
||||||
expection
|
expection
|
||||||
explaination
|
|
||||||
explicitely
|
explicitely
|
||||||
faield
|
faield
|
||||||
faild
|
faild
|
||||||
|
|
@ -215,7 +209,6 @@ fillled
|
||||||
findout
|
findout
|
||||||
fisrt
|
fisrt
|
||||||
fo
|
fo
|
||||||
folowing
|
|
||||||
fowarding
|
fowarding
|
||||||
frist
|
frist
|
||||||
fro
|
fro
|
||||||
|
|
@ -234,6 +227,7 @@ hanling
|
||||||
happend
|
happend
|
||||||
hasing
|
hasing
|
||||||
hasnt
|
hasnt
|
||||||
|
havin
|
||||||
hda
|
hda
|
||||||
hostanme
|
hostanme
|
||||||
hould
|
hould
|
||||||
|
|
@ -253,20 +247,14 @@ implmeneted
|
||||||
implmentation
|
implmentation
|
||||||
incase
|
incase
|
||||||
includeing
|
includeing
|
||||||
incosistency
|
|
||||||
indecates
|
indecates
|
||||||
indien
|
|
||||||
infor
|
infor
|
||||||
informations
|
informations
|
||||||
informaton
|
informaton
|
||||||
infrastrcuture
|
|
||||||
ingore
|
ingore
|
||||||
inital
|
|
||||||
initalize
|
initalize
|
||||||
initator
|
initator
|
||||||
initilization
|
|
||||||
inspite
|
inspite
|
||||||
instace
|
|
||||||
instal
|
instal
|
||||||
instnace
|
instnace
|
||||||
intefaces
|
intefaces
|
||||||
|
|
@ -284,12 +272,8 @@ ist
|
||||||
klunky
|
klunky
|
||||||
lable
|
lable
|
||||||
leve
|
leve
|
||||||
lief
|
|
||||||
limite
|
limite
|
||||||
linke
|
|
||||||
listner
|
listner
|
||||||
lokal
|
|
||||||
lokales
|
|
||||||
maintainence
|
maintainence
|
||||||
maintenace
|
maintenace
|
||||||
maintenence
|
maintenence
|
||||||
|
|
@ -298,7 +282,6 @@ mambers
|
||||||
manaully
|
manaully
|
||||||
manuel
|
manuel
|
||||||
maxium
|
maxium
|
||||||
mehtod
|
|
||||||
mergable
|
mergable
|
||||||
mesage
|
mesage
|
||||||
messge
|
messge
|
||||||
|
|
@ -308,7 +291,6 @@ minumum
|
||||||
mis
|
mis
|
||||||
modifers
|
modifers
|
||||||
mor
|
mor
|
||||||
mot
|
|
||||||
mulitply
|
mulitply
|
||||||
multipl
|
multipl
|
||||||
multple
|
multple
|
||||||
|
|
@ -322,7 +304,7 @@ nin
|
||||||
nodel
|
nodel
|
||||||
nome
|
nome
|
||||||
noone
|
noone
|
||||||
nowe
|
notin
|
||||||
numbe
|
numbe
|
||||||
numer
|
numer
|
||||||
occured
|
occured
|
||||||
|
|
@ -390,12 +372,9 @@ remaning
|
||||||
remore
|
remore
|
||||||
remvoing
|
remvoing
|
||||||
renabling
|
renabling
|
||||||
repeatly
|
|
||||||
reponse
|
reponse
|
||||||
reqest
|
reqest
|
||||||
reqiured
|
reqiured
|
||||||
requieres
|
|
||||||
requried
|
|
||||||
reserv
|
reserv
|
||||||
reserverd
|
reserverd
|
||||||
reseted
|
reseted
|
||||||
|
|
@ -414,14 +393,13 @@ retuned
|
||||||
returing
|
returing
|
||||||
rever
|
rever
|
||||||
rocessor
|
rocessor
|
||||||
|
roperty
|
||||||
runing
|
runing
|
||||||
runnign
|
runnign
|
||||||
sate
|
sate
|
||||||
scalled
|
scalled
|
||||||
scipt
|
|
||||||
scirpt
|
scirpt
|
||||||
scrip
|
scrip
|
||||||
seconadry
|
|
||||||
seconday
|
seconday
|
||||||
seesion
|
seesion
|
||||||
sepcified
|
sepcified
|
||||||
|
|
@ -434,12 +412,10 @@ settig
|
||||||
sevices
|
sevices
|
||||||
shoul
|
shoul
|
||||||
shoule
|
shoule
|
||||||
sie
|
|
||||||
signle
|
signle
|
||||||
simplier
|
simplier
|
||||||
singature
|
singature
|
||||||
skiping
|
skiping
|
||||||
snaphsot
|
|
||||||
snpashot
|
snpashot
|
||||||
specied
|
specied
|
||||||
specifed
|
specifed
|
||||||
|
|
@ -450,7 +426,6 @@ standy
|
||||||
statics
|
statics
|
||||||
stickyness
|
stickyness
|
||||||
stil
|
stil
|
||||||
stip
|
|
||||||
storeage
|
storeage
|
||||||
strat
|
strat
|
||||||
streched
|
streched
|
||||||
|
|
@ -459,7 +434,6 @@ succesfull
|
||||||
successfull
|
successfull
|
||||||
suceessful
|
suceessful
|
||||||
suces
|
suces
|
||||||
sucessfully
|
|
||||||
suiteable
|
suiteable
|
||||||
suppots
|
suppots
|
||||||
suppport
|
suppport
|
||||||
|
|
@ -492,7 +466,6 @@ uncompressible
|
||||||
uneccessarily
|
uneccessarily
|
||||||
unexepected
|
unexepected
|
||||||
unexpect
|
unexpect
|
||||||
unknow
|
|
||||||
unkonw
|
unkonw
|
||||||
unkown
|
unkown
|
||||||
unneccessary
|
unneccessary
|
||||||
|
|
@ -500,14 +473,12 @@ unparseable
|
||||||
unrecoginized
|
unrecoginized
|
||||||
unsupport
|
unsupport
|
||||||
unxpected
|
unxpected
|
||||||
updat
|
|
||||||
uptodate
|
uptodate
|
||||||
usera
|
usera
|
||||||
usign
|
usign
|
||||||
usin
|
usin
|
||||||
utlization
|
utlization
|
||||||
vaidate
|
vaidate
|
||||||
valiate
|
|
||||||
valule
|
valule
|
||||||
valus
|
valus
|
||||||
varibles
|
varibles
|
||||||
|
|
@ -516,8 +487,6 @@ verfying
|
||||||
verifing
|
verifing
|
||||||
virutal
|
virutal
|
||||||
visable
|
visable
|
||||||
wakup
|
|
||||||
wil
|
wil
|
||||||
wit
|
wit
|
||||||
wll
|
|
||||||
wth
|
wth
|
||||||
|
|
|
||||||
|
|
@ -16,40 +16,27 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
name: Build
|
name: Build
|
||||||
|
on:
|
||||||
on: [push, pull_request]
|
- push
|
||||||
|
- pull_request
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
|
||||||
- name: Set up JDK 17
|
|
||||||
uses: actions/setup-java@v5
|
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
persist-credentials: false
|
||||||
java-version: '17'
|
|
||||||
cache: 'maven'
|
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Setup Environment
|
||||||
uses: actions/setup-python@v6
|
uses: ./.github/actions/setup-env
|
||||||
with:
|
with:
|
||||||
python-version: '3.10'
|
install-python: 'true'
|
||||||
architecture: 'x64'
|
install-apt-deps: 'true'
|
||||||
|
|
||||||
- name: Install Build Dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y git uuid-runtime genisoimage netcat ipmitool build-essential libgcrypt20 libgpg-error-dev libgpg-error0 libopenipmi0 ipmitool libpython3-dev libssl-dev libffi-dev python3-openssl python3-dev python3-setuptools
|
|
||||||
|
|
||||||
- name: Env details
|
- name: Env details
|
||||||
run: |
|
run: |
|
||||||
uname -a
|
uname -a
|
||||||
|
|
@ -60,9 +47,8 @@ jobs:
|
||||||
free -m
|
free -m
|
||||||
nproc
|
nproc
|
||||||
git status
|
git status
|
||||||
|
- name: Install Non-OSS
|
||||||
|
uses: ./.github/actions/install-nonoss
|
||||||
- name: Noredist Build
|
- name: Noredist Build
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss && cd nonoss && bash -x install-non-oss.sh && cd ..
|
|
||||||
rm -fr nonoss
|
|
||||||
mvn -B -P developer,systemvm -Dsimulator -Dnoredist clean install -T$(nproc)
|
mvn -B -P developer,systemvm -Dsimulator -Dnoredist clean install -T$(nproc)
|
||||||
|
|
|
||||||
|
|
@ -16,21 +16,56 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
name: Simulator CI
|
name: Simulator CI
|
||||||
|
on:
|
||||||
on: [push, pull_request]
|
- push
|
||||||
|
- pull_request
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: github.repository == 'apache/cloudstack'
|
if: github.repository == 'apache/cloudstack'
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Setup Environment
|
||||||
|
uses: ./.github/actions/setup-env
|
||||||
|
with:
|
||||||
|
install-python: 'true'
|
||||||
|
install-apt-deps: 'true'
|
||||||
|
- name: Env details
|
||||||
|
run: |
|
||||||
|
uname -a
|
||||||
|
whoami
|
||||||
|
javac -version
|
||||||
|
mvn -v
|
||||||
|
python3 --version
|
||||||
|
free -m
|
||||||
|
nproc
|
||||||
|
git status
|
||||||
|
ipmitool -V
|
||||||
|
- name: Build with Maven
|
||||||
|
run: |
|
||||||
|
mvn -B -P developer,systemvm -Dsimulator clean install -DskipTests=true -T$(nproc)
|
||||||
|
- name: Archive artifacts
|
||||||
|
run: |
|
||||||
|
mkdir -p /tmp/artifacts
|
||||||
|
tar -czf /tmp/artifacts/targets.tar.gz $(find . -name "target" -type d) tools/marvin/dist engine/schema/dist utils/conf
|
||||||
|
tar -czf /tmp/artifacts/m2-cloudstack.tar.gz -C ~/.m2/repository org/apache/cloudstack
|
||||||
|
- name: Upload artifacts
|
||||||
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
|
with:
|
||||||
|
name: build-artifacts
|
||||||
|
path: /tmp/artifacts/
|
||||||
|
test:
|
||||||
|
needs: build
|
||||||
|
if: github.repository == 'apache/cloudstack'
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
|
|
@ -146,6 +181,7 @@ jobs:
|
||||||
smoke/test_vm_snapshot_kvm
|
smoke/test_vm_snapshot_kvm
|
||||||
smoke/test_vm_snapshots
|
smoke/test_vm_snapshots
|
||||||
smoke/test_volumes
|
smoke/test_volumes
|
||||||
|
smoke/test_vpc_conserve_mode
|
||||||
smoke/test_vpc_ipv6
|
smoke/test_vpc_ipv6
|
||||||
smoke/test_vpc_redundant
|
smoke/test_vpc_redundant
|
||||||
smoke/test_vpc_router_nics
|
smoke/test_vpc_router_nics
|
||||||
|
|
@ -214,30 +250,16 @@ jobs:
|
||||||
smoke/test_list_service_offerings
|
smoke/test_list_service_offerings
|
||||||
smoke/test_list_storage_pools
|
smoke/test_list_storage_pools
|
||||||
smoke/test_list_volumes"]
|
smoke/test_list_volumes"]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
persist-credentials: false
|
||||||
- name: Set up JDK 17
|
- name: Setup Environment
|
||||||
uses: actions/setup-java@v5
|
uses: ./.github/actions/setup-env
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
install-python: 'true'
|
||||||
java-version: '17'
|
install-apt-deps: 'true'
|
||||||
cache: 'maven'
|
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v6
|
|
||||||
with:
|
|
||||||
python-version: '3.10'
|
|
||||||
architecture: 'x64'
|
|
||||||
|
|
||||||
- name: Install Build Dependencies
|
|
||||||
run: |
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y git uuid-runtime genisoimage netcat-openbsd ipmitool build-essential libgcrypt20 libgpg-error-dev libgpg-error0 libopenipmi0 ipmitool libpython3-dev libssl-dev libffi-dev python3-openssl python3-dev python3-setuptools
|
|
||||||
|
|
||||||
- name: Setup IPMI Tool for CloudStack
|
- name: Setup IPMI Tool for CloudStack
|
||||||
run: |
|
run: |
|
||||||
# Create cloudstack-common directory if it doesn't exist
|
# Create cloudstack-common directory if it doesn't exist
|
||||||
|
|
@ -255,55 +277,43 @@ jobs:
|
||||||
/usr/share/cloudstack-common/ipmitool -C3 $@
|
/usr/share/cloudstack-common/ipmitool -C3 $@
|
||||||
EOF
|
EOF
|
||||||
sudo chmod 755 /usr/bin/ipmitool
|
sudo chmod 755 /usr/bin/ipmitool
|
||||||
|
|
||||||
- name: Install Python dependencies
|
- name: Install Python dependencies
|
||||||
run: |
|
run: |
|
||||||
python3 -m pip install --user --upgrade urllib3 lxml paramiko nose texttable ipmisim pyopenssl pycryptodome mock flask netaddr pylint pycodestyle six astroid pynose
|
python3 -m pip install --user --upgrade urllib3 lxml paramiko nose texttable ipmisim pyopenssl pycryptodome mock flask netaddr pylint pycodestyle six astroid pynose
|
||||||
|
|
||||||
- name: Install jacoco dependencies
|
- name: Install jacoco dependencies
|
||||||
run: |
|
run: |
|
||||||
wget https://github.com/jacoco/jacoco/releases/download/v0.8.10/jacoco-0.8.10.zip
|
wget https://github.com/jacoco/jacoco/releases/download/v0.8.10/jacoco-0.8.10.zip
|
||||||
unzip jacoco-0.8.10.zip -d jacoco
|
unzip jacoco-0.8.10.zip -d jacoco
|
||||||
|
|
||||||
- name: Env details
|
|
||||||
run: |
|
|
||||||
uname -a
|
|
||||||
whoami
|
|
||||||
javac -version
|
|
||||||
mvn -v
|
|
||||||
python3 --version
|
|
||||||
free -m
|
|
||||||
nproc
|
|
||||||
git status
|
|
||||||
ipmitool -V
|
|
||||||
|
|
||||||
- name: Setup MySQL Server
|
- name: Setup MySQL Server
|
||||||
run: |
|
run: |
|
||||||
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md#mysql
|
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md#mysql
|
||||||
sudo apt-get install -y mysql-server
|
sudo apt-get install -y mysql-server
|
||||||
sudo systemctl start mysql
|
sudo systemctl start mysql
|
||||||
sudo mysql -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''; FLUSH PRIVILEGES;"
|
sudo mysql -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY ''; FLUSH PRIVILEGES;"
|
||||||
sudo systemctl restart mysql
|
sudo systemctl restart mysql
|
||||||
sudo mysql -uroot -e "SELECT VERSION();"
|
sudo mysql -uroot -e "SELECT VERSION();"
|
||||||
|
- name: Download artifacts
|
||||||
- name: Build with Maven
|
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||||
|
with:
|
||||||
|
name: build-artifacts
|
||||||
|
path: /tmp/artifacts/
|
||||||
|
- name: Extract artifacts
|
||||||
run: |
|
run: |
|
||||||
mvn -B -P developer,systemvm -Dsimulator clean install -DskipTests=true -T$(nproc)
|
tar -xzf /tmp/artifacts/targets.tar.gz
|
||||||
|
mkdir -p ~/.m2/repository
|
||||||
|
tar -xzf /tmp/artifacts/m2-cloudstack.tar.gz -C ~/.m2/repository
|
||||||
- name: Setup Simulator Prerequisites
|
- name: Setup Simulator Prerequisites
|
||||||
run: |
|
run: |
|
||||||
sudo python3 -m pip install --upgrade netaddr mysql-connector-python
|
sudo python3 -m pip install --upgrade netaddr mysql-connector-python
|
||||||
python3 -m pip install --user --upgrade tools/marvin/dist/[mM]arvin-*.tar.gz
|
python3 -m pip install --user --upgrade tools/marvin/dist/[mM]arvin-*.tar.gz
|
||||||
mvn -q -Pdeveloper -pl developer -Ddeploydb
|
mvn -q -Pdeveloper -pl developer -Ddeploydb
|
||||||
mvn -q -Pdeveloper -pl developer -Ddeploydb-simulator
|
mvn -q -Pdeveloper -pl developer -Ddeploydb-simulator
|
||||||
|
|
||||||
- name: Generate jacoco-coverage.sh
|
- name: Generate jacoco-coverage.sh
|
||||||
run: |
|
run: |
|
||||||
echo "java -jar jacoco/lib/jacococli.jar report jacoco-it.exec \\" > jacoco-report.sh
|
echo "java -jar jacoco/lib/jacococli.jar report jacoco-it.exec \\" > jacoco-report.sh
|
||||||
find . | grep "target/classes" | sed 's/\/classes\//\/classes /g' | awk '{print "--classfiles", $1, "\\"}' | sort |uniq >> jacoco-report.sh
|
find . | grep "target/classes" | sed 's/\/classes\//\/classes /g' | awk '{print "--classfiles", $1, "\\"}' | sort |uniq >> jacoco-report.sh
|
||||||
find . | grep "src/main/java" | sed 's/\/java\//\/java /g' | awk '{print "--sourcefiles", $1, "\\"}' | sort | uniq >> jacoco-report.sh
|
find . | grep "src/main/java" | sed 's/\/java\//\/java /g' | awk '{print "--sourcefiles", $1, "\\"}' | sort | uniq >> jacoco-report.sh
|
||||||
echo "--xml jacoco-coverage.xml" >> jacoco-report.sh
|
echo "--xml jacoco-coverage.xml" >> jacoco-report.sh
|
||||||
|
|
||||||
- name: Start CloudStack Management Server with Simulator
|
- name: Start CloudStack Management Server with Simulator
|
||||||
run: |
|
run: |
|
||||||
export MAVEN_OPTS="-Xmx4096m -XX:MaxMetaspaceSize=800m -Djava.security.egd=file:/dev/urandom -javaagent:jacoco/lib/jacocoagent.jar=address=*,port=36320,output=tcpserver --add-opens=java.base/java.lang=ALL-UNNAMED --add-exports=java.base/sun.security.x509=ALL-UNNAMED --add-opens=java.base/jdk.internal.reflect=ALL-UNNAMED"
|
export MAVEN_OPTS="-Xmx4096m -XX:MaxMetaspaceSize=800m -Djava.security.egd=file:/dev/urandom -javaagent:jacoco/lib/jacocoagent.jar=address=*,port=36320,output=tcpserver --add-opens=java.base/java.lang=ALL-UNNAMED --add-exports=java.base/sun.security.x509=ALL-UNNAMED --add-opens=java.base/jdk.internal.reflect=ALL-UNNAMED"
|
||||||
|
|
@ -314,7 +324,6 @@ jobs:
|
||||||
set -e
|
set -e
|
||||||
echo -e "\nStarting Advanced Zone DataCenter deployment"
|
echo -e "\nStarting Advanced Zone DataCenter deployment"
|
||||||
python3 tools/marvin/marvin/deployDataCenter.py -i setup/dev/advdualzone.cfg 2>&1 || true
|
python3 tools/marvin/marvin/deployDataCenter.py -i setup/dev/advdualzone.cfg 2>&1 || true
|
||||||
|
|
||||||
- name: Run Integration Tests with Simulator
|
- name: Run Integration Tests with Simulator
|
||||||
run: |
|
run: |
|
||||||
mkdir -p integration-test-results/smoke/misc
|
mkdir -p integration-test-results/smoke/misc
|
||||||
|
|
@ -334,13 +343,12 @@ jobs:
|
||||||
bash jacoco-report.sh
|
bash jacoco-report.sh
|
||||||
mvn -Dsimulator -pl client jetty:stop 2>&1
|
mvn -Dsimulator -pl client jetty:stop 2>&1
|
||||||
find /tmp//MarvinLogs -type f -exec echo -e "Printing marvin logs {} :\n" \; -exec cat {} \;
|
find /tmp//MarvinLogs -type f -exec echo -e "Printing marvin logs {} :\n" \; -exec cat {} \;
|
||||||
|
|
||||||
- name: Integration Tests Result
|
- name: Integration Tests Result
|
||||||
run: |
|
run: |
|
||||||
echo -e "Simulator CI Test Results: (only failures listed)\n"
|
echo -e "Simulator CI Test Results: (only failures listed)\n"
|
||||||
python3 ./tools/marvin/xunit-reader.py integration-test-results/
|
python3 ./tools/marvin/xunit-reader.py integration-test-results/
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v4
|
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||||
with:
|
with:
|
||||||
files: jacoco-coverage.xml
|
files: jacoco-coverage.xml
|
||||||
fail_ci_if_error: true
|
fail_ci_if_error: true
|
||||||
|
|
|
||||||
|
|
@ -1,59 +0,0 @@
|
||||||
# Licensed to the Apache Software Foundation (ASF) under one
|
|
||||||
# or more contributor license agreements. See the NOTICE file
|
|
||||||
# distributed with this work for additional information
|
|
||||||
# regarding copyright ownership. The ASF licenses this file
|
|
||||||
# to you under the Apache License, Version 2.0 (the
|
|
||||||
# "License"); you may not use this file except in compliance
|
|
||||||
# with the License. You may obtain a copy of the License at
|
|
||||||
#
|
|
||||||
# http://www.apache.org/licenses/LICENSE-2.0
|
|
||||||
#
|
|
||||||
# Unless required by applicable law or agreed to in writing,
|
|
||||||
# software distributed under the License is distributed on an
|
|
||||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
||||||
# KIND, either express or implied. See the License for the
|
|
||||||
# specific language governing permissions and limitations
|
|
||||||
# under the License.
|
|
||||||
|
|
||||||
name: Coverage Check
|
|
||||||
|
|
||||||
on: [pull_request, push]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
if: github.repository == 'apache/cloudstack'
|
|
||||||
name: codecov
|
|
||||||
runs-on: ubuntu-22.04
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v5
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Set up JDK 17
|
|
||||||
uses: actions/setup-java@v5
|
|
||||||
with:
|
|
||||||
distribution: 'temurin'
|
|
||||||
java-version: '17'
|
|
||||||
cache: 'maven'
|
|
||||||
|
|
||||||
- name: Build CloudStack with Quality Checks
|
|
||||||
run: |
|
|
||||||
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
|
|
||||||
cd nonoss && bash -x install-non-oss.sh && cd ..
|
|
||||||
mvn -P quality -Dsimulator -Dnoredist clean install -T$(nproc)
|
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v4
|
|
||||||
with:
|
|
||||||
files: ./client/target/site/jacoco-aggregate/jacoco.xml
|
|
||||||
fail_ci_if_error: true
|
|
||||||
flags: unittests
|
|
||||||
verbose: true
|
|
||||||
name: codecov
|
|
||||||
token: ${{ secrets.CODECOV_TOKEN }}
|
|
||||||
|
|
@ -35,14 +35,16 @@ jobs:
|
||||||
language: ["actions"]
|
language: ["actions"]
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v3
|
uses: github/codeql-action/init@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
|
||||||
with:
|
with:
|
||||||
languages: ${{ matrix.language }}
|
languages: ${{ matrix.language }}
|
||||||
- name: Autobuild
|
- name: Autobuild
|
||||||
uses: github/codeql-action/autobuild@v3
|
uses: github/codeql-action/autobuild@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v3
|
uses: github/codeql-action/analyze@9e0d7b8d25671d64c341c19c0152d693099fb5ba # v4.35.5
|
||||||
with:
|
with:
|
||||||
category: "Security"
|
category: "Security"
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,58 @@
|
||||||
|
---
|
||||||
|
description: |
|
||||||
|
This workflow creates daily repo status reports. It gathers recent repository
|
||||||
|
activity (issues, PRs, discussions, releases, code changes) and generates
|
||||||
|
engaging GitHub issues with productivity insights, community highlights,
|
||||||
|
and project recommendations.
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule: daily
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
issues: read
|
||||||
|
pull-requests: read
|
||||||
|
|
||||||
|
network: defaults
|
||||||
|
|
||||||
|
tools:
|
||||||
|
github:
|
||||||
|
# If in a public repo, setting `lockdown: false` allows
|
||||||
|
# reading issues, pull requests and comments from 3rd-parties
|
||||||
|
# If in a private repo this has no particular effect.
|
||||||
|
lockdown: false
|
||||||
|
min-integrity: none # This workflow is allowed to examine and comment on any issues
|
||||||
|
|
||||||
|
safe-outputs:
|
||||||
|
mentions: false
|
||||||
|
allowed-github-references: []
|
||||||
|
create-issue:
|
||||||
|
title-prefix: "[repo-status] "
|
||||||
|
labels: [report, daily-status]
|
||||||
|
close-older-issues: true
|
||||||
|
source: githubnext/agentics/workflows/repo-status.md@main
|
||||||
|
---
|
||||||
|
|
||||||
|
# Repo Status
|
||||||
|
|
||||||
|
Create an upbeat daily status report for the repo as a GitHub issue.
|
||||||
|
|
||||||
|
## What to include
|
||||||
|
|
||||||
|
- Recent repository activity (issues, PRs, discussions, releases, code changes)
|
||||||
|
- Progress tracking, goal reminders and highlights
|
||||||
|
- Project status and recommendations
|
||||||
|
- Actionable next steps for maintainers
|
||||||
|
|
||||||
|
## Style
|
||||||
|
|
||||||
|
- Be positive, encouraging, and helpful 🌟
|
||||||
|
- Use emojis moderately for engagement
|
||||||
|
- Keep it concise - adjust length based on actual activity
|
||||||
|
|
||||||
|
## Process
|
||||||
|
|
||||||
|
1. Gather recent activity from the repository
|
||||||
|
2. Study the repository, its issues and its pull requests
|
||||||
|
3. Create a new GitHub issue with your findings and insights
|
||||||
|
|
@ -35,10 +35,10 @@ concurrency:
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: github.repository == 'apache/cloudstack'
|
if: github.repository == 'apache/cloudstack'
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Login to Docker Registry
|
- name: Login to Docker Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
|
||||||
with:
|
with:
|
||||||
registry: ${{ secrets.DOCKER_REGISTRY }}
|
registry: ${{ secrets.DOCKER_REGISTRY }}
|
||||||
username: ${{ secrets.DOCKERHUB_USER }}
|
username: ${{ secrets.DOCKERHUB_USER }}
|
||||||
|
|
@ -47,7 +47,9 @@ jobs:
|
||||||
- name: Set Docker repository name
|
- name: Set Docker repository name
|
||||||
run: echo "DOCKER_REPOSITORY=apache" >> $GITHUB_ENV
|
run: echo "DOCKER_REPOSITORY=apache" >> $GITHUB_ENV
|
||||||
|
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Set ACS version
|
- name: Set ACS version
|
||||||
run: echo "ACS_VERSION=$(grep '<version>' pom.xml | head -2 | tail -1 | cut -d'>' -f2 |cut -d'<' -f1)" >> $GITHUB_ENV
|
run: echo "ACS_VERSION=$(grep '<version>' pom.xml | head -2 | tail -1 | cut -d'>' -f2 |cut -d'<' -f1)" >> $GITHUB_ENV
|
||||||
|
|
|
||||||
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,92 @@
|
||||||
|
---
|
||||||
|
on:
|
||||||
|
schedule: daily around 14:00 on weekdays
|
||||||
|
workflow_dispatch: null
|
||||||
|
permissions:
|
||||||
|
issues: read
|
||||||
|
imports:
|
||||||
|
- github/gh-aw/.github/workflows/shared/reporting.md@359795d49ada21681ab616bd4cbcb144a7387115
|
||||||
|
safe-outputs:
|
||||||
|
add-comment: {}
|
||||||
|
add-labels:
|
||||||
|
allowed:
|
||||||
|
- bug
|
||||||
|
- feature
|
||||||
|
- enhancement
|
||||||
|
- documentation
|
||||||
|
- question
|
||||||
|
- help-wanted
|
||||||
|
- good-first-issue
|
||||||
|
emoji: 🔧
|
||||||
|
source: github/gh-aw/.github/workflows/issue-triage-agent.md@359795d49ada21681ab616bd4cbcb144a7387115
|
||||||
|
strict: true
|
||||||
|
timeout-minutes: 5
|
||||||
|
tools:
|
||||||
|
cli-proxy: true
|
||||||
|
github:
|
||||||
|
toolsets:
|
||||||
|
- issues
|
||||||
|
- labels
|
||||||
|
---
|
||||||
|
# Issue Triage Agent
|
||||||
|
|
||||||
|
List open issues in ${{ github.repository }} that have no labels. For each unlabeled issue, analyze the title and body, then add one of the allowed labels: `bug`, `feature`, `enhancement`, `documentation`, `question`, `help-wanted`, or `good-first-issue`.
|
||||||
|
|
||||||
|
Skip issues that:
|
||||||
|
- Already have any of these labels
|
||||||
|
- Have been assigned to any user (especially non-bot users)
|
||||||
|
|
||||||
|
After adding the label to an issue, mention the issue author in a comment using this format (follow shared/reporting.md guidelines):
|
||||||
|
|
||||||
|
**Comment Template**:
|
||||||
|
```markdown
|
||||||
|
### 🏷️ Issue Triaged
|
||||||
|
|
||||||
|
Hi @{author}! I've categorized this issue as **{label_name}** based on the following analysis:
|
||||||
|
|
||||||
|
**Reasoning**: {brief_explanation_of_why_this_label}
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary>View Triage Details</summary>
|
||||||
|
|
||||||
|
#### Analysis
|
||||||
|
- **Keywords detected**: {list_of_keywords_that_matched}
|
||||||
|
- **Issue type indicators**: {what_made_this_fit_the_category}
|
||||||
|
- **Confidence**: {High/Medium/Low}
|
||||||
|
|
||||||
|
#### Recommended Next Steps
|
||||||
|
- {context_specific_suggestion_1}
|
||||||
|
- {context_specific_suggestion_2}
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
|
**References**: [Triage run §{run_id}](https://github.com/github/gh-aw/actions/runs/{run_id})
|
||||||
|
```
|
||||||
|
|
||||||
|
**Key formatting requirements**:
|
||||||
|
- Use h3 (###) for the main heading
|
||||||
|
- Keep reasoning visible for quick understanding
|
||||||
|
- Wrap detailed analysis in `<details>` tags
|
||||||
|
- Include workflow run reference
|
||||||
|
- Keep total comment concise (collapsed details prevent noise)
|
||||||
|
|
||||||
|
## Batch Comment Optimization
|
||||||
|
|
||||||
|
For efficiency, if multiple issues are triaged in a single run:
|
||||||
|
1. Add individual labels to each issue
|
||||||
|
2. Add a brief comment to each issue (using the template above)
|
||||||
|
3. Optionally: Create a discussion summarizing all triage actions for that run
|
||||||
|
|
||||||
|
This provides both per-issue context and batch visibility.
|
||||||
|
|
||||||
|
## Labels
|
||||||
|
|
||||||
|
- `bug`: Indicates a problem or error in the code that needs fixing.
|
||||||
|
- `feature`: Represents a new feature request or enhancement to existing functionality.
|
||||||
|
- `enhancement`: Suggests improvements to existing features or code.
|
||||||
|
- `documentation`: Pertains to issues related to documentation, such as missing or unclear docs.
|
||||||
|
- `question`: Used for issues that are asking for clarification or have questions about the project.
|
||||||
|
- `help-wanted`: Indicates that the issue is a good candidate for external contributions and help
|
||||||
|
- `good-first-issue`: Marks issues that are suitable for newcomers to the project, often with simpler scope.
|
||||||
|
|
||||||
|
{{#runtime-import shared/noop-reminder.md}}
|
||||||
|
|
@ -15,54 +15,51 @@
|
||||||
# specific language governing permissions and limitations
|
# specific language governing permissions and limitations
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
name: Main Branch Sonar Quality Check
|
name: Sonar Quality Check (Main)
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
concurrency:
|
||||||
permissions:
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
contents: read # to fetch code (actions/checkout)
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||||
pull-requests: write # for sonar to comment on pull-request
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: github.repository == 'apache/cloudstack'
|
if: github.repository == 'apache/cloudstack'
|
||||||
name: Main Sonar JaCoCo Build
|
name: Sonar JaCoCo Coverage
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
persist-credentials: false
|
||||||
- name: Set up JDK17
|
- name: Setup Environment
|
||||||
uses: actions/setup-java@v5
|
uses: ./.github/actions/setup-env
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
install-python: 'true'
|
||||||
java-version: '17'
|
install-apt-deps: 'true'
|
||||||
cache: 'maven'
|
|
||||||
|
|
||||||
- name: Cache SonarCloud packages
|
- name: Cache SonarCloud packages
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||||
with:
|
with:
|
||||||
path: ~/.sonar/cache
|
path: ~/.sonar/cache
|
||||||
key: ${{ runner.os }}-sonar
|
key: ${{ runner.os }}-sonar
|
||||||
restore-keys: ${{ runner.os }}-sonar
|
restore-keys: ${{ runner.os }}-sonar
|
||||||
|
- name: Install Non-OSS
|
||||||
- name: Cache local Maven repository
|
uses: ./.github/actions/install-nonoss
|
||||||
uses: actions/cache@v4
|
- name: Run Build and Tests with Coverage
|
||||||
with:
|
run: mvn -B -T$(nproc) -P developer,systemvm,quality -Dsimulator -Dnoredist clean install
|
||||||
path: ~/.m2/repository
|
- name: Upload to SonarQube
|
||||||
key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml', '*/pom.xml', '*/*/pom.xml', '*/*/*/pom.xml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-m2
|
|
||||||
|
|
||||||
- name: Run Tests with Coverage
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
run: |
|
run: mvn -B -P quality org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_cloudstack -Dsonar.branch.name=${{ github.ref_name }}
|
||||||
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
|
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||||
cd nonoss && bash -x install-non-oss.sh && cd ..
|
with:
|
||||||
mvn -T$(nproc) -P quality -Dsimulator -Dnoredist clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_cloudstack
|
files: ./client/target/site/jacoco-aggregate/jacoco.xml
|
||||||
|
fail_ci_if_error: true
|
||||||
|
flags: unittests
|
||||||
|
verbose: true
|
||||||
|
name: codecov
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
|
||||||
|
|
@ -17,28 +17,26 @@
|
||||||
|
|
||||||
name: "PR Merge Conflict Check"
|
name: "PR Merge Conflict Check"
|
||||||
on:
|
on:
|
||||||
push:
|
schedule:
|
||||||
pull_request:
|
- cron: '*/10 * * * *'
|
||||||
types: [opened, synchronize, reopened]
|
workflow_dispatch:
|
||||||
|
|
||||||
permissions: # added using https://github.com/step-security/secure-workflows
|
permissions: {}
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: "gh-aw-${{ github.workflow }}"
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
triage:
|
triage:
|
||||||
permissions:
|
permissions:
|
||||||
pull-requests: write # for eps1lon/actions-label-merge-conflict to label PRs
|
pull-requests: write # for eps1lon/actions-label-merge-conflict to label PRs
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Conflict Check
|
- name: Conflict Check
|
||||||
uses: eps1lon/actions-label-merge-conflict@v2.0.0
|
uses: eps1lon/actions-label-merge-conflict@1df065ebe6e3310545d4f4c4e862e43bdca146f0 # v3.0.3
|
||||||
with:
|
with:
|
||||||
repoToken: "${{ secrets.GITHUB_TOKEN }}"
|
repoToken: "${{ secrets.GITHUB_TOKEN }}"
|
||||||
dirtyLabel: "status:has-conflicts"
|
dirtyLabel: "status:has-conflicts"
|
||||||
removeOnDirtyLabel: "status:ready-for-review"
|
removeOnDirtyLabel: "status:ready-for-review"
|
||||||
continueOnMissingPermissions: true
|
continueOnMissingPermissions: true
|
||||||
commentOnDirty: "This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch."
|
commentOnDirty: "This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch."
|
||||||
|
|
|
||||||
|
|
@ -29,21 +29,27 @@ concurrency:
|
||||||
jobs:
|
jobs:
|
||||||
pre-commit:
|
pre-commit:
|
||||||
name: Run pre-commit
|
name: Run pre-commit
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- name: Check Out
|
- name: Check Out
|
||||||
uses: actions/checkout@v5
|
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||||
|
with:
|
||||||
|
python-version: '3.11'
|
||||||
|
cache: 'pip'
|
||||||
- name: Install
|
- name: Install
|
||||||
run: |
|
run: pip install pre-commit
|
||||||
python -m pip install --upgrade pip
|
|
||||||
pip install pre-commit
|
|
||||||
- name: Set PY
|
- name: Set PY
|
||||||
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||||
- uses: actions/cache@v4
|
- name: Cache pre-commit environments
|
||||||
|
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||||
with:
|
with:
|
||||||
path: ~/.cache/pre-commit
|
path: ~/.cache/pre-commit
|
||||||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||||
- name: Run pre-commit
|
- name: Run pre-commit
|
||||||
run: pre-commit run --all-files
|
run: pre-commit run --color=always --all-files
|
||||||
- name: Run manual pre-commit hooks
|
- 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
|
||||||
|
|
@ -16,32 +16,27 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
name: License Check
|
name: License Check
|
||||||
|
on:
|
||||||
on: [push, pull_request]
|
- push
|
||||||
|
- pull_request
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
- name: Set up JDK 17
|
|
||||||
uses: actions/setup-java@v5
|
|
||||||
with:
|
with:
|
||||||
java-version: '17'
|
persist-credentials: false
|
||||||
distribution: 'adopt'
|
- name: Setup Environment
|
||||||
architecture: x64
|
uses: ./.github/actions/setup-env
|
||||||
cache: maven
|
- name: Install Non-OSS
|
||||||
|
uses: ./.github/actions/install-nonoss
|
||||||
- name: RAT licence checks
|
- name: RAT licence checks
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss && cd nonoss && bash -x install-non-oss.sh && cd ..
|
|
||||||
rm -fr nonoss
|
|
||||||
mvn -P developer,systemvm -Dsimulator -Dnoredist -pl . org.apache.rat:apache-rat-plugin:0.12:check
|
mvn -P developer,systemvm -Dsimulator -Dnoredist -pl . org.apache.rat:apache-rat-plugin:0.12:check
|
||||||
- name: Rat Report
|
- name: Rat Report
|
||||||
if: always()
|
if: always()
|
||||||
|
|
|
||||||
|
|
@ -16,58 +16,52 @@
|
||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
name: Sonar Quality Check
|
name: Sonar Quality Check
|
||||||
|
|
||||||
on: [pull_request]
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: read # to fetch code (actions/checkout)
|
contents: read
|
||||||
pull-requests: write # for sonar to comment on pull-request
|
pull-requests: write
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
if: github.repository == 'apache/cloudstack' && github.event.pull_request.head.repo.full_name == github.repository
|
|
||||||
name: Sonar JaCoCo Coverage
|
name: Sonar JaCoCo Coverage
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
with:
|
with:
|
||||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
persist-credentials: false
|
||||||
- name: Set up JDK17
|
- name: Setup Environment
|
||||||
uses: actions/setup-java@v5
|
uses: ./.github/actions/setup-env
|
||||||
with:
|
with:
|
||||||
distribution: 'temurin'
|
install-python: 'true'
|
||||||
java-version: '17'
|
install-apt-deps: 'true'
|
||||||
cache: 'maven'
|
|
||||||
|
|
||||||
- name: Cache SonarCloud packages
|
- name: Cache SonarCloud packages
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||||
with:
|
with:
|
||||||
path: ~/.sonar/cache
|
path: ~/.sonar/cache
|
||||||
key: ${{ runner.os }}-sonar
|
key: ${{ runner.os }}-sonar
|
||||||
restore-keys: ${{ runner.os }}-sonar
|
restore-keys: ${{ runner.os }}-sonar
|
||||||
|
- name: Install Non-OSS
|
||||||
- name: Cache local Maven repository
|
uses: ./.github/actions/install-nonoss
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: ~/.m2/repository
|
|
||||||
key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml', '*/pom.xml', '*/*/pom.xml', '*/*/*/pom.xml') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-m2
|
|
||||||
|
|
||||||
- name: Run Build and Tests with Coverage
|
- name: Run Build and Tests with Coverage
|
||||||
id: coverage
|
run: mvn -B -T$(nproc) -P developer,systemvm,quality -Dsimulator -Dnoredist clean install
|
||||||
|
- name: Upload to SonarQube
|
||||||
|
if: github.repository == 'apache/cloudstack' && github.event.pull_request.head.repo.full_name == github.repository
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
PR_ID: ${{ github.event.pull_request.number }}
|
PR_ID: ${{ github.event.pull_request.number }}
|
||||||
HEADREF: ${{ github.event.pull_request.head.ref }}
|
HEADREF: ${{ github.event.pull_request.head.ref }}
|
||||||
run: |
|
run: |
|
||||||
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
|
mvn -B -P quality org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_cloudstack -Dsonar.pullrequest.key="$PR_ID" -Dsonar.pullrequest.branch="$HEADREF" -Dsonar.pullrequest.github.repository=apache/cloudstack -Dsonar.pullrequest.provider=GitHub -Dsonar.pullrequest.github.summary_comment=true
|
||||||
cd nonoss && bash -x install-non-oss.sh && cd ..
|
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||||
mvn -T$(nproc) -P quality -Dsimulator -Dnoredist clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_cloudstack -Dsonar.pullrequest.key="$PR_ID" -Dsonar.pullrequest.branch="$HEADREF" -Dsonar.pullrequest.github.repository=apache/cloudstack -Dsonar.pullrequest.provider=GitHub -Dsonar.pullrequest.github.summary_comment=true
|
with:
|
||||||
|
files: ./client/target/site/jacoco-aggregate/jacoco.xml
|
||||||
|
fail_ci_if_error: true
|
||||||
|
flags: unittests
|
||||||
|
verbose: true
|
||||||
|
name: codecov
|
||||||
|
token: ${{ secrets.CODECOV_TOKEN }}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,49 @@
|
||||||
|
# Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
# or more contributor license agreements. See the NOTICE file
|
||||||
|
# distributed with this work for additional information
|
||||||
|
# regarding copyright ownership. The ASF licenses this file
|
||||||
|
# to you under the Apache License, Version 2.0 (the
|
||||||
|
# "License"); you may not use this file except in compliance
|
||||||
|
# with the License. You may obtain a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing,
|
||||||
|
# software distributed under the License is distributed on an
|
||||||
|
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
# KIND, either express or implied. See the License for the
|
||||||
|
# specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
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@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899 # v10.3.0
|
||||||
|
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 240 days with no activity.'
|
||||||
|
stale-issue-label: 'no-issue-activity'
|
||||||
|
stale-pr-label: 'no-pr-activity'
|
||||||
|
days-before-stale: 120
|
||||||
|
days-before-close: -1
|
||||||
|
days-before-pr-close: 240
|
||||||
|
exempt-issue-labels: 'gsoc,good-first-issue,long-term-plan'
|
||||||
|
exempt-pr-labels: 'status:ready-for-merge,status:needs-testing,status:on-hold'
|
||||||
|
- uses: actions/stale@eb5cf3af3ac0a1aa4c9c45633dd1ae542a27a899 # v10.3.0
|
||||||
|
with:
|
||||||
|
stale-issue-label: 'archive'
|
||||||
|
days-before-stale: 240
|
||||||
|
exempt-issue-labels: 'gsoc,good-first-issue,long-term-plan'
|
||||||
|
days-before-close: -1
|
||||||
|
|
@ -28,15 +28,19 @@ permissions:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v5
|
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||||
|
with:
|
||||||
|
persist-credentials: false
|
||||||
|
|
||||||
- name: Set up Node
|
- name: Set up Node
|
||||||
uses: actions/setup-node@v5
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
|
cache: 'npm'
|
||||||
|
cache-dependency-path: 'ui/package-lock.json'
|
||||||
|
|
||||||
- name: Env details
|
- name: Env details
|
||||||
run: |
|
run: |
|
||||||
|
|
@ -55,7 +59,7 @@ jobs:
|
||||||
npm run lint
|
npm run lint
|
||||||
npm run test:unit
|
npm run test:unit
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v4
|
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||||
if: github.repository == 'apache/cloudstack'
|
if: github.repository == 'apache/cloudstack'
|
||||||
with:
|
with:
|
||||||
working-directory: ui
|
working-directory: ui
|
||||||
|
|
|
||||||
|
|
@ -25,6 +25,12 @@ repos:
|
||||||
hooks:
|
hooks:
|
||||||
- id: identity
|
- id: identity
|
||||||
- id: check-hooks-apply
|
- 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
|
- repo: https://github.com/oxipng/oxipng
|
||||||
rev: v9.1.5
|
rev: v9.1.5
|
||||||
hooks:
|
hooks:
|
||||||
|
|
@ -41,6 +47,21 @@ repos:
|
||||||
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
||||||
rev: v1.5.5
|
rev: v1.5.5
|
||||||
hooks:
|
hooks:
|
||||||
|
- id: chmod
|
||||||
|
name: set file permissions
|
||||||
|
args: ['644']
|
||||||
|
files: \.md$
|
||||||
|
stages: [manual]
|
||||||
|
- id: insert-license
|
||||||
|
name: add license for all cfg files
|
||||||
|
description: automatically adds a licence header to all cfg files that don't have a license header
|
||||||
|
files: \.cfg$
|
||||||
|
args:
|
||||||
|
- --comment-style
|
||||||
|
- '|#|'
|
||||||
|
- --license-filepath
|
||||||
|
- .github/workflows/license-templates/LICENSE.txt
|
||||||
|
- --fuzzy-match-generates-todo
|
||||||
- id: insert-license
|
- id: insert-license
|
||||||
name: add license for all Markdown files
|
name: add license for all Markdown files
|
||||||
files: \.md$
|
files: \.md$
|
||||||
|
|
@ -50,7 +71,56 @@ repos:
|
||||||
- --license-filepath
|
- --license-filepath
|
||||||
- .github/workflows/license-templates/LICENSE.txt
|
- .github/workflows/license-templates/LICENSE.txt
|
||||||
- --fuzzy-match-generates-todo
|
- --fuzzy-match-generates-todo
|
||||||
exclude: ^(CHANGES|ISSUE_TEMPLATE|PULL_REQUEST_TEMPLATE)\.md$|^ui/docs/(full|smoke)-test-plan\.template\.md$
|
exclude: ^(CHANGES|ISSUE_TEMPLATE|PULL_REQUEST_TEMPLATE)\.md$|^ui/docs/(full|smoke)-test-plan\.template\.md$|^\.github/workflows/.*\.md$|^\.github/aw/.*\.md$
|
||||||
|
- id: insert-license
|
||||||
|
name: add license for all properties files
|
||||||
|
description: automatically adds a licence header to all properties files that don't have a license header
|
||||||
|
files: \.properties$
|
||||||
|
args:
|
||||||
|
- --comment-style
|
||||||
|
- '|#|'
|
||||||
|
- --license-filepath
|
||||||
|
- .github/workflows/license-templates/LICENSE.txt
|
||||||
|
- --fuzzy-match-generates-todo
|
||||||
|
- 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
|
||||||
|
exclude: ^\.github/workflows/.*\.lock\.yml$
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v6.0.0
|
rev: v6.0.0
|
||||||
hooks:
|
hooks:
|
||||||
|
|
@ -81,10 +151,10 @@ repos:
|
||||||
^server/src/test/resources/certs/rsa_self_signed\.key$|
|
^server/src/test/resources/certs/rsa_self_signed\.key$|
|
||||||
^services/console-proxy/rdpconsole/src/test/doc/rdp-key\.pem$|
|
^services/console-proxy/rdpconsole/src/test/doc/rdp-key\.pem$|
|
||||||
^systemvm/agent/certs/localhost\.key$|
|
^systemvm/agent/certs/localhost\.key$|
|
||||||
^systemvm/agent/certs/realhostip\.key$|
|
^systemvm/agent/certs/systemvm\.key$|
|
||||||
^test/integration/smoke/test_ssl_offloading\.py$
|
^test/integration/smoke/test_ssl_offloading\.py$
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
exclude: \.vhd$
|
exclude: \.vhd$|\.svg$
|
||||||
- id: file-contents-sorter
|
- id: file-contents-sorter
|
||||||
args: [--unique]
|
args: [--unique]
|
||||||
files: ^\.github/linters/codespell\.txt$
|
files: ^\.github/linters/codespell\.txt$
|
||||||
|
|
@ -92,17 +162,15 @@ repos:
|
||||||
- id: forbid-submodules
|
- id: forbid-submodules
|
||||||
- id: mixed-line-ending
|
- id: mixed-line-ending
|
||||||
- id: trailing-whitespace
|
- 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)$|README$|\.(bat|cfg|config|cs|css|erb|gitignore|header|in|install|java|md|properties|py|rb|rc|sh|sql|svg|te|template|txt|ucls|vue|xml|xsl|yaml|yml)$|^cloud-cli/bindir/cloud-tool$|^debian/changelog$
|
||||||
args: [--markdown-linebreak-ext=md]
|
args: [--markdown-linebreak-ext=md]
|
||||||
exclude: ^services/console-proxy/rdpconsole/src/test/doc/freerdp-debug-log\.txt$
|
exclude: ^services/console-proxy/rdpconsole/src/test/doc/freerdp-debug-log\.txt$
|
||||||
- repo: https://github.com/codespell-project/codespell
|
- repo: https://github.com/codespell-project/codespell
|
||||||
rev: v2.2.6
|
rev: v2.4.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: codespell
|
- id: codespell
|
||||||
name: run codespell
|
name: run codespell
|
||||||
description: Check spelling with codespell
|
description: Check spelling with codespell
|
||||||
args: [--ignore-words=.github/linters/codespell.txt]
|
|
||||||
exclude: ^systemvm/agent/noVNC/|^ui/package\.json$|^ui/package-lock\.json$|^ui/public/js/less\.min\.js$|^ui/public/locales/.*[^n].*\.json$|^server/src/test/java/org/apache/cloudstack/network/ssl/CertServiceTest.java$|^test/integration/smoke/test_ssl_offloading.py$
|
|
||||||
- repo: https://github.com/pycqa/flake8
|
- repo: https://github.com/pycqa/flake8
|
||||||
rev: 7.0.0
|
rev: 7.0.0
|
||||||
hooks:
|
hooks:
|
||||||
|
|
@ -116,15 +184,7 @@ repos:
|
||||||
description: check Markdown files with markdownlint
|
description: check Markdown files with markdownlint
|
||||||
args: [--config=.github/linters/.markdown-lint.yml]
|
args: [--config=.github/linters/.markdown-lint.yml]
|
||||||
types: [markdown]
|
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$
|
files: \.md$
|
||||||
stages: [manual]
|
|
||||||
- repo: https://github.com/adrienverge/yamllint
|
- repo: https://github.com/adrienverge/yamllint
|
||||||
rev: v1.37.1
|
rev: v1.37.1
|
||||||
hooks:
|
hooks:
|
||||||
|
|
@ -134,4 +194,4 @@ repos:
|
||||||
args: [--config-file=.github/linters/.yamllint.yml]
|
args: [--config-file=.github/linters/.yamllint.yml]
|
||||||
types: [yaml]
|
types: [yaml]
|
||||||
files: \.ya?ml$
|
files: \.ya?ml$
|
||||||
exclude: ^.*k8s-.*\.ya?ml$
|
exclude: ^.*k8s-.*\.ya?ml$|^.github/workflows/.*\.lock\.ya?ml$
|
||||||
|
|
|
||||||
|
|
@ -21,6 +21,24 @@
|
||||||
|
|
||||||
## Summary
|
## Summary
|
||||||
|
|
||||||
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||||
|
|
||||||
|
- [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)
|
||||||
|
|
||||||
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
|
||||||
|
## Summary
|
||||||
|
|
||||||
This document covers how to contribute to the ACS project. ACS uses GitHub PRs to manage code contributions.
|
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.
|
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.
|
||||||
|
|
||||||
|
|
|
||||||
18
INSTALL.md
18
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
|
Apache CloudStack developers use various platforms for development, this guide
|
||||||
was tested against a CentOS 7 x86_64 setup.
|
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.
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
* [Building](https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+CloudStack) Apache CloudStack.
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||||
* [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)
|
||||||
|
|
||||||
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
|
||||||
## Setting up Development Environment
|
## Setting up Development Environment
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@
|
||||||
# pre-commit
|
# pre-commit
|
||||||
|
|
||||||
We run [pre-commit](https://pre-commit.com/) with
|
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.
|
local machine is currently optional.
|
||||||
|
|
||||||
The `pre-commit` [configuration file](https://github.com/apache/cloudstack/blob/main/.pre-commit-config.yaml)
|
The `pre-commit` [configuration file](https://github.com/apache/cloudstack/blob/main/.pre-commit-config.yaml)
|
||||||
20
README.md
20
README.md
|
|
@ -31,6 +31,24 @@
|
||||||
|
|
||||||
[](https://cloudstack.apache.org/)
|
[](https://cloudstack.apache.org/)
|
||||||
|
|
||||||
|
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||||
|
|
||||||
|
- [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)
|
||||||
|
|
||||||
|
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||||
|
|
||||||
Apache CloudStack is open source software designed to deploy and manage large
|
Apache CloudStack is open source software designed to deploy and manage large
|
||||||
networks of virtual machines, as a highly available, highly scalable
|
networks of virtual machines, as a highly available, highly scalable
|
||||||
Infrastructure as a Service (IaaS) cloud computing platform. CloudStack is used
|
Infrastructure as a Service (IaaS) cloud computing platform. CloudStack is used
|
||||||
|
|
@ -185,7 +203,7 @@ Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Sec
|
||||||
The following provides more details on the included cryptographic software:
|
The following provides more details on the included cryptographic software:
|
||||||
|
|
||||||
* CloudStack makes use of JaSypt cryptographic libraries.
|
* CloudStack makes use of JaSypt cryptographic libraries.
|
||||||
* CloudStack has a system requirement of MySQL, and uses native database encryption functionality.
|
* CloudStack requires a MySQL-compatible database (MariaDB or MySQL), and uses native database encryption functionality.
|
||||||
* CloudStack makes use of the Bouncy Castle general-purpose encryption library.
|
* CloudStack makes use of the Bouncy Castle general-purpose encryption library.
|
||||||
* CloudStack can optionally interact with and control OpenSwan-based VPNs.
|
* CloudStack can optionally interact with and control OpenSwan-based VPNs.
|
||||||
* CloudStack has a dependency on and makes use of JSch - a java SSH2 implementation.
|
* CloudStack has a dependency on and makes use of JSch - a java SSH2 implementation.
|
||||||
|
|
|
||||||
|
|
@ -78,6 +78,14 @@ zone=default
|
||||||
# Generated with "uuidgen".
|
# Generated with "uuidgen".
|
||||||
local.storage.uuid=
|
local.storage.uuid=
|
||||||
|
|
||||||
|
# Enable TLS for image server transfers. The keys are read from:
|
||||||
|
# cert file = /etc/cloudstack/agent/cloud.crt
|
||||||
|
# key file = /etc/cloudstack/agent/cloud.key
|
||||||
|
image.server.tls.enabled=true
|
||||||
|
|
||||||
|
# The Address for the network interface that the image server listens on. If not specified, it will listen on the Management network.
|
||||||
|
#image.server.listen.address=
|
||||||
|
|
||||||
# Location for KVM virtual router scripts.
|
# Location for KVM virtual router scripts.
|
||||||
# The path defined in this property is relative to the directory "/usr/share/cloudstack-common/".
|
# The path defined in this property is relative to the directory "/usr/share/cloudstack-common/".
|
||||||
domr.scripts.dir=scripts/network/domr/kvm
|
domr.scripts.dir=scripts/network/domr/kvm
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.apache.cloudstack</groupId>
|
<groupId>org.apache.cloudstack</groupId>
|
||||||
<artifactId>cloudstack</artifactId>
|
<artifactId>cloudstack</artifactId>
|
||||||
<version>4.22.1.0</version>
|
<version>4.23.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
|
|
@ -1322,7 +1322,6 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||||
processResponse((Response)request, task.getLink());
|
processResponse((Response)request, task.getLink());
|
||||||
} else {
|
} 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
|
//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));
|
requestHandler.submit(new AgentRequestHandler(getType(), getLink(), request));
|
||||||
}
|
}
|
||||||
} catch (final ClassNotFoundException e) {
|
} catch (final ClassNotFoundException e) {
|
||||||
|
|
|
||||||
|
|
@ -117,12 +117,26 @@ public class AgentProperties{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Local storage path.<br>
|
* Local storage path.<br>
|
||||||
* This property allows multiple values to be entered in a single String. The differente values must be separated by commas.<br>
|
* This property allows multiple values to be entered in a single String. The different values must be separated by commas.<br>
|
||||||
* Data type: String.<br>
|
* Data type: String.<br>
|
||||||
* Default value: <code>/var/lib/libvirt/images/</code>
|
* Default value: <code>/var/lib/libvirt/images/</code>
|
||||||
*/
|
*/
|
||||||
public static final Property<String> LOCAL_STORAGE_PATH = new Property<>("local.storage.path", "/var/lib/libvirt/images/");
|
public static final Property<String> LOCAL_STORAGE_PATH = new Property<>("local.storage.path", "/var/lib/libvirt/images/");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Enables TLS on the KVM image server transfer endpoint.<br>
|
||||||
|
* Data type: Boolean.<br>
|
||||||
|
* Default value: <code>true</code>
|
||||||
|
*/
|
||||||
|
public static final Property<Boolean> IMAGE_SERVER_TLS_ENABLED = new Property<>("image.server.tls.enabled", true);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The IP address that the KVM image server listens on.<br>
|
||||||
|
* Data type: String.<br>
|
||||||
|
* Default value: <code>null</code>
|
||||||
|
*/
|
||||||
|
public static final Property<String> IMAGE_SERVER_LISTEN_ADDRESS = new Property<>("image.server.listen.address", null, String.class);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Directory where Qemu sockets are placed.<br>
|
* Directory where Qemu sockets are placed.<br>
|
||||||
* These sockets are for the Qemu Guest Agent and SSVM provisioning.<br>
|
* These sockets are for the Qemu Guest Agent and SSVM provisioning.<br>
|
||||||
|
|
@ -134,7 +148,7 @@ public class AgentProperties{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MANDATORY: The UUID for the local storage pool.<br>
|
* MANDATORY: The UUID for the local storage pool.<br>
|
||||||
* This property allows multiple values to be entered in a single String. The differente values must be separated by commas.<br>
|
* This property allows multiple values to be entered in a single String. The different values must be separated by commas.<br>
|
||||||
* Data type: String.<br>
|
* Data type: String.<br>
|
||||||
* Default value: <code>null</code>
|
* Default value: <code>null</code>
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@
|
||||||
<parent>
|
<parent>
|
||||||
<groupId>org.apache.cloudstack</groupId>
|
<groupId>org.apache.cloudstack</groupId>
|
||||||
<artifactId>cloudstack</artifactId>
|
<artifactId>cloudstack</artifactId>
|
||||||
<version>4.22.1.0</version>
|
<version>4.23.0.0-SNAPSHOT</version>
|
||||||
</parent>
|
</parent>
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
|
|
|
||||||
|
|
@ -119,8 +119,7 @@ public class OVFHelper {
|
||||||
boolean password = StringUtils.isNotBlank(passStr) && passStr.equalsIgnoreCase("true");
|
boolean password = StringUtils.isNotBlank(passStr) && passStr.equalsIgnoreCase("true");
|
||||||
String label = ovfParser.getChildNodeValue(node, "Label");
|
String label = ovfParser.getChildNodeValue(node, "Label");
|
||||||
String description = ovfParser.getChildNodeValue(node, "Description");
|
String description = ovfParser.getChildNodeValue(node, "Description");
|
||||||
logger.debug("Creating OVF property index " + index + (category == null ? "" : " for category " + category)
|
logger.debug("Creating OVF property index {} {} with key = {}", index, (category == null ? "" : " for category " + category), key);
|
||||||
+ " with key = " + key);
|
|
||||||
return new OVFPropertyTO(key, type, value, qualifiers, userConfigurable,
|
return new OVFPropertyTO(key, type, value, qualifiers, userConfigurable,
|
||||||
label, description, password, index, category);
|
label, description, password, index, category);
|
||||||
}
|
}
|
||||||
|
|
@ -152,7 +151,7 @@ public class OVFHelper {
|
||||||
if (child.getNodeName().equalsIgnoreCase("Category") ||
|
if (child.getNodeName().equalsIgnoreCase("Category") ||
|
||||||
child.getNodeName().endsWith(":Category")) {
|
child.getNodeName().endsWith(":Category")) {
|
||||||
lastCategoryFound = child.getTextContent();
|
lastCategoryFound = child.getTextContent();
|
||||||
logger.info("Category found " + lastCategoryFound);
|
logger.info("Category found {}", lastCategoryFound);
|
||||||
} else if (child.getNodeName().equalsIgnoreCase("Property") ||
|
} else if (child.getNodeName().equalsIgnoreCase("Property") ||
|
||||||
child.getNodeName().endsWith(":Property")) {
|
child.getNodeName().endsWith(":Property")) {
|
||||||
OVFPropertyTO prop = createOVFPropertyFromNode(child, propertyIndex, lastCategoryFound);
|
OVFPropertyTO prop = createOVFPropertyFromNode(child, propertyIndex, lastCategoryFound);
|
||||||
|
|
@ -250,13 +249,13 @@ public class OVFHelper {
|
||||||
int diskNumber = 0;
|
int diskNumber = 0;
|
||||||
for (OVFVirtualHardwareItemTO diskItem : diskHardwareItems) {
|
for (OVFVirtualHardwareItemTO diskItem : diskHardwareItems) {
|
||||||
if (StringUtils.isBlank(diskItem.getHostResource())) {
|
if (StringUtils.isBlank(diskItem.getHostResource())) {
|
||||||
logger.error("Missing disk information for hardware item " + diskItem.getElementName() + " " + diskItem.getInstanceId());
|
logger.error("Missing disk information for hardware item {} {}", diskItem.getElementName(), diskItem.getInstanceId());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
String diskId = extractDiskIdFromDiskHostResource(diskItem.getHostResource());
|
String diskId = extractDiskIdFromDiskHostResource(diskItem.getHostResource());
|
||||||
OVFDisk diskDefinition = getDiskDefinitionFromDiskId(diskId, disks);
|
OVFDisk diskDefinition = getDiskDefinitionFromDiskId(diskId, disks);
|
||||||
if (diskDefinition == null) {
|
if (diskDefinition == null) {
|
||||||
logger.error("Missing disk definition for disk ID " + diskId);
|
logger.error("Missing disk definition for disk ID {}", diskId);
|
||||||
}
|
}
|
||||||
OVFFile fileDefinition = getFileDefinitionFromDiskDefinition(diskDefinition._fileRef, files);
|
OVFFile fileDefinition = getFileDefinitionFromDiskDefinition(diskDefinition._fileRef, files);
|
||||||
DatadiskTO datadiskTO = generateDiskTO(fileDefinition, diskDefinition, ovfParentPath, diskNumber, diskItem);
|
DatadiskTO datadiskTO = generateDiskTO(fileDefinition, diskDefinition, ovfParentPath, diskNumber, diskItem);
|
||||||
|
|
@ -278,8 +277,8 @@ public class OVFHelper {
|
||||||
if (StringUtils.isNotBlank(path)) {
|
if (StringUtils.isNotBlank(path)) {
|
||||||
File f = new File(path);
|
File f = new File(path);
|
||||||
if (!f.exists() || f.isDirectory()) {
|
if (!f.exists() || f.isDirectory()) {
|
||||||
logger.error("One of the attached disk or ISO does not exists " + path);
|
logger.error("One of the attached disk or ISOs does not exists {}", path);
|
||||||
throw new InternalErrorException("One of the attached disk or ISO as stated on OVF does not exists " + path);
|
throw new InternalErrorException("One of the attached disk or ISOs as stated on OVF does not exists " + path);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Long capacity = disk != null ? disk._capacity : file._size;
|
Long capacity = disk != null ? disk._capacity : file._size;
|
||||||
|
|
@ -334,9 +333,7 @@ public class OVFHelper {
|
||||||
od._controller = getControllerType(items, od._diskId);
|
od._controller = getControllerType(items, od._diskId);
|
||||||
vd.add(od);
|
vd.add(od);
|
||||||
}
|
}
|
||||||
if (logger.isTraceEnabled()) {
|
logger.trace("Found {} disk definitions", vd.size());
|
||||||
logger.trace(String.format("Found %d disk definitions", vd.size()));
|
|
||||||
}
|
|
||||||
return vd;
|
return vd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -366,9 +363,7 @@ public class OVFHelper {
|
||||||
vf.add(of);
|
vf.add(of);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (logger.isTraceEnabled()) {
|
logger.trace("Found {} file definitions in {}", vf.size(), ovfFile.getPath());
|
||||||
logger.trace(String.format("Found %d file definitions in %s", vf.size(), ovfFile.getPath()));
|
|
||||||
}
|
|
||||||
return vf;
|
return vf;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -506,7 +501,7 @@ public class OVFHelper {
|
||||||
outfile.write(writer.toString());
|
outfile.write(writer.toString());
|
||||||
outfile.close();
|
outfile.close();
|
||||||
} catch (IOException | TransformerException e) {
|
} 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);
|
throw new CloudRuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -522,9 +517,7 @@ public class OVFHelper {
|
||||||
|
|
||||||
public List<OVFNetworkTO> getNetPrerequisitesFromDocument(Document doc) throws InternalErrorException {
|
public List<OVFNetworkTO> getNetPrerequisitesFromDocument(Document doc) throws InternalErrorException {
|
||||||
if (doc == null) {
|
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();
|
return Collections.emptyList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -540,9 +533,7 @@ public class OVFHelper {
|
||||||
private void matchNicsToNets(Map<String, OVFNetworkTO> nets, Node systemElement) {
|
private void matchNicsToNets(Map<String, OVFNetworkTO> nets, Node systemElement) {
|
||||||
final DocumentTraversal traversal = (DocumentTraversal) systemElement;
|
final DocumentTraversal traversal = (DocumentTraversal) systemElement;
|
||||||
final NodeIterator iterator = traversal.createNodeIterator(systemElement, NodeFilter.SHOW_ELEMENT, null, true);
|
final NodeIterator iterator = traversal.createNodeIterator(systemElement, NodeFilter.SHOW_ELEMENT, null, true);
|
||||||
if (logger.isTraceEnabled()) {
|
logger.trace("Starting out with {} network-prerequisites, parsing hardware", nets.size());
|
||||||
logger.trace(String.format("Starting out with %d network-prerequisites, parsing hardware",nets.size()));
|
|
||||||
}
|
|
||||||
int nicCount = 0;
|
int nicCount = 0;
|
||||||
for (Node n = iterator.nextNode(); n != null; n = iterator.nextNode()) {
|
for (Node n = iterator.nextNode(); n != null; n = iterator.nextNode()) {
|
||||||
final Element e = (Element) n;
|
final Element e = (Element) n;
|
||||||
|
|
@ -550,9 +541,7 @@ public class OVFHelper {
|
||||||
nicCount++;
|
nicCount++;
|
||||||
String name = e.getTextContent(); // should be in our nets
|
String name = e.getTextContent(); // should be in our nets
|
||||||
if(nets.get(name) == null) {
|
if(nets.get(name) == null) {
|
||||||
if(logger.isInfoEnabled()) {
|
logger.info("Found a NIC definition without a Network definition by name {}, adding it to the list.", name);
|
||||||
logger.info(String.format("Found a NIC definition without a Network definition by name %s, adding it to the list.", name));
|
|
||||||
}
|
|
||||||
nets.put(name, new OVFNetworkTO());
|
nets.put(name, new OVFNetworkTO());
|
||||||
}
|
}
|
||||||
OVFNetworkTO thisNet = nets.get(name);
|
OVFNetworkTO thisNet = nets.get(name);
|
||||||
|
|
@ -561,9 +550,7 @@ public class OVFHelper {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (logger.isTraceEnabled()) {
|
logger.trace("Ending up with {} network-prerequisites, parsed {} nics", nets.size(), nicCount);
|
||||||
logger.trace(String.format("Ending up with %d network-prerequisites, parsed %d NICs", nets.size(), nicCount));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -585,7 +572,7 @@ public class OVFHelper {
|
||||||
int addressOnParent = Integer.parseInt(addressOnParentStr);
|
int addressOnParent = Integer.parseInt(addressOnParentStr);
|
||||||
nic.setAddressOnParent(addressOnParent);
|
nic.setAddressOnParent(addressOnParent);
|
||||||
} catch (NumberFormatException e) {
|
} 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);
|
boolean automaticAllocation = StringUtils.isNotBlank(automaticAllocationStr) && Boolean.parseBoolean(automaticAllocationStr);
|
||||||
|
|
@ -597,7 +584,7 @@ public class OVFHelper {
|
||||||
int instanceId = Integer.parseInt(instanceIdStr);
|
int instanceId = Integer.parseInt(instanceIdStr);
|
||||||
nic.setInstanceID(instanceId);
|
nic.setInstanceID(instanceId);
|
||||||
} catch (NumberFormatException e) {
|
} 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);
|
nic.setResourceSubType(resourceSubType);
|
||||||
|
|
@ -630,9 +617,7 @@ public class OVFHelper {
|
||||||
|
|
||||||
nets.put(networkName,network);
|
nets.put(networkName,network);
|
||||||
}
|
}
|
||||||
if (logger.isTraceEnabled()) {
|
logger.trace("Found {} Networks in Template", nets.size());
|
||||||
logger.trace(String.format("Found %d Networks in Template", nets.size()));
|
|
||||||
}
|
|
||||||
return nets;
|
return nets;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -771,7 +756,7 @@ public class OVFHelper {
|
||||||
try {
|
try {
|
||||||
return Long.parseLong(value);
|
return Long.parseLong(value);
|
||||||
} catch (NumberFormatException e) {
|
} 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;
|
return null;
|
||||||
|
|
@ -782,7 +767,7 @@ public class OVFHelper {
|
||||||
try {
|
try {
|
||||||
return Integer.parseInt(value);
|
return Integer.parseInt(value);
|
||||||
} catch (NumberFormatException e) {
|
} 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;
|
return null;
|
||||||
|
|
@ -820,7 +805,7 @@ public class OVFHelper {
|
||||||
try {
|
try {
|
||||||
compressedLicense = compressOVFEula(eulaLicense);
|
compressedLicense = compressOVFEula(eulaLicense);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
logger.error("Could not compress the license for info " + eulaInfo);
|
logger.error("Could not compress the license for info {}", eulaInfo);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
OVFEulaSectionTO eula = new OVFEulaSectionTO(eulaInfo, compressedLicense, eulaIndex);
|
OVFEulaSectionTO eula = new OVFEulaSectionTO(eulaInfo, compressedLicense, eulaIndex);
|
||||||
|
|
|
||||||
|
|
@ -54,7 +54,7 @@ public class OVFParser {
|
||||||
documentBuilderFactory.setNamespaceAware(true);
|
documentBuilderFactory.setNamespaceAware(true);
|
||||||
documentBuilder = documentBuilderFactory.newDocumentBuilder();
|
documentBuilder = documentBuilderFactory.newDocumentBuilder();
|
||||||
} catch (ParserConfigurationException e) {
|
} 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 class OVFParser {
|
||||||
try {
|
try {
|
||||||
return documentBuilder.parse(new File(ovfFilePath));
|
return documentBuilder.parse(new File(ovfFilePath));
|
||||||
} catch (SAXException | IOException e) {
|
} catch (SAXException | IOException e) {
|
||||||
logger.error("Error parsing " + ovfFilePath + " " + e.getMessage(), e);
|
logger.error("Error parsing {} {}", ovfFilePath, e.getMessage(), e);
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,7 @@ public class NicTO extends NetworkTO {
|
||||||
boolean dpdkEnabled;
|
boolean dpdkEnabled;
|
||||||
Integer mtu;
|
Integer mtu;
|
||||||
Long networkId;
|
Long networkId;
|
||||||
|
boolean enabled;
|
||||||
|
|
||||||
String networkSegmentName;
|
String networkSegmentName;
|
||||||
|
|
||||||
|
|
@ -154,4 +155,12 @@ public class NicTO extends NetworkTO {
|
||||||
public void setNetworkSegmentName(String networkSegmentName) {
|
public void setNetworkSegmentName(String networkSegmentName) {
|
||||||
this.networkSegmentName = networkSegmentName;
|
this.networkSegmentName = networkSegmentName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isEnabled() {
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnabled(boolean enabled) {
|
||||||
|
this.enabled = enabled;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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<String> 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<String, String> 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<String> serviceOfferingHostTags,
|
||||||
|
String zoneName, String zoneUuid, String podName, String podUuid, String clusterName, String clusterUuid, Map<String, String> 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<String> 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<String, String> getResourceTags() { return resourceTags; }
|
||||||
|
}
|
||||||
|
|
@ -51,6 +51,7 @@ public class VirtualMachineTO {
|
||||||
|
|
||||||
private long minRam;
|
private long minRam;
|
||||||
private long maxRam;
|
private long maxRam;
|
||||||
|
private long requestedRam;
|
||||||
private String hostName;
|
private String hostName;
|
||||||
private String arch;
|
private String arch;
|
||||||
private String os;
|
private String os;
|
||||||
|
|
@ -89,6 +90,7 @@ public class VirtualMachineTO {
|
||||||
private DeployAsIsInfoTO deployAsIsInfo;
|
private DeployAsIsInfoTO deployAsIsInfo;
|
||||||
private String metadataManufacturer;
|
private String metadataManufacturer;
|
||||||
private String metadataProductName;
|
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,
|
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) {
|
String os, boolean enableHA, boolean limitCpuUse, String vncPassword) {
|
||||||
|
|
@ -206,15 +208,20 @@ public class VirtualMachineTO {
|
||||||
return minRam;
|
return minRam;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setRam(long minRam, long maxRam) {
|
public void setRam(long minRam, long maxRam, long requestedRam) {
|
||||||
this.minRam = minRam;
|
this.minRam = minRam;
|
||||||
this.maxRam = maxRam;
|
this.maxRam = maxRam;
|
||||||
|
this.requestedRam = requestedRam;
|
||||||
}
|
}
|
||||||
|
|
||||||
public long getMaxRam() {
|
public long getMaxRam() {
|
||||||
return maxRam;
|
return maxRam;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public long getRequestedRam() {
|
||||||
|
return requestedRam;
|
||||||
|
}
|
||||||
|
|
||||||
public String getHostName() {
|
public String getHostName() {
|
||||||
return hostName;
|
return hostName;
|
||||||
}
|
}
|
||||||
|
|
@ -494,6 +501,14 @@ public class VirtualMachineTO {
|
||||||
this.metadataProductName = metadataProductName;
|
this.metadataProductName = metadataProductName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public VirtualMachineMetadataTO getMetadata() {
|
||||||
|
return metadata;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setMetadata(VirtualMachineMetadataTO metadata) {
|
||||||
|
this.metadata = metadata;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("VM {id: \"%s\", name: \"%s\", uuid: \"%s\", type: \"%s\"}", id, name, uuid, type);
|
return String.format("VM {id: \"%s\", name: \"%s\", uuid: \"%s\", type: \"%s\"}", id, name, uuid, type);
|
||||||
|
|
|
||||||
|
|
@ -22,19 +22,11 @@ import com.cloud.deploy.DeploymentPlan;
|
||||||
import com.cloud.deploy.DeploymentPlanner.ExcludeList;
|
import com.cloud.deploy.DeploymentPlanner.ExcludeList;
|
||||||
import com.cloud.host.Host;
|
import com.cloud.host.Host;
|
||||||
import com.cloud.host.Host.Type;
|
import com.cloud.host.Host.Type;
|
||||||
import com.cloud.offering.ServiceOffering;
|
|
||||||
import com.cloud.utils.component.Adapter;
|
import com.cloud.utils.component.Adapter;
|
||||||
import com.cloud.vm.VirtualMachine;
|
|
||||||
import com.cloud.vm.VirtualMachineProfile;
|
import com.cloud.vm.VirtualMachineProfile;
|
||||||
|
|
||||||
public interface HostAllocator extends Adapter {
|
public interface HostAllocator extends Adapter {
|
||||||
|
|
||||||
/**
|
|
||||||
* @param UserVm vm
|
|
||||||
* @param ServiceOffering offering
|
|
||||||
**/
|
|
||||||
boolean isVirtualMachineUpgradable(final VirtualMachine vm, final ServiceOffering offering);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines which physical hosts are suitable to
|
* Determines which physical hosts are suitable to
|
||||||
* allocate the guest virtual machines on
|
* allocate the guest virtual machines on
|
||||||
|
|
@ -49,31 +41,6 @@ public interface HostAllocator extends Adapter {
|
||||||
|
|
||||||
public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo);
|
public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo);
|
||||||
|
|
||||||
/**
|
|
||||||
* Determines which physical hosts are suitable to allocate the guest
|
|
||||||
* virtual machines on
|
|
||||||
*
|
|
||||||
* Allocators must set any other hosts not considered for allocation in the
|
|
||||||
* ExcludeList avoid. Thus the avoid set and the list of hosts suitable,
|
|
||||||
* together must cover the entire host set in the cluster.
|
|
||||||
*
|
|
||||||
* @param VirtualMachineProfile
|
|
||||||
* vmProfile
|
|
||||||
* @param DeploymentPlan
|
|
||||||
* plan
|
|
||||||
* @param GuestType
|
|
||||||
* type
|
|
||||||
* @param ExcludeList
|
|
||||||
* avoid
|
|
||||||
* @param int returnUpTo (use -1 to return all possible hosts)
|
|
||||||
* @param boolean considerReservedCapacity (default should be true, set to
|
|
||||||
* false if host capacity calculation should not look at reserved
|
|
||||||
* capacity)
|
|
||||||
* @return List<Host> List of hosts that are suitable for VM allocation
|
|
||||||
**/
|
|
||||||
|
|
||||||
public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo, boolean considerReservedCapacity);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determines which physical hosts are suitable to allocate the guest
|
* Determines which physical hosts are suitable to allocate the guest
|
||||||
* virtual machines on
|
* virtual machines on
|
||||||
|
|
|
||||||
|
|
@ -24,15 +24,18 @@ import com.cloud.network.Network;
|
||||||
import org.apache.cloudstack.api.ApiConstants;
|
import org.apache.cloudstack.api.ApiConstants;
|
||||||
import org.apache.cloudstack.api.command.admin.config.ResetCfgCmd;
|
import org.apache.cloudstack.api.command.admin.config.ResetCfgCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.config.UpdateCfgCmd;
|
import org.apache.cloudstack.api.command.admin.config.UpdateCfgCmd;
|
||||||
|
import org.apache.cloudstack.api.command.admin.network.CloneNetworkOfferingCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.network.CreateGuestNetworkIpv6PrefixCmd;
|
import org.apache.cloudstack.api.command.admin.network.CreateGuestNetworkIpv6PrefixCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.network.CreateManagementNetworkIpRangeCmd;
|
import org.apache.cloudstack.api.command.admin.network.CreateManagementNetworkIpRangeCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.network.CreateNetworkOfferingCmd;
|
|
||||||
import org.apache.cloudstack.api.command.admin.network.DeleteGuestNetworkIpv6PrefixCmd;
|
import org.apache.cloudstack.api.command.admin.network.DeleteGuestNetworkIpv6PrefixCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.network.DeleteManagementNetworkIpRangeCmd;
|
import org.apache.cloudstack.api.command.admin.network.DeleteManagementNetworkIpRangeCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.network.DeleteNetworkOfferingCmd;
|
import org.apache.cloudstack.api.command.admin.network.DeleteNetworkOfferingCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.network.ListGuestNetworkIpv6PrefixesCmd;
|
import org.apache.cloudstack.api.command.admin.network.ListGuestNetworkIpv6PrefixesCmd;
|
||||||
|
import org.apache.cloudstack.api.command.admin.network.NetworkOfferingBaseCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.network.UpdateNetworkOfferingCmd;
|
import org.apache.cloudstack.api.command.admin.network.UpdateNetworkOfferingCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.network.UpdatePodManagementNetworkIpRangeCmd;
|
import org.apache.cloudstack.api.command.admin.network.UpdatePodManagementNetworkIpRangeCmd;
|
||||||
|
import org.apache.cloudstack.api.command.admin.offering.CloneDiskOfferingCmd;
|
||||||
|
import org.apache.cloudstack.api.command.admin.offering.CloneServiceOfferingCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.offering.CreateDiskOfferingCmd;
|
import org.apache.cloudstack.api.command.admin.offering.CreateDiskOfferingCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.offering.CreateServiceOfferingCmd;
|
import org.apache.cloudstack.api.command.admin.offering.CreateServiceOfferingCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.offering.DeleteDiskOfferingCmd;
|
import org.apache.cloudstack.api.command.admin.offering.DeleteDiskOfferingCmd;
|
||||||
|
|
@ -105,6 +108,33 @@ public interface ConfigurationService {
|
||||||
*/
|
*/
|
||||||
ServiceOffering createServiceOffering(CreateServiceOfferingCmd cmd);
|
ServiceOffering createServiceOffering(CreateServiceOfferingCmd cmd);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clones a service offering with optional parameter overrides
|
||||||
|
*
|
||||||
|
* @param cmd
|
||||||
|
* the command object that specifies the source offering ID and optional parameter overrides
|
||||||
|
* @return the newly created service offering cloned from source, null otherwise
|
||||||
|
*/
|
||||||
|
ServiceOffering cloneServiceOffering(CloneServiceOfferingCmd cmd);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clones a disk offering with optional parameter overrides
|
||||||
|
*
|
||||||
|
* @param cmd
|
||||||
|
* the command object that specifies the source offering ID and optional parameter overrides
|
||||||
|
* @return the newly created disk offering cloned from source, null otherwise
|
||||||
|
*/
|
||||||
|
DiskOffering cloneDiskOffering(CloneDiskOfferingCmd cmd);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Clones a network offering with optional parameter overrides
|
||||||
|
*
|
||||||
|
* @param cmd
|
||||||
|
* the command object that specifies the source offering ID and optional parameter overrides
|
||||||
|
* @return the newly created network offering cloned from source, null otherwise
|
||||||
|
*/
|
||||||
|
NetworkOffering cloneNetworkOffering(CloneNetworkOfferingCmd cmd);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates a service offering
|
* Updates a service offering
|
||||||
*
|
*
|
||||||
|
|
@ -282,7 +312,7 @@ public interface ConfigurationService {
|
||||||
|
|
||||||
boolean releasePublicIpRange(ReleasePublicIpRangeCmd cmd);
|
boolean releasePublicIpRange(ReleasePublicIpRangeCmd cmd);
|
||||||
|
|
||||||
NetworkOffering createNetworkOffering(CreateNetworkOfferingCmd cmd);
|
NetworkOffering createNetworkOffering(NetworkOfferingBaseCmd cmd);
|
||||||
|
|
||||||
NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd);
|
NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,8 @@ public class CPU {
|
||||||
public enum CPUArch {
|
public enum CPUArch {
|
||||||
x86("i686", 32),
|
x86("i686", 32),
|
||||||
amd64("x86_64", 64),
|
amd64("x86_64", 64),
|
||||||
arm64("aarch64", 64);
|
arm64("aarch64", 64),
|
||||||
|
s390x("s390x", 64);
|
||||||
|
|
||||||
private final String type;
|
private final String type;
|
||||||
private final int bits;
|
private final int bits;
|
||||||
|
|
|
||||||
|
|
@ -62,11 +62,11 @@ public interface DeploymentClusterPlanner extends DeploymentPlanner {
|
||||||
"vm.allocation.algorithm",
|
"vm.allocation.algorithm",
|
||||||
"Advanced",
|
"Advanced",
|
||||||
"random",
|
"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,
|
true,
|
||||||
ConfigKey.Scope.Global, null, null, null, null, null,
|
ConfigKey.Scope.Global, null, null, null, null, null,
|
||||||
ConfigKey.Kind.Select,
|
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
|
* This is called to determine list of possible clusters where a virtual
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ public interface DeploymentPlanner extends Adapter {
|
||||||
boolean canHandle(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid);
|
boolean canHandle(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid);
|
||||||
|
|
||||||
public enum AllocationAlgorithm {
|
public enum AllocationAlgorithm {
|
||||||
random, firstfit, userdispersing, userconcentratedpod_random, userconcentratedpod_firstfit;
|
random, firstfit, userdispersing, firstfitleastconsumed;
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum PlannerResourceUsage {
|
public enum PlannerResourceUsage {
|
||||||
|
|
|
||||||
|
|
@ -298,8 +298,9 @@ public class EventTypes {
|
||||||
public static final String EVENT_REGISTER_CNI_CONFIG = "REGISTER.CNI.CONFIG";
|
public static final String EVENT_REGISTER_CNI_CONFIG = "REGISTER.CNI.CONFIG";
|
||||||
public static final String EVENT_DELETE_CNI_CONFIG = "DELETE.CNI.CONFIG";
|
public static final String EVENT_DELETE_CNI_CONFIG = "DELETE.CNI.CONFIG";
|
||||||
|
|
||||||
//register for user API and secret keys
|
//user API and secret keys
|
||||||
public static final String EVENT_REGISTER_FOR_SECRET_API_KEY = "REGISTER.USER.KEY";
|
public static final String EVENT_REGISTER_FOR_SECRET_API_KEY = "REGISTER.USER.KEY";
|
||||||
|
public static final String EVENT_DELETE_SECRET_API_KEY = "DELETE.USER.KEY";
|
||||||
public static final String API_KEY_ACCESS_UPDATE = "API.KEY.ACCESS.UPDATE";
|
public static final String API_KEY_ACCESS_UPDATE = "API.KEY.ACCESS.UPDATE";
|
||||||
|
|
||||||
// Template Events
|
// Template Events
|
||||||
|
|
@ -374,11 +375,13 @@ public class EventTypes {
|
||||||
|
|
||||||
// Service Offerings
|
// Service Offerings
|
||||||
public static final String EVENT_SERVICE_OFFERING_CREATE = "SERVICE.OFFERING.CREATE";
|
public static final String EVENT_SERVICE_OFFERING_CREATE = "SERVICE.OFFERING.CREATE";
|
||||||
|
public static final String EVENT_SERVICE_OFFERING_CLONE = "SERVICE.OFFERING.CLONE";
|
||||||
public static final String EVENT_SERVICE_OFFERING_EDIT = "SERVICE.OFFERING.EDIT";
|
public static final String EVENT_SERVICE_OFFERING_EDIT = "SERVICE.OFFERING.EDIT";
|
||||||
public static final String EVENT_SERVICE_OFFERING_DELETE = "SERVICE.OFFERING.DELETE";
|
public static final String EVENT_SERVICE_OFFERING_DELETE = "SERVICE.OFFERING.DELETE";
|
||||||
|
|
||||||
// Disk Offerings
|
// Disk Offerings
|
||||||
public static final String EVENT_DISK_OFFERING_CREATE = "DISK.OFFERING.CREATE";
|
public static final String EVENT_DISK_OFFERING_CREATE = "DISK.OFFERING.CREATE";
|
||||||
|
public static final String EVENT_DISK_OFFERING_CLONE = "DISK.OFFERING.CLONE";
|
||||||
public static final String EVENT_DISK_OFFERING_EDIT = "DISK.OFFERING.EDIT";
|
public static final String EVENT_DISK_OFFERING_EDIT = "DISK.OFFERING.EDIT";
|
||||||
public static final String EVENT_DISK_OFFERING_DELETE = "DISK.OFFERING.DELETE";
|
public static final String EVENT_DISK_OFFERING_DELETE = "DISK.OFFERING.DELETE";
|
||||||
|
|
||||||
|
|
@ -399,6 +402,7 @@ public class EventTypes {
|
||||||
|
|
||||||
// Network offerings
|
// Network offerings
|
||||||
public static final String EVENT_NETWORK_OFFERING_CREATE = "NETWORK.OFFERING.CREATE";
|
public static final String EVENT_NETWORK_OFFERING_CREATE = "NETWORK.OFFERING.CREATE";
|
||||||
|
public static final String EVENT_NETWORK_OFFERING_CLONE = "NETWORK.OFFERING.CLONE";
|
||||||
public static final String EVENT_NETWORK_OFFERING_ASSIGN = "NETWORK.OFFERING.ASSIGN";
|
public static final String EVENT_NETWORK_OFFERING_ASSIGN = "NETWORK.OFFERING.ASSIGN";
|
||||||
public static final String EVENT_NETWORK_OFFERING_EDIT = "NETWORK.OFFERING.EDIT";
|
public static final String EVENT_NETWORK_OFFERING_EDIT = "NETWORK.OFFERING.EDIT";
|
||||||
public static final String EVENT_NETWORK_OFFERING_REMOVE = "NETWORK.OFFERING.REMOVE";
|
public static final String EVENT_NETWORK_OFFERING_REMOVE = "NETWORK.OFFERING.REMOVE";
|
||||||
|
|
@ -503,6 +507,7 @@ public class EventTypes {
|
||||||
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE = "VPN.S2S.CUSTOMER.GATEWAY.CREATE";
|
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE = "VPN.S2S.CUSTOMER.GATEWAY.CREATE";
|
||||||
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE = "VPN.S2S.CUSTOMER.GATEWAY.DELETE";
|
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE = "VPN.S2S.CUSTOMER.GATEWAY.DELETE";
|
||||||
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE = "VPN.S2S.CUSTOMER.GATEWAY.UPDATE";
|
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE = "VPN.S2S.CUSTOMER.GATEWAY.UPDATE";
|
||||||
|
public static final String EVENT_S2S_VPN_GATEWAY_OBSOLETE_PARAMS = "VPN.S2S.GATEWAY.OBSOLETE.PARAMS";
|
||||||
public static final String EVENT_S2S_VPN_CONNECTION_CREATE = "VPN.S2S.CONNECTION.CREATE";
|
public static final String EVENT_S2S_VPN_CONNECTION_CREATE = "VPN.S2S.CONNECTION.CREATE";
|
||||||
public static final String EVENT_S2S_VPN_CONNECTION_DELETE = "VPN.S2S.CONNECTION.DELETE";
|
public static final String EVENT_S2S_VPN_CONNECTION_DELETE = "VPN.S2S.CONNECTION.DELETE";
|
||||||
public static final String EVENT_S2S_VPN_CONNECTION_RESET = "VPN.S2S.CONNECTION.RESET";
|
public static final String EVENT_S2S_VPN_CONNECTION_RESET = "VPN.S2S.CONNECTION.RESET";
|
||||||
|
|
@ -597,6 +602,7 @@ public class EventTypes {
|
||||||
|
|
||||||
// VPC offerings
|
// VPC offerings
|
||||||
public static final String EVENT_VPC_OFFERING_CREATE = "VPC.OFFERING.CREATE";
|
public static final String EVENT_VPC_OFFERING_CREATE = "VPC.OFFERING.CREATE";
|
||||||
|
public static final String EVENT_VPC_OFFERING_CLONE = "VPC.OFFERING.CLONE";
|
||||||
public static final String EVENT_VPC_OFFERING_UPDATE = "VPC.OFFERING.UPDATE";
|
public static final String EVENT_VPC_OFFERING_UPDATE = "VPC.OFFERING.UPDATE";
|
||||||
public static final String EVENT_VPC_OFFERING_DELETE = "VPC.OFFERING.DELETE";
|
public static final String EVENT_VPC_OFFERING_DELETE = "VPC.OFFERING.DELETE";
|
||||||
|
|
||||||
|
|
@ -629,6 +635,7 @@ public class EventTypes {
|
||||||
|
|
||||||
// Backup and Recovery events
|
// Backup and Recovery events
|
||||||
public static final String EVENT_VM_BACKUP_IMPORT_OFFERING = "BACKUP.IMPORT.OFFERING";
|
public static final String EVENT_VM_BACKUP_IMPORT_OFFERING = "BACKUP.IMPORT.OFFERING";
|
||||||
|
public static final String EVENT_VM_BACKUP_OFFERING_CLONE = "BACKUP.OFFERING.CLONE";
|
||||||
public static final String EVENT_VM_BACKUP_OFFERING_ASSIGN = "BACKUP.OFFERING.ASSIGN";
|
public static final String EVENT_VM_BACKUP_OFFERING_ASSIGN = "BACKUP.OFFERING.ASSIGN";
|
||||||
public static final String EVENT_VM_BACKUP_OFFERING_REMOVE = "BACKUP.OFFERING.REMOVE";
|
public static final String EVENT_VM_BACKUP_OFFERING_REMOVE = "BACKUP.OFFERING.REMOVE";
|
||||||
public static final String EVENT_VM_BACKUP_CREATE = "BACKUP.CREATE";
|
public static final String EVENT_VM_BACKUP_CREATE = "BACKUP.CREATE";
|
||||||
|
|
@ -1044,11 +1051,13 @@ public class EventTypes {
|
||||||
|
|
||||||
// Service Offerings
|
// Service Offerings
|
||||||
entityEventDetails.put(EVENT_SERVICE_OFFERING_CREATE, ServiceOffering.class);
|
entityEventDetails.put(EVENT_SERVICE_OFFERING_CREATE, ServiceOffering.class);
|
||||||
|
entityEventDetails.put(EVENT_SERVICE_OFFERING_CLONE, ServiceOffering.class);
|
||||||
entityEventDetails.put(EVENT_SERVICE_OFFERING_EDIT, ServiceOffering.class);
|
entityEventDetails.put(EVENT_SERVICE_OFFERING_EDIT, ServiceOffering.class);
|
||||||
entityEventDetails.put(EVENT_SERVICE_OFFERING_DELETE, ServiceOffering.class);
|
entityEventDetails.put(EVENT_SERVICE_OFFERING_DELETE, ServiceOffering.class);
|
||||||
|
|
||||||
// Disk Offerings
|
// Disk Offerings
|
||||||
entityEventDetails.put(EVENT_DISK_OFFERING_CREATE, DiskOffering.class);
|
entityEventDetails.put(EVENT_DISK_OFFERING_CREATE, DiskOffering.class);
|
||||||
|
entityEventDetails.put(EVENT_DISK_OFFERING_CLONE, DiskOffering.class);
|
||||||
entityEventDetails.put(EVENT_DISK_OFFERING_EDIT, DiskOffering.class);
|
entityEventDetails.put(EVENT_DISK_OFFERING_EDIT, DiskOffering.class);
|
||||||
entityEventDetails.put(EVENT_DISK_OFFERING_DELETE, DiskOffering.class);
|
entityEventDetails.put(EVENT_DISK_OFFERING_DELETE, DiskOffering.class);
|
||||||
|
|
||||||
|
|
@ -1069,6 +1078,7 @@ public class EventTypes {
|
||||||
|
|
||||||
// Network offerings
|
// Network offerings
|
||||||
entityEventDetails.put(EVENT_NETWORK_OFFERING_CREATE, NetworkOffering.class);
|
entityEventDetails.put(EVENT_NETWORK_OFFERING_CREATE, NetworkOffering.class);
|
||||||
|
entityEventDetails.put(EVENT_NETWORK_OFFERING_CLONE, NetworkOffering.class);
|
||||||
entityEventDetails.put(EVENT_NETWORK_OFFERING_ASSIGN, NetworkOffering.class);
|
entityEventDetails.put(EVENT_NETWORK_OFFERING_ASSIGN, NetworkOffering.class);
|
||||||
entityEventDetails.put(EVENT_NETWORK_OFFERING_EDIT, NetworkOffering.class);
|
entityEventDetails.put(EVENT_NETWORK_OFFERING_EDIT, NetworkOffering.class);
|
||||||
entityEventDetails.put(EVENT_NETWORK_OFFERING_REMOVE, NetworkOffering.class);
|
entityEventDetails.put(EVENT_NETWORK_OFFERING_REMOVE, NetworkOffering.class);
|
||||||
|
|
@ -1152,6 +1162,7 @@ public class EventTypes {
|
||||||
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE, Site2SiteCustomerGateway.class);
|
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE, Site2SiteCustomerGateway.class);
|
||||||
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE, Site2SiteCustomerGateway.class);
|
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE, Site2SiteCustomerGateway.class);
|
||||||
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE, Site2SiteCustomerGateway.class);
|
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE, Site2SiteCustomerGateway.class);
|
||||||
|
entityEventDetails.put(EVENT_S2S_VPN_GATEWAY_OBSOLETE_PARAMS, Site2SiteCustomerGateway.class);
|
||||||
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_CREATE, Site2SiteVpnConnection.class);
|
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_CREATE, Site2SiteVpnConnection.class);
|
||||||
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_DELETE, Site2SiteVpnConnection.class);
|
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_DELETE, Site2SiteVpnConnection.class);
|
||||||
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_RESET, Site2SiteVpnConnection.class);
|
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_RESET, Site2SiteVpnConnection.class);
|
||||||
|
|
|
||||||
|
|
@ -36,5 +36,4 @@ public interface HostStats {
|
||||||
public HostStats getHostStats();
|
public HostStats getHostStats();
|
||||||
|
|
||||||
public double getLoadAverage();
|
public double getLoadAverage();
|
||||||
// public double getXapiMemoryUsageKBs();
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -98,7 +98,7 @@ public interface KubernetesCluster extends ControlledEntity, com.cloud.utils.fsm
|
||||||
s_fsm.addTransition(State.Running, Event.ScaleDownRequested, State.Scaling);
|
s_fsm.addTransition(State.Running, Event.ScaleDownRequested, State.Scaling);
|
||||||
s_fsm.addTransition(State.Stopped, Event.ScaleUpRequested, State.ScalingStoppedCluster);
|
s_fsm.addTransition(State.Stopped, Event.ScaleUpRequested, State.ScalingStoppedCluster);
|
||||||
s_fsm.addTransition(State.Scaling, Event.OperationSucceeded, State.Running);
|
s_fsm.addTransition(State.Scaling, Event.OperationSucceeded, State.Running);
|
||||||
s_fsm.addTransition(State.Scaling, Event.OperationFailed, State.Alert);
|
s_fsm.addTransition(State.Scaling, Event.OperationFailed, State.Running);
|
||||||
s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationSucceeded, State.Stopped);
|
s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationSucceeded, State.Stopped);
|
||||||
s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationFailed, State.Alert);
|
s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationFailed, State.Alert);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ package com.cloud.kubernetes.cluster;
|
||||||
|
|
||||||
import org.apache.cloudstack.acl.ControlledEntity;
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
|
|
@ -33,8 +34,10 @@ public interface KubernetesServiceHelper extends Adapter {
|
||||||
ControlledEntity findByUuid(String uuid);
|
ControlledEntity findByUuid(String uuid);
|
||||||
ControlledEntity findByVmId(long vmId);
|
ControlledEntity findByVmId(long vmId);
|
||||||
void checkVmCanBeDestroyed(UserVm userVm);
|
void checkVmCanBeDestroyed(UserVm userVm);
|
||||||
|
void checkVmAffinityGroupsCanBeUpdated(UserVm userVm);
|
||||||
boolean isValidNodeType(String nodeType);
|
boolean isValidNodeType(String nodeType);
|
||||||
Map<String, Long> getServiceOfferingNodeTypeMap(Map<String, Map<String, String>> serviceOfferingNodeTypeMap);
|
Map<String, Long> getServiceOfferingNodeTypeMap(Map<String, Map<String, String>> serviceOfferingNodeTypeMap);
|
||||||
Map<String, Long> getTemplateNodeTypeMap(Map<String, Map<String, String>> templateNodeTypeMap);
|
Map<String, Long> getTemplateNodeTypeMap(Map<String, Map<String, String>> templateNodeTypeMap);
|
||||||
|
Map<String, List<Long>> getAffinityGroupNodeTypeMap(Map<String, Map<String, String>> affinityGroupNodeTypeMap);
|
||||||
void cleanupForAccount(Account account);
|
void cleanupForAccount(Account account);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -510,4 +510,6 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
|
||||||
Integer getPrivateMtu();
|
Integer getPrivateMtu();
|
||||||
|
|
||||||
Integer getNetworkCidrSize();
|
Integer getNetworkCidrSize();
|
||||||
|
|
||||||
|
boolean getKeepMacAddressOnPublicNic();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -385,6 +385,11 @@ public class NetworkProfile implements Network {
|
||||||
return networkCidrSize;
|
return networkCidrSize;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean getKeepMacAddressOnPublicNic() {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return String.format("NetworkProfile %s",
|
return String.format("NetworkProfile %s",
|
||||||
|
|
|
||||||
|
|
@ -279,4 +279,6 @@ public interface NetworkService {
|
||||||
IpAddresses getIpAddressesFromIps(String ipAddress, String ip6Address, String macAddress);
|
IpAddresses getIpAddressesFromIps(String ipAddress, String ip6Address, String macAddress);
|
||||||
|
|
||||||
String getNicVlanValueForExternalVm(NicTO nic);
|
String getNicVlanValueForExternalVm(NicTO nic);
|
||||||
|
|
||||||
|
Long getPreferredNetworkIdForPublicIpRuleAssignment(IpAddress ip, Long networkId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -41,4 +41,6 @@ public interface PhysicalNetworkTrafficType extends InternalIdentity, Identity {
|
||||||
String getHypervNetworkLabel();
|
String getHypervNetworkLabel();
|
||||||
|
|
||||||
String getOvm3NetworkLabel();
|
String getOvm3NetworkLabel();
|
||||||
|
|
||||||
|
String getVlan();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -108,7 +108,7 @@ public interface LoadBalancingRulesService {
|
||||||
/**
|
/**
|
||||||
* Assign a virtual machine or list of virtual machines, or Map of <vmId vmIp> to a load balancer.
|
* Assign a virtual machine or list of virtual machines, or Map of <vmId vmIp> to a load balancer.
|
||||||
*/
|
*/
|
||||||
boolean assignToLoadBalancer(long lbRuleId, List<Long> vmIds, Map<Long, List<String>> vmIdIpMap, boolean isAutoScaleVM);
|
boolean assignToLoadBalancer(long lbRuleId, List<Long> vmIds, Map<Long, List<String>> vmIdIpMap, Map<Long, Long> vmIdNetworkMap, boolean isAutoScaleVM);
|
||||||
|
|
||||||
boolean assignSSLCertToLoadBalancerRule(Long lbRuleId, String certName, String publicCert, String privateKey);
|
boolean assignSSLCertToLoadBalancerRule(Long lbRuleId, String certName, String publicCert, String privateKey);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -108,8 +108,7 @@ public class LbStickinessMethod {
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addParam(String name, Boolean required, String description, Boolean isFlag) {
|
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 */
|
/* 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, description);
|
|
||||||
LbStickinessMethodParam param = new LbStickinessMethodParam(name, required, " ", isFlag);
|
LbStickinessMethodParam param = new LbStickinessMethodParam(name, required, " ", isFlag);
|
||||||
_paramList.add(param);
|
_paramList.add(param);
|
||||||
return;
|
return;
|
||||||
|
|
@ -133,7 +132,6 @@ public class LbStickinessMethod {
|
||||||
|
|
||||||
public void setDescription(String description) {
|
public void setDescription(String description) {
|
||||||
/* FIXME : UI is breaking if the capability string length is larger , temporarily description is commented out */
|
/* FIXME : UI is breaking if the capability string length is larger , temporarily description is commented out */
|
||||||
//this.description = description;
|
|
||||||
this._description = " ";
|
this._description = " ";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -107,4 +107,6 @@ public interface Vpc extends ControlledEntity, Identity, InternalIdentity {
|
||||||
String getIp6Dns2();
|
String getIp6Dns2();
|
||||||
|
|
||||||
boolean useRouterIpAsResolver();
|
boolean useRouterIpAsResolver();
|
||||||
|
|
||||||
|
boolean getKeepMacAddressOnPublicNic();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,4 +84,6 @@ public interface VpcOffering extends InternalIdentity, Identity {
|
||||||
NetworkOffering.RoutingMode getRoutingMode();
|
NetworkOffering.RoutingMode getRoutingMode();
|
||||||
|
|
||||||
Boolean isSpecifyAsNumber();
|
Boolean isSpecifyAsNumber();
|
||||||
|
|
||||||
|
boolean isConserveMode();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ package com.cloud.network.vpc;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.api.command.admin.vpc.CloneVPCOfferingCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.vpc.CreateVPCOfferingCmd;
|
import org.apache.cloudstack.api.command.admin.vpc.CreateVPCOfferingCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.vpc.UpdateVPCOfferingCmd;
|
import org.apache.cloudstack.api.command.admin.vpc.UpdateVPCOfferingCmd;
|
||||||
import org.apache.cloudstack.api.command.user.vpc.ListVPCOfferingsCmd;
|
import org.apache.cloudstack.api.command.user.vpc.ListVPCOfferingsCmd;
|
||||||
|
|
@ -34,12 +35,14 @@ public interface VpcProvisioningService {
|
||||||
|
|
||||||
VpcOffering createVpcOffering(CreateVPCOfferingCmd cmd);
|
VpcOffering createVpcOffering(CreateVPCOfferingCmd cmd);
|
||||||
|
|
||||||
|
VpcOffering cloneVPCOffering(CloneVPCOfferingCmd cmd);
|
||||||
|
|
||||||
VpcOffering createVpcOffering(String name, String displayText, List<String> supportedServices,
|
VpcOffering createVpcOffering(String name, String displayText, List<String> supportedServices,
|
||||||
Map<String, List<String>> serviceProviders,
|
Map<String, List<String>> serviceProviders,
|
||||||
Map serviceCapabilitystList, NetUtils.InternetProtocol internetProtocol,
|
Map serviceCapabilitystList, NetUtils.InternetProtocol internetProtocol,
|
||||||
Long serviceOfferingId, String externalProvider, NetworkOffering.NetworkMode networkMode,
|
Long serviceOfferingId, String externalProvider, NetworkOffering.NetworkMode networkMode,
|
||||||
List<Long> domainIds, List<Long> zoneIds, VpcOffering.State state,
|
List<Long> domainIds, List<Long> zoneIds, VpcOffering.State state,
|
||||||
NetworkOffering.RoutingMode routingMode, boolean specifyAsNumber);
|
NetworkOffering.RoutingMode routingMode, boolean specifyAsNumber, boolean conserveMode);
|
||||||
|
|
||||||
|
|
||||||
Pair<List<? extends VpcOffering>,Integer> listVpcOfferings(ListVPCOfferingsCmd cmd);
|
Pair<List<? extends VpcOffering>,Integer> listVpcOfferings(ListVPCOfferingsCmd cmd);
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ public interface VpcService {
|
||||||
*/
|
*/
|
||||||
Vpc createVpc(long zoneId, long vpcOffId, long vpcOwnerId, String vpcName, String displayText, String cidr, String networkDomain,
|
Vpc createVpc(long zoneId, long vpcOffId, long vpcOwnerId, String vpcName, String displayText, String cidr, String networkDomain,
|
||||||
String ip4Dns1, String ip4Dns2, String ip6Dns1, String ip6Dns2, Boolean displayVpc, Integer publicMtu, Integer cidrSize,
|
String ip4Dns1, String ip4Dns2, String ip6Dns1, String ip6Dns2, Boolean displayVpc, Integer publicMtu, Integer cidrSize,
|
||||||
Long asNumber, List<Long> bgpPeerIds, Boolean useVrIpResolver) throws ResourceAllocationException;
|
Long asNumber, List<Long> bgpPeerIds, Boolean useVrIpResolver, boolean keepMacAddressOnPublicNic) throws ResourceAllocationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Persists VPC record in the database
|
* Persists VPC record in the database
|
||||||
|
|
@ -104,7 +104,7 @@ public interface VpcService {
|
||||||
* @throws ResourceUnavailableException if during restart some resources may not be available
|
* @throws ResourceUnavailableException if during restart some resources may not be available
|
||||||
* @throws InsufficientCapacityException if for instance no address space, compute or storage is sufficiently available
|
* @throws InsufficientCapacityException if for instance no address space, compute or storage is sufficiently available
|
||||||
*/
|
*/
|
||||||
Vpc updateVpc(long vpcId, String vpcName, String displayText, String customId, Boolean displayVpc, Integer mtu, String sourceNatIp) throws ResourceUnavailableException, InsufficientCapacityException;
|
Vpc updateVpc(long vpcId, String vpcName, String displayText, String customId, Boolean displayVpc, Integer mtu, String sourceNatIp, Boolean keepMacAddressOnPublicNic) throws ResourceUnavailableException, InsufficientCapacityException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lists VPC(s) based on the parameters passed to the API call
|
* Lists VPC(s) based on the parameters passed to the API call
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,6 @@ import org.apache.cloudstack.api.command.user.vm.GetVMPasswordCmd;
|
||||||
import org.apache.cloudstack.api.command.user.vmgroup.UpdateVMGroupCmd;
|
import org.apache.cloudstack.api.command.user.vmgroup.UpdateVMGroupCmd;
|
||||||
import org.apache.cloudstack.config.Configuration;
|
import org.apache.cloudstack.config.Configuration;
|
||||||
import org.apache.cloudstack.config.ConfigurationGroup;
|
import org.apache.cloudstack.config.ConfigurationGroup;
|
||||||
import org.apache.cloudstack.framework.config.ConfigKey;
|
|
||||||
|
|
||||||
import com.cloud.alert.Alert;
|
import com.cloud.alert.Alert;
|
||||||
import com.cloud.capacity.Capacity;
|
import com.cloud.capacity.Capacity;
|
||||||
|
|
@ -108,14 +107,6 @@ import com.cloud.vm.VirtualMachineProfile;
|
||||||
public interface ManagementService {
|
public interface ManagementService {
|
||||||
static final String Name = "management-server";
|
static final String Name = "management-server";
|
||||||
|
|
||||||
ConfigKey<Boolean> JsInterpretationEnabled = new ConfigKey<>("Hidden"
|
|
||||||
, Boolean.class
|
|
||||||
, "js.interpretation.enabled"
|
|
||||||
, "false"
|
|
||||||
, "Enable/Disable all JavaScript interpretation related functionalities to create or update Javascript rules."
|
|
||||||
, false
|
|
||||||
, ConfigKey.Scope.Global);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the a map of the names/values in the configuration table
|
* returns the a map of the names/values in the configuration table
|
||||||
*
|
*
|
||||||
|
|
@ -534,6 +525,4 @@ public interface ManagementService {
|
||||||
|
|
||||||
boolean removeManagementServer(RemoveManagementServerCmd cmd);
|
boolean removeManagementServer(RemoveManagementServerCmd cmd);
|
||||||
|
|
||||||
void checkJsInterpretationAllowedIfNeededForParameterValue(String paramName, boolean paramValue);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,14 +16,14 @@
|
||||||
// under the License.
|
// under the License.
|
||||||
package com.cloud.server;
|
package com.cloud.server;
|
||||||
|
|
||||||
import org.apache.cloudstack.acl.ControlledEntity;
|
|
||||||
import org.apache.cloudstack.api.Identity;
|
|
||||||
import org.apache.cloudstack.api.InternalIdentity;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface ResourceTag extends ControlledEntity, Identity, InternalIdentity {
|
public interface ResourceTag extends ControlledEntity, Identity, InternalIdentity {
|
||||||
|
|
||||||
// FIXME - extract enum to another interface as its used both by resourceTags and resourceMetaData code
|
// FIXME - extract enum to another interface as its used both by resourceTags and resourceMetaData code
|
||||||
|
|
@ -70,7 +70,7 @@ public interface ResourceTag extends ControlledEntity, Identity, InternalIdentit
|
||||||
GuestOs(false, true),
|
GuestOs(false, true),
|
||||||
NetworkOffering(false, true),
|
NetworkOffering(false, true),
|
||||||
VpcOffering(true, false),
|
VpcOffering(true, false),
|
||||||
Domain(false, false, true),
|
Domain(true, false, true),
|
||||||
ObjectStore(false, false, true);
|
ObjectStore(false, false, true);
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -128,7 +128,7 @@ public class Storage {
|
||||||
public static enum TemplateType {
|
public static enum TemplateType {
|
||||||
ROUTING, // Router template
|
ROUTING, // Router template
|
||||||
SYSTEM, /* routing, system vm 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 */
|
PERHOST, /* every host has this template, don't need to install it in secondary storage */
|
||||||
USER, /* User supplied template/iso */
|
USER, /* User supplied template/iso */
|
||||||
VNF, /* VNFs (virtual network functions) template */
|
VNF, /* VNFs (virtual network functions) template */
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@ import java.net.MalformedURLException;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import com.cloud.dc.DataCenter;
|
||||||
import com.cloud.exception.ResourceAllocationException;
|
import com.cloud.exception.ResourceAllocationException;
|
||||||
import com.cloud.offering.DiskOffering;
|
import com.cloud.offering.DiskOffering;
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
|
|
@ -56,9 +57,9 @@ public interface VolumeApiService {
|
||||||
Boolean.class,
|
Boolean.class,
|
||||||
"use.https.to.upload",
|
"use.https.to.upload",
|
||||||
"true",
|
"true",
|
||||||
"Determines the protocol (HTTPS or HTTP) ACS will use to generate links to upload ISOs, volumes, and templates. When set as 'true', ACS will use protocol HTTPS, otherwise, it will use protocol HTTP. Default value is 'true'.",
|
"Controls whether upload links for ISOs, volumes, and templates use HTTPS (true, default) or HTTP (false). After changing this setting, the Secondary Storage VM (SSVM) must be recreated",
|
||||||
true,
|
true,
|
||||||
ConfigKey.Scope.StoragePool);
|
ConfigKey.Scope.Zone);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the database object for a volume based on the given criteria
|
* Creates the database object for a volume based on the given criteria
|
||||||
|
|
@ -70,6 +71,10 @@ public interface VolumeApiService {
|
||||||
*/
|
*/
|
||||||
Volume allocVolume(CreateVolumeCmd cmd) throws ResourceAllocationException;
|
Volume allocVolume(CreateVolumeCmd cmd) throws ResourceAllocationException;
|
||||||
|
|
||||||
|
Volume allocVolume(long ownerId, Long zoneId, Long diskOfferingId, Long vmId, Long snapshotId, String name,
|
||||||
|
Long cmdSize, Boolean displayVolume, Long cmdMinIops, Long cmdMaxIops, String customId)
|
||||||
|
throws ResourceAllocationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates the volume based on the given criteria
|
* Creates the volume based on the given criteria
|
||||||
*
|
*
|
||||||
|
|
@ -80,6 +85,8 @@ public interface VolumeApiService {
|
||||||
*/
|
*/
|
||||||
Volume createVolume(CreateVolumeCmd cmd);
|
Volume createVolume(CreateVolumeCmd cmd);
|
||||||
|
|
||||||
|
Volume createVolume(long volumeId, Long vmId, Long snapshotId, Long storageId, Boolean display);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resizes the volume based on the given criteria
|
* Resizes the volume based on the given criteria
|
||||||
*
|
*
|
||||||
|
|
@ -203,4 +210,6 @@ public interface VolumeApiService {
|
||||||
Pair<String, String> checkAndRepairVolume(CheckAndRepairVolumeCmd cmd) throws ResourceAllocationException;
|
Pair<String, String> checkAndRepairVolume(CheckAndRepairVolumeCmd cmd) throws ResourceAllocationException;
|
||||||
|
|
||||||
Long getVolumePhysicalSize(Storage.ImageFormat format, String path, String chainInfo);
|
Long getVolumePhysicalSize(Storage.ImageFormat format, String path, String chainInfo);
|
||||||
|
|
||||||
|
Long getCustomDiskOfferingIdForVolumeUpload(Account owner, DataCenter zone, boolean encryptEnabledOnly);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,12 +21,13 @@ import java.util.Map;
|
||||||
|
|
||||||
import com.cloud.utils.Pair;
|
import com.cloud.utils.Pair;
|
||||||
import org.apache.cloudstack.acl.ControlledEntity;
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.acl.RolePermissionEntity;
|
||||||
import org.apache.cloudstack.acl.RoleType;
|
import org.apache.cloudstack.acl.RoleType;
|
||||||
import org.apache.cloudstack.acl.SecurityChecker.AccessType;
|
import org.apache.cloudstack.acl.SecurityChecker.AccessType;
|
||||||
|
import org.apache.cloudstack.acl.apikeypair.ApiKeyPair;
|
||||||
|
import org.apache.cloudstack.acl.apikeypair.ApiKeyPairPermission;
|
||||||
|
import org.apache.cloudstack.api.BaseCmd;
|
||||||
import org.apache.cloudstack.api.command.admin.account.CreateAccountCmd;
|
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.RegisterUserKeyCmd;
|
|
||||||
import org.apache.cloudstack.api.command.admin.user.UpdateUserCmd;
|
|
||||||
|
|
||||||
import com.cloud.dc.DataCenter;
|
import com.cloud.dc.DataCenter;
|
||||||
import com.cloud.domain.Domain;
|
import com.cloud.domain.Domain;
|
||||||
|
|
@ -35,7 +36,16 @@ import com.cloud.network.vpc.VpcOffering;
|
||||||
import com.cloud.offering.DiskOffering;
|
import com.cloud.offering.DiskOffering;
|
||||||
import com.cloud.offering.NetworkOffering;
|
import com.cloud.offering.NetworkOffering;
|
||||||
import com.cloud.offering.ServiceOffering;
|
import com.cloud.offering.ServiceOffering;
|
||||||
|
import org.apache.cloudstack.api.command.admin.user.DeleteUserKeysCmd;
|
||||||
|
import org.apache.cloudstack.api.command.admin.user.GetUserKeysCmd;
|
||||||
|
import org.apache.cloudstack.api.command.admin.user.ListUserKeyRulesCmd;
|
||||||
|
import org.apache.cloudstack.api.command.admin.user.ListUserKeysCmd;
|
||||||
|
import org.apache.cloudstack.api.command.admin.user.RegisterUserKeysCmd;
|
||||||
|
import org.apache.cloudstack.api.command.admin.user.UpdateUserCmd;
|
||||||
|
import org.apache.cloudstack.api.response.ApiKeyPairResponse;
|
||||||
|
import org.apache.cloudstack.api.response.ListResponse;
|
||||||
import org.apache.cloudstack.auth.UserTwoFactorAuthenticator;
|
import org.apache.cloudstack.auth.UserTwoFactorAuthenticator;
|
||||||
|
import org.apache.cloudstack.backup.BackupOffering;
|
||||||
|
|
||||||
public interface AccountService {
|
public interface AccountService {
|
||||||
|
|
||||||
|
|
@ -58,7 +68,8 @@ public interface AccountService {
|
||||||
|
|
||||||
User getSystemUser();
|
User getSystemUser();
|
||||||
|
|
||||||
User createUser(String userName, String password, String firstName, String lastName, String email, String timeZone, String accountName, Long domainId, String userUUID);
|
User createUser(String userName, String password, String firstName, String lastName, String email, String timeZone,
|
||||||
|
String accountName, Long domainId, String userUUID, boolean isPasswordChangeRequired);
|
||||||
|
|
||||||
User createUser(String userName, String password, String firstName, String lastName, String email, String timeZone, String accountName, Long domainId, String userUUID,
|
User createUser(String userName, String password, String firstName, String lastName, String email, String timeZone, String accountName, Long domainId, String userUUID,
|
||||||
User.Source source);
|
User.Source source);
|
||||||
|
|
@ -77,10 +88,16 @@ public interface AccountService {
|
||||||
|
|
||||||
Account getActiveAccountById(long accountId);
|
Account getActiveAccountById(long accountId);
|
||||||
|
|
||||||
|
Account getActiveAccountByUuid(String accountUuid);
|
||||||
|
|
||||||
Account getAccount(long accountId);
|
Account getAccount(long accountId);
|
||||||
|
|
||||||
|
Account getAccountByUuid(String accountUuid);
|
||||||
|
|
||||||
User getActiveUser(long userId);
|
User getActiveUser(long userId);
|
||||||
|
|
||||||
|
User getOneActiveUserForAccount(Account account);
|
||||||
|
|
||||||
User getUserIncludingRemoved(long userId);
|
User getUserIncludingRemoved(long userId);
|
||||||
|
|
||||||
boolean isRootAdmin(Long accountId);
|
boolean isRootAdmin(Long accountId);
|
||||||
|
|
@ -95,7 +112,7 @@ public interface AccountService {
|
||||||
|
|
||||||
void markUserRegistered(long userId);
|
void markUserRegistered(long userId);
|
||||||
|
|
||||||
public String[] createApiKeyAndSecretKey(RegisterUserKeyCmd cmd);
|
ApiKeyPair createApiKeyAndSecretKey(RegisterUserKeysCmd cmd);
|
||||||
|
|
||||||
public String[] createApiKeyAndSecretKey(final long userId);
|
public String[] createApiKeyAndSecretKey(final long userId);
|
||||||
|
|
||||||
|
|
@ -115,13 +132,19 @@ public interface AccountService {
|
||||||
|
|
||||||
void checkAccess(Account account, VpcOffering vof, DataCenter zone) throws PermissionDeniedException;
|
void checkAccess(Account account, VpcOffering vof, DataCenter zone) throws PermissionDeniedException;
|
||||||
|
|
||||||
|
void checkAccess(Account account, BackupOffering bof) throws PermissionDeniedException;
|
||||||
|
|
||||||
void checkAccess(User user, ControlledEntity entity);
|
void checkAccess(User user, ControlledEntity entity);
|
||||||
|
|
||||||
void checkAccess(Account account, AccessType accessType, boolean sameOwner, String apiName, ControlledEntity... entities) throws PermissionDeniedException;
|
void checkAccess(Account account, AccessType accessType, boolean sameOwner, String apiName, ControlledEntity... entities) throws PermissionDeniedException;
|
||||||
|
|
||||||
void validateAccountHasAccessToResource(Account account, AccessType accessType, Object resource);
|
void validateAccountHasAccessToResource(Account account, AccessType accessType, Object resource);
|
||||||
|
|
||||||
Long finalyzeAccountId(String accountName, Long domainId, Long projectId, boolean enabledOnly);
|
void validateCallingUserHasAccessToDesiredUser(Long userId);
|
||||||
|
|
||||||
|
Long finalizeAccountId(String accountName, Long domainId, Long projectId, boolean enabledOnly);
|
||||||
|
|
||||||
|
Long finalizeAccountId(Long accountId, String accountName, Long domainId, Long projectId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns the user account object for a given user id
|
* returns the user account object for a given user id
|
||||||
|
|
@ -130,9 +153,15 @@ public interface AccountService {
|
||||||
*/
|
*/
|
||||||
UserAccount getUserAccountById(Long userId);
|
UserAccount getUserAccountById(Long userId);
|
||||||
|
|
||||||
public Pair<Boolean, Map<String, String>> getKeys(GetUserKeysCmd cmd);
|
Pair<Boolean, Map<String, String>> getKeys(GetUserKeysCmd cmd);
|
||||||
|
|
||||||
public Pair<Boolean, Map<String, String>> getKeys(Long userId);
|
ListResponse<ApiKeyPairResponse> listKeys(ListUserKeysCmd cmd);
|
||||||
|
|
||||||
|
List<ApiKeyPairPermission> listKeyRules(ListUserKeyRulesCmd cmd);
|
||||||
|
|
||||||
|
void deleteApiKey(DeleteUserKeysCmd cmd);
|
||||||
|
|
||||||
|
void deleteApiKey(ApiKeyPair id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Lists user two-factor authentication provider plugins
|
* Lists user two-factor authentication provider plugins
|
||||||
|
|
@ -147,4 +176,13 @@ public interface AccountService {
|
||||||
*/
|
*/
|
||||||
UserTwoFactorAuthenticator getUserTwoFactorAuthenticationProvider(final Long domainId);
|
UserTwoFactorAuthenticator getUserTwoFactorAuthenticationProvider(final Long domainId);
|
||||||
|
|
||||||
|
ApiKeyPair getLatestUserKeyPair(Long userId);
|
||||||
|
|
||||||
|
ApiKeyPair getKeyPairById(Long id);
|
||||||
|
|
||||||
|
ApiKeyPair getKeyPairByApiKey(String apiKey);
|
||||||
|
|
||||||
|
String getAccessingApiKey(BaseCmd cmd);
|
||||||
|
|
||||||
|
List<RolePermissionEntity> getAllKeypairPermissions(String apiKey);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,21 @@
|
||||||
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
// or more contributor license agreements. See the NOTICE file
|
||||||
|
// distributed with this work for additional information
|
||||||
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
|
// to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance
|
||||||
|
// with the License. You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing,
|
||||||
|
// software distributed under the License is distributed on an
|
||||||
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
// KIND, either express or implied. See the License for the
|
||||||
|
// specific language governing permissions and limitations
|
||||||
|
// under the License.
|
||||||
|
package com.cloud.user;
|
||||||
|
|
||||||
|
public enum ApiKeyPairState {
|
||||||
|
ENABLED, REMOVED, EXPIRED
|
||||||
|
}
|
||||||
|
|
@ -65,14 +65,6 @@ public interface User extends OwnedBy, InternalIdentity {
|
||||||
|
|
||||||
public void setState(Account.State state);
|
public void setState(Account.State state);
|
||||||
|
|
||||||
public String getApiKey();
|
|
||||||
|
|
||||||
public void setApiKey(String apiKey);
|
|
||||||
|
|
||||||
public String getSecretKey();
|
|
||||||
|
|
||||||
public void setSecretKey(String secretKey);
|
|
||||||
|
|
||||||
public String getTimezone();
|
public String getTimezone();
|
||||||
|
|
||||||
public void setTimezone(String timezone);
|
public void setTimezone(String timezone);
|
||||||
|
|
|
||||||
|
|
@ -39,10 +39,6 @@ public interface UserAccount extends InternalIdentity {
|
||||||
|
|
||||||
String getState();
|
String getState();
|
||||||
|
|
||||||
String getApiKey();
|
|
||||||
|
|
||||||
String getSecretKey();
|
|
||||||
|
|
||||||
Date getCreated();
|
Date getCreated();
|
||||||
|
|
||||||
Date getRemoved();
|
Date getRemoved();
|
||||||
|
|
|
||||||
|
|
@ -162,4 +162,6 @@ public interface Nic extends Identity, InternalIdentity {
|
||||||
String getIPv6Address();
|
String getIPv6Address();
|
||||||
|
|
||||||
Integer getMtu();
|
Integer getMtu();
|
||||||
|
|
||||||
|
boolean isEnabled();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -52,6 +52,7 @@ public class NicProfile implements InternalIdentity, Serializable {
|
||||||
boolean defaultNic;
|
boolean defaultNic;
|
||||||
Integer networkRate;
|
Integer networkRate;
|
||||||
boolean isSecurityGroupEnabled;
|
boolean isSecurityGroupEnabled;
|
||||||
|
boolean enabled;
|
||||||
|
|
||||||
Integer orderIndex;
|
Integer orderIndex;
|
||||||
|
|
||||||
|
|
@ -87,6 +88,7 @@ public class NicProfile implements InternalIdentity, Serializable {
|
||||||
broadcastType = network.getBroadcastDomainType();
|
broadcastType = network.getBroadcastDomainType();
|
||||||
trafficType = network.getTrafficType();
|
trafficType = network.getTrafficType();
|
||||||
format = nic.getAddressFormat();
|
format = nic.getAddressFormat();
|
||||||
|
enabled = nic.isEnabled();
|
||||||
|
|
||||||
iPv4Address = nic.getIPv4Address();
|
iPv4Address = nic.getIPv4Address();
|
||||||
iPv4Netmask = nic.getIPv4Netmask();
|
iPv4Netmask = nic.getIPv4Netmask();
|
||||||
|
|
@ -414,6 +416,14 @@ public class NicProfile implements InternalIdentity, Serializable {
|
||||||
this.ipv4AllocationRaceCheck = ipv4AllocationRaceCheck;
|
this.ipv4AllocationRaceCheck = ipv4AllocationRaceCheck;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isEnabled() {
|
||||||
|
return enabled;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setEnabled(boolean enabled) {
|
||||||
|
this.enabled = enabled;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// OTHER METHODS
|
// OTHER METHODS
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,7 @@ import org.apache.cloudstack.api.command.user.vm.ScaleVMCmd;
|
||||||
import org.apache.cloudstack.api.command.user.vm.StartVMCmd;
|
import org.apache.cloudstack.api.command.user.vm.StartVMCmd;
|
||||||
import org.apache.cloudstack.api.command.user.vm.UpdateDefaultNicForVMCmd;
|
import org.apache.cloudstack.api.command.user.vm.UpdateDefaultNicForVMCmd;
|
||||||
import org.apache.cloudstack.api.command.user.vm.UpdateVMCmd;
|
import org.apache.cloudstack.api.command.user.vm.UpdateVMCmd;
|
||||||
|
import org.apache.cloudstack.api.command.user.vm.UpdateVmNicCmd;
|
||||||
import org.apache.cloudstack.api.command.user.vm.UpdateVmNicIpCmd;
|
import org.apache.cloudstack.api.command.user.vm.UpdateVmNicIpCmd;
|
||||||
import org.apache.cloudstack.api.command.user.vm.UpgradeVMCmd;
|
import org.apache.cloudstack.api.command.user.vm.UpgradeVMCmd;
|
||||||
import org.apache.cloudstack.api.command.user.vmgroup.CreateVMGroupCmd;
|
import org.apache.cloudstack.api.command.user.vmgroup.CreateVMGroupCmd;
|
||||||
|
|
@ -152,6 +153,8 @@ public interface UserVmService {
|
||||||
*/
|
*/
|
||||||
UserVm updateNicIpForVirtualMachine(UpdateVmNicIpCmd cmd);
|
UserVm updateNicIpForVirtualMachine(UpdateVmNicIpCmd cmd);
|
||||||
|
|
||||||
|
UserVm updateVirtualMachineNic(UpdateVmNicCmd cmd);
|
||||||
|
|
||||||
UserVm recoverVirtualMachine(RecoverVMCmd cmd) throws ResourceAllocationException;
|
UserVm recoverVirtualMachine(RecoverVMCmd cmd) throws ResourceAllocationException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -96,6 +96,7 @@ public interface VmDetailConstants {
|
||||||
String CKS_NODE_TYPE = "node";
|
String CKS_NODE_TYPE = "node";
|
||||||
String OFFERING = "offering";
|
String OFFERING = "offering";
|
||||||
String TEMPLATE = "template";
|
String TEMPLATE = "template";
|
||||||
|
String AFFINITY_GROUP = "affinitygroup";
|
||||||
|
|
||||||
// VMware to KVM VM migrations specific
|
// VMware to KVM VM migrations specific
|
||||||
String VMWARE_TO_KVM_PREFIX = "vmware-to-kvm";
|
String VMWARE_TO_KVM_PREFIX = "vmware-to-kvm";
|
||||||
|
|
@ -129,4 +130,10 @@ public interface VmDetailConstants {
|
||||||
String EXTERNAL_DETAIL_PREFIX = "External:";
|
String EXTERNAL_DETAIL_PREFIX = "External:";
|
||||||
String CLOUDSTACK_VM_DETAILS = "cloudstack.vm.details";
|
String CLOUDSTACK_VM_DETAILS = "cloudstack.vm.details";
|
||||||
String CLOUDSTACK_VLAN = "cloudstack.vlan";
|
String CLOUDSTACK_VLAN = "cloudstack.vlan";
|
||||||
|
|
||||||
|
// KVM Checkpoints related
|
||||||
|
String ACTIVE_CHECKPOINT_ID = "active.checkpoint.id";
|
||||||
|
String ACTIVE_CHECKPOINT_CREATE_TIME = "active.checkpoint.create.time";
|
||||||
|
String LAST_CHECKPOINT_ID = "last.checkpoint.id";
|
||||||
|
String LAST_CHECKPOINT_CREATE_TIME = "last.checkpoint.create.time";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ import com.cloud.exception.PermissionDeniedException;
|
||||||
import com.cloud.user.Account;
|
import com.cloud.user.Account;
|
||||||
import com.cloud.user.User;
|
import com.cloud.user.User;
|
||||||
import com.cloud.utils.component.Adapter;
|
import com.cloud.utils.component.Adapter;
|
||||||
|
import org.apache.cloudstack.acl.apikeypair.ApiKeyPairPermission;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -31,8 +32,8 @@ public interface APIChecker extends Adapter {
|
||||||
// If true, apiChecker has checked the operation
|
// If true, apiChecker has checked the operation
|
||||||
// If false, apiChecker is unable to handle the operation or not implemented
|
// If false, apiChecker is unable to handle the operation or not implemented
|
||||||
// On exception, checkAccess failed don't allow
|
// On exception, checkAccess failed don't allow
|
||||||
boolean checkAccess(User user, String apiCommandName) throws PermissionDeniedException;
|
boolean checkAccess(User user, String apiCommandName, ApiKeyPairPermission... apiKeyPairPermissions) throws PermissionDeniedException;
|
||||||
boolean checkAccess(Account account, String apiCommandName) throws PermissionDeniedException;
|
boolean checkAccess(Account account, String apiCommandName, ApiKeyPairPermission... apiKeyPairPermissions) throws PermissionDeniedException;
|
||||||
/**
|
/**
|
||||||
* Verifies if the account has permission for the given list of APIs and returns only the allowed ones.
|
* Verifies if the account has permission for the given list of APIs and returns only the allowed ones.
|
||||||
*
|
*
|
||||||
|
|
@ -43,4 +44,5 @@ public interface APIChecker extends Adapter {
|
||||||
*/
|
*/
|
||||||
List<String> getApisAllowedToUser(Role role, User user, List<String> apiNames) throws PermissionDeniedException;
|
List<String> getApisAllowedToUser(Role role, User user, List<String> apiNames) throws PermissionDeniedException;
|
||||||
boolean isEnabled();
|
boolean isEnabled();
|
||||||
|
List<RolePermissionEntity> getImplicitRolePermissions(RoleType roleType);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,7 @@ import org.apache.cloudstack.api.Identity;
|
||||||
import org.apache.cloudstack.api.InternalIdentity;
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
public interface RolePermissionEntity extends InternalIdentity, Identity {
|
public interface RolePermissionEntity extends InternalIdentity, Identity {
|
||||||
public enum Permission {
|
enum Permission {
|
||||||
ALLOW, DENY
|
ALLOW, DENY
|
||||||
}
|
}
|
||||||
Rule getRule();
|
Rule getRule();
|
||||||
|
|
|
||||||
|
|
@ -104,5 +104,26 @@ public interface RoleService {
|
||||||
|
|
||||||
List<RolePermission> findAllPermissionsBy(Long roleId);
|
List<RolePermission> findAllPermissionsBy(Long roleId);
|
||||||
|
|
||||||
|
List<RolePermissionEntity> findAllRolePermissionsEntityBy(Long roleId, boolean considerImplicitRules);
|
||||||
|
|
||||||
Permission getRolePermission(String permission);
|
Permission getRolePermission(String permission);
|
||||||
|
|
||||||
|
int removeRolesIfNeeded(List<? extends Role> roles);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Checks if the role of the caller account has compatible permissions of the specified role permissions.
|
||||||
|
* For each permission of the {@param rolePermissionsToAccess}, the role of the caller needs to contain the same permission.
|
||||||
|
*
|
||||||
|
* @param rolePermissions the permissions of the caller role.
|
||||||
|
* @param rolePermissionsToAccess the permissions for the role that the caller role wants to access.
|
||||||
|
* @return True if the role can be accessed with the given permissions; false otherwise.
|
||||||
|
*/
|
||||||
|
boolean roleHasPermission(Map<String, RolePermissionEntity> rolePermissions, List<RolePermissionEntity> rolePermissionsToAccess);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Given a list of role permissions, returns a {@link Map} containing the API name as the key and the {@link RolePermissionEntity} for the API as the value.
|
||||||
|
*
|
||||||
|
* @param rolePermissions Permissions for the role from role.
|
||||||
|
*/
|
||||||
|
Map<String, RolePermissionEntity> getRoleRulesAndPermissions(List<RolePermissionEntity> rolePermissions);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -132,10 +132,10 @@ public enum RoleType {
|
||||||
* */
|
* */
|
||||||
public static Account.Type getAccountTypeByRole(final Role role, final Account.Type defautAccountType) {
|
public static Account.Type getAccountTypeByRole(final Role role, final Account.Type defautAccountType) {
|
||||||
if (role != null) {
|
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();
|
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;
|
return defautAccountType;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -25,16 +25,18 @@ import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
||||||
public final class Rule {
|
public final class Rule {
|
||||||
private final String rule;
|
private final String rule;
|
||||||
|
private final Pattern matchingPattern;
|
||||||
private final static Pattern ALLOWED_PATTERN = Pattern.compile("^[a-zA-Z0-9*]+$");
|
private final static Pattern ALLOWED_PATTERN = Pattern.compile("^[a-zA-Z0-9*]+$");
|
||||||
|
|
||||||
public Rule(final String rule) {
|
public Rule(final String rule) {
|
||||||
validate(rule);
|
validate(rule);
|
||||||
this.rule = rule;
|
this.rule = rule;
|
||||||
|
matchingPattern = Pattern.compile(rule.toLowerCase().replace("*", "(\\w*\\*?)+"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean matches(final String commandName) {
|
public boolean matches(final String commandName) {
|
||||||
return StringUtils.isNotEmpty(commandName)
|
return StringUtils.isNotEmpty(commandName) &&
|
||||||
&& commandName.toLowerCase().matches(rule.toLowerCase().replace("*", "\\w*"));
|
matchingPattern.matcher(commandName.toLowerCase()).matches();
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getRuleString() {
|
public String getRuleString() {
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,8 @@ import com.cloud.user.Account;
|
||||||
import com.cloud.user.User;
|
import com.cloud.user.User;
|
||||||
import com.cloud.utils.component.Adapter;
|
import com.cloud.utils.component.Adapter;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.backup.BackupOffering;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SecurityChecker checks the ownership and access control to objects within
|
* SecurityChecker checks the ownership and access control to objects within
|
||||||
*/
|
*/
|
||||||
|
|
@ -145,4 +147,6 @@ public interface SecurityChecker extends Adapter {
|
||||||
boolean checkAccess(Account account, NetworkOffering nof, DataCenter zone) throws PermissionDeniedException;
|
boolean checkAccess(Account account, NetworkOffering nof, DataCenter zone) throws PermissionDeniedException;
|
||||||
|
|
||||||
boolean checkAccess(Account account, VpcOffering vof, DataCenter zone) throws PermissionDeniedException;
|
boolean checkAccess(Account account, VpcOffering vof, DataCenter zone) throws PermissionDeniedException;
|
||||||
|
|
||||||
|
boolean checkAccess(Account account, BackupOffering bof) throws PermissionDeniedException;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,38 @@
|
||||||
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
// or more contributor license agreements. See the NOTICE file
|
||||||
|
// distributed with this work for additional information
|
||||||
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
|
// to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance
|
||||||
|
// with the License. You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing,
|
||||||
|
// software distributed under the License is distributed on an
|
||||||
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
// KIND, either express or implied. See the License for the
|
||||||
|
// specific language governing permissions and limitations
|
||||||
|
// under the License.
|
||||||
|
package org.apache.cloudstack.acl.apikeypair;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.acl.ControlledEntity;
|
||||||
|
import org.apache.cloudstack.api.Identity;
|
||||||
|
import org.apache.cloudstack.api.InternalIdentity;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
public interface ApiKeyPair extends ControlledEntity, InternalIdentity, Identity {
|
||||||
|
Long getUserId();
|
||||||
|
Date getStartDate();
|
||||||
|
Date getEndDate();
|
||||||
|
Date getCreated();
|
||||||
|
String getDescription();
|
||||||
|
String getApiKey();
|
||||||
|
String getSecretKey();
|
||||||
|
String getName();
|
||||||
|
Date getRemoved();
|
||||||
|
void setRemoved(Date date);
|
||||||
|
void validateDate();
|
||||||
|
boolean hasEndDatePassed();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
// or more contributor license agreements. See the NOTICE file
|
||||||
|
// distributed with this work for additional information
|
||||||
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
|
// to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance
|
||||||
|
// with the License. You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing,
|
||||||
|
// software distributed under the License is distributed on an
|
||||||
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
// KIND, either express or implied. See the License for the
|
||||||
|
// specific language governing permissions and limitations
|
||||||
|
// under the License.
|
||||||
|
package org.apache.cloudstack.acl.apikeypair;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.acl.RolePermissionEntity;
|
||||||
|
|
||||||
|
public interface ApiKeyPairPermission extends RolePermissionEntity {
|
||||||
|
long getApiKeyPairId();
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,27 @@
|
||||||
|
// Licensed to the Apache Software Foundation (ASF) under one
|
||||||
|
// or more contributor license agreements. See the NOTICE file
|
||||||
|
// distributed with this work for additional information
|
||||||
|
// regarding copyright ownership. The ASF licenses this file
|
||||||
|
// to you under the Apache License, Version 2.0 (the
|
||||||
|
// "License"); you may not use this file except in compliance
|
||||||
|
// with the License. You may obtain a copy of the License at
|
||||||
|
//
|
||||||
|
// http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
//
|
||||||
|
// Unless required by applicable law or agreed to in writing,
|
||||||
|
// software distributed under the License is distributed on an
|
||||||
|
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||||
|
// KIND, either express or implied. See the License for the
|
||||||
|
// specific language governing permissions and limitations
|
||||||
|
// under the License.
|
||||||
|
package org.apache.cloudstack.acl.apikeypair;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
public interface ApiKeyPairService {
|
||||||
|
List<ApiKeyPairPermission> findAllPermissionsByKeyPairId(Long apiKeyPairId, Long roleId);
|
||||||
|
|
||||||
|
ApiKeyPair findByApiKey(String apiKey);
|
||||||
|
|
||||||
|
ApiKeyPair findById(Long id);
|
||||||
|
}
|
||||||
|
|
@ -66,5 +66,4 @@ public interface AffinityGroupService {
|
||||||
|
|
||||||
boolean isAffinityGroupAvailableInDomain(long affinityGroupId, long domainId);
|
boolean isAffinityGroupAvailableInDomain(long affinityGroupId, long domainId);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,9 @@ import java.util.List;
|
||||||
|
|
||||||
public class AffinityProcessorBase extends AdapterBase implements AffinityGroupProcessor {
|
public class AffinityProcessorBase extends AdapterBase implements AffinityGroupProcessor {
|
||||||
|
|
||||||
|
public static final String AFFINITY_TYPE_HOST = "host affinity";
|
||||||
|
public static final String AFFINITY_TYPE_HOST_ANTI = "host anti-affinity";
|
||||||
|
|
||||||
protected String _type;
|
protected String _type;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
||||||
|
|
@ -24,18 +24,24 @@ import com.cloud.exception.InvalidParameterValueException;
|
||||||
|
|
||||||
public interface AlertService {
|
public interface AlertService {
|
||||||
public static class AlertType {
|
public static class AlertType {
|
||||||
private static Set<AlertType> defaultAlertTypes = new HashSet<AlertType>();
|
private static final Set<AlertType> defaultAlertTypes = new HashSet<>();
|
||||||
private final String name;
|
private final String name;
|
||||||
private final short type;
|
private final short type;
|
||||||
|
private final boolean repetitionAllowed;
|
||||||
|
|
||||||
private AlertType(short type, String name, boolean isDefault) {
|
private AlertType(short type, String name, boolean isDefault, boolean repetitionAllowed) {
|
||||||
this.name = name;
|
this.name = name;
|
||||||
this.type = type;
|
this.type = type;
|
||||||
|
this.repetitionAllowed = repetitionAllowed;
|
||||||
if (isDefault) {
|
if (isDefault) {
|
||||||
defaultAlertTypes.add(this);
|
defaultAlertTypes.add(this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private AlertType(short type, String name, boolean isDefault) {
|
||||||
|
this(type, name, isDefault, false);
|
||||||
|
}
|
||||||
|
|
||||||
public static final AlertType ALERT_TYPE_MEMORY = new AlertType(Capacity.CAPACITY_TYPE_MEMORY, "ALERT.MEMORY", true);
|
public static final AlertType ALERT_TYPE_MEMORY = new AlertType(Capacity.CAPACITY_TYPE_MEMORY, "ALERT.MEMORY", true);
|
||||||
public static final AlertType ALERT_TYPE_CPU = new AlertType(Capacity.CAPACITY_TYPE_CPU, "ALERT.CPU", true);
|
public static final AlertType ALERT_TYPE_CPU = new AlertType(Capacity.CAPACITY_TYPE_CPU, "ALERT.CPU", true);
|
||||||
public static final AlertType ALERT_TYPE_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_STORAGE, "ALERT.STORAGE", true);
|
public static final AlertType ALERT_TYPE_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_STORAGE, "ALERT.STORAGE", true);
|
||||||
|
|
@ -45,35 +51,36 @@ public interface AlertService {
|
||||||
public static final AlertType ALERT_TYPE_VIRTUAL_NETWORK_IPV6_SUBNET = new AlertType(Capacity.CAPACITY_TYPE_VIRTUAL_NETWORK_IPV6_SUBNET, "ALERT.NETWORK.IPV6SUBNET", true);
|
public static final AlertType ALERT_TYPE_VIRTUAL_NETWORK_IPV6_SUBNET = new AlertType(Capacity.CAPACITY_TYPE_VIRTUAL_NETWORK_IPV6_SUBNET, "ALERT.NETWORK.IPV6SUBNET", true);
|
||||||
public static final AlertType ALERT_TYPE_PRIVATE_IP = new AlertType(Capacity.CAPACITY_TYPE_PRIVATE_IP, "ALERT.NETWORK.PRIVATEIP", true);
|
public static final AlertType ALERT_TYPE_PRIVATE_IP = new AlertType(Capacity.CAPACITY_TYPE_PRIVATE_IP, "ALERT.NETWORK.PRIVATEIP", true);
|
||||||
public static final AlertType ALERT_TYPE_SECONDARY_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_SECONDARY_STORAGE, "ALERT.STORAGE.SECONDARY", true);
|
public static final AlertType ALERT_TYPE_SECONDARY_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_SECONDARY_STORAGE, "ALERT.STORAGE.SECONDARY", true);
|
||||||
public static final AlertType ALERT_TYPE_HOST = new AlertType((short)7, "ALERT.COMPUTE.HOST", true);
|
public static final AlertType ALERT_TYPE_HOST = new AlertType((short)7, "ALERT.COMPUTE.HOST", true, true);
|
||||||
public static final AlertType ALERT_TYPE_USERVM = new AlertType((short)8, "ALERT.USERVM", true);
|
public static final AlertType ALERT_TYPE_USERVM = new AlertType((short)8, "ALERT.USERVM", true, true);
|
||||||
public static final AlertType ALERT_TYPE_DOMAIN_ROUTER = new AlertType((short)9, "ALERT.SERVICE.DOMAINROUTER", true);
|
public static final AlertType ALERT_TYPE_DOMAIN_ROUTER = new AlertType((short)9, "ALERT.SERVICE.DOMAINROUTER", true, true);
|
||||||
public static final AlertType ALERT_TYPE_CONSOLE_PROXY = new AlertType((short)10, "ALERT.SERVICE.CONSOLEPROXY", true);
|
public static final AlertType ALERT_TYPE_CONSOLE_PROXY = new AlertType((short)10, "ALERT.SERVICE.CONSOLEPROXY", true, true);
|
||||||
public static final AlertType ALERT_TYPE_ROUTING = new AlertType((short)11, "ALERT.NETWORK.ROUTING", true);
|
public static final AlertType ALERT_TYPE_ROUTING = new AlertType((short)11, "ALERT.NETWORK.ROUTING", true);
|
||||||
public static final AlertType ALERT_TYPE_STORAGE_MISC = new AlertType((short)12, "ALERT.STORAGE.MISC", true);
|
public static final AlertType ALERT_TYPE_STORAGE_MISC = new AlertType((short)12, "ALERT.STORAGE.MISC", true, true);
|
||||||
public static final AlertType ALERT_TYPE_USAGE_SERVER = new AlertType((short)13, "ALERT.USAGE", true);
|
public static final AlertType ALERT_TYPE_USAGE_SERVER = new AlertType((short)13, "ALERT.USAGE", true);
|
||||||
public static final AlertType ALERT_TYPE_MANAGEMENT_NODE = new AlertType((short)14, "ALERT.MANAGEMENT", true);
|
public static final AlertType ALERT_TYPE_MANAGEMENT_NODE = new AlertType((short)14, "ALERT.MANAGEMENT", true, true);
|
||||||
public static final AlertType ALERT_TYPE_DOMAIN_ROUTER_MIGRATE = new AlertType((short)15, "ALERT.NETWORK.DOMAINROUTERMIGRATE", true);
|
public static final AlertType ALERT_TYPE_DOMAIN_ROUTER_MIGRATE = new AlertType((short)15, "ALERT.NETWORK.DOMAINROUTERMIGRATE", true);
|
||||||
public static final AlertType ALERT_TYPE_CONSOLE_PROXY_MIGRATE = new AlertType((short)16, "ALERT.SERVICE.CONSOLEPROXYMIGRATE", true);
|
public static final AlertType ALERT_TYPE_CONSOLE_PROXY_MIGRATE = new AlertType((short)16, "ALERT.SERVICE.CONSOLEPROXYMIGRATE", true);
|
||||||
public static final AlertType ALERT_TYPE_USERVM_MIGRATE = new AlertType((short)17, "ALERT.USERVM.MIGRATE", true);
|
public static final AlertType ALERT_TYPE_USERVM_MIGRATE = new AlertType((short)17, "ALERT.USERVM.MIGRATE", true);
|
||||||
public static final AlertType ALERT_TYPE_VLAN = new AlertType((short)18, "ALERT.NETWORK.VLAN", true);
|
public static final AlertType ALERT_TYPE_VLAN = new AlertType((short)18, "ALERT.NETWORK.VLAN", true);
|
||||||
public static final AlertType ALERT_TYPE_SSVM = new AlertType((short)19, "ALERT.SERVICE.SSVM", true);
|
public static final AlertType ALERT_TYPE_SSVM = new AlertType((short)19, "ALERT.SERVICE.SSVM", true, true);
|
||||||
public static final AlertType ALERT_TYPE_USAGE_SERVER_RESULT = new AlertType((short)20, "ALERT.USAGE.RESULT", true);
|
public static final AlertType ALERT_TYPE_USAGE_SERVER_RESULT = new AlertType((short)20, "ALERT.USAGE.RESULT", true);
|
||||||
public static final AlertType ALERT_TYPE_STORAGE_DELETE = new AlertType((short)21, "ALERT.STORAGE.DELETE", true);
|
public static final AlertType ALERT_TYPE_STORAGE_DELETE = new AlertType((short)21, "ALERT.STORAGE.DELETE", true);
|
||||||
public static final AlertType ALERT_TYPE_UPDATE_RESOURCE_COUNT = new AlertType((short)22, "ALERT.RESOURCE.COUNT", true);
|
public static final AlertType ALERT_TYPE_UPDATE_RESOURCE_COUNT = new AlertType((short)22, "ALERT.RESOURCE.COUNT", true);
|
||||||
public static final AlertType ALERT_TYPE_USAGE_SANITY_RESULT = new AlertType((short)23, "ALERT.USAGE.SANITY", true);
|
public static final AlertType ALERT_TYPE_USAGE_SANITY_RESULT = new AlertType((short)23, "ALERT.USAGE.SANITY", true);
|
||||||
public static final AlertType ALERT_TYPE_DIRECT_ATTACHED_PUBLIC_IP = new AlertType((short)24, "ALERT.NETWORK.DIRECTPUBLICIP", true);
|
public static final AlertType ALERT_TYPE_DIRECT_ATTACHED_PUBLIC_IP = new AlertType((short)24, "ALERT.NETWORK.DIRECTPUBLICIP", true);
|
||||||
public static final AlertType ALERT_TYPE_LOCAL_STORAGE = new AlertType((short)25, "ALERT.STORAGE.LOCAL", true);
|
public static final AlertType ALERT_TYPE_LOCAL_STORAGE = new AlertType((short)25, "ALERT.STORAGE.LOCAL", true);
|
||||||
public static final AlertType ALERT_TYPE_RESOURCE_LIMIT_EXCEEDED = new AlertType((short)26, "ALERT.RESOURCE.EXCEED", true);
|
public static final AlertType ALERT_TYPE_RESOURCE_LIMIT_EXCEEDED = new AlertType((short)26, "ALERT.RESOURCE.EXCEED", true, true);
|
||||||
public static final AlertType ALERT_TYPE_SYNC = new AlertType((short)27, "ALERT.TYPE.SYNC", true);
|
public static final AlertType ALERT_TYPE_SYNC = new AlertType((short)27, "ALERT.TYPE.SYNC", true);
|
||||||
public static final AlertType ALERT_TYPE_UPLOAD_FAILED = new AlertType((short)28, "ALERT.UPLOAD.FAILED", true);
|
public static final AlertType ALERT_TYPE_UPLOAD_FAILED = new AlertType((short)28, "ALERT.UPLOAD.FAILED", true, true);
|
||||||
public static final AlertType ALERT_TYPE_OOBM_AUTH_ERROR = new AlertType((short)29, "ALERT.OOBM.AUTHERROR", true);
|
public static final AlertType ALERT_TYPE_OOBM_AUTH_ERROR = new AlertType((short)29, "ALERT.OOBM.AUTHERROR", true, true);
|
||||||
public static final AlertType ALERT_TYPE_HA_ACTION = new AlertType((short)30, "ALERT.HA.ACTION", true);
|
public static final AlertType ALERT_TYPE_HA_ACTION = new AlertType((short)30, "ALERT.HA.ACTION", true, true);
|
||||||
public static final AlertType ALERT_TYPE_CA_CERT = new AlertType((short)31, "ALERT.CA.CERT", true);
|
public static final AlertType ALERT_TYPE_CA_CERT = new AlertType((short)31, "ALERT.CA.CERT", true, true);
|
||||||
public static final AlertType ALERT_TYPE_VM_SNAPSHOT = new AlertType((short)32, "ALERT.VM.SNAPSHOT", true);
|
public static final AlertType ALERT_TYPE_VM_SNAPSHOT = new AlertType((short)32, "ALERT.VM.SNAPSHOT", true);
|
||||||
public static final AlertType ALERT_TYPE_VR_PUBLIC_IFACE_MTU = new AlertType((short)33, "ALERT.VR.PUBLIC.IFACE.MTU", true);
|
public static final AlertType ALERT_TYPE_VR_PUBLIC_IFACE_MTU = new AlertType((short)33, "ALERT.VR.PUBLIC.IFACE.MTU", true);
|
||||||
public static final AlertType ALERT_TYPE_VR_PRIVATE_IFACE_MTU = new AlertType((short)34, "ALERT.VR.PRIVATE.IFACE.MTU", true);
|
public static final AlertType ALERT_TYPE_VR_PRIVATE_IFACE_MTU = new AlertType((short)34, "ALERT.VR.PRIVATE.IFACE.MTU", true);
|
||||||
public static final AlertType ALERT_TYPE_EXTENSION_PATH_NOT_READY = new AlertType((short)33, "ALERT.TYPE.EXTENSION.PATH.NOT.READY", true);
|
public static final AlertType ALERT_TYPE_EXTENSION_PATH_NOT_READY = new AlertType((short)33, "ALERT.TYPE.EXTENSION.PATH.NOT.READY", true, true);
|
||||||
|
public static final AlertType ALERT_TYPE_VPN_GATEWAY_OBSOLETE_PARAMETERS = new AlertType((short)34, "ALERT.S2S.VPN.GATEWAY.OBSOLETE.PARAMETERS", true, true);
|
||||||
public static final AlertType ALERT_TYPE_BACKUP_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_BACKUP_STORAGE, "ALERT.STORAGE.BACKUP", true);
|
public static final AlertType ALERT_TYPE_BACKUP_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_BACKUP_STORAGE, "ALERT.STORAGE.BACKUP", true);
|
||||||
public static final AlertType ALERT_TYPE_OBJECT_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_OBJECT_STORAGE, "ALERT.STORAGE.OBJECT", true);
|
public static final AlertType ALERT_TYPE_OBJECT_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_OBJECT_STORAGE, "ALERT.STORAGE.OBJECT", true);
|
||||||
|
|
||||||
|
|
@ -85,6 +92,10 @@ public interface AlertService {
|
||||||
return name;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean isRepetitionAllowed() {
|
||||||
|
return repetitionAllowed;
|
||||||
|
}
|
||||||
|
|
||||||
private static AlertType getAlertType(short type) {
|
private static AlertType getAlertType(short type) {
|
||||||
for (AlertType alertType : defaultAlertTypes) {
|
for (AlertType alertType : defaultAlertTypes) {
|
||||||
if (alertType.getType() == type) {
|
if (alertType.getType() == type) {
|
||||||
|
|
@ -108,7 +119,7 @@ public interface AlertService {
|
||||||
if (defaultAlert != null && !defaultAlert.getName().equalsIgnoreCase(name)) {
|
if (defaultAlert != null && !defaultAlert.getName().equalsIgnoreCase(name)) {
|
||||||
throw new InvalidParameterValueException("There is a default alert having type " + type + " and name " + defaultAlert.getName());
|
throw new InvalidParameterValueException("There is a default alert having type " + type + " and name " + defaultAlert.getName());
|
||||||
} else {
|
} else {
|
||||||
return new AlertType(type, name, false);
|
return new AlertType(type, name, false, false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -50,4 +50,6 @@ public @interface APICommand {
|
||||||
RoleType[] authorized() default {};
|
RoleType[] authorized() default {};
|
||||||
|
|
||||||
Class<?>[] entityType() default {};
|
Class<?>[] entityType() default {};
|
||||||
|
|
||||||
|
String httpMethod() default "";
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,8 @@ package org.apache.cloudstack.api;
|
||||||
public class ApiConstants {
|
public class ApiConstants {
|
||||||
public static final String ACCOUNT = "account";
|
public static final String ACCOUNT = "account";
|
||||||
public static final String ACCOUNTS = "accounts";
|
public static final String ACCOUNTS = "accounts";
|
||||||
|
public static final String ACCOUNT_NAME = "accountname";
|
||||||
|
public static final String ACCOUNT_STATE_TO_SHOW = "accountstatetoshow";
|
||||||
public static final String ACCOUNT_TYPE = "accounttype";
|
public static final String ACCOUNT_TYPE = "accounttype";
|
||||||
public static final String ACCOUNT_ID = "accountid";
|
public static final String ACCOUNT_ID = "accountid";
|
||||||
public static final String ACCOUNT_IDS = "accountids";
|
public static final String ACCOUNT_IDS = "accountids";
|
||||||
|
|
@ -46,6 +48,7 @@ public class ApiConstants {
|
||||||
public static final String AS_NUMBER_ID = "asnumberid";
|
public static final String AS_NUMBER_ID = "asnumberid";
|
||||||
public static final String ASN_RANGE = "asnrange";
|
public static final String ASN_RANGE = "asnrange";
|
||||||
public static final String ASN_RANGE_ID = "asnrangeid";
|
public static final String ASN_RANGE_ID = "asnrangeid";
|
||||||
|
public static final String API_KEY_FILTER = "apikeyfilter";
|
||||||
public static final String ASYNC_BACKUP = "asyncbackup";
|
public static final String ASYNC_BACKUP = "asyncbackup";
|
||||||
public static final String AUTO_SELECT = "autoselect";
|
public static final String AUTO_SELECT = "autoselect";
|
||||||
public static final String USER_API_KEY = "userapikey";
|
public static final String USER_API_KEY = "userapikey";
|
||||||
|
|
@ -66,6 +69,8 @@ public class ApiConstants {
|
||||||
public static final String BACKUP_VM_OFFERING_REMOVED = "vmbackupofferingremoved";
|
public static final String BACKUP_VM_OFFERING_REMOVED = "vmbackupofferingremoved";
|
||||||
public static final String IS_BACKUP_VM_EXPUNGED = "isbackupvmexpunged";
|
public static final String IS_BACKUP_VM_EXPUNGED = "isbackupvmexpunged";
|
||||||
public static final String BACKUP_TOTAL = "backuptotal";
|
public static final String BACKUP_TOTAL = "backuptotal";
|
||||||
|
public static final String BALANCE = "balance";
|
||||||
|
public static final String BALANCES = "balances";
|
||||||
public static final String BASE64_IMAGE = "base64image";
|
public static final String BASE64_IMAGE = "base64image";
|
||||||
public static final String BGP_PEERS = "bgppeers";
|
public static final String BGP_PEERS = "bgppeers";
|
||||||
public static final String BGP_PEER_IDS = "bgppeerids";
|
public static final String BGP_PEER_IDS = "bgppeerids";
|
||||||
|
|
@ -74,6 +79,7 @@ public class ApiConstants {
|
||||||
public static final String BOOTABLE = "bootable";
|
public static final String BOOTABLE = "bootable";
|
||||||
public static final String BIND_DN = "binddn";
|
public static final String BIND_DN = "binddn";
|
||||||
public static final String BIND_PASSWORD = "bindpass";
|
public static final String BIND_PASSWORD = "bindpass";
|
||||||
|
public static final String BLANK_INSTANCE = "blankinstance";
|
||||||
public static final String BUS_ADDRESS = "busaddress";
|
public static final String BUS_ADDRESS = "busaddress";
|
||||||
public static final String BYTES_READ_RATE = "bytesreadrate";
|
public static final String BYTES_READ_RATE = "bytesreadrate";
|
||||||
public static final String BYTES_READ_RATE_MAX = "bytesreadratemax";
|
public static final String BYTES_READ_RATE_MAX = "bytesreadratemax";
|
||||||
|
|
@ -154,6 +160,7 @@ public class ApiConstants {
|
||||||
public static final String CUSTOM_ID = "customid";
|
public static final String CUSTOM_ID = "customid";
|
||||||
public static final String CUSTOM_ACTION_ID = "customactionid";
|
public static final String CUSTOM_ACTION_ID = "customactionid";
|
||||||
public static final String CUSTOM_JOB_ID = "customjobid";
|
public static final String CUSTOM_JOB_ID = "customjobid";
|
||||||
|
public static final String CURRENCY = "currency";
|
||||||
public static final String CURRENT_START_IP = "currentstartip";
|
public static final String CURRENT_START_IP = "currentstartip";
|
||||||
public static final String CURRENT_END_IP = "currentendip";
|
public static final String CURRENT_END_IP = "currentendip";
|
||||||
public static final String ENCRYPT = "encrypt";
|
public static final String ENCRYPT = "encrypt";
|
||||||
|
|
@ -167,6 +174,7 @@ public class ApiConstants {
|
||||||
public static final String DATACENTER_NAME = "datacentername";
|
public static final String DATACENTER_NAME = "datacentername";
|
||||||
public static final String DATADISKS_DETAILS = "datadisksdetails";
|
public static final String DATADISKS_DETAILS = "datadisksdetails";
|
||||||
public static final String DATADISK_OFFERING_LIST = "datadiskofferinglist";
|
public static final String DATADISK_OFFERING_LIST = "datadiskofferinglist";
|
||||||
|
public static final String DATE = "date";
|
||||||
public static final String DEFAULT_VALUE = "defaultvalue";
|
public static final String DEFAULT_VALUE = "defaultvalue";
|
||||||
public static final String DELETE_PROTECTION = "deleteprotection";
|
public static final String DELETE_PROTECTION = "deleteprotection";
|
||||||
public static final String DESCRIPTION = "description";
|
public static final String DESCRIPTION = "description";
|
||||||
|
|
@ -213,6 +221,7 @@ public class ApiConstants {
|
||||||
public static final String DOMAIN_PATH = "domainpath";
|
public static final String DOMAIN_PATH = "domainpath";
|
||||||
public static final String DOMAIN_ID = "domainid";
|
public static final String DOMAIN_ID = "domainid";
|
||||||
public static final String DOMAIN__ID = "domainId";
|
public static final String DOMAIN__ID = "domainId";
|
||||||
|
public static final String DUMMY = "dummy";
|
||||||
public static final String DURATION = "duration";
|
public static final String DURATION = "duration";
|
||||||
public static final String ELIGIBLE = "eligible";
|
public static final String ELIGIBLE = "eligible";
|
||||||
public static final String EMAIL = "email";
|
public static final String EMAIL = "email";
|
||||||
|
|
@ -256,6 +265,7 @@ public class ApiConstants {
|
||||||
public static final String FOR_VIRTUAL_NETWORK = "forvirtualnetwork";
|
public static final String FOR_VIRTUAL_NETWORK = "forvirtualnetwork";
|
||||||
public static final String FOR_SYSTEM_VMS = "forsystemvms";
|
public static final String FOR_SYSTEM_VMS = "forsystemvms";
|
||||||
public static final String FOR_PROVIDER = "forprovider";
|
public static final String FOR_PROVIDER = "forprovider";
|
||||||
|
public static final String FROM_CHECKPOINT_ID = "fromcheckpointid";
|
||||||
public static final String FULL_PATH = "fullpath";
|
public static final String FULL_PATH = "fullpath";
|
||||||
public static final String GATEWAY = "gateway";
|
public static final String GATEWAY = "gateway";
|
||||||
public static final String IP6_GATEWAY = "ip6gateway";
|
public static final String IP6_GATEWAY = "ip6gateway";
|
||||||
|
|
@ -282,6 +292,7 @@ public class ApiConstants {
|
||||||
public static final String HOST = "host";
|
public static final String HOST = "host";
|
||||||
public static final String HOST_CONTROL_STATE = "hostcontrolstate";
|
public static final String HOST_CONTROL_STATE = "hostcontrolstate";
|
||||||
public static final String HOSTS_MAP = "hostsmap";
|
public static final String HOSTS_MAP = "hostsmap";
|
||||||
|
public static final String HTTP_REQUEST_TYPE = "httprequesttype";
|
||||||
public static final String HYPERVISOR = "hypervisor";
|
public static final String HYPERVISOR = "hypervisor";
|
||||||
public static final String INLINE = "inline";
|
public static final String INLINE = "inline";
|
||||||
public static final String INSTANCE = "instance";
|
public static final String INSTANCE = "instance";
|
||||||
|
|
@ -327,6 +338,7 @@ public class ApiConstants {
|
||||||
public static final String IS_2FA_VERIFIED = "is2faverified";
|
public static final String IS_2FA_VERIFIED = "is2faverified";
|
||||||
|
|
||||||
public static final String IS_2FA_MANDATED = "is2famandated";
|
public static final String IS_2FA_MANDATED = "is2famandated";
|
||||||
|
public static final String IS_ACTIVE = "isactive";
|
||||||
public static final String IS_ASYNC = "isasync";
|
public static final String IS_ASYNC = "isasync";
|
||||||
public static final String IP_AVAILABLE = "ipavailable";
|
public static final String IP_AVAILABLE = "ipavailable";
|
||||||
public static final String IP_LIMIT = "iplimit";
|
public static final String IP_LIMIT = "iplimit";
|
||||||
|
|
@ -355,6 +367,7 @@ public class ApiConstants {
|
||||||
public static final String JOB_STATUS = "jobstatus";
|
public static final String JOB_STATUS = "jobstatus";
|
||||||
public static final String KEEPALIVE_ENABLED = "keepaliveenabled";
|
public static final String KEEPALIVE_ENABLED = "keepaliveenabled";
|
||||||
public static final String KERNEL_VERSION = "kernelversion";
|
public static final String KERNEL_VERSION = "kernelversion";
|
||||||
|
public static final String KEYPAIR_ID = "keypairid";
|
||||||
public static final String KEY = "key";
|
public static final String KEY = "key";
|
||||||
public static final String LABEL = "label";
|
public static final String LABEL = "label";
|
||||||
public static final String LASTNAME = "lastname";
|
public static final String LASTNAME = "lastname";
|
||||||
|
|
@ -375,6 +388,7 @@ public class ApiConstants {
|
||||||
public static final String MAC_ADDRESS = "macaddress";
|
public static final String MAC_ADDRESS = "macaddress";
|
||||||
public static final String MAC_ADDRESSES = "macaddresses";
|
public static final String MAC_ADDRESSES = "macaddresses";
|
||||||
public static final String MANUAL_UPGRADE = "manualupgrade";
|
public static final String MANUAL_UPGRADE = "manualupgrade";
|
||||||
|
public static final String MATCH_TYPE = "matchtype";
|
||||||
public static final String MAX = "max";
|
public static final String MAX = "max";
|
||||||
public static final String MAX_SNAPS = "maxsnaps";
|
public static final String MAX_SNAPS = "maxsnaps";
|
||||||
public static final String MAX_BACKUPS = "maxbackups";
|
public static final String MAX_BACKUPS = "maxbackups";
|
||||||
|
|
@ -501,6 +515,7 @@ public class ApiConstants {
|
||||||
public static final String RECONNECT = "reconnect";
|
public static final String RECONNECT = "reconnect";
|
||||||
public static final String RECOVER = "recover";
|
public static final String RECOVER = "recover";
|
||||||
public static final String REPAIR = "repair";
|
public static final String REPAIR = "repair";
|
||||||
|
public static final String REPETITION_ALLOWED = "repetitionallowed";
|
||||||
public static final String REQUIRES_HVM = "requireshvm";
|
public static final String REQUIRES_HVM = "requireshvm";
|
||||||
public static final String RESERVED_RESOURCE_DETAILS = "reservedresourcedetails";
|
public static final String RESERVED_RESOURCE_DETAILS = "reservedresourcedetails";
|
||||||
public static final String RESOURCES = "resources";
|
public static final String RESOURCES = "resources";
|
||||||
|
|
@ -521,7 +536,6 @@ public class ApiConstants {
|
||||||
public static final String SCOPE = "scope";
|
public static final String SCOPE = "scope";
|
||||||
public static final String SEARCH_BASE = "searchbase";
|
public static final String SEARCH_BASE = "searchbase";
|
||||||
public static final String SECONDARY_IP = "secondaryip";
|
public static final String SECONDARY_IP = "secondaryip";
|
||||||
public static final String SECRET_KEY = "secretkey";
|
|
||||||
public static final String SECURITY_GROUP_IDS = "securitygroupids";
|
public static final String SECURITY_GROUP_IDS = "securitygroupids";
|
||||||
public static final String SECURITY_GROUP_NAMES = "securitygroupnames";
|
public static final String SECURITY_GROUP_NAMES = "securitygroupnames";
|
||||||
public static final String SECURITY_GROUP_NAME = "securitygroupname";
|
public static final String SECURITY_GROUP_NAME = "securitygroupname";
|
||||||
|
|
@ -535,9 +549,11 @@ public class ApiConstants {
|
||||||
public static final String SESSIONKEY = "sessionkey";
|
public static final String SESSIONKEY = "sessionkey";
|
||||||
public static final String SHOW_CAPACITIES = "showcapacities";
|
public static final String SHOW_CAPACITIES = "showcapacities";
|
||||||
public static final String SHOW_REMOVED = "showremoved";
|
public static final String SHOW_REMOVED = "showremoved";
|
||||||
|
public static final String SHOW_RESOURCES = "showresources";
|
||||||
public static final String SHOW_RESOURCE_ICON = "showicon";
|
public static final String SHOW_RESOURCE_ICON = "showicon";
|
||||||
public static final String SHOW_INACTIVE = "showinactive";
|
public static final String SHOW_INACTIVE = "showinactive";
|
||||||
public static final String SHOW_UNIQUE = "showunique";
|
public static final String SHOW_UNIQUE = "showunique";
|
||||||
|
public static final String SHOW_PERMISSIONS = "showpermissions";
|
||||||
public static final String SIGNATURE = "signature";
|
public static final String SIGNATURE = "signature";
|
||||||
public static final String SIGNATURE_VERSION = "signatureversion";
|
public static final String SIGNATURE_VERSION = "signatureversion";
|
||||||
public static final String SINCE = "since";
|
public static final String SINCE = "since";
|
||||||
|
|
@ -553,6 +569,7 @@ public class ApiConstants {
|
||||||
public static final String USE_STORAGE_REPLICATION = "usestoragereplication";
|
public static final String USE_STORAGE_REPLICATION = "usestoragereplication";
|
||||||
|
|
||||||
public static final String SOURCE_CIDR_LIST = "sourcecidrlist";
|
public static final String SOURCE_CIDR_LIST = "sourcecidrlist";
|
||||||
|
public static final String SOURCE_OFFERING_ID = "sourceofferingid";
|
||||||
public static final String SOURCE_ZONE_ID = "sourcezoneid";
|
public static final String SOURCE_ZONE_ID = "sourcezoneid";
|
||||||
public static final String SSL_VERIFICATION = "sslverification";
|
public static final String SSL_VERIFICATION = "sslverification";
|
||||||
public static final String START_ASN = "startasn";
|
public static final String START_ASN = "startasn";
|
||||||
|
|
@ -598,9 +615,12 @@ public class ApiConstants {
|
||||||
public static final String TENANT_NAME = "tenantname";
|
public static final String TENANT_NAME = "tenantname";
|
||||||
public static final String TOTAL = "total";
|
public static final String TOTAL = "total";
|
||||||
public static final String TOTAL_SUBNETS = "totalsubnets";
|
public static final String TOTAL_SUBNETS = "totalsubnets";
|
||||||
|
public static final String TO_CHECKPOINT_ID = "tocheckpointid";
|
||||||
|
public static final String TOTAL_QUOTA = "totalquota";
|
||||||
public static final String TYPE = "type";
|
public static final String TYPE = "type";
|
||||||
public static final String TRUST_STORE = "truststore";
|
public static final String TRUST_STORE = "truststore";
|
||||||
public static final String TRUST_STORE_PASSWORD = "truststorepass";
|
public static final String TRUST_STORE_PASSWORD = "truststorepass";
|
||||||
|
public static final String UNIT = "unit";
|
||||||
public static final String URL = "url";
|
public static final String URL = "url";
|
||||||
public static final String USAGE_INTERFACE = "usageinterface";
|
public static final String USAGE_INTERFACE = "usageinterface";
|
||||||
public static final String USED = "used";
|
public static final String USED = "used";
|
||||||
|
|
@ -764,6 +784,7 @@ public class ApiConstants {
|
||||||
public static final String ROLE_TYPE = "roletype";
|
public static final String ROLE_TYPE = "roletype";
|
||||||
public static final String ROLE_NAME = "rolename";
|
public static final String ROLE_NAME = "rolename";
|
||||||
public static final String PERMISSION = "permission";
|
public static final String PERMISSION = "permission";
|
||||||
|
public static final String PERMISSIONS = "permissions";
|
||||||
public static final String RULE = "rule";
|
public static final String RULE = "rule";
|
||||||
public static final String RULES = "rules";
|
public static final String RULES = "rules";
|
||||||
public static final String RULE_ID = "ruleid";
|
public static final String RULE_ID = "ruleid";
|
||||||
|
|
@ -981,6 +1002,7 @@ public class ApiConstants {
|
||||||
public static final String REGION_ID = "regionid";
|
public static final String REGION_ID = "regionid";
|
||||||
public static final String VPC_OFF_ID = "vpcofferingid";
|
public static final String VPC_OFF_ID = "vpcofferingid";
|
||||||
public static final String VPC_OFF_NAME = "vpcofferingname";
|
public static final String VPC_OFF_NAME = "vpcofferingname";
|
||||||
|
public static final String VPC_OFFERING_CONSERVE_MODE = "vpcofferingconservemode";
|
||||||
public static final String NETWORK = "network";
|
public static final String NETWORK = "network";
|
||||||
public static final String VPC_ID = "vpcid";
|
public static final String VPC_ID = "vpcid";
|
||||||
public static final String VPC_NAME = "vpcname";
|
public static final String VPC_NAME = "vpcname";
|
||||||
|
|
@ -1027,7 +1049,7 @@ public class ApiConstants {
|
||||||
public static final String NSX_PROVIDER_PORT = "nsxproviderport";
|
public static final String NSX_PROVIDER_PORT = "nsxproviderport";
|
||||||
public static final String NSX_CONTROLLER_ID = "nsxcontrollerid";
|
public static final String NSX_CONTROLLER_ID = "nsxcontrollerid";
|
||||||
public static final String S3_ACCESS_KEY = "accesskey";
|
public static final String S3_ACCESS_KEY = "accesskey";
|
||||||
public static final String S3_SECRET_KEY = "secretkey";
|
public static final String SECRET_KEY = "secretkey";
|
||||||
public static final String S3_END_POINT = "endpoint";
|
public static final String S3_END_POINT = "endpoint";
|
||||||
public static final String S3_BUCKET_NAME = "bucket";
|
public static final String S3_BUCKET_NAME = "bucket";
|
||||||
public static final String S3_SIGNER = "s3signer";
|
public static final String S3_SIGNER = "s3signer";
|
||||||
|
|
@ -1167,6 +1189,7 @@ public class ApiConstants {
|
||||||
public static final String OVM3_VIP = "ovm3vip";
|
public static final String OVM3_VIP = "ovm3vip";
|
||||||
public static final String CLEAN_UP_DETAILS = "cleanupdetails";
|
public static final String CLEAN_UP_DETAILS = "cleanupdetails";
|
||||||
public static final String CLEAN_UP_EXTERNAL_DETAILS = "cleanupexternaldetails";
|
public static final String CLEAN_UP_EXTERNAL_DETAILS = "cleanupexternaldetails";
|
||||||
|
public static final String CLEAN_UP_EXTRA_CONFIG = "cleanupextraconfig";
|
||||||
public static final String CLEAN_UP_PARAMETERS = "cleanupparameters";
|
public static final String CLEAN_UP_PARAMETERS = "cleanupparameters";
|
||||||
public static final String VIRTUAL_SIZE = "virtualsize";
|
public static final String VIRTUAL_SIZE = "virtualsize";
|
||||||
public static final String NETSCALER_CONTROLCENTER_ID = "netscalercontrolcenterid";
|
public static final String NETSCALER_CONTROLCENTER_ID = "netscalercontrolcenterid";
|
||||||
|
|
@ -1238,6 +1261,13 @@ public class ApiConstants {
|
||||||
public static final String MAX_SIZE = "maxsize";
|
public static final String MAX_SIZE = "maxsize";
|
||||||
public static final String NODE_TYPE_OFFERING_MAP = "nodeofferings";
|
public static final String NODE_TYPE_OFFERING_MAP = "nodeofferings";
|
||||||
public static final String NODE_TYPE_TEMPLATE_MAP = "nodetemplates";
|
public static final String NODE_TYPE_TEMPLATE_MAP = "nodetemplates";
|
||||||
|
public static final String NODE_TYPE_AFFINITY_GROUP_MAP = "nodeaffinitygroups";
|
||||||
|
public static final String CONTROL_AFFINITY_GROUP_IDS = "controlaffinitygroupids";
|
||||||
|
public static final String CONTROL_AFFINITY_GROUP_NAMES = "controlaffinitygroupnames";
|
||||||
|
public static final String WORKER_AFFINITY_GROUP_IDS = "workeraffinitygroupids";
|
||||||
|
public static final String WORKER_AFFINITY_GROUP_NAMES = "workeraffinitygroupnames";
|
||||||
|
public static final String ETCD_AFFINITY_GROUP_IDS = "etcdaffinitygroupids";
|
||||||
|
public static final String ETCD_AFFINITY_GROUP_NAMES = "etcdaffinitygroupnames";
|
||||||
|
|
||||||
public static final String BOOT_TYPE = "boottype";
|
public static final String BOOT_TYPE = "boottype";
|
||||||
public static final String BOOT_MODE = "bootmode";
|
public static final String BOOT_MODE = "bootmode";
|
||||||
|
|
@ -1259,6 +1289,7 @@ public class ApiConstants {
|
||||||
public static final String PROVIDER_FOR_2FA = "providerfor2fa";
|
public static final String PROVIDER_FOR_2FA = "providerfor2fa";
|
||||||
public static final String ISSUER_FOR_2FA = "issuerfor2fa";
|
public static final String ISSUER_FOR_2FA = "issuerfor2fa";
|
||||||
public static final String MANDATE_2FA = "mandate2fa";
|
public static final String MANDATE_2FA = "mandate2fa";
|
||||||
|
public static final String PASSWORD_CHANGE_REQUIRED = "passwordchangerequired";
|
||||||
public static final String SECRET_CODE = "secretcode";
|
public static final String SECRET_CODE = "secretcode";
|
||||||
public static final String LOGIN = "login";
|
public static final String LOGIN = "login";
|
||||||
public static final String LOGOUT = "logout";
|
public static final String LOGOUT = "logout";
|
||||||
|
|
@ -1281,6 +1312,8 @@ public class ApiConstants {
|
||||||
public static final String OBJECT_LOCKING = "objectlocking";
|
public static final String OBJECT_LOCKING = "objectlocking";
|
||||||
public static final String ENCRYPTION = "encryption";
|
public static final String ENCRYPTION = "encryption";
|
||||||
public static final String QUOTA = "quota";
|
public static final String QUOTA = "quota";
|
||||||
|
public static final String QUOTA_CONSUMED = "quotaconsumed";
|
||||||
|
public static final String QUOTA_USAGE = "quotausage";
|
||||||
public static final String ACCESS_KEY = "accesskey";
|
public static final String ACCESS_KEY = "accesskey";
|
||||||
|
|
||||||
public static final String SOURCE_NAT_IP = "sourcenatipaddress";
|
public static final String SOURCE_NAT_IP = "sourcenatipaddress";
|
||||||
|
|
@ -1331,6 +1364,13 @@ public class ApiConstants {
|
||||||
public static final String OBJECT_STORAGE_LIMIT = "objectstoragelimit";
|
public static final String OBJECT_STORAGE_LIMIT = "objectstoragelimit";
|
||||||
public static final String OBJECT_STORAGE_TOTAL = "objectstoragetotal";
|
public static final String OBJECT_STORAGE_TOTAL = "objectstoragetotal";
|
||||||
|
|
||||||
|
public static final String KEEP_MAC_ADDRESS_ON_PUBLIC_NIC = "keepmacaddressonpublicnic";
|
||||||
|
|
||||||
|
public static final String PARAMETER_DESCRIPTION_KEEP_MAC_ADDRESS_ON_PUBLIC_NIC =
|
||||||
|
"Indicates whether to use the same MAC address for the public NIC of VRs on the same network. If \"true\", when creating redundant routers or recreating" +
|
||||||
|
" a VR, CloudStack will use the same MAC address for the public NIC of all VRs. Otherwise, if \"false\", new public NICs will always have " +
|
||||||
|
" a new MAC address.";
|
||||||
|
|
||||||
public static final String PARAMETER_DESCRIPTION_ACTIVATION_RULE = "Quota tariff's activation rule. It can receive a JS script that results in either " +
|
public static final String PARAMETER_DESCRIPTION_ACTIVATION_RULE = "Quota tariff's activation rule. It can receive a JS script that results in either " +
|
||||||
"a boolean or a numeric value: if it results in a boolean value, the tariff value will be applied according to the result; if it results in a numeric value, the " +
|
"a boolean or a numeric value: if it results in a boolean value, the tariff value will be applied according to the result; if it results in a numeric value, the " +
|
||||||
"numeric value will be applied; if the result is neither a boolean nor a numeric value, the tariff will not be applied. If the rule is not informed, the tariff " +
|
"numeric value will be applied; if the result is neither a boolean nor a numeric value, the tariff will not be applied. If the rule is not informed, the tariff " +
|
||||||
|
|
@ -1366,6 +1406,10 @@ public class ApiConstants {
|
||||||
|
|
||||||
public static final String RECURSIVE_DOMAINS = "recursivedomains";
|
public static final String RECURSIVE_DOMAINS = "recursivedomains";
|
||||||
|
|
||||||
|
public static final String VPN_CUSTOMER_GATEWAY_PARAMETERS = "vpncustomergatewayparameters";
|
||||||
|
public static final String OBSOLETE_PARAMETERS = "obsoleteparameters";
|
||||||
|
public static final String EXCLUDED_PARAMETERS = "excludedparameters";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This enum specifies IO Drivers, each option controls specific policies on I/O.
|
* This enum specifies IO Drivers, each option controls specific policies on I/O.
|
||||||
* Qemu guests support "threads" and "native" options Since 0.8.8 ; "io_uring" is supported Since 6.3.0 (QEMU 5.0).
|
* Qemu guests support "threads" and "native" options Since 0.8.8 ; "io_uring" is supported Since 6.3.0 (QEMU 5.0).
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,11 @@ import java.util.Map;
|
||||||
|
|
||||||
import javax.servlet.http.HttpSession;
|
import javax.servlet.http.HttpSession;
|
||||||
|
|
||||||
|
import org.apache.cloudstack.context.CallContext;
|
||||||
|
|
||||||
import com.cloud.domain.Domain;
|
import com.cloud.domain.Domain;
|
||||||
import com.cloud.exception.CloudAuthenticationException;
|
import com.cloud.exception.CloudAuthenticationException;
|
||||||
|
import com.cloud.user.Account;
|
||||||
import com.cloud.user.UserAccount;
|
import com.cloud.user.UserAccount;
|
||||||
|
|
||||||
public interface ApiServerService {
|
public interface ApiServerService {
|
||||||
|
|
@ -52,4 +55,20 @@ public interface ApiServerService {
|
||||||
String getDomainId(Map<String, Object[]> params);
|
String getDomainId(Map<String, Object[]> params);
|
||||||
|
|
||||||
boolean isPostRequestsAndTimestampsEnforced();
|
boolean isPostRequestsAndTimestampsEnforced();
|
||||||
|
|
||||||
|
AsyncCmdResult processAsyncCmd(BaseAsyncCmd cmdObj, Map<String, String> params, CallContext ctx, Long callerUserId, Account caller) throws Exception;
|
||||||
|
|
||||||
|
class AsyncCmdResult {
|
||||||
|
public final Long objectId;
|
||||||
|
public final String objectUuid;
|
||||||
|
public final BaseAsyncCmd asyncCmd;
|
||||||
|
public final long jobId;
|
||||||
|
|
||||||
|
public AsyncCmdResult(Long objectId, String objectUuid, BaseAsyncCmd asyncCmd, long jobId) {
|
||||||
|
this.objectId = objectId;
|
||||||
|
this.objectUuid = objectUuid;
|
||||||
|
this.asyncCmd = asyncCmd;
|
||||||
|
this.jobId = jobId;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ public abstract class BaseAsyncCmd extends BaseCmd {
|
||||||
public static final String migrationSyncObject = "migration";
|
public static final String migrationSyncObject = "migration";
|
||||||
public static final String snapshotHostSyncObject = "snapshothost";
|
public static final String snapshotHostSyncObject = "snapshothost";
|
||||||
public static final String gslbSyncObject = "globalserverloadbalancer";
|
public static final String gslbSyncObject = "globalserverloadbalancer";
|
||||||
|
public static final String user = "user";
|
||||||
|
|
||||||
private Object job;
|
private Object job;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ public abstract class BaseAsyncCreateCustomIdCmd extends BaseAsyncCreateCmd {
|
||||||
@Parameter(name = ApiConstants.CUSTOM_ID,
|
@Parameter(name = ApiConstants.CUSTOM_ID,
|
||||||
type = CommandType.STRING,
|
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;
|
protected String customId;
|
||||||
|
|
||||||
public String getCustomId() {
|
public String getCustomId() {
|
||||||
return customId;
|
return customId;
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ import org.apache.cloudstack.api.response.ListResponse;
|
||||||
import org.apache.cloudstack.backup.BackupOffering;
|
import org.apache.cloudstack.backup.BackupOffering;
|
||||||
import org.apache.cloudstack.context.CallContext;
|
import org.apache.cloudstack.context.CallContext;
|
||||||
|
|
||||||
public abstract class BaseBackupListCmd extends BaseListCmd {
|
public abstract class BaseBackupListCmd extends BaseListAccountResourcesCmd {
|
||||||
|
|
||||||
protected void setupResponseBackupOfferingsList(final List<BackupOffering> offerings, final Integer count) {
|
protected void setupResponseBackupOfferingsList(final List<BackupOffering> offerings, final Integer count) {
|
||||||
final ListResponse<BackupOfferingResponse> response = new ListResponse<>();
|
final ListResponse<BackupOfferingResponse> response = new ListResponse<>();
|
||||||
|
|
|
||||||
|
|
@ -35,6 +35,7 @@ import com.cloud.bgp.BGPService;
|
||||||
import org.apache.cloudstack.acl.ProjectRoleService;
|
import org.apache.cloudstack.acl.ProjectRoleService;
|
||||||
import org.apache.cloudstack.acl.RoleService;
|
import org.apache.cloudstack.acl.RoleService;
|
||||||
import org.apache.cloudstack.acl.RoleType;
|
import org.apache.cloudstack.acl.RoleType;
|
||||||
|
import org.apache.cloudstack.acl.apikeypair.ApiKeyPairService;
|
||||||
import org.apache.cloudstack.affinity.AffinityGroupService;
|
import org.apache.cloudstack.affinity.AffinityGroupService;
|
||||||
import org.apache.cloudstack.alert.AlertService;
|
import org.apache.cloudstack.alert.AlertService;
|
||||||
import org.apache.cloudstack.annotation.AnnotationService;
|
import org.apache.cloudstack.annotation.AnnotationService;
|
||||||
|
|
@ -220,6 +221,8 @@ public abstract class BaseCmd {
|
||||||
@Inject
|
@Inject
|
||||||
public Ipv6Service ipv6Service;
|
public Ipv6Service ipv6Service;
|
||||||
@Inject
|
@Inject
|
||||||
|
public ApiKeyPairService apiKeyPairService;
|
||||||
|
@Inject
|
||||||
public VnfTemplateManager vnfTemplateManager;
|
public VnfTemplateManager vnfTemplateManager;
|
||||||
@Inject
|
@Inject
|
||||||
public BucketApiService _bucketService;
|
public BucketApiService _bucketService;
|
||||||
|
|
@ -382,7 +385,7 @@ public abstract class BaseCmd {
|
||||||
if (roleIsAllowed) {
|
if (roleIsAllowed) {
|
||||||
validFields.add(field);
|
validFields.add(field);
|
||||||
} else {
|
} 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());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -498,4 +501,8 @@ public abstract class BaseCmd {
|
||||||
}
|
}
|
||||||
return details;
|
return details;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getResourceUuid(String parameterName) {
|
||||||
|
return CallContext.current().getApiResourceUuid(parameterName);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ public abstract class BaseUpdateTemplateOrIsoCmd extends BaseCmd {
|
||||||
private Boolean cleanupDetails;
|
private Boolean cleanupDetails;
|
||||||
|
|
||||||
@Parameter(name = ApiConstants.ARCH, type = CommandType.STRING,
|
@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")
|
since = "4.20")
|
||||||
private String arch;
|
private String arch;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,8 @@ import java.util.Set;
|
||||||
|
|
||||||
import org.apache.cloudstack.api.response.ConsoleSessionResponse;
|
import org.apache.cloudstack.api.response.ConsoleSessionResponse;
|
||||||
import org.apache.cloudstack.consoleproxy.ConsoleSession;
|
import org.apache.cloudstack.consoleproxy.ConsoleSession;
|
||||||
|
import org.apache.cloudstack.acl.apikeypair.ApiKeyPair;
|
||||||
|
import org.apache.cloudstack.acl.apikeypair.ApiKeyPairPermission;
|
||||||
import org.apache.cloudstack.affinity.AffinityGroup;
|
import org.apache.cloudstack.affinity.AffinityGroup;
|
||||||
import org.apache.cloudstack.affinity.AffinityGroupResponse;
|
import org.apache.cloudstack.affinity.AffinityGroupResponse;
|
||||||
import org.apache.cloudstack.api.ApiConstants.HostDetails;
|
import org.apache.cloudstack.api.ApiConstants.HostDetails;
|
||||||
|
|
@ -41,6 +43,7 @@ import org.apache.cloudstack.api.response.AutoScaleVmProfileResponse;
|
||||||
import org.apache.cloudstack.api.response.BackupOfferingResponse;
|
import org.apache.cloudstack.api.response.BackupOfferingResponse;
|
||||||
import org.apache.cloudstack.api.response.BackupRepositoryResponse;
|
import org.apache.cloudstack.api.response.BackupRepositoryResponse;
|
||||||
import org.apache.cloudstack.api.response.BackupScheduleResponse;
|
import org.apache.cloudstack.api.response.BackupScheduleResponse;
|
||||||
|
import org.apache.cloudstack.api.response.BaseRolePermissionResponse;
|
||||||
import org.apache.cloudstack.api.response.BucketResponse;
|
import org.apache.cloudstack.api.response.BucketResponse;
|
||||||
import org.apache.cloudstack.api.response.CapacityResponse;
|
import org.apache.cloudstack.api.response.CapacityResponse;
|
||||||
import org.apache.cloudstack.api.response.ClusterResponse;
|
import org.apache.cloudstack.api.response.ClusterResponse;
|
||||||
|
|
@ -77,6 +80,7 @@ import org.apache.cloudstack.api.response.InternalLoadBalancerElementResponse;
|
||||||
import org.apache.cloudstack.api.response.IpForwardingRuleResponse;
|
import org.apache.cloudstack.api.response.IpForwardingRuleResponse;
|
||||||
import org.apache.cloudstack.api.response.IpQuarantineResponse;
|
import org.apache.cloudstack.api.response.IpQuarantineResponse;
|
||||||
import org.apache.cloudstack.api.response.IsolationMethodResponse;
|
import org.apache.cloudstack.api.response.IsolationMethodResponse;
|
||||||
|
import org.apache.cloudstack.api.response.ApiKeyPairResponse;
|
||||||
import org.apache.cloudstack.api.response.LBHealthCheckResponse;
|
import org.apache.cloudstack.api.response.LBHealthCheckResponse;
|
||||||
import org.apache.cloudstack.api.response.LBStickinessResponse;
|
import org.apache.cloudstack.api.response.LBStickinessResponse;
|
||||||
import org.apache.cloudstack.api.response.ListResponse;
|
import org.apache.cloudstack.api.response.ListResponse;
|
||||||
|
|
@ -339,6 +343,8 @@ public interface ResponseGenerator {
|
||||||
|
|
||||||
UserVm findUserVmById(Long vmId);
|
UserVm findUserVmById(Long vmId);
|
||||||
|
|
||||||
|
UserVm findUserVmByNicId(Long nicId);
|
||||||
|
|
||||||
Volume findVolumeById(Long volumeId);
|
Volume findVolumeById(Long volumeId);
|
||||||
|
|
||||||
Account findAccountByNameDomain(String accountName, Long domainId);
|
Account findAccountByNameDomain(String accountName, Long domainId);
|
||||||
|
|
@ -583,4 +589,8 @@ public interface ResponseGenerator {
|
||||||
GuiThemeResponse createGuiThemeResponse(GuiThemeJoin guiThemeJoin);
|
GuiThemeResponse createGuiThemeResponse(GuiThemeJoin guiThemeJoin);
|
||||||
|
|
||||||
ConsoleSessionResponse createConsoleSessionResponse(ConsoleSession consoleSession, ResponseView responseView);
|
ConsoleSessionResponse createConsoleSessionResponse(ConsoleSession consoleSession, ResponseView responseView);
|
||||||
|
|
||||||
|
ApiKeyPairResponse createKeyPairResponse(ApiKeyPair keyPair);
|
||||||
|
|
||||||
|
ListResponse<BaseRolePermissionResponse> createKeypairPermissionsResponse(List<ApiKeyPairPermission> permissions);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -177,7 +177,7 @@ public class CreateAccountCmd extends BaseCmd {
|
||||||
@Override
|
@Override
|
||||||
public void execute() {
|
public void execute() {
|
||||||
validateParams();
|
validateParams();
|
||||||
CallContext.current().setEventDetails("Account Name: " + getUsername() + ", Domain Id:" + getDomainId());
|
CallContext.current().setEventDetails("Account Name: " + getUsername() + ", Domain ID:" + getResourceUuid(ApiConstants.DOMAIN_ID));
|
||||||
UserAccount userAccount =
|
UserAccount userAccount =
|
||||||
_accountService.createUserAccount(this);
|
_accountService.createUserAccount(this);
|
||||||
if (userAccount != null) {
|
if (userAccount != null) {
|
||||||
|
|
|
||||||
|
|
@ -108,12 +108,20 @@ public class DisableAccountCmd extends BaseAsyncCmd {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String getEventDescription() {
|
public String getEventDescription() {
|
||||||
return "Disabling Account: " + getAccountName() + " in domain: " + getDomainId();
|
String message = "Disabling Account ";
|
||||||
|
|
||||||
|
if (getId() != null) {
|
||||||
|
message += "with ID: " + getResourceUuid(ApiConstants.ID);
|
||||||
|
} else {
|
||||||
|
message += getAccountName() + " in Domain: " + getResourceUuid(ApiConstants.DOMAIN_ID);
|
||||||
|
}
|
||||||
|
|
||||||
|
return message;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute() throws ConcurrentOperationException, ResourceUnavailableException {
|
public void execute() throws ConcurrentOperationException, ResourceUnavailableException {
|
||||||
CallContext.current().setEventDetails("Account Name: " + getAccountName() + ", Domain Id:" + getDomainId());
|
CallContext.current().setEventDetails("Account Name: " + getAccountName() + ", Domain Id:" + getResourceUuid(ApiConstants.DOMAIN_ID));
|
||||||
Account result = _regionService.disableAccount(this);
|
Account result = _regionService.disableAccount(this);
|
||||||
if (result != null){
|
if (result != null){
|
||||||
AccountResponse response = _responseGenerator.createAccountResponse(ResponseView.Full, result);
|
AccountResponse response = _responseGenerator.createAccountResponse(ResponseView.Full, result);
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ public class CreateRolePermissionCmd extends BaseRolePermissionCmd {
|
||||||
if (role == null) {
|
if (role == null) {
|
||||||
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid role id provided");
|
throw new ServerApiException(ApiErrorCode.PARAM_ERROR, "Invalid role id provided");
|
||||||
}
|
}
|
||||||
CallContext.current().setEventDetails("Role id: " + role.getId() + ", rule:" + getRule() + ", permission: " + getPermission() + ", description: " + getDescription());
|
CallContext.current().setEventDetails("Role ID: " + role.getUuid() + ", rule:" + getRule() + ", permission: " + getPermission() + ", description: " + getDescription());
|
||||||
final RolePermission rolePermission = roleService.createRolePermission(role, getRule(), getPermission(), getDescription());
|
final RolePermission rolePermission = roleService.createRolePermission(role, getRule(), getPermission(), getDescription());
|
||||||
if (rolePermission == null) {
|
if (rolePermission == null) {
|
||||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create role permission");
|
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to create role permission");
|
||||||
|
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue