Skip to content

Commit

Permalink
Merge remote-tracking branch 'apache/main' into 4.18-add-ConfigDrive-…
Browse files Browse the repository at this point in the history
…datasource
  • Loading branch information
weizhouapache committed Mar 12, 2024
2 parents 98bcfe4 + 6dc3d06 commit 7fce265
Show file tree
Hide file tree
Showing 4,262 changed files with 150,086 additions and 48,795 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
21 changes: 20 additions & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,21 @@ github:
- infrastructure
- java
- python
- hosting
- kvm
- libvirt
- vsphere
- vmware
- xenserver
- xcp-ng
- orchestration
- virtualization
- virtual-machine
- kubernetes

features:
wiki: true
issues: true
discussions: true
projects: true

enabled_merge_buttons:
Expand All @@ -45,5 +51,18 @@ github:

collaborators:
- acs-robot
- kiranchavala
- rajujith
- vishesh92
- GaOrtiga
- SadiJr
- winterhazel
- rp-

protected_branches: ~

notifications:
commits: [email protected]
issues: [email protected]
pullrequests: [email protected]
discussions: [email protected]
11 changes: 10 additions & 1 deletion .github/linters/.flake8
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,17 @@
# specific language governing permissions and limitations
# under the License.

# E112 Expected an indented block
# E113 Unexpected indentation
# E133 Closing bracket is missing indentation
# E223 Tab before operator
# E224 Tab after operator
# E227 Missing whitespace around bitwise or shift operator
# E242 Tab after ','
# E273 Tab after keyword
# E274 Tab before keyword
# E742 Do not define classes named 'I', 'O', or 'l'
# E743 Do not define functions named 'I', 'O', or 'l'
# E901 SyntaxError or IndentationError
# E902 IOError
# W291 Trailing whitespace
Expand All @@ -28,4 +34,7 @@
# W391 Blank line at end of file

[flake8]
select = E223,E224,E242,E273,E274,E901,E902,W291,W292,W293,W391
exclude =
.git,
venv
select = E112,E113,E133,E223,E224,E227,E242,E273,E274,E742,E743,E901,E902,W291,W292,W293,W391
9 changes: 6 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,22 +23,25 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
architecture: x64
cache: maven

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
architecture: 'x64'
Expand Down
64 changes: 52 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
if: github.repository == 'apache/cloudstack'
Expand Down Expand Up @@ -59,7 +62,8 @@ jobs:
smoke/test_domain_network_offerings
smoke/test_domain_service_offerings
smoke/test_domain_vpc_offerings",
"smoke/test_dynamicroles
"smoke/test_cluster_drs
smoke/test_dynamicroles
smoke/test_enable_account_settings_for_domain
smoke/test_enable_role_based_users_in_projects
smoke/test_events_resource
Expand All @@ -80,14 +84,16 @@ jobs:
smoke/test_metrics_api
smoke/test_migration
smoke/test_multipleips_per_nic
smoke/test_nested_virtualization",
smoke/test_nested_virtualization
smoke/test_set_sourcenat",
"smoke/test_network
smoke/test_network_acl
smoke/test_network_ipv6
smoke/test_network_permissions
smoke/test_nic
smoke/test_nic_adapter_type
smoke/test_non_contigiousvlan
smoke/test_object_stores
smoke/test_outofbandmanagement
smoke/test_outofbandmanagement_nestedplugin
smoke/test_over_provisioning
Expand All @@ -106,7 +112,8 @@ jobs:
smoke/test_reset_configuration_settings
smoke/test_reset_vm_on_reboot
smoke/test_resource_accounting
smoke/test_resource_detail",
smoke/test_resource_detail
smoke/test_global_acls",
"smoke/test_router_dhcphosts
smoke/test_router_dns
smoke/test_router_dnsservice
Expand All @@ -124,6 +131,7 @@ jobs:
smoke/test_usage
smoke/test_usage_events
smoke/test_vm_deployment_planner
smoke/test_vm_schedule
smoke/test_vm_life_cycle
smoke/test_vm_lifecycle_unmanage_import
smoke/test_vm_snapshot_kvm
Expand Down Expand Up @@ -171,7 +179,8 @@ jobs:
"component/test_project_usage
component/test_protocol_number_security_group
component/test_public_ip
component/test_resource_limits",
component/test_resource_limits
component/test_resource_limit_tags",
"component/test_regions_accounts
component/test_routers
component/test_snapshots
Expand All @@ -186,22 +195,31 @@ jobs:
component/test_vpc_network
component/test_vpc_offerings
component/test_vpc_routers
component/test_vpn_users",
"component/test_vpc_network_lbrules" ]
component/test_vpn_users
component/test_vpc_network_lbrules",
"smoke/test_list_accounts
smoke/test_list_disk_offerings
smoke/test_list_domains
smoke/test_list_hosts
smoke/test_list_service_offerings
smoke/test_list_storage_pools
smoke/test_list_volumes"]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up JDK
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
architecture: x64
cache: maven

- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.8'
architecture: 'x64'
Expand All @@ -215,6 +233,11 @@ jobs:
run: |
python3 -m pip install --user --upgrade urllib3 lxml paramiko nose texttable ipmisim pyopenssl pycrypto mock flask netaddr pylint pycodestyle six astroid
- name: Install jacoco dependencies
run: |
wget https://github.com/jacoco/jacoco/releases/download/v0.8.10/jacoco-0.8.10.zip
unzip jacoco-0.8.10.zip -d jacoco
- name: Env details
run: |
uname -a
Expand Down Expand Up @@ -247,16 +270,23 @@ jobs:
mvn -q -Pdeveloper -pl developer -Ddeploydb
mvn -q -Pdeveloper -pl developer -Ddeploydb-simulator
- name: Generate jacoco-coverage.sh
run: |
echo "java -jar jacoco/lib/jacococli.jar report jacoco-it.exec \\" > jacoco-report.sh
find . | grep "target/classes" | sed 's/\/classes\//\/classes /g' | awk '{print "--classfiles", $1, "\\"}' | sort |uniq >> jacoco-report.sh
find . | grep "src/main/java" | sed 's/\/java\//\/java /g' | awk '{print "--sourcefiles", $1, "\\"}' | sort | uniq >> jacoco-report.sh
echo "--xml jacoco-coverage.xml" >> jacoco-report.sh
- name: Start CloudStack Management Server with Simulator
run: |
export MAVEN_OPTS="-Xmx4096m -XX:MaxPermSize=800m -Djava.security.egd=file:/dev/urandom"
export MAVEN_OPTS="-Xmx4096m -XX:MaxPermSize=800m -Djava.security.egd=file:/dev/urandom -javaagent:jacoco/lib/jacocoagent.jar=address=*,port=36320,output=tcpserver"
echo -e "\nStarting simulator"
set +e
mvn -Dsimulator -Dorg.eclipse.jetty.annotations.maxWait=120 -pl :cloud-client-ui jetty:run 2>&1 > /tmp/jetty-log || true &
while ! nc -vzw 5 localhost 8096 2>&1 > /dev/null; do grep Exception /tmp/jetty-log; sleep 10; done
set -e
echo -e "\nStarting Advanced Zone DataCenter deployment"
python3 tools/marvin/marvin/deployDataCenter.py -i setup/dev/advanced.cfg 2>&1 || true
python3 tools/marvin/marvin/deployDataCenter.py -i setup/dev/advdualzone.cfg 2>&1 || true
- name: Run Integration Tests with Simulator
run: |
Expand All @@ -269,14 +299,24 @@ jobs:
TESTS=($(echo $TESTS | tr -d '\n' | tr -s ' '))
for suite in "${TESTS[@]}" ; do
echo -e "Currently running test: $suite\n"
time nosetests-3.4 --with-xunit --xunit-file=integration-test-results/$suite.xml --with-marvin --marvin-config=setup/dev/advanced.cfg test/integration/$suite.py -s -a tags=advanced,required_hardware=false --zone=Sandbox-simulator --hypervisor=simulator || true ;
time nosetests-3.4 --with-xunit --xunit-file=integration-test-results/$suite.xml --with-marvin --marvin-config=setup/dev/advdualzone.cfg test/integration/$suite.py -s -a tags=advanced,required_hardware=false --zone=zim1 --hypervisor=simulator || true ;
done
echo -e "Stopping Simulator, integration tests run completed\n"
java -jar jacoco/lib/jacococli.jar dump --address localhost --port 36320 --destfile jacoco-it.exec
bash jacoco-report.sh
mvn -Dsimulator -pl client jetty:stop 2>&1
find /tmp//MarvinLogs -type f -exec echo -e "Printing marvin logs {} :\n" \; -exec cat {} \;
- name: Integration Tests Result
run: |
echo -e "Simulator CI Test Results: (only failures listed)\n"
python3 ./tools/marvin/xunit-reader.py integration-test-results/
- uses: codecov/codecov-action@v3
with:
files: jacoco-coverage.xml
fail_ci_if_error: true
flags: simulator-marvin-tests
verbose: true
name: codecov
7 changes: 5 additions & 2 deletions .github/workflows/codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,12 @@ jobs:
name: codecov
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up JDK11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
Expand All @@ -51,5 +53,6 @@ jobs:
with:
files: ./client/target/site/jacoco-aggregate/jacoco.xml
fail_ci_if_error: true
flags: unit-tests
verbose: true
name: codecov
2 changes: 1 addition & 1 deletion .github/workflows/docker-cloudstack-simulator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Set Docker repository name
run: echo "DOCKER_REPOSITORY=apache" >> $GITHUB_ENV

- uses: actions/checkout@v3
- 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
Expand Down
21 changes: 1 addition & 20 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,31 +27,12 @@ concurrency:
cancel-in-progress: true

jobs:
build:
permissions:
contents: read # for actions/checkout to fetch code
statuses: write # for github/super-linter to mark status of each linter run
name: Super-Linter Check
runs-on: ubuntu-22.04
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
- name: SuperLinter
uses: github/super-linter/[email protected]
env:
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VALIDATE_ALL_CODEBASE: false
VALIDATE_PYTHON_FLAKE8: true
pre-commit:
name: Run pre-commit
runs-on: ubuntu-22.04
steps:
- name: Check Out
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install
run: |
python -m pip install --upgrade pip
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/main-sonar-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,22 @@ on:
branches:
- main

permissions:
contents: read # to fetch code (actions/checkout)
pull-requests: write # for sonar to comment on pull-request

jobs:
build:
if: github.repository == 'apache/cloudstack'
name: Main Sonar JaCoCo Build
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Set up JDK11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
Expand Down
7 changes: 5 additions & 2 deletions .github/workflows/rat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,16 @@ concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Set up JDK 11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '11'
distribution: 'adopt'
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/sonar-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ name: Sonar Quality Check
on: [pull_request]

permissions:
contents: read
contents: read # to fetch code (actions/checkout)
pull-requests: write # for sonar to comment on pull-request

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand All @@ -32,13 +33,13 @@ jobs:
name: Sonar JaCoCo Coverage
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: "refs/pull/${{ github.event.number }}/merge"
fetch-depth: 0

- name: Set up JDK11
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '11'
Expand Down
Loading

0 comments on commit 7fce265

Please sign in to comment.