mirror of https://github.com/apache/cloudstack.git
Compare commits
No commits in common. "main" and "4.21.0.0" have entirely different histories.
|
|
@ -59,7 +59,6 @@ github:
|
|||
- abh1sar
|
||||
- rosi-shapeblue
|
||||
- sudo87
|
||||
- erikbocks
|
||||
|
||||
protected_branches: ~
|
||||
|
||||
|
|
|
|||
|
|
@ -1,22 +0,0 @@
|
|||
# Licensed to the Apache Software Foundation (ASF) under one
|
||||
# or more contributor license agreements. See the NOTICE file
|
||||
# distributed with this work for additional information
|
||||
# regarding copyright ownership. The ASF licenses this file
|
||||
# to you under the Apache License, Version 2.0 (the
|
||||
# "License"); you may not use this file except in compliance
|
||||
# with the License. You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing,
|
||||
# software distributed under the License is distributed on an
|
||||
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
# KIND, either express or implied. See the License for the
|
||||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
/plugins/storage/volume/linstor @rp-
|
||||
/plugins/storage/volume/storpool @slavkap
|
||||
|
||||
.pre-commit-config.yaml @jbampton
|
||||
/.github/linters/ @jbampton
|
||||
|
|
@ -1,30 +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: "maven" # See documentation for possible values
|
||||
directory: "/" # Location of package manifests
|
||||
schedule:
|
||||
interval: "daily"
|
||||
cooldown:
|
||||
default-days: 7
|
||||
|
|
@ -18,6 +18,9 @@
|
|||
# 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
|
||||
|
||||
|
|
|
|||
|
|
@ -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']
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -30,17 +30,18 @@ jobs:
|
|||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v5
|
||||
- name: Set up JDK 11
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
cache: 'maven'
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
architecture: x64
|
||||
cache: maven
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
architecture: 'x64'
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ permissions:
|
|||
jobs:
|
||||
build:
|
||||
if: github.repository == 'apache/cloudstack'
|
||||
runs-on: ubuntu-24.04
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
|
|
@ -216,19 +216,20 @@ jobs:
|
|||
smoke/test_list_volumes"]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v5
|
||||
- name: Set up JDK
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
cache: 'maven'
|
||||
java-version: '11'
|
||||
distribution: 'adopt'
|
||||
architecture: x64
|
||||
cache: maven
|
||||
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v6
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.10'
|
||||
architecture: 'x64'
|
||||
|
|
@ -236,25 +237,7 @@ jobs:
|
|||
- name: Install Build Dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y git uuid-runtime genisoimage netcat-openbsd ipmitool build-essential libgcrypt20 libgpg-error-dev libgpg-error0 libopenipmi0 ipmitool libpython3-dev libssl-dev libffi-dev python3-openssl python3-dev python3-setuptools
|
||||
|
||||
- name: Setup IPMI Tool for CloudStack
|
||||
run: |
|
||||
# Create cloudstack-common directory if it doesn't exist
|
||||
sudo mkdir -p /usr/share/cloudstack-common
|
||||
|
||||
# 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
|
||||
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: Install Python dependencies
|
||||
run: |
|
||||
|
|
@ -293,7 +276,7 @@ jobs:
|
|||
- 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
|
||||
|
||||
|
|
|
|||
|
|
@ -32,12 +32,12 @@ jobs:
|
|||
name: codecov
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v5
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
|
|
|
|||
|
|
@ -1,48 +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@v5
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v3
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
- name: Autobuild
|
||||
uses: github/codeql-action/autobuild@v3
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v3
|
||||
with:
|
||||
category: "Security"
|
||||
|
|
@ -47,7 +47,7 @@ jobs:
|
|||
- name: Set Docker repository name
|
||||
run: echo "DOCKER_REPOSITORY=apache" >> $GITHUB_ENV
|
||||
|
||||
- uses: actions/checkout@v5
|
||||
- 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
|
||||
|
|
|
|||
|
|
@ -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]
|
||||
|
||||
|
|
@ -32,18 +32,16 @@ jobs:
|
|||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- name: Check Out
|
||||
uses: actions/checkout@v5
|
||||
uses: actions/checkout@v4
|
||||
- name: Install
|
||||
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
|
||||
- uses: actions/cache@v5
|
||||
- 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
|
||||
|
|
@ -32,26 +32,26 @@ jobs:
|
|||
name: Main Sonar JaCoCo Build
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK17
|
||||
uses: actions/setup-java@v5
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
cache: 'maven'
|
||||
|
||||
- name: Cache SonarCloud packages
|
||||
uses: actions/cache@v5
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.sonar/cache
|
||||
key: ${{ runner.os }}-sonar
|
||||
restore-keys: ${{ runner.os }}-sonar
|
||||
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v5
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml', '*/pom.xml', '*/*/pom.xml', '*/*/*/pom.xml') }}
|
||||
|
|
|
|||
|
|
@ -30,9 +30,9 @@ jobs:
|
|||
build:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v4
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v5
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'adopt'
|
||||
|
|
|
|||
|
|
@ -33,27 +33,27 @@ jobs:
|
|||
name: Sonar JaCoCo Coverage
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: "refs/pull/${{ github.event.number }}/merge"
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up JDK17
|
||||
uses: actions/setup-java@v5
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: 'temurin'
|
||||
java-version: '17'
|
||||
cache: 'maven'
|
||||
|
||||
- name: Cache SonarCloud packages
|
||||
uses: actions/cache@v5
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.sonar/cache
|
||||
key: ${{ runner.os }}-sonar
|
||||
restore-keys: ${{ runner.os }}-sonar
|
||||
|
||||
- name: Cache local Maven repository
|
||||
uses: actions/cache@v5
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.m2/repository
|
||||
key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml', '*/pom.xml', '*/*/pom.xml', '*/*/*/pom.xml') }}
|
||||
|
|
|
|||
|
|
@ -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.
|
||||
|
||||
name: 'Close stale issues and PRs'
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 1 * * *'
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: write
|
||||
issues: write
|
||||
pull-requests: write
|
||||
steps:
|
||||
- uses: actions/stale@v10
|
||||
with:
|
||||
stale-issue-message: 'This issue is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.'
|
||||
stale-pr-message: 'This PR is stale because it has been open for 120 days with no activity. It may be removed by administrators of this project at any time. Remove the stale label or comment to request for removal of it to prevent this.'
|
||||
close-issue-message: 'This issue was closed because it has been stale for 120 days with no activity.'
|
||||
close-pr-message: 'This PR was closed because it has been stale for 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'
|
||||
|
|
@ -31,10 +31,10 @@ jobs:
|
|||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v5
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v5
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 16
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
CHANGES.md
|
||||
|
|
@ -25,101 +25,19 @@ repos:
|
|||
hooks:
|
||||
- id: identity
|
||||
- id: check-hooks-apply
|
||||
- repo: https://github.com/thlorenz/doctoc.git
|
||||
rev: v2.2.0
|
||||
hooks:
|
||||
- id: doctoc
|
||||
name: Add TOC for Markdown files
|
||||
files: ^CONTRIBUTING\.md$|^INSTALL\.md$|^README\.md$
|
||||
- repo: https://github.com/oxipng/oxipng
|
||||
rev: v9.1.5
|
||||
hooks:
|
||||
- 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 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$
|
||||
- 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
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v6.0.0
|
||||
rev: v5.0.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
|
||||
|
|
@ -130,7 +48,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$|
|
||||
|
|
@ -140,33 +57,41 @@ 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/realhostip\.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$
|
||||
exclude: \.vhd$
|
||||
- id: fix-byte-order-marker
|
||||
- id: forbid-submodules
|
||||
- id: mixed-line-ending
|
||||
exclude: \.cs$
|
||||
- id: trailing-whitespace
|
||||
files: ^(LICENSE|NOTICE)$|\.(bat|cfg|cs|css|gitignore|header|in|install|java|md|properties|py|rb|rc|sh|sql|te|template|txt|ucls|vue|xml|xsl|yaml|yml)$|^cloud-cli/bindir/cloud-tool$|^debian/changelog$
|
||||
files: \.(bat|cfg|cs|css|gitignore|header|in|install|java|md|properties|py|rb|sh|sql|txt|vue|xml|xsl|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.1
|
||||
rev: v2.2.6
|
||||
hooks:
|
||||
- id: codespell
|
||||
name: run codespell
|
||||
description: Check spelling with codespell
|
||||
args: [--ignore-words=.github/linters/codespell.txt]
|
||||
exclude: ^systemvm/agent/noVNC/|^ui/package\.json$|^ui/package-lock\.json$|^ui/public/js/less\.min\.js$|^ui/public/locales/.*[^n].*\.json$|^server/src/test/java/org/apache/cloudstack/network/ssl/CertServiceTest.java$|^test/integration/smoke/test_ssl_offloading.py$
|
||||
exclude: ^systemvm/agent/noVNC/|^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
|
||||
hooks:
|
||||
|
|
@ -176,13 +101,3 @@ repos:
|
|||
args: [--config=.github/linters/.markdown-lint.yml]
|
||||
types: [markdown]
|
||||
files: \.(md|mdown|markdown)$
|
||||
- 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$
|
||||
|
|
|
|||
|
|
@ -644,12 +644,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
|
||||
-------------
|
||||
|
|
|
|||
|
|
@ -1,65 +1,31 @@
|
|||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
# 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.
|
||||
|
||||
_Let's 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
|
||||
|
||||
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
|
||||
use this file as a source of information when compiling the Release Notes for a new release.
|
||||
|
||||
|
|
@ -67,7 +33,8 @@ When adding information to the PendingReleaseNotes file make sure that you write
|
|||
|
||||
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)
|
||||
|
||||
|
|
@ -84,7 +51,8 @@ $ 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 +68,8 @@ $ 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,7 +89,8 @@ $ 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
|
||||
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.
|
||||
|
||||
|
|
@ -144,7 +114,8 @@ 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 +129,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
|
||||
|
|
|
|||
43
INSTALL.md
43
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
|
||||
|
||||
|
|
@ -72,7 +41,7 @@ Start the MySQL service:
|
|||
|
||||
### 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:
|
||||
|
||||
|
|
@ -202,7 +171,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:
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
59
README.md
59
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
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
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:
|
||||
|
|
|
|||
|
|
@ -451,9 +451,3 @@ iscsi.session.cleanup.enabled=false
|
|||
|
||||
# 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=
|
||||
|
|
|
|||
|
|
@ -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.21.0.0</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -613,7 +613,7 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
|||
}
|
||||
|
||||
protected String getAgentArch() {
|
||||
String arch = Script.runSimpleBashScript(Script.getExecutableAbsolutePath("arch"), 2000);
|
||||
String arch = Script.runSimpleBashScript(Script.getExecutableAbsolutePath("arch"), 1000);
|
||||
logger.debug("Arch for agent: {} found: {}", _name, arch);
|
||||
return arch;
|
||||
}
|
||||
|
|
@ -1322,6 +1322,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) {
|
||||
|
|
@ -1331,14 +1332,13 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
|
|||
}
|
||||
} else if (task.getType() == Task.Type.DISCONNECT) {
|
||||
try {
|
||||
// an issue has been found if reconnect immediately after disconnecting.
|
||||
// an issue has been found if reconnect immediately after disconnecting. please refer to https://github.com/apache/cloudstack/issues/8517
|
||||
// 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);
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ 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>
|
||||
*/
|
||||
|
|
@ -134,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>
|
||||
*/
|
||||
|
|
@ -794,20 +794,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);
|
||||
|
||||
/**
|
||||
* BGP controll CIDR
|
||||
* Data type: String.<br>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<parent>
|
||||
<groupId>org.apache.cloudstack</groupId>
|
||||
<artifactId>cloudstack</artifactId>
|
||||
<version>4.23.0.0-SNAPSHOT</version>
|
||||
<version>4.21.0.0</version>
|
||||
</parent>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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; }
|
||||
}
|
||||
|
|
@ -89,7 +89,6 @@ public class VirtualMachineTO {
|
|||
private DeployAsIsInfoTO deployAsIsInfo;
|
||||
private String metadataManufacturer;
|
||||
private String metadataProductName;
|
||||
private VirtualMachineMetadataTO metadata;
|
||||
|
||||
public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer speed, long minRam, long maxRam, BootloaderType bootloader,
|
||||
String os, boolean enableHA, boolean limitCpuUse, String vncPassword) {
|
||||
|
|
@ -495,14 +494,6 @@ 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);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -108,22 +108,36 @@ public interface ConfigurationService {
|
|||
/**
|
||||
* 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);
|
||||
|
||||
|
|
@ -133,6 +147,7 @@ public interface ConfigurationService {
|
|||
* @param cmd
|
||||
* - the command specifying diskOfferingId, name, description, tags
|
||||
* @return updated disk offering
|
||||
* @throws
|
||||
*/
|
||||
DiskOffering updateDiskOffering(UpdateDiskOfferingCmd cmd);
|
||||
|
||||
|
|
@ -142,22 +157,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);
|
||||
|
||||
|
|
@ -180,6 +207,8 @@ public interface ConfigurationService {
|
|||
* 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);
|
||||
|
||||
|
|
@ -199,7 +228,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;
|
||||
|
||||
|
|
@ -220,6 +250,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);
|
||||
|
||||
|
|
@ -229,12 +262,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);
|
||||
|
||||
|
|
@ -257,7 +295,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,
|
||||
|
|
@ -272,6 +325,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);
|
||||
|
|
@ -293,12 +349,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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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 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;
|
||||
random, firstfit, userdispersing, userconcentratedpod_random, userconcentratedpod_firstfit;
|
||||
}
|
||||
|
||||
public enum PlannerResourceUsage {
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ 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.extension.Extension;
|
||||
|
|
@ -503,7 +502,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";
|
||||
|
|
@ -854,10 +852,6 @@ public class EventTypes {
|
|||
// 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";
|
||||
|
||||
static {
|
||||
|
||||
// TODO: need a way to force author adding event types to declare the entity details as well, with out braking
|
||||
|
|
@ -1152,7 +1146,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);
|
||||
|
|
@ -1392,10 +1385,6 @@ public class EventTypes {
|
|||
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);
|
||||
}
|
||||
|
||||
public static boolean isNetworkEvent(String eventType) {
|
||||
|
|
|
|||
|
|
@ -36,4 +36,5 @@ public interface HostStats {
|
|||
public HostStats getHostStats();
|
||||
|
||||
public double getLoadAverage();
|
||||
// public double getXapiMemoryUsageKBs();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,22 +31,20 @@ import java.util.stream.Collectors;
|
|||
import static com.cloud.hypervisor.Hypervisor.HypervisorType.Functionality.DirectDownloadTemplate;
|
||||
import static com.cloud.hypervisor.Hypervisor.HypervisorType.Functionality.RootDiskSizeOverride;
|
||||
import static com.cloud.hypervisor.Hypervisor.HypervisorType.Functionality.VmStorageMigration;
|
||||
import static com.cloud.hypervisor.Hypervisor.HypervisorType.Functionality.VmStorageMigrationWithSnapshots;
|
||||
|
||||
public class Hypervisor {
|
||||
public static class HypervisorType {
|
||||
public enum Functionality {
|
||||
DirectDownloadTemplate,
|
||||
RootDiskSizeOverride,
|
||||
VmStorageMigration,
|
||||
VmStorageMigrationWithSnapshots
|
||||
VmStorageMigration
|
||||
}
|
||||
|
||||
private static final Map<String, HypervisorType> hypervisorTypeMap = new LinkedHashMap<>();
|
||||
public static final HypervisorType None = new HypervisorType("None"); //for storage hosts
|
||||
public static final HypervisorType XenServer = new HypervisorType("XenServer", ImageFormat.VHD, EnumSet.of(RootDiskSizeOverride, VmStorageMigration));
|
||||
public static final HypervisorType KVM = new HypervisorType("KVM", ImageFormat.QCOW2, EnumSet.of(DirectDownloadTemplate, RootDiskSizeOverride, VmStorageMigration));
|
||||
public static final HypervisorType VMware = new HypervisorType("VMware", ImageFormat.OVA, EnumSet.of(RootDiskSizeOverride, VmStorageMigration, VmStorageMigrationWithSnapshots));
|
||||
public static final HypervisorType VMware = new HypervisorType("VMware", ImageFormat.OVA, EnumSet.of(RootDiskSizeOverride, VmStorageMigration));
|
||||
public static final HypervisorType Hyperv = new HypervisorType("Hyperv");
|
||||
public static final HypervisorType VirtualBox = new HypervisorType("VirtualBox");
|
||||
public static final HypervisorType Parralels = new HypervisorType("Parralels");
|
||||
|
|
|
|||
|
|
@ -60,7 +60,6 @@ public interface KubernetesCluster extends ControlledEntity, com.cloud.utils.fsm
|
|||
Stopping("Resources for the Kubernetes cluster are being destroyed"),
|
||||
Stopped("All resources for the Kubernetes cluster are destroyed, Kubernetes cluster may still have ephemeral resource like persistent volumes provisioned"),
|
||||
Scaling("Transient state in which resources are either getting scaled up/down"),
|
||||
ScalingStoppedCluster("Transient state in which the service offerings of stopped clusters are getting scaled"),
|
||||
Upgrading("Transient state in which cluster is getting upgraded"),
|
||||
Importing("Transient state in which additional nodes are added as worker nodes to a cluster"),
|
||||
RemovingNodes("Transient state in which additional nodes are removed from a cluster"),
|
||||
|
|
@ -88,19 +87,14 @@ public interface KubernetesCluster extends ControlledEntity, com.cloud.utils.fsm
|
|||
s_fsm.addTransition(State.Stopping, Event.OperationFailed, State.Alert);
|
||||
|
||||
s_fsm.addTransition(State.Stopped, Event.StartRequested, State.Starting);
|
||||
s_fsm.addTransition(State.Stopped, Event.OperationSucceeded, State.Stopped);
|
||||
s_fsm.addTransition(State.Running, Event.OperationSucceeded, State.Running);
|
||||
|
||||
s_fsm.addTransition(State.Running, Event.FaultsDetected, State.Alert);
|
||||
|
||||
s_fsm.addTransition(State.Running, Event.AutoscaleRequested, State.Scaling);
|
||||
s_fsm.addTransition(State.Running, Event.ScaleUpRequested, State.Scaling);
|
||||
s_fsm.addTransition(State.Running, Event.ScaleDownRequested, State.Scaling);
|
||||
s_fsm.addTransition(State.Stopped, Event.ScaleUpRequested, State.ScalingStoppedCluster);
|
||||
s_fsm.addTransition(State.Scaling, Event.OperationSucceeded, State.Running);
|
||||
s_fsm.addTransition(State.Scaling, Event.OperationFailed, State.Alert);
|
||||
s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationSucceeded, State.Stopped);
|
||||
s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationFailed, State.Alert);
|
||||
|
||||
s_fsm.addTransition(State.Running, Event.UpgradeRequested, State.Upgrading);
|
||||
s_fsm.addTransition(State.Upgrading, Event.OperationSucceeded, State.Running);
|
||||
|
|
@ -172,5 +166,4 @@ public interface KubernetesCluster extends ControlledEntity, com.cloud.utils.fsm
|
|||
Long getEtcdNodeCount();
|
||||
Long getCniConfigId();
|
||||
String getCniConfigDetails();
|
||||
boolean isCsiEnabled();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -325,9 +325,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>();
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
@ -368,8 +364,4 @@ public interface NetworkModel {
|
|||
|
||||
boolean checkSecurityGroupSupportForNetwork(Account account, DataCenter zone, List<Long> networkIds,
|
||||
List<Long> securityGroupsIds);
|
||||
|
||||
default long getMacIdentifier(Long dataCenterId) {
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -81,7 +81,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);
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ public class Networks {
|
|||
}
|
||||
@Override
|
||||
public String getValueFrom(URI uri) {
|
||||
return uri == null ? null : uri.getAuthority();
|
||||
return uri.getAuthority();
|
||||
}
|
||||
},
|
||||
Vswitch("vs", String.class), LinkLocal(null, null), Vnet("vnet", Long.class), Storage("storage", Integer.class), Lswitch("lswitch", String.class) {
|
||||
|
|
@ -96,7 +96,7 @@ public class Networks {
|
|||
*/
|
||||
@Override
|
||||
public String getValueFrom(URI uri) {
|
||||
return uri == null ? null : uri.getSchemeSpecificPart();
|
||||
return uri.getSchemeSpecificPart();
|
||||
}
|
||||
},
|
||||
Mido("mido", String.class), Pvlan("pvlan", String.class),
|
||||
|
|
@ -177,7 +177,7 @@ public class Networks {
|
|||
* @return the scheme as BroadcastDomainType
|
||||
*/
|
||||
public static BroadcastDomainType getSchemeValue(URI uri) {
|
||||
return toEnumValue(uri == null ? null : uri.getScheme());
|
||||
return toEnumValue(uri.getScheme());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -191,7 +191,7 @@ public class Networks {
|
|||
if (com.cloud.dc.Vlan.UNTAGGED.equalsIgnoreCase(str)) {
|
||||
return Native;
|
||||
}
|
||||
return getSchemeValue(str == null ? null : new URI(str));
|
||||
return getSchemeValue(new URI(str));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -220,7 +220,7 @@ public class Networks {
|
|||
* @return the host part as String
|
||||
*/
|
||||
public String getValueFrom(URI uri) {
|
||||
return uri == null ? null : uri.getHost();
|
||||
return uri.getHost();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -243,7 +243,7 @@ public class Networks {
|
|||
* @throws URISyntaxException the string is not even an uri
|
||||
*/
|
||||
public static String getValue(String uriString) throws URISyntaxException {
|
||||
return getValue(uriString == null ? null : new URI(uriString));
|
||||
return getValue(new URI(uriString));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -41,6 +41,4 @@ public interface PhysicalNetworkTrafficType extends InternalIdentity, Identity {
|
|||
String getHypervNetworkLabel();
|
||||
|
||||
String getOvm3NetworkLabel();
|
||||
|
||||
String getVlan();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ public interface RouterHealthCheckResult {
|
|||
|
||||
String getCheckType();
|
||||
|
||||
VirtualNetworkApplianceService.RouterHealthStatus getCheckResult();
|
||||
boolean getCheckResult();
|
||||
|
||||
Date getLastUpdateTime();
|
||||
|
||||
|
|
|
|||
|
|
@ -87,8 +87,4 @@ public interface VirtualNetworkApplianceService {
|
|||
Pair<Boolean, String> performRouterHealthChecks(long routerId);
|
||||
|
||||
<T extends VirtualRouter> void collectNetworkStatistics(T router, Nic nic);
|
||||
|
||||
enum RouterHealthStatus{
|
||||
SUCCESS, FAILED, WARNING, UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,8 +70,6 @@ public interface AutoScaleService {
|
|||
|
||||
Counter createCounter(CreateCounterCmd cmd);
|
||||
|
||||
Counter getCounter(long counterId);
|
||||
|
||||
boolean deleteCounter(long counterId) throws ResourceInUseException;
|
||||
|
||||
List<? extends Counter> listCounters(ListCountersCmd cmd);
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ public interface AutoScaleVmGroup extends ControlledEntity, InternalIdentity, Di
|
|||
} else if (state.equalsIgnoreCase("scaling")) {
|
||||
return SCALING;
|
||||
} else {
|
||||
throw new IllegalArgumentException("Unexpected AutoScale Instance group state : " + state);
|
||||
throw new IllegalArgumentException("Unexpected AutoScale VM group state : " + state);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,23 +41,13 @@ import com.cloud.utils.net.Ip;
|
|||
public interface LoadBalancingRulesService {
|
||||
/**
|
||||
* Create a load balancer rule from the given ipAddress/port to the given private port
|
||||
* @param xId an existing UUID for this rule (for instance a device generated one)
|
||||
* @param name
|
||||
* @param description
|
||||
* @param srcPortStart
|
||||
* @param srcPortEnd
|
||||
* @param defPortStart
|
||||
* @param defPortEnd
|
||||
* @param ipAddrId
|
||||
* @param protocol
|
||||
* @param algorithm
|
||||
* @param networkId
|
||||
* @param lbOwnerId
|
||||
* @param openFirewall
|
||||
* @param lbProtocol
|
||||
* @param forDisplay
|
||||
* TODO
|
||||
* @param forDisplay TODO
|
||||
* @param cmd
|
||||
* the command specifying the ip address, public port, protocol, private port, and algorithm
|
||||
*
|
||||
* @return the newly created LoadBalancerVO if successful, null otherwise
|
||||
* @throws NetworkRuleConflictException
|
||||
* @throws InsufficientAddressCapacityException
|
||||
*/
|
||||
LoadBalancer createPublicLoadBalancerRule(String xId, String name, String description, int srcPortStart, int srcPortEnd, int defPortStart, int defPortEnd,
|
||||
|
|
@ -116,7 +106,7 @@ public interface LoadBalancingRulesService {
|
|||
|
||||
boolean applyLoadBalancerConfig(long lbRuleId) throws ResourceUnavailableException;
|
||||
|
||||
boolean assignCertToLoadBalancer(long lbRuleId, Long certId, boolean isForced);
|
||||
boolean assignCertToLoadBalancer(long lbRuleId, Long certId);
|
||||
|
||||
boolean removeCertFromLoadBalancer(long lbRuleId);
|
||||
|
||||
|
|
|
|||
|
|
@ -108,7 +108,8 @@ public class LbStickinessMethod {
|
|||
}
|
||||
|
||||
public void addParam(String name, Boolean required, String description, Boolean isFlag) {
|
||||
/* is this still a valid comment: FIXME : UI is breaking if the capability string length is larger , temporarily description is commented out */
|
||||
/* FIXME : UI is breaking if the capability string length is larger , temporarily description is commented out */
|
||||
// LbStickinessMethodParam param = new LbStickinessMethodParam(name, required, description);
|
||||
LbStickinessMethodParam param = new LbStickinessMethodParam(name, required, " ", isFlag);
|
||||
_paramList.add(param);
|
||||
return;
|
||||
|
|
@ -132,6 +133,7 @@ public class LbStickinessMethod {
|
|||
|
||||
public void setDescription(String description) {
|
||||
/* FIXME : UI is breaking if the capability string length is larger , temporarily description is commented out */
|
||||
//this.description = description;
|
||||
this._description = " ";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ public interface DiskOffering extends InfrastructureEntity, Identity, InternalId
|
|||
State getState();
|
||||
|
||||
enum DiskCacheMode {
|
||||
NONE("none"), WRITEBACK("writeback"), WRITETHROUGH("writethrough"), HYPERVISOR_DEFAULT("hypervisor_default");
|
||||
NONE("none"), WRITEBACK("writeback"), WRITETHROUGH("writethrough");
|
||||
|
||||
private final String _diskCacheMode;
|
||||
|
||||
|
|
@ -69,8 +69,6 @@ public interface DiskOffering extends InfrastructureEntity, Identity, InternalId
|
|||
|
||||
boolean isCustomized();
|
||||
|
||||
boolean isShared();
|
||||
|
||||
void setDiskSize(long diskSize);
|
||||
|
||||
long getDiskSize();
|
||||
|
|
@ -101,6 +99,7 @@ public interface DiskOffering extends InfrastructureEntity, Identity, InternalId
|
|||
|
||||
Long getBytesReadRateMaxLength();
|
||||
|
||||
|
||||
void setBytesWriteRate(Long bytesWriteRate);
|
||||
|
||||
Long getBytesWriteRate();
|
||||
|
|
@ -113,6 +112,7 @@ public interface DiskOffering extends InfrastructureEntity, Identity, InternalId
|
|||
|
||||
Long getBytesWriteRateMaxLength();
|
||||
|
||||
|
||||
void setIopsReadRate(Long iopsReadRate);
|
||||
|
||||
Long getIopsReadRate();
|
||||
|
|
@ -133,6 +133,7 @@ public interface DiskOffering extends InfrastructureEntity, Identity, InternalId
|
|||
|
||||
Long getIopsWriteRateMax();
|
||||
|
||||
|
||||
void setIopsWriteRateMaxLength(Long iopsWriteRateMaxLength);
|
||||
|
||||
Long getIopsWriteRateMaxLength();
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import com.cloud.user.UserData;
|
||||
import org.apache.cloudstack.api.command.admin.cluster.ListClustersCmd;
|
||||
import org.apache.cloudstack.api.command.admin.config.ListCfgGroupsByCmd;
|
||||
import org.apache.cloudstack.api.command.admin.config.ListCfgsByCmd;
|
||||
|
|
@ -71,14 +72,11 @@ import org.apache.cloudstack.api.command.user.vm.GetVMPasswordCmd;
|
|||
import org.apache.cloudstack.api.command.user.vmgroup.UpdateVMGroupCmd;
|
||||
import org.apache.cloudstack.config.Configuration;
|
||||
import org.apache.cloudstack.config.ConfigurationGroup;
|
||||
import org.apache.cloudstack.framework.config.ConfigKey;
|
||||
|
||||
import com.cloud.alert.Alert;
|
||||
import com.cloud.capacity.Capacity;
|
||||
import com.cloud.dc.Pod;
|
||||
import com.cloud.dc.Vlan;
|
||||
import com.cloud.deploy.DeploymentPlan;
|
||||
import com.cloud.deploy.DeploymentPlanner.ExcludeList;
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
import com.cloud.exception.ManagementServerException;
|
||||
import com.cloud.exception.ResourceUnavailableException;
|
||||
|
|
@ -93,13 +91,11 @@ import com.cloud.storage.GuestOSHypervisor;
|
|||
import com.cloud.storage.GuestOsCategory;
|
||||
import com.cloud.storage.StoragePool;
|
||||
import com.cloud.user.SSHKeyPair;
|
||||
import com.cloud.user.UserData;
|
||||
import com.cloud.utils.Pair;
|
||||
import com.cloud.utils.Ternary;
|
||||
import com.cloud.vm.InstanceGroup;
|
||||
import com.cloud.vm.VirtualMachine;
|
||||
import com.cloud.vm.VirtualMachine.Type;
|
||||
import com.cloud.vm.VirtualMachineProfile;
|
||||
|
||||
/**
|
||||
* Hopefully this is temporary.
|
||||
|
|
@ -108,14 +104,6 @@ import com.cloud.vm.VirtualMachineProfile;
|
|||
public interface ManagementService {
|
||||
static final String Name = "management-server";
|
||||
|
||||
ConfigKey<Boolean> JsInterpretationEnabled = new ConfigKey<>("Hidden"
|
||||
, Boolean.class
|
||||
, "js.interpretation.enabled"
|
||||
, "false"
|
||||
, "Enable/Disable all JavaScript interpretation related functionalities to create or update Javascript rules."
|
||||
, false
|
||||
, ConfigKey.Scope.Global);
|
||||
|
||||
/**
|
||||
* returns the a map of the names/values in the configuration table
|
||||
*
|
||||
|
|
@ -481,19 +469,6 @@ public interface ManagementService {
|
|||
|
||||
Ternary<Pair<List<? extends Host>, Integer>, List<? extends Host>, Map<Host, Boolean>> listHostsForMigrationOfVM(VirtualMachine vm, Long startIndex, Long pageSize, String keyword, List<VirtualMachine> vmList);
|
||||
|
||||
/**
|
||||
* Apply affinity group constraints and other exclusion rules for VM migration.
|
||||
* This is a helper method that can be used independently for per-iteration affinity checks in DRS.
|
||||
*
|
||||
* @param vm The virtual machine to migrate
|
||||
* @param vmProfile The VM profile
|
||||
* @param plan The deployment plan
|
||||
* @param vmList List of VMs with current/simulated placements for affinity processing
|
||||
* @return ExcludeList containing hosts to avoid
|
||||
*/
|
||||
ExcludeList applyAffinityConstraints(VirtualMachine vm, VirtualMachineProfile vmProfile,
|
||||
DeploymentPlan plan, List<VirtualMachine> vmList);
|
||||
|
||||
/**
|
||||
* List storage pools for live migrating of a volume. The API returns list of all pools in the cluster to which the
|
||||
* volume can be migrated. Current pool is not included in the list. In case of vSphere datastore cluster storage pools,
|
||||
|
|
@ -534,6 +509,4 @@ public interface ManagementService {
|
|||
|
||||
boolean removeManagementServer(RemoveManagementServerCmd cmd);
|
||||
|
||||
void checkJsInterpretationAllowedIfNeededForParameterValue(String paramName, boolean paramValue);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ package com.cloud.server;
|
|||
|
||||
public interface ResourceManagerUtil {
|
||||
long getResourceId(String resourceId, ResourceTag.ResourceObjectType resourceType);
|
||||
long getResourceId(String resourceId, ResourceTag.ResourceObjectType resourceType, boolean checkAccess);
|
||||
String getUuid(String resourceId, ResourceTag.ResourceObjectType resourceType);
|
||||
ResourceTag.ResourceObjectType getResourceType(String resourceTypeStr);
|
||||
void checkResourceAccessible(Long accountId, Long domainId, String exceptionMessage);
|
||||
|
|
|
|||
|
|
@ -128,7 +128,7 @@ public class Storage {
|
|||
public static enum TemplateType {
|
||||
ROUTING, // Router template
|
||||
SYSTEM, /* routing, system vm template */
|
||||
BUILTIN, /* builtin template */
|
||||
BUILTIN, /* buildin template */
|
||||
PERHOST, /* every host has this template, don't need to install it in secondary storage */
|
||||
USER, /* User supplied template/iso */
|
||||
VNF, /* VNFs (virtual network functions) template */
|
||||
|
|
|
|||
|
|
@ -180,8 +180,6 @@ public interface VolumeApiService {
|
|||
*/
|
||||
boolean doesStoragePoolSupportDiskOfferingTags(StoragePool destPool, String diskOfferingTags);
|
||||
|
||||
boolean validateConditionsToReplaceDiskOfferingOfVolume(Volume volume, DiskOffering newDiskOffering, StoragePool destPool);
|
||||
|
||||
Volume destroyVolume(long volumeId, Account caller, boolean expunge, boolean forceExpunge);
|
||||
|
||||
void destroyVolume(long volumeId);
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public interface SnapshotApiService {
|
|||
* the command that specifies the volume criteria
|
||||
* @return list of snapshot policies
|
||||
*/
|
||||
Pair<List<? extends SnapshotPolicy>, Integer> listSnapshotPolicies(ListSnapshotPoliciesCmd cmd);
|
||||
Pair<List<? extends SnapshotPolicy>, Integer> listPoliciesforVolume(ListSnapshotPoliciesCmd cmd);
|
||||
|
||||
boolean deleteSnapshotPolicies(DeleteSnapshotPoliciesCmd cmd);
|
||||
|
||||
|
|
|
|||
|
|
@ -16,12 +16,11 @@
|
|||
// under the License.
|
||||
package com.cloud.storage.snapshot;
|
||||
|
||||
import org.apache.cloudstack.acl.ControlledEntity;
|
||||
import org.apache.cloudstack.api.Displayable;
|
||||
import org.apache.cloudstack.api.Identity;
|
||||
import org.apache.cloudstack.api.InternalIdentity;
|
||||
|
||||
public interface SnapshotPolicy extends ControlledEntity, Identity, InternalIdentity, Displayable {
|
||||
public interface SnapshotPolicy extends Identity, InternalIdentity, Displayable {
|
||||
|
||||
long getVolumeId();
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import org.apache.cloudstack.acl.RoleType;
|
|||
import org.apache.cloudstack.acl.SecurityChecker.AccessType;
|
||||
import org.apache.cloudstack.api.command.admin.account.CreateAccountCmd;
|
||||
import org.apache.cloudstack.api.command.admin.user.GetUserKeysCmd;
|
||||
import org.apache.cloudstack.api.command.admin.user.RegisterUserKeyCmd;
|
||||
import org.apache.cloudstack.api.command.admin.user.RegisterCmd;
|
||||
import org.apache.cloudstack.api.command.admin.user.UpdateUserCmd;
|
||||
|
||||
import com.cloud.dc.DataCenter;
|
||||
|
|
@ -36,7 +36,6 @@ import com.cloud.offering.DiskOffering;
|
|||
import com.cloud.offering.NetworkOffering;
|
||||
import com.cloud.offering.ServiceOffering;
|
||||
import org.apache.cloudstack.auth.UserTwoFactorAuthenticator;
|
||||
import org.apache.cloudstack.backup.BackupOffering;
|
||||
|
||||
public interface AccountService {
|
||||
|
||||
|
|
@ -96,7 +95,7 @@ public interface AccountService {
|
|||
|
||||
void markUserRegistered(long userId);
|
||||
|
||||
public String[] createApiKeyAndSecretKey(RegisterUserKeyCmd cmd);
|
||||
public String[] createApiKeyAndSecretKey(RegisterCmd cmd);
|
||||
|
||||
public String[] createApiKeyAndSecretKey(final long userId);
|
||||
|
||||
|
|
@ -116,8 +115,6 @@ public interface AccountService {
|
|||
|
||||
void checkAccess(Account account, VpcOffering vof, DataCenter zone) throws PermissionDeniedException;
|
||||
|
||||
void checkAccess(Account account, BackupOffering bof) throws PermissionDeniedException;
|
||||
|
||||
void checkAccess(User user, ControlledEntity entity);
|
||||
|
||||
void checkAccess(Account account, AccessType accessType, boolean sameOwner, String apiName, ControlledEntity... entities) throws PermissionDeniedException;
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ import com.cloud.template.VirtualMachineTemplate;
|
|||
public interface ResourceLimitService {
|
||||
|
||||
static final ConfigKey<Long> MaxAccountSecondaryStorage = new ConfigKey<>("Account Defaults", Long.class, "max.account.secondary.storage", "400",
|
||||
"The default maximum secondary storage space (in GiB) that can be used for an Account", false);
|
||||
"The default maximum secondary storage space (in GiB) that can be used for an account", false);
|
||||
static final ConfigKey<Long> MaxProjectSecondaryStorage = new ConfigKey<>("Project Defaults", Long.class, "max.project.secondary.storage", "400",
|
||||
"The default maximum secondary storage space (in GiB) that can be used for a project", false);
|
||||
static final ConfigKey<Long> ResourceCountCheckInterval = new ConfigKey<>("Advanced", Long.class, "resourcecount.check.interval", "300",
|
||||
|
|
|
|||
|
|
@ -64,7 +64,6 @@ import com.cloud.storage.StoragePool;
|
|||
import com.cloud.template.VirtualMachineTemplate;
|
||||
import com.cloud.user.Account;
|
||||
import com.cloud.uservm.UserVm;
|
||||
import com.cloud.utils.Pair;
|
||||
import com.cloud.utils.exception.ExecutionException;
|
||||
|
||||
public interface UserVmService {
|
||||
|
|
@ -508,41 +507,16 @@ public interface UserVmService {
|
|||
|
||||
void collectVmNetworkStatistics (UserVm userVm);
|
||||
|
||||
/**
|
||||
* Import VM into CloudStack
|
||||
* @param zone importing zone
|
||||
* @param host importing host
|
||||
* @param template template for the imported VM
|
||||
* @param instanceNameInternal set to null to CloudStack to autogenerate from the next available VM ID on database
|
||||
* @param displayName display name for the imported VM
|
||||
* @param owner owner of the imported VM
|
||||
* @param userData user data for the imported VM
|
||||
* @param caller caller account
|
||||
* @param isDisplayVm true to display the imported VM
|
||||
* @param keyboard keyboard distribution for the imported VM
|
||||
* @param accountId account ID
|
||||
* @param userId user ID
|
||||
* @param serviceOffering service offering for the imported VM
|
||||
* @param sshPublicKey ssh key for the imported VM
|
||||
* @param hostName the name for the imported VM
|
||||
* @param hypervisorType hypervisor type for the imported VM
|
||||
* @param customParameters details for the imported VM
|
||||
* @param powerState power state of the imported VM
|
||||
* @param networkNicMap network to nic mapping
|
||||
* @return the imported VM
|
||||
* @throws InsufficientCapacityException in case of errors
|
||||
*/
|
||||
UserVm importVM(final DataCenter zone, final Host host, final VirtualMachineTemplate template, final String instanceNameInternal, final String displayName, final Account owner, final String userData, final Account caller, final Boolean isDisplayVm, final String keyboard,
|
||||
UserVm importVM(final DataCenter zone, final Host host, final VirtualMachineTemplate template, final String instanceName, final String displayName, final Account owner, final String userData, final Account caller, final Boolean isDisplayVm, final String keyboard,
|
||||
final long accountId, final long userId, final ServiceOffering serviceOffering, final String sshPublicKey,
|
||||
final String hostName, final HypervisorType hypervisorType, final Map<String, String> customParameters,
|
||||
final VirtualMachine.PowerState powerState, final LinkedHashMap<String, List<NicProfile>> networkNicMap) throws InsufficientCapacityException;
|
||||
|
||||
/**
|
||||
* Unmanage a guest VM from CloudStack
|
||||
*
|
||||
* @return (true if successful, false if not, hostUuid) if the VM is successfully unmanaged.
|
||||
* @return true if the VM is successfully unmanaged, false if not.
|
||||
*/
|
||||
Pair<Boolean, String> unmanageUserVM(Long vmId, Long targetHostId);
|
||||
boolean unmanageUserVM(Long vmId);
|
||||
|
||||
UserVm allocateVMFromBackup(CreateVMFromBackupCmd cmd) throws InsufficientCapacityException, ResourceAllocationException, ResourceUnavailableException;
|
||||
|
||||
|
|
|
|||
|
|
@ -78,7 +78,6 @@ public interface VirtualMachineProfile {
|
|||
public static final Param BootIntoSetup = new Param("enterHardwareSetup");
|
||||
public static final Param PreserveNics = new Param("PreserveNics");
|
||||
public static final Param ConsiderLastHost = new Param("ConsiderLastHost");
|
||||
public static final Param ReturnAfterVolumePrepare = new Param("ReturnAfterVolumePrepare");
|
||||
|
||||
private String name;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,7 +41,6 @@ public interface VmDetailConstants {
|
|||
String KVM_VNC_PORT = "kvm.vnc.port";
|
||||
String KVM_VNC_ADDRESS = "kvm.vnc.address";
|
||||
String KVM_VNC_PASSWORD = "kvm.vnc.password";
|
||||
String KVM_GUEST_OS_MACHINE_TYPE = "kvm.guest.os.machine.type";
|
||||
|
||||
// KVM specific, custom virtual GPU hardware
|
||||
String VIDEO_HARDWARE = "video.hardware";
|
||||
|
|
@ -55,9 +54,6 @@ public interface VmDetailConstants {
|
|||
String NIC_MULTIQUEUE_NUMBER = "nic.multiqueue.number";
|
||||
String NIC_PACKED_VIRTQUEUES_ENABLED = "nic.packed.virtqueues.enabled";
|
||||
|
||||
// KVM specific, disk controllers
|
||||
String KVM_SKIP_FORCE_DISK_CONTROLLER = "skip.force.disk.controller";
|
||||
|
||||
// Mac OSX guest specific (internal)
|
||||
String SMC_PRESENT = "smc.present";
|
||||
String FIRMWARE = "firmware";
|
||||
|
|
|
|||
|
|
@ -29,10 +29,10 @@ import com.cloud.utils.fsm.StateObject;
|
|||
public interface VMSnapshot extends ControlledEntity, Identity, InternalIdentity, StateObject<VMSnapshot.State> {
|
||||
|
||||
enum State {
|
||||
Allocated("The Instance Snapshot is allocated but has not been created yet."), Creating("The Instance Snapshot is being created."), Ready(
|
||||
"The Instance Snapshot is ready to be used."), Reverting("The Instance Snapshot is being used to revert"), Expunging("The volume is being expunging"), Removed(
|
||||
Allocated("The VM snapshot is allocated but has not been created yet."), Creating("The VM snapshot is being created."), Ready(
|
||||
"The VM snapshot is ready to be used."), Reverting("The VM snapshot is being used to revert"), Expunging("The volume is being expunging"), Removed(
|
||||
"The volume is destroyed, and can't be recovered."), Error("The volume is in error state, and can't be recovered"),
|
||||
Hidden("The Instance snapshot is hidden from the user and cannot be recovered.");
|
||||
Hidden("The VM snapshot is hidden from the user and cannot be recovered.");
|
||||
|
||||
String _description;
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,6 @@ package com.cloud.vm.snapshot;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import com.cloud.utils.fsm.NoTransitionException;
|
||||
import org.apache.cloudstack.api.command.user.vmsnapshot.ListVMSnapshotCmd;
|
||||
|
||||
import com.cloud.exception.ConcurrentOperationException;
|
||||
|
|
@ -54,6 +53,4 @@ public interface VMSnapshotService {
|
|||
* @param id vm id
|
||||
*/
|
||||
boolean deleteVMSnapshotsFromDB(Long vmId, boolean unmanage);
|
||||
|
||||
void updateOperationFailed(VMSnapshot vmSnapshot) throws NoTransitionException;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -132,10 +132,10 @@ public enum RoleType {
|
|||
* */
|
||||
public static Account.Type getAccountTypeByRole(final Role role, final Account.Type defautAccountType) {
|
||||
if (role != null) {
|
||||
LOGGER.debug("Role [{}] is not null; therefore, we use its Account type [{}].", role, defautAccountType);
|
||||
LOGGER.debug(String.format("Role [%s] is not null; therefore, we use its account type [%s].", role, defautAccountType));
|
||||
return role.getRoleType().getAccountType();
|
||||
}
|
||||
LOGGER.debug("Role is null; therefore, we use the default Account type [{}] value.", defautAccountType);
|
||||
LOGGER.debug(String.format("Role is null; therefore, we use the default account type [%s] value.", defautAccountType));
|
||||
return defautAccountType;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,8 +27,6 @@ import com.cloud.user.Account;
|
|||
import com.cloud.user.User;
|
||||
import com.cloud.utils.component.Adapter;
|
||||
|
||||
import org.apache.cloudstack.backup.BackupOffering;
|
||||
|
||||
/**
|
||||
* SecurityChecker checks the ownership and access control to objects within
|
||||
*/
|
||||
|
|
@ -147,6 +145,4 @@ public interface SecurityChecker extends Adapter {
|
|||
boolean checkAccess(Account account, NetworkOffering nof, DataCenter zone) throws PermissionDeniedException;
|
||||
|
||||
boolean checkAccess(Account account, VpcOffering vof, DataCenter zone) throws PermissionDeniedException;
|
||||
|
||||
boolean checkAccess(Account account, BackupOffering bof) throws PermissionDeniedException;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -34,27 +34,27 @@ import com.cloud.serializer.Param;
|
|||
public class AffinityGroupResponse extends BaseResponse implements ControlledViewEntityResponse {
|
||||
|
||||
@SerializedName(ApiConstants.ID)
|
||||
@Param(description = "The ID of the affinity group")
|
||||
@Param(description = "the ID of the affinity group")
|
||||
private String id;
|
||||
|
||||
@SerializedName(ApiConstants.NAME)
|
||||
@Param(description = "The name of the affinity group")
|
||||
@Param(description = "the name of the affinity group")
|
||||
private String name;
|
||||
|
||||
@SerializedName(ApiConstants.DESCRIPTION)
|
||||
@Param(description = "The description of the affinity group")
|
||||
@Param(description = "the description of the affinity group")
|
||||
private String description;
|
||||
|
||||
@SerializedName(ApiConstants.ACCOUNT)
|
||||
@Param(description = "The account owning the affinity group")
|
||||
@Param(description = "the account owning the affinity group")
|
||||
private String accountName;
|
||||
|
||||
@SerializedName(ApiConstants.DOMAIN_ID)
|
||||
@Param(description = "The domain ID of the affinity group")
|
||||
@Param(description = "the domain ID of the affinity group")
|
||||
private String domainId;
|
||||
|
||||
@SerializedName(ApiConstants.DOMAIN)
|
||||
@Param(description = "The domain name of the affinity group")
|
||||
@Param(description = "the domain name of the affinity group")
|
||||
private String domainName;
|
||||
|
||||
@SerializedName(ApiConstants.DOMAIN_PATH)
|
||||
|
|
@ -62,19 +62,19 @@ public class AffinityGroupResponse extends BaseResponse implements ControlledVie
|
|||
private String domainPath;
|
||||
|
||||
@SerializedName(ApiConstants.PROJECT_ID)
|
||||
@Param(description = "The project ID of the affinity group")
|
||||
@Param(description = "the project ID of the affinity group")
|
||||
private String projectId;
|
||||
|
||||
@SerializedName(ApiConstants.PROJECT)
|
||||
@Param(description = "The project name of the affinity group")
|
||||
@Param(description = "the project name of the affinity group")
|
||||
private String projectName;
|
||||
|
||||
@SerializedName(ApiConstants.TYPE)
|
||||
@Param(description = "The type of the affinity group")
|
||||
@Param(description = "the type of the affinity group")
|
||||
private String type;
|
||||
|
||||
@SerializedName("virtualmachineIds")
|
||||
@Param(description = "Instance IDs associated with this affinity group")
|
||||
@Param(description = "virtual machine IDs associated with this affinity group")
|
||||
private List<String> vmIdList;
|
||||
|
||||
@SerializedName("dedicatedresources")
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ import com.cloud.serializer.Param;
|
|||
public class AffinityGroupTypeResponse extends BaseResponse {
|
||||
|
||||
@SerializedName(ApiConstants.TYPE)
|
||||
@Param(description = "The type of the affinity group")
|
||||
@Param(description = "the type of the affinity group")
|
||||
private String type;
|
||||
|
||||
public AffinityGroupTypeResponse() {
|
||||
|
|
|
|||
|
|
@ -74,7 +74,6 @@ public interface AlertService {
|
|||
public static final AlertType ALERT_TYPE_VR_PUBLIC_IFACE_MTU = new AlertType((short)32, "ALERT.VR.PUBLIC.IFACE.MTU", true);
|
||||
public static final AlertType ALERT_TYPE_VR_PRIVATE_IFACE_MTU = new AlertType((short)32, "ALERT.VR.PRIVATE.IFACE.MTU", true);
|
||||
public static final AlertType ALERT_TYPE_EXTENSION_PATH_NOT_READY = new AlertType((short)33, "ALERT.TYPE.EXTENSION.PATH.NOT.READY", true);
|
||||
public static final AlertType ALERT_TYPE_VPN_GATEWAY_OBSOLETE_PARAMETERS = new AlertType((short)34, "ALERT.S2S.VPN.GATEWAY.OBSOLETE.PARAMETERS", true);
|
||||
public static final AlertType ALERT_TYPE_BACKUP_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_BACKUP_STORAGE, "ALERT.STORAGE.BACKUP", true);
|
||||
public static final AlertType ALERT_TYPE_OBJECT_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_OBJECT_STORAGE, "ALERT.STORAGE.OBJECT", true);
|
||||
|
||||
|
|
|
|||
|
|
@ -29,28 +29,28 @@ import org.apache.cloudstack.api.response.ZoneResponse;
|
|||
public abstract class AbstractGetUploadParamsCmd extends BaseCmd {
|
||||
|
||||
|
||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "The name of the Volume/Template/ISO")
|
||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, required = true, description = "the name of the volume/template/iso")
|
||||
private String name;
|
||||
|
||||
@Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, required = true, description = "The format for the Volume/Template/ISO. Possible values include QCOW2, OVA, "
|
||||
@Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, required = true, description = "the format for the volume/template/iso. Possible values include QCOW2, OVA, "
|
||||
+ "and VHD.")
|
||||
private String format;
|
||||
|
||||
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "The ID of the zone the Volume/Template/ISO is "
|
||||
@Parameter(name = ApiConstants.ZONE_ID, type = CommandType.UUID, entityType = ZoneResponse.class, required = true, description = "the ID of the zone the volume/template/iso is "
|
||||
+ "to be hosted on")
|
||||
private Long zoneId;
|
||||
|
||||
@Parameter(name = ApiConstants.CHECKSUM, type = CommandType.STRING, description = "The checksum value of this Volume/Template/ISO " + ApiConstants.CHECKSUM_PARAMETER_PREFIX_DESCRIPTION)
|
||||
@Parameter(name = ApiConstants.CHECKSUM, type = CommandType.STRING, description = "the checksum value of this volume/template/iso " + ApiConstants.CHECKSUM_PARAMETER_PREFIX_DESCRIPTION)
|
||||
private String checksum;
|
||||
|
||||
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "An optional accountName. Must be used with domainId.")
|
||||
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "an optional accountName. Must be used with domainId.")
|
||||
private String accountName;
|
||||
|
||||
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "An optional domainId. If the Account parameter is used, "
|
||||
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "an optional domainId. If the account parameter is used, "
|
||||
+ "domainId must also be used.")
|
||||
private Long domainId;
|
||||
|
||||
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Upload Volume/Template/ISO for the project")
|
||||
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "Upload volume/template/iso for the project")
|
||||
private Long projectId;
|
||||
|
||||
public String getName() {
|
||||
|
|
@ -81,34 +81,6 @@ public abstract class AbstractGetUploadParamsCmd extends BaseCmd {
|
|||
return projectId;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public void setFormat(String format) {
|
||||
this.format = format;
|
||||
}
|
||||
|
||||
public void setZoneId(Long zoneId) {
|
||||
this.zoneId = zoneId;
|
||||
}
|
||||
|
||||
public void setChecksum(String checksum) {
|
||||
this.checksum = checksum;
|
||||
}
|
||||
|
||||
public void setAccountName(String accountName) {
|
||||
this.accountName = accountName;
|
||||
}
|
||||
|
||||
public void setDomainId(Long domainId) {
|
||||
this.domainId = domainId;
|
||||
}
|
||||
|
||||
public void setProjectId(Long projectId) {
|
||||
this.projectId = projectId;
|
||||
}
|
||||
|
||||
public GetUploadParamsResponse createGetUploadParamsResponse(UUID id, URL postURL, String metadata, String timeout, String signature) {
|
||||
return new GetUploadParamsResponse(id, postURL, metadata, timeout, signature);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ public class ApiConstants {
|
|||
public static final String ACTIVATION_RULE = "activationrule";
|
||||
public static final String ACTIVITY = "activity";
|
||||
public static final String ADAPTER_TYPE = "adaptertype";
|
||||
public static final String ADDITONAL_CONFIG_ENABLED = "additionalconfigenabled";
|
||||
public static final String ADDRESS = "address";
|
||||
public static final String ALGORITHM = "algorithm";
|
||||
public static final String ALIAS = "alias";
|
||||
|
|
@ -64,7 +63,6 @@ public class ApiConstants {
|
|||
public static final String BACKUP_STORAGE_LIMIT = "backupstoragelimit";
|
||||
public static final String BACKUP_STORAGE_TOTAL = "backupstoragetotal";
|
||||
public static final String BACKUP_VM_OFFERING_REMOVED = "vmbackupofferingremoved";
|
||||
public static final String IS_BACKUP_VM_EXPUNGED = "isbackupvmexpunged";
|
||||
public static final String BACKUP_TOTAL = "backuptotal";
|
||||
public static final String BASE64_IMAGE = "base64image";
|
||||
public static final String BGP_PEERS = "bgppeers";
|
||||
|
|
@ -82,7 +80,6 @@ public class ApiConstants {
|
|||
public static final String BYTES_WRITE_RATE_MAX = "byteswriteratemax";
|
||||
public static final String BYTES_WRITE_RATE_MAX_LENGTH = "byteswriteratemaxlength";
|
||||
public static final String BYPASS_VLAN_OVERLAP_CHECK = "bypassvlanoverlapcheck";
|
||||
public static final String CALLER = "caller";
|
||||
public static final String CAPACITY = "capacity";
|
||||
public static final String CATEGORY = "category";
|
||||
public static final String CAN_REVERT = "canrevert";
|
||||
|
|
@ -135,7 +132,6 @@ public class ApiConstants {
|
|||
public static final String CNI_CONFIG_ID = "cniconfigurationid";
|
||||
public static final String CNI_CONFIG_DETAILS = "cniconfigdetails";
|
||||
public static final String CNI_CONFIG_NAME = "cniconfigname";
|
||||
public static final String CSI_ENABLED = "csienabled";
|
||||
public static final String COMPONENT = "component";
|
||||
public static final String CPU = "CPU";
|
||||
public static final String CPU_CORE_PER_SOCKET = "cpucorepersocket";
|
||||
|
|
@ -143,7 +139,6 @@ public class ApiConstants {
|
|||
public static final String CPU_SPEED = "cpuspeed";
|
||||
public static final String CPU_LOAD_AVERAGE = "cpuloadaverage";
|
||||
public static final String CREATED = "created";
|
||||
public static final String CROSS_ZONE_INSTANCE_CREATION = "crosszoneinstancecreation";
|
||||
public static final String CTX_ACCOUNT_ID = "ctxaccountid";
|
||||
public static final String CTX_DETAILS = "ctxDetails";
|
||||
public static final String CTX_USER_ID = "ctxuserid";
|
||||
|
|
@ -216,7 +211,6 @@ public class ApiConstants {
|
|||
public static final String DURATION = "duration";
|
||||
public static final String ELIGIBLE = "eligible";
|
||||
public static final String EMAIL = "email";
|
||||
public static final String ENABLE_CSI = "enablecsi";
|
||||
public static final String END_ASN = "endasn";
|
||||
public static final String END_DATE = "enddate";
|
||||
public static final String END_IP = "endip";
|
||||
|
|
@ -228,7 +222,6 @@ public class ApiConstants {
|
|||
public static final String EVENT_TYPE = "eventtype";
|
||||
public static final String EXPIRES = "expires";
|
||||
public static final String EXTRA_CONFIG = "extraconfig";
|
||||
public static final String EXTRA_PARAMS = "extraparams";
|
||||
public static final String EXTRA_DHCP_OPTION = "extradhcpoption";
|
||||
public static final String EXTRA_DHCP_OPTION_NAME = "extradhcpoptionname";
|
||||
public static final String EXTRA_DHCP_OPTION_CODE = "extradhcpoptioncode";
|
||||
|
|
@ -247,8 +240,6 @@ public class ApiConstants {
|
|||
public static final String FIRSTNAME = "firstname";
|
||||
public static final String FORCED = "forced";
|
||||
public static final String FORCED_DESTROY_LOCAL_STORAGE = "forcedestroylocalstorage";
|
||||
public static final String FORCE_CONVERT_TO_POOL = "forceconverttopool";
|
||||
|
||||
public static final String FORCE_DELETE_HOST = "forcedeletehost";
|
||||
public static final String FORCE_MS_TO_IMPORT_VM_FILES = "forcemstoimportvmfiles";
|
||||
public static final String FORCE_UPDATE_OS_TYPE = "forceupdateostype";
|
||||
|
|
@ -375,7 +366,6 @@ public class ApiConstants {
|
|||
public static final String MAC_ADDRESS = "macaddress";
|
||||
public static final String MAC_ADDRESSES = "macaddresses";
|
||||
public static final String MANUAL_UPGRADE = "manualupgrade";
|
||||
public static final String MATCH_TYPE = "matchtype";
|
||||
public static final String MAX = "max";
|
||||
public static final String MAX_SNAPS = "maxsnaps";
|
||||
public static final String MAX_BACKUPS = "maxbackups";
|
||||
|
|
@ -585,7 +575,6 @@ public class ApiConstants {
|
|||
public static final String SUITABLE_FOR_VM = "suitableforvirtualmachine";
|
||||
public static final String SUPPORTS_STORAGE_SNAPSHOT = "supportsstoragesnapshot";
|
||||
public static final String TARGET_IQN = "targetiqn";
|
||||
public static final String TASKS_FILTER = "tasksfilter";
|
||||
public static final String TEMPLATE_FILTER = "templatefilter";
|
||||
public static final String TEMPLATE_ID = "templateid";
|
||||
public static final String TEMPLATE_IDS = "templateids";
|
||||
|
|
@ -1165,7 +1154,6 @@ public class ApiConstants {
|
|||
public static final String OVM3_CLUSTER = "ovm3cluster";
|
||||
public static final String OVM3_VIP = "ovm3vip";
|
||||
public static final String CLEAN_UP_DETAILS = "cleanupdetails";
|
||||
public static final String CLEAN_UP_EXTERNAL_DETAILS = "cleanupexternaldetails";
|
||||
public static final String CLEAN_UP_PARAMETERS = "cleanupparameters";
|
||||
public static final String VIRTUAL_SIZE = "virtualsize";
|
||||
public static final String NETSCALER_CONTROLCENTER_ID = "netscalercontrolcenterid";
|
||||
|
|
@ -1216,7 +1204,6 @@ public class ApiConstants {
|
|||
public static final String DOCKER_REGISTRY_EMAIL = "dockerregistryemail";
|
||||
public static final String ISO_NAME = "isoname";
|
||||
public static final String ISO_STATE = "isostate";
|
||||
public static final String ISO_URL = "isourl";
|
||||
public static final String SEMANTIC_VERSION = "semanticversion";
|
||||
public static final String KUBERNETES_VERSION_ID = "kubernetesversionid";
|
||||
public static final String KUBERNETES_VERSION_NAME = "kubernetesversionname";
|
||||
|
|
@ -1365,10 +1352,6 @@ public class ApiConstants {
|
|||
|
||||
public static final String RECURSIVE_DOMAINS = "recursivedomains";
|
||||
|
||||
public static final String VPN_CUSTOMER_GATEWAY_PARAMETERS = "vpncustomergatewayparameters";
|
||||
public static final String OBSOLETE_PARAMETERS = "obsoleteparameters";
|
||||
public static final String EXCLUDED_PARAMETERS = "excludedparameters";
|
||||
|
||||
/**
|
||||
* This enum specifies IO Drivers, each option controls specific policies on I/O.
|
||||
* Qemu guests support "threads" and "native" options Since 0.8.8 ; "io_uring" is supported Since 6.3.0 (QEMU 5.0).
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package org.apache.cloudstack.api;
|
|||
public abstract class BaseAsyncCreateCustomIdCmd extends BaseAsyncCreateCmd {
|
||||
@Parameter(name = ApiConstants.CUSTOM_ID,
|
||||
type = CommandType.STRING,
|
||||
description = "An optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only")
|
||||
description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only")
|
||||
private String customId;
|
||||
|
||||
public String getCustomId() {
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ import org.apache.cloudstack.acl.RoleType;
|
|||
public abstract class BaseAsyncCustomIdCmd extends BaseAsyncCmd {
|
||||
@Parameter(name = ApiConstants.CUSTOM_ID,
|
||||
type = CommandType.STRING,
|
||||
description = "An optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin})
|
||||
description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin})
|
||||
private String customId;
|
||||
|
||||
public String getCustomId() {
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ import org.apache.cloudstack.api.response.ListResponse;
|
|||
import org.apache.cloudstack.backup.BackupOffering;
|
||||
import org.apache.cloudstack.context.CallContext;
|
||||
|
||||
public abstract class BaseBackupListCmd extends BaseListAccountResourcesCmd {
|
||||
public abstract class BaseBackupListCmd extends BaseListCmd {
|
||||
|
||||
protected void setupResponseBackupOfferingsList(final List<BackupOffering> offerings, final Integer count) {
|
||||
final ListResponse<BackupOfferingResponse> response = new ListResponse<>();
|
||||
|
|
|
|||
|
|
@ -382,7 +382,7 @@ public abstract class BaseCmd {
|
|||
if (roleIsAllowed) {
|
||||
validFields.add(field);
|
||||
} else {
|
||||
logger.debug("Ignoring parameter {} as the caller is not authorized to pass it in", parameterAnnotation.name());
|
||||
logger.debug("Ignoring parameter " + parameterAnnotation.name() + " as the caller is not authorized to pass it in");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ public abstract class BaseCustomIdCmd extends BaseCmd {
|
|||
|
||||
@Parameter(name = ApiConstants.CUSTOM_ID,
|
||||
type = CommandType.STRING,
|
||||
description = "An optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin})
|
||||
description = "an optional field, in case you want to set a custom id to the resource. Allowed to Root Admins only", since = "4.4", authorized = {RoleType.Admin})
|
||||
private String customId;
|
||||
|
||||
public String getCustomId() {
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package org.apache.cloudstack.api;
|
|||
|
||||
public abstract class BaseListAccountResourcesCmd extends BaseListDomainResourcesCmd implements IBaseListAccountResourcesCmd {
|
||||
|
||||
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "List resources by Account. Must be used with the domainId parameter.")
|
||||
@Parameter(name = ApiConstants.ACCOUNT, type = CommandType.STRING, description = "list resources by account. Must be used with the domainId parameter.")
|
||||
private String accountName;
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@ public abstract class BaseListDomainResourcesCmd extends BaseListCmd implements
|
|||
@Parameter(name = ApiConstants.DOMAIN_ID,
|
||||
type = CommandType.UUID,
|
||||
entityType = DomainResponse.class,
|
||||
description = "List only resources belonging to the domain specified")
|
||||
description = "list only resources belonging to the domain specified")
|
||||
private Long domainId;
|
||||
|
||||
@Parameter(name = ApiConstants.IS_RECURSIVE, type = CommandType.BOOLEAN, description = "Defaults to false,"
|
||||
@Parameter(name = ApiConstants.IS_RECURSIVE, type = CommandType.BOOLEAN, description = "defaults to false,"
|
||||
+ " but if true, lists all resources from the parent specified by the domainId till leaves.")
|
||||
private Boolean recursive;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import org.apache.cloudstack.api.response.ProjectResponse;
|
|||
|
||||
public abstract class BaseListProjectAndAccountResourcesCmd extends BaseListAccountResourcesCmd implements IBaseListProjectAndAccountResourcesCmd {
|
||||
|
||||
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "List objects by project; if projectid=-1 lists All Instances")
|
||||
@Parameter(name = ApiConstants.PROJECT_ID, type = CommandType.UUID, entityType = ProjectResponse.class, description = "list objects by project; if projectid=-1 lists All VMs")
|
||||
private Long projectId;
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ package org.apache.cloudstack.api;
|
|||
import org.apache.commons.lang3.BooleanUtils;
|
||||
|
||||
public abstract class BaseListRetrieveOnlyResourceCountCmd extends BaseListTaggedResourcesCmd {
|
||||
@Parameter(name = ApiConstants.RETRIEVE_ONLY_RESOURCE_COUNT, type = CommandType.BOOLEAN, description = "Makes the API's response contains only the resource count")
|
||||
@Parameter(name = ApiConstants.RETRIEVE_ONLY_RESOURCE_COUNT, type = CommandType.BOOLEAN, description = "makes the API's response contains only the resource count")
|
||||
private Boolean retrieveOnlyResourceCount;
|
||||
|
||||
public Boolean getRetrieveOnlyResourceCount() {
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ public abstract class BaseListTemplateOrIsoPermissionsCmd extends BaseCmd implem
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplatePermissionsResponse.class, required = true, description = "The Template ID")
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplatePermissionsResponse.class, required = true, description = "the template ID")
|
||||
private Long id;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
|
|
@ -25,11 +25,11 @@ public abstract class BaseResponse implements ResponseObject {
|
|||
private transient String objectName;
|
||||
|
||||
@SerializedName(ApiConstants.JOB_ID)
|
||||
@Param(description = "The UUID of the latest async job acting on this object")
|
||||
@Param(description = "the UUID of the latest async job acting on this object")
|
||||
protected String jobId;
|
||||
|
||||
@SerializedName(ApiConstants.JOB_STATUS)
|
||||
@Param(description = "The current status of the latest async job acting on this object")
|
||||
@Param(description = "the current status of the latest async job acting on this object")
|
||||
private Integer jobStatus;
|
||||
|
||||
public BaseResponse() {
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ import com.google.gson.annotations.SerializedName;
|
|||
public abstract class BaseResponseWithAnnotations extends BaseResponse {
|
||||
|
||||
@SerializedName(ApiConstants.HAS_ANNOTATIONS)
|
||||
@Param(description = "True if the entity/resource has annotations")
|
||||
@Param(description = "true if the entity/resource has annotations")
|
||||
private Boolean hasAnnotation;
|
||||
|
||||
public Boolean hasAnnotation() {
|
||||
|
|
|
|||
|
|
@ -22,11 +22,11 @@ import com.google.gson.annotations.SerializedName;
|
|||
public abstract class BaseResponseWithAssociatedNetwork extends BaseResponseWithAnnotations {
|
||||
|
||||
@SerializedName(ApiConstants.ASSOCIATED_NETWORK_ID)
|
||||
@Param(description = "The ID of the Network associated with this private gateway")
|
||||
@Param(description = "the ID of the Network associated with this private gateway")
|
||||
private String associatedNetworkId;
|
||||
|
||||
@SerializedName(ApiConstants.ASSOCIATED_NETWORK)
|
||||
@Param(description = "The name of the Network associated with this private gateway")
|
||||
@Param(description = "the name of the Network associated with this private gateway")
|
||||
private String associatedNetworkName;
|
||||
|
||||
public void setAssociatedNetworkId(String associatedNetworkId) {
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ import com.google.gson.annotations.SerializedName;
|
|||
public abstract class BaseResponseWithTagInformation extends BaseResponseWithAnnotations {
|
||||
|
||||
@SerializedName(ApiConstants.TAGS)
|
||||
@Param(description = "The list of resource tags associated", responseObject = ResourceTagResponse.class)
|
||||
@Param(description = "the list of resource tags associated", responseObject = ResourceTagResponse.class)
|
||||
protected Set<ResourceTagResponse> tags;
|
||||
|
||||
public void addTag(ResourceTagResponse tag) {
|
||||
|
|
|
|||
|
|
@ -30,49 +30,49 @@ public abstract class BaseUpdateTemplateOrIsoCmd extends BaseCmd {
|
|||
//////////////// API parameters /////////////////////
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
@Parameter(name = ApiConstants.BOOTABLE, type = CommandType.BOOLEAN, description = "True if image is bootable, false otherwise; available only for updateIso API")
|
||||
@Parameter(name = ApiConstants.BOOTABLE, type = CommandType.BOOLEAN, description = "true if image is bootable, false otherwise; available only for updateIso API")
|
||||
private Boolean bootable;
|
||||
|
||||
@Parameter(name = ApiConstants.REQUIRES_HVM, type = CommandType.BOOLEAN, description = "True if the Template requires HVM, false otherwise; available only for updateTemplate API")
|
||||
@Parameter(name = ApiConstants.REQUIRES_HVM, type = CommandType.BOOLEAN, description = "true if the template requires HVM, false otherwise; available only for updateTemplate API")
|
||||
private Boolean requiresHvm;
|
||||
|
||||
@Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "The display text of the image", length = 4096)
|
||||
@Parameter(name = ApiConstants.DISPLAY_TEXT, type = CommandType.STRING, description = "the display text of the image", length = 4096)
|
||||
private String displayText;
|
||||
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "The ID of the image file")
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "the ID of the image file")
|
||||
private Long id;
|
||||
|
||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "The name of the image file")
|
||||
@Parameter(name = ApiConstants.NAME, type = CommandType.STRING, description = "the name of the image file")
|
||||
private String templateName;
|
||||
|
||||
@Parameter(name = ApiConstants.OS_TYPE_ID,
|
||||
type = CommandType.UUID,
|
||||
entityType = GuestOSResponse.class,
|
||||
description = "The ID of the OS type that best represents the OS of this image.")
|
||||
description = "the ID of the OS type that best represents the OS of this image.")
|
||||
private Long osTypeId;
|
||||
|
||||
@Parameter(name = ApiConstants.FORCE_UPDATE_OS_TYPE, type = CommandType.BOOLEAN, since = "4.21", description = "Force OS type update. Warning: Updating OS type will " +
|
||||
"update the guest OS configuration for all the existing Instances deployed with this template/iso, which may affect their behavior.")
|
||||
private Boolean forceUpdateOsType;
|
||||
|
||||
@Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, description = "The format for the image")
|
||||
@Parameter(name = ApiConstants.FORMAT, type = CommandType.STRING, description = "the format for the image")
|
||||
private String format;
|
||||
|
||||
@Parameter(name = ApiConstants.PASSWORD_ENABLED, type = CommandType.BOOLEAN, description = "True if the image supports the password reset feature; default is false")
|
||||
@Parameter(name = ApiConstants.PASSWORD_ENABLED, type = CommandType.BOOLEAN, description = "true if the image supports the password reset feature; default is false")
|
||||
private Boolean passwordEnabled;
|
||||
|
||||
@Parameter(name = ApiConstants.SSHKEY_ENABLED, type = CommandType.BOOLEAN, description = "True if the Template supports the SSHkey upload feature; default is false")
|
||||
@Parameter(name = ApiConstants.SSHKEY_ENABLED, type = CommandType.BOOLEAN, description = "true if the template supports the sshkey upload feature; default is false")
|
||||
private Boolean sshKeyEnabled;
|
||||
|
||||
@Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "Sort key of the Template, integer")
|
||||
@Parameter(name = ApiConstants.SORT_KEY, type = CommandType.INTEGER, description = "sort key of the template, integer")
|
||||
private Integer sortKey;
|
||||
|
||||
@Parameter(name = ApiConstants.IS_DYNAMICALLY_SCALABLE,
|
||||
type = CommandType.BOOLEAN,
|
||||
description = "True if Template/ISO contains XS/VMWare tools in order to support dynamic scaling of Instance CPU/memory")
|
||||
description = "true if template/ISO contains XS/VMWare tools inorder to support dynamic scaling of VM cpu/memory")
|
||||
private Boolean isDynamicallyScalable;
|
||||
|
||||
@Parameter(name = ApiConstants.ROUTING, type = CommandType.BOOLEAN, description = "True if the Template type is routing i.e., if Template is used to deploy router")
|
||||
@Parameter(name = ApiConstants.ROUTING, type = CommandType.BOOLEAN, description = "true if the template type is routing i.e., if template is used to deploy router")
|
||||
protected Boolean isRoutingType;
|
||||
|
||||
@Parameter(name = ApiConstants.DETAILS, type = CommandType.MAP, description = "Details in key/value pairs using format details[i].keyname=keyvalue. Example: details[0].hypervisortoolsversion=xenserver61")
|
||||
|
|
@ -80,11 +80,11 @@ public abstract class BaseUpdateTemplateOrIsoCmd extends BaseCmd {
|
|||
|
||||
@Parameter(name = ApiConstants.CLEAN_UP_DETAILS,
|
||||
type = CommandType.BOOLEAN,
|
||||
description = "Optional boolean field, which indicates if details should be cleaned up or not (if set to true, details removed for this resource, details field ignored; if false or not set, no action)")
|
||||
description = "optional boolean field, which indicates if details should be cleaned up or not (if set to true, details removed for this resource, details field ignored; if false or not set, no action)")
|
||||
private Boolean cleanupDetails;
|
||||
|
||||
@Parameter(name = ApiConstants.ARCH, type = CommandType.STRING,
|
||||
description = "the CPU arch of the template/ISO. Valid options are: x86_64, aarch64, s390x",
|
||||
description = "the CPU arch of the template/ISO. Valid options are: x86_64, aarch64",
|
||||
since = "4.20")
|
||||
private String arch;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,31 +40,31 @@ public abstract class BaseUpdateTemplateOrIsoPermissionsCmd extends BaseCmd {
|
|||
@Parameter(name = ApiConstants.ACCOUNTS,
|
||||
type = CommandType.LIST,
|
||||
collectionType = CommandType.STRING,
|
||||
description = "A comma delimited list of Accounts within caller's domain. If specified, \"op\" parameter has to be passed in.")
|
||||
description = "a comma delimited list of accounts within caller's domain. If specified, \"op\" parameter has to be passed in.")
|
||||
private List<String> accountNames;
|
||||
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "The Template ID")
|
||||
@Parameter(name = ApiConstants.ID, type = CommandType.UUID, entityType = TemplateResponse.class, required = true, description = "the template ID")
|
||||
private Long id;
|
||||
|
||||
@Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN, description = "True for featured Template/ISO, false otherwise")
|
||||
@Parameter(name = ApiConstants.IS_FEATURED, type = CommandType.BOOLEAN, description = "true for featured template/iso, false otherwise")
|
||||
private Boolean featured;
|
||||
|
||||
@Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "True for public Template/ISO, false for private Templates/ISOs")
|
||||
@Parameter(name = ApiConstants.IS_PUBLIC, type = CommandType.BOOLEAN, description = "true for public template/iso, false for private templates/isos")
|
||||
private Boolean isPublic;
|
||||
|
||||
@Parameter(name = ApiConstants.IS_EXTRACTABLE,
|
||||
type = CommandType.BOOLEAN,
|
||||
description = "True if the Template/ISO is extractable, false otherwise. Can be set only by root admin")
|
||||
description = "true if the template/iso is extractable, false other wise. Can be set only by root admin")
|
||||
private Boolean isExtractable;
|
||||
|
||||
@Parameter(name = ApiConstants.OP, type = CommandType.STRING, description = "Permission operator (add, remove, reset)")
|
||||
@Parameter(name = ApiConstants.OP, type = CommandType.STRING, description = "permission operator (add, remove, reset)")
|
||||
private String operation;
|
||||
|
||||
@Parameter(name = ApiConstants.PROJECT_IDS,
|
||||
type = CommandType.LIST,
|
||||
collectionType = CommandType.UUID,
|
||||
entityType = ProjectResponse.class,
|
||||
description = "A comma delimited list of projects. If specified, \"op\" parameter has to be passed in.")
|
||||
description = "a comma delimited list of projects. If specified, \"op\" parameter has to be passed in.")
|
||||
private List<Long> projectIds;
|
||||
|
||||
// ///////////////////////////////////////////////////
|
||||
|
|
@ -121,7 +121,7 @@ public abstract class BaseUpdateTemplateOrIsoPermissionsCmd extends BaseCmd {
|
|||
SuccessResponse response = new SuccessResponse(getCommandName());
|
||||
setResponseObject(response);
|
||||
} else {
|
||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update Template/ISO permissions");
|
||||
throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update template/iso permissions");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ public class CreateAccountCmd extends BaseCmd {
|
|||
|
||||
@Parameter(name = ApiConstants.ACCOUNT,
|
||||
type = CommandType.STRING,
|
||||
description = "Name of the Account to be created. The user will be added to this newly created account. If no Account is specified, the username will be used as the Account name.")
|
||||
description = "Name of the account to be created. The user will be added to this newly created account. If no account is specified, the username will be used as the account name.")
|
||||
private String accountName;
|
||||
|
||||
@Parameter(name = ApiConstants.ACCOUNT_TYPE,
|
||||
|
|
@ -64,13 +64,13 @@ public class CreateAccountCmd extends BaseCmd {
|
|||
@Parameter(name = ApiConstants.DOMAIN_ID, type = CommandType.UUID, entityType = DomainResponse.class, description = "Creates the user under the specified domain.")
|
||||
private Long domainId;
|
||||
|
||||
@Parameter(name = ApiConstants.EMAIL, type = CommandType.STRING, required = true, description = "E-mail")
|
||||
@Parameter(name = ApiConstants.EMAIL, type = CommandType.STRING, required = true, description = "email")
|
||||
private String email;
|
||||
|
||||
@Parameter(name = ApiConstants.FIRSTNAME, type = CommandType.STRING, required = true, description = "First name")
|
||||
@Parameter(name = ApiConstants.FIRSTNAME, type = CommandType.STRING, required = true, description = "firstname")
|
||||
private String firstName;
|
||||
|
||||
@Parameter(name = ApiConstants.LASTNAME, type = CommandType.STRING, required = true, description = "Last name")
|
||||
@Parameter(name = ApiConstants.LASTNAME, type = CommandType.STRING, required = true, description = "lastname")
|
||||
private String lastName;
|
||||
|
||||
@Parameter(name = ApiConstants.PASSWORD,
|
||||
|
|
@ -87,16 +87,16 @@ public class CreateAccountCmd extends BaseCmd {
|
|||
@Parameter(name = ApiConstants.USERNAME, type = CommandType.STRING, required = true, description = "Unique username.")
|
||||
private String userName;
|
||||
|
||||
@Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, description = "Network domain for the Account's Networks")
|
||||
@Parameter(name = ApiConstants.NETWORK_DOMAIN, type = CommandType.STRING, description = "Network domain for the account's networks")
|
||||
private String networkDomain;
|
||||
|
||||
@Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "Details for Account used to store specific parameters")
|
||||
@Parameter(name = ApiConstants.ACCOUNT_DETAILS, type = CommandType.MAP, description = "details for account used to store specific parameters")
|
||||
private Map<String, String> details;
|
||||
|
||||
@Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.STRING, description = "Account UUID, required for adding Account from external provisioning system")
|
||||
@Parameter(name = ApiConstants.ACCOUNT_ID, type = CommandType.STRING, description = "Account UUID, required for adding account from external provisioning system")
|
||||
private String accountUUID;
|
||||
|
||||
@Parameter(name = ApiConstants.USER_ID, type = CommandType.STRING, description = "User UUID, required for adding Account from external provisioning system")
|
||||
@Parameter(name = ApiConstants.USER_ID, type = CommandType.STRING, description = "User UUID, required for adding account from external provisioning system")
|
||||
private String userUUID;
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue