mirror of
https://github.com/apache/cloudstack
synced 2026-08-02 21:38:30 +00:00
Compare commits
No commits in common. "main" and "4.20.2.0" have entirely different histories.
40
.asf.yaml
40
.asf.yaml
@ -16,6 +16,7 @@
|
||||
# under the License.
|
||||
|
||||
# https://cwiki.apache.org/confluence/display/INFRA/git+-+.asf.yaml+features
|
||||
---
|
||||
github:
|
||||
description: "Apache CloudStack is an opensource Infrastructure as a Service (IaaS) cloud computing platform"
|
||||
homepage: https://cloudstack.apache.org/
|
||||
@ -49,34 +50,21 @@ github:
|
||||
rebase: false
|
||||
|
||||
collaborators:
|
||||
- ingox
|
||||
- gp-santos
|
||||
- erikbocks
|
||||
- Imvedansh
|
||||
- Damans227
|
||||
- jmsperu
|
||||
- acs-robot
|
||||
- rajujith
|
||||
- GaOrtiga
|
||||
- bhouse-nexthop
|
||||
- SadiJr
|
||||
- winterhazel
|
||||
- gpordeus
|
||||
- hsato03
|
||||
- bernardodemarco
|
||||
- abh1sar
|
||||
- FelipeM525
|
||||
|
||||
rulesets:
|
||||
- name: "Default Branch Protection"
|
||||
type: branch
|
||||
branches:
|
||||
includes:
|
||||
- "~DEFAULT_BRANCH"
|
||||
excludes: []
|
||||
bypass_teams:
|
||||
- root
|
||||
restrict_deletion: true
|
||||
restrict_force_push: true
|
||||
|
||||
copilot_code_review:
|
||||
enabled: true
|
||||
review_drafts: true
|
||||
review_on_push: true
|
||||
protected_branches: ~
|
||||
|
||||
notifications:
|
||||
commits: commits@cloudstack.apache.org
|
||||
issues: commits@cloudstack.apache.org
|
||||
commits: commits@cloudstack.apache.org
|
||||
issues: commits@cloudstack.apache.org
|
||||
pullrequests: commits@cloudstack.apache.org
|
||||
discussions: users@cloudstack.apache.org
|
||||
discussions: users@cloudstack.apache.org
|
||||
|
||||
20
.codespellrc
20
.codespellrc
@ -1,20 +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.
|
||||
|
||||
[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
|
||||
1
.gitattributes
vendored
1
.gitattributes
vendored
@ -1 +0,0 @@
|
||||
.github/workflows/*.lock.yml linguist-generated=true merge=ours
|
||||
25
.github/CODEOWNERS
vendored
25
.github/CODEOWNERS
vendored
@ -1,25 +0,0 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
/plugins/storage/volume/linstor @rp-
|
||||
/plugins/storage/volume/storpool @slavkap
|
||||
/plugins/storage/volume/ontap @rajiv-jain-netapp @sandeeplocharla @piyush5netapp @suryag1201
|
||||
|
||||
.pre-commit-config.yaml @jbampton
|
||||
/.github/linters/ @jbampton
|
||||
|
||||
/plugins/network-elements/nsx/ @Pearl1594 @nvazquez
|
||||
46
.github/ISSUE_TEMPLATE/bug.yml
vendored
46
.github/ISSUE_TEMPLATE/bug.yml
vendored
@ -1,46 +0,0 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
description: "Thank you for reporting a bug!"
|
||||
name: bug
|
||||
title: "[SHORT PROBLEM DESCRIPTION]"
|
||||
labels: bug, needs-triageing
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "## Welcome, please describe your problem below;"
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: problem
|
||||
value: The long description of your problem
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: "## What versions of cloudstack and any infra components are you using"
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: versions
|
||||
value: The versions of ACS, hypervisors, storage, network etc..
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: The steps to reproduce the bug
|
||||
value: |
|
||||
1.
|
||||
2.
|
||||
3.
|
||||
...
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "What to do about it?"
|
||||
25
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
25
.github/ISSUE_TEMPLATE/feature_request.yml
vendored
@ -1,25 +0,0 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
description: "Thank you for your new feature idea!"
|
||||
name: feature
|
||||
title: "[SHORT FUNCTIONAL DESCRIPTION]"
|
||||
labels: new
|
||||
body:
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: "The required feature described as a wish"
|
||||
value: As a User/Admin/Operator I would like to , ... have the system make my morning coffee.
|
||||
31
.github/actions/install-nonoss/action.yml
vendored
31
.github/actions/install-nonoss/action.yml
vendored
@ -1,31 +0,0 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
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
|
||||
58
.github/actions/setup-env/action.yml
vendored
58
.github/actions/setup-env/action.yml
vendored
@ -1,58 +0,0 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
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
|
||||
56
.github/aw/actions-lock.json
vendored
56
.github/aw/actions-lock.json
vendored
@ -1,56 +0,0 @@
|
||||
{
|
||||
"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"
|
||||
}
|
||||
}
|
||||
}
|
||||
5
.github/aw/imports/.gitattributes
vendored
5
.github/aw/imports/.gitattributes
vendored
@ -1,5 +0,0 @@
|
||||
# Mark all cached import files as generated
|
||||
* linguist-generated=true
|
||||
|
||||
# Use 'ours' merge strategy to keep local cached versions
|
||||
* merge=ours
|
||||
43
.github/dependabot.yml
vendored
43
.github/dependabot.yml
vendored
@ -1,43 +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.
|
||||
|
||||
# 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
|
||||
18
.github/linters/.markdown-lint.yml
vendored
18
.github/linters/.markdown-lint.yml
vendored
@ -18,21 +18,36 @@
|
||||
# MD001/heading-increment Heading levels should only increment by one level at a time
|
||||
MD001: false
|
||||
|
||||
# MD003/heading-style Heading style
|
||||
MD003: false
|
||||
|
||||
# MD004/ul-style Unordered list style
|
||||
MD004: false
|
||||
|
||||
# MD007/ul-indent Unordered list indentation
|
||||
MD007: false
|
||||
|
||||
# MD009/no-trailing-spaces Trailing spaces
|
||||
MD009: false
|
||||
|
||||
# MD010/no-hard-tabs Hard tabs
|
||||
MD010: false
|
||||
|
||||
# MD012/no-multiple-blanks Multiple consecutive blank lines
|
||||
MD012: false
|
||||
|
||||
# MD013/line-length Line length
|
||||
MD013: false
|
||||
|
||||
# MD014/commands-show-output Dollar signs used before commands without showing output
|
||||
MD014: false
|
||||
|
||||
# MD018/no-missing-space-atx No space after hash on atx style heading
|
||||
MD018: false
|
||||
|
||||
# MD019/no-multiple-space-atx Multiple spaces after hash on atx style heading
|
||||
MD019: false
|
||||
|
||||
# MD022/blanks-around-headings Headings should be surrounded by blank lines
|
||||
MD022: false
|
||||
|
||||
@ -83,6 +98,3 @@ MD046: false
|
||||
|
||||
# MD052/reference-links-images Reference links and images should use a label that is defined
|
||||
MD052: false
|
||||
|
||||
# MD059/descriptive-link-text Link text should be descriptive
|
||||
MD059: false
|
||||
|
||||
32
.github/linters/.yamllint.yml
vendored
32
.github/linters/.yamllint.yml
vendored
@ -1,32 +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.
|
||||
---
|
||||
extends: default
|
||||
|
||||
rules:
|
||||
line-length:
|
||||
max: 400 # Very forgiving for GitHub Actions and infrastructure files
|
||||
indentation: disable # Disable indentation checking for existing files
|
||||
comments: disable # Disable comment formatting checks
|
||||
braces: disable
|
||||
brackets: disable # Disable bracket spacing checks
|
||||
colons:
|
||||
max-spaces-after: -1 # Allow any number of spaces after colon
|
||||
max-spaces-before: 0
|
||||
document-start: disable # Many files don't have ---
|
||||
truthy:
|
||||
allowed-values: ['true', 'false', 'on', 'off', 'yes', 'no']
|
||||
52
.github/linters/codespell.txt
vendored
52
.github/linters/codespell.txt
vendored
@ -4,7 +4,6 @@ acount
|
||||
actuall
|
||||
acuiring
|
||||
acumulate
|
||||
addin
|
||||
addreess
|
||||
addtion
|
||||
adminstrator
|
||||
@ -13,8 +12,10 @@ afrer
|
||||
afterall
|
||||
againt
|
||||
ags
|
||||
aktive
|
||||
algoritm
|
||||
allo
|
||||
alloacate
|
||||
allocted
|
||||
alocation
|
||||
alogrithm
|
||||
@ -64,7 +65,6 @@ bject
|
||||
boardcast
|
||||
bootstraper
|
||||
bu
|
||||
callin
|
||||
cant
|
||||
capabilites
|
||||
capablity
|
||||
@ -73,7 +73,6 @@ carrefully
|
||||
cavaet
|
||||
chaing
|
||||
checkd
|
||||
checkin
|
||||
childs
|
||||
choosen
|
||||
chould
|
||||
@ -94,6 +93,7 @@ confg
|
||||
configruation
|
||||
configuable
|
||||
conneciton
|
||||
connexion
|
||||
constrait
|
||||
constraits
|
||||
containg
|
||||
@ -101,7 +101,9 @@ contex
|
||||
continuesly
|
||||
contro
|
||||
controler
|
||||
controles
|
||||
controll
|
||||
convienient
|
||||
convinience
|
||||
coputer
|
||||
correcponding
|
||||
@ -156,13 +158,13 @@ differnet
|
||||
differnt
|
||||
direcotry
|
||||
directroy
|
||||
disale
|
||||
disbale
|
||||
discrepency
|
||||
disover
|
||||
dissapper
|
||||
dissassociated
|
||||
divice
|
||||
dockin
|
||||
doesn'
|
||||
doesnot
|
||||
doesnt
|
||||
@ -173,6 +175,7 @@ eanbled
|
||||
earch
|
||||
ect
|
||||
elemnt
|
||||
eles
|
||||
elments
|
||||
emmited
|
||||
enble
|
||||
@ -180,23 +183,29 @@ encryted
|
||||
enebled
|
||||
enmpty
|
||||
entires
|
||||
enviornment
|
||||
environmnet
|
||||
equivalant
|
||||
erro
|
||||
erronous
|
||||
everthing
|
||||
everytime
|
||||
excetion
|
||||
excption
|
||||
excute
|
||||
execept
|
||||
execption
|
||||
exects
|
||||
execut
|
||||
executeable
|
||||
exeeded
|
||||
exisitng
|
||||
exisits
|
||||
existin
|
||||
existsing
|
||||
exitting
|
||||
expcted
|
||||
expection
|
||||
explaination
|
||||
explicitely
|
||||
faield
|
||||
faild
|
||||
@ -209,6 +218,7 @@ fillled
|
||||
findout
|
||||
fisrt
|
||||
fo
|
||||
folowing
|
||||
fowarding
|
||||
frist
|
||||
fro
|
||||
@ -227,7 +237,6 @@ hanling
|
||||
happend
|
||||
hasing
|
||||
hasnt
|
||||
havin
|
||||
hda
|
||||
hostanme
|
||||
hould
|
||||
@ -247,14 +256,20 @@ implmeneted
|
||||
implmentation
|
||||
incase
|
||||
includeing
|
||||
incosistency
|
||||
indecates
|
||||
indien
|
||||
infor
|
||||
informations
|
||||
informaton
|
||||
infrastrcuture
|
||||
ingore
|
||||
inital
|
||||
initalize
|
||||
initator
|
||||
initilization
|
||||
inspite
|
||||
instace
|
||||
instal
|
||||
instnace
|
||||
intefaces
|
||||
@ -272,8 +287,12 @@ ist
|
||||
klunky
|
||||
lable
|
||||
leve
|
||||
lief
|
||||
limite
|
||||
linke
|
||||
listner
|
||||
lokal
|
||||
lokales
|
||||
maintainence
|
||||
maintenace
|
||||
maintenence
|
||||
@ -282,6 +301,7 @@ mambers
|
||||
manaully
|
||||
manuel
|
||||
maxium
|
||||
mehtod
|
||||
mergable
|
||||
mesage
|
||||
messge
|
||||
@ -291,6 +311,7 @@ minumum
|
||||
mis
|
||||
modifers
|
||||
mor
|
||||
mot
|
||||
mulitply
|
||||
multipl
|
||||
multple
|
||||
@ -304,7 +325,7 @@ nin
|
||||
nodel
|
||||
nome
|
||||
noone
|
||||
notin
|
||||
nowe
|
||||
numbe
|
||||
numer
|
||||
occured
|
||||
@ -357,7 +378,6 @@ propogate
|
||||
provison
|
||||
psudo
|
||||
pyhsical
|
||||
re-use
|
||||
readabilty
|
||||
readd
|
||||
reccuring
|
||||
@ -372,9 +392,12 @@ remaning
|
||||
remore
|
||||
remvoing
|
||||
renabling
|
||||
repeatly
|
||||
reponse
|
||||
reqest
|
||||
reqiured
|
||||
requieres
|
||||
requried
|
||||
reserv
|
||||
reserverd
|
||||
reseted
|
||||
@ -391,15 +414,17 @@ retriving
|
||||
retrun
|
||||
retuned
|
||||
returing
|
||||
re-use
|
||||
rever
|
||||
rocessor
|
||||
roperty
|
||||
runing
|
||||
runnign
|
||||
sate
|
||||
scalled
|
||||
scipt
|
||||
scirpt
|
||||
scrip
|
||||
seconadry
|
||||
seconday
|
||||
seesion
|
||||
sepcified
|
||||
@ -412,10 +437,12 @@ settig
|
||||
sevices
|
||||
shoul
|
||||
shoule
|
||||
sie
|
||||
signle
|
||||
simplier
|
||||
singature
|
||||
skiping
|
||||
snaphsot
|
||||
snpashot
|
||||
specied
|
||||
specifed
|
||||
@ -426,6 +453,7 @@ standy
|
||||
statics
|
||||
stickyness
|
||||
stil
|
||||
stip
|
||||
storeage
|
||||
strat
|
||||
streched
|
||||
@ -434,6 +462,7 @@ succesfull
|
||||
successfull
|
||||
suceessful
|
||||
suces
|
||||
sucessfully
|
||||
suiteable
|
||||
suppots
|
||||
suppport
|
||||
@ -466,6 +495,7 @@ uncompressible
|
||||
uneccessarily
|
||||
unexepected
|
||||
unexpect
|
||||
unknow
|
||||
unkonw
|
||||
unkown
|
||||
unneccessary
|
||||
@ -473,12 +503,14 @@ unparseable
|
||||
unrecoginized
|
||||
unsupport
|
||||
unxpected
|
||||
updat
|
||||
uptodate
|
||||
usera
|
||||
usign
|
||||
usin
|
||||
utlization
|
||||
vaidate
|
||||
valiate
|
||||
valule
|
||||
valus
|
||||
varibles
|
||||
@ -487,6 +519,8 @@ verfying
|
||||
verifing
|
||||
virutal
|
||||
visable
|
||||
wakup
|
||||
wil
|
||||
wit
|
||||
wll
|
||||
wth
|
||||
|
||||
47
.github/workflows/build.yml
vendored
47
.github/workflows/build.yml
vendored
@ -16,31 +16,41 @@
|
||||
# under the License.
|
||||
|
||||
name: Build
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 4.22
|
||||
- 4.20
|
||||
pull_request:
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Environment
|
||||
uses: ./.github/actions/setup-env
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
install-python: 'true'
|
||||
install-apt-deps: 'true'
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
architecture: x64
|
||||
cache: maven
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
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 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
|
||||
run: |
|
||||
uname -a
|
||||
@ -51,8 +61,9 @@ jobs:
|
||||
free -m
|
||||
nproc
|
||||
git status
|
||||
- name: Install Non-OSS
|
||||
uses: ./.github/actions/install-nonoss
|
||||
|
||||
- name: Noredist Build
|
||||
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)
|
||||
|
||||
142
.github/workflows/ci.yml
vendored
142
.github/workflows/ci.yml
vendored
@ -16,60 +16,21 @@
|
||||
# under the License.
|
||||
|
||||
name: Simulator CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 4.22
|
||||
- 4.20
|
||||
pull_request:
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.repository == 'apache/cloudstack'
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
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
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@ -128,10 +89,7 @@ jobs:
|
||||
smoke/test_nested_virtualization
|
||||
smoke/test_set_sourcenat
|
||||
smoke/test_webhook_lifecycle
|
||||
smoke/test_purge_expunged_vms
|
||||
smoke/test_extension_lifecycle
|
||||
smoke/test_extension_custom_action_lifecycle
|
||||
smoke/test_extension_custom",
|
||||
smoke/test_purge_expunged_vms",
|
||||
"smoke/test_network
|
||||
smoke/test_network_acl
|
||||
smoke/test_network_ipv6
|
||||
@ -179,13 +137,11 @@ jobs:
|
||||
smoke/test_vm_deployment_planner
|
||||
smoke/test_vm_strict_host_tags
|
||||
smoke/test_vm_schedule
|
||||
smoke/test_deploy_vgpu_enabled_vm
|
||||
smoke/test_vm_life_cycle
|
||||
smoke/test_vm_lifecycle_unmanage_import
|
||||
smoke/test_vm_snapshot_kvm
|
||||
smoke/test_vm_snapshots
|
||||
smoke/test_volumes
|
||||
smoke/test_vpc_conserve_mode
|
||||
smoke/test_vpc_ipv6
|
||||
smoke/test_vpc_redundant
|
||||
smoke/test_vpc_router_nics
|
||||
@ -208,8 +164,7 @@ jobs:
|
||||
component/test_cpu_limits
|
||||
component/test_cpu_max_limits
|
||||
component/test_cpu_project_limits
|
||||
component/test_deploy_vm_userdata_multi_nic
|
||||
component/test_deploy_vm_lease",
|
||||
component/test_deploy_vm_userdata_multi_nic",
|
||||
"component/test_egress_fw_rules
|
||||
component/test_invalid_gw_nm
|
||||
component/test_ip_reservation",
|
||||
@ -254,70 +209,79 @@ jobs:
|
||||
smoke/test_list_service_offerings
|
||||
smoke/test_list_storage_pools
|
||||
smoke/test_list_volumes"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- name: Setup Environment
|
||||
uses: ./.github/actions/setup-env
|
||||
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
install-python: 'true'
|
||||
install-apt-deps: 'true'
|
||||
- name: Setup IPMI Tool for CloudStack
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
architecture: x64
|
||||
cache: maven
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
architecture: 'x64'
|
||||
|
||||
- name: Install Build Dependencies
|
||||
run: |
|
||||
# Create cloudstack-common directory if it doesn't exist
|
||||
sudo mkdir -p /usr/share/cloudstack-common
|
||||
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
|
||||
|
||||
# Copy ipmitool to cloudstack-common directory if it doesn't exist
|
||||
if [ ! -f /usr/share/cloudstack-common/ipmitool ]; then
|
||||
sudo cp /usr/bin/ipmitool /usr/share/cloudstack-common/ipmitool
|
||||
sudo chmod 755 /usr/share/cloudstack-common/ipmitool
|
||||
fi
|
||||
|
||||
# Create ipmitool-C3 wrapper script
|
||||
sudo tee /usr/bin/ipmitool > /dev/null << 'EOF'
|
||||
#!/bin/bash
|
||||
/usr/share/cloudstack-common/ipmitool -C3 $@
|
||||
EOF
|
||||
sudo chmod 755 /usr/bin/ipmitool
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
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
|
||||
run: |
|
||||
wget https://github.com/jacoco/jacoco/releases/download/v0.8.10/jacoco-0.8.10.zip
|
||||
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
|
||||
run: |
|
||||
# https://github.com/actions/runner-images/blob/main/images/linux/Ubuntu2004-Readme.md#mysql
|
||||
sudo apt-get install -y mysql-server
|
||||
sudo systemctl start mysql
|
||||
sudo mysql -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH caching_sha2_password BY ''; FLUSH PRIVILEGES;"
|
||||
sudo mysql -uroot -proot -e "ALTER USER 'root'@'localhost' IDENTIFIED WITH mysql_native_password BY ''; FLUSH PRIVILEGES;"
|
||||
sudo systemctl restart mysql
|
||||
sudo mysql -uroot -e "SELECT VERSION();"
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
|
||||
with:
|
||||
name: build-artifacts
|
||||
path: /tmp/artifacts/
|
||||
- name: Extract artifacts
|
||||
|
||||
- name: Build with Maven
|
||||
run: |
|
||||
tar -xzf /tmp/artifacts/targets.tar.gz
|
||||
mkdir -p ~/.m2/repository
|
||||
tar -xzf /tmp/artifacts/m2-cloudstack.tar.gz -C ~/.m2/repository
|
||||
mvn -B -P developer,systemvm -Dsimulator clean install -DskipTests=true -T$(nproc)
|
||||
|
||||
- name: Setup Simulator Prerequisites
|
||||
run: |
|
||||
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/Marvin-*.tar.gz
|
||||
mvn -q -Pdeveloper -pl developer -Ddeploydb
|
||||
mvn -q -Pdeveloper -pl developer -Ddeploydb-simulator
|
||||
|
||||
- name: Generate jacoco-coverage.sh
|
||||
run: |
|
||||
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 "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
|
||||
|
||||
- name: Start CloudStack Management Server with Simulator
|
||||
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"
|
||||
@ -328,6 +292,7 @@ jobs:
|
||||
set -e
|
||||
echo -e "\nStarting Advanced Zone DataCenter deployment"
|
||||
python3 tools/marvin/marvin/deployDataCenter.py -i setup/dev/advdualzone.cfg 2>&1 || true
|
||||
|
||||
- name: Run Integration Tests with Simulator
|
||||
run: |
|
||||
mkdir -p integration-test-results/smoke/misc
|
||||
@ -347,12 +312,13 @@ jobs:
|
||||
bash jacoco-report.sh
|
||||
mvn -Dsimulator -pl client jetty:stop 2>&1
|
||||
find /tmp//MarvinLogs -type f -exec echo -e "Printing marvin logs {} :\n" \; -exec cat {} \;
|
||||
|
||||
- name: Integration Tests Result
|
||||
run: |
|
||||
echo -e "Simulator CI Test Results: (only failures listed)\n"
|
||||
python3 ./tools/marvin/xunit-reader.py integration-test-results/
|
||||
|
||||
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||
- uses: codecov/codecov-action@v4
|
||||
with:
|
||||
files: jacoco-coverage.xml
|
||||
fail_ci_if_error: true
|
||||
|
||||
59
.github/workflows/codecov.yml
vendored
Normal file
59
.github/workflows/codecov.yml
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
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@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
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 }}
|
||||
50
.github/workflows/codeql-analysis.yml
vendored
50
.github/workflows/codeql-analysis.yml
vendored
@ -1,50 +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: CodeQL Analysis
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
permissions:
|
||||
actions: read
|
||||
contents: read
|
||||
security-events: write
|
||||
jobs:
|
||||
codeql:
|
||||
name: CodeQL
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
language: ["actions"]
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
||||
with:
|
||||
category: "Security"
|
||||
1400
.github/workflows/daily-issue-triage.lock.yml
vendored
1400
.github/workflows/daily-issue-triage.lock.yml
vendored
File diff suppressed because it is too large
Load Diff
171
.github/workflows/daily-issue-triage.md
vendored
171
.github/workflows/daily-issue-triage.md
vendored
@ -1,171 +0,0 @@
|
||||
---
|
||||
description: |
|
||||
Scheduled daily triage that processes untriaged CloudStack issues in batches.
|
||||
Detects duplicates, filters spam, and assigns CloudStack-specific labels
|
||||
(type:*, component:*, Severity:*, status:*), then posts a structured triage report.
|
||||
|
||||
name: Daily Issue Triage
|
||||
|
||||
on:
|
||||
schedule: daily around 14:00 on weekdays
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: read-all
|
||||
|
||||
network: defaults
|
||||
|
||||
safe-outputs:
|
||||
add-labels:
|
||||
target: "*"
|
||||
max: 10
|
||||
add-comment:
|
||||
target: "*"
|
||||
max: 10
|
||||
|
||||
tools:
|
||||
web-fetch:
|
||||
github:
|
||||
toolsets: [issues, labels]
|
||||
min-integrity: none
|
||||
|
||||
source: githubnext/agentics/workflows/daily-issue-triage.md@d7c1dc4b72b00607a67caaffdcc216cb64379cf9
|
||||
timeout-minutes: 60
|
||||
---
|
||||
|
||||
# Daily Issue Triage
|
||||
|
||||
<!-- Note - this file can be customized to your needs. Replace this section directly, or add further instructions here. After editing run 'gh aw compile' -->
|
||||
|
||||
You are a batch triage assistant for GitHub issues in **${{ github.repository }}** (Apache CloudStack). Your task is to find untriaged issues and triage them one by one. Your triage comments are written for maintainers reviewing the triage, not for the issue author.
|
||||
|
||||
Do not make assumptions beyond what the issue content supports. Do not invent missing context.
|
||||
|
||||
## Step 1: Find untriaged issues
|
||||
|
||||
Use the `search_issues` tool to find open issues that need triage. An issue is considered untriaged if it has **no labels applied**.
|
||||
|
||||
Query: `repo:${{ github.repository }} is:issue is:open no:label`
|
||||
|
||||
Paginate through all results to find untriaged issues. Do not stop at the first page.
|
||||
|
||||
From the results, filter out:
|
||||
- Issues that already have a triage comment (look for "🎯 Triage report" in comments). **Never retriage an issue that has already been triaged.**
|
||||
- Issues created by bots (unless they look like real user issues).
|
||||
- Issues that have any labels already applied (even if they weren't applied by this workflow).
|
||||
|
||||
Process the **oldest untriaged issues first**. Note: this workflow is capped at 10 label-sets and 10 comments per run, so the backlog will drain over several daily runs — that is intentional.
|
||||
|
||||
## Step 2: Fetch labels (once)
|
||||
|
||||
Before triaging any issues, fetch the list of labels available in this repository using the `list_labels` tool. Use this live list for all issues in the batch — only apply labels that actually exist in the repository.
|
||||
|
||||
CloudStack uses a prefixed label taxonomy. Choose from these families:
|
||||
|
||||
- **Type** (pick the single best one): `type:bug`, `type:new-feature`, `type:enhancement`, `type:improvement`, `type:regression`, `type:security`, `type:question`, `type:config`, `type:cleanup`
|
||||
- **Component** (apply when clearly identifiable; more than one is allowed): e.g. `component:kvm`, `component:vmware`, `component:XenServer`, `component:api`, `component:UI`, `component:networking`, `component:virtual-router`, `component:management-server`, `component:primary-storage`, `component:secondary-storage`, `component:kubernetes`, `component:database`, and others — use the full list returned by `list_labels`.
|
||||
- **Severity** (bugs only, when assessable): `Severity:BLOCKER`, `Severity:Critical`, `Severity:Major`, `Severity:Minor`, `Severity:Trivial`
|
||||
- **Duplicate / invalid**: `status:duplicate`, `status:invalid`
|
||||
- **Help wanted / newcomer-friendly**: `status:Help-wanted`
|
||||
|
||||
## Step 3: Triage each issue
|
||||
|
||||
For each untriaged issue, perform the following steps:
|
||||
|
||||
### 3a: Gather context
|
||||
|
||||
1. Retrieve the full issue content using the `get_issue` tool.
|
||||
2. Fetch any comments on the issue using the `get_issue_comments` tool.
|
||||
3. Search for similar issues using the `search_issues` tool.
|
||||
|
||||
### 3b: Spam and quality check
|
||||
|
||||
**Spam and invalid issues:** If the issue is obviously spam, bot-generated, gibberish, or a test issue:
|
||||
- Apply the `status:invalid` label.
|
||||
- **Do not close the issue** — closing is a human decision. Note in the report that it looks like spam/invalid so a maintainer can act.
|
||||
- Move to the next issue.
|
||||
|
||||
**Incomplete issues:** If the issue lacks enough detail for meaningful triage, add a comment that politely asks the author to provide the missing information:
|
||||
- For bugs: steps to reproduce, expected vs actual behavior, logs/errors, environment details (CloudStack version, hypervisor, etc.).
|
||||
- For other issue types: equivalent details that would make the report actionable.
|
||||
- Apply a `type:question` label if appropriate.
|
||||
- Be specific about what is missing and why it is needed.
|
||||
- Move to the next issue.
|
||||
|
||||
### 3c: Select labels
|
||||
|
||||
- Be cautious with labels; they can trigger automation.
|
||||
- Choose a single `type:*` label that best reflects the issue's nature.
|
||||
- Add `component:*` label(s) when the affected area is clear from the content.
|
||||
- Add a `Severity:*` label for bugs when severity can be reasonably assessed.
|
||||
- Do not apply labels that do not exist in the repository.
|
||||
- It is better to under-label than to speculatively add labels.
|
||||
|
||||
### 3d: Detect duplicates and related issues
|
||||
|
||||
- Review the similar issues found in Step 3a.
|
||||
- Classify matches as:
|
||||
- **Duplicate** (high confidence): the issue describes the same problem as an existing open issue. Include up to 3.
|
||||
- **Related**: similar domain or adjacent problem, but not a duplicate. Include up to 3.
|
||||
- If a high-confidence duplicate is found, apply the `status:duplicate` label.
|
||||
- If no similar issues are found, state that explicitly in your report.
|
||||
|
||||
### 3e: Assess coding agent suitability
|
||||
|
||||
Assess whether the issue is suitable for automated coding agent assignment:
|
||||
- **Suitable**: clear requirements, sufficient context, well-defined success criteria, self-contained scope.
|
||||
- **Needs more info**: potentially suitable but missing details needed to start.
|
||||
- **Not suitable**: requires investigation, design decisions, extensive coordination, or policy/architectural choices.
|
||||
|
||||
### 3f: Additional analysis
|
||||
|
||||
- Search the web for relevant documentation, error messages, or known solutions if applicable.
|
||||
- Write notes, debugging strategies, and/or reproduction steps relevant to the issue.
|
||||
- Suggest resources or links that might help resolve the issue.
|
||||
|
||||
### 3g: Apply results and post comment
|
||||
|
||||
Apply all triage results for this issue:
|
||||
- Use `update_issue` to apply the chosen labels.
|
||||
- Add an issue comment with the triage report using the format below.
|
||||
|
||||
Then move to the next issue.
|
||||
|
||||
## Processing order
|
||||
|
||||
1. Fetch available labels (Step 2, once at the start).
|
||||
2. Find untriaged issues (Step 1).
|
||||
3. For each issue (oldest first), run Step 3 (gather, check, label, detect duplicates, comment).
|
||||
|
||||
## Comment format
|
||||
|
||||
Use this structure for each triage comment. Use collapsed sections to keep it tidy.
|
||||
|
||||
```markdown
|
||||
## 🎯 Triage report
|
||||
|
||||
{2-3 sentence summary to help a maintainer quickly grasp the issue.}
|
||||
|
||||
### 📊 Assessment
|
||||
|
||||
| Dimension | Value | Reasoning |
|
||||
|---|---|---|
|
||||
| **Type** | [type:* label or "none"] | [brief] |
|
||||
| **Component** | [component:* label(s) or "none"] | [brief] |
|
||||
| **Severity** | [Severity:* label or "n/a"] | [brief] |
|
||||
| **Labels** | [all labels applied or "none"] | [brief] |
|
||||
| **Coding agent** | [Suitable / Needs more info / Not suitable] | [brief] |
|
||||
|
||||
### 🔗 Similar issues
|
||||
|
||||
- issue-url (duplicate/related) — [brief explanation]
|
||||
|
||||
<details><summary>💡 Notes and suggestions</summary>
|
||||
|
||||
{Debugging strategies, reproduction steps, resource links, sub-task checklists, nudges for the team.}
|
||||
|
||||
</details>
|
||||
```
|
||||
|
||||
If no similar issues were found, omit the "Similar issues" section. If there are no notes to add, omit the collapsed section.
|
||||
|
||||
**Important**: Never close issues. Only apply labels and post comments.
|
||||
1394
.github/workflows/daily-repo-status.lock.yml
vendored
1394
.github/workflows/daily-repo-status.lock.yml
vendored
File diff suppressed because it is too large
Load Diff
62
.github/workflows/daily-repo-status.md
vendored
62
.github/workflows/daily-repo-status.md
vendored
@ -1,62 +0,0 @@
|
||||
---
|
||||
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
|
||||
|
||||
engine:
|
||||
id: copilot
|
||||
model: claude-haiku-4.5
|
||||
|
||||
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:
|
||||
build:
|
||||
if: github.repository == 'apache/cloudstack'
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Login to Docker Registry
|
||||
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
|
||||
uses: docker/login-action@v2
|
||||
with:
|
||||
registry: ${{ secrets.DOCKER_REGISTRY }}
|
||||
username: ${{ secrets.DOCKERHUB_USER }}
|
||||
@ -47,9 +47,7 @@ jobs:
|
||||
- name: Set Docker repository name
|
||||
run: echo "DOCKER_REPOSITORY=apache" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set ACS version
|
||||
run: echo "ACS_VERSION=$(grep '<version>' pom.xml | head -2 | tail -1 | cut -d'>' -f2 |cut -d'<' -f1)" >> $GITHUB_ENV
|
||||
|
||||
16
.github/workflows/license-templates/LICENSE.txt
vendored
16
.github/workflows/license-templates/LICENSE.txt
vendored
@ -1,16 +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.
|
||||
@ -15,7 +15,7 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
name: pre-commit
|
||||
name: Lint
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
@ -29,27 +29,19 @@ concurrency:
|
||||
jobs:
|
||||
pre-commit:
|
||||
name: Run pre-commit
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Check Out
|
||||
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
|
||||
with:
|
||||
python-version: '3.11'
|
||||
cache: 'pip'
|
||||
uses: actions/checkout@v4
|
||||
- name: Install
|
||||
run: pip install pre-commit
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pre-commit
|
||||
- name: Set PY
|
||||
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
||||
- name: Cache pre-commit environments
|
||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||
- uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.cache/pre-commit
|
||||
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
||||
- name: Run pre-commit
|
||||
run: pre-commit run --color=always --all-files
|
||||
- name: Run manual pre-commit hooks
|
||||
run: pre-commit run --color=always --all-files --hook-stage manual
|
||||
run: pre-commit run --all-files
|
||||
63
.github/workflows/main-sonar-check.yml
vendored
63
.github/workflows/main-sonar-check.yml
vendored
@ -15,53 +15,54 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
name: Sonar Quality Check (Main)
|
||||
permissions:
|
||||
contents: read
|
||||
name: Main Branch Sonar Quality Check
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
|
||||
permissions:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
pull-requests: write # for sonar to comment on pull-request
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.repository == 'apache/cloudstack'
|
||||
name: Sonar JaCoCo Coverage
|
||||
runs-on: ubuntu-24.04
|
||||
name: Main Sonar JaCoCo Build
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- name: Setup Environment
|
||||
uses: ./.github/actions/setup-env
|
||||
|
||||
- name: Set up JDK17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
install-python: 'true'
|
||||
install-apt-deps: 'true'
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
cache: 'maven'
|
||||
|
||||
- name: Cache SonarCloud packages
|
||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.sonar/cache
|
||||
key: ${{ runner.os }}-sonar
|
||||
restore-keys: ${{ runner.os }}-sonar
|
||||
- name: Install Non-OSS
|
||||
uses: ./.github/actions/install-nonoss
|
||||
- name: Run Build and Tests with Coverage
|
||||
run: mvn -B -T$(nproc) -P developer,systemvm,quality -Dsimulator -Dnoredist clean install
|
||||
- name: Upload to SonarQube
|
||||
|
||||
- name: Cache local Maven repository
|
||||
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 Tests with Coverage
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
run: mvn -B -P quality org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_cloudstack -Dsonar.branch.name=${{ github.ref_name }}
|
||||
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||
with:
|
||||
files: ./client/target/site/jacoco-aggregate/jacoco.xml
|
||||
fail_ci_if_error: true
|
||||
flags: unittests
|
||||
verbose: true
|
||||
name: codecov
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
- name: Compute Coverage Grade
|
||||
run: bash scripts/coverage-grade.sh client/target/site/jacoco-aggregate/jacoco.xml
|
||||
run: |
|
||||
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
|
||||
cd nonoss && bash -x install-non-oss.sh && cd ..
|
||||
mvn -T$(nproc) -P quality -Dsimulator -Dnoredist clean install org.sonarsource.scanner.maven:sonar-maven-plugin:sonar -Dsonar.projectKey=apache_cloudstack
|
||||
|
||||
32
.github/workflows/merge-conflict-checker.yml
vendored
32
.github/workflows/merge-conflict-checker.yml
vendored
@ -17,26 +17,28 @@
|
||||
|
||||
name: "PR Merge Conflict Check"
|
||||
on:
|
||||
schedule:
|
||||
- cron: '*/10 * * * *'
|
||||
workflow_dispatch:
|
||||
push:
|
||||
pull_request_target:
|
||||
types: [synchronize]
|
||||
|
||||
permissions: {}
|
||||
permissions: # added using https://github.com/step-security/secure-workflows
|
||||
contents: read
|
||||
|
||||
concurrency:
|
||||
group: "gh-aw-${{ github.workflow }}"
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
permissions:
|
||||
pull-requests: write # for eps1lon/actions-label-merge-conflict to label PRs
|
||||
runs-on: ubuntu-24.04
|
||||
pull-requests: write # for eps1lon/actions-label-merge-conflict to label PRs
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Conflict Check
|
||||
uses: eps1lon/actions-label-merge-conflict@0273be72a0bbd58fcd71d0d6c02c209b50d1e5e1 # v3.1.0
|
||||
with:
|
||||
repoToken: "${{ secrets.GITHUB_TOKEN }}"
|
||||
dirtyLabel: "status:has-conflicts"
|
||||
removeOnDirtyLabel: "status:ready-for-review"
|
||||
continueOnMissingPermissions: true
|
||||
commentOnDirty: "This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch."
|
||||
- name: Conflict Check
|
||||
uses: eps1lon/actions-label-merge-conflict@v2.0.0
|
||||
with:
|
||||
repoToken: "${{ secrets.GITHUB_TOKEN }}"
|
||||
dirtyLabel: "status:has-conflicts"
|
||||
removeOnDirtyLabel: "status:ready-for-review"
|
||||
continueOnMissingPermissions: true
|
||||
commentOnDirty: "This pull request has merge conflicts. Dear author, please fix the conflicts and sync your branch with the base branch."
|
||||
|
||||
31
.github/workflows/rat.yml
vendored
31
.github/workflows/rat.yml
vendored
@ -16,31 +16,32 @@
|
||||
# under the License.
|
||||
|
||||
name: License Check
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 4.22
|
||||
- 4.20
|
||||
pull_request:
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
cancel-in-progress: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Setup Environment
|
||||
uses: ./.github/actions/setup-env
|
||||
- name: Install Non-OSS
|
||||
uses: ./.github/actions/install-nonoss
|
||||
java-version: '17'
|
||||
distribution: 'adopt'
|
||||
architecture: x64
|
||||
cache: maven
|
||||
- name: RAT licence checks
|
||||
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
|
||||
- name: Rat Report
|
||||
if: always()
|
||||
|
||||
108
.github/workflows/sonar-check.yml
vendored
108
.github/workflows/sonar-check.yml
vendored
@ -16,100 +16,58 @@
|
||||
# under the License.
|
||||
|
||||
name: Sonar Quality Check
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
on:
|
||||
pull_request:
|
||||
contents: read # to fetch code (actions/checkout)
|
||||
pull-requests: write # for sonar to comment on pull-request
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
build:
|
||||
if: github.repository == 'apache/cloudstack' && github.event.pull_request.head.repo.full_name == github.repository
|
||||
name: Sonar JaCoCo Coverage
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
||||
fetch-depth: 0
|
||||
persist-credentials: false
|
||||
- name: Setup Environment
|
||||
uses: ./.github/actions/setup-env
|
||||
|
||||
- name: Set up JDK17
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
install-python: 'true'
|
||||
install-apt-deps: 'true'
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
cache: 'maven'
|
||||
|
||||
- name: Cache SonarCloud packages
|
||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.sonar/cache
|
||||
key: ${{ runner.os }}-sonar
|
||||
restore-keys: ${{ runner.os }}-sonar
|
||||
- name: Install Non-OSS
|
||||
uses: ./.github/actions/install-nonoss
|
||||
|
||||
- name: Cache local Maven repository
|
||||
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
|
||||
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
|
||||
id: coverage
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
PR_ID: ${{ github.event.pull_request.number }}
|
||||
HEADREF: ${{ github.event.pull_request.head.ref }}
|
||||
run: |
|
||||
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
|
||||
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||
with:
|
||||
files: ./client/target/site/jacoco-aggregate/jacoco.xml
|
||||
fail_ci_if_error: true
|
||||
flags: unittests
|
||||
verbose: true
|
||||
name: codecov
|
||||
token: ${{ secrets.CODECOV_TOKEN }}
|
||||
- name: Compute Coverage Grade
|
||||
id: grade
|
||||
run: bash scripts/coverage-grade.sh client/target/site/jacoco-aggregate/jacoco.xml
|
||||
- name: Post Coverage Grade Comment on PR
|
||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const grade = '${{ steps.grade.outputs.coverage_grade }}';
|
||||
const label = '${{ steps.grade.outputs.coverage_grade_label }}';
|
||||
const linePct = '${{ steps.grade.outputs.line_coverage }}';
|
||||
const branchPct = '${{ steps.grade.outputs.branch_coverage }}';
|
||||
const emojiMap = { A: '🟢', B: '🟡', C: '🟠', D: '🔴', F: '⛔' };
|
||||
const emoji = emojiMap[grade] ?? '❓';
|
||||
const runUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
|
||||
|
||||
const branchRow = branchPct !== 'N/A'
|
||||
? `| Branch coverage | **${branchPct}%** |`
|
||||
: '';
|
||||
|
||||
const body = [
|
||||
`## ${emoji} Test Coverage Grade: \`${grade}\` — ${label}`,
|
||||
'',
|
||||
'| Metric | Value |',
|
||||
'|--------|-------|',
|
||||
`| Line coverage | **${linePct}%** |`,
|
||||
branchRow,
|
||||
'',
|
||||
'### Grade Scale',
|
||||
'| Grade | Line Coverage | Meaning |',
|
||||
'|-------|--------------|---------|',
|
||||
'| 🟢 A | ≥ 80% | Excellent - this code sleeps well at night 😴 |',
|
||||
'| 🟡 B | 60-79% | Good - almost there, don\'t stop now 😉 |',
|
||||
'| 🟠 C | 40-59% | Acceptable - your code is wearing a seatbelt, but no airbags 😬 |',
|
||||
'| 🔴 D | 20-39% | Marginal - boldly shipping where no test has gone before 🖖 |',
|
||||
'| ⛔ F | < 20% | Failing - tests? what tests? 🔥 |',
|
||||
'',
|
||||
'> Branch coverage is shown as a secondary signal. Grade is determined by **line coverage**.',
|
||||
`> [View full Actions run](${runUrl})`,
|
||||
].filter(l => l !== undefined).join('\n');
|
||||
|
||||
await github.rest.issues.createComment({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
issue_number: context.issue.number,
|
||||
body: body,
|
||||
});
|
||||
console.log('Posted coverage grade comment');
|
||||
git clone https://github.com/shapeblue/cloudstack-nonoss.git nonoss
|
||||
cd nonoss && bash -x install-non-oss.sh && cd ..
|
||||
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
|
||||
|
||||
49
.github/workflows/stale.yml
vendored
49
.github/workflows/stale.yml
vendored
@ -1,49 +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: '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
|
||||
20
.github/workflows/ui.yml
vendored
20
.github/workflows/ui.yml
vendored
@ -17,13 +17,7 @@
|
||||
|
||||
name: UI Build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- 4.22
|
||||
- 4.20
|
||||
pull_request:
|
||||
on: [push, pull_request]
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
@ -34,19 +28,15 @@ permissions:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
||||
with:
|
||||
persist-credentials: false
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
cache: 'npm'
|
||||
cache-dependency-path: 'ui/package-lock.json'
|
||||
|
||||
- name: Env details
|
||||
run: |
|
||||
@ -65,7 +55,7 @@ jobs:
|
||||
npm run lint
|
||||
npm run test:unit
|
||||
|
||||
- uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0
|
||||
- uses: codecov/codecov-action@v4
|
||||
if: github.repository == 'apache/cloudstack'
|
||||
with:
|
||||
working-directory: ui
|
||||
|
||||
4
.gitignore
vendored
4
.gitignore
vendored
@ -5,9 +5,9 @@
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
|
||||
@ -1 +0,0 @@
|
||||
CHANGES.md
|
||||
@ -15,122 +15,23 @@
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
---
|
||||
default_stages: [pre-commit, pre-push]
|
||||
default_stages: [commit, push]
|
||||
default_language_version:
|
||||
# force all unspecified Python hooks to run python3
|
||||
python: python3
|
||||
minimum_pre_commit_version: "3.2.0"
|
||||
minimum_pre_commit_version: "2.17.0"
|
||||
repos:
|
||||
- repo: meta
|
||||
hooks:
|
||||
- id: identity
|
||||
- id: check-hooks-apply
|
||||
- repo: https://github.com/thlorenz/doctoc.git
|
||||
rev: v2.2.0
|
||||
hooks:
|
||||
- id: doctoc
|
||||
name: Add TOC for Markdown files
|
||||
files: ^CONTRIBUTING\.md$|^INSTALL\.md$|^README\.md$
|
||||
- repo: https://github.com/oxipng/oxipng
|
||||
rev: v9.1.5
|
||||
hooks:
|
||||
- id: oxipng
|
||||
name: run oxipng
|
||||
description: optimize PNG images with lossless compression
|
||||
args: ['-o', '4', '--strip', 'safe', '--alpha']
|
||||
- repo: https://github.com/gitleaks/gitleaks
|
||||
rev: v8.27.2
|
||||
hooks:
|
||||
- id: gitleaks
|
||||
name: run gitleaks
|
||||
description: detect hardcoded secrets
|
||||
- repo: https://github.com/Lucas-C/pre-commit-hooks
|
||||
rev: v1.5.5
|
||||
hooks:
|
||||
- id: chmod
|
||||
name: set file permissions
|
||||
args: ['644']
|
||||
files: \.md$
|
||||
stages: [manual]
|
||||
- id: insert-license
|
||||
name: add license for all 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
|
||||
name: add license for all Markdown files
|
||||
files: \.md$
|
||||
args:
|
||||
- --comment-style
|
||||
- '<!--|| -->'
|
||||
- --license-filepath
|
||||
- .github/workflows/license-templates/LICENSE.txt
|
||||
- --fuzzy-match-generates-todo
|
||||
exclude: ^(CHANGES|ISSUE_TEMPLATE|PULL_REQUEST_TEMPLATE)\.md$|^ui/docs/(full|smoke)-test-plan\.template\.md$|^\.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
|
||||
rev: v6.0.0
|
||||
rev: v4.6.0
|
||||
hooks:
|
||||
#- id: check-added-large-files
|
||||
- id: check-case-conflict
|
||||
#- id: check-executables-have-shebangs
|
||||
- id: check-illegal-windows-names
|
||||
- id: check-merge-conflict
|
||||
- id: check-shebang-scripts-are-executable
|
||||
files: \.sh$
|
||||
- id: check-symlinks
|
||||
- id: check-vcs-permalinks
|
||||
#- id: check-yaml
|
||||
@ -141,7 +42,6 @@ repos:
|
||||
exclude: >
|
||||
(?x)
|
||||
^scripts/vm/systemvm/id_rsa\.cloud$|
|
||||
^server/src/test/java/org/apache/cloudstack/network/ssl/CertServiceTest\.java$|
|
||||
^server/src/test/java/com/cloud/keystore/KeystoreTest\.java$|
|
||||
^server/src/test/resources/certs/dsa_self_signed\.key$|
|
||||
^server/src/test/resources/certs/non_root\.key$|
|
||||
@ -151,47 +51,47 @@ repos:
|
||||
^server/src/test/resources/certs/rsa_self_signed\.key$|
|
||||
^services/console-proxy/rdpconsole/src/test/doc/rdp-key\.pem$|
|
||||
^systemvm/agent/certs/localhost\.key$|
|
||||
^systemvm/agent/certs/systemvm\.key$|
|
||||
^test/integration/smoke/test_ssl_offloading\.py$
|
||||
^systemvm/agent/certs/realhostip\.key$
|
||||
- id: end-of-file-fixer
|
||||
exclude: \.vhd$|\.svg$
|
||||
- id: file-contents-sorter
|
||||
args: [--unique]
|
||||
files: ^\.github/linters/codespell\.txt$
|
||||
- id: fix-byte-order-marker
|
||||
exclude: \.vhd$
|
||||
#- id: fix-byte-order-marker
|
||||
- id: forbid-submodules
|
||||
- id: mixed-line-ending
|
||||
exclude: \.(cs|xml)$
|
||||
- id: trailing-whitespace
|
||||
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$
|
||||
files: \.(header|in|java|md|properties|py|rb|sh|sql|txt|vue|xml|yaml|yml)$
|
||||
args: [--markdown-linebreak-ext=md]
|
||||
exclude: ^services/console-proxy/rdpconsole/src/test/doc/freerdp-debug-log\.txt$
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.4.2
|
||||
rev: v2.2.6
|
||||
hooks:
|
||||
- id: codespell
|
||||
name: run codespell
|
||||
description: Check spelling with codespell
|
||||
args: [--ignore-words=.github/linters/codespell.txt]
|
||||
exclude: ^ui/package\.json$|^ui/package-lock\.json$|^ui/public/js/less\.min\.js$|^ui/public/locales/.*[^n].*\.json$
|
||||
- repo: https://github.com/pycqa/flake8
|
||||
rev: 7.0.0
|
||||
hooks:
|
||||
- id: flake8
|
||||
args: [--config, .github/linters/.flake8]
|
||||
exclude: >
|
||||
(?x)
|
||||
^agent/bindir/cloud-setup-agent\.in$|
|
||||
^client/bindir/cloud-update-xenserver-licenses\.in$|
|
||||
^cloud-cli/bindir/cloud-tool$|
|
||||
^python/bindir/cloud-grab-dependent-library-versions$|
|
||||
^python/bindir/cloud-setup-baremetal$|
|
||||
^scripts/vm/hypervisor/xenserver/storagePlugin$|
|
||||
^scripts/vm/hypervisor/xenserver/vmopspremium$|
|
||||
^setup/bindir/cloud-setup-encryption\.in$|
|
||||
^venv/.*$
|
||||
- repo: https://github.com/igorshubovych/markdownlint-cli
|
||||
rev: v0.45.0
|
||||
rev: v0.40.0
|
||||
hooks:
|
||||
- id: markdownlint
|
||||
name: run markdownlint
|
||||
description: check Markdown files with markdownlint
|
||||
args: [--config=.github/linters/.markdown-lint.yml]
|
||||
types: [markdown]
|
||||
files: \.md$
|
||||
- repo: https://github.com/adrienverge/yamllint
|
||||
rev: v1.37.1
|
||||
hooks:
|
||||
- id: yamllint
|
||||
name: run yamllint
|
||||
description: check YAML files with yamllint
|
||||
args: [--config-file=.github/linters/.yamllint.yml]
|
||||
types: [yaml]
|
||||
files: \.ya?ml$
|
||||
exclude: ^.*k8s-.*\.ya?ml$|^.github/workflows/.*\.lock\.ya?ml$
|
||||
files: \.(md|mdown|markdown)$
|
||||
|
||||
32
AGENTS.md
32
AGENTS.md
@ -1,32 +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.
|
||||
-->
|
||||
|
||||
# Agent Guide for Apache CloudStack
|
||||
|
||||
This file is read by automated agents (security scanners, code
|
||||
analyzers, AI assistants) operating on this repository.
|
||||
|
||||
## Security
|
||||
|
||||
Security model: [SECURITY.md](./SECURITY.md)
|
||||
|
||||
Agents that scan this repository should consult `SECURITY.md` and the
|
||||
threat model it links before reporting issues.
|
||||
|
||||
The project-wide security threat model is linked from `SECURITY.md`.
|
||||
10
CHANGES.md
10
CHANGES.md
@ -242,6 +242,7 @@ Bug ID | Description
|
||||
[CLOUDSTACK-7722](https://issues.apache.org/jira/browse/CLOUDSTACK-7722) | add.label: Add button for tags show the label not "Add" text...
|
||||
[CLOUDSTACK-7246](https://issues.apache.org/jira/browse/CLOUDSTACK-7246) | VM deployment failed due to wrong in script name createipalias.sh...
|
||||
|
||||
|
||||
Version 4.4.1
|
||||
-------------
|
||||
|
||||
@ -275,6 +276,7 @@ Bug ID | Description
|
||||
[CLOUDSTACK-1632](https://issues.apache.org/jira/browse/CLOUDSTACK-1632) | Mistakes in authorizeSecurityGroup* API docs...
|
||||
[CLOUDSTACK-401](https://issues.apache.org/jira/browse/CLOUDSTACK-401) | Storage options missing from table...
|
||||
|
||||
|
||||
Version 4.4.0
|
||||
-------------
|
||||
|
||||
@ -644,12 +646,12 @@ Bug ID | Description
|
||||
Version 4.2.1
|
||||
-------------
|
||||
|
||||
Release notes contain the list of [bug fixes](https://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.1/html/Release_Notes/version-4.2.html#issues-fixed-4.2.1)
|
||||
Release notes contain the list of [bug fixes](http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.1/html/Release_Notes/version-4.2.html#issues-fixed-4.2.1)
|
||||
|
||||
Version 4.2.0
|
||||
-------------
|
||||
Released on October 1 2013.
|
||||
Release notes contain the list of [bug fixes](https://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.0/html/Release_Notes/index.html)
|
||||
Release notes contain the list of [bug fixes](http://cloudstack.apache.org/docs/en-US/Apache_CloudStack/4.2.0/html/Release_Notes/index.html)
|
||||
|
||||
Version 4.1.0
|
||||
-------------
|
||||
@ -928,6 +930,7 @@ Security Fixes:
|
||||
|
||||
* CVE-2012-4501: Apache CloudStack configuration vulnerability
|
||||
|
||||
|
||||
Version 4.0.2
|
||||
------------------------
|
||||
|
||||
@ -976,6 +979,7 @@ Issues fixed in this release:
|
||||
* CLOUDSTACK-2090: Upgrade from version 4.0.1 to version 4.0.2 triggers the 4.0.0 to 4.0.1.
|
||||
* CLOUDSTACK-2091: Error in API documentation for 4.0.x.
|
||||
|
||||
|
||||
Version 4.0.1-incubating
|
||||
------------------------
|
||||
|
||||
@ -1019,6 +1023,7 @@ Bugs fixed in this release:
|
||||
* CLOUDSTACK-961: Installation docs don't detail dependencies for building RPMs
|
||||
* CLOUDSTACK-995: Not able to add the KVM host
|
||||
|
||||
|
||||
Version 4.0.0-incubating
|
||||
------------------------
|
||||
|
||||
@ -1051,6 +1056,7 @@ Security Fixes:
|
||||
|
||||
* CVE-2012-4501: Apache CloudStack configuration vulnerability
|
||||
|
||||
|
||||
Updating this file
|
||||
------------------
|
||||
|
||||
|
||||
@ -1,79 +1,46 @@
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
# Contributing to Apache CloudStack (ACS)
|
||||
|
||||
## 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
|
||||
Contributing to Apache CloudStack (ACS)
|
||||
=======================================
|
||||
|
||||
Summary
|
||||
-------
|
||||
This document covers how to contribute to the ACS project. ACS uses GitHub PRs to manage code contributions.
|
||||
These instructions assume you have a GitHub.com account, so if you don't have one you will have to create one. Your proposed code changes will be published to your own fork of the ACS project, and you will submit a Pull Request for your changes to be added.
|
||||
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.
|
||||
|
||||
_Let's get started!!!_
|
||||
_Lets get started!!!_
|
||||
|
||||
## Bug fixes
|
||||
Bug fixes
|
||||
---------
|
||||
|
||||
It's very important that we can easily track bug fix commits, so their hashes should remain the same in all branches.
|
||||
Therefore, a pull request (PR) that fixes a bug, should be sent against a release branch.
|
||||
This can be either the "current release" or the "previous release", depending on which ones are maintained.
|
||||
Since the goal is a stable main, bug fixes should be "merged forward" to the next branch in order: "previous release" -> "current release" -> main (in other words: old to new)
|
||||
|
||||
## Developing new features
|
||||
Developing new features
|
||||
-----------------------
|
||||
|
||||
Development should be done in a feature branch, branched off of main.
|
||||
Send a PR(steps below) to get it into main (2x LGTM applies).
|
||||
PR will only be merged when main is open, will be held otherwise until main is open again.
|
||||
No back porting / cherry-picking features to existing branches!
|
||||
|
||||
## PendingReleaseNotes file
|
||||
|
||||
When developing a new feature or making a (major) change to an existing feature you are encouraged to append this to the PendingReleaseNotes file so that the Release Manager can
|
||||
PendingReleaseNotes file
|
||||
------------------------
|
||||
When developing a new feature or making a (major) change to a existing feature you are encouraged to append this to the PendingReleaseNotes file so that the Release Manager can
|
||||
use this file as a source of information when compiling the Release Notes for a new release.
|
||||
|
||||
When adding information to the PendingReleaseNotes file make sure that you write a good and understandable description of the new feature or change which you have developed.
|
||||
|
||||
Updating the PendingReleaseNotes file is preferably a part of the original Pull Request, but that is up to the developers' discretion.
|
||||
|
||||
## Fork the code
|
||||
Fork the code
|
||||
-------------
|
||||
|
||||
In your browser, navigate to: [https://github.com/apache/cloudstack](https://github.com/apache/cloudstack)
|
||||
|
||||
Fork the repository by clicking on the 'Fork' button on the top right hand side. The fork will happen, and you will be taken to your own fork of the repository. Copy the Git repository URL by clicking on the clipboard next to the URL on the right hand side of the page under '**HTTPS** clone URL'. You will paste this URL when doing the following `git clone` command.
|
||||
Fork the repository by clicking on the 'Fork' button on the top right hand side. The fork will happen and you will be taken to your own fork of the repository. Copy the Git repository URL by clicking on the clipboard next to the URL on the right hand side of the page under '**HTTPS** clone URL'. You will paste this URL when doing the following `git clone` command.
|
||||
|
||||
On your computer, follow these steps to set up a local repository for working on ACS:
|
||||
On your computer, follow these steps to setup a local repository for working on ACS:
|
||||
|
||||
```bash
|
||||
$ git clone https://github.com/YOUR_ACCOUNT/cloudstack.git
|
||||
@ -84,7 +51,10 @@ $ git fetch upstream
|
||||
$ git rebase upstream/main
|
||||
```
|
||||
|
||||
## Making changes
|
||||
|
||||
Making changes
|
||||
--------------
|
||||
|
||||
|
||||
It is important that you create a new branch to make changes on and that you do not change the `main` branch (other than to rebase in changes from `upstream/main`). In this example I will assume you will be making your changes to a branch called `feature_x`. This `feature_x` branch will be created on your local repository and will be pushed to your forked repository on GitHub. Once this branch is on your fork you will create a Pull Request for the changes to be added to the ACS project.
|
||||
|
||||
@ -100,7 +70,9 @@ $ git commit -a -m "descriptive commit message for your changes"
|
||||
|
||||
> The `-b` specifies that you want to create a new branch called `feature_x`. You only specify `-b` the first time you checkout because you are creating a new branch. Once the `feature_x` branch exists, you can later switch to it with only `git checkout feature_x`.
|
||||
|
||||
## Rebase `feature_x` to include updates from `upstream/main`
|
||||
|
||||
Rebase `feature_x` to include updates from `upstream/main`
|
||||
------------------------------------------------------------
|
||||
|
||||
It is important that you maintain an up-to-date `main` branch in your local repository. This is done by rebasing in the code changes from `upstream/main` (the official ACS project repository) into your local repository. You will want to do this before you start working on a feature as well as right before you submit your changes as a pull request. I recommend you do this process periodically while you work to make sure you are working off the most recent project code.
|
||||
|
||||
@ -120,11 +92,13 @@ $ git rebase main
|
||||
|
||||
> Now your `feature_x` branch is up-to-date with all the code in `upstream/main`.
|
||||
|
||||
## Make a GitHub Pull Request to contribute your changes
|
||||
|
||||
When you are happy with your changes, and you are ready to contribute them, you will create a Pull Request on GitHub to do so. This is done by pushing your local changes to your forked repository (default remote name is `origin`) and then initiating a pull request on GitHub.
|
||||
Make a GitHub Pull Request to contribute your changes
|
||||
-----------------------------------------------------
|
||||
|
||||
Please include JIRA id, detailed information about the bug/feature, what all tests are executed, how the reviewer can test this feature etc. In case of UI PRs, a screenshot is preferred.
|
||||
When you are happy with your changes and you are ready to contribute them, you will create a Pull Request on GitHub to do so. This is done by pushing your local changes to your forked repository (default remote name is `origin`) and then initiating a pull request on GitHub.
|
||||
|
||||
Please include JIRA id, detailed information about the bug/feature, what all tests are executed, how the reviewer can test this feature etc. Incase of UI PRs, a screenshot is preferred.
|
||||
|
||||
> **IMPORTANT:** Make sure you have rebased your `feature_x` branch to include the latest code from `upstream/main` _before_ you do this.
|
||||
|
||||
@ -133,7 +107,7 @@ $ git push origin main
|
||||
$ git push origin feature_x
|
||||
```
|
||||
|
||||
Now that the `feature_x` branch has been pushed to your GitHub repository, you can initiate the pull request.
|
||||
Now that the `feature_x` branch has been pushed to your GitHub repository, you can initiate the pull request.
|
||||
|
||||
To initiate the pull request, do the following:
|
||||
|
||||
@ -144,7 +118,9 @@ To initiate the pull request, do the following:
|
||||
|
||||
If you are requested to make modifications to your proposed changes, make the changes locally on your `feature_x` branch, re-push the `feature_x` branch to your fork. The existing pull request should automatically pick up the change and update accordingly.
|
||||
|
||||
## Cleaning up after a successful pull request
|
||||
|
||||
Cleaning up after a successful pull request
|
||||
-------------------------------------------
|
||||
|
||||
Once the `feature_x` branch has been committed into the `upstream/main` branch, your local `feature_x` branch and the `origin/feature_x` branch are no longer needed. If you want to make additional changes, restart the process with a new branch.
|
||||
|
||||
@ -158,6 +134,6 @@ $ git branch -D feature_x
|
||||
$ git push origin :feature_x
|
||||
```
|
||||
|
||||
## Release Principles
|
||||
|
||||
Release Principles
|
||||
------------------
|
||||
Detailed information about ACS release principles is available at https://cwiki.apache.org/confluence/display/CLOUDSTACK/Release+principles+for+Apache+CloudStack+4.6+and+up
|
||||
|
||||
82
INSTALL.md
82
INSTALL.md
@ -1,46 +1,15 @@
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
# Apache CloudStack Installation basics
|
||||
|
||||
This document describes how to develop, build, package and install Apache
|
||||
CloudStack. For more information please refer to the official [documentation](https://docs.cloudstack.apache.org)
|
||||
CloudStack. For more information please refer to the official [documentation](http://docs.cloudstack.apache.org)
|
||||
or the developer [wiki](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Home).
|
||||
|
||||
Apache CloudStack developers use various platforms for development, this guide
|
||||
was tested against a CentOS 7 x86_64 setup.
|
||||
|
||||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
|
||||
- [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](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment) for Apache CloudStack.
|
||||
* [Building](https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+CloudStack) Apache CloudStack.
|
||||
* [Appliance based development](https://github.com/rhtyd/monkeybox)
|
||||
|
||||
## Setting up Development Environment
|
||||
|
||||
@ -49,30 +18,29 @@ Install tools and dependencies used for development:
|
||||
# yum -y install git java-17-openjdk java-17-openjdk-devel \
|
||||
mysql mysql-server mkisofs git gcc python MySQL-python openssh-clients wget
|
||||
|
||||
Set up Maven (3.9.10):
|
||||
Set up Maven (3.6.0):
|
||||
|
||||
# wget https://dlcdn.apache.org/maven/maven-3/3.9.10/binaries/apache-maven-3.9.10-bin.tar.gz
|
||||
# sudo tar -zxvf apache-maven-3.9.10-bin.tar.gz -C /usr/local
|
||||
# wget http://www.us.apache.org/dist/maven/maven-3/3.6.3/binaries/apache-maven-3.6.3-bin.tar.gz
|
||||
# tar -zxvf apache-maven-3.6.3-bin.tar.gz -C /usr/local
|
||||
# cd /usr/local
|
||||
# sudo ln -s apache-maven-3.9.10 maven
|
||||
# ln -s apache-maven-3.6.3 maven
|
||||
# echo export M2_HOME=/usr/local/maven >> ~/.bashrc # or .zshrc or .profile
|
||||
# echo export PATH=/usr/local/maven/bin:${PATH} >> ~/.bashrc # or .zshrc or .profile
|
||||
# source ~/.bashrc
|
||||
|
||||
Setup up Node.js 16:
|
||||
Setup up NodeJS (LTS):
|
||||
|
||||
# curl -sL https://rpm.nodesource.com/setup_16.x | sudo -E bash -
|
||||
# curl -sL https://rpm.nodesource.com/setup_12.x | sudo bash -
|
||||
# sudo yum install nodejs
|
||||
# sudo npm install -g @vue/cli npm-check-updates
|
||||
|
||||
Start the MySQL service:
|
||||
|
||||
$ service mysqld start
|
||||
$ mysql_secure_installation
|
||||
|
||||
### Using jenv and/or pyenv for Version Management
|
||||
|
||||
CloudStack is built using Java and Python. To make selection of these tools versions more consistent and ease installation for developers, optional support for [jenv](http://www.jenv.be/) and [pyenv](https://github.com/yyuu/pyenv) with [virtualenv]|(https://github.com/yyuu/pyenv-virtualenv) is provided. jenv installation instructions are available here and pyenv installation instructions are available here. For users of [oh-my-zsh](https://ohmyz.sh/) there is a pyenv plugin available to trigger configuration of pyenv in a shell session.
|
||||
CloudStack is built using Java and Python. To make selection of these tools versions more consistent and ease installation for developers, optional support for [jenv](http://www.jenv.be/) and [pyenv](https://github.com/yyuu/pyenv) with [virtualenv]|(https://github.com/yyuu/pyenv-virtualenv) is provided. jenv installation instructions are available here and pyenv installation instructions are available here. For users of [oh-my-zsh](http://ohmyz.sh/) there is a pyenv plugin available to trigger configuration of pyenv in a shell session.
|
||||
|
||||
Following installation, execute the following commands to configure jenv and pyenv for use with CloudStack development:
|
||||
|
||||
@ -118,33 +86,13 @@ Start the management server:
|
||||
|
||||
If this works, you've successfully setup a single server Apache CloudStack installation.
|
||||
|
||||
To access the Management Server UI, follow the following procedure:
|
||||
Open the following URL on your browser to access the Management Server UI:
|
||||
|
||||
http://localhost:8080/client/
|
||||
|
||||
The default credentials are; user: admin, password: password and the domain
|
||||
field should be left blank which is defaulted to the ROOT domain.
|
||||
|
||||
## To bring up CloudStack UI
|
||||
|
||||
Move to UI Directory
|
||||
|
||||
$ cd /path/to/cloudstack/ui
|
||||
|
||||
To install dependencies.
|
||||
|
||||
$ npm install
|
||||
|
||||
To build the project.
|
||||
|
||||
$ npm run build
|
||||
|
||||
For Development Mode.
|
||||
|
||||
$ npm start
|
||||
|
||||
Make sure to set `CS_URL=http://localhost:8080` on the `.env.local` file on UI.
|
||||
|
||||
You should be able to run the management server on http://localhost:5050
|
||||
|
||||
## Building with non-redistributable plugins
|
||||
|
||||
CloudStack supports several plugins that depend on libraries with distribution restrictions.
|
||||
@ -202,7 +150,7 @@ All the rpm packages will be created in `dist/rpmbuild/RPMS/x86_64` directory.
|
||||
|
||||
## Notes
|
||||
|
||||
If you will be using Xen as your hypervisor, please download [vhd-util](https://download.cloudstack.org/tools/vhd-util)
|
||||
If you will be using Xen as your hypervisor, please download [vhd-util](http://download.cloudstack.org/tools/vhd-util)
|
||||
|
||||
If management server is installed on RHEL/CentOS, then copy vhd-util into:
|
||||
|
||||
|
||||
@ -35,14 +35,17 @@ New line separated list of affected versions, commit ID for issues on main branc
|
||||
Information about the configuration if relevant, e.g. basic network, advanced networking, etc. N/A otherwise
|
||||
-->
|
||||
|
||||
|
||||
##### OS / ENVIRONMENT
|
||||
<!--
|
||||
Information about the environment if relevant, N/A otherwise
|
||||
-->
|
||||
|
||||
|
||||
##### SUMMARY
|
||||
<!-- Explain the problem/feature briefly -->
|
||||
|
||||
|
||||
##### STEPS TO REPRODUCE
|
||||
<!--
|
||||
For bugs, show exactly how to reproduce the problem, using a minimal test-case. Use Screenshots if accurate.
|
||||
|
||||
242
LICENSE
242
LICENSE
@ -177,14 +177,14 @@ Copyright (c) 2014 The Apache Software Foundation
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
|
||||
This distribution contains third party resources.
|
||||
Within the console-proxy/js directory
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
Copyright (c) 2009, John Resig
|
||||
|
||||
Copyright (c) 2009, John Resig
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
@ -192,10 +192,10 @@ Within the console-proxy/js directory
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
@ -203,43 +203,43 @@ Within the console-proxy/js directory
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from John Resig
|
||||
jquery.js
|
||||
|
||||
from John Resig
|
||||
jquery.js
|
||||
|
||||
|
||||
Within the systemvm/debian/etc directory
|
||||
placed in the public domain
|
||||
by Adiscon GmbH http://www.adiscon.com/
|
||||
rsyslog.conf
|
||||
by Simon Kelley
|
||||
dnsmasq.conf
|
||||
vpcdnsmasq.conf
|
||||
by Adiscon GmbH http://www.adiscon.com/
|
||||
rsyslog.conf
|
||||
by Simon Kelley
|
||||
dnsmasq.conf
|
||||
vpcdnsmasq.conf
|
||||
|
||||
Within the systemvm/debian/etc/apache2 directory
|
||||
licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above)
|
||||
Copyright (c) 2012 The Apache Software Foundation
|
||||
from The Apache Software Foundation http://www.apache.org/
|
||||
httpd.conf
|
||||
from The Apache Software Foundation http://www.apache.org/
|
||||
httpd.conf
|
||||
vhost.template
|
||||
|
||||
Within the systemvm/debian/etc/ssh/ directory
|
||||
licensed under the BSD (2-clause) http://www.opensource.org/licenses/BSD-2-Clause (as follows)
|
||||
|
||||
|
||||
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer. Redistributions in binary form must
|
||||
reproduce the above copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
|
||||
Neither the name of the author nor the names of contributors may be used to
|
||||
endorse or promote products derived from this software without specific prior
|
||||
written permission.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
@ -250,55 +250,55 @@ Within the systemvm/debian/etc/ssh/ directory
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from OpenSSH Project http://www.openssh.org/
|
||||
sshd_config
|
||||
|
||||
from OpenSSH Project http://www.openssh.org/
|
||||
sshd_config
|
||||
|
||||
Within the systemvm/debian/root/redundant_router directory
|
||||
placed in the public domain
|
||||
by The netfilter.org project http://www.netfilter.org/
|
||||
conntrackd.conf.templ
|
||||
by The netfilter.org project http://www.netfilter.org/
|
||||
conntrackd.conf.templ
|
||||
|
||||
Within the scripts/storage/secondary directory
|
||||
licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above)
|
||||
Copyright (c) 2010-2011 OpenStack, LLC.
|
||||
from OpenStack, LLC http://www.openstack.org
|
||||
swift
|
||||
from OpenStack, LLC http://www.openstack.org
|
||||
swift
|
||||
|
||||
Within the scripts/vm/hypervisor/xenserver directory
|
||||
licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above)
|
||||
Copyright (c) 2010-2011 OpenStack, LLC.
|
||||
from OpenStack, LLC http://www.openstack.org
|
||||
swift
|
||||
from OpenStack, LLC http://www.openstack.org
|
||||
swift
|
||||
|
||||
Within the ui/lib directory
|
||||
placed in the public domain
|
||||
by Eric Meyer http://meyerweb.com/eric/
|
||||
by Eric Meyer http://meyerweb.com/eric/
|
||||
reset.css from http://meyerweb.com/eric/tools/css/reset/
|
||||
|
||||
licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above)
|
||||
Copyright (c) 2006 Google Inc.
|
||||
from Google Inc. http://google.com
|
||||
from Google Inc. http://google.com
|
||||
excanvas.js from http://code.google.com/p/explorercanvas/
|
||||
|
||||
licensed under the BSD (2-clause) http://www.opensource.org/licenses/BSD-2-Clause (as follows)
|
||||
|
||||
Copyright (c) 2008 George McGinley Smith
|
||||
All rights reserved.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
|
||||
Redistributions of source code must retain the above copyright notice, this list
|
||||
of conditions and the following disclaimer. Redistributions in binary form must
|
||||
reproduce the above copyright notice, this list of conditions and the following
|
||||
disclaimer in the documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
|
||||
Neither the name of the author nor the names of contributors may be used to
|
||||
endorse or promote products derived from this software without specific prior
|
||||
written permission.
|
||||
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
@ -309,13 +309,13 @@ Within the ui/lib directory
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
from George McGinley Smith
|
||||
jquery.easing.js
|
||||
|
||||
from George McGinley Smith
|
||||
jquery.easing.js
|
||||
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
|
||||
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
@ -323,10 +323,10 @@ Within the ui/lib directory
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
@ -334,14 +334,14 @@ Within the ui/lib directory
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from The Dojo Foundation http://dojofoundation.org/
|
||||
|
||||
from The Dojo Foundation http://dojofoundation.org/
|
||||
require.js from http://github.com/jrburke/requirejs
|
||||
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
Copyright (c) 2011, John Resig
|
||||
|
||||
Copyright (c) 2011, John Resig
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
@ -349,10 +349,10 @@ Within the ui/lib directory
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
@ -360,14 +360,14 @@ Within the ui/lib directory
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from John Resig
|
||||
jquery.js
|
||||
|
||||
from John Resig
|
||||
jquery.js
|
||||
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
Copyright (c) 2014 Jörn Zaefferer
|
||||
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
@ -375,10 +375,10 @@ Within the ui/lib directory
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
@ -386,9 +386,9 @@ Within the ui/lib directory
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from Jorn Zaefferer
|
||||
jquery.validate.js
|
||||
|
||||
from Jorn Zaefferer
|
||||
jquery.validate.js
|
||||
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
@ -418,8 +418,8 @@ Within the ui/lib directory
|
||||
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
Copyright (c) 2010, Sebastian Tschan
|
||||
|
||||
Copyright (c) 2010, Sebastian Tschan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
@ -427,10 +427,10 @@ Within the ui/lib directory
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
@ -438,14 +438,14 @@ Within the ui/lib directory
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from Sebastian Tschan https://blueimp.net
|
||||
jquery.md5.js
|
||||
|
||||
from Sebastian Tschan https://blueimp.net
|
||||
jquery.md5.js
|
||||
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
Copyright (c) 2006 Klaus Hartl (stilbuero.de)
|
||||
|
||||
Copyright (c) 2006 Klaus Hartl (stilbuero.de)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
@ -453,10 +453,10 @@ Within the ui/lib directory
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
@ -464,15 +464,15 @@ Within the ui/lib directory
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from Klaus Hartl http://stilbuero.de
|
||||
jquery.cookies.js
|
||||
|
||||
from Klaus Hartl http://stilbuero.de
|
||||
jquery.cookies.js
|
||||
|
||||
Within the ui/lib/flot directory
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
Released under the MIT license by IOLA, December 2007.
|
||||
|
||||
Released under the MIT license by IOLA, December 2007.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
@ -480,10 +480,10 @@ Within the ui/lib/flot directory
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
@ -491,24 +491,24 @@ Within the ui/lib/flot directory
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from IOLA http://www.iola.dk/
|
||||
jquery.flot.crosshair.js
|
||||
jquery.flot.fillbetween.js
|
||||
jquery.flot.image.js
|
||||
jquery.flot.js
|
||||
jquery.flot.navigate.js
|
||||
jquery.flot.resize.js
|
||||
jquery.flot.selection.js
|
||||
jquery.flot.stack.js
|
||||
jquery.flot.symbol.js
|
||||
jquery.flot.threshold.js
|
||||
|
||||
from IOLA http://www.iola.dk/
|
||||
jquery.flot.crosshair.js
|
||||
jquery.flot.fillbetween.js
|
||||
jquery.flot.image.js
|
||||
jquery.flot.js
|
||||
jquery.flot.navigate.js
|
||||
jquery.flot.resize.js
|
||||
jquery.flot.selection.js
|
||||
jquery.flot.stack.js
|
||||
jquery.flot.symbol.js
|
||||
jquery.flot.threshold.js
|
||||
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
Created by Brian Medendorp, June 2009
|
||||
Updated November 2009 with contributions from: btburnett3, Anthony Aragues and Xavi Ivars
|
||||
|
||||
Updated November 2009 with contributions from: btburnett3, Anthony Aragues and Xavi Ivars
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
@ -516,10 +516,10 @@ Within the ui/lib/flot directory
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
@ -527,13 +527,13 @@ Within the ui/lib/flot directory
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from Brian Medendorp
|
||||
jquery.pie.js
|
||||
|
||||
from Brian Medendorp
|
||||
jquery.pie.js
|
||||
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
|
||||
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
@ -541,10 +541,10 @@ Within the ui/lib/flot directory
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
@ -552,14 +552,14 @@ Within the ui/lib/flot directory
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from Ole Laursen
|
||||
jquery.colorhelpers.js
|
||||
|
||||
from Ole Laursen
|
||||
jquery.colorhelpers.js
|
||||
|
||||
Within the ui/lib/jquery-ui directory
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
|
||||
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
@ -567,10 +567,10 @@ Within the ui/lib/jquery-ui directory
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
@ -578,17 +578,17 @@ Within the ui/lib/jquery-ui directory
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from jQuery UI Developers http://jqueryui.com/about
|
||||
css/jquery-ui.css
|
||||
index.html
|
||||
js/jquery-ui.js
|
||||
|
||||
from jQuery UI Developers http://jqueryui.com/about
|
||||
css/jquery-ui.css
|
||||
index.html
|
||||
js/jquery-ui.js
|
||||
|
||||
Within the ui/lib/qunit directory
|
||||
licensed under the MIT License http://www.opensource.org/licenses/mit-license.php (as follows)
|
||||
|
||||
Copyright (c) 2012 John Resig, Jörn Zaefferer
|
||||
|
||||
Copyright (c) 2012 John Resig, Jörn Zaefferer
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
@ -596,10 +596,10 @@ Within the ui/lib/qunit directory
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
@ -607,20 +607,20 @@ Within the ui/lib/qunit directory
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
from Jorn Zaefferer
|
||||
|
||||
from Jorn Zaefferer
|
||||
qunit.css from http://docs.jquery.com/QUnit
|
||||
qunit.js from http://docs.jquery.com/QUnit
|
||||
|
||||
Within the utils/src/main/java/com/cloud/utils/db directory
|
||||
licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above)
|
||||
Copyright (c) 2004 Clinton Begin
|
||||
from Clinton Begin http://code.google.com/p/mybatis/
|
||||
from Clinton Begin http://code.google.com/p/mybatis/
|
||||
ScriptRunner.java from http://code.google.com/p/mybatis/
|
||||
|
||||
Within the utils/src/main/java/org/apache/commons/httpclient/contrib/ssl directory
|
||||
licensed under the Apache License, Version 2 http://www.apache.org/licenses/LICENSE-2.0.txt (as above)
|
||||
Copyright (c) 2007 The Apache Software Foundation
|
||||
from The Apache Software Foundation http://www.apache.org/
|
||||
EasySSLProtocolSocketFactory.java
|
||||
EasyX509TrustManager.java
|
||||
from The Apache Software Foundation http://www.apache.org/
|
||||
EasySSLProtocolSocketFactory.java
|
||||
EasyX509TrustManager.java
|
||||
|
||||
52
NOTICE
52
NOTICE
@ -1,62 +1,62 @@
|
||||
Apache CloudStack
|
||||
Copyright 2014 The Apache Software Foundation
|
||||
|
||||
|
||||
This product includes software developed at
|
||||
The Apache Software Foundation (http://www.apache.org/).
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
This distribution contains third party resources requiring the following notices:
|
||||
|
||||
|
||||
For
|
||||
|
||||
For
|
||||
jquery.js
|
||||
|
||||
|
||||
|
||||
jQuery JavaScript Library v1.3.2
|
||||
http://jquery.com/
|
||||
|
||||
|
||||
Copyright (c) 2009 John Resig
|
||||
Dual licensed under the MIT and GPL licenses.
|
||||
http://docs.jquery.com/License
|
||||
|
||||
|
||||
Date: 2009-02-19 17:34:21 -0500 (Thu, 19 Feb 2009)
|
||||
Revision: 6246
|
||||
|
||||
|
||||
For
|
||||
|
||||
For
|
||||
jquery.js
|
||||
|
||||
|
||||
|
||||
jQuery JavaScript Library v1.6.4
|
||||
http://jquery.com/
|
||||
|
||||
|
||||
Copyright 2011, John Resig
|
||||
Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
http://jquery.org/license
|
||||
|
||||
|
||||
Includes Sizzle.js
|
||||
http://sizzlejs.com/
|
||||
Copyright 2011, The Dojo Foundation
|
||||
Released under the MIT, BSD, and GPL Licenses.
|
||||
|
||||
|
||||
Date: Mon Sep 12 18:54:48 2011 -0400
|
||||
|
||||
|
||||
For
|
||||
|
||||
For
|
||||
jquery.md5.js
|
||||
|
||||
|
||||
|
||||
jQuery MD5 Plugin 1.2.1
|
||||
https://github.com/blueimp/jQuery-MD5
|
||||
|
||||
|
||||
Copyright 2010, Sebastian Tschan
|
||||
https://blueimp.net
|
||||
|
||||
|
||||
Licensed under the MIT license:
|
||||
http://creativecommons.org/licenses/MIT/
|
||||
|
||||
|
||||
Based on
|
||||
A JavaScript implementation of the RSA Data Security, Inc. MD5 Message
|
||||
Digest Algorithm, as defined in RFC 1321.
|
||||
@ -65,15 +65,15 @@ Copyright 2014 The Apache Software Foundation
|
||||
Distributed under the BSD License
|
||||
See http://pajhome.org.uk/crypt/md5 for more info.
|
||||
|
||||
|
||||
For
|
||||
|
||||
For
|
||||
jquery.colorhelpers.js
|
||||
|
||||
|
||||
|
||||
Plugin for jQuery for working with colors.
|
||||
|
||||
|
||||
Version 1.1.
|
||||
|
||||
|
||||
Inspiration from jQuery color animation plugin by John Resig.
|
||||
|
||||
|
||||
Released under the MIT license by Ole Laursen, October 2009.
|
||||
|
||||
@ -1,62 +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.
|
||||
-->
|
||||
|
||||
# pre-commit
|
||||
|
||||
We run [pre-commit](https://pre-commit.com/) with
|
||||
[GitHub Actions](https://github.com/apache/cloudstack/blob/main/.github/workflows/pre-commit.yml) so installation on your
|
||||
local machine is currently optional.
|
||||
|
||||
The `pre-commit` [configuration file](https://github.com/apache/cloudstack/blob/main/.pre-commit-config.yaml)
|
||||
is in the repository root. Before you can run the hooks, you need to have `pre-commit` installed. `pre-commit` is a
|
||||
[Python package](https://pypi.org/project/pre-commit/).
|
||||
|
||||
From the repository root run: `pip install -r requirements-dev.txt` to install `pre-commit` and after you install
|
||||
`pre-commit` you will then need to install the pre-commit hooks by running `pre-commit install`.
|
||||
|
||||
The hooks run when running `git commit` and also from the command line with `pre-commit`. Some of the hooks will auto
|
||||
fix the code after the hooks fail whilst most will print error messages from the linters. If a hook fails the overall
|
||||
commit will fail, and you will need to fix the issues or problems and `git add` and `git commit` again. On `git commit`
|
||||
the hooks will run mostly only against modified files so if you want to test all hooks against all files and when you
|
||||
are adding a new hook you should always run:
|
||||
|
||||
`pre-commit run --all-files`
|
||||
|
||||
Sometimes you might need to skip a hook to commit because the hook is stopping you from committing or your computer
|
||||
might not have all the installation requirements for all the hooks. The `SKIP` variable is comma separated for two or
|
||||
more hooks:
|
||||
|
||||
`SKIP=codespell git commit -m "foo"`
|
||||
|
||||
The same applies when running pre-commit:
|
||||
|
||||
`SKIP=codespell pre-commit run --all-files`
|
||||
|
||||
Occasionally you can have more serious problems when using `pre-commit` with `git commit`. You can use `--no-verify` to
|
||||
commit and stop `pre-commit` from checking the hooks. For example:
|
||||
|
||||
`git commit --no-verify -m "foo"`
|
||||
|
||||
If you are having major problems using `pre-commit` you can always uninstall it.
|
||||
|
||||
To run a single hook use `pre-commit run --all-files <hook_id>`
|
||||
|
||||
For example just run the `codespell` hook:
|
||||
|
||||
`pre-commit run --all-files codespell`
|
||||
@ -22,8 +22,8 @@ This PR...
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] Enhancement (improves an existing feature and functionality)
|
||||
- [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
|
||||
- [ ] Build/CI
|
||||
- [ ] Test (unit or integration test code)
|
||||
- [ ] build/CI
|
||||
- [ ] test (unit or integration test code)
|
||||
|
||||
### Feature/Enhancement Scale or Bug Severity
|
||||
|
||||
@ -40,8 +40,10 @@ This PR...
|
||||
- [ ] Minor
|
||||
- [ ] Trivial
|
||||
|
||||
|
||||
### Screenshots (if appropriate):
|
||||
|
||||
|
||||
### How Has This Been Tested?
|
||||
|
||||
<!-- Please describe in detail how you tested your changes. -->
|
||||
@ -51,4 +53,5 @@ This PR...
|
||||
|
||||
<!-- see how your change affects other areas of the code, etc. -->
|
||||
|
||||
|
||||
<!-- Please read the [CONTRIBUTING](https://github.com/apache/cloudstack/blob/main/CONTRIBUTING.md) document -->
|
||||
|
||||
69
README.md
69
README.md
@ -1,54 +1,7 @@
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
# Apache CloudStack
|
||||
|
||||
[](https://github.com/apache/cloudstack/actions/workflows/build.yml)
|
||||
[](https://codecov.io/gh/apache/cloudstack)
|
||||
[](https://github.com/apache/cloudstack/actions/workflows/docker-cloudstack-simulator.yml)
|
||||
[](https://github.com/apache/cloudstack/actions/workflows/rat.yml)
|
||||
[](https://github.com/apache/cloudstack/actions/workflows/linter.yml)
|
||||
[](https://github.com/apache/cloudstack/actions/workflows/merge-conflict-checker.yml)
|
||||
[](https://sonarcloud.io/dashboard?id=apache_cloudstack)
|
||||
[](https://github.com/apache/cloudstack/actions/workflows/ci.yml)
|
||||
[](https://github.com/apache/cloudstack/actions/workflows/ui.yml)
|
||||
# Apache CloudStack [](https://github.com/apache/cloudstack/actions/workflows/build.yml) [](https://github.com/apache/cloudstack/actions/workflows/ui.yml) [](https://github.com/apache/cloudstack/actions/workflows/rat.yml) [](https://github.com/apache/cloudstack/actions/workflows/ci.yml) [](https://sonarcloud.io/dashboard?id=apache_cloudstack) [](https://codecov.io/gh/apache/cloudstack)
|
||||
|
||||
[](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
|
||||
networks of virtual machines, as a highly available, highly scalable
|
||||
Infrastructure as a Service (IaaS) cloud computing platform. CloudStack is used
|
||||
@ -68,7 +21,7 @@ OVM and LXC containers.
|
||||
Users can manage their cloud with an easy to use Web interface, command line
|
||||
tools, and/or a full-featured query based API.
|
||||
|
||||
For more information on Apache CloudStack, please visit the [website](https://cloudstack.apache.org)
|
||||
For more information on Apache CloudStack, please visit the [website](http://cloudstack.apache.org)
|
||||
|
||||
## Who Uses CloudStack?
|
||||
|
||||
@ -125,10 +78,10 @@ via GitHub pull requests.
|
||||
## Getting Involved and Contributing
|
||||
|
||||
Interested in helping out with Apache CloudStack? Great! We welcome
|
||||
participation from anybody willing to work [The Apache Way](https://theapacheway.com) and make a
|
||||
participation from anybody willing to work [The Apache Way](http://theapacheway.com) and make a
|
||||
contribution. Note that you do not have to be a developer in order to contribute
|
||||
to Apache CloudStack. We need folks to help with documentation, translation,
|
||||
promotion etc. See our contribution [page](https://cloudstack.apache.org/contribute.html).
|
||||
promotion etc. See our contribution [page](http://cloudstack.apache.org/contribute.html).
|
||||
|
||||
If you are a frequent contributors, you can request to be added as collaborators
|
||||
(see https://cwiki.apache.org/confluence/display/INFRA/Git+-+.asf.yaml+features#Git.asf.yamlfeatures-AssigningexternalcollaboratorswiththetriageroleonGitHub)
|
||||
@ -139,7 +92,7 @@ You may do so by sharing your GitHub users ID or raise a GitHub issue.
|
||||
|
||||
If you're interested in learning more or participating in the Apache CloudStack
|
||||
project, the mailing lists are the best way to do that. While the project has
|
||||
several communications channels, the [mailing lists](https://cloudstack.apache.org/mailing-lists.html) are the most active and the
|
||||
several communications channels, the [mailing lists](http://cloudstack.apache.org/mailing-lists.html) are the most active and the
|
||||
official channels for making decisions about the project itself.
|
||||
|
||||
Mailing lists:
|
||||
@ -159,7 +112,7 @@ released version of CloudStack, please report it to `security@apache.org` with
|
||||
details about the vulnerability, how it might be exploited, and any additional
|
||||
information that might be useful.
|
||||
|
||||
For more details, please visit our security [page](https://cloudstack.apache.org/security.html).
|
||||
For more details, please visit our security [page](http://cloudstack.apache.org/security.html).
|
||||
|
||||
## License
|
||||
|
||||
@ -203,15 +156,7 @@ Unrestricted (TSU) exception (see the BIS Export Administration Regulations, Sec
|
||||
The following provides more details on the included cryptographic software:
|
||||
|
||||
* CloudStack makes use of JaSypt cryptographic libraries.
|
||||
* CloudStack requires a MySQL-compatible database (MariaDB or MySQL), and uses native database encryption functionality.
|
||||
* CloudStack has a system requirement of MySQL, and uses native database encryption functionality.
|
||||
* CloudStack makes use of the Bouncy Castle general-purpose encryption library.
|
||||
* CloudStack can optionally interact with and control OpenSwan-based VPNs.
|
||||
* CloudStack has a dependency on and makes use of JSch - a java SSH2 implementation.
|
||||
|
||||
## Star History
|
||||
|
||||
[](https://www.star-history.com/#apache/cloudstack&Date)
|
||||
|
||||
## Contributors
|
||||
|
||||
[](https://github.com/apache/cloudstack/graphs/contributors)
|
||||
|
||||
34
SECURITY.md
34
SECURITY.md
@ -1,34 +0,0 @@
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
# Security Policy
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
`apache/cloudstack` follows the [Apache Software Foundation security process](https://www.apache.org/security/). Please report suspected
|
||||
vulnerabilities privately to `security@apache.org`; do not open public GitHub issues or pull requests for security reports.
|
||||
|
||||
For more details, see https://cloudstack.apache.org/security.html.
|
||||
|
||||
## Threat Model
|
||||
|
||||
What the project treats as in scope and out of scope, the security
|
||||
properties it provides and disclaims, the adversary model, and how
|
||||
findings are triaged are documented in the project-wide threat model:
|
||||
[THREAT_MODEL.md](THREAT_MODEL.md).
|
||||
1148
THREAT_MODEL.md
1148
THREAT_MODEL.md
File diff suppressed because it is too large
Load Diff
@ -35,7 +35,7 @@ for pythonpath in (
|
||||
|
||||
from cloudutils.cloudException import CloudRuntimeException, CloudInternalException
|
||||
from cloudutils.utilities import initLoging, bash
|
||||
from cloudutils.configFileOps import configFileOps
|
||||
from cloudutils.configFileOps import configFileOps
|
||||
from cloudutils.globalEnv import globalEnv
|
||||
from cloudutils.networkConfig import networkConfig
|
||||
from cloudutils.syscfg import sysConfigFactory
|
||||
@ -43,41 +43,35 @@ from cloudutils.serviceConfig import configureLibvirtConfig, configure_libvirt_t
|
||||
|
||||
from optparse import OptionParser
|
||||
|
||||
|
||||
def getUserInputs():
|
||||
print("Welcome to the CloudStack Agent Setup:")
|
||||
|
||||
cfo = configFileOps("@AGENTSYSCONFDIR@/agent.properties")
|
||||
oldMgt = cfo.getEntry("host")
|
||||
|
||||
mgtSvr = input(
|
||||
"Please input the Management Server Hostname/IP-Address:[%s]" % oldMgt
|
||||
)
|
||||
mgtSvr = input("Please input the Management Server Hostname/IP-Address:[%s]"%oldMgt)
|
||||
if mgtSvr == "":
|
||||
mgtSvr = oldMgt
|
||||
try:
|
||||
socket.getaddrinfo(mgtSvr, 443)
|
||||
except:
|
||||
print(
|
||||
"Failed to resolve %s. Please input a valid hostname or IP-Address."
|
||||
% mgtSvr
|
||||
)
|
||||
print("Failed to resolve %s. Please input a valid hostname or IP-Address."%mgtSvr)
|
||||
exit(1)
|
||||
|
||||
oldToken = cfo.getEntry("zone")
|
||||
zoneToken = input("Please input the Zone Id:[%s]" % oldToken)
|
||||
zoneToken = input("Please input the Zone Id:[%s]"%oldToken)
|
||||
|
||||
if zoneToken == "":
|
||||
zoneToken = oldToken
|
||||
|
||||
oldPod = cfo.getEntry("pod")
|
||||
podId = input("Please input the Pod Id:[%s]" % oldPod)
|
||||
podId = input("Please input the Pod Id:[%s]"%oldPod)
|
||||
|
||||
if podId == "":
|
||||
podId = oldToken
|
||||
podId = oldToken
|
||||
|
||||
oldCluster = cfo.getEntry("cluster")
|
||||
clusterId = input("Please input the Cluster Id:[%s]" % oldCluster)
|
||||
clusterId = input("Please input the Cluster Id:[%s]"%oldCluster)
|
||||
if clusterId == "":
|
||||
clusterId = oldCluster
|
||||
|
||||
@ -85,20 +79,18 @@ def getUserInputs():
|
||||
if oldHypervisor == "":
|
||||
oldHypervisor = "kvm"
|
||||
|
||||
hypervisor = input("Please input the Hypervisor type kvm/lxc:[%s]" % oldHypervisor)
|
||||
hypervisor = input("Please input the Hypervisor type kvm/lxc:[%s]"%oldHypervisor)
|
||||
if hypervisor == "":
|
||||
hypervisor = oldHypervisor
|
||||
|
||||
try:
|
||||
defaultNic = networkConfig.getDefaultNetwork()
|
||||
except:
|
||||
print(
|
||||
"Failed to get default route. Please configure your network to have a default route"
|
||||
)
|
||||
print("Failed to get default route. Please configure your network to have a default route")
|
||||
exit(1)
|
||||
|
||||
defNic = defaultNic.name
|
||||
network = input("Please choose which network used to create VM:[%s]" % defNic)
|
||||
network = input("Please choose which network used to create VM:[%s]"%defNic)
|
||||
if network == "":
|
||||
if defNic == "":
|
||||
print("You need to specify one of Nic or bridge on your system")
|
||||
@ -108,8 +100,7 @@ def getUserInputs():
|
||||
|
||||
return [mgtSvr, zoneToken, network, podId, clusterId, hypervisor]
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
if __name__ == '__main__':
|
||||
initLoging("@AGENTLOGDIR@/setup.log")
|
||||
glbEnv = globalEnv()
|
||||
|
||||
@ -117,23 +108,13 @@ if __name__ == "__main__":
|
||||
glbEnv.agentMode = "Agent"
|
||||
parser = OptionParser()
|
||||
parser.add_option("-a", action="store_true", dest="auto", help="auto mode")
|
||||
parser.add_option(
|
||||
"-m", "--host", dest="mgt", help="Management server hostname or IP-Address"
|
||||
)
|
||||
parser.add_option("-m", "--host", dest="mgt", help="Management server hostname or IP-Address")
|
||||
parser.add_option("-z", "--zone", dest="zone", help="zone id")
|
||||
parser.add_option("-p", "--pod", dest="pod", help="pod id")
|
||||
parser.add_option("-c", "--cluster", dest="cluster", help="cluster id")
|
||||
parser.add_option(
|
||||
"-t", "--hypervisor", default="kvm", dest="hypervisor", help="hypervisor type"
|
||||
)
|
||||
parser.add_option("-t", "--hypervisor", default="kvm", dest="hypervisor", help="hypervisor type")
|
||||
parser.add_option("-g", "--guid", dest="guid", help="guid")
|
||||
parser.add_option(
|
||||
"-s",
|
||||
action="store_true",
|
||||
default=False,
|
||||
dest="secure",
|
||||
help="Secure and enable TLS for libvirtd",
|
||||
)
|
||||
parser.add_option("-s", action="store_true", default=False, dest="secure", help="Secure and enable TLS for libvirtd")
|
||||
parser.add_option("--pubNic", dest="pubNic", help="Public traffic interface")
|
||||
parser.add_option("--prvNic", dest="prvNic", help="Private traffic interface")
|
||||
parser.add_option("--guestNic", dest="guestNic", help="Guest traffic interface")
|
||||
@ -159,15 +140,15 @@ if __name__ == "__main__":
|
||||
glbEnv.pod = userInputs[3]
|
||||
glbEnv.cluster = userInputs[4]
|
||||
glbEnv.hypervisor = userInputs[5]
|
||||
# generate UUID
|
||||
#generate UUID
|
||||
glbEnv.uuid = old_config.getEntry("guid")
|
||||
if glbEnv.uuid == "":
|
||||
glbEnv.uuid = bash("uuidgen").getStdout()
|
||||
else:
|
||||
for para, value in list(options.__dict__.items()):
|
||||
if value is None:
|
||||
print("Missing operand:%s" % para)
|
||||
print("Try %s --help for more information" % sys.argv[0])
|
||||
print("Missing operand:%s"%para)
|
||||
print("Try %s --help for more information"%sys.argv[0])
|
||||
sys.exit(1)
|
||||
|
||||
glbEnv.uuid = options.guid
|
||||
@ -187,7 +168,7 @@ if __name__ == "__main__":
|
||||
try:
|
||||
syscfg.config()
|
||||
print("CloudStack Agent setup is done!")
|
||||
except (CloudRuntimeException, CloudInternalException) as e:
|
||||
except (CloudRuntimeException,CloudInternalException) as e:
|
||||
print(e)
|
||||
print("Try to restore your system:")
|
||||
try:
|
||||
|
||||
@ -78,14 +78,6 @@ zone=default
|
||||
# Generated with "uuidgen".
|
||||
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.
|
||||
# The path defined in this property is relative to the directory "/usr/share/cloudstack-common/".
|
||||
domr.scripts.dir=scripts/network/domr/kvm
|
||||
@ -217,13 +209,12 @@ hypervisor.type=kvm
|
||||
# the management server would send.
|
||||
# In case of arm64 (aarch64), this will change the machine type to 'virt' and
|
||||
# adds a SCSI and a USB controller in the domain xml.
|
||||
# Possible values: x86_64 | aarch64 | s390x
|
||||
# Possible values: x86_64 | aarch64
|
||||
# If null (default), defaults to the VM's OS architecture
|
||||
#guest.cpu.arch=
|
||||
|
||||
# Specifies required CPU features for end-user and system VMs.
|
||||
# These features must be present on the host CPU for VM deployment.
|
||||
# Multiple features should be separated by whitespace (e.g.: vmx vme).
|
||||
# This param will require CPU features on the CPU section.
|
||||
# The features listed in this property must be separated by a blank space (e.g.: vmx vme)
|
||||
#guest.cpu.features=
|
||||
|
||||
# Disables memory ballooning on VM guests for overcommit.
|
||||
@ -316,7 +307,7 @@ iscsi.session.cleanup.enabled=false
|
||||
#vm.migrate.domain.retrieve.timeout=10
|
||||
|
||||
# This parameter specifies if the host must be rebooted when something goes wrong with the heartbeat.
|
||||
#reboot.host.and.alert.management.on.heartbeat.timeout=false
|
||||
#reboot.host.and.alert.management.on.heartbeat.timeout=true
|
||||
|
||||
# Enables manually setting CPU's topology on KVM's VM.
|
||||
#enable.manually.setting.cpu.topology.on.kvm.vm=true
|
||||
@ -372,14 +363,6 @@ iscsi.session.cleanup.enabled=false
|
||||
# to the directory "/usr/share/cloudstack-common/".
|
||||
#network.scripts.dir=scripts/vm/network/vnet
|
||||
|
||||
# Sets the VXLAN networking mode used, either 'multicast' (default) or 'evpn'.
|
||||
# The different modes lead to different scripts being executed by the Agent.
|
||||
# multicast: modifyvxlan.sh
|
||||
# evpn: modifyvxlan-evpn.sh
|
||||
# Existing environments using VXLAN can safely switch to the 'evpn' mode as this
|
||||
# will not break existing functionality.
|
||||
#network.vxlan.mode=multicast
|
||||
|
||||
# Defines the location for storage scripts.
|
||||
# The path defined in this property is relative.
|
||||
# To locate the script, ACS first tries to concatenate
|
||||
@ -458,45 +441,3 @@ iscsi.session.cleanup.enabled=false
|
||||
|
||||
# Wait(in seconds) during agent reconnections. When no value is set then default value of 5s will be used
|
||||
#backoff.seconds=
|
||||
|
||||
# Timeout (in seconds) to wait for the snapshot reversion to complete.
|
||||
# revert.snapshot.timeout=10800
|
||||
|
||||
# Timeout (in seconds) to wait for the incremental snapshot to complete.
|
||||
# incremental.snapshot.timeout=10800
|
||||
|
||||
# If set to true, creates VMs as full clones of their templates on KVM hypervisor. Creates as linked clones otherwise.
|
||||
# create.full.clone=false
|
||||
|
||||
# Instance conversion TMPDIR env var
|
||||
#convert.instance.env.tmpdir=
|
||||
|
||||
# Instance conversion VIRT_V2V_TMPDIR env var
|
||||
#convert.instance.env.virtv2v.tmpdir=
|
||||
|
||||
# Time, in seconds, to wait before retrying to rebase during the incremental snapshot process.
|
||||
# incremental.snapshot.retry.rebase.wait=60
|
||||
|
||||
# Path to the VDDK library directory for VMware to KVM conversion via VDDK,
|
||||
# passed to virt-v2v as -io vddk-libdir=<path>
|
||||
#vddk.lib.dir=
|
||||
|
||||
# Ordered VDDK transport preference for VMware to KVM conversion via VDDK, passed as
|
||||
# -io vddk-transports=<value> to virt-v2v. Example: nbd:nbdssl
|
||||
#vddk.transports=
|
||||
|
||||
# Optional vCenter SHA1 thumbprint for VMware to KVM conversion via VDDK, passed as
|
||||
# -io vddk-thumbprint=<value>. If unset, CloudStack computes it on the KVM host via openssl.
|
||||
#vddk.thumbprint=
|
||||
|
||||
# Timeout (in seconds) for QCOW2 delta merge operations, mainly used for classic volume snapshots, disk-only VM snapshots on file-based storage, and the KBOSS plugin.
|
||||
# If a value of 0 or less is informed, the default will be used.
|
||||
# qcow2.delta.merge.timeout=259200
|
||||
|
||||
# Maximum number of backup validation jobs that can be executed at the same time. Values lower than 0 remove the limit, meaning that as many validations as possible will be done at
|
||||
# the same time.
|
||||
# backup.validation.max.concurrent.operations.per.host=
|
||||
|
||||
# Maximum number of backup compression jobs that can be executed at the same time. Values lower than 0 remove the limit, meaning that as many compressions as possible will be
|
||||
# done at the same time.
|
||||
# backup.compression.max.concurrent.operations.per.host=
|
||||
|
||||
@ -5,9 +5,9 @@
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
|
||||
@ -1,24 +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.
|
||||
|
||||
# Configuration file for UEFI
|
||||
|
||||
guest.nvram.template.legacy=@GUESTNVRAMTEMPLATELEGACY@
|
||||
guest.loader.legacy=@GUESTLOADERLEGACY@
|
||||
guest.nvram.template.secure=@GUESTNVRAMTEMPLATESECURE@
|
||||
guest.loader.secure=@GUESTLOADERSECURE@
|
||||
guest.nvram.path=@GUESTNVRAMPATH@
|
||||
@ -24,7 +24,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<version>4.23.0.0-SNAPSHOT</version>
|
||||
<version>4.20.2.0</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
||||
@ -26,8 +26,6 @@ import java.net.Socket;
|
||||
import java.net.UnknownHostException;
|
||||
import java.nio.channels.ClosedChannelException;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@ -59,6 +57,7 @@ import org.apache.cloudstack.utils.security.KeyStoreUtils;
|
||||
import org.apache.commons.collections.CollectionUtils;
|
||||
import org.apache.commons.io.FileUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.ThreadContext;
|
||||
@ -70,8 +69,6 @@ import com.cloud.agent.api.Command;
|
||||
import com.cloud.agent.api.CronCommand;
|
||||
import com.cloud.agent.api.MaintainAnswer;
|
||||
import com.cloud.agent.api.MaintainCommand;
|
||||
import com.cloud.agent.api.MigrateAgentConnectionAnswer;
|
||||
import com.cloud.agent.api.MigrateAgentConnectionCommand;
|
||||
import com.cloud.agent.api.PingAnswer;
|
||||
import com.cloud.agent.api.PingCommand;
|
||||
import com.cloud.agent.api.ReadyCommand;
|
||||
@ -87,7 +84,6 @@ import com.cloud.resource.ResourceStatusUpdater;
|
||||
import com.cloud.resource.ServerResource;
|
||||
import com.cloud.utils.NumbersUtil;
|
||||
import com.cloud.utils.PropertiesUtil;
|
||||
import com.cloud.utils.StringUtils;
|
||||
import com.cloud.utils.concurrency.NamedThreadFactory;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
import com.cloud.utils.exception.NioConnectionException;
|
||||
@ -341,8 +337,9 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
logger.info("Attempted to connect to the server, but received an unexpected exception, trying again...", e);
|
||||
}
|
||||
}
|
||||
shell.updateConnectedHost(((NioClient)connection).getHost());
|
||||
shell.updateConnectedHost();
|
||||
scavengeOldAgentObjects();
|
||||
|
||||
}
|
||||
|
||||
public void stop(final String reason, final String detail) {
|
||||
@ -452,30 +449,22 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
certExecutor.schedule(new PostCertificateRenewalTask(this), 5, TimeUnit.SECONDS);
|
||||
}
|
||||
|
||||
private void scheduleHostLBCheckerTask(final String lbAlgorithm, final long checkInterval) {
|
||||
private void scheduleHostLBCheckerTask(final long checkInterval) {
|
||||
String name = "HostLBCheckerTask";
|
||||
if (hostLbCheckExecutor != null && !hostLbCheckExecutor.isShutdown()) {
|
||||
logger.info("Shutting down the preferred host checker task {}", name);
|
||||
hostLbCheckExecutor.shutdown();
|
||||
try {
|
||||
if (!hostLbCheckExecutor.awaitTermination(1, TimeUnit.SECONDS)) {
|
||||
hostLbCheckExecutor.shutdownNow();
|
||||
}
|
||||
} catch (InterruptedException e) {
|
||||
logger.debug("Forcing the preferred host checker task {} shutdown as it did not shutdown in the desired time due to: {}",
|
||||
logger.debug("Forcing {} shutdown as it did not shutdown in the desired time due to: {}",
|
||||
name, e.getMessage());
|
||||
hostLbCheckExecutor.shutdownNow();
|
||||
}
|
||||
}
|
||||
if (checkInterval > 0L) {
|
||||
if ("shuffle".equalsIgnoreCase(lbAlgorithm)) {
|
||||
logger.info("Scheduling the preferred host checker task to trigger once (to apply lb algorithm '{}') after host.lb.interval={} ms", lbAlgorithm, checkInterval);
|
||||
hostLbCheckExecutor = Executors.newSingleThreadScheduledExecutor((new NamedThreadFactory(name)));
|
||||
hostLbCheckExecutor.schedule(new PreferredHostCheckerTask(), checkInterval, TimeUnit.MILLISECONDS);
|
||||
return;
|
||||
}
|
||||
|
||||
logger.info("Scheduling a recurring preferred host checker task with host.lb.interval={} ms", checkInterval);
|
||||
logger.info("Scheduling preferred host task with host.lb.interval={}ms", checkInterval);
|
||||
hostLbCheckExecutor = Executors.newSingleThreadScheduledExecutor((new NamedThreadFactory(name)));
|
||||
hostLbCheckExecutor.scheduleAtFixedRate(new PreferredHostCheckerTask(), checkInterval, checkInterval,
|
||||
TimeUnit.MILLISECONDS);
|
||||
@ -549,10 +538,6 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
}
|
||||
|
||||
public void sendStartup(final Link link) {
|
||||
sendStartup(link, false);
|
||||
}
|
||||
|
||||
public void sendStartup(final Link link, boolean transfer) {
|
||||
final StartupCommand[] startup = serverResource.initialize();
|
||||
if (startup != null) {
|
||||
final String msHostList = shell.getPersistentProperty(null, "host");
|
||||
@ -560,7 +545,6 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
for (int i = 0; i < startup.length; i++) {
|
||||
setupStartupCommand(startup[i]);
|
||||
startup[i].setMSHostList(msHostList);
|
||||
startup[i].setConnectionTransferred(transfer);
|
||||
commands[i] = startup[i];
|
||||
}
|
||||
final Request request = new Request(id != null ? id : -1, -1, commands, false, false);
|
||||
@ -623,46 +607,6 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
return new ServerHandler(type, link, data);
|
||||
}
|
||||
|
||||
protected void reconnect(final Link link) {
|
||||
reconnect(link, null, false);
|
||||
}
|
||||
|
||||
protected void reconnect(final Link link, String preferredMSHost, boolean forTransfer) {
|
||||
if (!(forTransfer || reconnectAllowed)) {
|
||||
logger.debug("Reconnect requested but it is not allowed {}", () -> getLinkLog(link));
|
||||
return;
|
||||
}
|
||||
cancelStartupTask();
|
||||
closeAndTerminateLink(link);
|
||||
closeAndTerminateLink(this.link);
|
||||
setLink(null);
|
||||
cancelTasks();
|
||||
serverResource.disconnected();
|
||||
logger.info("Lost connection to host: {}. Attempting reconnection while we still have {} commands in progress.", shell.getConnectedHost(), commandsInProgress.get());
|
||||
stopAndCleanupConnection(true);
|
||||
String host = preferredMSHost;
|
||||
if (org.apache.commons.lang3.StringUtils.isBlank(host)) {
|
||||
host = shell.getNextHost();
|
||||
}
|
||||
List<String> avoidMSHostList = shell.getAvoidHosts();
|
||||
do {
|
||||
if (CollectionUtils.isEmpty(avoidMSHostList) || !avoidMSHostList.contains(host)) {
|
||||
connection = new NioClient(getAgentName(), host, shell.getPort(), shell.getWorkers(), shell.getSslHandshakeTimeout(), this);
|
||||
logger.info("Reconnecting to host: {}", host);
|
||||
try {
|
||||
connection.start();
|
||||
} catch (final NioConnectionException e) {
|
||||
logger.info("Attempted to re-connect to the server, but received an unexpected exception, trying again...", e);
|
||||
stopAndCleanupConnection(false);
|
||||
}
|
||||
}
|
||||
shell.getBackoffAlgorithm().waitBeforeRetry();
|
||||
host = shell.getNextHost();
|
||||
} while (!connection.isStartup());
|
||||
shell.updateConnectedHost(((NioClient)connection).getHost());
|
||||
logger.info("Connected to the host: {}", shell.getConnectedHost());
|
||||
}
|
||||
|
||||
protected void closeAndTerminateLink(final Link link) {
|
||||
if (link == null) {
|
||||
return;
|
||||
@ -689,6 +633,35 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
} while (connection.isStartup());
|
||||
}
|
||||
|
||||
protected void reconnect(final Link link) {
|
||||
if (!reconnectAllowed) {
|
||||
logger.debug("Reconnect requested but it is not allowed {}", () -> getLinkLog(link));
|
||||
return;
|
||||
}
|
||||
cancelStartupTask();
|
||||
closeAndTerminateLink(link);
|
||||
closeAndTerminateLink(this.link);
|
||||
setLink(null);
|
||||
cancelTasks();
|
||||
serverResource.disconnected();
|
||||
logger.info("Lost connection to host: {}. Attempting reconnection while we still have {} commands in progress.", shell.getConnectedHost(), commandsInProgress.get());
|
||||
stopAndCleanupConnection(true);
|
||||
do {
|
||||
final String host = shell.getNextHost();
|
||||
connection = new NioClient(getAgentName(), host, shell.getPort(), shell.getWorkers(), shell.getSslHandshakeTimeout(), this);
|
||||
logger.info("Reconnecting to host: {}", host);
|
||||
try {
|
||||
connection.start();
|
||||
} catch (final NioConnectionException e) {
|
||||
logger.info("Attempted to re-connect to the server, but received an unexpected exception, trying again...", e);
|
||||
stopAndCleanupConnection(false);
|
||||
}
|
||||
shell.getBackoffAlgorithm().waitBeforeRetry();
|
||||
} while (!connection.isStartup());
|
||||
shell.updateConnectedHost();
|
||||
logger.info("Connected to the host: {}", shell.getConnectedHost());
|
||||
}
|
||||
|
||||
public void processStartupAnswer(final Answer answer, final Response response, final Link link) {
|
||||
boolean answerValid = cancelStartupTask();
|
||||
final StartupAnswer startup = (StartupAnswer)answer;
|
||||
@ -735,9 +708,6 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
final Command cmd = cmds[i];
|
||||
Answer answer;
|
||||
try {
|
||||
if (cmd.getContextParam("logid") != null) {
|
||||
ThreadContext.put("logcontextid", cmd.getContextParam("logid"));
|
||||
}
|
||||
if (logger.isDebugEnabled()) {
|
||||
if (!requestLogged) // ensures request is logged only once per method call
|
||||
{
|
||||
@ -799,17 +769,12 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
}
|
||||
} else if (cmd instanceof SetupMSListCommand) {
|
||||
answer = setupManagementServerList((SetupMSListCommand) cmd);
|
||||
} else if (cmd instanceof MigrateAgentConnectionCommand) {
|
||||
answer = migrateAgentToOtherMS((MigrateAgentConnectionCommand) cmd);
|
||||
} else {
|
||||
if (cmd instanceof ReadyCommand) {
|
||||
processReadyCommand(cmd);
|
||||
}
|
||||
commandsInProgress.incrementAndGet();
|
||||
try {
|
||||
if (cmd.isReconcile()) {
|
||||
cmd.setRequestSequence(request.getSequence());
|
||||
}
|
||||
answer = serverResource.executeRequest(cmd);
|
||||
} finally {
|
||||
commandsInProgress.decrementAndGet();
|
||||
@ -935,7 +900,7 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
return new SetupCertificateAnswer(true);
|
||||
}
|
||||
|
||||
private void processManagementServerList(final List<String> msList, final List<String> avoidMsList, final String lbAlgorithm, final Long lbCheckInterval, final boolean triggerHostLB) {
|
||||
private void processManagementServerList(final List<String> msList, final String lbAlgorithm, final Long lbCheckInterval) {
|
||||
if (CollectionUtils.isNotEmpty(msList) && StringUtils.isNotEmpty(lbAlgorithm)) {
|
||||
try {
|
||||
final String newMSHosts = String.format("%s%s%s", com.cloud.utils.StringUtils.toCSVList(msList), IAgentShell.hostLbAlgorithmSeparator, lbAlgorithm);
|
||||
@ -947,73 +912,18 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
throw new CloudRuntimeException("Could not persist received management servers list", e);
|
||||
}
|
||||
}
|
||||
shell.setAvoidHosts(avoidMsList);
|
||||
if (triggerHostLB) {
|
||||
logger.info("Triggering the preferred host checker task now");
|
||||
ScheduledExecutorService hostLbExecutor = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("HostLB-Executor"));
|
||||
hostLbExecutor.schedule(new PreferredHostCheckerTask(), 0, TimeUnit.MILLISECONDS);
|
||||
hostLbExecutor.shutdown();
|
||||
if ("shuffle".equals(lbAlgorithm)) {
|
||||
scheduleHostLBCheckerTask(0);
|
||||
} else {
|
||||
scheduleHostLBCheckerTask(shell.getLbCheckerInterval(lbCheckInterval));
|
||||
}
|
||||
scheduleHostLBCheckerTask(lbAlgorithm, shell.getLbCheckerInterval(lbCheckInterval));
|
||||
}
|
||||
|
||||
private Answer setupManagementServerList(final SetupMSListCommand cmd) {
|
||||
processManagementServerList(cmd.getMsList(), cmd.getAvoidMsList(), cmd.getLbAlgorithm(), cmd.getLbCheckInterval(), cmd.getTriggerHostLb());
|
||||
processManagementServerList(cmd.getMsList(), cmd.getLbAlgorithm(), cmd.getLbCheckInterval());
|
||||
return new SetupMSListAnswer(true);
|
||||
}
|
||||
|
||||
private Answer migrateAgentToOtherMS(final MigrateAgentConnectionCommand cmd) {
|
||||
try {
|
||||
if (CollectionUtils.isNotEmpty(cmd.getMsList())) {
|
||||
processManagementServerList(cmd.getMsList(), cmd.getAvoidMsList(), cmd.getLbAlgorithm(), cmd.getLbCheckInterval(), false);
|
||||
}
|
||||
ScheduledExecutorService migrateAgentConnectionService = Executors.newSingleThreadScheduledExecutor(new NamedThreadFactory("MigrateAgentConnection-Job"));
|
||||
migrateAgentConnectionService.schedule(() -> {
|
||||
migrateAgentConnection(cmd.getAvoidMsList());
|
||||
}, 3, TimeUnit.SECONDS);
|
||||
migrateAgentConnectionService.shutdown();
|
||||
} catch (Exception e) {
|
||||
String errMsg = "Migrate agent connection failed, due to " + e.getMessage();
|
||||
logger.debug(errMsg, e);
|
||||
return new MigrateAgentConnectionAnswer(errMsg);
|
||||
}
|
||||
return new MigrateAgentConnectionAnswer(true);
|
||||
}
|
||||
|
||||
private void migrateAgentConnection(List<String> avoidMsList) {
|
||||
final String[] msHosts = shell.getHosts();
|
||||
if (msHosts == null || msHosts.length < 1) {
|
||||
throw new CloudRuntimeException("Management Server hosts empty, not properly configured in agent");
|
||||
}
|
||||
|
||||
List<String> msHostsList = new ArrayList<>(Arrays.asList(msHosts));
|
||||
msHostsList.removeAll(avoidMsList);
|
||||
if (msHostsList.isEmpty() || StringUtils.isEmpty(msHostsList.get(0))) {
|
||||
throw new CloudRuntimeException("No other Management Server hosts to migrate");
|
||||
}
|
||||
|
||||
String preferredMSHost = null;
|
||||
for (String msHost : msHostsList) {
|
||||
try (final Socket socket = new Socket()) {
|
||||
socket.connect(new InetSocketAddress(msHost, shell.getPort()), 5000);
|
||||
preferredMSHost = msHost;
|
||||
break;
|
||||
} catch (final IOException e) {
|
||||
throw new CloudRuntimeException("Management server host: " + msHost + " is not reachable, to migrate connection");
|
||||
}
|
||||
}
|
||||
|
||||
if (preferredMSHost == null) {
|
||||
throw new CloudRuntimeException("Management server host(s) are not reachable, to migrate connection");
|
||||
}
|
||||
|
||||
logger.debug("Management server host " + preferredMSHost + " is found to be reachable, trying to reconnect");
|
||||
shell.resetHostCounter();
|
||||
shell.setAvoidHosts(avoidMsList);
|
||||
shell.setConnectionTransfer(true);
|
||||
reconnect(link, preferredMSHost, true);
|
||||
}
|
||||
|
||||
public void processResponse(final Response response, final Link link) {
|
||||
final Answer answer = response.getAnswer();
|
||||
logger.debug("Received response: {}", response.toString());
|
||||
@ -1024,21 +934,12 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
for (final IAgentControlListener listener : controlListeners) {
|
||||
listener.processControlResponse(response, (AgentControlAnswer)answer);
|
||||
}
|
||||
} else if (answer instanceof PingAnswer) {
|
||||
processPingAnswer((PingAnswer) answer);
|
||||
} else {
|
||||
updateLastPingResponseTime();
|
||||
}
|
||||
}
|
||||
|
||||
private void processPingAnswer(final PingAnswer answer) {
|
||||
if ((answer.isSendStartup()) && reconnectAllowed) {
|
||||
} else if (answer instanceof PingAnswer && (((PingAnswer) answer).isSendStartup()) && reconnectAllowed) {
|
||||
logger.info("Management server requested startup command to reinitialize the agent");
|
||||
sendStartup(link);
|
||||
} else {
|
||||
serverResource.processPingAnswer((PingAnswer) answer);
|
||||
updateLastPingResponseTime();
|
||||
}
|
||||
shell.setAvoidHosts(answer.getAvoidMsList());
|
||||
}
|
||||
|
||||
public void processReadyCommand(final Command cmd) {
|
||||
@ -1057,7 +958,7 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
}
|
||||
|
||||
verifyAgentArch(ready.getArch());
|
||||
processManagementServerList(ready.getMsHostList(), ready.getAvoidMsHostList(), ready.getLbAlgorithm(), ready.getLbCheckInterval(), false);
|
||||
processManagementServerList(ready.getMsHostList(), ready.getLbAlgorithm(), ready.getLbCheckInterval());
|
||||
|
||||
logger.info("Ready command is processed for agent [id: {}, uuid: {}, name: {}]", getId(), getUuid(), getName());
|
||||
}
|
||||
@ -1103,9 +1004,6 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
Answer answer = null;
|
||||
commandsInProgress.incrementAndGet();
|
||||
try {
|
||||
if (command.isReconcile()) {
|
||||
command.setRequestSequence(req.getSequence());
|
||||
}
|
||||
answer = serverResource.executeRequest(command);
|
||||
} finally {
|
||||
commandsInProgress.decrementAndGet();
|
||||
@ -1229,12 +1127,12 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
public class WatchTask implements Runnable {
|
||||
protected Request _request;
|
||||
protected Agent _agent;
|
||||
protected Link link;
|
||||
protected Link _link;
|
||||
|
||||
public WatchTask(final Link link, final Request request, final Agent agent) {
|
||||
super();
|
||||
_request = request;
|
||||
this.link = link;
|
||||
_link = link;
|
||||
_agent = agent;
|
||||
}
|
||||
|
||||
@ -1243,9 +1141,9 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
logger.trace("Scheduling {}", (_request instanceof Response ? "Ping" : "Watch Task"));
|
||||
try {
|
||||
if (_request instanceof Response) {
|
||||
outRequestHandler.submit(new ServerHandler(Task.Type.OTHER, link, _request));
|
||||
outRequestHandler.submit(new ServerHandler(Task.Type.OTHER, _link, _request));
|
||||
} else {
|
||||
link.schedule(new ServerHandler(Task.Type.OTHER, link, _request));
|
||||
_link.schedule(new ServerHandler(Task.Type.OTHER, _link, _request));
|
||||
}
|
||||
} catch (final ClosedChannelException e) {
|
||||
logger.warn("Unable to schedule task because channel is closed");
|
||||
@ -1254,12 +1152,12 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
}
|
||||
|
||||
public class StartupTask implements Runnable {
|
||||
protected Link link;
|
||||
protected Link _link;
|
||||
private final AtomicBoolean cancelled = new AtomicBoolean(false);
|
||||
|
||||
public StartupTask(final Link link) {
|
||||
logger.debug("Startup task created");
|
||||
this.link = link;
|
||||
_link = link;
|
||||
}
|
||||
|
||||
public boolean cancel() {
|
||||
@ -1277,8 +1175,8 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
logger.info("The running startup command is now invalid. Attempting reconnect");
|
||||
startupTask.set(null);
|
||||
startupWait = DEFAULT_STARTUP_WAIT * 2;
|
||||
logger.debug("Executing reconnect from task - {}", () -> getLinkLog(link));
|
||||
reconnect(link);
|
||||
logger.debug("Executing reconnect from task - {}", () -> getLinkLog(_link));
|
||||
reconnect(_link);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1311,8 +1209,7 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
if (task.getType() == Task.Type.CONNECT) {
|
||||
shell.getBackoffAlgorithm().reset();
|
||||
setLink(task.getLink());
|
||||
sendStartup(task.getLink(), shell.isConnectionTransfer());
|
||||
shell.setConnectionTransfer(false);
|
||||
sendStartup(task.getLink());
|
||||
} else if (task.getType() == Task.Type.DATA) {
|
||||
Request request;
|
||||
try {
|
||||
@ -1322,6 +1219,7 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
processResponse((Response)request, task.getLink());
|
||||
} else {
|
||||
//put the requests from mgt server into another thread pool, as the request may take a longer time to finish. Don't block the NIO main thread pool
|
||||
//processRequest(request, task.getLink());
|
||||
requestHandler.submit(new AgentRequestHandler(getType(), getLink(), request));
|
||||
}
|
||||
} catch (final ClassNotFoundException e) {
|
||||
@ -1330,15 +1228,7 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
logger.error("Error parsing task", e);
|
||||
}
|
||||
} else if (task.getType() == Task.Type.DISCONNECT) {
|
||||
try {
|
||||
// an issue has been found if reconnect immediately after disconnecting.
|
||||
// wait 5 seconds before reconnecting
|
||||
logger.debug("Wait for 5 secs before reconnecting, disconnect task - {}", () -> getLinkLog(task.getLink()));
|
||||
Thread.sleep(5000);
|
||||
} catch (InterruptedException e) {
|
||||
}
|
||||
shell.setConnectionTransfer(false);
|
||||
logger.debug("Executing disconnect task - {} and reconnecting", () -> getLinkLog(task.getLink()));
|
||||
logger.debug("Executing disconnect task - {}", () -> getLinkLog(task.getLink()));
|
||||
reconnect(task.getLink());
|
||||
} else if (task.getType() == Task.Type.OTHER) {
|
||||
processOtherTask(task);
|
||||
@ -1407,26 +1297,26 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
||||
if (msList == null || msList.length < 1) {
|
||||
return;
|
||||
}
|
||||
final String preferredMSHost = msList[0];
|
||||
final String preferredHost = msList[0];
|
||||
final String connectedHost = shell.getConnectedHost();
|
||||
logger.debug("Running preferred host checker task, connected host={}, preferred host={}",
|
||||
connectedHost, preferredMSHost);
|
||||
if (preferredMSHost == null || preferredMSHost.equals(connectedHost) || link == null) {
|
||||
connectedHost, preferredHost);
|
||||
if (preferredHost == null || preferredHost.equals(connectedHost) || link == null) {
|
||||
return;
|
||||
}
|
||||
boolean isHostUp = false;
|
||||
try (final Socket socket = new Socket()) {
|
||||
socket.connect(new InetSocketAddress(preferredMSHost, shell.getPort()), 5000);
|
||||
socket.connect(new InetSocketAddress(preferredHost, shell.getPort()), 5000);
|
||||
isHostUp = true;
|
||||
} catch (final IOException e) {
|
||||
logger.debug("Host: {} is not reachable", preferredMSHost);
|
||||
logger.debug("Host: {} is not reachable", preferredHost);
|
||||
}
|
||||
if (isHostUp && link != null && commandsInProgress.get() == 0) {
|
||||
if (logger.isDebugEnabled()) {
|
||||
logger.debug("Preferred host {} is found to be reachable, trying to reconnect", preferredMSHost);
|
||||
logger.debug("Preferred host {} is found to be reachable, trying to reconnect", preferredHost);
|
||||
}
|
||||
shell.resetHostCounter();
|
||||
reconnect(link, preferredMSHost, false);
|
||||
reconnect(link);
|
||||
}
|
||||
} catch (Throwable t) {
|
||||
logger.error("Error caught while attempting to connect to preferred host", t);
|
||||
|
||||
@ -66,7 +66,6 @@ public class AgentShell implements IAgentShell, Daemon {
|
||||
private String _zone;
|
||||
private String _pod;
|
||||
private String _host;
|
||||
private List<String> _avoidHosts;
|
||||
private String _privateIp;
|
||||
private int _port;
|
||||
private int _proxyPort;
|
||||
@ -77,9 +76,9 @@ public class AgentShell implements IAgentShell, Daemon {
|
||||
private volatile boolean _exit = false;
|
||||
private int _pingRetries;
|
||||
private final List<Agent> _agents = new ArrayList<Agent>();
|
||||
private String hostToConnect;
|
||||
private String connectedHost;
|
||||
private Long preferredHostCheckInterval;
|
||||
private boolean connectionTransfer = false;
|
||||
protected AgentProperties agentProperties = new AgentProperties();
|
||||
|
||||
public AgentShell() {
|
||||
@ -121,7 +120,7 @@ public class AgentShell implements IAgentShell, Daemon {
|
||||
if (_hostCounter >= hosts.length) {
|
||||
_hostCounter = 0;
|
||||
}
|
||||
String hostToConnect = hosts[_hostCounter % hosts.length];
|
||||
hostToConnect = hosts[_hostCounter % hosts.length];
|
||||
_hostCounter++;
|
||||
return hostToConnect;
|
||||
}
|
||||
@ -143,10 +142,11 @@ public class AgentShell implements IAgentShell, Daemon {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateConnectedHost(String connectedHost) {
|
||||
this.connectedHost = connectedHost;
|
||||
public void updateConnectedHost() {
|
||||
connectedHost = hostToConnect;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void resetHostCounter() {
|
||||
_hostCounter = 0;
|
||||
@ -165,16 +165,6 @@ public class AgentShell implements IAgentShell, Daemon {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setAvoidHosts(List<String> avoidHosts) {
|
||||
_avoidHosts = avoidHosts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<String> getAvoidHosts() {
|
||||
return _avoidHosts;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getPrivateIp() {
|
||||
return _privateIp;
|
||||
@ -227,14 +217,6 @@ public class AgentShell implements IAgentShell, Daemon {
|
||||
_storage.persist(name, value);
|
||||
}
|
||||
|
||||
public boolean isConnectionTransfer() {
|
||||
return connectionTransfer;
|
||||
}
|
||||
|
||||
public void setConnectionTransfer(boolean connectionTransfer) {
|
||||
this.connectionTransfer = connectionTransfer;
|
||||
}
|
||||
|
||||
void loadProperties() throws ConfigurationException {
|
||||
final File file = PropertiesUtil.findConfigFile("agent.properties");
|
||||
|
||||
|
||||
@ -16,7 +16,6 @@
|
||||
// under the License.
|
||||
package com.cloud.agent;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
|
||||
@ -64,21 +63,13 @@ public interface IAgentShell {
|
||||
|
||||
String[] getHosts();
|
||||
|
||||
void setAvoidHosts(List<String> hosts);
|
||||
|
||||
List<String> getAvoidHosts();
|
||||
|
||||
long getLbCheckerInterval(Long receivedLbInterval);
|
||||
|
||||
void updateConnectedHost(String connectedHost);
|
||||
void updateConnectedHost();
|
||||
|
||||
String getConnectedHost();
|
||||
|
||||
void launchNewAgent(ServerResource resource) throws ConfigurationException;
|
||||
|
||||
boolean isConnectionTransfer();
|
||||
|
||||
void setConnectionTransfer(boolean connectionTransfer);
|
||||
|
||||
Integer getSslHandshakeTimeout();
|
||||
}
|
||||
|
||||
@ -117,26 +117,12 @@ public class AgentProperties{
|
||||
|
||||
/**
|
||||
* Local storage path.<br>
|
||||
* This property allows multiple values to be entered in a single String. The different values must be separated by commas.<br>
|
||||
* This property allows multiple values to be entered in a single String. The differente values must be separated by commas.<br>
|
||||
* Data type: String.<br>
|
||||
* 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/");
|
||||
|
||||
/**
|
||||
* 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>
|
||||
* These sockets are for the Qemu Guest Agent and SSVM provisioning.<br>
|
||||
@ -148,7 +134,7 @@ public class AgentProperties{
|
||||
|
||||
/**
|
||||
* MANDATORY: The UUID for the local storage pool.<br>
|
||||
* This property allows multiple values to be entered in a single String. The different values must be separated by commas.<br>
|
||||
* This property allows multiple values to be entered in a single String. The differente values must be separated by commas.<br>
|
||||
* Data type: String.<br>
|
||||
* Default value: <code>null</code>
|
||||
*/
|
||||
@ -169,15 +155,6 @@ public class AgentProperties{
|
||||
*/
|
||||
public static final Property<Integer> CMDS_TIMEOUT = new Property<>("cmds.timeout", 7200);
|
||||
|
||||
/**
|
||||
* The timeout (in seconds) for QCOW2 delta merge operations, mainly used for classic volume snapshots, disk-only VM snapshots on file-based storage, and the KBOSS plugin.
|
||||
* If a value of 0 or less is informed, the default will be used.<br>
|
||||
* This configuration is only considered if libvirt.events.enabled is also true. <br>
|
||||
* Data type: Integer.<br>
|
||||
* Default value: <code>259200</code>
|
||||
*/
|
||||
public static final Property<Integer> QCOW2_DELTA_MERGE_TIMEOUT = new Property<>("qcow2.delta.merge.timeout", 60 * 60 * 72);
|
||||
|
||||
/**
|
||||
* This parameter sets the VM migration speed (in mbps). The default value is -1,<br>
|
||||
* which means that the agent will try to guess the speed of the guest network and consume all possible bandwidth.<br>
|
||||
@ -236,15 +213,6 @@ public class AgentProperties{
|
||||
*/
|
||||
public static final Property<String> AGENT_HOOKS_LIBVIRT_VM_XML_TRANSFORMER_SCRIPT = new Property<>("agent.hooks.libvirt_vm_xml_transformer.script", "libvirt-vm-xml-transformer.groovy");
|
||||
|
||||
/**
|
||||
* This property is used with the agent.hooks.basedir property to define the Libvirt VM XML transformer shell script.<br>
|
||||
* The shell script is used to execute the Libvirt VM XML transformer script.<br>
|
||||
* For more information see the agent.properties file.<br>
|
||||
* Data type: String.<br>
|
||||
* Default value: <code>libvirt-vm-xml-transformer.sh</code>
|
||||
*/
|
||||
public static final Property<String> AGENT_HOOKS_LIBVIRT_VM_XML_TRANSFORMER_SHELL_SCRIPT = new Property<>("agent.hooks.libvirt_vm_xml_transformer.shell_script", "libvirt-vm-xml-transformer.sh");
|
||||
|
||||
/**
|
||||
* This property is used with the agent.hooks.basedir and agent.hooks.libvirt_vm_xml_transformer.script properties to define the Libvirt VM XML transformer method.<br>
|
||||
* Libvirt XML transformer hook does XML-to-XML transformation.<br>
|
||||
@ -265,15 +233,6 @@ public class AgentProperties{
|
||||
*/
|
||||
public static final Property<String> AGENT_HOOKS_LIBVIRT_VM_ON_START_SCRIPT = new Property<>("agent.hooks.libvirt_vm_on_start.script", "libvirt-vm-state-change.groovy");
|
||||
|
||||
/**
|
||||
* This property is used with the agent.hooks.basedir property to define the Libvirt VM on start shell script.<br>
|
||||
* The shell script is used to execute the Libvirt VM on start script.<br>
|
||||
* For more information see the agent.properties file.<br>
|
||||
* Data type: String.<br>
|
||||
* Default value: <code>libvirt-vm-state-change.sh</code>
|
||||
*/
|
||||
public static final Property<String> AGENT_HOOKS_LIBVIRT_VM_ON_START_SHELL_SCRIPT = new Property<>("agent.hooks.libvirt_vm_on_start.shell_script", "libvirt-vm-state-change.sh");
|
||||
|
||||
/**
|
||||
* This property is used with the agent.hooks.basedir and agent.hooks.libvirt_vm_on_start.script properties to define the Libvirt VM on start method.<br>
|
||||
* The hook is called right after Libvirt successfully launched the VM.<br>
|
||||
@ -293,15 +252,6 @@ public class AgentProperties{
|
||||
*/
|
||||
public static final Property<String> AGENT_HOOKS_LIBVIRT_VM_ON_STOP_SCRIPT = new Property<>("agent.hooks.libvirt_vm_on_stop.script", "libvirt-vm-state-change.groovy");
|
||||
|
||||
/**
|
||||
* This property is used with the agent.hooks.basedir property to define the Libvirt VM on stop shell script.<br>
|
||||
* The shell script is used to execute the Libvirt VM on stop script.<br>
|
||||
* For more information see the agent.properties file.<br>
|
||||
* Data type: String.<br>
|
||||
* Default value: <code>libvirt-vm-state-change.sh</code>
|
||||
*/
|
||||
public static final Property<String> AGENT_HOOKS_LIBVIRT_VM_ON_STOP_SHELL_SCRIPT = new Property<>("agent.hooks.libvirt_vm_on_stop.shell_script", "libvirt-vm-state-change.sh");
|
||||
|
||||
/**
|
||||
* This property is used with the agent.hooks.basedir and agent.hooks.libvirt_vm_on_stop.script properties to define the Libvirt VM on stop method.<br>
|
||||
* The hook is called right after libvirt successfully stopped the VM.<br>
|
||||
@ -319,15 +269,6 @@ public class AgentProperties{
|
||||
*/
|
||||
public static final Property<String> NETWORK_BRIDGE_TYPE = new Property<>("network.bridge.type", "native");
|
||||
|
||||
/**
|
||||
* Sets the VXLAN networking mode used by the BridgeVifDriver.<br>
|
||||
* Possible values: multicast | evpn <br>
|
||||
* When set to <code>evpn</code>, the driver will use modifyvxlan-evpn.sh instead of modifyvxlan.sh.<br>
|
||||
* Data type: String.<br>
|
||||
* Default value: <code>multicast</code>
|
||||
*/
|
||||
public static final Property<String> NETWORK_VXLAN_MODE = new Property<>("network.vxlan.mode", "multicast");
|
||||
|
||||
/**
|
||||
* Sets the driver used to plug and unplug NICs from the bridges.<br>
|
||||
* A sensible default value will be selected based on the network.bridge.type but can be overridden here.<br>
|
||||
@ -442,16 +383,15 @@ public class AgentProperties{
|
||||
/**
|
||||
* This param will set the CPU architecture for the domain to override what the management server would send.<br>
|
||||
* In case of arm64 (aarch64), this will change the machine type to 'virt' and add a SCSI and a USB controller in the domain XML.<br>
|
||||
* Possible values: x86_64 | aarch64 | s390x <br>
|
||||
* Possible values: x86_64 | aarch64 <br>
|
||||
* Data type: String.<br>
|
||||
* Default value: <code>null</code> (will set use the architecture of the VM's OS).
|
||||
*/
|
||||
public static final Property<String> GUEST_CPU_ARCH = new Property<>("guest.cpu.arch", null, String.class);
|
||||
|
||||
/**
|
||||
* Specifies required CPU features for end-user and system VMs.<br>
|
||||
* These features must be present on the host CPU for VM deployment.<br>
|
||||
* Multiple features should be separated by whitespace (see example below).<br>
|
||||
* This param will require CPU features on the CPU section.<br>
|
||||
* The features listed in this property must be separated by a blank space (see example below).<br>
|
||||
* Possible values: vmx vme <br>
|
||||
* Data type: String.<br>
|
||||
* Default value: <code>null</code>
|
||||
@ -617,10 +557,10 @@ public class AgentProperties{
|
||||
/**
|
||||
* This parameter specifies if the host must be rebooted when something goes wrong with the heartbeat.<br>
|
||||
* Data type: Boolean.<br>
|
||||
* Default value: <code>false</code>
|
||||
* Default value: <code>true</code>
|
||||
*/
|
||||
public static final Property<Boolean> REBOOT_HOST_AND_ALERT_MANAGEMENT_ON_HEARTBEAT_TIMEOUT
|
||||
= new Property<>("reboot.host.and.alert.management.on.heartbeat.timeout", false);
|
||||
= new Property<>("reboot.host.and.alert.management.on.heartbeat.timeout", true);
|
||||
|
||||
/**
|
||||
* Enables manually setting CPU's topology on KVM's VM. <br>
|
||||
@ -818,44 +758,6 @@ public class AgentProperties{
|
||||
*/
|
||||
public static final Property<Boolean> VIRTV2V_VERBOSE_ENABLED = new Property<>("virtv2v.verbose.enabled", false);
|
||||
|
||||
/**
|
||||
* Set env TMPDIR var for virt-v2v Instance Conversion from VMware to KVM
|
||||
* Data type: String.<br>
|
||||
* Default value: <code>null</code>
|
||||
*/
|
||||
public static final Property<String> CONVERT_ENV_TMPDIR = new Property<>("convert.instance.env.tmpdir", null, String.class);
|
||||
|
||||
/**
|
||||
* Set env VIRT_V2V_TMPDIR var for virt-v2v Instance Conversion from VMware to KVM
|
||||
* Data type: String.<br>
|
||||
* Default value: <code>null</code>
|
||||
*/
|
||||
public static final Property<String> CONVERT_ENV_VIRTV2V_TMPDIR = new Property<>("convert.instance.env.virtv2v.tmpdir", null, String.class);
|
||||
|
||||
/**
|
||||
* Path to the VDDK library directory on the KVM conversion host, used when converting VMs from VMware to KVM via VDDK.
|
||||
* This directory is passed to virt-v2v as <code>-io vddk-libdir=<path></code>.
|
||||
* Data type: String.<br>
|
||||
* Default value: <code>null</code>
|
||||
*/
|
||||
public static final Property<String> VDDK_LIB_DIR = new Property<>("vddk.lib.dir", null, String.class);
|
||||
|
||||
/**
|
||||
* Ordered list of VDDK transports for virt-v2v, passed as <code>-io vddk-transports=<value></code>.
|
||||
* Example: <code>nbd:nbdssl</code>.
|
||||
* Data type: String.<br>
|
||||
* Default value: <code>null</code>
|
||||
*/
|
||||
public static final Property<String> VDDK_TRANSPORTS = new Property<>("vddk.transports", null, String.class);
|
||||
|
||||
/**
|
||||
* vCenter TLS certificate thumbprint used by virt-v2v VDDK mode, passed as <code>-io vddk-thumbprint=<value></code>.
|
||||
* If unset, the KVM host computes it at runtime from the vCenter endpoint.
|
||||
* Data type: String.<br>
|
||||
* Default value: <code>null</code>
|
||||
*/
|
||||
public static final Property<String> VDDK_THUMBPRINT = new Property<>("vddk.thumbprint", null, String.class);
|
||||
|
||||
/**
|
||||
* BGP controll CIDR
|
||||
* Data type: String.<br>
|
||||
@ -914,57 +816,7 @@ public class AgentProperties{
|
||||
* Data type: Integer.<br>
|
||||
* Default value: <code>null</code>
|
||||
*/
|
||||
public static final Property<Integer> SSL_HANDSHAKE_TIMEOUT = new Property<>("ssl.handshake.timeout", 30, Integer.class);
|
||||
|
||||
/**
|
||||
* Timeout (in seconds) to wait for the incremental snapshot to complete.
|
||||
* */
|
||||
public static final Property<Integer> INCREMENTAL_SNAPSHOT_TIMEOUT = new Property<>("incremental.snapshot.timeout", 10800);
|
||||
|
||||
/**
|
||||
* Timeout (in seconds) to wait for the snapshot reversion to complete.
|
||||
* */
|
||||
public static final Property<Integer> REVERT_SNAPSHOT_TIMEOUT = new Property<>("revert.snapshot.timeout", 10800);
|
||||
|
||||
/**
|
||||
* If set to true, creates VMs as full clones of their templates on KVM hypervisor. Creates as linked clones otherwise. <br>
|
||||
* Data type: Boolean. <br>
|
||||
* Default value: <code>false</code>
|
||||
*/
|
||||
public static final Property<Boolean> CREATE_FULL_CLONE = new Property<>("create.full.clone", false);
|
||||
|
||||
/**
|
||||
* Time, in seconds, to wait before retrying to rebase during the incremental snapshot process.
|
||||
* */
|
||||
public static final Property<Integer> INCREMENTAL_SNAPSHOT_RETRY_REBASE_WAIT = new Property<>("incremental.snapshot.retry.rebase.wait", 60);
|
||||
|
||||
/**
|
||||
* When set to <code>true</code>, executes <code>modifymacip.sh</code> (resolved via the
|
||||
* network scripts directory) on VM NIC plug (VM start) and unplug (VM stop) to manage static
|
||||
* ARP/NDP entries and host routes for VM interfaces.<br>
|
||||
* The script is invoked with:<br>
|
||||
* add: <code>-o add -b <bridge> -m <mac> [-4 <ipv4>] [-6 <ipv6>]</code><br>
|
||||
* delete: <code>-o delete -b <bridge> -m <mac></code><br>
|
||||
* A bundled reference implementation is available at
|
||||
* <code>scripts/vm/network/vnet/modifymacip.sh</code>.<br>
|
||||
* Set to <code>false</code> or leave unset to disable this feature.<br>
|
||||
* Data type: Boolean.<br>
|
||||
* Default value: <code>false</code>
|
||||
*/
|
||||
public static final Property<Boolean> VM_NETWORK_MACIP_STATIC = new Property<>("vm.network.macip.static", false, Boolean.class);
|
||||
|
||||
|
||||
/**
|
||||
* Maximum number of backup validation jobs that can be executed at the same time. Values lower than 0 remove the limit, meaning that as many validations as possible will be done at
|
||||
* the same time.
|
||||
*/
|
||||
public static final Property<Integer> BACKUP_VALIDATION_MAX_CONCURRENT_OPERATIONS_PER_HOST = new Property<>("backup.validation.max.concurrent.operations.per.host", null, Integer.class);
|
||||
|
||||
/**
|
||||
* Maximum number of backup compression jobs that can be executed at the same time. Values lower than 0 remove the limit, meaning that as many compressions as possible will be
|
||||
* done at the same time.
|
||||
*/
|
||||
public static final Property<Integer> BACKUP_COMPRESSION_MAX_CONCURRENT_OPERATIONS_PER_HOST = new Property<>("backup.compression.max.concurrent.operations.per.host", null, Integer.class);
|
||||
public static final Property<Integer> SSL_HANDSHAKE_TIMEOUT = new Property<>("ssl.handshake.timeout", null, Integer.class);
|
||||
|
||||
public static class Property <T>{
|
||||
private String name;
|
||||
|
||||
@ -20,6 +20,7 @@ import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.UUID;
|
||||
|
||||
import com.cloud.agent.IAgentControl;
|
||||
import com.cloud.agent.api.Answer;
|
||||
@ -39,7 +40,6 @@ import com.cloud.resource.ServerResource;
|
||||
import com.cloud.storage.Storage;
|
||||
import com.cloud.storage.Storage.StoragePoolType;
|
||||
import com.cloud.utils.StringUtils;
|
||||
import com.cloud.utils.UuidUtils;
|
||||
|
||||
public class DummyResource implements ServerResource {
|
||||
String _name;
|
||||
@ -133,7 +133,7 @@ public class DummyResource implements ServerResource {
|
||||
String hostIp = getConfiguredProperty("private.ip.address", "127.0.0.1");
|
||||
String localStoragePath = getConfiguredProperty("local.storage.path", "/mnt");
|
||||
String lh = hostIp + localStoragePath;
|
||||
String uuid = UuidUtils.nameUUIDFromBytes(lh.getBytes(StringUtils.getPreferredCharset())).toString();
|
||||
String uuid = UUID.nameUUIDFromBytes(lh.getBytes(StringUtils.getPreferredCharset())).toString();
|
||||
|
||||
String capacity = getConfiguredProperty("local.storage.capacity", "1000000000");
|
||||
String available = getConfiguredProperty("local.storage.avail", "10000000");
|
||||
|
||||
@ -175,12 +175,12 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe
|
||||
try {
|
||||
is.close();
|
||||
} catch (final IOException e) {
|
||||
logger.warn("Exception when closing , console proxy address: {}", proxyManagementIp);
|
||||
logger.warn("Exception when closing , console proxy address : {}", proxyManagementIp);
|
||||
success = false;
|
||||
}
|
||||
}
|
||||
} catch (final IOException e) {
|
||||
logger.warn("Unable to open console proxy command port url, console proxy address: {}", proxyManagementIp);
|
||||
logger.warn("Unable to open console proxy command port url, console proxy address : {}", proxyManagementIp);
|
||||
success = false;
|
||||
}
|
||||
|
||||
@ -331,7 +331,7 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe
|
||||
final Object resource = this;
|
||||
logger.info("Building class loader for com.cloud.consoleproxy.ConsoleProxy");
|
||||
if (consoleProxyMain == null) {
|
||||
logger.info("Running com.cloud.consoleproxy.ConsoleProxy");
|
||||
logger.info("Running com.cloud.consoleproxy.ConsoleProxy with encryptor password={}", encryptorPassword);
|
||||
consoleProxyMain = new Thread(new ManagedContextRunnable() {
|
||||
@Override
|
||||
protected void runInContext() {
|
||||
@ -397,8 +397,9 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe
|
||||
}
|
||||
|
||||
public String authenticateConsoleAccess(String host, String port, String vmId, String sid, String ticket,
|
||||
Boolean isReauthentication, String sessionToken, String clientAddress) {
|
||||
ConsoleAccessAuthenticationCommand cmd = new ConsoleAccessAuthenticationCommand(host, port, vmId, sid, ticket, sessionToken, clientAddress);
|
||||
Boolean isReauthentication, String sessionToken) {
|
||||
|
||||
ConsoleAccessAuthenticationCommand cmd = new ConsoleAccessAuthenticationCommand(host, port, vmId, sid, ticket, sessionToken);
|
||||
cmd.setReauthenticating(isReauthentication);
|
||||
|
||||
ConsoleProxyAuthenticationResult result = new ConsoleProxyAuthenticationResult();
|
||||
|
||||
@ -358,7 +358,7 @@ public class AgentShellTest {
|
||||
AgentShell shell = new AgentShell();
|
||||
shell.setHosts("test");
|
||||
shell.getNextHost();
|
||||
shell.updateConnectedHost("test");
|
||||
shell.updateConnectedHost();
|
||||
|
||||
Assert.assertEquals(expected, shell.getConnectedHost());
|
||||
}
|
||||
|
||||
@ -24,7 +24,7 @@
|
||||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<version>4.23.0.0-SNAPSHOT</version>
|
||||
<version>4.20.2.0</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
@ -71,11 +71,6 @@
|
||||
<artifactId>cloud-framework-direct-download</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloud-framework-kms</artifactId>
|
||||
<version>${project.version}</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
<build>
|
||||
<plugins>
|
||||
|
||||
@ -19,10 +19,9 @@ package com.cloud.agent.api;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import com.cloud.agent.api.LogLevel.Log4jLevel;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
|
||||
/**
|
||||
* implemented by classes that extends the Command class. Command specifies
|
||||
@ -36,23 +35,6 @@ public abstract class Command {
|
||||
Continue, Stop
|
||||
}
|
||||
|
||||
public enum State {
|
||||
CREATED, // Command is created by management server
|
||||
STARTED, // Command is started by agent
|
||||
PROCESSING, // Processing by agent
|
||||
PROCESSING_IN_BACKEND, // Processing in backend by agent
|
||||
COMPLETED, // Operation succeeds by agent or management server
|
||||
FAILED, // Operation fails by agent
|
||||
RECONCILE_RETRY, // Ready for retry of reconciliation
|
||||
RECONCILING, // Being reconciled by management server
|
||||
RECONCILED, // Reconciled by management server
|
||||
RECONCILE_SKIPPED, // Skip the reconciliation as the resource state is inconsistent with the command
|
||||
RECONCILE_FAILED, // Fail to reconcile by management server
|
||||
TIMED_OUT, // Timed out on management server or agent
|
||||
INTERRUPTED, // Interrupted by management server or agent (for example agent is restarted),
|
||||
DANGLED_IN_BACKEND // Backend process which cannot be processed normally (for example agent is restarted)
|
||||
}
|
||||
|
||||
public static final String HYPERVISOR_TYPE = "hypervisorType";
|
||||
|
||||
// allow command to carry over hypervisor or other environment related context info
|
||||
@ -60,8 +42,6 @@ public abstract class Command {
|
||||
protected Map<String, String> contextMap = new HashMap<String, String>();
|
||||
private int wait; //in second
|
||||
private boolean bypassHostMaintenance = false;
|
||||
private transient long requestSequence = 0L;
|
||||
protected Map<String, Map<String, String>> externalDetails;
|
||||
|
||||
protected Command() {
|
||||
this.wait = 0;
|
||||
@ -102,10 +82,6 @@ public abstract class Command {
|
||||
return contextMap.get(name);
|
||||
}
|
||||
|
||||
public Map<String, String> getContextMap() {
|
||||
return contextMap;
|
||||
}
|
||||
|
||||
public boolean allowCaching() {
|
||||
return true;
|
||||
}
|
||||
@ -118,26 +94,6 @@ public abstract class Command {
|
||||
this.bypassHostMaintenance = bypassHostMaintenance;
|
||||
}
|
||||
|
||||
public boolean isReconcile() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public long getRequestSequence() {
|
||||
return requestSequence;
|
||||
}
|
||||
|
||||
public void setRequestSequence(long requestSequence) {
|
||||
this.requestSequence = requestSequence;
|
||||
}
|
||||
|
||||
public void setExternalDetails(Map<String, Map<String, String>> externalDetails) {
|
||||
this.externalDetails = externalDetails;
|
||||
}
|
||||
|
||||
public Map<String, Map<String, String>> getExternalDetails() {
|
||||
return externalDetails;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object o) {
|
||||
if (this == o) return true;
|
||||
|
||||
@ -15,24 +15,10 @@
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package com.cloud.agent.api;
|
||||
|
||||
import org.apache.cloudstack.gpu.GpuDevice;
|
||||
|
||||
public class VgpuTypesInfo {
|
||||
|
||||
private boolean passthroughEnabled = true;
|
||||
private GpuDevice.DeviceType deviceType;
|
||||
private String parentBusAddress;
|
||||
private String busAddress;
|
||||
private String numaNode;
|
||||
private String pciRoot;
|
||||
private String deviceId;
|
||||
private String deviceName;
|
||||
private String vendorId;
|
||||
private String vendorName;
|
||||
private String modelName;
|
||||
private String groupName;
|
||||
private String vmName;
|
||||
private Long maxHeads;
|
||||
private Long videoRam;
|
||||
private Long maxResolutionX;
|
||||
@ -40,7 +26,6 @@ public class VgpuTypesInfo {
|
||||
private Long maxVgpuPerGpu;
|
||||
private Long remainingCapacity;
|
||||
private Long maxCapacity;
|
||||
private boolean display = false;
|
||||
|
||||
public String getModelName() {
|
||||
return modelName;
|
||||
@ -54,42 +39,22 @@ public class VgpuTypesInfo {
|
||||
return videoRam;
|
||||
}
|
||||
|
||||
public void setVideoRam(Long videoRam) {
|
||||
this.videoRam = videoRam;
|
||||
}
|
||||
|
||||
public Long getMaxHeads() {
|
||||
return maxHeads;
|
||||
}
|
||||
|
||||
public void setMaxHeads(Long maxHeads) {
|
||||
this.maxHeads = maxHeads;
|
||||
}
|
||||
|
||||
public Long getMaxResolutionX() {
|
||||
return maxResolutionX;
|
||||
}
|
||||
|
||||
public void setMaxResolutionX(Long maxResolutionX) {
|
||||
this.maxResolutionX = maxResolutionX;
|
||||
}
|
||||
|
||||
public Long getMaxResolutionY() {
|
||||
return maxResolutionY;
|
||||
}
|
||||
|
||||
public void setMaxResolutionY(Long maxResolutionY) {
|
||||
this.maxResolutionY = maxResolutionY;
|
||||
}
|
||||
|
||||
public Long getMaxVpuPerGpu() {
|
||||
return maxVgpuPerGpu;
|
||||
}
|
||||
|
||||
public void setMaxVgpuPerGpu(Long maxVgpuPerGpu) {
|
||||
this.maxVgpuPerGpu = maxVgpuPerGpu;
|
||||
}
|
||||
|
||||
public Long getRemainingCapacity() {
|
||||
return remainingCapacity;
|
||||
}
|
||||
@ -106,133 +71,8 @@ public class VgpuTypesInfo {
|
||||
this.maxCapacity = maxCapacity;
|
||||
}
|
||||
|
||||
public boolean isPassthroughEnabled() {
|
||||
return passthroughEnabled;
|
||||
}
|
||||
|
||||
public void setPassthroughEnabled(boolean passthroughEnabled) {
|
||||
this.passthroughEnabled = passthroughEnabled;
|
||||
}
|
||||
|
||||
public GpuDevice.DeviceType getDeviceType() {
|
||||
return deviceType;
|
||||
}
|
||||
|
||||
public void setDeviceType(GpuDevice.DeviceType deviceType) {
|
||||
this.deviceType = deviceType;
|
||||
}
|
||||
|
||||
public String getParentBusAddress() {
|
||||
return parentBusAddress;
|
||||
}
|
||||
|
||||
public void setParentBusAddress(String parentBusAddress) {
|
||||
this.parentBusAddress = parentBusAddress;
|
||||
}
|
||||
|
||||
public String getBusAddress() {
|
||||
return busAddress;
|
||||
}
|
||||
|
||||
public void setBusAddress(String busAddress) {
|
||||
this.busAddress = busAddress;
|
||||
}
|
||||
|
||||
public String getNumaNode() {
|
||||
return numaNode;
|
||||
}
|
||||
|
||||
public void setNumaNode(String numaNode) {
|
||||
this.numaNode = numaNode;
|
||||
}
|
||||
|
||||
public String getPciRoot() {
|
||||
return pciRoot;
|
||||
}
|
||||
|
||||
public void setPciRoot(String pciRoot) {
|
||||
this.pciRoot = pciRoot;
|
||||
}
|
||||
|
||||
public String getDeviceId() {
|
||||
return deviceId;
|
||||
}
|
||||
|
||||
public void setDeviceId(String deviceId) {
|
||||
this.deviceId = deviceId;
|
||||
}
|
||||
|
||||
public String getDeviceName() {
|
||||
return deviceName;
|
||||
}
|
||||
|
||||
public void setDeviceName(String deviceName) {
|
||||
this.deviceName = deviceName;
|
||||
}
|
||||
|
||||
public String getVendorId() {
|
||||
return vendorId;
|
||||
}
|
||||
|
||||
public void setVendorId(String vendorId) {
|
||||
this.vendorId = vendorId;
|
||||
}
|
||||
|
||||
public String getVendorName() {
|
||||
return vendorName;
|
||||
}
|
||||
|
||||
public void setVendorName(String vendorName) {
|
||||
this.vendorName = vendorName;
|
||||
}
|
||||
|
||||
public String getVmName() {
|
||||
return vmName;
|
||||
}
|
||||
|
||||
public void setVmName(String vmName) {
|
||||
this.vmName = vmName;
|
||||
}
|
||||
|
||||
public boolean isDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(boolean display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public VgpuTypesInfo(GpuDevice.DeviceType deviceType, String groupName, String modelName, String busAddress,
|
||||
String vendorId, String vendorName, String deviceId, String deviceName, String numaNode, String pciRoot
|
||||
) {
|
||||
this.deviceType = deviceType;
|
||||
this.groupName = groupName;
|
||||
this.modelName = modelName;
|
||||
this.busAddress = busAddress;
|
||||
this.deviceId = deviceId;
|
||||
this.deviceName = deviceName;
|
||||
this.vendorId = vendorId;
|
||||
this.vendorName = vendorName;
|
||||
this.numaNode = numaNode;
|
||||
this.pciRoot = pciRoot;
|
||||
}
|
||||
|
||||
public VgpuTypesInfo(GpuDevice.DeviceType deviceType, String groupName, String modelName, String busAddress,
|
||||
String vendorId, String vendorName, String deviceId, String deviceName
|
||||
) {
|
||||
this.deviceType = deviceType;
|
||||
this.groupName = groupName;
|
||||
this.modelName = modelName;
|
||||
this.busAddress = busAddress;
|
||||
this.deviceId = deviceId;
|
||||
this.deviceName = deviceName;
|
||||
this.vendorId = vendorId;
|
||||
this.vendorName = vendorName;
|
||||
}
|
||||
|
||||
public VgpuTypesInfo(String groupName, String modelName, Long videoRam, Long maxHeads, Long maxResolutionX,
|
||||
Long maxResolutionY, Long maxVgpuPerGpu, Long remainingCapacity, Long maxCapacity
|
||||
) {
|
||||
public VgpuTypesInfo(String groupName, String modelName, Long videoRam, Long maxHeads, Long maxResolutionX, Long maxResolutionY, Long maxVgpuPerGpu,
|
||||
Long remainingCapacity, Long maxCapacity) {
|
||||
this.groupName = groupName;
|
||||
this.modelName = modelName;
|
||||
this.videoRam = videoRam;
|
||||
|
||||
@ -119,7 +119,8 @@ public class OVFHelper {
|
||||
boolean password = StringUtils.isNotBlank(passStr) && passStr.equalsIgnoreCase("true");
|
||||
String label = ovfParser.getChildNodeValue(node, "Label");
|
||||
String description = ovfParser.getChildNodeValue(node, "Description");
|
||||
logger.debug("Creating OVF property index {} {} with key = {}", index, (category == null ? "" : " for category " + category), key);
|
||||
logger.debug("Creating OVF property index " + index + (category == null ? "" : " for category " + category)
|
||||
+ " with key = " + key);
|
||||
return new OVFPropertyTO(key, type, value, qualifiers, userConfigurable,
|
||||
label, description, password, index, category);
|
||||
}
|
||||
@ -151,7 +152,7 @@ public class OVFHelper {
|
||||
if (child.getNodeName().equalsIgnoreCase("Category") ||
|
||||
child.getNodeName().endsWith(":Category")) {
|
||||
lastCategoryFound = child.getTextContent();
|
||||
logger.info("Category found {}", lastCategoryFound);
|
||||
logger.info("Category found " + lastCategoryFound);
|
||||
} else if (child.getNodeName().equalsIgnoreCase("Property") ||
|
||||
child.getNodeName().endsWith(":Property")) {
|
||||
OVFPropertyTO prop = createOVFPropertyFromNode(child, propertyIndex, lastCategoryFound);
|
||||
@ -249,13 +250,13 @@ public class OVFHelper {
|
||||
int diskNumber = 0;
|
||||
for (OVFVirtualHardwareItemTO diskItem : diskHardwareItems) {
|
||||
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;
|
||||
}
|
||||
String diskId = extractDiskIdFromDiskHostResource(diskItem.getHostResource());
|
||||
OVFDisk diskDefinition = getDiskDefinitionFromDiskId(diskId, disks);
|
||||
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);
|
||||
DatadiskTO datadiskTO = generateDiskTO(fileDefinition, diskDefinition, ovfParentPath, diskNumber, diskItem);
|
||||
@ -277,8 +278,8 @@ public class OVFHelper {
|
||||
if (StringUtils.isNotBlank(path)) {
|
||||
File f = new File(path);
|
||||
if (!f.exists() || f.isDirectory()) {
|
||||
logger.error("One of the attached disk or ISOs does not exists {}", path);
|
||||
throw new InternalErrorException("One of the attached disk or ISOs as stated on OVF does not exists " + path);
|
||||
logger.error("One of the attached disk or iso does not exists " + path);
|
||||
throw new InternalErrorException("One of the attached disk or iso as stated on OVF does not exists " + path);
|
||||
}
|
||||
}
|
||||
Long capacity = disk != null ? disk._capacity : file._size;
|
||||
@ -333,7 +334,9 @@ public class OVFHelper {
|
||||
od._controller = getControllerType(items, od._diskId);
|
||||
vd.add(od);
|
||||
}
|
||||
logger.trace("Found {} disk definitions", vd.size());
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(String.format("found %d disk definitions",vd.size()));
|
||||
}
|
||||
return vd;
|
||||
}
|
||||
|
||||
@ -363,7 +366,9 @@ public class OVFHelper {
|
||||
vf.add(of);
|
||||
}
|
||||
}
|
||||
logger.trace("Found {} file definitions in {}", vf.size(), ovfFile.getPath());
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(String.format("found %d file definitions in %s",vf.size(), ovfFile.getPath()));
|
||||
}
|
||||
return vf;
|
||||
}
|
||||
|
||||
@ -501,7 +506,7 @@ public class OVFHelper {
|
||||
outfile.write(writer.toString());
|
||||
outfile.close();
|
||||
} catch (IOException | TransformerException e) {
|
||||
logger.info("Unexpected exception caught while rewriting OVF: {}", e.getMessage(), e);
|
||||
logger.info("Unexpected exception caught while rewriting OVF:" + e.getMessage(), e);
|
||||
throw new CloudRuntimeException(e);
|
||||
}
|
||||
}
|
||||
@ -517,7 +522,9 @@ public class OVFHelper {
|
||||
|
||||
public List<OVFNetworkTO> getNetPrerequisitesFromDocument(Document doc) throws InternalErrorException {
|
||||
if (doc == null) {
|
||||
logger.trace("No document to parse; returning no prerequisite networks");
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace("no document to parse; returning no prerequisite networks");
|
||||
}
|
||||
return Collections.emptyList();
|
||||
}
|
||||
|
||||
@ -533,7 +540,9 @@ public class OVFHelper {
|
||||
private void matchNicsToNets(Map<String, OVFNetworkTO> nets, Node systemElement) {
|
||||
final DocumentTraversal traversal = (DocumentTraversal) systemElement;
|
||||
final NodeIterator iterator = traversal.createNodeIterator(systemElement, NodeFilter.SHOW_ELEMENT, null, true);
|
||||
logger.trace("Starting out with {} network-prerequisites, parsing hardware", nets.size());
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(String.format("starting out with %d network-prerequisites, parsing hardware",nets.size()));
|
||||
}
|
||||
int nicCount = 0;
|
||||
for (Node n = iterator.nextNode(); n != null; n = iterator.nextNode()) {
|
||||
final Element e = (Element) n;
|
||||
@ -541,7 +550,9 @@ public class OVFHelper {
|
||||
nicCount++;
|
||||
String name = e.getTextContent(); // should be in our nets
|
||||
if(nets.get(name) == null) {
|
||||
logger.info("Found a NIC definition without a Network definition by name {}, adding it to the list.", name);
|
||||
if(logger.isInfoEnabled()) {
|
||||
logger.info(String.format("found a nic definition without a network definition byname %s, adding it to the list.", name));
|
||||
}
|
||||
nets.put(name, new OVFNetworkTO());
|
||||
}
|
||||
OVFNetworkTO thisNet = nets.get(name);
|
||||
@ -550,7 +561,9 @@ public class OVFHelper {
|
||||
}
|
||||
}
|
||||
}
|
||||
logger.trace("Ending up with {} network-prerequisites, parsed {} nics", nets.size(), nicCount);
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(String.format("ending up with %d network-prerequisites, parsed %d nics", nets.size(), nicCount));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@ -572,7 +585,7 @@ public class OVFHelper {
|
||||
int addressOnParent = Integer.parseInt(addressOnParentStr);
|
||||
nic.setAddressOnParent(addressOnParent);
|
||||
} catch (NumberFormatException e) {
|
||||
logger.warn("Encountered element of type \"AddressOnParent\", that could not be parse to an integer number: {}", addressOnParentStr);
|
||||
logger.warn("Encountered element of type \"AddressOnParent\", that could not be parse to an integer number: " + addressOnParentStr);
|
||||
}
|
||||
|
||||
boolean automaticAllocation = StringUtils.isNotBlank(automaticAllocationStr) && Boolean.parseBoolean(automaticAllocationStr);
|
||||
@ -584,7 +597,7 @@ public class OVFHelper {
|
||||
int instanceId = Integer.parseInt(instanceIdStr);
|
||||
nic.setInstanceID(instanceId);
|
||||
} catch (NumberFormatException e) {
|
||||
logger.warn("Encountered element of type \"InstanceID\", that could not be parse to an integer number: {}", instanceIdStr);
|
||||
logger.warn("Encountered element of type \"InstanceID\", that could not be parse to an integer number: " + instanceIdStr);
|
||||
}
|
||||
|
||||
nic.setResourceSubType(resourceSubType);
|
||||
@ -617,7 +630,9 @@ public class OVFHelper {
|
||||
|
||||
nets.put(networkName,network);
|
||||
}
|
||||
logger.trace("Found {} Networks in Template", nets.size());
|
||||
if (logger.isTraceEnabled()) {
|
||||
logger.trace(String.format("found %d networks in template", nets.size()));
|
||||
}
|
||||
return nets;
|
||||
}
|
||||
|
||||
@ -756,7 +771,7 @@ public class OVFHelper {
|
||||
try {
|
||||
return Long.parseLong(value);
|
||||
} catch (NumberFormatException e) {
|
||||
logger.debug("Could not parse the value: {}, ignoring it", value);
|
||||
logger.debug("Could not parse the value: " + value + ", ignoring it");
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@ -767,7 +782,7 @@ public class OVFHelper {
|
||||
try {
|
||||
return Integer.parseInt(value);
|
||||
} catch (NumberFormatException e) {
|
||||
logger.debug("Could not parse the value: {}, ignoring it", value);
|
||||
logger.debug("Could not parse the value: " + value + ", ignoring it");
|
||||
}
|
||||
}
|
||||
return null;
|
||||
@ -805,7 +820,7 @@ public class OVFHelper {
|
||||
try {
|
||||
compressedLicense = compressOVFEula(eulaLicense);
|
||||
} catch (IOException e) {
|
||||
logger.error("Could not compress the license for info {}", eulaInfo);
|
||||
logger.error("Could not compress the license for info " + eulaInfo);
|
||||
continue;
|
||||
}
|
||||
OVFEulaSectionTO eula = new OVFEulaSectionTO(eulaInfo, compressedLicense, eulaIndex);
|
||||
|
||||
@ -54,7 +54,7 @@ public class OVFParser {
|
||||
documentBuilderFactory.setNamespaceAware(true);
|
||||
documentBuilder = documentBuilderFactory.newDocumentBuilder();
|
||||
} catch (ParserConfigurationException e) {
|
||||
logger.error("Cannot start the OVF parser: {}", e.getMessage(), e);
|
||||
logger.error("Cannot start the OVF parser: " + e.getMessage(), e);
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,7 +70,7 @@ public class OVFParser {
|
||||
try {
|
||||
return documentBuilder.parse(new File(ovfFilePath));
|
||||
} catch (SAXException | IOException e) {
|
||||
logger.error("Error parsing {} {}", ovfFilePath, e.getMessage(), e);
|
||||
logger.error("Error parsing " + ovfFilePath + " " + e.getMessage(), e);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,13 +26,10 @@ public final class BucketTO {
|
||||
|
||||
private String secretKey;
|
||||
|
||||
private long accountId;
|
||||
|
||||
public BucketTO(Bucket bucket) {
|
||||
this.name = bucket.getName();
|
||||
this.accessKey = bucket.getAccessKey();
|
||||
this.secretKey = bucket.getSecretKey();
|
||||
this.accountId = bucket.getAccountId();
|
||||
}
|
||||
|
||||
public BucketTO(String name) {
|
||||
@ -50,8 +47,4 @@ public final class BucketTO {
|
||||
public String getSecretKey() {
|
||||
return this.secretKey;
|
||||
}
|
||||
|
||||
public long getAccountId() {
|
||||
return this.accountId;
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,5 +19,5 @@
|
||||
package com.cloud.agent.api.to;
|
||||
|
||||
public enum DataObjectType {
|
||||
VOLUME, SNAPSHOT, TEMPLATE, ARCHIVE, BACKUP
|
||||
VOLUME, SNAPSHOT, TEMPLATE, ARCHIVE
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ public class DiskTO {
|
||||
private Long diskSeq;
|
||||
private String path;
|
||||
private Volume.Type type;
|
||||
private Map<String, String> details;
|
||||
private Map<String, String> _details;
|
||||
|
||||
public DiskTO() {
|
||||
|
||||
@ -92,10 +92,10 @@ public class DiskTO {
|
||||
}
|
||||
|
||||
public void setDetails(Map<String, String> details) {
|
||||
this.details = details;
|
||||
_details = details;
|
||||
}
|
||||
|
||||
public Map<String, String> getDetails() {
|
||||
return details;
|
||||
return _details;
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ public class FirewallRuleTO implements InternalIdentity {
|
||||
int[] srcPortRange;
|
||||
boolean revoked;
|
||||
boolean alreadyAdded;
|
||||
protected List<String> sourceCidrList;
|
||||
private List<String> sourceCidrList;
|
||||
private List<String> destCidrList;
|
||||
FirewallRule.Purpose purpose;
|
||||
private Integer icmpType;
|
||||
|
||||
@ -16,9 +16,7 @@
|
||||
// under the License.
|
||||
package com.cloud.agent.api.to;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
|
||||
import com.cloud.agent.api.VgpuTypesInfo;
|
||||
|
||||
@ -26,23 +24,9 @@ public class GPUDeviceTO {
|
||||
|
||||
private String gpuGroup;
|
||||
private String vgpuType;
|
||||
private int gpuCount;
|
||||
private HashMap<String, HashMap<String, VgpuTypesInfo>> groupDetails = new HashMap<String, HashMap<String, VgpuTypesInfo>>();
|
||||
private List<VgpuTypesInfo> gpuDevices = new ArrayList<>();
|
||||
|
||||
public GPUDeviceTO(String gpuGroup, String vgpuType, int gpuCount,
|
||||
HashMap<String, HashMap<String, VgpuTypesInfo>> groupDetails,
|
||||
List<VgpuTypesInfo> gpuDevices) {
|
||||
this.gpuGroup = gpuGroup;
|
||||
this.vgpuType = vgpuType;
|
||||
this.groupDetails = groupDetails;
|
||||
this.gpuCount = gpuCount;
|
||||
this.gpuDevices = gpuDevices;
|
||||
|
||||
}
|
||||
|
||||
public GPUDeviceTO(String gpuGroup, String vgpuType,
|
||||
HashMap<String, HashMap<String, VgpuTypesInfo>> groupDetails) {
|
||||
public GPUDeviceTO( String gpuGroup, String vgpuType, HashMap<String, HashMap<String, VgpuTypesInfo>> groupDetails) {
|
||||
this.gpuGroup = gpuGroup;
|
||||
this.vgpuType = vgpuType;
|
||||
this.groupDetails = groupDetails;
|
||||
@ -64,14 +48,6 @@ public class GPUDeviceTO {
|
||||
this.vgpuType = vgpuType;
|
||||
}
|
||||
|
||||
public int getGpuCount() {
|
||||
return gpuCount;
|
||||
}
|
||||
|
||||
public void setGpuCount(int gpuCount) {
|
||||
this.gpuCount = gpuCount;
|
||||
}
|
||||
|
||||
public HashMap<String, HashMap<String, VgpuTypesInfo>> getGroupDetails() {
|
||||
return groupDetails;
|
||||
}
|
||||
@ -80,11 +56,4 @@ public class GPUDeviceTO {
|
||||
this.groupDetails = groupDetails;
|
||||
}
|
||||
|
||||
public List<VgpuTypesInfo> getGpuDevices() {
|
||||
return gpuDevices;
|
||||
}
|
||||
|
||||
public void setGpuDevices(List<VgpuTypesInfo> gpuDevices) {
|
||||
this.gpuDevices = gpuDevices;
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,7 +71,7 @@ public class LoadBalancerTO {
|
||||
this.destinations = new DestinationTO[destinations.size()];
|
||||
this.stickinessPolicies = null;
|
||||
this.sslCert = null;
|
||||
this.lbProtocol = protocol;
|
||||
this.lbProtocol = null;
|
||||
int i = 0;
|
||||
for (LbDestination destination : destinations) {
|
||||
this.destinations[i++] = new DestinationTO(destination.getIpAddress(), destination.getDestinationPortStart(), destination.isRevoked(), false);
|
||||
@ -205,10 +205,6 @@ public class LoadBalancerTO {
|
||||
return this.sslCert;
|
||||
}
|
||||
|
||||
public void setLbSslCert(LbSslCert sslCert) {
|
||||
this.sslCert = sslCert;
|
||||
}
|
||||
|
||||
public String getSrcIpVlan() {
|
||||
return srcIpVlan;
|
||||
}
|
||||
|
||||
@ -36,7 +36,7 @@ public class NetworkTO {
|
||||
protected TrafficType type;
|
||||
protected URI broadcastUri;
|
||||
protected URI isolationUri;
|
||||
protected boolean securityGroupEnabled;
|
||||
protected boolean isSecurityGroupEnabled;
|
||||
protected String name;
|
||||
protected String ip6address;
|
||||
protected String ip6gateway;
|
||||
@ -112,7 +112,7 @@ public class NetworkTO {
|
||||
}
|
||||
|
||||
public void setSecurityGroupEnabled(boolean enabled) {
|
||||
this.securityGroupEnabled = enabled;
|
||||
this.isSecurityGroupEnabled = enabled;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -221,7 +221,7 @@ public class NetworkTO {
|
||||
}
|
||||
|
||||
public boolean isSecurityGroupEnabled() {
|
||||
return this.securityGroupEnabled;
|
||||
return this.isSecurityGroupEnabled;
|
||||
}
|
||||
|
||||
public void setIp6Dns1(String ip6Dns1) {
|
||||
|
||||
@ -33,7 +33,6 @@ public class NicTO extends NetworkTO {
|
||||
boolean dpdkEnabled;
|
||||
Integer mtu;
|
||||
Long networkId;
|
||||
boolean enabled;
|
||||
|
||||
String networkSegmentName;
|
||||
|
||||
@ -87,14 +86,6 @@ public class NicTO extends NetworkTO {
|
||||
this.nicUuid = uuid;
|
||||
}
|
||||
|
||||
public String getNicUuid() {
|
||||
return nicUuid;
|
||||
}
|
||||
|
||||
public void setNicUuid(String nicUuid) {
|
||||
this.nicUuid = nicUuid;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return new StringBuilder("[Nic:").append(type).append("-").append(ip).append("-").append(broadcastUri).append("]").toString();
|
||||
@ -155,12 +146,4 @@ public class NicTO extends NetworkTO {
|
||||
public void setNetworkSegmentName(String networkSegmentName) {
|
||||
this.networkSegmentName = networkSegmentName;
|
||||
}
|
||||
|
||||
public boolean isEnabled() {
|
||||
return enabled;
|
||||
}
|
||||
|
||||
public void setEnabled(boolean enabled) {
|
||||
this.enabled = enabled;
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,6 +21,8 @@ import com.cloud.network.rules.PortForwardingRule;
|
||||
import com.cloud.utils.net.NetUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* PortForwardingRuleTO specifies one port forwarding rule.
|
||||
*
|
||||
@ -30,6 +32,8 @@ public class PortForwardingRuleTO extends FirewallRuleTO {
|
||||
String dstIp;
|
||||
int[] dstPortRange;
|
||||
|
||||
List<String> sourceCidrList;
|
||||
|
||||
protected PortForwardingRuleTO() {
|
||||
super();
|
||||
}
|
||||
|
||||
@ -36,17 +36,13 @@ public class RemoteInstanceTO implements Serializable {
|
||||
private String vcenterPassword;
|
||||
private String vcenterHost;
|
||||
private String datacenterName;
|
||||
private String clusterName;
|
||||
private String hostName;
|
||||
|
||||
public RemoteInstanceTO() {
|
||||
}
|
||||
|
||||
public RemoteInstanceTO(String instanceName, String clusterName, String hostName) {
|
||||
public RemoteInstanceTO(String instanceName) {
|
||||
this.hypervisorType = Hypervisor.HypervisorType.VMware;
|
||||
this.instanceName = instanceName;
|
||||
this.clusterName = clusterName;
|
||||
this.hostName = hostName;
|
||||
}
|
||||
|
||||
public RemoteInstanceTO(String instanceName, String instancePath, String vcenterHost, String vcenterUsername, String vcenterPassword, String datacenterName) {
|
||||
@ -59,12 +55,6 @@ public class RemoteInstanceTO implements Serializable {
|
||||
this.datacenterName = datacenterName;
|
||||
}
|
||||
|
||||
public RemoteInstanceTO(String instanceName, String instancePath, String vcenterHost, String vcenterUsername, String vcenterPassword, String datacenterName, String clusterName, String hostName) {
|
||||
this(instanceName, instancePath, vcenterHost, vcenterUsername, vcenterPassword, datacenterName);
|
||||
this.clusterName = clusterName;
|
||||
this.hostName = hostName;
|
||||
}
|
||||
|
||||
public Hypervisor.HypervisorType getHypervisorType() {
|
||||
return this.hypervisorType;
|
||||
}
|
||||
@ -92,12 +82,4 @@ public class RemoteInstanceTO implements Serializable {
|
||||
public String getDatacenterName() {
|
||||
return datacenterName;
|
||||
}
|
||||
|
||||
public String getClusterName() {
|
||||
return clusterName;
|
||||
}
|
||||
|
||||
public String getHostName() {
|
||||
return hostName;
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,182 +0,0 @@
|
||||
// Licensed to the Apache Software Foundation (ASF) under one
|
||||
// or more contributor license agreements. See the NOTICE file
|
||||
// distributed with this work for additional information
|
||||
// regarding copyright ownership. The ASF licenses this file
|
||||
// to you under the Apache License, Version 2.0 (the
|
||||
// "License"); you may not use this file except in compliance
|
||||
// with the License. You may obtain a copy of the License at
|
||||
//
|
||||
// http://www.apache.org/licenses/LICENSE-2.0
|
||||
//
|
||||
// Unless required by applicable law or agreed to in writing,
|
||||
// software distributed under the License is distributed on an
|
||||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
// KIND, either express or implied. See the License for the
|
||||
// specific language governing permissions and limitations
|
||||
// under the License.
|
||||
package com.cloud.agent.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; }
|
||||
}
|
||||
@ -19,22 +19,20 @@ package com.cloud.agent.api.to;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.HashMap;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.cloud.agent.api.LogLevel;
|
||||
import com.cloud.network.element.NetworkElement;
|
||||
import com.cloud.template.VirtualMachineTemplate.BootloaderType;
|
||||
import com.cloud.vm.VirtualMachine;
|
||||
import com.cloud.vm.VirtualMachine.Type;
|
||||
import com.cloud.vm.VmDetailConstants;
|
||||
|
||||
public class VirtualMachineTO {
|
||||
private long id;
|
||||
private String name;
|
||||
private BootloaderType bootloader;
|
||||
private VirtualMachine.State state;
|
||||
private Type type;
|
||||
private int cpus;
|
||||
Type type;
|
||||
int cpus;
|
||||
|
||||
/**
|
||||
'speed' is still here since 4.0.X/4.1.X management servers do not support
|
||||
@ -45,52 +43,49 @@ public class VirtualMachineTO {
|
||||
So this is here for backwards compatibility with 4.0.X/4.1.X management servers
|
||||
and newer agents.
|
||||
*/
|
||||
private Integer speed;
|
||||
private Integer minSpeed;
|
||||
private Integer maxSpeed;
|
||||
Integer speed;
|
||||
Integer minSpeed;
|
||||
Integer maxSpeed;
|
||||
|
||||
private long minRam;
|
||||
private long maxRam;
|
||||
private long requestedRam;
|
||||
private String hostName;
|
||||
private String arch;
|
||||
private String os;
|
||||
private String platformEmulator;
|
||||
private String bootArgs;
|
||||
private String[] bootupScripts;
|
||||
private boolean enableHA;
|
||||
private boolean limitCpuUse;
|
||||
private boolean enableDynamicallyScaleVm;
|
||||
long minRam;
|
||||
long maxRam;
|
||||
String hostName;
|
||||
String arch;
|
||||
String os;
|
||||
String platformEmulator;
|
||||
String bootArgs;
|
||||
String[] bootupScripts;
|
||||
boolean enableHA;
|
||||
boolean limitCpuUse;
|
||||
boolean enableDynamicallyScaleVm;
|
||||
@LogLevel(LogLevel.Log4jLevel.Off)
|
||||
private String vncPassword;
|
||||
private String vncAddr;
|
||||
private Map<String, String> details;
|
||||
private Map<String, String> params;
|
||||
private String uuid;
|
||||
private String bootType;
|
||||
private String bootMode;
|
||||
private boolean enterHardwareSetup;
|
||||
String vncPassword;
|
||||
String vncAddr;
|
||||
Map<String, String> params;
|
||||
String uuid;
|
||||
String bootType;
|
||||
String bootMode;
|
||||
boolean enterHardwareSetup;
|
||||
|
||||
private DiskTO[] disks;
|
||||
private NicTO[] nics;
|
||||
private GPUDeviceTO gpuDevice;
|
||||
private Integer vcpuMaxLimit;
|
||||
private List<String[]> vmData = null;
|
||||
DiskTO[] disks;
|
||||
NicTO[] nics;
|
||||
GPUDeviceTO gpuDevice;
|
||||
Integer vcpuMaxLimit;
|
||||
List<String[]> vmData = null;
|
||||
|
||||
private String configDriveLabel = null;
|
||||
private String configDriveIsoRootFolder = null;
|
||||
private String configDriveIsoFile = null;
|
||||
private NetworkElement.Location configDriveLocation = NetworkElement.Location.SECONDARY;
|
||||
String configDriveLabel = null;
|
||||
String configDriveIsoRootFolder = null;
|
||||
String configDriveIsoFile = null;
|
||||
NetworkElement.Location configDriveLocation = NetworkElement.Location.SECONDARY;
|
||||
|
||||
private Double cpuQuotaPercentage = null;
|
||||
Double cpuQuotaPercentage = null;
|
||||
|
||||
private Map<String, String> guestOsDetails = new HashMap<String, String>();
|
||||
private Map<String, String> extraConfig = new HashMap<>();
|
||||
private Map<Long, String> networkIdToNetworkNameMap = new HashMap<>();
|
||||
private DeployAsIsInfoTO deployAsIsInfo;
|
||||
private String metadataManufacturer;
|
||||
private String metadataProductName;
|
||||
private VirtualMachineMetadataTO metadata;
|
||||
Map<String, String> guestOsDetails = new HashMap<String, String>();
|
||||
Map<String, String> extraConfig = new HashMap<>();
|
||||
Map<Long, String> networkIdToNetworkNameMap = new HashMap<>();
|
||||
DeployAsIsInfoTO deployAsIsInfo;
|
||||
String metadataManufacturer;
|
||||
String metadataProductName;
|
||||
|
||||
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) {
|
||||
@ -196,11 +191,7 @@ public class VirtualMachineTO {
|
||||
return maxSpeed;
|
||||
}
|
||||
|
||||
public boolean isEnableHA() {
|
||||
return enableHA;
|
||||
}
|
||||
|
||||
public boolean isLimitCpuUse() {
|
||||
public boolean getLimitCpuUse() {
|
||||
return limitCpuUse;
|
||||
}
|
||||
|
||||
@ -208,20 +199,15 @@ public class VirtualMachineTO {
|
||||
return minRam;
|
||||
}
|
||||
|
||||
public void setRam(long minRam, long maxRam, long requestedRam) {
|
||||
public void setRam(long minRam, long maxRam) {
|
||||
this.minRam = minRam;
|
||||
this.maxRam = maxRam;
|
||||
this.requestedRam = requestedRam;
|
||||
}
|
||||
|
||||
public long getMaxRam() {
|
||||
return maxRam;
|
||||
}
|
||||
|
||||
public long getRequestedRam() {
|
||||
return requestedRam;
|
||||
}
|
||||
|
||||
public String getHostName() {
|
||||
return hostName;
|
||||
}
|
||||
@ -270,10 +256,6 @@ public class VirtualMachineTO {
|
||||
this.bootupScripts = bootupScripts;
|
||||
}
|
||||
|
||||
public void setEnableHA(boolean enableHA) {
|
||||
this.enableHA = enableHA;
|
||||
}
|
||||
|
||||
public DiskTO[] getDisks() {
|
||||
return disks;
|
||||
}
|
||||
@ -307,11 +289,11 @@ public class VirtualMachineTO {
|
||||
}
|
||||
|
||||
public Map<String, String> getDetails() {
|
||||
return details;
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setDetails(Map<String, String> params) {
|
||||
this.details = params;
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
public String getUuid() {
|
||||
@ -449,42 +431,6 @@ public class VirtualMachineTO {
|
||||
this.deployAsIsInfo = deployAsIsInfo;
|
||||
}
|
||||
|
||||
public void setSpeed(Integer speed) {
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
public void setMinSpeed(Integer minSpeed) {
|
||||
this.minSpeed = minSpeed;
|
||||
}
|
||||
|
||||
public void setMaxSpeed(Integer maxSpeed) {
|
||||
this.maxSpeed = maxSpeed;
|
||||
}
|
||||
|
||||
public void setMinRam(long minRam) {
|
||||
this.minRam = minRam;
|
||||
}
|
||||
|
||||
public void setMaxRam(long maxRam) {
|
||||
this.maxRam = maxRam;
|
||||
}
|
||||
|
||||
public void setLimitCpuUse(boolean limitCpuUse) {
|
||||
this.limitCpuUse = limitCpuUse;
|
||||
}
|
||||
|
||||
public Map<String, String> getParams() {
|
||||
return params;
|
||||
}
|
||||
|
||||
public void setParams(Map<String, String> params) {
|
||||
this.params = params;
|
||||
}
|
||||
|
||||
public void setExtraConfig(Map<String, String> extraConfig) {
|
||||
this.extraConfig = extraConfig;
|
||||
}
|
||||
|
||||
public String getMetadataManufacturer() {
|
||||
return metadataManufacturer;
|
||||
}
|
||||
@ -501,28 +447,8 @@ public class VirtualMachineTO {
|
||||
this.metadataProductName = metadataProductName;
|
||||
}
|
||||
|
||||
public VirtualMachineMetadataTO getMetadata() {
|
||||
return metadata;
|
||||
}
|
||||
|
||||
public void setMetadata(VirtualMachineMetadataTO metadata) {
|
||||
this.metadata = metadata;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("VM {id: \"%s\", name: \"%s\", uuid: \"%s\", type: \"%s\"}", id, name, uuid, type);
|
||||
}
|
||||
|
||||
public Map<String, String> getExternalDetails() {
|
||||
if (details == null) {
|
||||
return new HashMap<>();
|
||||
}
|
||||
return details.entrySet().stream()
|
||||
.filter(entry -> entry.getKey().startsWith(VmDetailConstants.EXTERNAL_DETAIL_PREFIX))
|
||||
.collect(Collectors.toMap(
|
||||
entry -> entry.getKey().substring(VmDetailConstants.EXTERNAL_DETAIL_PREFIX.length()),
|
||||
Map.Entry::getValue
|
||||
));
|
||||
}
|
||||
}
|
||||
|
||||
@ -22,11 +22,19 @@ import com.cloud.deploy.DeploymentPlan;
|
||||
import com.cloud.deploy.DeploymentPlanner.ExcludeList;
|
||||
import com.cloud.host.Host;
|
||||
import com.cloud.host.Host.Type;
|
||||
import com.cloud.offering.ServiceOffering;
|
||||
import com.cloud.utils.component.Adapter;
|
||||
import com.cloud.vm.VirtualMachine;
|
||||
import com.cloud.vm.VirtualMachineProfile;
|
||||
|
||||
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
|
||||
* allocate the guest virtual machines on
|
||||
@ -41,6 +49,31 @@ public interface HostAllocator extends Adapter {
|
||||
|
||||
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
|
||||
* virtual machines on
|
||||
|
||||
@ -35,10 +35,10 @@ public class ListRecurringSnapshotScheduleCmd extends BaseListCmd {
|
||||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@Parameter(name = ApiConstants.SNAPSHOT_POLICY_ID, type = CommandType.LONG, description = "Lists recurring Snapshots by Snapshot policy ID")
|
||||
@Parameter(name = ApiConstants.SNAPSHOT_POLICY_ID, type = CommandType.LONG, description = "lists recurring snapshots by snapshot policy ID")
|
||||
private Long snapshotPolicyId;
|
||||
|
||||
@Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.LONG, required = true, description = "List recurring Snapshots by volume ID")
|
||||
@Parameter(name = ApiConstants.VOLUME_ID, type = CommandType.LONG, required = true, description = "list recurring snapshots by volume ID")
|
||||
private Long volumeId;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@ -34,17 +34,13 @@ public interface Capacity extends InternalIdentity, Identity {
|
||||
public static final short CAPACITY_TYPE_LOCAL_STORAGE = 9;
|
||||
public static final short CAPACITY_TYPE_VIRTUAL_NETWORK_IPV6_SUBNET = 10;
|
||||
public static final short CAPACITY_TYPE_GPU = 19;
|
||||
public static final short CAPACITY_TYPE_OBJECT_STORAGE = 20;
|
||||
public static final short CAPACITY_TYPE_BACKUP_STORAGE = 21;
|
||||
|
||||
public static final short CAPACITY_TYPE_CPU_CORE = 90;
|
||||
|
||||
public static final List<Short> STORAGE_CAPACITY_TYPES = List.of(CAPACITY_TYPE_STORAGE,
|
||||
CAPACITY_TYPE_STORAGE_ALLOCATED,
|
||||
CAPACITY_TYPE_SECONDARY_STORAGE,
|
||||
CAPACITY_TYPE_LOCAL_STORAGE,
|
||||
CAPACITY_TYPE_BACKUP_STORAGE,
|
||||
CAPACITY_TYPE_OBJECT_STORAGE);
|
||||
CAPACITY_TYPE_LOCAL_STORAGE);
|
||||
|
||||
public Long getHostOrPoolId();
|
||||
|
||||
|
||||
@ -17,25 +17,18 @@
|
||||
package com.cloud.configuration;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
import com.cloud.network.Network;
|
||||
import org.apache.cloudstack.api.ApiConstants;
|
||||
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.network.CloneNetworkOfferingCmd;
|
||||
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.CreateNetworkOfferingCmd;
|
||||
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.DeleteNetworkOfferingCmd;
|
||||
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.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.CreateServiceOfferingCmd;
|
||||
import org.apache.cloudstack.api.command.admin.offering.DeleteDiskOfferingCmd;
|
||||
@ -108,52 +101,39 @@ public interface ConfigurationService {
|
||||
*/
|
||||
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
|
||||
*
|
||||
* @param serviceOfferingId
|
||||
* @param userId
|
||||
* @param name
|
||||
* @param displayText
|
||||
* @param offerHA
|
||||
* @param useVirtualNetwork
|
||||
* @param tags
|
||||
* @return updated service offering
|
||||
*/
|
||||
ServiceOffering updateServiceOffering(UpdateServiceOfferingCmd cmd);
|
||||
|
||||
/**
|
||||
* Deletes a service offering
|
||||
*
|
||||
* @param userId
|
||||
* @param serviceOfferingId
|
||||
*/
|
||||
boolean deleteServiceOffering(DeleteServiceOfferingCmd cmd);
|
||||
|
||||
/**
|
||||
* Retrieve ID of domains for a service offering
|
||||
*
|
||||
* @param serviceOfferingId
|
||||
*/
|
||||
List<Long> getServiceOfferingDomains(Long serviceOfferingId);
|
||||
|
||||
/**
|
||||
* Retrieve ID of domains for a service offering
|
||||
*
|
||||
* @param serviceOfferingId
|
||||
*/
|
||||
List<Long> getServiceOfferingZones(Long serviceOfferingId);
|
||||
|
||||
@ -163,6 +143,7 @@ public interface ConfigurationService {
|
||||
* @param cmd
|
||||
* - the command specifying diskOfferingId, name, description, tags
|
||||
* @return updated disk offering
|
||||
* @throws
|
||||
*/
|
||||
DiskOffering updateDiskOffering(UpdateDiskOfferingCmd cmd);
|
||||
|
||||
@ -172,22 +153,34 @@ public interface ConfigurationService {
|
||||
* @param cmd
|
||||
* - the command specifying disk offering id
|
||||
* @return true or false
|
||||
* @throws
|
||||
*/
|
||||
boolean deleteDiskOffering(DeleteDiskOfferingCmd cmd);
|
||||
|
||||
/**
|
||||
* Creates a new disk offering
|
||||
*
|
||||
* @param domainId
|
||||
* @param name
|
||||
* @param description
|
||||
* @param numGibibytes
|
||||
* @param mirrored
|
||||
* @param size
|
||||
* @return ID
|
||||
*/
|
||||
DiskOffering createDiskOffering(CreateDiskOfferingCmd cmd);
|
||||
|
||||
/**
|
||||
* Retrieve ID of domains for a disk offering
|
||||
*
|
||||
* @param diskOfferingId
|
||||
*/
|
||||
List<Long> getDiskOfferingDomains(Long diskOfferingId);
|
||||
|
||||
/**
|
||||
* Retrieve ID of domains for a disk offering
|
||||
*
|
||||
* @param diskOfferingId
|
||||
*/
|
||||
List<Long> getDiskOfferingZones(Long diskOfferingId);
|
||||
|
||||
@ -208,10 +201,11 @@ public interface ConfigurationService {
|
||||
* TODO
|
||||
* @param allocationState
|
||||
* TODO
|
||||
* @param storageAccessGroups
|
||||
* @return the new pod if successful, null otherwise
|
||||
* @throws
|
||||
* @throws
|
||||
*/
|
||||
Pod createPod(long zoneId, String name, String startIp, String endIp, String gateway, String netmask, String allocationState, List<String> storageAccessGroups);
|
||||
Pod createPod(long zoneId, String name, String startIp, String endIp, String gateway, String netmask, String allocationState);
|
||||
|
||||
/**
|
||||
* Creates a mutual exclusive IP range in the pod with same gateway, netmask.
|
||||
@ -229,7 +223,8 @@ public interface ConfigurationService {
|
||||
/**
|
||||
* Updates a mutually exclusive IP range in the pod.
|
||||
* @param cmd - The command specifying pod ID, current Start IP, current End IP, new Start IP, new End IP.
|
||||
* @throws com.cloud.exception.ConcurrentOperationException when this pod is already being accessed
|
||||
* @throws com.cloud.exception.ConcurrentOperationException
|
||||
* @return Success
|
||||
*/
|
||||
void updatePodIpRange(UpdatePodManagementNetworkIpRangeCmd cmd) throws ConcurrentOperationException;
|
||||
|
||||
@ -250,6 +245,9 @@ public interface ConfigurationService {
|
||||
|
||||
/**
|
||||
* Edits a pod in the database. Will not allow you to edit pods that are being used anywhere in the system.
|
||||
*
|
||||
* @param UpdatePodCmd
|
||||
* api command
|
||||
*/
|
||||
Pod editPod(UpdatePodCmd cmd);
|
||||
|
||||
@ -259,12 +257,17 @@ public interface ConfigurationService {
|
||||
* @param cmd
|
||||
* - the command containing podId
|
||||
* @return true or false
|
||||
* @throws ,
|
||||
*/
|
||||
boolean deletePod(DeletePodCmd cmd);
|
||||
|
||||
/**
|
||||
* Creates a new zone
|
||||
*
|
||||
* @param cmd
|
||||
* @return the zone if successful, null otherwise
|
||||
* @throws
|
||||
* @throws
|
||||
*/
|
||||
DataCenter createZone(CreateZoneCmd cmd);
|
||||
|
||||
@ -287,7 +290,22 @@ public interface ConfigurationService {
|
||||
* Adds a VLAN to the database, along with an IP address range. Can add three types of VLANs: (1) zone-wide VLANs on
|
||||
* the
|
||||
* virtual public network (2) pod-wide direct attached VLANs (3) account-specific direct attached VLANs
|
||||
*
|
||||
* @param userId
|
||||
* @param vlanType
|
||||
* - either "DomR" (VLAN for a virtual public network) or "DirectAttached" (VLAN for IPs that will be
|
||||
* directly
|
||||
* attached to UserVMs)
|
||||
* @param zoneId
|
||||
* @param accountId
|
||||
* @param podId
|
||||
* @param add
|
||||
* @param vlanId
|
||||
* @param gateway
|
||||
* @param startIP
|
||||
* @param endIP
|
||||
* @throws ResourceAllocationException TODO
|
||||
* @throws
|
||||
* @return The new Vlan object
|
||||
*/
|
||||
Vlan createVlanAndPublicIpRange(CreateVlanIpRangeCmd cmd) throws InsufficientCapacityException, ConcurrentOperationException, ResourceUnavailableException,
|
||||
@ -302,6 +320,9 @@ public interface ConfigurationService {
|
||||
/**
|
||||
* Marks the account with the default zone-id.
|
||||
*
|
||||
* @param accountName
|
||||
* @param domainId
|
||||
* @param defaultZoneId
|
||||
* @return The new account object
|
||||
*/
|
||||
Account markDefaultZone(String accountName, long domainId, long defaultZoneId);
|
||||
@ -312,7 +333,7 @@ public interface ConfigurationService {
|
||||
|
||||
boolean releasePublicIpRange(ReleasePublicIpRangeCmd cmd);
|
||||
|
||||
NetworkOffering createNetworkOffering(NetworkOfferingBaseCmd cmd);
|
||||
NetworkOffering createNetworkOffering(CreateNetworkOfferingCmd cmd);
|
||||
|
||||
NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd);
|
||||
|
||||
@ -323,12 +344,14 @@ public interface ConfigurationService {
|
||||
/**
|
||||
* Retrieve ID of domains for a network offering
|
||||
*
|
||||
* @param networkOfferingId
|
||||
*/
|
||||
List<Long> getNetworkOfferingDomains(Long networkOfferingId);
|
||||
|
||||
/**
|
||||
* Retrieve ID of domains for a network offering
|
||||
*
|
||||
* @param networkOfferingId
|
||||
*/
|
||||
List<Long> getNetworkOfferingZones(Long networkOfferingId);
|
||||
|
||||
@ -349,16 +372,4 @@ public interface ConfigurationService {
|
||||
List<? extends PortableIp> listPortableIps(long id);
|
||||
|
||||
Boolean isAccountAllowedToCreateOfferingsWithTags(IsAccountAllowedToCreateOfferingsWithTagsCmd cmd);
|
||||
|
||||
public static final Map<String, String> ProviderDetailKeyMap = Map.of(
|
||||
Network.Provider.Nsx.getName(), ApiConstants.NSX_DETAIL_KEY,
|
||||
Network.Provider.Netris.getName(), ApiConstants.NETRIS_DETAIL_KEY
|
||||
);
|
||||
|
||||
public static boolean IsIpRangeForProvider(Network.Provider provider) {
|
||||
if (Objects.isNull(provider)) {
|
||||
return false;
|
||||
}
|
||||
return ProviderDetailKeyMap.containsKey(provider.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@ -21,7 +21,7 @@ public interface Resource {
|
||||
short RESOURCE_UNLIMITED = -1;
|
||||
String UNLIMITED = "Unlimited";
|
||||
|
||||
enum ResourceType { // All storage type resources are allocated_storage and not the physical storage.
|
||||
enum ResourceType { // Primary and Secondary storage are allocated_storage and not the physical storage.
|
||||
user_vm("user_vm", 0),
|
||||
public_ip("public_ip", 1),
|
||||
volume("volume", 2),
|
||||
@ -33,12 +33,7 @@ public interface Resource {
|
||||
cpu("cpu", 8),
|
||||
memory("memory", 9),
|
||||
primary_storage("primary_storage", 10),
|
||||
secondary_storage("secondary_storage", 11),
|
||||
backup("backup", 12),
|
||||
backup_storage("backup_storage", 13),
|
||||
bucket("bucket", 14),
|
||||
object_storage("object_storage", 15),
|
||||
gpu("gpu", 16);
|
||||
secondary_storage("secondary_storage", 11);
|
||||
|
||||
private String name;
|
||||
private int ordinal;
|
||||
@ -67,10 +62,6 @@ public interface Resource {
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static Boolean isStorageType(ResourceType type) {
|
||||
return (type == primary_storage || type == secondary_storage || type == backup_storage || type == object_storage);
|
||||
}
|
||||
}
|
||||
|
||||
public static class ResourceOwnerType {
|
||||
|
||||
@ -22,8 +22,7 @@ public class CPU {
|
||||
public enum CPUArch {
|
||||
x86("i686", 32),
|
||||
amd64("x86_64", 64),
|
||||
arm64("aarch64", 64),
|
||||
s390x("s390x", 64);
|
||||
arm64("aarch64", 64);
|
||||
|
||||
private final String type;
|
||||
private final int bits;
|
||||
|
||||
@ -43,6 +43,4 @@ public interface Pod extends InfrastructureEntity, Grouping, Identity, InternalI
|
||||
AllocationState getAllocationState();
|
||||
|
||||
boolean getExternalDhcp();
|
||||
|
||||
String getStorageAccessGroups();
|
||||
}
|
||||
|
||||
@ -62,11 +62,11 @@ public interface DeploymentClusterPlanner extends DeploymentPlanner {
|
||||
"vm.allocation.algorithm",
|
||||
"Advanced",
|
||||
"random",
|
||||
"Order in which hosts within a cluster will be considered for VM allocation. The value can be 'random', 'firstfit', 'userdispersing', or 'firstfitleastconsumed'.",
|
||||
"Order in which hosts within a cluster will be considered for VM/volume allocation. The value can be 'random', 'firstfit', 'userdispersing', 'userconcentratedpod_random', 'userconcentratedpod_firstfit', or 'firstfitleastconsumed'.",
|
||||
true,
|
||||
ConfigKey.Scope.Global, null, null, null, null, null,
|
||||
ConfigKey.Kind.Select,
|
||||
"random,firstfit,userdispersing,firstfitleastconsumed");
|
||||
"random,firstfit,userdispersing,userconcentratedpod_random,userconcentratedpod_firstfit,firstfitleastconsumed");
|
||||
|
||||
/**
|
||||
* 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);
|
||||
|
||||
public enum AllocationAlgorithm {
|
||||
random, firstfit, userdispersing, firstfitleastconsumed;
|
||||
random, firstfit, userdispersing, userconcentratedpod_random, userconcentratedpod_firstfit;
|
||||
}
|
||||
|
||||
public enum PlannerResourceUsage {
|
||||
|
||||
@ -27,28 +27,17 @@ import org.apache.cloudstack.api.response.ClusterResponse;
|
||||
import org.apache.cloudstack.api.response.HostResponse;
|
||||
import org.apache.cloudstack.api.response.PodResponse;
|
||||
import org.apache.cloudstack.api.response.ZoneResponse;
|
||||
import org.apache.cloudstack.backup.BackupRepositoryService;
|
||||
import org.apache.cloudstack.config.Configuration;
|
||||
import org.apache.cloudstack.datacenter.DataCenterIpv4GuestSubnet;
|
||||
import org.apache.cloudstack.dns.DnsRecord;
|
||||
import org.apache.cloudstack.dns.DnsServer;
|
||||
import org.apache.cloudstack.dns.DnsZone;
|
||||
import org.apache.cloudstack.extension.Extension;
|
||||
import org.apache.cloudstack.extension.ExtensionCustomAction;
|
||||
import org.apache.cloudstack.gpu.GpuCard;
|
||||
import org.apache.cloudstack.gpu.GpuDevice;
|
||||
import org.apache.cloudstack.gpu.VgpuProfile;
|
||||
import org.apache.cloudstack.ha.HAConfig;
|
||||
import org.apache.cloudstack.kms.HSMProfile;
|
||||
import org.apache.cloudstack.kms.KMSKey;
|
||||
import org.apache.cloudstack.network.BgpPeer;
|
||||
import org.apache.cloudstack.network.Ipv4GuestSubnetNetworkMap;
|
||||
import org.apache.cloudstack.quota.QuotaTariff;
|
||||
import org.apache.cloudstack.storage.sharedfs.SharedFS;
|
||||
import org.apache.cloudstack.storage.object.Bucket;
|
||||
import org.apache.cloudstack.storage.object.ObjectStore;
|
||||
import org.apache.cloudstack.storage.sharedfs.SharedFS;
|
||||
import org.apache.cloudstack.usage.Usage;
|
||||
import org.apache.cloudstack.schedule.ResourceSchedule;
|
||||
import org.apache.cloudstack.vm.schedule.VMSchedule;
|
||||
|
||||
import com.cloud.dc.DataCenter;
|
||||
import com.cloud.dc.DataCenterGuestIpv6Prefix;
|
||||
@ -130,18 +119,17 @@ public class EventTypes {
|
||||
public static final String EVENT_VM_UNMANAGE = "VM.UNMANAGE";
|
||||
public static final String EVENT_VM_RECOVER = "VM.RECOVER";
|
||||
|
||||
// VM Schedule action-execution events (fired when a scheduled action runs).
|
||||
// VM Schedule
|
||||
public static final String EVENT_VM_SCHEDULE_CREATE = "VM.SCHEDULE.CREATE";
|
||||
public static final String EVENT_VM_SCHEDULE_UPDATE = "VM.SCHEDULE.UPDATE";
|
||||
public static final String EVENT_VM_SCHEDULE_DELETE = "VM.SCHEDULE.DELETE";
|
||||
|
||||
public static final String EVENT_VM_SCHEDULE_START = "VM.SCHEDULE.START";
|
||||
public static final String EVENT_VM_SCHEDULE_STOP = "VM.SCHEDULE.STOP";
|
||||
public static final String EVENT_VM_SCHEDULE_REBOOT = "VM.SCHEDULE.REBOOT";
|
||||
public static final String EVENT_VM_SCHEDULE_FORCE_STOP = "VM.SCHEDULE.FORCE.STOP";
|
||||
public static final String EVENT_VM_SCHEDULE_FORCE_REBOOT = "VM.SCHEDULE.FORCE.REBOOT";
|
||||
|
||||
// Generic Resource Schedule CRUD events (apply to all resource types).
|
||||
public static final String EVENT_SCHEDULE_CREATE = "SCHEDULE.CREATE";
|
||||
public static final String EVENT_SCHEDULE_UPDATE = "SCHEDULE.UPDATE";
|
||||
public static final String EVENT_SCHEDULE_DELETE = "SCHEDULE.DELETE";
|
||||
|
||||
// Domain Router
|
||||
public static final String EVENT_ROUTER_CREATE = "ROUTER.CREATE";
|
||||
public static final String EVENT_ROUTER_DESTROY = "ROUTER.DESTROY";
|
||||
@ -277,20 +265,6 @@ public class EventTypes {
|
||||
public static final String EVENT_CA_CERTIFICATE_REVOKE = "CA.CERTIFICATE.REVOKE";
|
||||
public static final String EVENT_CA_CERTIFICATE_PROVISION = "CA.CERTIFICATE.PROVISION";
|
||||
|
||||
// KMS (Key Management Service) events
|
||||
public static final String EVENT_KMS_KEY_WRAP = "KMS.KEY.WRAP";
|
||||
public static final String EVENT_KMS_KEY_UNWRAP = "KMS.KEY.UNWRAP";
|
||||
public static final String EVENT_KMS_KEY_CREATE = "KMS.KEY.CREATE";
|
||||
public static final String EVENT_KMS_KEY_UPDATE = "KMS.KEY.UPDATE";
|
||||
public static final String EVENT_KMS_KEY_ROTATE = "KMS.KEY.ROTATE";
|
||||
public static final String EVENT_KMS_KEY_DELETE = "KMS.KEY.DELETE";
|
||||
public static final String EVENT_VOLUME_MIGRATE_TO_KMS = "VOLUME.MIGRATE.TO.KMS";
|
||||
|
||||
// HSM Profile events
|
||||
public static final String EVENT_HSM_PROFILE_CREATE = "HSM.PROFILE.CREATE";
|
||||
public static final String EVENT_HSM_PROFILE_UPDATE = "HSM.PROFILE.UPDATE";
|
||||
public static final String EVENT_HSM_PROFILE_DELETE = "HSM.PROFILE.DELETE";
|
||||
|
||||
// Account events
|
||||
public static final String EVENT_ACCOUNT_ENABLE = "ACCOUNT.ENABLE";
|
||||
public static final String EVENT_ACCOUNT_DISABLE = "ACCOUNT.DISABLE";
|
||||
@ -315,12 +289,9 @@ public class EventTypes {
|
||||
|
||||
//registering userdata events
|
||||
public static final String EVENT_REGISTER_USER_DATA = "REGISTER.USER.DATA";
|
||||
public static final String EVENT_REGISTER_CNI_CONFIG = "REGISTER.CNI.CONFIG";
|
||||
public static final String EVENT_DELETE_CNI_CONFIG = "DELETE.CNI.CONFIG";
|
||||
|
||||
//user API and secret keys
|
||||
//register for user API and secret keys
|
||||
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";
|
||||
|
||||
// Template Events
|
||||
@ -395,34 +366,16 @@ public class EventTypes {
|
||||
|
||||
// Service Offerings
|
||||
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_DELETE = "SERVICE.OFFERING.DELETE";
|
||||
|
||||
// Disk Offerings
|
||||
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_DELETE = "DISK.OFFERING.DELETE";
|
||||
|
||||
// GPU Cards
|
||||
public static final String EVENT_GPU_CARD_CREATE = "GPU.CARD.CREATE";
|
||||
public static final String EVENT_GPU_CARD_EDIT = "GPU.CARD.EDIT";
|
||||
public static final String EVENT_GPU_CARD_DELETE = "GPU.CARD.DELETE";
|
||||
|
||||
// vGPU Profile
|
||||
public static final String EVENT_VGPU_PROFILE_CREATE = "VGPU.PROFILE.CREATE";
|
||||
public static final String EVENT_VGPU_PROFILE_EDIT = "VGPU.PROFILE.EDIT";
|
||||
public static final String EVENT_VGPU_PROFILE_DELETE = "VGPU.PROFILE.DELETE";
|
||||
|
||||
// GPU Devices
|
||||
public static final String EVENT_GPU_DEVICE_CREATE = "GPU.DEVICE.CREATE";
|
||||
public static final String EVENT_GPU_DEVICE_EDIT = "GPU.DEVICE.EDIT";
|
||||
public static final String EVENT_GPU_DEVICE_DELETE = "GPU.DEVICE.DELETE";
|
||||
|
||||
// Network offerings
|
||||
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_EDIT = "NETWORK.OFFERING.EDIT";
|
||||
public static final String EVENT_NETWORK_OFFERING_REMOVE = "NETWORK.OFFERING.REMOVE";
|
||||
@ -512,7 +465,6 @@ public class EventTypes {
|
||||
public static final String EVENT_ENABLE_PRIMARY_STORAGE = "ENABLE.PS";
|
||||
public static final String EVENT_DISABLE_PRIMARY_STORAGE = "DISABLE.PS";
|
||||
public static final String EVENT_SYNC_STORAGE_POOL = "SYNC.STORAGE.POOL";
|
||||
public static final String EVENT_CONFIGURE_STORAGE_ACCESS = "CONFIGURE.STORAGE.ACCESS";
|
||||
public static final String EVENT_CHANGE_STORAGE_POOL_SCOPE = "CHANGE.STORAGE.POOL.SCOPE";
|
||||
|
||||
// VPN
|
||||
@ -527,7 +479,6 @@ 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_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_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_DELETE = "VPN.S2S.CONNECTION.DELETE";
|
||||
public static final String EVENT_S2S_VPN_CONNECTION_RESET = "VPN.S2S.CONNECTION.RESET";
|
||||
@ -545,8 +496,6 @@ public class EventTypes {
|
||||
|
||||
public static final String EVENT_ZONE_VLAN_ASSIGN = "ZONE.VLAN.ASSIGN";
|
||||
public static final String EVENT_ZONE_VLAN_RELEASE = "ZONE.VLAN.RELEASE";
|
||||
public static final String EVENT_ZONE_VXLAN_ASSIGN = "ZONE.VXLAN.ASSIGN";
|
||||
public static final String EVENT_ZONE_VXLAN_RELEASE = "ZONE.VXLAN.RELEASE";
|
||||
|
||||
// Projects
|
||||
public static final String EVENT_PROJECT_CREATE = "PROJECT.CREATE";
|
||||
@ -607,7 +556,6 @@ public class EventTypes {
|
||||
|
||||
// Network ACL
|
||||
public static final String EVENT_NETWORK_ACL_CREATE = "NETWORK.ACL.CREATE";
|
||||
public static final String EVENT_NETWORK_ACL_IMPORT = "NETWORK.ACL.IMPORT";
|
||||
public static final String EVENT_NETWORK_ACL_DELETE = "NETWORK.ACL.DELETE";
|
||||
public static final String EVENT_NETWORK_ACL_REPLACE = "NETWORK.ACL.REPLACE";
|
||||
public static final String EVENT_NETWORK_ACL_UPDATE = "NETWORK.ACL.UPDATE";
|
||||
@ -622,7 +570,6 @@ public class EventTypes {
|
||||
|
||||
// VPC offerings
|
||||
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_DELETE = "VPC.OFFERING.DELETE";
|
||||
|
||||
@ -655,20 +602,16 @@ public class EventTypes {
|
||||
|
||||
// Backup and Recovery events
|
||||
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_REMOVE = "BACKUP.OFFERING.REMOVE";
|
||||
public static final String EVENT_VM_BACKUP_CREATE = "BACKUP.CREATE";
|
||||
public static final String EVENT_VM_BACKUP_RESTORE = "BACKUP.RESTORE";
|
||||
public static final String EVENT_VM_BACKUP_DELETE = "BACKUP.DELETE";
|
||||
public static final String EVENT_VM_BACKUP_OFFERING_REMOVED_AND_BACKUPS_DELETED = "BACKUP.OFFERING.BACKUPS.DEL";
|
||||
public static final String EVENT_VM_BACKUP_RESTORE_VOLUME_TO_VM = "BACKUP.RESTORE.VOLUME.TO.VM";
|
||||
public static final String EVENT_VM_BACKUP_SCHEDULE_CONFIGURE = "BACKUP.SCHEDULE.CONFIGURE";
|
||||
public static final String EVENT_VM_BACKUP_SCHEDULE_DELETE = "BACKUP.SCHEDULE.DELETE";
|
||||
public static final String EVENT_VM_BACKUP_USAGE_METRIC = "BACKUP.USAGE.METRIC";
|
||||
public static final String EVENT_VM_BACKUP_EDIT = "BACKUP.OFFERING.EDIT";
|
||||
public static final String EVENT_VM_CREATE_FROM_BACKUP = "VM.CREATE.FROM.BACKUP";
|
||||
public static final String EVENT_SCREENSHOT_DOWNLOAD = "BACKUP.VALIDATION.SCREENSHOT.DOWNLOAD";
|
||||
|
||||
// external network device events
|
||||
public static final String EVENT_EXTERNAL_NVP_CONTROLLER_ADD = "PHYSICAL.NVPCONTROLLER.ADD";
|
||||
@ -697,7 +640,6 @@ public class EventTypes {
|
||||
public static final String EVENT_AUTOSCALEVMGROUP_DISABLE = "AUTOSCALEVMGROUP.DISABLE";
|
||||
public static final String EVENT_AUTOSCALEVMGROUP_SCALEDOWN = "AUTOSCALEVMGROUP.SCALEDOWN";
|
||||
public static final String EVENT_AUTOSCALEVMGROUP_SCALEUP = "AUTOSCALEVMGROUP.SCALEUP";
|
||||
public static final String EVENT_AUTOSCALEVMGROUP_SCHEDULE_UPDATE = "AUTOSCALEVMGROUP.SCHEDULE.UPDATE";
|
||||
|
||||
public static final String EVENT_BAREMETAL_DHCP_SERVER_ADD = "PHYSICAL.DHCP.ADD";
|
||||
public static final String EVENT_BAREMETAL_DHCP_SERVER_DELETE = "PHYSICAL.DHCP.DELETE";
|
||||
@ -745,9 +687,6 @@ public class EventTypes {
|
||||
public static final String EVENT_EXTERNAL_OPENDAYLIGHT_CONFIGURE_CONTROLLER = "PHYSICAL.ODLCONTROLLER.CONFIGURE";
|
||||
|
||||
//Guest OS related events
|
||||
public static final String EVENT_GUEST_OS_CATEGORY_ADD = "GUEST.OS.CATEGORY.ADD";
|
||||
public static final String EVENT_GUEST_OS_CATEGORY_DELETE = "GUEST.OS.CATEGORY.DELETE";
|
||||
public static final String EVENT_GUEST_OS_CATEGORY_UPDATE = "GUEST.OS.CATEGORY.UPDATE";
|
||||
public static final String EVENT_GUEST_OS_ADD = "GUEST.OS.ADD";
|
||||
public static final String EVENT_GUEST_OS_REMOVE = "GUEST.OS.REMOVE";
|
||||
public static final String EVENT_GUEST_OS_UPDATE = "GUEST.OS.UPDATE";
|
||||
@ -800,13 +739,6 @@ public class EventTypes {
|
||||
//Purge resources
|
||||
public static final String EVENT_PURGE_EXPUNGED_RESOURCES = "PURGE.EXPUNGED.RESOURCES";
|
||||
|
||||
// Management Server
|
||||
public static final String EVENT_MS_MAINTENANCE_PREPARE = "MS.MAINTENANCE.PREPARE";
|
||||
public static final String EVENT_MS_MAINTENANCE_CANCEL = "MS.MAINTENANCE.CANCEL";
|
||||
public static final String EVENT_MS_SHUTDOWN_PREPARE = "MS.SHUTDOWN.PREPARE";
|
||||
public static final String EVENT_MS_SHUTDOWN_CANCEL = "MS.SHUTDOWN.CANCEL";
|
||||
public static final String EVENT_MS_SHUTDOWN = "MS.SHUTDOWN";
|
||||
|
||||
// OBJECT STORE
|
||||
public static final String EVENT_OBJECT_STORE_CREATE = "OBJECT.STORE.CREATE";
|
||||
public static final String EVENT_OBJECT_STORE_DELETE = "OBJECT.STORE.DELETE";
|
||||
@ -853,52 +785,6 @@ public class EventTypes {
|
||||
public static final String EVENT_SHAREDFS_EXPUNGE = "SHAREDFS.EXPUNGE";
|
||||
public static final String EVENT_SHAREDFS_RECOVER = "SHAREDFS.RECOVER";
|
||||
|
||||
// Resource Limit
|
||||
public static final String EVENT_RESOURCE_LIMIT_UPDATE = "RESOURCE.LIMIT.UPDATE";
|
||||
|
||||
// Management Server
|
||||
public static final String EVENT_MANAGEMENT_SERVER_REMOVE = "MANAGEMENT.SERVER.REMOVE";
|
||||
|
||||
// VM Lease
|
||||
public static final String VM_LEASE_EXPIRED = "VM.LEASE.EXPIRED";
|
||||
public static final String VM_LEASE_DISABLED = "VM.LEASE.DISABLED";
|
||||
public static final String VM_LEASE_CANCELLED = "VM.LEASE.CANCELLED";
|
||||
public static final String VM_LEASE_EXPIRING = "VM.LEASE.EXPIRING";
|
||||
|
||||
// GUI Theme
|
||||
public static final String EVENT_GUI_THEME_CREATE = "GUI.THEME.CREATE";
|
||||
public static final String EVENT_GUI_THEME_REMOVE = "GUI.THEME.REMOVE";
|
||||
public static final String EVENT_GUI_THEME_UPDATE = "GUI.THEME.UPDATE";
|
||||
|
||||
// Extension
|
||||
public static final String EVENT_EXTENSION_CREATE = "EXTENSION.CREATE";
|
||||
public static final String EVENT_EXTENSION_UPDATE = "EXTENSION.UPDATE";
|
||||
public static final String EVENT_EXTENSION_DELETE = "EXTENSION.DELETE";
|
||||
public static final String EVENT_EXTENSION_RESOURCE_REGISTER = "EXTENSION.RESOURCE.REGISTER";
|
||||
public static final String EVENT_EXTENSION_RESOURCE_UNREGISTER = "EXTENSION.RESOURCE.UNREGISTER";
|
||||
public static final String EVENT_EXTENSION_RESOURCE_UPDATE = "EXTENSION.RESOURCE.UPDATE";
|
||||
public static final String EVENT_EXTENSION_CUSTOM_ACTION_ADD = "EXTENSION.CUSTOM.ACTION.ADD";
|
||||
public static final String EVENT_EXTENSION_CUSTOM_ACTION_UPDATE = "EXTENSION.CUSTOM.ACTION.UPDATE";
|
||||
public static final String EVENT_EXTENSION_CUSTOM_ACTION_DELETE = "EXTENSION.CUSTOM.ACTION.DELETE";
|
||||
|
||||
// Custom Action
|
||||
public static final String EVENT_CUSTOM_ACTION = "CUSTOM.ACTION";
|
||||
|
||||
// Backup Repository
|
||||
public static final String EVENT_BACKUP_REPOSITORY_ADD = "BACKUP.REPOSITORY.ADD";
|
||||
public static final String EVENT_BACKUP_REPOSITORY_UPDATE = "BACKUP.REPOSITORY.UPDATE";
|
||||
|
||||
// DNS Framework Events
|
||||
public static final String EVENT_DNS_SERVER_ADD = "DNS.SERVER.ADD";
|
||||
public static final String EVENT_DNS_SERVER_UPDATE = "DNS.SERVER.UPDATE";
|
||||
public static final String EVENT_DNS_SERVER_DELETE = "DNS.SERVER.DELETE";
|
||||
public static final String EVENT_DNS_ZONE_CREATE = "DNS.ZONE.CREATE";
|
||||
public static final String EVENT_DNS_ZONE_UPDATE = "DNS.ZONE.UPDATE";
|
||||
public static final String EVENT_DNS_ZONE_DELETE = "DNS.ZONE.DELETE";
|
||||
public static final String EVENT_DNS_RECORD_CREATE = "DNS.RECORD.CREATE";
|
||||
public static final String EVENT_DNS_RECORD_DELETE = "DNS.RECORD.DELETE";
|
||||
public static final String EVENT_DNS_NAME_COLLISION = "DNS.NAME.COLLISION";
|
||||
|
||||
static {
|
||||
|
||||
// TODO: need a way to force author adding event types to declare the entity details as well, with out braking
|
||||
@ -922,18 +808,15 @@ public class EventTypes {
|
||||
entityEventDetails.put(EVENT_VM_IMPORT, VirtualMachine.class);
|
||||
entityEventDetails.put(EVENT_VM_UNMANAGE, VirtualMachine.class);
|
||||
|
||||
// VMSchedule action-execution events
|
||||
entityEventDetails.put(EVENT_VM_SCHEDULE_START, ResourceSchedule.class);
|
||||
entityEventDetails.put(EVENT_VM_SCHEDULE_STOP, ResourceSchedule.class);
|
||||
entityEventDetails.put(EVENT_VM_SCHEDULE_REBOOT, ResourceSchedule.class);
|
||||
entityEventDetails.put(EVENT_VM_SCHEDULE_FORCE_STOP, ResourceSchedule.class);
|
||||
entityEventDetails.put(EVENT_VM_SCHEDULE_FORCE_REBOOT, ResourceSchedule.class);
|
||||
entityEventDetails.put(EVENT_AUTOSCALEVMGROUP_SCHEDULE_UPDATE, ResourceSchedule.class);
|
||||
|
||||
// Generic Resource Schedule
|
||||
entityEventDetails.put(EVENT_SCHEDULE_CREATE, ResourceSchedule.class);
|
||||
entityEventDetails.put(EVENT_SCHEDULE_UPDATE, ResourceSchedule.class);
|
||||
entityEventDetails.put(EVENT_SCHEDULE_DELETE, ResourceSchedule.class);
|
||||
// VMSchedule
|
||||
entityEventDetails.put(EVENT_VM_SCHEDULE_CREATE, VMSchedule.class);
|
||||
entityEventDetails.put(EVENT_VM_SCHEDULE_DELETE, VMSchedule.class);
|
||||
entityEventDetails.put(EVENT_VM_SCHEDULE_UPDATE, VMSchedule.class);
|
||||
entityEventDetails.put(EVENT_VM_SCHEDULE_START, VMSchedule.class);
|
||||
entityEventDetails.put(EVENT_VM_SCHEDULE_STOP, VMSchedule.class);
|
||||
entityEventDetails.put(EVENT_VM_SCHEDULE_REBOOT, VMSchedule.class);
|
||||
entityEventDetails.put(EVENT_VM_SCHEDULE_FORCE_STOP, VMSchedule.class);
|
||||
entityEventDetails.put(EVENT_VM_SCHEDULE_FORCE_REBOOT, VMSchedule.class);
|
||||
|
||||
entityEventDetails.put(EVENT_ROUTER_CREATE, VirtualRouter.class);
|
||||
entityEventDetails.put(EVENT_ROUTER_DESTROY, VirtualRouter.class);
|
||||
@ -1052,20 +935,6 @@ public class EventTypes {
|
||||
entityEventDetails.put(EVENT_VOLUME_RECOVER, Volume.class);
|
||||
entityEventDetails.put(EVENT_VOLUME_CHANGE_DISK_OFFERING, Volume.class);
|
||||
|
||||
// KMS Key Events
|
||||
entityEventDetails.put(EVENT_KMS_KEY_CREATE, KMSKey.class);
|
||||
entityEventDetails.put(EVENT_KMS_KEY_UPDATE, KMSKey.class);
|
||||
entityEventDetails.put(EVENT_KMS_KEY_UNWRAP, KMSKey.class);
|
||||
entityEventDetails.put(EVENT_KMS_KEY_WRAP, KMSKey.class);
|
||||
entityEventDetails.put(EVENT_KMS_KEY_DELETE, KMSKey.class);
|
||||
entityEventDetails.put(EVENT_KMS_KEY_ROTATE, KMSKey.class);
|
||||
entityEventDetails.put(EVENT_VOLUME_MIGRATE_TO_KMS, KMSKey.class);
|
||||
|
||||
// HSM Profile Events
|
||||
entityEventDetails.put(EVENT_HSM_PROFILE_CREATE, HSMProfile.class);
|
||||
entityEventDetails.put(EVENT_HSM_PROFILE_UPDATE, HSMProfile.class);
|
||||
entityEventDetails.put(EVENT_HSM_PROFILE_DELETE, HSMProfile.class);
|
||||
|
||||
// Domains
|
||||
entityEventDetails.put(EVENT_DOMAIN_CREATE, Domain.class);
|
||||
entityEventDetails.put(EVENT_DOMAIN_DELETE, Domain.class);
|
||||
@ -1102,34 +971,16 @@ public class EventTypes {
|
||||
|
||||
// Service Offerings
|
||||
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_DELETE, ServiceOffering.class);
|
||||
|
||||
// Disk Offerings
|
||||
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_DELETE, DiskOffering.class);
|
||||
|
||||
// GPU Cards
|
||||
entityEventDetails.put(EVENT_GPU_CARD_CREATE, GpuCard.class);
|
||||
entityEventDetails.put(EVENT_GPU_CARD_EDIT, GpuCard.class);
|
||||
entityEventDetails.put(EVENT_GPU_CARD_DELETE, GpuCard.class);
|
||||
|
||||
// vGPU Profiles
|
||||
entityEventDetails.put(EVENT_VGPU_PROFILE_CREATE, VgpuProfile.class);
|
||||
entityEventDetails.put(EVENT_VGPU_PROFILE_EDIT, VgpuProfile.class);
|
||||
entityEventDetails.put(EVENT_VGPU_PROFILE_DELETE, VgpuProfile.class);
|
||||
|
||||
// GPU Devices
|
||||
entityEventDetails.put(EVENT_GPU_DEVICE_CREATE, GpuDevice.class);
|
||||
entityEventDetails.put(EVENT_GPU_DEVICE_EDIT, GpuDevice.class);
|
||||
entityEventDetails.put(EVENT_GPU_DEVICE_DELETE, GpuDevice.class);
|
||||
|
||||
// Network offerings
|
||||
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_EDIT, NetworkOffering.class);
|
||||
entityEventDetails.put(EVENT_NETWORK_OFFERING_REMOVE, NetworkOffering.class);
|
||||
@ -1213,7 +1064,6 @@ public class EventTypes {
|
||||
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_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_DELETE, Site2SiteVpnConnection.class);
|
||||
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_RESET, Site2SiteVpnConnection.class);
|
||||
@ -1380,12 +1230,6 @@ public class EventTypes {
|
||||
entityEventDetails.put(EVENT_UPDATE_IMAGE_STORE_ACCESS_STATE, ImageStore.class);
|
||||
entityEventDetails.put(EVENT_LIVE_PATCH_SYSTEMVM, "SystemVMs");
|
||||
|
||||
entityEventDetails.put(EVENT_MS_MAINTENANCE_PREPARE, "ManagementServer");
|
||||
entityEventDetails.put(EVENT_MS_MAINTENANCE_CANCEL, "ManagementServer");
|
||||
entityEventDetails.put(EVENT_MS_SHUTDOWN_PREPARE, "ManagementServer");
|
||||
entityEventDetails.put(EVENT_MS_SHUTDOWN_CANCEL, "ManagementServer");
|
||||
entityEventDetails.put(EVENT_MS_SHUTDOWN, "ManagementServer");
|
||||
|
||||
//Object Store
|
||||
entityEventDetails.put(EVENT_OBJECT_STORE_CREATE, ObjectStore.class);
|
||||
entityEventDetails.put(EVENT_OBJECT_STORE_UPDATE, ObjectStore.class);
|
||||
@ -1429,45 +1273,6 @@ public class EventTypes {
|
||||
entityEventDetails.put(EVENT_SHAREDFS_DESTROY, SharedFS.class);
|
||||
entityEventDetails.put(EVENT_SHAREDFS_EXPUNGE, SharedFS.class);
|
||||
entityEventDetails.put(EVENT_SHAREDFS_RECOVER, SharedFS.class);
|
||||
|
||||
// Management Server
|
||||
entityEventDetails.put(EVENT_MANAGEMENT_SERVER_REMOVE, "ManagementServer");
|
||||
|
||||
// VM Lease
|
||||
entityEventDetails.put(VM_LEASE_EXPIRED, VirtualMachine.class);
|
||||
entityEventDetails.put(VM_LEASE_EXPIRING, VirtualMachine.class);
|
||||
entityEventDetails.put(VM_LEASE_DISABLED, VirtualMachine.class);
|
||||
entityEventDetails.put(VM_LEASE_CANCELLED, VirtualMachine.class);
|
||||
|
||||
// GUI theme
|
||||
entityEventDetails.put(EVENT_GUI_THEME_CREATE, "GuiTheme");
|
||||
entityEventDetails.put(EVENT_GUI_THEME_REMOVE, "GuiTheme");
|
||||
entityEventDetails.put(EVENT_GUI_THEME_UPDATE, "GuiTheme");
|
||||
|
||||
// Extension
|
||||
entityEventDetails.put(EVENT_EXTENSION_CREATE, Extension.class);
|
||||
entityEventDetails.put(EVENT_EXTENSION_UPDATE, Extension.class);
|
||||
entityEventDetails.put(EVENT_EXTENSION_DELETE, Extension.class);
|
||||
entityEventDetails.put(EVENT_EXTENSION_RESOURCE_REGISTER, Extension.class);
|
||||
entityEventDetails.put(EVENT_EXTENSION_RESOURCE_UNREGISTER, Extension.class);
|
||||
entityEventDetails.put(EVENT_EXTENSION_CUSTOM_ACTION_ADD, ExtensionCustomAction.class);
|
||||
entityEventDetails.put(EVENT_EXTENSION_CUSTOM_ACTION_UPDATE, ExtensionCustomAction.class);
|
||||
entityEventDetails.put(EVENT_EXTENSION_CUSTOM_ACTION_DELETE, ExtensionCustomAction.class);
|
||||
|
||||
// Backup Repository
|
||||
entityEventDetails.put(EVENT_BACKUP_REPOSITORY_ADD, BackupRepositoryService.class);
|
||||
entityEventDetails.put(EVENT_BACKUP_REPOSITORY_UPDATE, BackupRepositoryService.class);
|
||||
|
||||
// DNS Framework Events
|
||||
entityEventDetails.put(EVENT_DNS_SERVER_ADD, DnsServer.class);
|
||||
entityEventDetails.put(EVENT_DNS_SERVER_UPDATE, DnsServer.class);
|
||||
entityEventDetails.put(EVENT_DNS_SERVER_DELETE, DnsServer.class);
|
||||
entityEventDetails.put(EVENT_DNS_ZONE_CREATE, DnsZone.class);
|
||||
entityEventDetails.put(EVENT_DNS_ZONE_UPDATE, DnsZone.class);
|
||||
entityEventDetails.put(EVENT_DNS_ZONE_DELETE, DnsZone.class);
|
||||
entityEventDetails.put(EVENT_DNS_RECORD_CREATE, DnsRecord.class);
|
||||
entityEventDetails.put(EVENT_DNS_RECORD_DELETE, DnsRecord.class);
|
||||
|
||||
}
|
||||
|
||||
public static boolean isNetworkEvent(String eventType) {
|
||||
|
||||
@ -40,7 +40,7 @@ public class OperationTimedoutException extends CloudException {
|
||||
boolean _isActive;
|
||||
|
||||
public OperationTimedoutException(Command[] cmds, long agentId, long seqId, int time, boolean isActive) {
|
||||
super("Commands " + seqId + " to Host " + agentId + " timed out after " + time + " secs");
|
||||
super("Commands " + seqId + " to Host " + agentId + " timed out after " + time);
|
||||
_agentId = agentId;
|
||||
_seqId = seqId;
|
||||
_time = time;
|
||||
|
||||
@ -26,19 +26,17 @@ public interface Investigator extends Adapter {
|
||||
* Returns if the vm is still alive.
|
||||
*
|
||||
* @param vm to work on.
|
||||
* @return true if vm is alive, otherwise false
|
||||
*/
|
||||
boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM;
|
||||
public boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM;
|
||||
|
||||
/**
|
||||
* Returns the agent status of the host.
|
||||
*
|
||||
* @param host
|
||||
* @return status of the host agent
|
||||
*/
|
||||
Status getHostAgentStatus(Host host);
|
||||
public Status isAgentAlive(Host agent);
|
||||
|
||||
class UnknownVM extends Exception {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@ -57,17 +57,8 @@ public interface Host extends StateObject<Status>, Identity, Partition, HAResour
|
||||
String HOST_UEFI_ENABLE = "host.uefi.enable";
|
||||
String HOST_VOLUME_ENCRYPTION = "host.volume.encryption";
|
||||
String HOST_INSTANCE_CONVERSION = "host.instance.conversion";
|
||||
String HOST_VDDK_SUPPORT = "host.vddk.support";
|
||||
String HOST_VDDK_LIB_DIR = "vddk.lib.dir";
|
||||
String HOST_VDDK_VERSION = "host.vddk.version";
|
||||
String HOST_OVFTOOL_VERSION = "host.ovftool.version";
|
||||
String HOST_VIRTV2V_VERSION = "host.virtv2v.version";
|
||||
String HOST_SSH_PORT = "host.ssh.port";
|
||||
String HOST_CDROM_MAX_COUNT = "host.cdrom.max.count";
|
||||
String GUEST_OS_CATEGORY_ID = "guest.os.category.id";
|
||||
String GUEST_OS_RULE = "guest.os.rule";
|
||||
|
||||
int DEFAULT_SSH_PORT = 22;
|
||||
|
||||
/**
|
||||
* @return name of the machine.
|
||||
@ -189,8 +180,6 @@ public interface Host extends StateObject<Status>, Identity, Partition, HAResour
|
||||
*/
|
||||
Long getManagementServerId();
|
||||
|
||||
Long getLastManagementServerId();
|
||||
|
||||
/*
|
||||
*@return removal date
|
||||
*/
|
||||
@ -225,6 +214,4 @@ public interface Host extends StateObject<Status>, Identity, Partition, HAResour
|
||||
ResourceState getResourceState();
|
||||
|
||||
CPU.CPUArch getArch();
|
||||
|
||||
String getStorageAccessGroups();
|
||||
}
|
||||
|
||||
@ -36,4 +36,5 @@ public interface HostStats {
|
||||
public HostStats getHostStats();
|
||||
|
||||
public double getLoadAverage();
|
||||
// public double getXapiMemoryUsageKBs();
|
||||
}
|
||||
|
||||
@ -127,7 +127,6 @@ public enum Status {
|
||||
s_fsm.addTransition(Status.Connecting, Event.HostDown, Status.Down);
|
||||
s_fsm.addTransition(Status.Connecting, Event.Ping, Status.Connecting);
|
||||
s_fsm.addTransition(Status.Connecting, Event.ManagementServerDown, Status.Disconnected);
|
||||
s_fsm.addTransition(Status.Connecting, Event.StartAgentRebalance, Status.Rebalancing);
|
||||
s_fsm.addTransition(Status.Connecting, Event.AgentDisconnected, Status.Alert);
|
||||
s_fsm.addTransition(Status.Up, Event.PingTimeout, Status.Alert);
|
||||
s_fsm.addTransition(Status.Up, Event.AgentDisconnected, Status.Alert);
|
||||
|
||||
@ -56,7 +56,6 @@ public class Hypervisor {
|
||||
public static final HypervisorType Ovm3 = new HypervisorType("Ovm3", ImageFormat.RAW);
|
||||
public static final HypervisorType LXC = new HypervisorType("LXC");
|
||||
public static final HypervisorType Custom = new HypervisorType("Custom", null, EnumSet.of(RootDiskSizeOverride));
|
||||
public static final HypervisorType External = new HypervisorType("External", null, EnumSet.of(RootDiskSizeOverride));
|
||||
public static final HypervisorType Any = new HypervisorType("Any"); /*If you don't care about the hypervisor type*/
|
||||
private final String name;
|
||||
private final ImageFormat imageFormat;
|
||||
|
||||
@ -20,7 +20,6 @@ import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import org.apache.cloudstack.backup.Backup;
|
||||
import org.apache.cloudstack.backup.BackupProvider;
|
||||
import org.apache.cloudstack.framework.config.ConfigKey;
|
||||
|
||||
import com.cloud.agent.api.Command;
|
||||
@ -95,10 +94,10 @@ public interface HypervisorGuru extends Adapter {
|
||||
Map<String, String> getClusterSettings(long vmId);
|
||||
|
||||
VirtualMachine importVirtualMachineFromBackup(long zoneId, long domainId, long accountId, long userId,
|
||||
String vmInternalName, Backup backup, BackupProvider backupProvider) throws Exception;
|
||||
String vmInternalName, Backup backup) throws Exception;
|
||||
|
||||
boolean attachRestoredVolumeToVirtualMachine(long zoneId, String location, Backup.VolumeInfo volumeInfo,
|
||||
VirtualMachine vm, long poolId, Backup backup, BackupProvider backupProvider) throws Exception;
|
||||
VirtualMachine vm, long poolId, Backup backup) throws Exception;
|
||||
/**
|
||||
* Will generate commands to migrate a vm to a pool. For now this will only work for stopped VMs on Vmware.
|
||||
*
|
||||
|
||||
@ -18,26 +18,14 @@ package com.cloud.kubernetes.cluster;
|
||||
|
||||
import org.apache.cloudstack.acl.ControlledEntity;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.uservm.UserVm;
|
||||
import com.cloud.utils.component.Adapter;
|
||||
|
||||
public interface KubernetesServiceHelper extends Adapter {
|
||||
|
||||
enum KubernetesClusterNodeType {
|
||||
CONTROL, WORKER, ETCD, DEFAULT
|
||||
}
|
||||
|
||||
ControlledEntity findByUuid(String uuid);
|
||||
ControlledEntity findByVmId(long vmId);
|
||||
void checkVmCanBeDestroyed(UserVm userVm);
|
||||
void checkVmAffinityGroupsCanBeUpdated(UserVm userVm);
|
||||
boolean isValidNodeType(String nodeType);
|
||||
Map<String, Long> getServiceOfferingNodeTypeMap(Map<String, Map<String, String>> serviceOfferingNodeTypeMap);
|
||||
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);
|
||||
}
|
||||
|
||||
@ -99,5 +99,4 @@ public interface IpAddress extends ControlledEntity, Identity, InternalIdentity,
|
||||
|
||||
boolean isForSystemVms();
|
||||
|
||||
boolean isForRouter();
|
||||
}
|
||||
|
||||
@ -45,7 +45,7 @@ public interface Ipv6Service extends PluggableService, Configurable {
|
||||
static final ConfigKey<Boolean> Ipv6OfferingCreationEnabled = new ConfigKey<Boolean>("Advanced", Boolean.class,
|
||||
"ipv6.offering.enabled",
|
||||
"false",
|
||||
"Indicates whether creation of IPv6 Network/VPC offering is enabled or not.",
|
||||
"Indicates whether creation of IPv6 network/VPC offering is enabled or not.",
|
||||
true);
|
||||
|
||||
static final ConfigKey<Integer> Ipv6PrefixSubnetCleanupInterval = new ConfigKey<Integer>("Advanced", Integer.class,
|
||||
|
||||
@ -116,7 +116,6 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
|
||||
public static final Service NetworkACL = new Service("NetworkACL", Capability.SupportedProtocols);
|
||||
public static final Service Connectivity = new Service("Connectivity", Capability.DistributedRouter, Capability.RegionLevelVpc, Capability.StretchedL2Subnet,
|
||||
Capability.NoVlan, Capability.PublicAccess);
|
||||
public static final Service CustomAction = new Service("CustomAction");
|
||||
|
||||
private final String name;
|
||||
private final Capability[] caps;
|
||||
@ -207,8 +206,6 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
|
||||
public static final Provider Tungsten = new Provider("Tungsten", false);
|
||||
|
||||
public static final Provider Nsx = new Provider("Nsx", false);
|
||||
public static final Provider Netris = new Provider("Netris", false);
|
||||
public static final Provider NetworkExtension = new Provider("NetworkExtension", false, true);
|
||||
|
||||
private final String name;
|
||||
private final boolean isExternal;
|
||||
@ -252,47 +249,11 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
|
||||
return null;
|
||||
}
|
||||
|
||||
/** Private constructor for transient (non-registered) providers. */
|
||||
private Provider(String name) {
|
||||
this.name = name;
|
||||
this.isExternal = false;
|
||||
this.needCleanupOnShutdown = true;
|
||||
// intentionally NOT added to supportedProviders
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a transient (non-registered) {@link Provider} with the given name.
|
||||
*
|
||||
* <p>The new instance is <em>not</em> added to {@code supportedProviders}, so it
|
||||
* will never be returned by {@link #getProvider(String)} and will not pollute the
|
||||
* global provider registry. Use this for dynamic / extension-backed providers
|
||||
* whose names are only known at runtime (e.g. NetworkOrchestrator extensions).</p>
|
||||
*
|
||||
* @param name the provider name (typically the extension name)
|
||||
* @return a transient {@link Provider} instance with the given name
|
||||
*/
|
||||
public static Provider createTransientProvider(String name) {
|
||||
return new Provider(name);
|
||||
}
|
||||
|
||||
@Override public String toString() {
|
||||
return new ToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE)
|
||||
.append("name", name)
|
||||
.toString();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
if (this == obj) return true;
|
||||
if (!(obj instanceof Provider)) return false;
|
||||
Provider provider = (Provider) obj;
|
||||
return this.name.equals(provider.name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return name.hashCode();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Capability {
|
||||
@ -363,9 +324,9 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
|
||||
|
||||
public enum State {
|
||||
|
||||
Allocated("Indicates the Network configuration is in allocated but not setup"), Setup("Indicates the Network configuration is setup"), Implementing(
|
||||
"Indicates the Network configuration is being implemented"), Implemented("Indicates the Network configuration is in use"), Shutdown(
|
||||
"Indicates the Network configuration is being destroyed"), Destroy("Indicates that the Network is destroyed");
|
||||
Allocated("Indicates the network configuration is in allocated but not setup"), Setup("Indicates the network configuration is setup"), Implementing(
|
||||
"Indicates the network configuration is being implemented"), Implemented("Indicates the network configuration is in use"), Shutdown(
|
||||
"Indicates the network configuration is being destroyed"), Destroy("Indicates that the network is destroyed");
|
||||
|
||||
protected static final StateMachine2<State, Network.Event, Network> s_fsm = new StateMachine2<State, Network.Event, Network>();
|
||||
|
||||
@ -548,6 +509,4 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
|
||||
Integer getPrivateMtu();
|
||||
|
||||
Integer getNetworkCidrSize();
|
||||
|
||||
boolean getKeepMacAddressOnPublicNic();
|
||||
}
|
||||
|
||||
@ -125,10 +125,6 @@ public interface NetworkModel {
|
||||
*/
|
||||
String getNextAvailableMacAddressInNetwork(long networkConfigurationId) throws InsufficientAddressCapacityException;
|
||||
|
||||
String getUniqueMacAddress(long macAddress, long networkId, long datacenterId) throws InsufficientAddressCapacityException;
|
||||
|
||||
boolean isMACUnique(String mac, long networkId);
|
||||
|
||||
PublicIpAddress getPublicIpAddress(long ipAddressId);
|
||||
|
||||
List<? extends Vlan> listPodVlans(long podId);
|
||||
@ -187,8 +183,6 @@ public interface NetworkModel {
|
||||
|
||||
boolean canElementEnableIndividualServices(Provider provider);
|
||||
|
||||
boolean canElementEnableIndividualServicesByName(String providerName);
|
||||
|
||||
boolean areServicesSupportedInNetwork(long networkId, Service... services);
|
||||
|
||||
boolean isNetworkSystem(Network network);
|
||||
@ -239,18 +233,6 @@ public interface NetworkModel {
|
||||
|
||||
String getDefaultGuestTrafficLabel(long dcId, HypervisorType vmware);
|
||||
|
||||
/**
|
||||
* Resolves a provider name to a {@link Provider} instance.
|
||||
* For known static providers, delegates to {@link Provider#getProvider(String)}.
|
||||
* For dynamically-registered NetworkOrchestrator extension providers whose names
|
||||
* are not in the static registry, returns a transient {@link Provider} with the
|
||||
* given name so callers can still dispatch correctly.
|
||||
*
|
||||
* @param providerName the provider name from {@code ntwk_service_map} or similar
|
||||
* @return a {@link Provider} instance, or {@code null} if not resolvable
|
||||
*/
|
||||
Provider resolveProvider(String providerName);
|
||||
|
||||
/**
|
||||
* @param providerName
|
||||
* @return
|
||||
@ -323,8 +305,6 @@ public interface NetworkModel {
|
||||
|
||||
NicProfile getNicProfile(VirtualMachine vm, long networkId, String broadcastUri);
|
||||
|
||||
NicProfile getNicProfile(VirtualMachine vm, Nic nic, DataCenter dataCenter);
|
||||
|
||||
Set<Long> getAvailableIps(Network network, String requestedIp);
|
||||
|
||||
String getDomainNetworkDomain(long domainId, long zoneId);
|
||||
@ -382,8 +362,4 @@ public interface NetworkModel {
|
||||
|
||||
boolean checkSecurityGroupSupportForNetwork(Account account, DataCenter zone, List<Long> networkIds,
|
||||
List<Long> securityGroupsIds);
|
||||
|
||||
default long getMacIdentifier(Long dataCenterId) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
@ -385,11 +385,6 @@ public class NetworkProfile implements Network {
|
||||
return networkCidrSize;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean getKeepMacAddressOnPublicNic() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return String.format("NetworkProfile %s",
|
||||
|
||||
@ -21,13 +21,8 @@ import java.util.List;
|
||||
|
||||
import com.cloud.exception.ResourceUnavailableException;
|
||||
import com.cloud.network.rules.FirewallRule;
|
||||
import com.cloud.network.vpc.Vpc;
|
||||
|
||||
public interface NetworkRuleApplier {
|
||||
default boolean applyRules(Network network, FirewallRule.Purpose purpose, List<? extends FirewallRule> rules) throws ResourceUnavailableException {
|
||||
return applyRules(network, null, purpose, rules);
|
||||
}
|
||||
|
||||
boolean applyRules(Network network, Vpc vpc, FirewallRule.Purpose purpose, List<? extends FirewallRule> rules) throws ResourceUnavailableException;
|
||||
public boolean applyRules(Network network, FirewallRule.Purpose purpose, List<? extends FirewallRule> rules) throws ResourceUnavailableException;
|
||||
|
||||
}
|
||||
|
||||
@ -19,6 +19,7 @@ package com.cloud.network;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.cloud.dc.DataCenter;
|
||||
import org.apache.cloudstack.acl.ControlledEntity;
|
||||
import org.apache.cloudstack.api.command.admin.address.ReleasePodIpCmdByAdmin;
|
||||
import org.apache.cloudstack.api.command.admin.network.DedicateGuestVlanRangeCmd;
|
||||
@ -38,16 +39,13 @@ import org.apache.cloudstack.api.command.user.network.UpdateNetworkCmd;
|
||||
import org.apache.cloudstack.api.command.user.vm.ListNicsCmd;
|
||||
import org.apache.cloudstack.api.response.AcquirePodIpCmdResponse;
|
||||
import org.apache.cloudstack.framework.config.ConfigKey;
|
||||
import org.apache.cloudstack.network.element.InternalLoadBalancerElementService;
|
||||
|
||||
import com.cloud.agent.api.to.NicTO;
|
||||
import com.cloud.dc.DataCenter;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
import com.cloud.exception.InsufficientAddressCapacityException;
|
||||
import com.cloud.exception.InsufficientCapacityException;
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.exception.ResourceAllocationException;
|
||||
import com.cloud.exception.ResourceUnavailableException;
|
||||
import com.cloud.exception.InvalidParameterValueException;
|
||||
import com.cloud.network.Network.IpAddresses;
|
||||
import com.cloud.network.Network.Service;
|
||||
import com.cloud.network.Networks.TrafficType;
|
||||
@ -59,6 +57,7 @@ import com.cloud.utils.Pair;
|
||||
import com.cloud.utils.exception.CloudRuntimeException;
|
||||
import com.cloud.vm.Nic;
|
||||
import com.cloud.vm.NicSecondaryIp;
|
||||
import org.apache.cloudstack.network.element.InternalLoadBalancerElementService;
|
||||
|
||||
/**
|
||||
* The NetworkService interface is the "public" api to entities that make requests to the orchestration engine
|
||||
@ -81,7 +80,7 @@ public interface NetworkService {
|
||||
true, ConfigKey.Scope.Zone);
|
||||
|
||||
public static final ConfigKey<Boolean> AllowUsersToSpecifyVRMtu = new ConfigKey<>("Advanced", Boolean.class,
|
||||
"allow.end.users.to.specify.vr.mtu", "false", "Allow end Users to specify VR MTU",
|
||||
"allow.end.users.to.specify.vr.mtu", "false", "Allow end users to specify VR MTU",
|
||||
true, ConfigKey.Scope.Zone);
|
||||
|
||||
List<? extends Network> getIsolatedNetworksOwnedByAccountInZone(long zoneId, Account owner);
|
||||
@ -108,10 +107,6 @@ public interface NetworkService {
|
||||
PhysicalNetwork physicalNetwork, long zoneId, ControlledEntity.ACLType aclType) throws
|
||||
InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException;
|
||||
|
||||
Network createGuestNetwork(long networkOfferingId, String name, String displayText, Account owner,
|
||||
PhysicalNetwork physicalNetwork, long zoneId, ControlledEntity.ACLType aclType, Pair<Integer, Integer> vrIfaceMTUs) throws
|
||||
InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException;
|
||||
|
||||
Pair<List<? extends Network>, Integer> searchForNetworks(ListNetworksCmd cmd);
|
||||
|
||||
boolean deleteNetwork(long networkId, boolean forced);
|
||||
@ -232,7 +227,7 @@ public interface NetworkService {
|
||||
/**
|
||||
* Requests an IP address for the guest NIC
|
||||
*/
|
||||
NicSecondaryIp allocateSecondaryGuestIP(long nicId, IpAddresses requestedIpPair, String description) throws InsufficientAddressCapacityException;
|
||||
NicSecondaryIp allocateSecondaryGuestIP(long nicId, IpAddresses requestedIpPair) throws InsufficientAddressCapacityException;
|
||||
|
||||
boolean releaseSecondaryIpFromNic(long ipAddressId);
|
||||
|
||||
@ -273,12 +268,4 @@ public interface NetworkService {
|
||||
InternalLoadBalancerElementService getInternalLoadBalancerElementByNetworkServiceProviderId(long networkProviderId);
|
||||
InternalLoadBalancerElementService getInternalLoadBalancerElementById(long providerId);
|
||||
List<InternalLoadBalancerElementService> getInternalLoadBalancerElements();
|
||||
|
||||
boolean handleCksIsoOnNetworkVirtualRouter(Long virtualRouterId, boolean mount) throws ResourceUnavailableException;
|
||||
|
||||
IpAddresses getIpAddressesFromIps(String ipAddress, String ip6Address, String macAddress);
|
||||
|
||||
String getNicVlanValueForExternalVm(NicTO nic);
|
||||
|
||||
Long getPreferredNetworkIdForPublicIpRuleAssignment(IpAddress ip, Long networkId);
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user