Compare commits

...

532 Commits

Author SHA1 Message Date
Fabricio Duarte 5893ba5a8c
server: Fix NPE when on findHostsForMigration when no suitable hosts are found (#13138) 2026-05-12 09:07:20 +02:00
Abhishek Kumar e1521f139b
systemvmtemplate-register: correctly update existing template name in config (#12703) 2026-05-11 13:22:54 +02:00
Suresh Kumar Anaparti a4a52c9665
Merge branch '4.22' 2026-05-08 20:57:36 +05:30
Suresh Kumar Anaparti 4359198904
KVM Host HA improvements - Fix to not cancel VM HA items when Host HA inspection in progress, and some code improvements (#13088)
* Host HA code improvements

* Fix to not cancel VM HA items when Host HA is enabled & inspection in progress, and some code improvements

- When Host HA inspection in progress, the investigor returns the Host Status as Up which cancels the VM HA items
- Don't cancel the VM HA items, instead reschedule them to try again later

* Changes to consider Recovered/Available Host HA state along with the agent connection status to determine the Host HA inspection in progress or not, and some code improvements
2026-05-08 19:50:50 +05:30
Suresh Kumar Anaparti ddcc0c889d
Don't delete volume on store if it is not created or doesn't exist on it (#13111) 2026-05-08 12:20:06 +05:30
Manoj Kumar 72b99a3f8c
Make resource deletion safer with name confirmation (#13104)
* enable double confirmation in delete flow for resource

* address copilot comments
2026-05-08 10:56:50 +05:30
Manoj Kumar 4425ee4234
Remove unnecessary if-else branch in template permission validation (#12683)
* consolidate if-else branch
2026-05-07 21:37:31 -03:00
dahn f6efda50d2
Update .asf.yaml: Add ingox as collaborator(#12058) 2026-05-07 17:11:54 +02:00
dependabot[bot] cbc1ae7388
Bump the github-actions-dependencies group across 1 directory with 9 updates (#13042)
Bumps the github-actions-dependencies group with 9 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [codecov/codecov-action](https://github.com/codecov/codecov-action) | `4` | `6` |
| [github/codeql-action](https://github.com/github/codeql-action) | `3` | `4` |
| [github/gh-aw](https://github.com/github/gh-aw) | `0.45.0` | `0.71.1` |
| [actions/github-script](https://github.com/actions/github-script) | `8.0.0` | `9.0.0` |
| [actions/upload-artifact](https://github.com/actions/upload-artifact) | `6.0.0` | `7.0.1` |
| [actions/download-artifact](https://github.com/actions/download-artifact) | `6.0.0` | `8.0.1` |
| [docker/login-action](https://github.com/docker/login-action) | `2` | `4` |
| [eps1lon/actions-label-merge-conflict](https://github.com/eps1lon/actions-label-merge-conflict) | `2.0.0` | `3.0.3` |
| [actions/setup-node](https://github.com/actions/setup-node) | `5` | `6` |



Updates `codecov/codecov-action` from 4 to 6
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v6)

Updates `github/codeql-action` from 3 to 4
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v3...v4)

Updates `github/gh-aw` from 0.45.0 to 0.71.1
- [Release notes](https://github.com/github/gh-aw/releases)
- [Changelog](https://github.com/github/gh-aw/blob/main/CHANGELOG.md)
- [Commits](58d1d157fb...f01a9d118a)

Updates `actions/github-script` from 8.0.0 to 9.0.0
- [Release notes](https://github.com/actions/github-script/releases)
- [Commits](ed597411d8...3a2844b7e9)

Updates `actions/upload-artifact` from 6.0.0 to 7.0.1
- [Release notes](https://github.com/actions/upload-artifact/releases)
- [Commits](b7c566a772...043fb46d1a)

Updates `actions/download-artifact` from 6.0.0 to 8.0.1
- [Release notes](https://github.com/actions/download-artifact/releases)
- [Commits](018cc2cf5b...3e5f45b2cf)

Updates `docker/login-action` from 2 to 4
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](https://github.com/docker/login-action/compare/v2...v4)

Updates `eps1lon/actions-label-merge-conflict` from 2.0.0 to 3.0.3
- [Release notes](https://github.com/eps1lon/actions-label-merge-conflict/releases)
- [Changelog](https://github.com/eps1lon/actions-label-merge-conflict/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eps1lon/actions-label-merge-conflict/compare/v2.0.0...v3.0.3)

Updates `actions/setup-node` from 5 to 6
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/v5...v6)

---
updated-dependencies:
- dependency-name: actions/download-artifact
  dependency-version: 8.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: actions/github-script
  dependency-version: 9.0.0
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: actions/setup-node
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: actions/upload-artifact
  dependency-version: 7.0.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: codecov/codecov-action
  dependency-version: '6'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: docker/login-action
  dependency-version: '4'
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: eps1lon/actions-label-merge-conflict
  dependency-version: 3.0.3
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: github/codeql-action
  dependency-version: 4.35.1
  dependency-type: direct:production
  update-type: version-update:semver-major
  dependency-group: github-actions-dependencies
- dependency-name: github/gh-aw
  dependency-version: 0.68.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-actions-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-05-07 10:06:32 -03:00
Bernardo De Marco Gonçalves 96ca1b2a7c
Add option to control MAC address reuse for VR public NICs (#13001) 2026-05-06 13:41:11 -03:00
Daan Hoogland 3e688b0197 Merge tag '4.22.0.1' into 4.22 2026-05-06 11:13:45 +02:00
Rene Peinthor 5b9a3d7d32
linstor: Fix a file handle resource leak opening template.properties (#13091) 2026-05-04 14:43:06 +05:30
Suresh Kumar Anaparti 519715e81a
Fix id in listguestosmapping search (#13082) 2026-05-04 14:41:35 +05:30
codingkiddo 1e512ab9c6
Skip QemuImgTest when libvirt native library cannot load (#13086)
Co-authored-by: Vinod Kumar <vinodkumar@192.168.1.3>
2026-05-03 18:45:54 +02:00
Abhishek Kumar a17bff9ba8
ui: fix webhook filters listing (#13068) 2026-05-03 18:39:41 +02:00
Suresh Kumar Anaparti 8906aa1d46
Merge branch '4.22' 2026-05-01 22:51:01 +05:30
Henrique Sato c07f1fd5d2
Number of running and stopped VMs as preset variables for `Network` type Quota tariffs (#11689)
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2026-05-01 11:54:40 +02:00
Fabricio Duarte 1f5dba9bd2
Release reserved storage resources on VM deployment failure (#13048) 2026-04-30 20:52:35 +05:30
Bryan Lima c45596cca3
Refactor of Allocator classes (#9074)
* Refactoring Allocator classes

* Break into smaller methods random and firfit allocators.

* Added unit tests for random and firstfit allocators

* Move random allocator from cloud-plugins to cloud-server

* Add BaseAllocator abstract class for duplicate code

* Add missing license

* Add missing license to unit test file

* Remove host allocator random dependency

* Change exception message on smoke tests

* Remove conditional as it was never actually reached in the original flow

* Fix tests

* Fix flipped parameters

* Fix NPE while listing hosts for migration when suitableHosts is null

* Remove unnecessary stubbings

* Fix checkstyle

* Remove unnecessary file

* Rename exception error messages

* Apply suggestions from code review

Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>

* Rename UserVmDetailVO references to VMInstanceDetailVO

* Remove unused imports

* Add new line at EOF

* Remove unnecessary random allocator pom

* Fix GPU allocation mistake

* Fix failing tests

---------

Co-authored-by: Fabricio Duarte <fabricio.duarte@scclouds.com.br>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2026-04-30 10:30:02 -03:00
Gean Jair Silva 92d82989e3
Correction of the user responsible for the event (#13066)
Co-authored-by: gean.silva <gean.silva@scclouds.com.br>
2026-04-30 14:16:26 +05:30
julien-vaz a73cc9a22c
Improve Quota Statement (#10506)
* Improve Quota Statement

* Removes unused import

* Fix QuotaUsageJoinDao, QuotaResponseBuilderImpl, QuotaServiceImpl e QuotaServiceImplTest

* Reorganize imports

* Updates QuotaStatementCmd responseBuilder scope to default

* Fix log4j syntax

* Address reviews + other improvements

* Add missing SQL scripts and injections

* Change accountid and domainid logic + add unit tests

* Rename QuotaUsageDetail to QuotaTariffUsage

* Fix out of bounds exception

---------

Co-authored-by: Julien Hervot de Mattos Vaz <julien.vaz@scclouds.com.br>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2026-04-29 21:09:13 -03:00
Sergiy Kukunin 089eb36e47
Linstor: fix create volume from snapshot on primary storage (#13043)
* Linstor: fix create volume from snapshot on primary storage

When creating a volume from a snapshot on Linstor primary storage
(with lin.backup.snapshots=false), the operation fails with:
"Only the following image types are currently supported: VHD, OVA,
QCOW2, RAW (for PowerFlex and FiberChannel)"

Root cause: the Linstor driver does not handle SNAPSHOT -> VOLUME in
its canCopy()/copyAsync() methods. This causes DataMotionServiceImpl
to fall through to StorageSystemDataMotionStrategy (selected because
Linstor advertises STORAGE_SYSTEM_SNAPSHOT=true). That strategy's
verifyFormatWithPoolType() rejects RAW format for Linstor pools,
since RAW is only allowed for PowerFlex and FiberChannel.

Additionally, VolumeOrchestrator.createVolumeFromSnapshot() attempts
to back up the snapshot to secondary storage when the storage plugin
does not advertise CAN_CREATE_TEMPLATE_FROM_SNAPSHOT. This backup
fails because the snapshot only exists on Linstor primary storage.

Fix:
- Add CAN_CREATE_TEMPLATE_FROM_SNAPSHOT capability so the
  orchestrator skips the backup-to-secondary path
- Add canCopySnapshotToVolumeCond() to match SNAPSHOT -> VOLUME
  when both are on the same Linstor primary store
- Wire it into canCopy() to intercept at DataMotionServiceImpl
  before strategy selection, bypassing StorageSystemDataMotionStrategy
- Implement copySnapshotToVolume() which delegates to the existing
  createResourceFromSnapshot() for native Linstor snapshot restore

This follows the same pattern used by the StorPool plugin, which
handles SNAPSHOT -> VOLUME directly in its driver rather than going
through StorageSystemDataMotionStrategy.

Tested on CloudStack 4.22 with Linstor LVM_THIN storage, creating
a volume from a 1TB CNPG Postgres database snapshot. Volume creates
successfully with correct path and deletes cleanly.

* Let CloudRuntimeException propagate from copySnapshotToVolume

Remove try/catch in copySnapshotToVolume so that CloudRuntimeException
from createResourceFromSnapshot propagates to the caller, ensuring
CloudStack properly notices and reports the failure.

* Fix CAN_CREATE_TEMPLATE_FROM_SNAPSHOT breaking template creation

Setting CAN_CREATE_TEMPLATE_FROM_SNAPSHOT unconditionally to true
caused createTemplate from snapshot to take the StorPool-specific
code path in TemplateManagerImpl, which sends a CopyCommand to a
system VM that Linstor cannot handle.

Fix: make CAN_CREATE_TEMPLATE_FROM_SNAPSHOT conditional on the same
flag as STORAGE_SYSTEM_SNAPSHOT (!BackupSnapshots). When snapshots
are backed up to secondary (the default), the old template creation
flow works. When snapshots stay on primary, the direct path is used.

Also fix checkstyle: remove unused DataObject import in test.

Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-29 11:23:08 +05:30
Erik Böck e2c13da419
Remove UUID parse from param processing workflow (#13065) 2026-04-28 09:13:05 +02:00
Henrique Sato 6f4445c5c1
Add offering preset variables for `Network` and `VPC` Quota tariffs (#11810)
* Add offering preset variable to Network and VPC tariffs

* Apply suggestions from code review

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>

* Add tests

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
2026-04-27 09:36:37 -03:00
Suresh Kumar Anaparti ffebe8eaa6
Fix bulk power state query missing VM lifecycle state field (#13027)
* Fix bulk power state query missing VM lifecycle state field

The IdsPowerStateSelectSearch partial select did not include the VM
lifecycle state, causing isPowerStateInSyncWithInstanceState to always
return true when state was null. This prevented retry of failed
StopCommands on subsequent ping cycles.

* Add defensive check for instance host ID to prevent NPE

Co-authored-by: Sachin R Doddaguni <s_rudrappadoddagu@apple.com>
Co-authored-by: nvazquez <nicovazquez90@gmail.com>
2026-04-27 15:38:52 +05:30
dahn 0b169920f3
make dh group 31 default, support 22-24+31 (#12764) 2026-04-27 13:43:58 +05:30
Suresh Kumar Anaparti 856d83a15e
Merge branch '4.22' 2026-04-23 23:53:24 +05:30
dahn 64ac0822b4
merge conflict fixes (#13046)
* merge conflict fixes

* fix pre-commit issue

Co-authored-by: Daan Hoogland <dahn@apache.org>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2026-04-23 23:46:54 +05:30
Nicolas Vazquez be89e6f7c3
[KVM] Reorder migration logs to prevent populating agent logs on migrations (#12883)
* Move logs for values of the migration settings out of the loop

* Apply suggestions from code review

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

---------

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2026-04-17 23:39:19 -03:00
Henrique Sato 3166e64891
Add support for new variables to the GUI whitelabel runtime system (#12760)
* Add support for new variables to the GUI whitelabel runtime system

* Address review
2026-04-17 10:59:50 -03:00
Wei Zhou f820d0125d
fix end of files and codespell errors 2026-04-17 13:58:21 +02:00
Wei Zhou 6c1437b7dd
fix end of file schema-42200to42210.sql 2026-04-17 13:56:17 +02:00
Daniil Zhyliaiev 4df32ae79f
fix: NsxResource.executeRequest DeleteNsxNatRuleCommand comparison bug (#12833)
Fixes an issue in NsxResource.executeRequest where Network.Service
comparison failed when DeleteNsxNatRuleCommand was executed in a
different process. Due to serialization/deserialization, the
deserialized Network.Service instance was not equal to the static
instances Network.Service.StaticNat and Network.Service.PortForwarding,
causing the comparison to always return false.

Co-authored-by: Andrey Volchkov <avolchkov@playtika.com>
(cherry picked from commit 30dd234b00)
2026-04-17 04:53:36 +05:30
Suresh Kumar Anaparti 2d6280b9da
Merge branch '4.22' 2026-04-17 04:35:25 +05:30
Suresh Kumar Anaparti 13a2c7793c
Merge branch '4.20' into 4.22 2026-04-17 03:12:33 +05:30
Brad House - Nexthop 83f705ddc5
Static Routes with nexthop non-functional for private gateways (#12859)
* Fix static routes to be added to PBR tables in VPC routers

Static routes were only being added to the main routing table, but
policy-based routing (PBR) is active on VPC routers. This caused
traffic coming in from specific interfaces to not find the static
routes, as they use interface-specific routing tables (Table_ethX).

This fix:
- Adds a helper method to find which interface a gateway belongs to
  by matching the gateway IP against configured interface subnets
- Modifies route add/delete operations to update both the main table
  and the appropriate interface-specific PBR table
- Uses existing CsAddress databag metadata to avoid OS queries
- Handles both add and revoke operations for proper cleanup
- Adds comprehensive logging for troubleshooting

Fixes #12857

* Add iptables FORWARD rules for nexthop-based static routes

When static routes use nexthop (gateway) instead of referencing a
private gateway's public IP, the iptables FORWARD rules were not
being generated. This caused traffic to be dropped by ACLs.

This fix:
- Adds a shared helper CsHelper.find_device_for_gateway() to determine
  which interface a gateway belongs to by checking subnet membership
- Updates CsStaticRoutes to use the shared helper instead of duplicating
  the device-finding logic
- Modifies CsAddress firewall rule generation to handle both old-style
  (ip_address-based) and new-style (nexthop-based) static routes
- Generates the required FORWARD and PREROUTING rules for nexthop routes:
  * -A PREROUTING -s <network> ! -d <interface_ip>/32 -i <dev> -j ACL_OUTBOUND_<dev>
  * -A FORWARD -d <network> -o <dev> -j ACL_INBOUND_<dev>
  * -A FORWARD -d <network> -o <dev> -m state --state RELATED,ESTABLISHED -j ACCEPT

Fixes the second part of #12857

* network matching grep fix, don't let 1.2.3.4/32 match 11.2.3.4/32
2026-04-16 16:15:43 +05:30
Brad House 6e810989b6
HAProxy Configuration: network.loadbalancer.haproxy.idle.timeout (#12586)
* initial attempt at network.loadbalancer.haproxy.idle.timeout implementation

* implement test cases

* move idleTimeout configuration test to its own test case
2026-04-16 14:49:54 +05:30
Daniil Zhyliaiev e0fe953791
fix: NSX SDK list operations are pageable: the API returns a non-null and non-empty (#12834)
`cursor` field when more pages are available. The previous implementation only
fetched the first page and ignored pagination.

This change updates the list retrieval flow to:
- follow the `cursor` chain until no further pages exist
- accumulate items from all pages
- return a single merged result to the caller

This ensures that list operations return the complete dataset rather than just
the first page.

Co-authored-by: Andrey Volchkov <avolchkov@playtika.com>
2026-04-16 14:15:30 +05:30
Daniil Zhyliaiev 05c59630e0
fix: LB Creation avoid 404 API errors due to non-needed patches (#12835) 2026-04-16 13:58:20 +05:30
Wei Zhou 1fc4cb90bf
Routed VR: accept packets from related and established connections (#12986) 2026-04-15 15:36:26 +05:30
Abhishek Kumar c6936889f5
server: prevent adding vm compute details when not applicable (#12637) 2026-04-15 10:41:20 +02:00
Daan Hoogland f5e75771bc merge forwards fix 2026-04-15 09:58:27 +02:00
Daan Hoogland c298f8f360 Merge release branch 4.22.0.1 to 4.22
* tag '4.22.0.1':
  Implement limit validations on updateBucket
  Address reviews
2026-04-15 08:58:24 +02:00
Nicolas Vazquez 160876c6d7
Fix: API Thread held forever during force deleting across MS (#12968) 2026-04-15 08:41:26 +02:00
Erik Böck 5013cf2af6
Fix user password reset mail template value (#12882)
* Fix default user password reset email template

* improve readabilty

* change update query

* Specify database for update

* Fix SQL statement

* Use CONCAT_WS sql method to create multiline string

---------

Co-authored-by: GaOrtiga <49285692+GaOrtiga@users.noreply.github.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2026-04-15 10:06:39 +05:30
Harikrishna 0c86899cc1
Added VDDK support in VMware to KVM migrations (#12970) 2026-04-14 22:33:01 +05:30
Daan Hoogland 82bfa9fb3f Merge branch '4.22' 2026-04-14 14:50:44 +02:00
Daan Hoogland 23f633ae83 Merge tag '4.22.0.1' into 4.22 2026-04-14 13:15:14 +02:00
Daan Hoogland 1085da4ef8 Merge commit '19b4ef106931aa1d6a8fed06984009d86760e4de' into 4.22 2026-04-14 13:15:05 +02:00
Suresh Kumar Anaparti d75acb6efc
Fix rollback disk snapshots on instance snapshot failure (#12949) 2026-04-14 15:21:05 +05:30
Suresh Kumar Anaparti 38abe2df0b
Allow list async jobs by resource type alone (#13011) 2026-04-14 15:20:13 +05:30
Suresh Kumar Anaparti feb6076930
Remove unused config consoleproxy.cmd.port (#12807)
* Remove unused config 'consoleproxy.cmd.port'

* Remove the config key

---------

Co-authored-by: dahn <daan@onecht.net>
2026-04-14 13:40:00 +05:30
julien-vaz 161b4177c2
Add logs for storage pools reordering (#10419)
Co-authored-by: Julien Hervot de Mattos Vaz <julien.vaz@scclouds.com.br>
2026-04-14 09:51:05 +02:00
Henrique Sato ed575cc0a1
New config.json variable to set the ACS default language (#12863)
* New config.json variable to set the ACS default language

* Address review
2026-04-13 14:37:45 -03:00
Jtolelo ae455ee193 VPC restart cleanup for Public networks with multi-CIDR data (#12622)
* Fix VPC restart with multi-CIDR networks: handle comma-separated CIDR in NetworkVO.equals()

When a network has multiple CIDRs (e.g. '192.168.2.0/24,160.0.0.0/24'),
NetworkVO.equals() passes the raw comma-separated string to
NetUtils.isNetworkAWithinNetworkB() which expects a single CIDR,
causing 'cidr is not formatted correctly' error during VPC restart
with cleanup=true.

Extract only the first CIDR value before passing to NetUtils.

* Fix root cause: skip CIDR/gateway updates for Public traffic type networks

addCidrAndGatewayForIpv4/Ipv6 (introduced by PR #11249) was called for all
network types without checking if the network is Public. This caused
comma-separated CIDRs to be stored on Public networks, which then triggered
'cidr is not formatted correctly' errors during VPC restart.

Add TrafficType.Public guard in both the VLAN creation (addCidr) and
VLAN deletion (removeCidr) paths in ConfigurationManagerImpl.

* Sanitize legacy network-level addressing fields for Public networks

---------

Co-authored-by: dahn <daan@onecht.net>
2026-04-13 15:40:26 +02:00
Suresh Kumar Anaparti 47c5bb8ee7 Support list/query async jobs by resource (#12983)
* Add resource filtering to async job query commands

* Fix logical condition in AsyncJobDaoImpl and ResourceIdSupport

* resource type case-insensitive validation

* fix resource type and id search

---------

Co-authored-by: mprokopchuk <mprokopchuk@gmail.com>
Co-authored-by: mprokopchuk <mprokopchuk@apple.com>
2026-04-13 15:39:49 +02:00
sandeeplocharla 5b696c0ec7
Create, Delete, Enable, Disable, Enter, Cancel maintenance of Primary StoragePool with ONTAP storage (#12563)
* Create & Delete, Enable & Disable, Enter & Cancel maintenance of Primary StoragePool with ONTAP storage
Co-authored-by: Rajiv Jain <Rajiv.Jain@netapp.com>

Create & Delete, Enable & Disable, Enter & Cancel maintenance of Primary StoragePool with ONTAP storage
Co-authored-by: Rajiv Jain<rajiv1@netapp.com>

Edited readme file

Fixed license check issue

Removed dependency that's not conforming with ACF guidelines

* Fixed the initial review comments

* Fixed some rebase issues

---------

Co-authored-by: Locharla, Sandeep <Sandeep.Locharla@netapp.com>
2026-04-13 08:38:15 -03:00
Abhisar Sinha 8eb162cb99 Updating pom.xml version numbers for release 4.20.4.0-SNAPSHOT 2026-04-13 15:48:18 +05:30
Fabricio Duarte 9f57a4dd19
Unhide setting `js.interpretation.enabled` (#12605)
* Unhide setting 'js.interpretation.enabled'

* Fix grammar mistake
2026-04-10 23:45:07 -03:00
João Jandre 7c7b2ae75d
Fix KVM incremental volume snapshot creation (#12666) 2026-04-11 00:12:44 +05:30
Manoj Kumar b196e97cc3
Prevent deletion of account and domain if either of them has deleted protected instance (#12901) 2026-04-10 15:51:22 +02:00
Abhisar Sinha df7ff97271
Create volume on a specified storage pool (#12966) 2026-04-10 14:27:39 +02:00
Wei Zhou 273699cf56
kvm: fix wrong CheckVirtualMachineAnswer when vm does not exist (#12928)
* kvm: fix wrong CheckVirtualMachineAnswer when vm does not exist

* kvm: add LibvirtCheckVirtualMachineCommandWrapperTest

Co-authored-by: dahn <daan.hoogland@gmail.com>
2026-04-10 16:01:29 +05:30
poddm 8f3c6fad7a
set snapcpg config on copy (#12955) 2026-04-10 15:18:45 +05:30
Bernardo De Marco Gonçalves 27e4d979f1
Clean up backup references to their schedules when the schedules are deleted (#12401)
* clean up backup schedule references after their deletion

* drop unused column

* address reviews
2026-04-10 14:51:52 +05:30
Vishesh 80ee7f183f
Fix six package incompatiblity with EL10 (#12799) 2026-04-10 14:47:49 +05:30
Wei Zhou e297644ce1
KVM: Enable HA heartbeat on ShareMountPoint (#12773) 2026-04-10 14:12:40 +05:30
Suresh Kumar Anaparti 11538df710
Merge branch '4.22' 2026-04-10 12:02:40 +05:30
João Jandre 2a60305792
Fix snapshot chaining on Xen (#12597) 2026-04-10 11:05:26 +05:30
Suresh Kumar Anaparti 7b467496cb
Do not include snapshots with Group type in snapshots resource count (#12945) 2026-04-10 10:50:35 +05:30
Abhisar Sinha 68bd056306
Support timeout configuration for Create and Restore NAS backup (#12964)
* Introduce configurable timeout to Create NAS backup

* use timeout set via "commands.timeout"
2026-04-10 10:11:54 +05:30
Abhisar Sinha 4ba4bd33c3
replace GROUP_CONCAT with JSON_ARRAYAGG to avoid errors like Row 19 was cut by GROUP_CONCAT (#12777) 2026-04-10 09:39:03 +05:30
Vishesh 416679fae1
Fix domain parsing for GPU & add Display controller in the supported PCI class (#12981)
* Fix domain parsing for GPU

* Add Display controller to GPU class check
this adds support for the amd instinct mi2xx accelorator crards in the discovery script.

Co-authored-by: Piet Braat <piet@phiea.nl>
2026-04-10 09:23:07 +05:30
prashanthr2 b1bc5380a2
fix: support SharedMountPoint for KVM volume import and unmanage (#12956) 2026-04-09 15:09:08 +02:00
prashanthr2 b0b3dc91f5
fix: support SharedMountPoint volume checks for importVm (#12946) 2026-04-09 13:34:35 +02:00
Nicolas Vazquez b5858029bb
Fix listing service offerings with different host tags (#12919) 2026-04-09 10:55:47 +02:00
Manoj Kumar 1ff9eec997
Load arch data for backup from template during create instance from backup (#12801) 2026-04-09 09:49:49 +02:00
Daman Arora 7ba5240b31
Block backup deletion while create-VM-from-backup or restore jobs are in progress (#12792)
* Block backup deletion while create-VM-from-backup or restore jobs are in progress

* Add tests

* Fix exception message

* Update test

Co-authored-by: Abhisar Sinha <63767682+abh1sar@users.noreply.github.com>
2026-04-09 11:09:01 +05:30
Suresh Kumar Anaparti c3614098da
Merge branch '4.22' 2026-04-08 18:09:43 +05:30
Abhisar Sinha 03de62bf38
Support Linstor Primary Storage for NAS BnR (#12796) 2026-04-08 15:14:20 +05:30
Suresh Kumar Anaparti abdf926219
Revert "Use lateral join (introduced in MySQL 8.0.14) with subquery on user_statistics table in account_view for netstats (#12631)" (#12965)
This reverts commit 58916eb608.
2026-04-08 09:43:44 +05:30
Daniil Zhyliaiev 30dd234b00
fix: NsxResource.executeRequest DeleteNsxNatRuleCommand comparison bug (#12833)
Fixes an issue in NsxResource.executeRequest where Network.Service
comparison failed when DeleteNsxNatRuleCommand was executed in a
different process. Due to serialization/deserialization, the
deserialized Network.Service instance was not equal to the static
instances Network.Service.StaticNat and Network.Service.PortForwarding,
causing the comparison to always return false.

Co-authored-by: Andrey Volchkov <avolchkov@playtika.com>
2026-04-06 15:50:17 -03:00
Abhisar Sinha c8599040b4 Updating pom.xml version numbers for release 4.20.3.0
Signed-off-by: Abhisar Sinha <abhisar.sinha@gmail.com>
2026-04-06 17:22:19 +05:30
Wei Zhou 6f1aa96b4c
engine/schema: fix new systemvm template is not registered during upgrade if hypervisor is not KVM (#12952)
* engine/schema: fix new systemvm template is not registered during upgrade if hypervisor is not KVM
2026-04-06 17:19:04 +05:30
Suresh Kumar Anaparti e2d18c0748
Merge branch '4.22' 2026-04-02 10:30:18 +05:30
Wei Zhou 470812100e
server: set template type to ROUTING or USER if template type is not specified when upload a template (#12768) 2026-04-02 09:34:28 +05:30
Suresh Kumar Anaparti e10c066cc1
Fix NPE during VM setup for pvlan (#12781)
* Fix NPE during VM setup for pvlan

* review comments
2026-04-01 16:29:44 +02:00
Pearl Dsilva b805766f4b
Fix Host setup when persistent networks exist (#12751) 2026-04-01 07:25:19 -04:00
Abhishek Kumar e2497cfc4d
backport: default system vm template update implementation (#12935)
Fixes #12934

Backported from 889fc62

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-04-01 15:34:04 +05:30
julien-vaz 4f93ba888c
Refactor Quota Summary API (#10505)
* Refactor Quota Summary API

* Fixes imports

* Fix QuotaServiceImplTest

* Update plugins/database/quota/src/main/java/org/apache/cloudstack/api/command/QuotaSummaryCmd.java

Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>

* Fix QuotaSummaryCmd

* Remove unnecessary imports

* Remove unused createQuotaSummaryResponse declarations

* Remove unnecessary imports

* Update plugins/database/quota/src/main/java/org/apache/cloudstack/api/command/QuotaSummaryCmd.java

Co-authored-by: dahn <daan.hoogland@gmail.com>

* Fix QuotaSummaryCmd

* Fix QuotaResponseBuilderImplTest

* Refactor test

* Fix QuotaSummaryCmd

* Fix projectid behavior

* Simplify QuotaSummary and deprecate listall

* Fix createQuotaSummaryResponse

* Remove unused import

* Apply suggestions + some adjustments

* Remove duplicated check

* Fix checkstyle

* Adjust entity owner

* Remove unused method + fix tests

* Add missing @ACL to some parameters

* Adjust how the parameters behave

* Allow domain admins and users to use keyword

* Address reviews

---------

Co-authored-by: Julien Hervot de Mattos Vaz <julien.vaz@scclouds.com.br>
Co-authored-by: Fabricio Duarte <fabricio.duarte.jr@gmail.com>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2026-03-31 20:29:30 -03:00
John Bampton 5d61ba3538
[CI] Create `.codespellrc`; upgrade codespell hook; fix typos (#12824) 2026-03-31 15:04:05 +02:00
John Bampton 5d95bdd0eb
pre-commit trailing whitespace auto clean up (#12841) 2026-03-31 15:02:39 +02:00
Henrique Sato 7eea9ed448
Add API to enable/disable NICs for KVM (#12819) 2026-03-31 10:14:20 +02:00
Pearl Dsilva 18075ae4a9
Add support for Headlamp dashboard for kubernetes; deprecate legacy kubernetes dashboard (#12776) 2026-03-30 16:04:45 +02:00
John Bampton cf9bda2050
[CI] Add github-actions ecosystem to Dependabot (#12823) 2026-03-30 15:49:22 +02:00
John Bampton 6bcbb008b4
Bump `actions/checkout` to `v6` (#12164) 2026-03-30 15:48:47 +02:00
Suresh Kumar Anaparti 59b6c32b60
[UI] Fix create backup notification (#12903) 2026-03-30 12:19:35 +02:00
Manoj Kumar 4ebe3349b7
add user-agent header to template downloader request (#12791) 2026-03-30 12:02:12 +02:00
Suresh Kumar Anaparti 71bd26ff7c
PowerFlex/ScaleIO storage - the MDMs validation improvements (#12893) 2026-03-27 15:37:30 -03:00
Suresh Kumar Anaparti 68030df10b
VM start error handling improvements and config to expose error to users (#12894)
* VM start error handling improvements, and config to expose error to user

* refactor
2026-03-27 15:35:08 -03:00
James Peru Mmbono 6ca6aa1c3f
Fix NPE in NASBackupProvider when no running KVM host is available (#12805)
* Fix NPE in NASBackupProvider when no running KVM host is available

ResourceManager.findOneRandomRunningHostByHypervisor() can return null
when no KVM host in the zone has status=Up (e.g. during management
server startup, brief agent disconnections, or host state transitions).

NASBackupProvider.syncBackupStorageStats() and deleteBackup() call
host.getId() without a null check, causing a NullPointerException that
crashes the entire BackupSyncTask background job every sync interval.

This adds null checks in both methods:
- syncBackupStorageStats: log a warning and return early
- deleteBackup: throw CloudRuntimeException with a descriptive message
2026-03-27 21:32:13 +05:30
owsferraro 131ea9f7ac
Fix PowerFlex 4.x issues with take & revert instance snapshots (#12880)
* fixed database update on snapshot with multiple volumes and an api change

* changed overwritevolumecontent based on powerflex version and removed unnecessary comments

* Update plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/client/ScaleIOGatewayClientImpl.java

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* Update plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/client/ScaleIOGatewayClientImpl.java

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

* Update plugins/storage/volume/scaleio/src/main/java/org/apache/cloudstack/storage/datastore/client/ScaleIOGatewayClientImpl.java

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

---------

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2026-03-27 07:22:08 -03:00
Vishesh d38c1f8d12
Fix error message while creating local storage pool (#12767)
* Fix error message while creating local storage pool
2026-03-27 10:29:13 +05:30
Fabricio Duarte 2416db2a44
Fix NPE on external/unmanaged instance import using custom offerings (#12884)
* Fix NPE on external/unmanaged instance import using custom offerings
2026-03-27 10:25:16 +05:30
Abhisar Sinha b22dbbe2d7
Fix Revert Instance to Snapshot with custom service offering (#12885)
* Fix revertVM with custom svc offering
2026-03-27 10:19:52 +05:30
Suresh Kumar Anaparti 1bff543e58
Merge branch '4.22' 2026-03-27 01:25:42 +05:30
Nicolas Vazquez c1af36f8fc
[4.22] Prevent unmanaging or reinstalling a VM if it is part of a CKS cluster (#12800) 2026-03-26 18:17:49 +05:30
Suresh Kumar Anaparti 84676afd5c
Check for null host before proceeding with VM volume operations in managed storage while restoring VM (#12879) 2026-03-26 07:58:52 -03:00
Wei Zhou 4b7370a601
upgrade: skip the upgrade paths which are not needed (#12881)
* upgrade: skip the upgrade paths which are not needed
2026-03-26 13:08:12 +05:30
Suresh Kumar Anaparti d6c39772b2
Set management server id from cookies after saml login (#12858) 2026-03-25 20:52:44 +05:30
Suresh Kumar Anaparti 7c3637a2f5
Fix duplicate dummy templates, and update guest os for dummy template (#12780)
* Fix duplicate dummy template 'kvm-default-vm-import-dummy-template' entries

* Update guest os id of dummy template to 99 (Other Linux (64-bit)) from existing id: 1 (CentOS 4.5 (32-bit))

* update migration path to remove duplicate dummy templates
2026-03-24 18:01:26 +05:30
Nicolas Vazquez 7107d28db8
[VMware to KVM] Add guest OS for importing VM based on the source VM OS (#12802) 2026-03-24 15:06:38 +05:30
Suresh Kumar Anaparti bce55945ec
Mark VMs in error state when expunge fails during destroy operation (#12749)
* Mark VMs in error state when expunge fails during destroy operation

* fetch volume by external id (used by external plugins)

* review comments

* Update reorder hosts log to DEBUG, log line is too verbose to have on as INFO
2026-03-24 00:29:14 -03:00
Abhisar Sinha c19630f0a4 Fix snapshot copy resource limit concurrency 2026-03-19 14:42:49 +05:30
Pearl Dsilva b497f58022
Fix K8s scaling and deletion issue if firewall rule is for ALL ports (#12806) 2026-03-19 13:47:22 +05:30
Vishesh 7cdcf571fa
Fix xcpng test failures (#12812) 2026-03-19 13:46:01 +05:30
Manoj Kumar e93ae1a4f4
New config key "allow.import.volume.with.backing.file" to skip volume backing (#12809)
* Added support for skipping volume backing when importing unmanaged volumes and VMs. This allows users to import volumes and VMs without creating a backing volume, which can be useful in certain scenarios where the backing volume is not needed or desired.

* cleanup conflicting key

* move configkey into VolumeImportUnmanageService

---------

Co-authored-by: rajujith <rajujith@gmail.com>
2026-03-17 11:34:34 -03:00
dahn b744824f65
Add code owners for nsx network elements plugin (#12838) 2026-03-17 21:51:49 +10:00
Pearl Dsilva 3bd5410f9a
Add support to clone existing offerings and update them (#12357)
* Add support to clone existing offerings and update them

* add support for vpc & backup offerings to be cloned

* fix capability list and mapping of params

* Add support to clone network and vpc offering with the right parameters

* make fields non mandatory for clone offerings APIs

* Add UI support for cloning Compute and System Service offerings

* remove unnecessary changes

* fix license and pre-ccommit issues

* Add UI support to clone disk and network offering

* vpc & backup offering clone api

* add unit tests

* fix pre-commit checks

* increase test coverage

* combine add/clone disk/compute offering forms

* update license

* fix unit tests

* fix test failures

* fix test failure - unnecessary stubbings

* pre-commit check failure

* add recently added domain id for bkp offering to be inherited in clone operation

* extract common code wrt service capability in network & vpc offering in add/clone operations

* add some checks to prevent networkmode change when provider is nsx/netris from the source networkmode

* address copilot comments

* address comments

* combine check

* use appropriate zoneId during clone bkp offering

* add check

* fix issue with test

* remove unused imports

* prevent creating a bkp offering of a bkp repo that already exists

* extend clone disk and service offerings to domain admins
2026-03-17 12:01:43 +05:30
Abhisar Sinha 61afb4cb78 fix identation 2026-03-16 17:40:24 +01:00
Abhisar Sinha 23b19a9776 review comments 2026-03-16 17:40:24 +01:00
Fabricio Duarte dc7068a135 Address public IP limit validations 2026-03-16 11:47:32 +01:00
Fabricio Duarte e8f8aca694 Fix failing tests 2026-03-16 11:47:32 +01:00
Fabricio Duarte 497266270b Cleanup imported VM from disk on failure due to volume allocation + prevent duplicate volume and primary storage increment on import 2026-03-16 11:47:32 +01:00
Fabricio Duarte 0a4b4c6af0 [20.3] Address limit checks for VM, CPU, memory, volume, and primary storage 2026-03-16 11:47:32 +01:00
Fabricio Duarte 360b64ce1e Consider infinite resources when calculating secondary storage limit for upload operations 2026-03-16 11:47:32 +01:00
Abhisar Sinha 81a8ac8e1f secondary storage resource limit for upload 2026-03-16 11:47:32 +01:00
Abhisar Sinha d0f6730157 volume download fix 2026-03-16 11:47:32 +01:00
abh1sar 03dfe4d1f3 secondary storage resource limit for download 2026-03-16 11:47:32 +01:00
Abhisar Sinha 4bcd509193 Fix resource limit reservation and check during StartVirtualMachine 2026-03-16 11:47:32 +01:00
Daniel Augusto Veronezi Salvador 06ee2fea76 Implement/fix limit validation for secondary storage 2026-03-16 11:47:32 +01:00
dahn e0ef3a6947 Check resource reservation on volume snapshot creation 2026-03-16 11:47:32 +01:00
dahn 3b987f21af [20.3] handle user's canned policy when a bucket is deleted 2026-03-16 11:47:32 +01:00
dahn 0edd577f4b Fix: KVM Direct Download URL injection 2026-03-16 11:47:32 +01:00
dahn b025e85fc5 Check resource reservation on volume creation 2026-03-16 11:47:32 +01:00
dahn 7faa1b650b [20.3] resource allocation vpc 2026-03-16 11:47:32 +01:00
dahn 1593944553 [20.3] Implement/fix limit validation for projects 2026-03-16 11:47:32 +01:00
dahn 4dd91feb27 [20.3] resource instance limits 2026-03-16 11:47:31 +01:00
dahn 89df318164 [20.3] resource allocation 2026-03-16 11:47:31 +01:00
Nicolas Vazquez 93239e09f1
Add conserve mode for VPC offerings (#12487) 2026-03-16 09:39:42 +01:00
Nicolas Vazquez 09ee0927e9
[4.22] Prevent Load Balancer rule creation when adding a VM from a different network (#12785) 2026-03-16 09:36:52 +01:00
Nicolas Vazquez 7048944883
[Fix] VMware to KVM migration instances listing failure (#12766) 2026-03-13 11:12:38 -03:00
Daman Arora 8c579538f9
CKS: Allow affinity group selection during cluster creation (#12386)
Co-authored-by: Daman Arora <daman.arora@shapeblue.com>
2026-03-13 10:58:55 +01:00
Vishesh 3b42fbf3b2
Fixing CI failures (#12789)
* Fixing CI failures

* fixup: test_secondary_storage
2026-03-13 13:33:59 +05:30
Pearl Dsilva 27bce46a8e
Clear System VM IP from NICs for PublicNetworkGuru (#11992) 2026-03-12 13:18:03 +01:00
Wei Zhou 2359061f66
api: remove required flag of gatewayid in CreateStaticRouteCmd (#12786) 2026-03-12 13:42:09 +05:30
Abhishek Kumar 7f7d0b02e1
Remove unnecessary stubbings in ManagementServerMaintenanceManagerImplTest (#11914) (#12623) 2026-03-12 12:29:31 +05:30
Daman Arora 71daf84c9e
Show security group selection in Basic zone VM deployment and fix SG listing for cross-domain deployments (#12775) 2026-03-12 12:06:20 +05:30
Davi Torres faaf7669c5
Update isolation methods description for physical network (#12759) 2026-03-10 14:45:42 +01:00
dahn d8f748ad0e
Update .asf.yaml 2026-03-10 10:14:33 +01:00
Dheeraj Bansal 7aa0558c5b
ui: avoid 404 after deleting template zones (#12681) 2026-03-09 14:29:12 +01:00
Abhishek Kumar db83622956
ui: fix create network from global create menu (#12677)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-03-09 14:26:19 +01:00
Klaus de Freitas Dornsbach 74af9b9875
API key pair restructure (#9504)
Co-authored-by: Bernardo De Marco Gonçalves <bernardomg2004@gmail.com>
2026-03-09 14:20:17 +01:00
dahn 9bbd32a8ef
Add DaanHoogland to the list of contributors 2026-03-09 14:14:12 +01:00
Abhishek Kumar c3d6a8cff7
server: fix templatetype during iso upload (#12151) 2026-03-09 14:20:28 +05:30
Suresh Kumar Anaparti 58916eb608
Use lateral join (introduced in MySQL 8.0.14) with subquery on user_statistics table in account_view for netstats (#12631) 2026-03-05 20:18:58 +01:00
dahn 120a43648b
set width of dropdown select items for Network Offering during add tier dialog (#11899) 2026-03-05 19:52:28 +01:00
GaOrtiga 7ad68aafa5
Enable defining a network as redundant during restart through the UI (#7405)
Co-authored-by: Gabriel <gabriel.fernandes@scclouds.com.br>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2026-03-04 17:00:54 +01:00
Suresh Kumar Anaparti 75620309c2
Merge branch '4.22' 2026-03-04 21:13:01 +05:30
Suresh Kumar Anaparti 65e54091ff
Merge branch '4.20' into 4.22 2026-03-04 21:12:15 +05:30
Andrei Mizurou 9cc6c09b9e
Remove broken ViserJS attribution link from UI README (#12724) 2026-03-03 16:15:09 +01:00
dahn 608345d165
Update collaborators list in .asf.yaml
Removed several collaborators from the .asf.yaml file.
2026-03-02 09:26:41 +01:00
Vishesh 6516f7f1aa
Fix query execution in countVgpuVMs (#12713) 2026-02-27 18:23:25 +05:30
Suresh Kumar Anaparti 56dc11980f
test_accounts.py failure fix - keep the camelCase parameter "domainId" (#12689) 2026-02-27 11:36:18 +01:00
Suresh Kumar Anaparti 9e386a3128
PowerFlex/ScaleIO client initialization, authentication and command execution improvements (#12391)
* PowerFlex/ScaleIO client initialization, authentication and command execution improvements

* Migrate VM with volume not supported yet for PowerFlex/ScaleIO

* review changes
2026-02-26 09:23:41 -03:00
Nicolas Vazquez 6419e1c825
[VMware to KVM Migration] Fix unused convert env vars (#11947)
* Fix unused convert env vars

* Address review comments

* Small fix to invoke internal method
2026-02-26 06:21:43 -03:00
Suresh Kumar Anaparti da85858e93
unit test fix (after merge) 2026-02-26 12:01:15 +05:30
Suresh Kumar Anaparti a8bd02f8ba
Merge branch '4.22' 2026-02-26 11:12:20 +05:30
Suresh Kumar Anaparti b74f21b967
Merge branch '4.20' into 4.22 2026-02-26 11:11:41 +05:30
Suresh Kumar Anaparti 17ec4fc31c
UI: Fix duplicate quickview (for provider column) in backup repository (#11849)
* UI: Fix quickview (for provider column) in backup repository

* Consolidated quickview checks with first column, column key

* quickViewEnabled condition update
2026-02-26 10:33:35 +05:30
Abhisar Sinha 744c8afcf1
fix primary storage maintenance on xcpng (#12694) 2026-02-25 11:38:45 +01:00
Erik Böck c748b69e70
Fix NPE during public IP listing when a removed network or VPC ID is informed for associatenetworkid parameter (#12372) 2026-02-23 13:03:36 +01:00
Suresh Kumar Anaparti cf71938473
[UI] Allow change password for native users only. (#12584) 2026-02-23 12:39:55 +01:00
Erik Böck d0543449a6
Changes to the error message displayed during the removal of public templates that are used (#12373) 2026-02-23 11:21:04 +01:00
dahn da7ac80dc4
prevent user.uuid from being regenerated on each operation by reading it from the DB (#12632) 2026-02-23 11:12:13 +01:00
Pearl Dsilva 87c8e74642
Fix github action workflow (#12675) 2026-02-23 08:59:31 +01:00
Suresh Kumar Anaparti 30e6c224bd
Merge branch '4.22' 2026-02-19 13:20:04 +05:30
Suresh Kumar Anaparti 5caf6cd043
Merge branch '4.20' into 4.22 2026-02-19 13:19:14 +05:30
Suresh Kumar Anaparti 32c0cdbed9
Add volumes in 'Expunging' state to storage cleanup thread and during delete storage pool (#12602) 2026-02-18 20:08:25 +01:00
Suresh Kumar Anaparti 8b38cea33c
Fix NPE while stopping the RabbitMQEventBus bean when there is no connection established with RabbitMQ Event Bus (#12635) 2026-02-18 20:06:46 +01:00
Suresh Kumar Anaparti 9dd93cef76
Support for custom SSH port for KVM hosts from the host url on add host and the configuration (#12571) 2026-02-18 20:05:51 +01:00
Suresh Kumar Anaparti 8c12a13216
Fix NPE during reset password (#12585) 2026-02-18 20:03:36 +01:00
Daan Hoogland c0db75b9fa agentic workflow daily report 2026-02-18 09:35:17 +01:00
dahn a1bcae9213
Agentic workflow experiment (#12652) 2026-02-17 16:11:01 +01:00
dahn 62eb4b7828
Remove acs-robot from collaborators list 2026-02-17 15:47:14 +01:00
dahn 22cda0c77b
constructing the expiry Prometheus Item according to new format (#12653) 2026-02-17 14:41:58 +01:00
Daan Hoogland a7dc5efad5 Merge release branch 4.22 to main
* 4.22:
  Fix issue when restoring backup after migration of volume (#12549)
  Usage: Heartbeat should not schedule usage job when a job is already running (#12616)
  Allow limit queries without random ordering (#12598)
  engine/schema: fix cluster/zone settings with encrypted values (#12626)
  Fix injection of preset variables into the JS interpreter (#12515)
  Fix issue with multiple KVM Host entries in host table (#12589)
  Add a Prometheus metric to track host certificate expiry (#12613)
  ssvm: delete temp directory while deleting entity download url (#12562)
2026-02-17 11:55:04 +01:00
Daan Hoogland 11df71e55c Merge branch '4.20' into '4.22' 2026-02-17 11:53:08 +01:00
Manoj Kumar c79b33c1fb
Allow enforcing password change for a user after reset by admin (root/domain) (#12294)
* API modifications for passwordchangerequired

* ui login flow for passwordchangerequired

* add passwordchangerequired in listUsers API response, it will be used in UI to render reset password form

* cleanup redundant LOGIN_SOURCE and limiting apis for first time login

* address copilot comments

* allow enforcing password change for all role types and update reset pwd flow for passwordchangerequired

* address review comments

* add unit tests

* cleanup ispasswordchangerequired from user_view

* address review comments

* 1. Allow enforcing password change while creating user
2. Admin can enforce password change on next login with out resetting password

* address review comment, add unit test

* improve code coverage

* fix pre-commit license issue

* 1. allow enter key to submit change password form
2. hide force password reset for disabled/locked user in ui

* 1. throw exception when force reset password is done for locked/disabled user/account
2. ui validation on current and new password being same
3. allow enforce change password for add user until saml is not enabled

* allow oauth login to skip force password change
2026-02-16 16:01:42 +05:30
Pearl Dsilva ae5308bdd2
Fix issue when restoring backup after migration of volume (#12549) 2026-02-13 15:14:58 +01:00
Abhisar Sinha d8230c9598
Usage: Heartbeat should not schedule usage job when a job is already running (#12616) 2026-02-13 10:58:04 +01:00
Suresh Kumar Anaparti e22f842ed8
Allow limit queries without random ordering (#12598) 2026-02-13 09:30:55 +01:00
Wei Zhou 18d66595b3
engine/schema: fix cluster/zone settings with encrypted values (#12626) 2026-02-12 12:52:23 +01:00
dahn b1edfb8d60
Remove and Update collaborators list in .asf.yaml (#12627) 2026-02-12 08:55:40 +01:00
Fabricio Duarte 34f6f413a1
Fix injection of preset variables into the JS interpreter (#12515) 2026-02-11 16:12:09 +01:00
Nicolas Vazquez b7c970f45f
Fix issue with multiple KVM Host entries in host table (#12589) 2026-02-11 13:47:21 +01:00
Nicolas Vazquez 4de8c2b6f6
Add a Prometheus metric to track host certificate expiry (#12613) 2026-02-11 13:46:49 +01:00
Abhishek Kumar b45726f7b1
ssvm: delete temp directory while deleting entity download url (#12562) 2026-02-11 10:35:09 +01:00
Daan Hoogland d3e1976912 Merge release branch 4.22 to main
* 4.22:
  Fixes issue with loading Capacity dashboard when mulitple backup providers configured (#12550)
2026-02-09 13:06:28 +01:00
Daan Hoogland 7324ef45d4 Merge branch '4.20' into 4.22 2026-02-09 13:05:08 +01:00
Pearl Dsilva a0f35a186d
Fixes issue with loading Capacity dashboard when mulitple backup providers configured (#12550) 2026-02-09 12:12:28 +01:00
Suresh Kumar Anaparti 408e8c079d
Merge branch '4.22' 2026-02-05 21:42:47 +05:30
Daan Hoogland e929f2024a Merge branch '4.22' 2026-02-05 16:07:46 +01:00
Suresh Kumar Anaparti 53c98c33e6
ui build fixes (after merge) 2026-02-05 20:36:41 +05:30
Daan Hoogland cd6a8f61ca Merge branch '4.20' into 4.22 2026-02-05 15:32:36 +01:00
Imvedansh 3d7d412d5b
UI: Add comprehensive domain deletion confirmation dialog (Feature Request #11497) (#12380) 2026-02-05 11:52:11 +01:00
Erik Böck e32d08e50e
Create new generic method for resource UUID obtention in event's descriptions (#12502) 2026-02-05 11:23:40 +01:00
dahn 349eea501a
Mvn updates (#12575) 2026-02-05 09:41:41 +01:00
Abhisar Sinha 9ae696d1c8
Preserve VM settings on Instance Snapshot revert for Custom Service Offering (#12555) 2026-02-03 14:15:09 +01:00
Suresh Kumar Anaparti ce42ce54c2
Fix template details deletion while updating template from UI (#12559)
* Fix template details deletion while updating template from UI

* update the latest template details before submit
2026-02-03 14:21:43 +05:30
Wei Zhou b869913529
noVNC: support Spanish Latin American keyboard on VMware (#12484)
* noVNC: support Spanish Latin American keyboard

* Update server/src/main/java/com/cloud/vm/UserVmManagerImpl.java
2026-02-02 15:16:54 +05:30
Suresh Kumar Anaparti a5b6bc3be6
Merge branch '4.22' 2026-01-30 21:15:58 +05:30
Suresh Kumar Anaparti 30d306622a
Merge branch '4.20' into 4.22 2026-01-30 21:15:21 +05:30
Suresh Kumar Anaparti 6bed3d4e64
Update storage usage / size in backup usage response (#12539) 2026-01-30 13:45:59 +01:00
Vishesh ef60aa5601
Restart xl2tpd service when the VPN configuration is modified (#12422) 2026-01-30 17:46:12 +05:30
Daan Hoogland 7b94ccc443 eofFix 2026-01-30 11:53:40 +01:00
K Viddya a38205ebf0
Add s390x Support for Cloudstack Simulator (#12337)
Signed-off-by: Viddya K <viddya.k@ibm.com>
Signed-off-by: Niyam Siwach <niyam@ibm.com>
Co-authored-by: root <root@c63716v1.fyre.ibm.com>
2026-01-30 11:22:07 +01:00
salfers e1d512e5fd
Set CORS headers for both http/https in SSVM apache config (#9389) 2026-01-30 11:53:44 +02:00
Suresh Kumar Anaparti d98511dddd
Update physical size for the snapshots of the volumes on ceph primary storage (#12465) 2026-01-30 10:51:38 +01:00
Vishesh d0e21a7dba
UI: Prevent extra API calls in search filter on scrolling (#12553) 2026-01-30 09:53:28 +01:00
Abhishek Kumar c1c1b0e765
extension: improve host vm power reporting (#11619)
* extension/proxmox: improve host vm power reporting

Add `statuses` action in extensions to report VM power states

This PR introduces support for retrieving the power state of all VMs on a host directly from an extension using the new `statuses` action.
When available, this provides a single aggregated response, reducing the need for multiple calls.

If the extension does not implement `statuses`, the server will gracefully fall back to querying individual VMs using the existing `status` action.

This helps with updating the host in CloudStack after out-of-band migrations for the VM.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* address review

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-30 14:07:22 +05:30
Vishesh a7178ee687
Fix mvn warnings (#10909)
* Replace maven-jgit-buildnumber-plugin with thread safe buildnumber-maven-plugin

* Fix mysql-connector-java warning

* Fix thread safe warning for properties-maven-plugin

* Fix mvn build - marvin warnings

* Update tools/marvin/README.md

* Update tools/marvin/README.md

Co-authored-by: dahn <daan.hoogland@gmail.com>

---------

Co-authored-by: dahn <daan.hoogland@gmail.com>
2026-01-30 14:01:57 +05:30
Abhishek Kumar 18972caf5f
api,server: allow cleaning up vm extraconfig (#11974) 2026-01-30 13:54:01 +05:30
dahn 25eacaa1ff
set `displayName` to `name` by default (#9719)
* set `desplayName` to `name` by default

* list by displayname instead of name

* back to using name

* Update api/src/main/java/org/apache/cloudstack/api/command/user/vm/DeployVMCmd.java

---------

Co-authored-by: Daan Hoogland <dahn@apache.org>
2026-01-30 13:03:21 +05:30
Wei Zhou 81f16b6261
engine/schema: prepend algorithm to checksum during systemvm template registration (#12165)
* engine/schema: prepend algorithm to checksum during systemvm template registration

* Update utils/src/main/java/org/apache/cloudstack/utils/security/DigestHelper.java
2026-01-30 09:01:50 +02:00
dependabot[bot] 9d523cbbfe
Bump org.apache.maven.plugins:maven-war-plugin from 3.4.0 to 3.5.1 (#12497)
Bumps [org.apache.maven.plugins:maven-war-plugin](https://github.com/apache/maven-war-plugin) from 3.4.0 to 3.5.1.
- [Release notes](https://github.com/apache/maven-war-plugin/releases)
- [Commits](https://github.com/apache/maven-war-plugin/compare/maven-war-plugin-3.4.0...maven-war-plugin-3.5.1)

---
updated-dependencies:
- dependency-name: org.apache.maven.plugins:maven-war-plugin
  dependency-version: 3.5.1
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-30 08:57:24 +02:00
Vishesh 45d623ec0d
Update search filter size dynamically (#12552) 2026-01-30 08:51:47 +02:00
Wei Zhou bb391c3deb
test: increase timeout in test_human_readable_logs.py (#11972) 2026-01-30 08:50:44 +02:00
Dattu bac3421da4
Fixed: unnecessary regeneration of SSH keys in developer mode when they already existed. (#12059) 2026-01-30 08:42:41 +02:00
Abhishek Kumar bb8e7d39e6
api,server: allow configuring repetitive alerts (#11325)
* api,server: allow configuring repetitive alerts

Fixes #6613

Introduces support for configuring additional alert types that can be published repeatedly, beyond the default set.

Operators can now use the dynamic configuration `alert.allowed.repetitive.types` to specify a comma-separated list of alert type names that should be allowed for repetitive publication.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* add tests

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* test fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* allow repetition for custom alerts

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* remove refactoring

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-30 08:41:25 +02:00
Abhishek Kumar 8bea89a80b
Merge remote-tracking branch 'apache/4.22' 2026-01-30 10:09:16 +05:30
Abhishek Kumar 29ce03e946
Merge remote-tracking branch 'apache/4.20' into 4.22 2026-01-30 10:08:36 +05:30
Abhishek Kumar d7bdbcc4ed
pre-commit: fix inconsistent license (#12551)
Fix inconsistent license with UI .vue file.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-30 10:05:50 +05:30
Abhishek Kumar a6ccde44c4
kvm: honour disk controller for vm during attach volume (#12452) 2026-01-29 17:11:21 +01:00
Vishesh 0e94f7d771
UI: Show applied search filters (#9520) 2026-01-29 15:17:11 +01:00
Suresh Kumar Anaparti ffb8b91ff5
Merge branch '4.22' 2026-01-29 19:42:07 +05:30
Suresh Kumar Anaparti f5778eaa32
Merge branch '4.20' into 4.22 2026-01-29 19:41:29 +05:30
Fabricio Duarte 7d52cd0e43
Fix calculation of the next time that Usage will execute in `removeRawUsageRecords` (#12518)
* Fix calculation of the next time that Usage will execute in `removeRawUsageRecords`

* Address copilot reviews
2026-01-29 15:38:12 +02:00
Daniel Augusto Veronezi Salvador 8c2a030816
Fix query filter and units tests (#12184) 2026-01-29 14:51:22 +02:00
Wei Zhou aef3df7577
server: pass network label of physical network when plug nic for private gateway on hypervisor (#11846) 2026-01-29 14:47:08 +02:00
Abhishek Kumar 3626c515e8
server: fix listing resource limits (#12188) 2026-01-29 12:36:16 +01:00
Manoj Kumar 0b62fb5e20
Add cloud image downloader script (#11918) 2026-01-29 11:36:19 +01:00
Andrija Panic 3ba5c2b610
Fix logs mismatch between Network GC wait and interval (#10776)
Co-authored-by: nvazquez <nicovazquez90@gmail.com>
Co-authored-by: dahn <daan@onecht.net>
Co-authored-by: Wei Zhou <weizhou@apache.org>
2026-01-29 11:27:46 +01:00
Suresh Kumar Anaparti a55f85af50
Merge branch '4.22' 2026-01-29 15:55:03 +05:30
Suresh Kumar Anaparti d700e2db64
Merge branch '4.20' into 4.22 2026-01-29 15:51:58 +05:30
Rene Peinthor 6ba5e08221
Linstor: support live migration from other primary storage (#12532)
* Linstor: Refactor resource creation methods to LinstorUtil

Move reusable methods from LinstorPrimaryDataStoreDriverImpl to LinstorUtil
to enable sharing with other components:
- logLinstorAnswer, logLinstorAnswers, checkLinstorAnswersThrow
- getRscGrp, getEncryptedLayerList, applyQoSSettings
- createResourceBase, createResource, spawnResource
- canShareTemplateForResourceGroup, foundShareableTemplate

Add LIN_PROP_DRBDOPT_EXACT_SIZE constant and exactSize parameter support
for DRBD exact-size property handling during resource creation.

* Linstor: Add LinstorDataMotionStrategy for VM live migration

Implement DataMotionStrategy for live migration of VMs with volumes on
Linstor or other primary storage.

Key features:
- Support live migration with storage from other primary storages
- Preserve DRBD exact-size property during migration
2026-01-29 14:38:12 +05:30
Bernardo De Marco Gonçalves c681d0d0a2
Change `vmsnapshot.max` setting scope to the account level (#11616) 2026-01-29 10:01:54 +01:00
Suresh Kumar Anaparti 26b57655ec
Deployment plan fixes for VM with last host, and last host in maintenance (#12062)
* Deployment plan fixes for VM with last host
- Consider last host when it is not in maintenance
- Fail deployment when user requests for last host consideration and last host doesn't exists or in maintenance

* changes

* msg update with vm/host name

* address comments

* Exclude last hosts with error or degraded state as well, for vm deploy

* review changes
2026-01-29 10:29:41 +02:00
Nicolas Vazquez 664f76c7e4
Fix KvmSshToAgentEnabled setting description and make it dynamic (#12533) 2026-01-29 09:24:58 +01:00
Abhishek Kumar 9b4f16b73f
api,server: apis return their http request type (#11382)
* api,server: apis return their http request type

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix and unit test

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* more test

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* address copilot

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* Update plugins/api/discovery/src/main/java/org/apache/cloudstack/api/response/ApiDiscoveryResponse.java

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: dahn <daan@onecht.net>
Co-authored-by: Harikrishna <harikrishna.patnala@gmail.com>
2026-01-29 13:52:07 +05:30
Manoj Kumar a8f1e4a5ba
import network acl rules using csv (#12013) 2026-01-29 09:10:28 +01:00
Abhishek Kumar bd459a4c4c
ui: allow viewing hosts from management server connected agents (#12149)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-29 10:00:54 +02:00
Abhishek Kumar 10e0d42f45
ui: introduce section-level “advisories” with quick-fix actions (#11763)
* ui: introduce section-level “advisories” with quick-fix actions

This change adds a lightweight “advisories” mechanism to section configs and ships the first advisory to help operators satisfy some of the CKS prerequisites.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix endpoint.url check

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* label consistency

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* Update ui/src/components/view/AdvisoriesView.vue

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* improvements

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* remove comments

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* allow disabling

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-29 09:37:52 +02:00
Abhishek Kumar 286e406e38
ui: clear selected resource when no items in listview (#11946)
Fixes #11922

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-29 12:05:51 +05:30
Suresh Kumar Anaparti 65e9bebc69
Show parent snapshot (along with the chain size) for incremental snapshots (#12468)
* Show parent snapshot (along with the chain size) for incremental snapshots

* review

* review changes
2026-01-29 08:16:10 +02:00
Fabricio Duarte b7fc7179fc
Add batch deletion support to `removeRawUsageRecords` (#12522)
* Add batch deletion support to `removeRawUsageRecords`

* Remove ORDER BY from batch expunge
2026-01-29 08:14:05 +02:00
Vishesh 243872a771
Use infinite scroll select (#11991)
* addresses the domain selection (listed after the page size) with keyword search
2026-01-29 11:40:23 +05:30
Abhishek Kumar 98debd235f
gha: fix duplicate key for stale workflow
Fixes failing pre-commit GHA

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-29 10:35:32 +05:30
Harikrishna 106f478e2c
Remove unnecessary stubbings in ManagementServerMaintenanceManagerImplTest (#11914) 2026-01-28 18:16:38 +01:00
Jeevan 1300fc5e91
Fix keyword parameter filtering in listBackupOfferings API (#12540)
Signed-off-by: Jeevan Yewale <jeevanyewale4@gmial.com>
Co-authored-by: Jeevan Yewale <jeevanyewale4@gmial.com>
2026-01-28 16:26:37 +01:00
dependabot[bot] d83c2e4225
Bump com.vmware.vapi:vapi-runtime from 2.40.0 to 2.61.2 (#12495) 2026-01-28 15:30:46 +01:00
Pearl Dsilva 7786cf93c2
Veeam: Use restore timeout as an interval as opposed to a counter (#11772)
* Veeam: Use restore timeout as a time interval as opposed to a counter

* fix log

* fix unit test

* remove unused imports

* fix comment

* unused import

* change to while - issure refactoring
2026-01-28 16:13:56 +02:00
Daman Arora 9956d32548
Fix delete snapshot policy expunged volume (#12474)
* use findByIdIncludingRemoved for volume retrieval in snapshot policy validation

* add unit tests

* add cleanup for orphan snapshot policies

* delete snapshot policies when expunging volumes

* update orphan cleanup to remove policies for volumes that are in expunged state or null

---------

Co-authored-by: Daman Arora <daman.arora@shapeblue.com>
2026-01-28 16:11:14 +02:00
Suresh Kumar Anaparti 059debf212
Add the procedure files for insert extensions and update guest os category (#12482)
* Add the procedure files for insert extensions and update guestos category

* fixed indentation

* Apply suggestions from code review

Co-authored-by: Vishesh <8760112+vishesh92@users.noreply.github.com>

---------

Co-authored-by: Vishesh <8760112+vishesh92@users.noreply.github.com>
2026-01-28 16:09:37 +02:00
Abhisar Sinha 95de88a8ff
Usage server should takeover immediately if the other Usage server has been stopped gracefully (#12507) 2026-01-28 16:08:25 +02:00
Abhishek Kumar 9fc93af85f
ui: allow actions for other users of root admin (#11319)
Fixes #10306

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-28 16:06:04 +02:00
Davi Torres ded975ceb8
Improve message "Network is unavailable. Please contact administrator" (#11981)
* Improve message "Network is unavailable. Please contact administrator"

This trivial change provide more details for root administrators during troubleshooting.

See discussion https://github.com/apache/cloudstack/discussions/11980

* Improve error message for unavailable guest network

* Update engine/orchestration/src/main/java/com/cloud/vm/VirtualMachineManagerImpl.java

Co-authored-by: dahn <daan.hoogland@gmail.com>

* Fix and refactor

---------

Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: nvazquez <nicovazquez90@gmail.com>
2026-01-28 15:43:05 +02:00
Abhishek Kumar 69c69dc537
server,engine-schema: make config - use.https.to.upload zone scoped (#11539) 2026-01-28 13:23:39 +01:00
dahn 37507e8799
address warnings in capacity manager (#11971)
Co-authored-by: Daan Hoogland <dahn@apache.org>
2026-01-28 17:41:24 +05:30
Wei Zhou 6a04e14f87
VR: fix dns list in redundant VPC VRs (#12161) 2026-01-28 13:09:10 +01:00
Suresh Kumar Anaparti 4d35d68e4e
Fix url in password reset email (#12078) 2026-01-28 12:47:50 +01:00
Edward-x 35e6d7c5ba
fix that log sensitive infomation in cmd of script (#12024)
* fix that log sensitive infomation in cmd of script

* Remove unnecessary line break in Script.java

* Update utils/src/main/java/com/cloud/utils/script/Script.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Refactor logging in Script class to simplify handling of sensitive arguments

* Improve command logging in Script class to include full command line when debugging

* Remove unused _passwordCommand flag from Script class to simplify code

* Update utils/src/main/java/com/cloud/utils/script/Script.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Remove unused import for KeyStoreUtils

* Update utils/src/main/java/com/cloud/utils/script/Script.java

---------

Co-authored-by: chenyoulong20g@ict.ac.cn <chenyoulong20g@ict.ac.cn>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: dahn <daan@onecht.net>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2026-01-28 13:16:59 +02:00
Rohit Yadav 8c2ba2b341
ui: bump nodejs v24 LTS usage (#12471) 2026-01-28 12:16:34 +01:00
Pearl Dsilva 38e30a116c
Add support for vTPM for XenServer and XCP-ng 8.3/8.4 (#12263)
* XenServer 8.4/XCP-ng 8.3: Support vTPM

* fix issue

* add log for windows 11 or other such guests OSs that require vtpm

* remove secure bootmode requirement

* Fix uefi setting on host for xenserver 8.4
2026-01-28 13:12:32 +02:00
Suresh Kumar Anaparti 83ce0067b8
Update the snapshot physical size for the primary storage resource after snapshot creation and during resource count recalculation (#12481)
* Update snapshot size for the primary storage resource after snapshot creation and during resource count recalculation

* Update snapshot physical size

* review

* review
2026-01-28 13:07:57 +02:00
Suresh Kumar Anaparti ff7ec0cd22
Update alert id for VR public and private interface (#12527) 2026-01-28 11:45:48 +01:00
Harikrishna 6932cacabc
Allow copy of templates from secondary storages of other zone when adding a new secondary storage (#12296)
* Allow copy of templates from secondary storages of other zone when adding a new secondary storage

* Add API param and UI changes on add secondary storage page

* Make copy template across zones non blocking

* Code fixes

* unused imports

* Add copy template flag in zone wizard and remove NFS checks

* Fix UI

* Label fixes

* code optimizations

* code refactoring

* missing changes

* Combine template copy and download into a single asynchronous operation

* unused import and fixed conflicts

* unused code

* update config message

* Fix configuration setting value on add secondary storage page

* Removed unused code

* Update unit tests
2026-01-28 16:00:30 +05:30
dahn 0e7f74839a
Add configuration for archiving stale issues (#12293) 2026-01-28 15:18:27 +05:30
Tonitzpp 434e472ef8
Change to display if public IPs are reserved in the tab (#12461)
Co-authored-by: toni.zamparetti <toni.zamparetti@scclouds.com.br>
2026-01-28 10:10:43 +01:00
dependabot[bot] 7001d43dbf
Bump org.codehaus.mojo:properties-maven-plugin from 1.0-alpha-2 to 1.2.1 (#12508) 2026-01-28 14:09:29 +05:30
Abhishek Kumar 1b2ae13df7
ui: add cache for oslogo request using osId (#11422)
When OsLogo component is used in the items of a list having same OS type
it was causing listOsTypes API call multiple time. This change allows
caching request and response value for 30 seconds. Caching behaviour is
controlled using `useCache` flag.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-28 12:40:34 +05:30
Edward-x 0dcbe57a47
Fix that Sensitive information logged in SshHelper.sshExecute method (#12026)
* Sensitive information logged in SshHelper.sshExecute method

* Fix that Sensitive information logged in SshHelper.sshExecute method2

* Fix sensitive information handling in SshHelper and its tests

---------

Co-authored-by: chenyoulong20g@ict.ac.cn <chenyoulong20g@ict.ac.cn>
2026-01-28 12:26:44 +05:30
Abhishek Kumar 25cb545325
Merge remote-tracking branch 'apache/4.22' 2026-01-28 11:33:03 +05:30
Abhishek Kumar 276eb8111d
Merge remote-tracking branch 'apache/4.20' into 4.22 2026-01-28 11:32:18 +05:30
Wei Zhou 4761935145
server: add options for kvm.guest.os.machine.type (#12414) 2026-01-28 11:29:31 +05:30
Fabricio Duarte 70d4c9d1ba
Consider secondary storage selectors during cold volume migration (#10957)
The secondary storage selectors allow operators to specify, for instance, that volumes should go to a specific secondary storage A. Thus, when uploading a volume, it will always be downloaded to secondary storage A.

The cold volume migration moves volumes to a secondary storage before moving them to the destination primary storage. This process does not consider the secondary storage selectors. However, some companies want to dedicate specific secondary storages for cold migration.

To address this, this PR makes the cold volume migration process consider the secondary storage selectors.
2026-01-28 11:18:31 +05:30
Wei Zhou 2bfc9cb8eb
CKS: skip default egress policy check for vpc network offerings (#11998)
This PR fixes #11995

Steps to reproduce the issue
- create a vpc
- create a vpc tier with default offering `DefaultIsolatedNetworkOfferingForVpcNetworks`
- register CKS ISO
- create CKS on the vpc tier

expected: succeed
actual: failed with error `Kubernetes service has not been configured properly to provision Kubernetes clusters`
2026-01-28 11:17:14 +05:30
Abhishek Kumar 572aa19564
ui: show usage server restart message on usage config change (#11969)
Fixes #10853

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-28 11:01:53 +05:30
Manoj Kumar 21d5c10850
Apply reordered ACL list to VR router (#12525)
This PR address #9398
2026-01-28 10:55:59 +05:30
cheng102e 062b98a51e
fix: clean magic value, and update if-else to switch (#8848)
* fix: clean magic value, and update if-else to switch

* fix: return the (String args[])

* review

---------

Co-authored-by: jiejc1 <jiejc1@lenovo.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2026-01-28 10:15:11 +05:30
Tonitzpp 66665b883c
Changed error message when snapshot is not on secondary when trying to perform download (#12462)
Co-authored-by: toni.zamparetti <toni.zamparetti@scclouds.com.br>
2026-01-28 10:12:57 +05:30
Edward-x dd0b863e22
sensitive information leak to log (#12018)
* sensitive information leak to log

* Update agent/src/main/java/com/cloud/agent/resource/consoleproxy/ConsoleProxyResource.java
* Update core/src/main/java/com/cloud/storage/template/HttpTemplateDownloader.java
* Update engine/schema/src/main/java/com/cloud/upgrade/DatabaseCreator.java
* Update plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalDnsmasqResource.java
* Update plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalDnsmasqResource.java
* Update plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalKickStartPxeResource.java
* Update plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java
* Update plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java
* Update plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalPingPxeResource.java
* Update utils/src/main/java/com/cloud/utils/UriUtils.java

Co-authored-by: dahn <daan.hoogland@gmail.com>

* Update plugins/hypervisors/baremetal/src/main/java/com/cloud/baremetal/networkservice/BaremetalKickStartPxeResource.java

Co-authored-by: Abhisar Sinha <63767682+abh1sar@users.noreply.github.com>

* Sync with 4.20 and fix conflict in BaremetalPingPxeResource

* Apply suggestions from code review

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

---------

Co-authored-by: chenyoulong20g@ict.ac.cn <chenyoulong20g@ict.ac.cn>
Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: dahn <daan@onecht.net>
Co-authored-by: Abhisar Sinha <63767682+abh1sar@users.noreply.github.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2026-01-28 10:11:23 +05:30
Abhishek Kumar 5aced73250
ui: reset configuration allowed only when value not default (#11728) 2026-01-27 16:48:18 +01:00
Daan Hoogland cb822feb72 Merge branch '4.22' 2026-01-27 16:21:59 +01:00
Daan Hoogland 75db42bca6 Merge branch '4.20' into 4.22 2026-01-27 15:23:23 +01:00
Wei Zhou 9dee137265
debian/control: remove python2 as dependency of build environment (#12213)
This fixes the issue that ACS cannot be packaged on Ubuntu 24.04 due to unsupported python2
verified by `apt-get build-dep .`
2026-01-27 15:39:08 +02:00
Abhishek Kumar d722c9551a
ui: fix form data double fetch/reset DeployVMFromBackup form data by ownership selection (#11706)
* ui: fix form data double fetch/reset DeployVMFromBackup form data by ownership selection

Related #11705

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-27 14:46:06 +02:00
Lorenzo Tanganelli d6c192c0f0
fix template id unmanaged vm (#12288)
* fix template id unmanaged vm

* Update == to equals

Co-authored-by: dahn <daan.hoogland@gmail.com>

---------

Co-authored-by: dahn <daan.hoogland@gmail.com>
2026-01-27 14:45:16 +02:00
Abhisar Sinha 2056c582f1
Fix logging of forwarded IPs in logs (#11854) 2026-01-27 18:01:02 +05:30
Erik Böck cd2d71104e
Implement SSVM storage network IP to API response and GUI details tab (#11979)
* Implement SSVM storage network IP to API response and GUI details tab

* remove network mention from attribute name

* remove network from serialized name

* fix parameter name in the UI
2026-01-27 17:29:06 +05:30
Edward-x c0b5358d8e
fix Host Password Exposed in Command-Line Logging (#12016) 2026-01-27 12:55:40 +01:00
Manoj Kumar af9d68630f
Initialize template status='Processing' (#11970)
* Initialize template status='Processing'

* remove else block and fix the error string

* restructure if-else

* standardize register ISO response

* use enum instead of string

* fix smoke test failures

* Add Download Complete status for template
2026-01-27 13:06:52 +02:00
Pearl Dsilva ca5232778d
CKS: Use Zone MTUs when network is created at the time of CKS cluster creation (#12228) 2026-01-27 12:04:18 +01:00
Erik Böck 416568a373
Fix typo in finalyzeAccountId (#11990)
* Fix typo in finalyzeAccountId

* fix tests
2026-01-27 16:17:14 +05:30
Wei Zhou b6134418ea
server: do not run dhcp and dns check if VR is not provider (#12272) 2026-01-27 12:42:24 +02:00
Abhishek Kumar 5fd5b62570
server: fix remove management server (#12147)
Fixes #12137

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-27 15:01:20 +05:30
Abhishek Kumar ac2242ece2
api,server,ui: support tags for domains (#11964)
* api,server,ui: support tags for domains

Fixes #11608

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* address copilot comment

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* fix import

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* Added tags support to listDomains API

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Harikrishna Patnala <harikrishna.patnala@gmail.com>
2026-01-27 14:37:51 +05:30
Fabricio Duarte 0458c5328b
Consider secondary storage selectors during template synchronization (#10956)
* Consider secondary storage selectors during template synchronization

* Fix checkstyle

* Remove unused import
2026-01-27 11:05:09 +02:00
Nicolas Vazquez fce69fbfe0
VM Power state optimization (#12463)
* Publish VM Power state optimization (PowerReportMissing)

* Fix logging
2026-01-27 10:27:43 +02:00
Erik Böck cabd9a98e1
Implemented auto refresh button for VM metrics (#10900)
* added auto refresh button for vm metrics

* refactored getStartDate method and fixed auto refresh date period not being update

* switch variables from var to const
2026-01-27 09:59:12 +02:00
Abhisar Sinha ca07663718
Show backup offerings with userDrivenBackupsAllowed=false to all users (#11889) 2026-01-27 09:53:17 +02:00
Nicolas Vazquez ff0cfc9148
Add ability to filter by version for listHosts and listMgmtServers APIs (#12472)
* Add ability to filter by version for listHosts and listMgmtServers APIs

* Address review comment

* Fix listMgmtServers API
2026-01-27 12:45:46 +05:30
Vitor Hugo Homem Marzarotto f73362ae48
Fix saml bug unable to login (#10868)
* Fix check

* Adds configuration for behaviour, when SAML SSO is disabled for a user

* set default configuration value to false and rename it to enable.login.with.disabled.saml

---------

Co-authored-by: Vitor Hugo Homem Marzarotto <vitor.marzarotto@scclouds.com.br>
Co-authored-by: erikbocks <erik.bock@outlook.com>
2026-01-27 09:13:21 +02:00
Sinscerly f292143af8
Fix/prometheus metadata sorting (#12112)
* fix prometheus metadata and sorted. Adds in TYPE and HELP

* fix random linting issue
2026-01-27 08:47:42 +02:00
GaOrtiga 128dbe2c0b
Refactor configuration SystemVMDefaultHypervisor (#8934)
* refactor configuration SystemVMDefaultHypervisor

* change variable name

---------

Co-authored-by: Gabriel <gabriel.fernandes@scclouds.com.br>
2026-01-27 10:36:59 +05:30
Bernardo De Marco Gonçalves 9b0c28c16d
fix regression in the listBackupSchedules API (#12402) 2026-01-26 15:00:53 -05:00
Pearl Dsilva 5bb5af4c48
4.20: Fix unit test failure (#12520) 2026-01-26 11:33:06 -05:00
dahn fa3dee886e
do not add disk cache mode from an empty string (#12248)
Co-authored-by: Daan Hoogland <dahn@apache.org>
2026-01-26 09:35:17 -05:00
Wei Zhou 63c8b5fc56
api/server: support deploy-as-is template as VNF template (#12499) 2026-01-26 15:23:27 +01:00
John Bampton 88181ebe72
Standardize and auto add license headers to all cfg files with pre-commit (#12230) 2026-01-26 15:59:31 +02:00
Daan Hoogland 7178bfe9eb Merge release branch 4.22 to main
* 4.22:
  merge forward error
2026-01-26 14:19:04 +01:00
Daan Hoogland d50899427a merge forward error 2026-01-26 14:17:38 +01:00
Manoj Kumar 7536516e41
add missing label text for label.aclname (#12511) 2026-01-26 13:42:43 +01:00
Daan Hoogland e3999923a7 Merge release branch 4.22 to main
* 4.22:
  fix install path for systemvm templates when introducing new sec storage (#11605)
  fix Sensitive Data Exposure Through Exception Logging in OVM Hypervis… (#12032)
  Fix snapshot physical size after migration (#12166)
  ConfigDrive: use file absolute path instead of canonical path to create ISO (#11623)
  Add log for null templateVO (#12406)
  snapshot: fix listSnapshots for volume which got delete and whose storage pool got deleted (#12433)
  Notify user if template upgrade is not required (#12483)
  Fix: proper permissions for systemvm template registrations on hardened systems (#12098)
  Allow modification of user vm details if user.vm.readonly.details is empty (#10456)
  NPE fix while deleting storage pool when pool has detached volumes (#12451)
2026-01-26 13:32:56 +01:00
Daan Hoogland edb62b490c Merge branch '4.20' into 4.22 2026-01-26 13:30:26 +01:00
Bernardo De Marco Gonçalves bbc23a7468
fix install path for systemvm templates when introducing new sec storage (#11605) 2026-01-26 14:14:40 +02:00
Edward-x 44793da58f
fix Sensitive Data Exposure Through Exception Logging in OVM Hypervis… (#12032)
* fix Sensitive Data Exposure Through Exception Logging in OVM Hypervisor Configuration

* extra ‘)’ in log.

Co-authored-by: Abhisar Sinha <63767682+abh1sar@users.noreply.github.com>

* remove non-descriptive part

Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>

---------

Co-authored-by: chenyoulong20g@ict.ac.cn <chenyoulong20g@ict.ac.cn>
Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: Abhisar Sinha <63767682+abh1sar@users.noreply.github.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2026-01-26 13:22:22 +02:00
Henrique Sato 36edd92e48
Fix snapshot physical size after migration (#12166) 2026-01-26 12:58:42 +02:00
Wei Zhou 097c3a018b
ConfigDrive: use file absolute path instead of canonical path to create ISO (#11623)
* ConfigDrive: use file absolute path instead of canonical path to create ISO

* el8: add xorrisofs as option
2026-01-26 12:56:14 +02:00
Manoj Kumar 63bdc2b990
Add log for null templateVO (#12406) 2026-01-26 12:55:55 +02:00
Rohit Yadav 315cd52fd1
snapshot: fix listSnapshots for volume which got delete and whose storage pool got deleted (#12433)
This fixes the case when the storage pool is removed as well the KVM
host and the subsequent volumes on the host. When that happened, listing
snapshots (for recovery purposes) cause NPE as the pool_id was null, but
last_pool_id for the related destroyed volume wasn't null. This adds a
fallback logic.

Signed-off-by: Rohit Yadav <rohit@yadav.cloud>
2026-01-26 12:53:47 +02:00
Manoj Kumar d010e9fcf2
Notify user if template upgrade is not required (#12483) 2026-01-26 10:33:30 +01:00
Artem Sidorenko 0958dfc138
Fix: proper permissions for systemvm template registrations on hardened systems (#12098)
Related to https://github.com/apache/cloudstack/issues/10029#issuecomment-2531599607

We have umask 0077, so cloud-install-sys-tmplt is creating by default paths like below

```
$ ls -l /mnt/secondary/template/tmpl/
total 16
drwx------. 3 root root 4096 Nov 19 13:58 1
drwxrwxrwx. 7 root root 4096 Oct 31 09:42 2
drwxrwxrwx. 3 root root 4096 Oct 30 15:59 4
drwxr-xr-x. 2 root root 4096 Oct 31 10:21 5
$ ls -l /mnt/secondary/template/tmpl/1/
total 4
drwx------. 2 root root 4096 Nov 19 13:59 3
$ ls -l /mnt/secondary/template/tmpl/1/3/
total 549848
-rw-------. 1 root root 563032576 Nov 19 13:59 d23a1e19-c563-4f69-85ca-8721cf02082c.qcow2
-rw-------. 1 root root       287 Nov 19 13:59 template.properties
```

This results to the permissions problems later on, when trying to access the image

Signed-off-by: Artem Sidorenko <artem.sidorenko@telekom.de>
2026-01-26 11:21:47 +02:00
Pearl Dsilva 4adb719570
Allow modification of user vm details if user.vm.readonly.details is empty (#10456) 2026-01-26 11:18:12 +02:00
Suresh Kumar Anaparti c8cadcb56e
NPE fix while deleting storage pool when pool has detached volumes (#12451)
* NPE fix while deleting storage pool when pool has detached volumes

* review

* unit tests

* Added log for volumes not attached to any VMs

* update filter, log and test

* updated volume dao method names returning non destroyed volumes

* build fix

---------

Co-authored-by: dahn <daan@onecht.net>
2026-01-26 10:31:14 +02:00
Suresh Kumar Anaparti 4bcf3ea57d
Merge branch '4.22' 2026-01-26 12:46:54 +05:30
Suresh Kumar Anaparti 000919d6e5
Merge branch '4.20' into 4.22 2026-01-26 12:46:09 +05:30
Manoj Kumar 8db065a14e
limit iso filename to have 251 chars at max (#12430) 2026-01-23 16:34:52 +01:00
Daman Arora bce3e54a7e
improve error handling for template upload notifications (#12412)
Co-authored-by: Daman Arora <daman.arora@shapeblue.com>
2026-01-22 15:02:46 +01:00
Nicolas Vazquez 6a9835904c
Fix for zoneids parameters length on updateAPIs (#12440) 2026-01-22 14:57:46 +01:00
Nicolas Vazquez 6846619a6f
Fix update network offering domainids size limitation (#12431) 2026-01-22 14:32:46 +01:00
Vishesh d1eb2822d9
Remove redundant Exceptions from logs for vm schedules (#12428) 2026-01-22 14:29:35 +01:00
Abhisar Sinha cd5bb09d0d
Fix potential leaks in executePipedCommands (#12478) 2026-01-22 10:59:41 +01:00
Wei Zhou b5e9178078
UI: fix issues when deploy VNF applicance on network with SG (#12436) 2026-01-22 10:56:03 +01:00
Suresh Kumar Anaparti 420bf6dff8
Merge branch '4.22' 2026-01-22 13:24:08 +05:30
Suresh Kumar Anaparti b1f870ae83
Merge branch '4.20' into 4.22 2026-01-22 13:23:21 +05:30
Harikrishna 6e5d78a8a7
Fix NPE on adding new columns in the tables (#12464)
* Fix NPE on adding new columns in the tables

* Remove assert
2026-01-22 12:46:16 +05:30
Wei Zhou 036489b288
CKS: fix resource limitation check on cpu when scale cks cluster (#12379) 2026-01-21 09:59:21 +01:00
dependabot[bot] 1b0a036a5b
Bump ads.version from 2.0.0.AM25 to 2.0.0.AM27 (#12269)
Bumps `ads.version` from 2.0.0.AM25 to 2.0.0.AM27.

Updates `org.apache.directory.server:apacheds-server-integ` from 2.0.0.AM25 to 2.0.0.AM27
- [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM25...2.0.0.AM27)

Updates `org.apache.directory.server:apacheds-core-constants` from 2.0.0.AM25 to 2.0.0.AM27
- [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM25...2.0.0.AM27)

Updates `org.apache.directory.server:apacheds-core-annotations` from 2.0.0.AM25 to 2.0.0.AM27
- [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM25...2.0.0.AM27)

Updates `org.apache.directory.server:apacheds-core` from 2.0.0.AM25 to 2.0.0.AM27
- [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM25...2.0.0.AM27)

Updates `org.apache.directory.server:apacheds-protocol-ldap` from 2.0.0.AM25 to 2.0.0.AM27
- [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM25...2.0.0.AM27)

Updates `org.apache.directory.server:apacheds-jdbm-partition` from 2.0.0.AM25 to 2.0.0.AM27
- [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM25...2.0.0.AM27)

Updates `org.apache.directory.server:apacheds-ldif-partition` from 2.0.0.AM25 to 2.0.0.AM27
- [Commits](https://github.com/apache/directory-server/compare/2.0.0.AM25...2.0.0.AM27)

---
updated-dependencies:
- dependency-name: org.apache.directory.server:apacheds-server-integ
  dependency-version: 2.0.0.AM27
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.apache.directory.server:apacheds-core-constants
  dependency-version: 2.0.0.AM27
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.apache.directory.server:apacheds-core-annotations
  dependency-version: 2.0.0.AM27
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.apache.directory.server:apacheds-core
  dependency-version: 2.0.0.AM27
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.apache.directory.server:apacheds-protocol-ldap
  dependency-version: 2.0.0.AM27
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.apache.directory.server:apacheds-jdbm-partition
  dependency-version: 2.0.0.AM27
  dependency-type: direct:development
  update-type: version-update:semver-patch
- dependency-name: org.apache.directory.server:apacheds-ldif-partition
  dependency-version: 2.0.0.AM27
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 12:07:23 +05:30
dependabot[bot] e2f4ed9dcf
Bump commons-codec:commons-codec from 1.15 to 1.20.0 (#12303)
Bumps [commons-codec:commons-codec](https://github.com/apache/commons-codec) from 1.15 to 1.20.0.
- [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-codec/compare/rel/commons-codec-1.15...rel/commons-codec-1.20.0)

---
updated-dependencies:
- dependency-name: commons-codec:commons-codec
  dependency-version: 1.20.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-01-21 12:06:44 +05:30
Suresh Kumar Anaparti 8db7cab7ba
Storage pool monitor disconnect improvements (#12398) 2026-01-20 09:08:39 +01:00
Nicolas Vazquez 496bc0329c
Fix: Condition for aborting migration, resume paused VMs on destination (#12331) 2026-01-20 08:56:32 +01:00
Abhisar Sinha cf36fb0000
Set nfsVersion in ssvm agent.properties only if it is not null (#12445) 2026-01-20 08:25:16 +01:00
Daman Arora da518e9036
CKS: Add image store validation for Kubernetes version registration (#12418)
Co-authored-by: Daman Arora <daman.arora@shapeblue.com>
2026-01-20 08:13:15 +01:00
Henrique Sato 03d24ff851
Fix NPE on primary storage delete (#11817) 2026-01-20 08:12:16 +01:00
Vitor Hugo Homem Marzarotto 2a6ce0c8a8
Adds url kubernetes iso (#10862)
Co-authored-by: Vitor Hugo Homem Marzarotto <vitor.marzarotto@scclouds.com.br>
Co-authored-by: Henrique Sato <henriquesato2003@gmail.com>
2026-01-20 08:10:42 +01:00
Suresh Kumar Anaparti 04b58acdd6
Merge branch '4.22' 2026-01-19 19:50:51 +05:30
Suresh Kumar Anaparti 3828a3b744
Merge branch '4.20' into 4.22 2026-01-19 19:50:10 +05:30
Manoj Kumar 42f1e19362
Mask vncPasswd being logged in agent.log (#12404) 2026-01-19 14:20:18 +01:00
Pearl Dsilva 8b2f1f19c2
Support dedicating backup offerings to domains (#12194)
* Add support for dedicating backup offerings to domains

* Add tests and UI support and update response params

* add license header

* exclude backupofferingdetailsvo from sonar

* fix pre-commit checks - missing / extra EOF line

* add test

* EOF

* filter backup offerings by domain id

* add unit tests

* add more unit tests and remove response file from code coverage check

* update checks

* address review comments: extract common code, fix tests

* added bean definition

* address comments

* add unit tests to increase coverage

* pre-commit check failure fix

* address merge issue

* allow updating backup offering when only domain id is modified
2026-01-19 14:21:47 +05:30
Abhishek Kumar a4b1a27c7d
ui: fix 404 on login after forgot password (#12448)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-19 08:50:07 +01:00
Abhisar Sinha 002d9768b2
Add settings to mark cryptographic algorithms in vpn customer gateways as excluded or obsolete (#12193)
This PR introduces several configuration settings using which an operator can mark certain cryptographic algorithms and parameters as excluded or obsolete for VPN Customer Gateway creation for Site-to-Site VPN.

Cloud providers following modern security frameworks (e.g., ISO 27001/27017) are required to enforce and communicate approved cryptographic standards. CloudStack currently accepts several weak or deprecated algorithms without guidance to users. This PR closes that gap by giving operators explicit control over what is disallowed vs discouraged, improving security posture without breaking existing deployments.

These settings are:

1. vpn.customer.gateway.excluded.encryption.algorithms
2. vpn.customer.gateway.excluded.hashing.algorithms
3. vpn.customer.gateway.excluded.ike.versions
4. vpn.customer.gateway.excluded.dh.group
5. vpn.customer.gateway.obsolete.encryption.algorithms
6. vpn.customer.gateway.obsolete.hashing.algorithms
7. vpn.customer.gateway.obsolete.ike.versions
8. vpn.customer.gateway.obsolete.dh.group
2026-01-19 13:18:37 +05:30
Abhishek Kumar 76e6de7f90
ui: fix form data double fetch/reset form data by ownership selection (#11705)
* ui: fix form data double fetch/reset form data by ownership selection

Fixes #10832
2026-01-16 10:48:57 -05:00
Wei Zhou b31c2f4cae
Revert "Review comment on pull request #12436"
This reverts commit a566af35f5.
2026-01-15 19:17:12 +01:00
Wei Zhou a566af35f5 Review comment on pull request #12436 2026-01-15 19:14:51 +01:00
Suresh Kumar Anaparti f1f779a08d
Cleanup snapshot files in datastores for Error-ed snapshots, and some code improvements (#12347) 2026-01-15 12:12:32 +01:00
Nicolas Vazquez aba3285c3c
[Usage] Include accounts uuid on the cloud_usage accounts initial saving (#12420) 2026-01-15 06:50:35 -03:00
Suresh Kumar Anaparti 507c4cd128
Merge branch '4.22' 2026-01-15 10:09:09 +05:30
Suresh Kumar Anaparti b5fd39fca0
Merge branch '4.20' into 4.22 2026-01-15 10:08:27 +05:30
Abhisar Sinha 5c1f9315ce
Remove transaction from updateCapacityForHost cal (#12421) 2026-01-14 16:12:42 +01:00
Suresh Kumar Anaparti 6a324da27a
MAC address assignment improvements (#12349) 2026-01-13 13:56:39 +01:00
Vishesh b8ed34e2a8
Reset modifier button's state (#12187) 2026-01-13 13:48:55 +01:00
Abhisar Sinha 9e86fdf1b6
Fix cloud-sysvmadmin hang (#12355) 2026-01-13 09:06:25 +01:00
Abhishek Kumar 538578366a Merge remote-tracking branch 'apache/4.22' 2026-01-13 11:49:07 +05:30
Abhishek Kumar 031fbf43d4 Merge remote-tracking branch 'apache/4.20' into 4.22 2026-01-13 11:48:05 +05:30
Abhishek Kumar 8627c60b95
ui: option to migrate vm with volumes to same pool (#11703)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-12 14:27:04 +01:00
Suresh Kumar Anaparti b8813c7b24
UI: Add info for 'Use primary storage replication' in snapshot view(s) (#11943) 2026-01-12 16:50:15 +05:30
Rene Peinthor 8dcfc7c767
Linstor fix host picking (#12047) 2026-01-12 11:29:31 +01:00
Suresh Kumar Anaparti 2b373a4659
[UI] Fix primary storage details display when the uuid has divergent pattern (#12307)
* [UI] Fix primary storage details display when the uuid has different pattern (eg. for pools with SolidFireShared provider)

* Fix on refresh

---------

Co-authored-by: vishesh92 <vishesh92@gmail.com>
2026-01-12 14:18:35 +05:30
Abhisar Sinha c7cfeb5caa
fix location constraint ceph error (#12285) 2026-01-12 09:13:12 +01:00
Abhishek Kumar 0e6d2d986b
ui: prevent calling listConfigurations when not allowed (#11704)
By default, normal users won't have access to listConfigurations API,
therefore, UI should not call it when access is not there.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-12 13:23:37 +05:30
Suresh Kumar Anaparti db1c7d678c
Updated protobuf version to 3.25.5, and protobuf & jackson maven dependencies (#12389) 2026-01-12 08:21:19 +01:00
Erik Böck 2358632253
Fixed User type accounts being able to change resource limits of their own domain and account (#12046)
Co-authored-by: Lucas Martins <56271185+lucas-a-martins@users.noreply.github.com>
2026-01-12 08:20:31 +01:00
Suresh Kumar Anaparti 2399edd380
[UI] Fix for the login url with nested redirect parameters (#12356) 2026-01-12 12:11:45 +05:30
Nicolas Vazquez 04875f1517
Improve logs for VM migrations (#12332) 2026-01-09 17:50:27 +01:00
Daan Hoogland 2811217578 Merge branch '4.22' 2026-01-09 15:00:05 +01:00
Daan Hoogland e25cf437c0 Merge branch '4.20' into 4.22 2026-01-09 14:28:12 +01:00
Abhishek Kumar ef1aaa0551
kvm: allow skip forcing disk controller (#11750) 2026-01-09 13:56:39 +01:00
Abhisar Sinha c91e84c6d8
Avoid double counting primary storage allocated capacity for storage pools having a parent (#12181) 2026-01-09 13:30:24 +01:00
Nicolas Vazquez 9a38e75abd
Fix Linstor shrink qcow2 volumes (#12387) 2026-01-09 09:48:04 +01:00
Suyang(Dawson) Chen 1b861dad48
Cleanup: Standardize logger message formatting in ApiServer.java (#11188) 2026-01-09 09:30:17 +01:00
Erik Böck 1ef6365771
Change internal ID to UUID in user disable event (#11824) 2026-01-09 09:23:46 +01:00
Bernardo De Marco Gonçalves bc3d7c314b
Change the `value` parameter of the `updateConfiguration` API to be required (#10790) 2026-01-09 09:17:44 +01:00
Tonitzpp bc76f2042d
Change migration volume exception messages (#12367)
Co-authored-by: toni.zamparetti <toni.zamparetti@scclouds.com.br>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-01-08 13:55:34 +01:00
John Bampton fd1c67f473
Standardize and auto add license headers to properties files (#12231) 2026-01-08 15:56:40 +05:30
John Bampton e47d7bc6ff
[CI] Dependabot: add a cooldown period for new releases (#12384) 2026-01-07 17:22:52 +01:00
Abhishek Kumar eedd32971f
Merge remote-tracking branch 'apache/4.22' 2026-01-07 13:11:55 +05:30
Abhishek Kumar 425c4e3312
Merge remote-tracking branch 'apache/4.20' into 4.22 2026-01-07 13:10:41 +05:30
Pearl Dsilva 750290b8ae
Prevent NPE when removing NIC from a stopped VM using service offering with CPU cap set (#12232)
This PR fixes: #12225

---------

Co-authored-by: Abhisar Sinha <63767682+abh1sar@users.noreply.github.com>
2026-01-07 11:39:15 +05:30
Manoj Kumar 57331aca2f
Skip removal of offerings if in use during domain removal (#11780)
This PR fixes #11502

    - Prevent service offering update to specific domains if any instance for the offering are outside of those
    - Removal of offerings is skipped if it is in use by any Instance.
2026-01-07 09:25:11 +05:30
dahn c465caf81e
Adjust close periods (#12376) 2026-01-06 12:47:37 +05:30
Suresh Kumar Anaparti 2d4b7ba357
Add mountopts to backup repository response (#12360) 2026-01-06 12:08:18 +05:30
Suresh Kumar Anaparti a29de0ed06
Retry cloneVM task when any file access issue while cloning from volume or template (#12335) 2026-01-05 16:30:39 +01:00
YoulongChen fca928d609
fix HMAC Signatures and API Keys Logged in Plaintext (#12021)
Co-authored-by: chenyoulong20g@ict.ac.cn <chenyoulong20g@ict.ac.cn>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2026-01-05 13:28:48 +01:00
Suresh Kumar Anaparti 4628385051
Merge branch '4.22' 2026-01-05 16:17:50 +05:30
Suresh Kumar Anaparti 959c5fff68
Merge branch '4.20' into 4.22 2026-01-05 15:57:26 +05:30
Abhishek Kumar cd55796972
webhook: fixes, filter enhancement (#12023)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2026-01-05 09:12:06 +01:00
Tonitzpp 81b991ae9c
Show volume UUIDs in the backup details page (#12156)
Co-authored-by: toni.zamparetti <toni.zamparetti@scclouds.com.br>
2026-01-05 09:07:19 +01:00
Manoj Kumar ca64406a88
replace momentjs with dayjs and use watch instead of update (#12351) 2026-01-05 08:19:03 +01:00
YoulongChen 77cb0827d3
Refactor XML parsing to use safer document builders in multiple classes (#12129)
Co-authored-by: chenyoulong20g@ict.ac.cn <chenyoulong20g@ict.ac.cn>
2026-01-05 07:58:34 +01:00
Suresh Kumar Anaparti 4f74937855
Event typo fix (#12350) 2026-01-02 14:04:59 +05:30
Rene Peinthor 10dcbd76f0
linstor: Provide /dev/drbd/by-res/ resource paths to CloudStack (#12300) 2025-12-31 10:55:54 +01:00
Pearl Dsilva 7ff76cb2d7
Protect upgrades from failures (#12319) 2025-12-30 21:46:04 +01:00
Pearl Dsilva 7a11bd2f98
CKS: Fix issue with scaling down CKS Nodes when deployed in HA mode (#12302) 2025-12-30 13:08:13 +01:00
Abhishek Kumar 5cb279b6f1
ui: fix test delivery params in create webhook form (#12318)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-12-30 11:07:32 +01:00
Tonitzpp 46cb805c90
Removal of internal ID in backup event descriptions (#12197) 2025-12-30 09:37:09 +01:00
Suresh Kumar Anaparti 40d21f093f
Merge branch '4.22' 2025-12-29 13:37:12 +05:30
Suresh Kumar Anaparti 6a2d91ed8a
Merge branch '4.20' into 4.22 2025-12-29 13:21:17 +05:30
Suresh Kumar Anaparti 56a39e6be7
Add 'dataDiskController' VM setting/detail for KVM hypervisor (#12334) 2025-12-28 11:20:45 +01:00
Abhishek Kumar 34b8870f59
systemvm-template: support on-demand download during setup and registration (#11656)
Bundling all hypervisor SystemVM templates in release packages simplifies installs but inflates build time and artifact size. This change enables downloading templates on demand when they’re not found after package installation. The download path is wired into both cloud-setup-management and the existing SystemVM template registration flow.

For connected or mirrored environments, a repository URL prefix can be provided to support air-gapped setups: pass --systemvm-templates-repository <URL-prefix> to cloud-setup-management, or set system.vm.templates.download.repository=<URL-prefix> in server.properties for post-setup registration.

If templates are already present (bundled or preseeded), behavior is unchanged and no download is attempted.

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-12-26 11:36:32 +05:30
Abhishek Kumar 432a3065bc
api: fix response annotation for createBackupSchedule (#11950)
Currently, `createBackupSchedule` API documentation wrongly specifies
BackupResponse as the API response.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-12-24 16:20:40 +01:00
argusb 5bf869c803
Replace deprecated 'egrep' commands with 'grep -E'. (#12306)
Co-authored-by: Sander Grendelman <sander.grendelman@axians.com>
2025-12-22 14:27:41 +01:00
Manoj Kumar e0c13cc3ec
Cleanup userconcentratedpod_random and userconcentratedpod_firstfit allocation algorithms (#12233)
* Cleanup userconcentratedpod_random and userconcentratedpod_firstfit allocation algorithm

* use firstfit instead of random for userconcentratedpod_firstfit
2025-12-22 14:25:33 +01:00
Daan Hoogland 22da57f922 Merge branch '4.22' 2025-12-22 14:13:50 +01:00
Daan Hoogland 55ab7c5589 Merge branch '4.20' into 4.22 2025-12-22 13:23:37 +01:00
vladimirpetrov b394b5ba74
Fix terms, typos and grammar mistakes in the API, error messages, events, etc. (#7857)
This PR aligns the use of terminology, renaming VM / virtual machine references to 'Instance' and also capitalising the terms Templates, Network, Snapshot, User, Account in CloudStack APIs, error and log messages, events, tooltips, etc. Many typos, grammar and spelling mistakes were fixed, also terms like IPv4, VPN, VPC, etc. were properly capitalised. Some error messages were cleaned for better readability. The test cases, expecting some exception strings were adjusted accordingly.

Here is the wiki page, describing the changes in details:
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Object+Naming+and+Title+Case+Convention

---------

Co-authored-by: Manoj Kumar <manojkr.itbhu@gmail.com>
Co-authored-by: Harikrishna <harikrishna.patnala@gmail.com>
2025-12-22 15:18:58 +05:30
Daan Hoogland e2d3773362 Merge release branch 4.22 to main
* 4.22:
  Update templateConfig.sh to not break with directorys with space on t… (#10898)
  Fix VM and volume metrics listing regressions (#12284)
  packaging: use latest cmk release link directly (#11429)
  api:rename RegisterCmd.java => RegisterUserKeyCmd.java (#12259)
  Prioritize copying templates from other secondary storages instead of downloading them (#10363)
  Show time correctly in the backup schedule UI  (#12012)
  kvm: use preallocation option for fat disk resize (#11986)
  Python exception processing static routes fixed (#11967)
  KVM memballooning requires free page reporting and autodeflate (#11932)
  api: create/register/upload template with empty template tag (#12234)
2025-12-22 10:29:24 +01:00
Daan Hoogland cee330e7c8 Merge branch '4.20' into 4.22 2025-12-22 10:27:57 +01:00
Vitor Hugo Homem Marzarotto 47a6ac89ba
Update templateConfig.sh to not break with directorys with space on t… (#10898)
Co-authored-by: Vitor Hugo Homem Marzarotto <vitor.marzarotto@scclouds.com.br>
Co-authored-by: Henrique Sato <henriquesato2003@gmail.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
2025-12-21 10:22:39 +01:00
Fabricio Duarte 061ce9b39b
Fix VM and volume metrics listing regressions (#12284) 2025-12-20 10:40:26 +01:00
Abhishek Kumar 79ab1566b1
packaging: use latest cmk release link directly (#11429)
Instead listing all GIthub releases first and finding the latest one use
the direct link for the latest Github release.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-12-19 20:41:00 +01:00
dependabot[bot] eb93f0105e
Bump com.zaxxer:HikariCP from 5.1.0 to 7.0.2 (#12266)
Bumps [com.zaxxer:HikariCP](https://github.com/brettwooldridge/HikariCP) from 5.1.0 to 7.0.2.
- [Changelog](https://github.com/brettwooldridge/HikariCP/blob/dev/CHANGES)
- [Commits](https://github.com/brettwooldridge/HikariCP/compare/HikariCP-5.1.0...HikariCP-7.0.2)

---
updated-dependencies:
- dependency-name: com.zaxxer:HikariCP
  dependency-version: 7.0.2
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-12-19 15:07:29 +05:30
K Viddya 558232e8e6
Feature s390x multiarch support (#12214)
Signed-off-by: Niyam Siwach <niyam@ibm.com>
Signed-off-by: Viddya K <viddya.k@ibm.com>
Co-authored-by: root <root@c32379v1.fyre.ibm.com>
2025-12-19 10:06:58 +01:00
Klaus de Freitas Dornsbach 13f805fbf3
Log4j2 refactor cloud api module (#8728) 2025-12-19 14:15:56 +05:30
Wei Zhou 8936e4c535
api:rename RegisterCmd.java => RegisterUserKeyCmd.java (#12259) 2025-12-18 11:53:00 +01:00
Phsm Qwerty bb5da0e49c
security groups: conntrack only if needed (#10594)
The conntrack is disabled if the security group allows all traffic.
Also, refactored the code a little.
2025-12-18 11:49:41 +01:00
dependabot[bot] 28820f6e25
Bump org.influxdb:influxdb-java from 2.22 to 2.25 (#12270)
Bumps [org.influxdb:influxdb-java](https://github.com/influxdata/influxdb-java) from 2.22 to 2.25.
- [Release notes](https://github.com/influxdata/influxdb-java/releases)
- [Changelog](https://github.com/influxdata/influxdb-java/blob/master/CHANGELOG.md)
- [Commits](https://github.com/influxdata/influxdb-java/compare/influxdb-java-2.22...influxdb-java-2.25)

---
updated-dependencies:
- dependency-name: org.influxdb:influxdb-java
  dependency-version: '2.25'
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-12-18 11:10:52 +01:00
dahn 91376c7994
cleanup LDAP code according to warnings (#11436)
Co-authored-by: Daan Hoogland <dahn@apache.org>
Co-authored-by: Pearl Dsilva <pearl1594@gmail.com>
2025-12-18 11:09:09 +01:00
John Bampton e21aacf5be
Bump `actions/cache` to `v5` (#12247) 2025-12-18 10:53:57 +01:00
Fabricio Duarte e8200a0b74
Prioritize copying templates from other secondary storages instead of downloading them (#10363)
* Prioritize copying templates from other secondary storages instead of downloading them

* Treat some corner cases
2025-12-18 15:23:27 +05:30
Abhisar Sinha e9900aba23
Show time correctly in the backup schedule UI (#12012) 2025-12-17 14:47:28 +01:00
dependabot[bot] 10d76d3384
Bump cs.aws.sdk.version from 1.12.439 to 1.12.795 (#12267) 2025-12-17 13:51:52 +01:00
Vishesh 2ac2e5ba33
Github Action: Add action to auto close issues/PRs after a certain time (#8667)
Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: Jonathan de Jong <jonathandejong02@gmail.com>
2025-12-17 13:10:17 +01:00
dahn 124fcde59c
unlink an ldap domain (#11962)
Co-authored-by: Daan Hoogland <dahn@apache.org>
Co-authored-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Suresh Kumar Anaparti <sureshkumar.anaparti@gmail.com>
2025-12-17 13:04:06 +01:00
Abhishek Kumar e08e66d66d
kvm: use preallocation option for fat disk resize (#11986)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-12-17 13:03:39 +01:00
Brad House de1b1d24c2
Python exception processing static routes fixed (#11967) 2025-12-16 20:07:22 +01:00
Brad House d5165183ea
KVM memballooning requires free page reporting and autodeflate (#11932) 2025-12-16 16:58:32 +01:00
Wei Zhou ba26d95ad7
api: create/register/upload template with empty template tag (#12234) 2025-12-16 15:48:06 +01:00
John Bampton 53a39d3ff7
.github: Move `dependabot.yml` to the correct directory (#12243)
The `dependabot.yml` configuration file should be placed in the `.github` directory at the root of your repository.

Dependabot will not work if the file is placed in any other directory

Minor file extension rename for standardization
2025-12-16 14:11:04 +01:00
Daan Hoogland f06ac512fa merge forward 4.22 to main 2025-12-16 11:50:58 +01:00
Daan Hoogland 7aba434dc4 merge forward 4.20 to 4.22 LTS 2025-12-16 11:19:04 +01:00
Abhishek Kumar da1c7cebf9
server: trim autoscale Windows VM hostname (#11327)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Wei Zhou <weizhou@apache.org>
2025-12-15 15:52:32 +01:00
Abhishek Kumar 39d0d62fdd
api,server: normalize string empty value on config update (#11770)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-12-15 15:43:00 +01:00
dahn f570e16836
.github: initial version of Code Owners (#12253)
* initial version of Code Owners

* Update .github/CODEOWNERS

---------

Co-authored-by: Daan Hoogland <dahn@apache.org>
Co-authored-by: John Bampton <jbampton@users.noreply.github.com>
2025-12-15 11:04:45 +01:00
John Bampton 1919dcfb7c
pre-commit trailing-whitespace cleanup LICENSE/NOTICE (#12242) 2025-12-15 10:09:11 +01:00
Suresh Kumar Anaparti 67217d4d2e
UI: Option to choose the isolation method when creating the public IP range (#12000) 2025-12-15 09:37:18 +01:00
dahn 494c56a499
check for active MSses before starting DB upgrade (#12140) 2025-12-12 15:09:35 +01:00
Pearl Dsilva 0a13fb27f5
Prevent scaling of cluster if count / resources exceed account resource limits (#12167) 2025-12-12 13:57:15 +01:00
Abhishek Kumar e1c48c3adc
server,ui: prevent role change for default accounts (#11761)
* server,ui: prevent role change for default accounts

Fixes #10931

Role for default accounts shouldn't be changed. Appropriate error should be returned by the server and UI should not present option for them.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>

* Update server/src/main/java/com/cloud/user/AccountManagerImpl.java

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-12-12 13:42:26 +01:00
John Bampton f417c6b0a1
yamllint use `extends: default` (#12066) 2025-12-11 17:59:45 +01:00
John Bampton 78f9e6584b
UI(vue) + extras: fix bugs/spelling and standardize (#12073) 2025-12-11 16:41:50 +01:00
dahn 79ebf6959e
refactor storapool automation (#11789)
Co-authored-by: Daan Hoogland <dahn@apache.org>
2025-12-11 09:04:23 +01:00
John Bampton cfe96026dc
Standardize and auto add license headers to all Vue files with pre-commit (#12081) 2025-12-10 16:21:41 +01:00
Vishesh 4348386970
Optimize drs plan generation (#12014) 2025-12-10 13:24:39 +01:00
Abhishek Kumar ba52db9b3e
ui: allow macaddress input for add nic to vm (#12145)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-12-09 15:20:01 +01:00
Manoj Kumar 951649c420
Support iprange while creating remote access vpn (#12063) 2025-12-09 11:56:16 +01:00
Pearl Dsilva 3c6484792d
UI: Create Account form to set proper domain and role based on route (#12200) 2025-12-09 10:56:04 +01:00
dahn 223fc2512c
Enhance NFS mount option check for empty response (#11839) 2025-12-09 10:51:42 +01:00
dahn 51910cd260
Add license information to dependabot.yaml
Added Apache License information to dependabot.yaml
2025-12-08 16:48:18 +01:00
dahn 5151f8dc6a
java dependabot file (#11409)
Co-authored-by: Daan Hoogland <dahn@apache.org>
2025-12-08 16:33:10 +01:00
dahn c81295439f
removed code in comments (#11145) 2025-12-08 16:31:48 +01:00
Lucas Martins 12f4321952
Changes error message when using invalid `endpoint.url` (#8603)
Co-authored-by: lucas.martins.scclouds <lucas.martins@scclouds.com.br>
Co-authored-by: Daniel Augusto Veronezi Salvador <38945620+GutoVeronezi@users.noreply.github.com>
Co-authored-by: erikbocks <erik.bock@outlook.com>
2025-12-08 09:41:56 +01:00
Suresh Kumar Anaparti b0d74fe00c
Merge branch '4.22' 2025-12-05 18:59:03 +05:30
Suresh Kumar Anaparti a0ba2aaf3f
Merge branch '4.20' into 4.22 2025-12-05 18:41:18 +05:30
Abhisar Sinha 4379666fb6
Proxmox Extension : Make settings such as storage, disk_size,... (#12174)
Make storage, disk-size and os-type configurable in the Proxmox extension

Doc PR: apache/cloudstack-documentation#601

---------

Co-authored-by: dahn <daan.hoogland@gmail.com>
2025-12-03 17:05:22 +05:30
Suresh Kumar Anaparti e4414d1c44
Fix agent wait before reconnect (#12153) 2025-12-03 11:19:47 +05:30
Abhishek Kumar 26009659f9
Merge remote-tracking branch 'apache/4.22' 2025-12-01 13:07:45 +05:30
Abhishek Kumar 2941b518ba
Merge remote-tracking branch 'apache/4.20' into 4.22 2025-12-01 13:05:08 +05:30
dahn f3a112fd9e
use upstream method for creating enums from strings (#12158)
Co-authored-by: Daan Hoogland <dahn@apache.org>
2025-12-01 08:33:14 +01:00
Abhishek Kumar 243f566a60
refactor: add null check for BroadcastDomainType retrievals (#11572)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-12-01 08:19:09 +01:00
Wei Zhou 516012a0b4
ceph: fix offline volume migration between ceph pools (#12103) 2025-11-28 15:44:00 +01:00
Abhishek Kumar 44119cf34f
ui: fix dsiple managementservermetricsresponse - agentcount (#12148)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-11-28 10:29:18 +01:00
John Bampton db6147060b
Rename PRE-COMMIT.md to PRE_COMMIT.md and fix link (#12157) 2025-11-28 10:01:38 +01:00
Abhishek Kumar f379d78963
ui: fix section search filter (#12146)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-11-28 09:29:10 +01:00
Harikrishna 5798fb43a3
Fix upgrade files (#12155) 2025-11-27 15:56:26 +01:00
Daan Hoogland 4e61ddd1bc import 2025-11-26 13:01:52 +01:00
Daan Hoogland 9032fe3fb5 merge LTS branch 4.22 into main 2025-11-26 11:55:50 +01:00
Daan Hoogland e23c7ef701 Merge release branch 4.20 to 4.22
* 4.20:
  fixed Password Exposure in IPMI Tool Command Execution (#12028)
  server: fix volume offering not updated after offering change (#12003)
  fix API Request Parameters Logged Credential Masking in ApiServer (#12020)
2025-11-26 11:31:27 +01:00
Abhisar Sinha e33f4754f5
Fix DB upgrade script for 4.22 (#12111) 2025-11-26 09:25:41 +01:00
Abhishek Kumar 9ec8cc4186
api,server,ui: improve listing public ip for associate (#11591)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-11-26 09:24:12 +01:00
João Jandre 8171d9568c
Block use of internal and external snapshots on KVM (#11039) 2025-11-24 11:39:19 +01:00
Wei Zhou dba889ea3e
UI: fix list of zones if zone has icon (#12083) 2025-11-24 11:10:43 +01:00
John Bampton 6dc259c7da
Rename and standardize issue templates to `.yml` (#12082) 2025-11-14 21:22:12 +01:00
John Bampton 39126a4339
Standardize and auto add license headers for Shell files with pre-commit (#12070)
* Add shebang to shell scripts
2025-11-14 14:23:41 +01:00
John Bampton aa18188d30
pre-commit: auto add license headers for all YAML files (#12069)
Fix and standardize one license header
2025-11-14 14:23:03 +01:00
John Bampton 4ed86a2627
pre-commit upgrade codespell; fix spelling; (#10144) 2025-11-14 14:17:10 +01:00
John Bampton 86ae1fee7f
Standardize and auto add license headers for SQL files with pre-commit (#12071) 2025-11-14 11:47:27 +01:00
Abhishek Kumar 21d844ba1c
ui: fix zone options for image instance deploy button (#12060)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-11-14 10:43:42 +01:00
John Bampton ac3b18095a
pre-commit use colored text in the CI for `pass / fail / skipped` (#11977) 2025-11-13 15:59:07 +05:30
John Bampton fff4cafdca
ui(locales): remove duplicates and fix typos (#11872) 2025-11-13 11:17:02 +01:00
John Bampton a5b455ff3a
pre-commit: auto add table of contents with `doctoc` (#11679)
https://github.com/thlorenz/doctoc?tab=readme-ov-file#usage-as-a-git-hook
https://github.com/thlorenz/doctoc/releases/tag/v2.2.0

Generates table of contents for Markdown files inside local git repository.

Links are compatible with anchors generated by github or other sites.

Added TOC to 3 Markdown files.

Never have to create a TOC again just run: `pre-commit run doctoc --all-files`

- CONTRIBUTING.md
- INSTALL.md
- README.md

So both Apache Airflow and Apache Sedona use `doctoc`:

eb4a8bc03c/.pre-commit-config.yaml (L32)
b0d86fda01/.pre-commit-config.yaml (L34)
2025-11-13 11:13:19 +01:00
John Bampton 8b034dc439
chore: rename workflow `linter.yml` to `pre-commit.yml` (#11647) 2025-11-13 15:22:49 +05:30
YoulongChen 028dd86945
fixed Password Exposure in IPMI Tool Command Execution (#12028) 2025-11-13 13:40:36 +05:30
Abhishek Kumar dc8f465527
engine-schema: upgrade path for 4.23.0 (#12048)
Adds a 4.22.0 to 4.23.0 upgrade path.

Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-11-13 08:51:08 +01:00
dahn e90e31d386
add isPerson check to query for AD (#11843) 2025-11-12 16:09:28 +01:00
Madhukar Mishra f985a67f4d
Fixes:#7837: Add isolationMethods and vlan to TrafficTypeResponse (#8151)
Co-authored-by: dahn <daan.hoogland@gmail.com>
Co-authored-by: dahn <daan@onecht.net>
2025-11-12 15:49:52 +01:00
dahn 5f9e131198
Svgs (#12051) 2025-11-12 14:31:36 +05:30
Abhishek Kumar f0a0936675
server: fix volume offering not updated after offering change (#12003)
Signed-off-by: Abhishek Kumar <abhishek.mrt22@gmail.com>
2025-11-12 09:51:51 +01:00
Abhisar Sinha 671d8ad704
Track volume usage data at a vm granularity as well (#11531)
Co-authored-by: Vishesh <8760112+vishesh92@users.noreply.github.com>
2025-11-12 09:32:01 +01:00
YoulongChen 81787b310e
fix API Request Parameters Logged Credential Masking in ApiServer (#12020) 2025-11-12 13:06:19 +05:30
Erik Böck 23fb0e2ccb
Update GUI Kubernetes logo (#11895) 2025-11-11 18:13:00 +01:00
Davi Torres 40c8bc528d
Keeping consistency with other error messages. (#11649)
Co-authored-by: Davi Torres <dtorres@simnet.ca>
Co-authored-by: dahn <daan.hoogland@gmail.com>
2025-11-11 15:33:07 +01:00
Pearl Dsilva 15439ede7d
UI: Update and reset domain level configuration (#11571) 2025-11-11 09:29:54 +01:00
Wei Zhou 50fe265017
Merge remote-tracking branch 'apache/4.20' into 4.22 2025-11-07 17:19:53 +01:00
Wei Zhou d26122bf22
Veeam: use pre-defined object mapper (#10715) 2025-11-07 16:13:10 +01:00
Suresh Kumar Anaparti 2dd1e6d786
Enable UEFI on KVM hosts (by default), and configure with some default settings (#11740) 2025-11-07 14:54:02 +01:00
Phsm Qwerty 8c86f24261
enhancement: add instance info as Libvirt metadata (#11061) 2025-11-07 14:31:34 +01:00
Wei Zhou 2954e96947
Veeam: get templateId from vm instance if vm is created from ISO (#10705) 2025-11-07 11:55:27 +01:00
Manoj Kumar c5c3cc40c1
consider Instance in Starting state for listPodsByUserConcentration (#11845) 2025-11-07 10:43:46 +01:00
Suresh Kumar Anaparti 9c0efb7072
DB setup: support db schema creation (with --schema-only) without force recreate option (#12004) 2025-11-07 09:37:11 +01:00
Suresh Kumar Anaparti b8ec941ec1
uefi property typo (#11929) 2025-11-07 09:31:11 +01:00
Wei Zhou 8230f04a79
CKS: update cloud.kubernetes.cluster.network.offering to dynamic (#11847) 2025-11-06 11:13:53 +01:00
Pearl Dsilva a50de029bf
Add empty Provider value in Network/VPC Offering form (#11982) 2025-11-06 11:09:00 +01:00
Suresh Kumar Anaparti 81b2c38be9
Merge branch '4.22' 2025-11-06 14:41:59 +05:30
Suresh Kumar Anaparti ac8c200790
merge fix 2025-11-06 14:41:27 +05:30
Suresh Kumar Anaparti 5504b053e4
Merge branch '4.20' into 4.22 2025-11-06 14:37:38 +05:30
Harikrishna Patnala dbda673e1f Updating pom.xml version numbers for release 4.23.0.0-SNAPSHOT
Signed-off-by: Harikrishna Patnala <harikrishna.patnala@gmail.com>
2025-11-05 16:54:39 +05:30
Harikrishna Patnala e66926e6a4 Merge branch '4.22' 2025-11-05 16:52:20 +05:30
Harikrishna Patnala d160731b9f Updating pom.xml version numbers for release 4.22.1.0-SNAPSHOT
Signed-off-by: Harikrishna Patnala <harikrishna.patnala@gmail.com>
2025-11-05 16:07:07 +05:30
Wei Zhou 15c2e50338
UI: fix typo Upload SSL certificate (#11869) 2025-11-03 15:36:52 +01:00
Wei Zhou d53b6dbda4
api/test: fix storage pool update with only id (#11897) 2025-11-03 15:25:09 +01:00
Suresh Kumar Anaparti e90e436ef8
UI: Enable listall (for Affinity Groups, SSH Keypairs, User Data) in deploy instance wizard for admin, and lists SSH Keypairs, User Data by domain/account (#11906) 2025-10-29 11:18:32 +01:00
2599 changed files with 77342 additions and 23725 deletions

View File

@ -50,16 +50,11 @@ github:
rebase: false rebase: false
collaborators: collaborators:
- acs-robot - ingox
- gpordeus - gpordeus
- hsato03
- FelipeM525
- lucas-a-martins
- nicoschmdt
- abh1sar
- rosi-shapeblue
- sudo87
- erikbocks - erikbocks
- Imvedansh
- Damans227
protected_branches: ~ protected_branches: ~

20
.codespellrc Normal file
View File

@ -0,0 +1,20 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
[codespell]
ignore-words = .github/linters/codespell.txt
skip = systemvm/agent/noVNC/*,ui/package.json,ui/package-lock.json,ui/public/js/less.min.js,ui/public/locales/*.json,server/src/test/java/org/apache/cloudstack/network/ssl/CertServiceTest.java,test/integration/smoke/test_ssl_offloading.py

1
.gitattributes vendored Normal file
View File

@ -0,0 +1 @@
.github/workflows/*.lock.yml linguist-generated=true merge=ours

25
.github/CODEOWNERS vendored Normal file
View File

@ -0,0 +1,25 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
/plugins/storage/volume/linstor @rp-
/plugins/storage/volume/storpool @slavkap
/plugins/storage/volume/ontap @rajiv1 @sandeeplocharla @piyush5 @suryag
.pre-commit-config.yaml @jbampton
/.github/linters/ @jbampton
/plugins/network-elements/nsx/ @Pearl1594 @nvazquez

5
.github/aw/imports/.gitattributes generated vendored Normal file
View File

@ -0,0 +1,5 @@
# Mark all cached import files as generated
* linguist-generated=true
# Use 'ours' merge strategy to keep local cached versions
* merge=ours

View File

@ -0,0 +1,73 @@
---
# Report formatting guidelines
---
## Report Structure Guidelines
### 1. Header Levels
**Use h3 (###) or lower for all headers in your issue report to maintain proper document hierarchy.**
When creating GitHub issues or discussions:
- Use `###` (h3) for main sections (e.g., "### Test Summary")
- Use `####` (h4) for subsections (e.g., "#### Device-Specific Results")
- Never use `##` (h2) or `#` (h1) in reports - these are reserved for titles
### 2. Progressive Disclosure
**Wrap detailed test results in `<details><summary><b>Section Name</b></summary>` tags to improve readability and reduce scrolling.**
Use collapsible sections for:
- Verbose details (full test logs, raw data)
- Secondary information (minor warnings, extra context)
- Per-item breakdowns when there are many items
Always keep critical information visible (summary, critical issues, key metrics).
### 3. Report Structure Pattern
1. **Overview**: 1-2 paragraphs summarizing key findings
2. **Critical Information**: Show immediately (summary stats, critical issues)
3. **Details**: Use `<details><summary><b>Section Name</b></summary>` for expanded content
4. **Context**: Add helpful metadata (workflow run, date, trigger)
### Design Principles (Airbnb-Inspired)
Reports should:
- **Build trust through clarity**: Most important info immediately visible
- **Exceed expectations**: Add helpful context like trends, comparisons
- **Create delight**: Use progressive disclosure to reduce overwhelm
- **Maintain consistency**: Follow patterns across all reports
### Example Report Structure
```markdown
### Summary
- Key metric 1: value
- Key metric 2: value
- Status: ✅/⚠️/❌
### Critical Issues
[Always visible - these are important]
<details>
<summary><b>View Detailed Results</b></summary>
[Comprehensive details, logs, traces]
</details>
<details>
<summary><b>View All Warnings</b></summary>
[Minor issues and potential problems]
</details>
### Recommendations
[Actionable next steps - keep visible]
```
## Workflow Run References
- Format run IDs as links: `[§12345](https://github.com/owner/repo/actions/runs/12345)`
- Include up to 3 most relevant run URLs at end under `**References:**`
- Do NOT add footer attribution (system adds automatically)

41
.github/dependabot.yml vendored Normal file
View File

@ -0,0 +1,41 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
open-pull-requests-limit: 2
schedule:
interval: "weekly"
groups:
github-actions-dependencies:
patterns:
- "*"
cooldown:
default-days: 7
- package-ecosystem: "maven"
directory: "/"
schedule:
interval: "daily"
cooldown:
default-days: 7

View File

@ -15,13 +15,14 @@
# specific language governing permissions and limitations # specific language governing permissions and limitations
# under the License. # under the License.
--- ---
extends: relaxed extends: default
rules: rules:
line-length: line-length:
max: 400 # Very forgiving for GitHub Actions and infrastructure files max: 400 # Very forgiving for GitHub Actions and infrastructure files
indentation: disable # Disable indentation checking for existing files indentation: disable # Disable indentation checking for existing files
comments: disable # Disable comment formatting checks comments: disable # Disable comment formatting checks
braces: disable
brackets: disable # Disable bracket spacing checks brackets: disable # Disable bracket spacing checks
colons: colons:
max-spaces-after: -1 # Allow any number of spaces after colon max-spaces-after: -1 # Allow any number of spaces after colon

View File

@ -4,6 +4,7 @@ acount
actuall actuall
acuiring acuiring
acumulate acumulate
addin
addreess addreess
addtion addtion
adminstrator adminstrator
@ -12,10 +13,8 @@ afrer
afterall afterall
againt againt
ags ags
aktive
algoritm algoritm
allo allo
alloacate
allocted allocted
alocation alocation
alogrithm alogrithm
@ -65,6 +64,7 @@ bject
boardcast boardcast
bootstraper bootstraper
bu bu
callin
cant cant
capabilites capabilites
capablity capablity
@ -73,6 +73,7 @@ carrefully
cavaet cavaet
chaing chaing
checkd checkd
checkin
childs childs
choosen choosen
chould chould
@ -93,7 +94,6 @@ confg
configruation configruation
configuable configuable
conneciton conneciton
connexion
constrait constrait
constraits constraits
containg containg
@ -101,9 +101,7 @@ contex
continuesly continuesly
contro contro
controler controler
controles
controll controll
convienient
convinience convinience
coputer coputer
correcponding correcponding
@ -158,13 +156,13 @@ differnet
differnt differnt
direcotry direcotry
directroy directroy
disale
disbale disbale
discrepency discrepency
disover disover
dissapper dissapper
dissassociated dissassociated
divice divice
dockin
doesn' doesn'
doesnot doesnot
doesnt doesnt
@ -175,7 +173,6 @@ eanbled
earch earch
ect ect
elemnt elemnt
eles
elments elments
emmited emmited
enble enble
@ -187,22 +184,19 @@ environmnet
equivalant equivalant
erro erro
erronous erronous
everthing
everytime everytime
excute excute
execept execept
execption execption
exects
execut execut
executeable executeable
exeeded exeeded
exisitng exisitng
exisits exisits
existin
existsing existsing
exitting
expcted expcted
expection expection
explaination
explicitely explicitely
faield faield
faild faild
@ -215,7 +209,6 @@ fillled
findout findout
fisrt fisrt
fo fo
folowing
fowarding fowarding
frist frist
fro fro
@ -234,6 +227,7 @@ hanling
happend happend
hasing hasing
hasnt hasnt
havin
hda hda
hostanme hostanme
hould hould
@ -253,20 +247,14 @@ implmeneted
implmentation implmentation
incase incase
includeing includeing
incosistency
indecates indecates
indien
infor infor
informations informations
informaton informaton
infrastrcuture
ingore ingore
inital
initalize initalize
initator initator
initilization
inspite inspite
instace
instal instal
instnace instnace
intefaces intefaces
@ -284,12 +272,8 @@ ist
klunky klunky
lable lable
leve leve
lief
limite limite
linke
listner listner
lokal
lokales
maintainence maintainence
maintenace maintenace
maintenence maintenence
@ -298,7 +282,6 @@ mambers
manaully manaully
manuel manuel
maxium maxium
mehtod
mergable mergable
mesage mesage
messge messge
@ -308,7 +291,6 @@ minumum
mis mis
modifers modifers
mor mor
mot
mulitply mulitply
multipl multipl
multple multple
@ -322,7 +304,7 @@ nin
nodel nodel
nome nome
noone noone
nowe notin
numbe numbe
numer numer
occured occured
@ -390,12 +372,9 @@ remaning
remore remore
remvoing remvoing
renabling renabling
repeatly
reponse reponse
reqest reqest
reqiured reqiured
requieres
requried
reserv reserv
reserverd reserverd
reseted reseted
@ -414,14 +393,13 @@ retuned
returing returing
rever rever
rocessor rocessor
roperty
runing runing
runnign runnign
sate sate
scalled scalled
scipt
scirpt scirpt
scrip scrip
seconadry
seconday seconday
seesion seesion
sepcified sepcified
@ -434,12 +412,10 @@ settig
sevices sevices
shoul shoul
shoule shoule
sie
signle signle
simplier simplier
singature singature
skiping skiping
snaphsot
snpashot snpashot
specied specied
specifed specifed
@ -450,7 +426,6 @@ standy
statics statics
stickyness stickyness
stil stil
stip
storeage storeage
strat strat
streched streched
@ -459,7 +434,6 @@ succesfull
successfull successfull
suceessful suceessful
suces suces
sucessfully
suiteable suiteable
suppots suppots
suppport suppport
@ -492,7 +466,6 @@ uncompressible
uneccessarily uneccessarily
unexepected unexepected
unexpect unexpect
unknow
unkonw unkonw
unkown unkown
unneccessary unneccessary
@ -500,14 +473,12 @@ unparseable
unrecoginized unrecoginized
unsupport unsupport
unxpected unxpected
updat
uptodate uptodate
usera usera
usign usign
usin usin
utlization utlization
vaidate vaidate
valiate
valule valule
valus valus
varibles varibles
@ -516,8 +487,6 @@ verfying
verifing verifing
virutal virutal
visable visable
wakup
wil wil
wit wit
wll
wth wth

View File

@ -30,7 +30,7 @@ jobs:
build: build:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v6
- name: Set up JDK 17 - name: Set up JDK 17
uses: actions/setup-java@v5 uses: actions/setup-java@v5

View File

@ -146,6 +146,7 @@ jobs:
smoke/test_vm_snapshot_kvm smoke/test_vm_snapshot_kvm
smoke/test_vm_snapshots smoke/test_vm_snapshots
smoke/test_volumes smoke/test_volumes
smoke/test_vpc_conserve_mode
smoke/test_vpc_ipv6 smoke/test_vpc_ipv6
smoke/test_vpc_redundant smoke/test_vpc_redundant
smoke/test_vpc_router_nics smoke/test_vpc_router_nics
@ -216,7 +217,7 @@ jobs:
smoke/test_list_volumes"] smoke/test_list_volumes"]
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
@ -340,7 +341,7 @@ jobs:
echo -e "Simulator CI Test Results: (only failures listed)\n" echo -e "Simulator CI Test Results: (only failures listed)\n"
python3 ./tools/marvin/xunit-reader.py integration-test-results/ python3 ./tools/marvin/xunit-reader.py integration-test-results/
- uses: codecov/codecov-action@v4 - uses: codecov/codecov-action@v6
with: with:
files: jacoco-coverage.xml files: jacoco-coverage.xml
fail_ci_if_error: true fail_ci_if_error: true

View File

@ -32,7 +32,7 @@ jobs:
name: codecov name: codecov
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
@ -49,7 +49,7 @@ jobs:
cd nonoss && bash -x install-non-oss.sh && cd .. cd nonoss && bash -x install-non-oss.sh && cd ..
mvn -P quality -Dsimulator -Dnoredist clean install -T$(nproc) mvn -P quality -Dsimulator -Dnoredist clean install -T$(nproc)
- uses: codecov/codecov-action@v4 - uses: codecov/codecov-action@v6
with: with:
files: ./client/target/site/jacoco-aggregate/jacoco.xml files: ./client/target/site/jacoco-aggregate/jacoco.xml
fail_ci_if_error: true fail_ci_if_error: true

View File

@ -35,14 +35,14 @@ jobs:
language: ["actions"] language: ["actions"]
steps: steps:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v5 uses: actions/checkout@v6
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@v3 uses: github/codeql-action/init@v4
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
- name: Autobuild - name: Autobuild
uses: github/codeql-action/autobuild@v3 uses: github/codeql-action/autobuild@v4
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3 uses: github/codeql-action/analyze@v4
with: with:
category: "Security" category: "Security"

1022
.github/workflows/daily-repo-status.lock.yml generated vendored Normal file

File diff suppressed because it is too large Load Diff

54
.github/workflows/daily-repo-status.md vendored Normal file
View File

@ -0,0 +1,54 @@
---
description: |
This workflow creates daily repo status reports. It gathers recent repository
activity (issues, PRs, discussions, releases, code changes) and generates
engaging GitHub issues with productivity insights, community highlights,
and project recommendations.
on:
schedule: daily
workflow_dispatch:
permissions:
contents: read
issues: read
pull-requests: read
network: defaults
tools:
github:
# If in a public repo, setting `lockdown: false` allows
# reading issues, pull requests and comments from 3rd-parties
# If in a private repo this has no particular effect.
lockdown: false
safe-outputs:
create-issue:
title-prefix: "[repo-status] "
labels: [report, daily-status]
source: githubnext/agentics/workflows/daily-repo-status.md@d19056381ba48cb1f7c78510c23069701fa7ae87
---
# Daily Repo Status
Create an upbeat daily status report for the repo as a GitHub issue.
## What to include
- Recent repository activity (issues, PRs, discussions, releases, code changes)
- Progress tracking, goal reminders and highlights
- Project status and recommendations
- Actionable next steps for maintainers
## Style
- Be positive, encouraging, and helpful 🌟
- Use emojis moderately for engagement
- Keep it concise - adjust length based on actual activity
## Process
1. Gather recent activity from the repository
2. Study the repository, its issues and its pull requests
3. Create a new GitHub issue with your findings and insights

View File

@ -38,7 +38,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Login to Docker Registry - name: Login to Docker Registry
uses: docker/login-action@v2 uses: docker/login-action@v4
with: with:
registry: ${{ secrets.DOCKER_REGISTRY }} registry: ${{ secrets.DOCKER_REGISTRY }}
username: ${{ secrets.DOCKERHUB_USER }} username: ${{ secrets.DOCKERHUB_USER }}
@ -47,7 +47,7 @@ jobs:
- name: Set Docker repository name - name: Set Docker repository name
run: echo "DOCKER_REPOSITORY=apache" >> $GITHUB_ENV run: echo "DOCKER_REPOSITORY=apache" >> $GITHUB_ENV
- uses: actions/checkout@v5 - uses: actions/checkout@v6
- name: Set ACS version - name: Set ACS version
run: echo "ACS_VERSION=$(grep '<version>' pom.xml | head -2 | tail -1 | cut -d'>' -f2 |cut -d'<' -f1)" >> $GITHUB_ENV run: echo "ACS_VERSION=$(grep '<version>' pom.xml | head -2 | tail -1 | cut -d'>' -f2 |cut -d'<' -f1)" >> $GITHUB_ENV

1016
.github/workflows/issue-triage-agent.lock.yml generated vendored Normal file

File diff suppressed because it is too large Load Diff

78
.github/workflows/issue-triage-agent.md vendored Normal file
View File

@ -0,0 +1,78 @@
---
on:
schedule: 0 14 * * 1-5
workflow_dispatch: null
permissions:
issues: read
imports:
- github/gh-aw/.github/workflows/shared/reporting.md@94662b1dee8ce96c876ba9f33b3ab8be32de82a4
safe-outputs:
add-comment: {}
add-labels:
allowed:
- bug
- feature
- enhancement
- documentation
- question
- help-wanted
- good-first-issue
source: github/gh-aw/.github/workflows/issue-triage-agent.md@94662b1dee8ce96c876ba9f33b3ab8be32de82a4
strict: true
timeout-minutes: 5
tools:
github:
toolsets:
- issues
- labels
---
# Issue Triage Agent
List open issues in ${{ github.repository }} that have no labels. For each unlabeled issue, analyze the title and body, then add one of the allowed labels: `bug`, `feature`, `enhancement`, `documentation`, `question`, `help-wanted`, or `good-first-issue`.
Skip issues that:
- Already have any of these labels
- Have been assigned to any user (especially non-bot users)
After adding the label to an issue, mention the issue author in a comment using this format (follow shared/reporting.md guidelines):
**Comment Template**:
```markdown
### 🏷️ Issue Triaged
Hi @{author}! I've categorized this issue as **{label_name}** based on the following analysis:
**Reasoning**: {brief_explanation_of_why_this_label}
<details>
<summary><b>View Triage Details</b></summary>
#### Analysis
- **Keywords detected**: {list_of_keywords_that_matched}
- **Issue type indicators**: {what_made_this_fit_the_category}
- **Confidence**: {High/Medium/Low}
#### Recommended Next Steps
- {context_specific_suggestion_1}
- {context_specific_suggestion_2}
</details>
**References**: [Triage run §{run_id}](https://github.com/github/gh-aw/actions/runs/{run_id})
```
**Key formatting requirements**:
- Use h3 (###) for the main heading
- Keep reasoning visible for quick understanding
- Wrap detailed analysis in `<details>` tags
- Include workflow run reference
- Keep total comment concise (collapsed details prevent noise)
## Batch Comment Optimization
For efficiency, if multiple issues are triaged in a single run:
1. Add individual labels to each issue
2. Add a brief comment to each issue (using the template above)
3. Optionally: Create a discussion summarizing all triage actions for that run
This provides both per-issue context and batch visibility.

View File

@ -32,7 +32,7 @@ jobs:
name: Main Sonar JaCoCo Build name: Main Sonar JaCoCo Build
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v6
with: with:
fetch-depth: 0 fetch-depth: 0
@ -44,14 +44,14 @@ jobs:
cache: 'maven' cache: 'maven'
- name: Cache SonarCloud packages - name: Cache SonarCloud packages
uses: actions/cache@v4 uses: actions/cache@v5
with: with:
path: ~/.sonar/cache path: ~/.sonar/cache
key: ${{ runner.os }}-sonar key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar
- name: Cache local Maven repository - name: Cache local Maven repository
uses: actions/cache@v4 uses: actions/cache@v5
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml', '*/pom.xml', '*/*/pom.xml', '*/*/*/pom.xml') }} key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml', '*/pom.xml', '*/*/pom.xml', '*/*/*/pom.xml') }}

View File

@ -18,8 +18,8 @@
name: "PR Merge Conflict Check" name: "PR Merge Conflict Check"
on: on:
push: push:
pull_request_target: pull_request:
types: [synchronize] types: [opened, synchronize, reopened]
permissions: # added using https://github.com/step-security/secure-workflows permissions: # added using https://github.com/step-security/secure-workflows
contents: read contents: read
@ -35,7 +35,7 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Conflict Check - name: Conflict Check
uses: eps1lon/actions-label-merge-conflict@v2.0.0 uses: eps1lon/actions-label-merge-conflict@v3.0.3
with: with:
repoToken: "${{ secrets.GITHUB_TOKEN }}" repoToken: "${{ secrets.GITHUB_TOKEN }}"
dirtyLabel: "status:has-conflicts" dirtyLabel: "status:has-conflicts"

View File

@ -32,18 +32,18 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- name: Check Out - name: Check Out
uses: actions/checkout@v5 uses: actions/checkout@v6
- name: Install - name: Install
run: | run: |
python -m pip install --upgrade pip python -m pip install --upgrade pip
pip install pre-commit pip install pre-commit
- name: Set PY - name: Set PY
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
- uses: actions/cache@v4 - uses: actions/cache@v5
with: with:
path: ~/.cache/pre-commit path: ~/.cache/pre-commit
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }} key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
- name: Run pre-commit - name: Run pre-commit
run: pre-commit run --all-files run: pre-commit run --color=always --all-files
- name: Run manual pre-commit hooks - name: Run manual pre-commit hooks
run: pre-commit run --all-files --hook-stage manual run: pre-commit run --color=always --all-files --hook-stage manual

View File

@ -30,7 +30,7 @@ jobs:
build: build:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v6
- name: Set up JDK 17 - name: Set up JDK 17
uses: actions/setup-java@v5 uses: actions/setup-java@v5
with: with:

View File

@ -33,7 +33,7 @@ jobs:
name: Sonar JaCoCo Coverage name: Sonar JaCoCo Coverage
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v6
with: with:
ref: "refs/pull/${{ github.event.number }}/merge" ref: "refs/pull/${{ github.event.number }}/merge"
fetch-depth: 0 fetch-depth: 0
@ -46,14 +46,14 @@ jobs:
cache: 'maven' cache: 'maven'
- name: Cache SonarCloud packages - name: Cache SonarCloud packages
uses: actions/cache@v4 uses: actions/cache@v5
with: with:
path: ~/.sonar/cache path: ~/.sonar/cache
key: ${{ runner.os }}-sonar key: ${{ runner.os }}-sonar
restore-keys: ${{ runner.os }}-sonar restore-keys: ${{ runner.os }}-sonar
- name: Cache local Maven repository - name: Cache local Maven repository
uses: actions/cache@v4 uses: actions/cache@v5
with: with:
path: ~/.m2/repository path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml', '*/pom.xml', '*/*/pom.xml', '*/*/*/pom.xml') }} key: ${{ runner.os }}-m2-${{ hashFiles('pom.xml', '*/pom.xml', '*/*/pom.xml', '*/*/*/pom.xml') }}

49
.github/workflows/stale.yml vendored Normal file
View File

@ -0,0 +1,49 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
name: 'Close stale issues and PRs'
on:
schedule:
- cron: '30 1 * * *'
jobs:
stale:
runs-on: ubuntu-latest
permissions:
actions: write
issues: write
pull-requests: write
steps:
- uses: actions/stale@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'
- uses: actions/stale@v10
with:
stale-issue-label: 'archive'
days-before-stale: 240
exempt-issue-labels: 'gsoc,good-first-issue,long-term-plan'
days-before-close: -1

View File

@ -31,10 +31,10 @@ jobs:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
steps: steps:
- uses: actions/checkout@v5 - uses: actions/checkout@v6
- name: Set up Node - name: Set up Node
uses: actions/setup-node@v5 uses: actions/setup-node@v6
with: with:
node-version: 16 node-version: 16
@ -55,7 +55,7 @@ jobs:
npm run lint npm run lint
npm run test:unit npm run test:unit
- uses: codecov/codecov-action@v4 - uses: codecov/codecov-action@v6
if: github.repository == 'apache/cloudstack' if: github.repository == 'apache/cloudstack'
with: with:
working-directory: ui working-directory: ui

View File

@ -25,6 +25,12 @@ repos:
hooks: hooks:
- id: identity - id: identity
- id: check-hooks-apply - id: check-hooks-apply
- repo: https://github.com/thlorenz/doctoc.git
rev: v2.2.0
hooks:
- id: doctoc
name: Add TOC for Markdown files
files: ^CONTRIBUTING\.md$|^INSTALL\.md$|^README\.md$
- repo: https://github.com/oxipng/oxipng - repo: https://github.com/oxipng/oxipng
rev: v9.1.5 rev: v9.1.5
hooks: hooks:
@ -41,6 +47,21 @@ repos:
- repo: https://github.com/Lucas-C/pre-commit-hooks - repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5 rev: v1.5.5
hooks: hooks:
- id: chmod
name: set file permissions
args: ['644']
files: \.md$
stages: [manual]
- id: insert-license
name: add license for all cfg files
description: automatically adds a licence header to all cfg files that don't have a license header
files: \.cfg$
args:
- --comment-style
- '|#|'
- --license-filepath
- .github/workflows/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license - id: insert-license
name: add license for all Markdown files name: add license for all Markdown files
files: \.md$ files: \.md$
@ -50,7 +71,56 @@ repos:
- --license-filepath - --license-filepath
- .github/workflows/license-templates/LICENSE.txt - .github/workflows/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo - --fuzzy-match-generates-todo
exclude: ^(CHANGES|ISSUE_TEMPLATE|PULL_REQUEST_TEMPLATE)\.md$|^ui/docs/(full|smoke)-test-plan\.template\.md$ exclude: ^(CHANGES|ISSUE_TEMPLATE|PULL_REQUEST_TEMPLATE)\.md$|^ui/docs/(full|smoke)-test-plan\.template\.md$|^\.github/workflows/.*\.md$|^\.github/aw/.*\.md$
- id: insert-license
name: add license for all properties files
description: automatically adds a licence header to all properties files that don't have a license header
files: \.properties$
args:
- --comment-style
- '|#|'
- --license-filepath
- .github/workflows/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: add license for all Shell files
description: automatically adds a licence header to all Shell files that don't have a license header
files: \.sh$
args:
- --comment-style
- '|#|'
- --license-filepath
- .github/workflows/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: add license for all SQL files
files: \.sql$
args:
- --comment-style
- '|--|'
- --license-filepath
- .github/workflows/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: add license for all Vue files
files: \.vue$
args:
- --comment-style
- '|//|'
- --license-filepath
- .github/workflows/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
- id: insert-license
name: add license for all YAML files
description: automatically adds a licence header to all YAML files that don't have a license header
files: \.ya?ml$
args:
- --comment-style
- '|#|'
- --license-filepath
- .github/workflows/license-templates/LICENSE.txt
- --fuzzy-match-generates-todo
exclude: ^\.github/workflows/.*\.lock\.yml$
- repo: https://github.com/pre-commit/pre-commit-hooks - repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0 rev: v6.0.0
hooks: hooks:
@ -84,7 +154,7 @@ repos:
^systemvm/agent/certs/realhostip\.key$| ^systemvm/agent/certs/realhostip\.key$|
^test/integration/smoke/test_ssl_offloading\.py$ ^test/integration/smoke/test_ssl_offloading\.py$
- id: end-of-file-fixer - id: end-of-file-fixer
exclude: \.vhd$ exclude: \.vhd$|\.svg$
- id: file-contents-sorter - id: file-contents-sorter
args: [--unique] args: [--unique]
files: ^\.github/linters/codespell\.txt$ files: ^\.github/linters/codespell\.txt$
@ -92,17 +162,15 @@ repos:
- id: forbid-submodules - id: forbid-submodules
- id: mixed-line-ending - id: mixed-line-ending
- id: trailing-whitespace - id: trailing-whitespace
files: \.(bat|cfg|cs|css|gitignore|header|in|install|java|md|properties|py|rb|rc|sh|sql|te|template|txt|ucls|vue|xml|xsl|yaml|yml)$|^cloud-cli/bindir/cloud-tool$|^debian/changelog$ files: ^(LICENSE|NOTICE)$|README$|\.(bat|cfg|config|cs|css|erb|gitignore|header|in|install|java|md|properties|py|rb|rc|sh|sql|svg|te|template|txt|ucls|vue|xml|xsl|yaml|yml)$|^cloud-cli/bindir/cloud-tool$|^debian/changelog$
args: [--markdown-linebreak-ext=md] args: [--markdown-linebreak-ext=md]
exclude: ^services/console-proxy/rdpconsole/src/test/doc/freerdp-debug-log\.txt$ exclude: ^services/console-proxy/rdpconsole/src/test/doc/freerdp-debug-log\.txt$
- repo: https://github.com/codespell-project/codespell - repo: https://github.com/codespell-project/codespell
rev: v2.2.6 rev: v2.4.2
hooks: hooks:
- id: codespell - id: codespell
name: run codespell name: run codespell
description: Check spelling with codespell description: Check spelling with codespell
args: [--ignore-words=.github/linters/codespell.txt]
exclude: ^systemvm/agent/noVNC/|^ui/package\.json$|^ui/package-lock\.json$|^ui/public/js/less\.min\.js$|^ui/public/locales/.*[^n].*\.json$|^server/src/test/java/org/apache/cloudstack/network/ssl/CertServiceTest.java$|^test/integration/smoke/test_ssl_offloading.py$
- repo: https://github.com/pycqa/flake8 - repo: https://github.com/pycqa/flake8
rev: 7.0.0 rev: 7.0.0
hooks: hooks:
@ -116,15 +184,7 @@ repos:
description: check Markdown files with markdownlint description: check Markdown files with markdownlint
args: [--config=.github/linters/.markdown-lint.yml] args: [--config=.github/linters/.markdown-lint.yml]
types: [markdown] types: [markdown]
files: \.(md|mdown|markdown)$
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.5
hooks:
- id: chmod
name: set file permissions
args: ['644']
files: \.md$ files: \.md$
stages: [manual]
- repo: https://github.com/adrienverge/yamllint - repo: https://github.com/adrienverge/yamllint
rev: v1.37.1 rev: v1.37.1
hooks: hooks:
@ -134,4 +194,4 @@ repos:
args: [--config-file=.github/linters/.yamllint.yml] args: [--config-file=.github/linters/.yamllint.yml]
types: [yaml] types: [yaml]
files: \.ya?ml$ files: \.ya?ml$
exclude: ^.*k8s-.*\.ya?ml$ exclude: ^.*k8s-.*\.ya?ml$|^.github/workflows/.*\.lock\.ya?ml$

View File

@ -21,6 +21,24 @@
## Summary ## Summary
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
- [Summary](#summary)
- [Bug fixes](#bug-fixes)
- [Developing new features](#developing-new-features)
- [PendingReleaseNotes file](#pendingreleasenotes-file)
- [Fork the code](#fork-the-code)
- [Making changes](#making-changes)
- [Rebase `feature_x` to include updates from `upstream/main`](#rebase-feature_x-to-include-updates-from-upstreammain)
- [Make a GitHub Pull Request to contribute your changes](#make-a-github-pull-request-to-contribute-your-changes)
- [Cleaning up after a successful pull request](#cleaning-up-after-a-successful-pull-request)
- [Release Principles](#release-principles)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## Summary
This document covers how to contribute to the ACS project. ACS uses GitHub PRs to manage code contributions. This document covers how to contribute to the ACS project. ACS uses GitHub PRs to manage code contributions.
These instructions assume you have a GitHub.com account, so if you don't have one you will have to create one. Your proposed code changes will be published to your own fork of the ACS project, and you will submit a Pull Request for your changes to be added. These instructions assume you have a GitHub.com account, so if you don't have one you will have to create one. Your proposed code changes will be published to your own fork of the ACS project, and you will submit a Pull Request for your changes to be added.

View File

@ -26,9 +26,21 @@ or the developer [wiki](https://cwiki.apache.org/confluence/display/CLOUDSTACK/H
Apache CloudStack developers use various platforms for development, this guide Apache CloudStack developers use various platforms for development, this guide
was tested against a CentOS 7 x86_64 setup. was tested against a CentOS 7 x86_64 setup.
* [Setting up development environment](https://cwiki.apache.org/confluence/display/CLOUDSTACK/Setting+up+CloudStack+Development+Environment) for Apache CloudStack. <!-- START doctoc generated TOC please keep comment here to allow auto update -->
* [Building](https://cwiki.apache.org/confluence/display/CLOUDSTACK/How+to+build+CloudStack) Apache CloudStack. <!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
* [Appliance based development](https://github.com/rhtyd/monkeybox)
- [Setting up Development Environment](#setting-up-development-environment)
- [Using jenv and/or pyenv for Version Management](#using-jenv-andor-pyenv-for-version-management)
- [Getting the Source Code](#getting-the-source-code)
- [Building](#building)
- [To bring up CloudStack UI](#to-bring-up-cloudstack-ui)
- [Building with non-redistributable plugins](#building-with-non-redistributable-plugins)
- [Packaging and Installation](#packaging-and-installation)
- [Debian/Ubuntu](#debianubuntu)
- [RHEL/CentOS](#rhelcentos)
- [Notes](#notes)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
## Setting up Development Environment ## Setting up Development Environment

View File

@ -20,7 +20,7 @@
# pre-commit # pre-commit
We run [pre-commit](https://pre-commit.com/) with We run [pre-commit](https://pre-commit.com/) with
[GitHub Actions](https://github.com/apache/cloudstack/blob/main/.github/workflows/linter.yml) so installation on your [GitHub Actions](https://github.com/apache/cloudstack/blob/main/.github/workflows/pre-commit.yml) so installation on your
local machine is currently optional. local machine is currently optional.
The `pre-commit` [configuration file](https://github.com/apache/cloudstack/blob/main/.pre-commit-config.yaml) The `pre-commit` [configuration file](https://github.com/apache/cloudstack/blob/main/.pre-commit-config.yaml)

View File

@ -31,6 +31,24 @@
[![Apache CloudStack](tools/logo/apache_cloudstack.png)](https://cloudstack.apache.org/) [![Apache CloudStack](tools/logo/apache_cloudstack.png)](https://cloudstack.apache.org/)
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
- [Who Uses CloudStack?](#who-uses-cloudstack)
- [Demo](#demo)
- [Getting Started](#getting-started)
- [Getting Source Repository](#getting-source-repository)
- [Documentation](#documentation)
- [News and Events](#news-and-events)
- [Getting Involved and Contributing](#getting-involved-and-contributing)
- [Reporting Security Vulnerabilities](#reporting-security-vulnerabilities)
- [License](#license)
- [Notice of Cryptographic Software](#notice-of-cryptographic-software)
- [Star History](#star-history)
- [Contributors](#contributors)
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
Apache CloudStack is open source software designed to deploy and manage large Apache CloudStack is open source software designed to deploy and manage large
networks of virtual machines, as a highly available, highly scalable networks of virtual machines, as a highly available, highly scalable
Infrastructure as a Service (IaaS) cloud computing platform. CloudStack is used Infrastructure as a Service (IaaS) cloud computing platform. CloudStack is used

View File

@ -457,3 +457,18 @@ iscsi.session.cleanup.enabled=false
# Instance conversion VIRT_V2V_TMPDIR env var # Instance conversion VIRT_V2V_TMPDIR env var
#convert.instance.env.virtv2v.tmpdir= #convert.instance.env.virtv2v.tmpdir=
# Time, in seconds, to wait before retrying to rebase during the incremental snapshot process.
# incremental.snapshot.retry.rebase.wait=60
# Path to the VDDK library directory for VMware to KVM conversion via VDDK,
# passed to virt-v2v as -io vddk-libdir=<path>
#vddk.lib.dir=
# Ordered VDDK transport preference for VMware to KVM conversion via VDDK, passed as
# -io vddk-transports=<value> to virt-v2v. Example: nbd:nbdssl
#vddk.transports=
# Optional vCenter SHA1 thumbprint for VMware to KVM conversion via VDDK, passed as
# -io vddk-thumbprint=<value>. If unset, CloudStack computes it on the KVM host via openssl.
#vddk.thumbprint=

View File

@ -0,0 +1,24 @@
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
# Configuration file for UEFI
guest.nvram.template.legacy=@GUESTNVRAMTEMPLATELEGACY@
guest.loader.legacy=@GUESTLOADERLEGACY@
guest.nvram.template.secure=@GUESTNVRAMTEMPLATESECURE@
guest.loader.secure=@GUESTLOADERSECURE@
guest.nvram.path=@GUESTNVRAMPATH@

View File

@ -24,7 +24,7 @@
<parent> <parent>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloudstack</artifactId> <artifactId>cloudstack</artifactId>
<version>4.22.0.1</version> <version>4.23.0.0-SNAPSHOT</version>
</parent> </parent>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -1322,7 +1322,6 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
processResponse((Response)request, task.getLink()); processResponse((Response)request, task.getLink());
} else { } else {
//put the requests from mgt server into another thread pool, as the request may take a longer time to finish. Don't block the NIO main thread pool //put the requests from mgt server into another thread pool, as the request may take a longer time to finish. Don't block the NIO main thread pool
//processRequest(request, task.getLink());
requestHandler.submit(new AgentRequestHandler(getType(), getLink(), request)); requestHandler.submit(new AgentRequestHandler(getType(), getLink(), request));
} }
} catch (final ClassNotFoundException e) { } catch (final ClassNotFoundException e) {
@ -1332,13 +1331,14 @@ public class Agent implements HandlerFactory, IAgentControl, AgentStatusUpdater
} }
} else if (task.getType() == Task.Type.DISCONNECT) { } else if (task.getType() == Task.Type.DISCONNECT) {
try { try {
// an issue has been found if reconnect immediately after disconnecting. please refer to https://github.com/apache/cloudstack/issues/8517 // an issue has been found if reconnect immediately after disconnecting.
// wait 5 seconds before reconnecting // wait 5 seconds before reconnecting
logger.debug("Wait for 5 secs before reconnecting, disconnect task - {}", () -> getLinkLog(task.getLink()));
Thread.sleep(5000); Thread.sleep(5000);
} catch (InterruptedException e) { } catch (InterruptedException e) {
} }
shell.setConnectionTransfer(false); shell.setConnectionTransfer(false);
logger.debug("Executing disconnect task - {}", () -> getLinkLog(task.getLink())); logger.debug("Executing disconnect task - {} and reconnecting", () -> getLinkLog(task.getLink()));
reconnect(task.getLink()); reconnect(task.getLink());
} else if (task.getType() == Task.Type.OTHER) { } else if (task.getType() == Task.Type.OTHER) {
processOtherTask(task); processOtherTask(task);

View File

@ -117,7 +117,7 @@ public class AgentProperties{
/** /**
* Local storage path.<br> * Local storage path.<br>
* This property allows multiple values to be entered in a single String. The differente values must be separated by commas.<br> * This property allows multiple values to be entered in a single String. The different values must be separated by commas.<br>
* Data type: String.<br> * Data type: String.<br>
* Default value: <code>/var/lib/libvirt/images/</code> * Default value: <code>/var/lib/libvirt/images/</code>
*/ */
@ -134,7 +134,7 @@ public class AgentProperties{
/** /**
* MANDATORY: The UUID for the local storage pool.<br> * MANDATORY: The UUID for the local storage pool.<br>
* This property allows multiple values to be entered in a single String. The differente values must be separated by commas.<br> * This property allows multiple values to be entered in a single String. The different values must be separated by commas.<br>
* Data type: String.<br> * Data type: String.<br>
* Default value: <code>null</code> * Default value: <code>null</code>
*/ */
@ -808,6 +808,30 @@ public class AgentProperties{
*/ */
public static final Property<String> CONVERT_ENV_VIRTV2V_TMPDIR = new Property<>("convert.instance.env.virtv2v.tmpdir", null, String.class); public static final Property<String> CONVERT_ENV_VIRTV2V_TMPDIR = new Property<>("convert.instance.env.virtv2v.tmpdir", null, String.class);
/**
* Path to the VDDK library directory on the KVM conversion host, used when converting VMs from VMware to KVM via VDDK.
* This directory is passed to virt-v2v as <code>-io vddk-libdir=&lt;path&gt;</code>.
* Data type: String.<br>
* Default value: <code>null</code>
*/
public static final Property<String> VDDK_LIB_DIR = new Property<>("vddk.lib.dir", null, String.class);
/**
* Ordered list of VDDK transports for virt-v2v, passed as <code>-io vddk-transports=&lt;value&gt;</code>.
* Example: <code>nbd:nbdssl</code>.
* Data type: String.<br>
* Default value: <code>null</code>
*/
public static final Property<String> VDDK_TRANSPORTS = new Property<>("vddk.transports", null, String.class);
/**
* vCenter TLS certificate thumbprint used by virt-v2v VDDK mode, passed as <code>-io vddk-thumbprint=&lt;value&gt;</code>.
* If unset, the KVM host computes it at runtime from the vCenter endpoint.
* Data type: String.<br>
* Default value: <code>null</code>
*/
public static final Property<String> VDDK_THUMBPRINT = new Property<>("vddk.thumbprint", null, String.class);
/** /**
* BGP controll CIDR * BGP controll CIDR
* Data type: String.<br> * Data type: String.<br>
@ -885,6 +909,11 @@ public class AgentProperties{
*/ */
public static final Property<Boolean> CREATE_FULL_CLONE = new Property<>("create.full.clone", false); public static final Property<Boolean> CREATE_FULL_CLONE = new Property<>("create.full.clone", false);
/**
* Time, in seconds, to wait before retrying to rebase during the incremental snapshot process.
* */
public static final Property<Integer> INCREMENTAL_SNAPSHOT_RETRY_REBASE_WAIT = new Property<>("incremental.snapshot.retry.rebase.wait", 60);
public static class Property <T>{ public static class Property <T>{
private String name; private String name;

View File

@ -175,12 +175,12 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe
try { try {
is.close(); is.close();
} catch (final IOException e) { } catch (final IOException e) {
logger.warn("Exception when closing , console proxy address : {}", proxyManagementIp); logger.warn("Exception when closing , console proxy address: {}", proxyManagementIp);
success = false; success = false;
} }
} }
} catch (final IOException e) { } 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; success = false;
} }
@ -331,7 +331,7 @@ public class ConsoleProxyResource extends ServerResourceBase implements ServerRe
final Object resource = this; final Object resource = this;
logger.info("Building class loader for com.cloud.consoleproxy.ConsoleProxy"); logger.info("Building class loader for com.cloud.consoleproxy.ConsoleProxy");
if (consoleProxyMain == null) { if (consoleProxyMain == null) {
logger.info("Running com.cloud.consoleproxy.ConsoleProxy with encryptor password={}", encryptorPassword); logger.info("Running com.cloud.consoleproxy.ConsoleProxy");
consoleProxyMain = new Thread(new ManagedContextRunnable() { consoleProxyMain = new Thread(new ManagedContextRunnable() {
@Override @Override
protected void runInContext() { protected void runInContext() {

View File

@ -24,7 +24,7 @@
<parent> <parent>
<groupId>org.apache.cloudstack</groupId> <groupId>org.apache.cloudstack</groupId>
<artifactId>cloudstack</artifactId> <artifactId>cloudstack</artifactId>
<version>4.22.0.1</version> <version>4.23.0.0-SNAPSHOT</version>
</parent> </parent>
<dependencies> <dependencies>
<dependency> <dependency>

View File

@ -119,8 +119,7 @@ public class OVFHelper {
boolean password = StringUtils.isNotBlank(passStr) && passStr.equalsIgnoreCase("true"); boolean password = StringUtils.isNotBlank(passStr) && passStr.equalsIgnoreCase("true");
String label = ovfParser.getChildNodeValue(node, "Label"); String label = ovfParser.getChildNodeValue(node, "Label");
String description = ovfParser.getChildNodeValue(node, "Description"); String description = ovfParser.getChildNodeValue(node, "Description");
logger.debug("Creating OVF property index " + index + (category == null ? "" : " for category " + category) logger.debug("Creating OVF property index {} {} with key = {}", index, (category == null ? "" : " for category " + category), key);
+ " with key = " + key);
return new OVFPropertyTO(key, type, value, qualifiers, userConfigurable, return new OVFPropertyTO(key, type, value, qualifiers, userConfigurable,
label, description, password, index, category); label, description, password, index, category);
} }
@ -152,7 +151,7 @@ public class OVFHelper {
if (child.getNodeName().equalsIgnoreCase("Category") || if (child.getNodeName().equalsIgnoreCase("Category") ||
child.getNodeName().endsWith(":Category")) { child.getNodeName().endsWith(":Category")) {
lastCategoryFound = child.getTextContent(); lastCategoryFound = child.getTextContent();
logger.info("Category found " + lastCategoryFound); logger.info("Category found {}", lastCategoryFound);
} else if (child.getNodeName().equalsIgnoreCase("Property") || } else if (child.getNodeName().equalsIgnoreCase("Property") ||
child.getNodeName().endsWith(":Property")) { child.getNodeName().endsWith(":Property")) {
OVFPropertyTO prop = createOVFPropertyFromNode(child, propertyIndex, lastCategoryFound); OVFPropertyTO prop = createOVFPropertyFromNode(child, propertyIndex, lastCategoryFound);
@ -250,13 +249,13 @@ public class OVFHelper {
int diskNumber = 0; int diskNumber = 0;
for (OVFVirtualHardwareItemTO diskItem : diskHardwareItems) { for (OVFVirtualHardwareItemTO diskItem : diskHardwareItems) {
if (StringUtils.isBlank(diskItem.getHostResource())) { if (StringUtils.isBlank(diskItem.getHostResource())) {
logger.error("Missing disk information for hardware item " + diskItem.getElementName() + " " + diskItem.getInstanceId()); logger.error("Missing disk information for hardware item {} {}", diskItem.getElementName(), diskItem.getInstanceId());
continue; continue;
} }
String diskId = extractDiskIdFromDiskHostResource(diskItem.getHostResource()); String diskId = extractDiskIdFromDiskHostResource(diskItem.getHostResource());
OVFDisk diskDefinition = getDiskDefinitionFromDiskId(diskId, disks); OVFDisk diskDefinition = getDiskDefinitionFromDiskId(diskId, disks);
if (diskDefinition == null) { if (diskDefinition == null) {
logger.error("Missing disk definition for disk ID " + diskId); logger.error("Missing disk definition for disk ID {}", diskId);
} }
OVFFile fileDefinition = getFileDefinitionFromDiskDefinition(diskDefinition._fileRef, files); OVFFile fileDefinition = getFileDefinitionFromDiskDefinition(diskDefinition._fileRef, files);
DatadiskTO datadiskTO = generateDiskTO(fileDefinition, diskDefinition, ovfParentPath, diskNumber, diskItem); DatadiskTO datadiskTO = generateDiskTO(fileDefinition, diskDefinition, ovfParentPath, diskNumber, diskItem);
@ -278,8 +277,8 @@ public class OVFHelper {
if (StringUtils.isNotBlank(path)) { if (StringUtils.isNotBlank(path)) {
File f = new File(path); File f = new File(path);
if (!f.exists() || f.isDirectory()) { if (!f.exists() || f.isDirectory()) {
logger.error("One of the attached disk or iso does not exists " + path); logger.error("One of the attached disk or ISOs does not exists {}", path);
throw new InternalErrorException("One of the attached disk or iso as stated on OVF does not exists " + path); throw new InternalErrorException("One of the attached disk or ISOs as stated on OVF does not exists " + path);
} }
} }
Long capacity = disk != null ? disk._capacity : file._size; Long capacity = disk != null ? disk._capacity : file._size;
@ -334,9 +333,7 @@ public class OVFHelper {
od._controller = getControllerType(items, od._diskId); od._controller = getControllerType(items, od._diskId);
vd.add(od); vd.add(od);
} }
if (logger.isTraceEnabled()) { logger.trace("Found {} disk definitions", vd.size());
logger.trace(String.format("found %d disk definitions",vd.size()));
}
return vd; return vd;
} }
@ -366,9 +363,7 @@ public class OVFHelper {
vf.add(of); vf.add(of);
} }
} }
if (logger.isTraceEnabled()) { logger.trace("Found {} file definitions in {}", vf.size(), ovfFile.getPath());
logger.trace(String.format("found %d file definitions in %s",vf.size(), ovfFile.getPath()));
}
return vf; return vf;
} }
@ -506,7 +501,7 @@ public class OVFHelper {
outfile.write(writer.toString()); outfile.write(writer.toString());
outfile.close(); outfile.close();
} catch (IOException | TransformerException e) { } catch (IOException | TransformerException e) {
logger.info("Unexpected exception caught while rewriting OVF:" + e.getMessage(), e); logger.info("Unexpected exception caught while rewriting OVF: {}", e.getMessage(), e);
throw new CloudRuntimeException(e); throw new CloudRuntimeException(e);
} }
} }
@ -522,9 +517,7 @@ public class OVFHelper {
public List<OVFNetworkTO> getNetPrerequisitesFromDocument(Document doc) throws InternalErrorException { public List<OVFNetworkTO> getNetPrerequisitesFromDocument(Document doc) throws InternalErrorException {
if (doc == null) { if (doc == null) {
if (logger.isTraceEnabled()) { logger.trace("No document to parse; returning no prerequisite networks");
logger.trace("no document to parse; returning no prerequisite networks");
}
return Collections.emptyList(); return Collections.emptyList();
} }
@ -540,9 +533,7 @@ public class OVFHelper {
private void matchNicsToNets(Map<String, OVFNetworkTO> nets, Node systemElement) { private void matchNicsToNets(Map<String, OVFNetworkTO> nets, Node systemElement) {
final DocumentTraversal traversal = (DocumentTraversal) systemElement; final DocumentTraversal traversal = (DocumentTraversal) systemElement;
final NodeIterator iterator = traversal.createNodeIterator(systemElement, NodeFilter.SHOW_ELEMENT, null, true); final NodeIterator iterator = traversal.createNodeIterator(systemElement, NodeFilter.SHOW_ELEMENT, null, true);
if (logger.isTraceEnabled()) { logger.trace("Starting out with {} network-prerequisites, parsing hardware", nets.size());
logger.trace(String.format("starting out with %d network-prerequisites, parsing hardware",nets.size()));
}
int nicCount = 0; int nicCount = 0;
for (Node n = iterator.nextNode(); n != null; n = iterator.nextNode()) { for (Node n = iterator.nextNode(); n != null; n = iterator.nextNode()) {
final Element e = (Element) n; final Element e = (Element) n;
@ -550,9 +541,7 @@ public class OVFHelper {
nicCount++; nicCount++;
String name = e.getTextContent(); // should be in our nets String name = e.getTextContent(); // should be in our nets
if(nets.get(name) == null) { if(nets.get(name) == null) {
if(logger.isInfoEnabled()) { logger.info("Found a NIC definition without a Network definition by name {}, adding it to the list.", name);
logger.info(String.format("found a nic definition without a network definition byname %s, adding it to the list.", name));
}
nets.put(name, new OVFNetworkTO()); nets.put(name, new OVFNetworkTO());
} }
OVFNetworkTO thisNet = nets.get(name); OVFNetworkTO thisNet = nets.get(name);
@ -561,9 +550,7 @@ public class OVFHelper {
} }
} }
} }
if (logger.isTraceEnabled()) { logger.trace("Ending up with {} network-prerequisites, parsed {} nics", nets.size(), nicCount);
logger.trace(String.format("ending up with %d network-prerequisites, parsed %d nics", nets.size(), nicCount));
}
} }
/** /**
@ -585,7 +572,7 @@ public class OVFHelper {
int addressOnParent = Integer.parseInt(addressOnParentStr); int addressOnParent = Integer.parseInt(addressOnParentStr);
nic.setAddressOnParent(addressOnParent); nic.setAddressOnParent(addressOnParent);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
logger.warn("Encountered element of type \"AddressOnParent\", that could not be parse to an integer number: " + addressOnParentStr); logger.warn("Encountered element of type \"AddressOnParent\", that could not be parse to an integer number: {}", addressOnParentStr);
} }
boolean automaticAllocation = StringUtils.isNotBlank(automaticAllocationStr) && Boolean.parseBoolean(automaticAllocationStr); boolean automaticAllocation = StringUtils.isNotBlank(automaticAllocationStr) && Boolean.parseBoolean(automaticAllocationStr);
@ -597,7 +584,7 @@ public class OVFHelper {
int instanceId = Integer.parseInt(instanceIdStr); int instanceId = Integer.parseInt(instanceIdStr);
nic.setInstanceID(instanceId); nic.setInstanceID(instanceId);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
logger.warn("Encountered element of type \"InstanceID\", that could not be parse to an integer number: " + instanceIdStr); logger.warn("Encountered element of type \"InstanceID\", that could not be parse to an integer number: {}", instanceIdStr);
} }
nic.setResourceSubType(resourceSubType); nic.setResourceSubType(resourceSubType);
@ -630,9 +617,7 @@ public class OVFHelper {
nets.put(networkName,network); nets.put(networkName,network);
} }
if (logger.isTraceEnabled()) { logger.trace("Found {} Networks in Template", nets.size());
logger.trace(String.format("found %d networks in template", nets.size()));
}
return nets; return nets;
} }
@ -771,7 +756,7 @@ public class OVFHelper {
try { try {
return Long.parseLong(value); return Long.parseLong(value);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
logger.debug("Could not parse the value: " + value + ", ignoring it"); logger.debug("Could not parse the value: {}, ignoring it", value);
} }
} }
return null; return null;
@ -782,7 +767,7 @@ public class OVFHelper {
try { try {
return Integer.parseInt(value); return Integer.parseInt(value);
} catch (NumberFormatException e) { } catch (NumberFormatException e) {
logger.debug("Could not parse the value: " + value + ", ignoring it"); logger.debug("Could not parse the value: {}, ignoring it", value);
} }
} }
return null; return null;
@ -820,7 +805,7 @@ public class OVFHelper {
try { try {
compressedLicense = compressOVFEula(eulaLicense); compressedLicense = compressOVFEula(eulaLicense);
} catch (IOException e) { } catch (IOException e) {
logger.error("Could not compress the license for info " + eulaInfo); logger.error("Could not compress the license for info {}", eulaInfo);
continue; continue;
} }
OVFEulaSectionTO eula = new OVFEulaSectionTO(eulaInfo, compressedLicense, eulaIndex); OVFEulaSectionTO eula = new OVFEulaSectionTO(eulaInfo, compressedLicense, eulaIndex);

View File

@ -54,7 +54,7 @@ public class OVFParser {
documentBuilderFactory.setNamespaceAware(true); documentBuilderFactory.setNamespaceAware(true);
documentBuilder = documentBuilderFactory.newDocumentBuilder(); documentBuilder = documentBuilderFactory.newDocumentBuilder();
} catch (ParserConfigurationException e) { } catch (ParserConfigurationException e) {
logger.error("Cannot start the OVF parser: " + e.getMessage(), e); logger.error("Cannot start the OVF parser: {}", e.getMessage(), e);
} }
} }
@ -70,7 +70,7 @@ public class OVFParser {
try { try {
return documentBuilder.parse(new File(ovfFilePath)); return documentBuilder.parse(new File(ovfFilePath));
} catch (SAXException | IOException e) { } catch (SAXException | IOException e) {
logger.error("Error parsing " + ovfFilePath + " " + e.getMessage(), e); logger.error("Error parsing {} {}", ovfFilePath, e.getMessage(), e);
return null; return null;
} }
} }

View File

@ -33,6 +33,7 @@ public class NicTO extends NetworkTO {
boolean dpdkEnabled; boolean dpdkEnabled;
Integer mtu; Integer mtu;
Long networkId; Long networkId;
boolean enabled;
String networkSegmentName; String networkSegmentName;
@ -154,4 +155,12 @@ public class NicTO extends NetworkTO {
public void setNetworkSegmentName(String networkSegmentName) { public void setNetworkSegmentName(String networkSegmentName) {
this.networkSegmentName = networkSegmentName; this.networkSegmentName = networkSegmentName;
} }
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
} }

View File

@ -36,13 +36,17 @@ public class RemoteInstanceTO implements Serializable {
private String vcenterPassword; private String vcenterPassword;
private String vcenterHost; private String vcenterHost;
private String datacenterName; private String datacenterName;
private String clusterName;
private String hostName;
public RemoteInstanceTO() { public RemoteInstanceTO() {
} }
public RemoteInstanceTO(String instanceName) { public RemoteInstanceTO(String instanceName, String clusterName, String hostName) {
this.hypervisorType = Hypervisor.HypervisorType.VMware; this.hypervisorType = Hypervisor.HypervisorType.VMware;
this.instanceName = instanceName; this.instanceName = instanceName;
this.clusterName = clusterName;
this.hostName = hostName;
} }
public RemoteInstanceTO(String instanceName, String instancePath, String vcenterHost, String vcenterUsername, String vcenterPassword, String datacenterName) { public RemoteInstanceTO(String instanceName, String instancePath, String vcenterHost, String vcenterUsername, String vcenterPassword, String datacenterName) {
@ -55,6 +59,12 @@ public class RemoteInstanceTO implements Serializable {
this.datacenterName = datacenterName; this.datacenterName = datacenterName;
} }
public RemoteInstanceTO(String instanceName, String instancePath, String vcenterHost, String vcenterUsername, String vcenterPassword, String datacenterName, String clusterName, String hostName) {
this(instanceName, instancePath, vcenterHost, vcenterUsername, vcenterPassword, datacenterName);
this.clusterName = clusterName;
this.hostName = hostName;
}
public Hypervisor.HypervisorType getHypervisorType() { public Hypervisor.HypervisorType getHypervisorType() {
return this.hypervisorType; return this.hypervisorType;
} }
@ -82,4 +92,12 @@ public class RemoteInstanceTO implements Serializable {
public String getDatacenterName() { public String getDatacenterName() {
return datacenterName; return datacenterName;
} }
public String getClusterName() {
return clusterName;
}
public String getHostName() {
return hostName;
}
} }

View File

@ -0,0 +1,182 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.agent.api.to;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class VirtualMachineMetadataTO {
// VM details
private final String name;
private final String internalName;
private final String displayName;
private final String instanceUuid;
private final Integer cpuCores;
private final Integer memory;
private final Long created;
private final Long started;
// Owner details
private final String ownerDomainUuid;
private final String ownerDomainName;
private final String ownerAccountUuid;
private final String ownerAccountName;
private final String ownerProjectUuid;
private final String ownerProjectName;
// Host and service offering
private final String serviceOfferingName;
private final List<String> serviceOfferingHostTags;
// zone, pod, and cluster details
private final String zoneName;
private final String zoneUuid;
private final String podName;
private final String podUuid;
private final String clusterName;
private final String clusterUuid;
// resource tags
private final Map<String, String> resourceTags;
public VirtualMachineMetadataTO(
String name, String internalName, String displayName, String instanceUuid, Integer cpuCores, Integer memory, Long created, Long started,
String ownerDomainUuid, String ownerDomainName, String ownerAccountUuid, String ownerAccountName, String ownerProjectUuid, String ownerProjectName,
String serviceOfferingName, List<String> serviceOfferingHostTags,
String zoneName, String zoneUuid, String podName, String podUuid, String clusterName, String clusterUuid, Map<String, String> resourceTags) {
/*
* Something failed in the metadata shall not be a fatal error, the VM can still be started
* Thus, the unknown fields just get an explicit "unknown" value so it can be fixed in case
* there are bugs on some execution paths.
* */
this.name = (name != null) ? name : "unknown";
this.internalName = (internalName != null) ? internalName : "unknown";
this.displayName = (displayName != null) ? displayName : "unknown";
this.instanceUuid = (instanceUuid != null) ? instanceUuid : "unknown";
this.cpuCores = (cpuCores != null) ? cpuCores : -1;
this.memory = (memory != null) ? memory : -1;
this.created = (created != null) ? created : 0;
this.started = (started != null) ? started : 0;
this.ownerDomainUuid = (ownerDomainUuid != null) ? ownerDomainUuid : "unknown";
this.ownerDomainName = (ownerDomainName != null) ? ownerDomainName : "unknown";
this.ownerAccountUuid = (ownerAccountUuid != null) ? ownerAccountUuid : "unknown";
this.ownerAccountName = (ownerAccountName != null) ? ownerAccountName : "unknown";
this.ownerProjectUuid = (ownerProjectUuid != null) ? ownerProjectUuid : "unknown";
this.ownerProjectName = (ownerProjectName != null) ? ownerProjectName : "unknown";
this.serviceOfferingName = (serviceOfferingName != null) ? serviceOfferingName : "unknown";
this.serviceOfferingHostTags = (serviceOfferingHostTags != null) ? serviceOfferingHostTags : new ArrayList<>();
this.zoneName = (zoneName != null) ? zoneName : "unknown";
this.zoneUuid = (zoneUuid != null) ? zoneUuid : "unknown";
this.podName = (podName != null) ? podName : "unknown";
this.podUuid = (podUuid != null) ? podUuid : "unknown";
this.clusterName = (clusterName != null) ? clusterName : "unknown";
this.clusterUuid = (clusterUuid != null) ? clusterUuid : "unknown";
this.resourceTags = (resourceTags != null) ? resourceTags : new HashMap<>();
}
public String getName() {
return name;
}
public String getInternalName() {
return internalName;
}
public String getDisplayName() {
return displayName;
}
public String getInstanceUuid() {
return instanceUuid;
}
public Integer getCpuCores() {
return cpuCores;
}
public Integer getMemory() {
return memory;
}
public Long getCreated() { return created; }
public Long getStarted() {
return started;
}
public String getOwnerDomainUuid() {
return ownerDomainUuid;
}
public String getOwnerDomainName() {
return ownerDomainName;
}
public String getOwnerAccountUuid() {
return ownerAccountUuid;
}
public String getOwnerAccountName() {
return ownerAccountName;
}
public String getOwnerProjectUuid() {
return ownerProjectUuid;
}
public String getOwnerProjectName() {
return ownerProjectName;
}
public String getserviceOfferingName() {
return serviceOfferingName;
}
public List<String> getserviceOfferingHostTags() {
return serviceOfferingHostTags;
}
public String getZoneName() {
return zoneName;
}
public String getZoneUuid() {
return zoneUuid;
}
public String getPodName() {
return podName;
}
public String getPodUuid() {
return podUuid;
}
public String getClusterName() {
return clusterName;
}
public String getClusterUuid() {
return clusterUuid;
}
public Map<String, String> getResourceTags() { return resourceTags; }
}

View File

@ -89,6 +89,7 @@ public class VirtualMachineTO {
private DeployAsIsInfoTO deployAsIsInfo; private DeployAsIsInfoTO deployAsIsInfo;
private String metadataManufacturer; private String metadataManufacturer;
private String metadataProductName; private String metadataProductName;
private VirtualMachineMetadataTO metadata;
public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer speed, long minRam, long maxRam, BootloaderType bootloader, public VirtualMachineTO(long id, String instanceName, VirtualMachine.Type type, int cpus, Integer speed, long minRam, long maxRam, BootloaderType bootloader,
String os, boolean enableHA, boolean limitCpuUse, String vncPassword) { String os, boolean enableHA, boolean limitCpuUse, String vncPassword) {
@ -494,6 +495,14 @@ public class VirtualMachineTO {
this.metadataProductName = metadataProductName; this.metadataProductName = metadataProductName;
} }
public VirtualMachineMetadataTO getMetadata() {
return metadata;
}
public void setMetadata(VirtualMachineMetadataTO metadata) {
this.metadata = metadata;
}
@Override @Override
public String toString() { public String toString() {
return String.format("VM {id: \"%s\", name: \"%s\", uuid: \"%s\", type: \"%s\"}", id, name, uuid, type); return String.format("VM {id: \"%s\", name: \"%s\", uuid: \"%s\", type: \"%s\"}", id, name, uuid, type);

View File

@ -22,19 +22,11 @@ import com.cloud.deploy.DeploymentPlan;
import com.cloud.deploy.DeploymentPlanner.ExcludeList; import com.cloud.deploy.DeploymentPlanner.ExcludeList;
import com.cloud.host.Host; import com.cloud.host.Host;
import com.cloud.host.Host.Type; import com.cloud.host.Host.Type;
import com.cloud.offering.ServiceOffering;
import com.cloud.utils.component.Adapter; import com.cloud.utils.component.Adapter;
import com.cloud.vm.VirtualMachine;
import com.cloud.vm.VirtualMachineProfile; import com.cloud.vm.VirtualMachineProfile;
public interface HostAllocator extends Adapter { public interface HostAllocator extends Adapter {
/**
* @param UserVm vm
* @param ServiceOffering offering
**/
boolean isVirtualMachineUpgradable(final VirtualMachine vm, final ServiceOffering offering);
/** /**
* Determines which physical hosts are suitable to * Determines which physical hosts are suitable to
* allocate the guest virtual machines on * allocate the guest virtual machines on
@ -49,31 +41,6 @@ public interface HostAllocator extends Adapter {
public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo); public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo);
/**
* Determines which physical hosts are suitable to allocate the guest
* virtual machines on
*
* Allocators must set any other hosts not considered for allocation in the
* ExcludeList avoid. Thus the avoid set and the list of hosts suitable,
* together must cover the entire host set in the cluster.
*
* @param VirtualMachineProfile
* vmProfile
* @param DeploymentPlan
* plan
* @param GuestType
* type
* @param ExcludeList
* avoid
* @param int returnUpTo (use -1 to return all possible hosts)
* @param boolean considerReservedCapacity (default should be true, set to
* false if host capacity calculation should not look at reserved
* capacity)
* @return List<Host> List of hosts that are suitable for VM allocation
**/
public List<Host> allocateTo(VirtualMachineProfile vmProfile, DeploymentPlan plan, Type type, ExcludeList avoid, int returnUpTo, boolean considerReservedCapacity);
/** /**
* Determines which physical hosts are suitable to allocate the guest * Determines which physical hosts are suitable to allocate the guest
* virtual machines on * virtual machines on

View File

@ -35,10 +35,10 @@ public class ListRecurringSnapshotScheduleCmd extends BaseListCmd {
//////////////// API parameters ///////////////////// //////////////// 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; 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; private Long volumeId;
///////////////////////////////////////////////////// /////////////////////////////////////////////////////

View File

@ -24,15 +24,18 @@ import com.cloud.network.Network;
import org.apache.cloudstack.api.ApiConstants; import org.apache.cloudstack.api.ApiConstants;
import org.apache.cloudstack.api.command.admin.config.ResetCfgCmd; import org.apache.cloudstack.api.command.admin.config.ResetCfgCmd;
import org.apache.cloudstack.api.command.admin.config.UpdateCfgCmd; import org.apache.cloudstack.api.command.admin.config.UpdateCfgCmd;
import org.apache.cloudstack.api.command.admin.network.CloneNetworkOfferingCmd;
import org.apache.cloudstack.api.command.admin.network.CreateGuestNetworkIpv6PrefixCmd; import org.apache.cloudstack.api.command.admin.network.CreateGuestNetworkIpv6PrefixCmd;
import org.apache.cloudstack.api.command.admin.network.CreateManagementNetworkIpRangeCmd; import org.apache.cloudstack.api.command.admin.network.CreateManagementNetworkIpRangeCmd;
import org.apache.cloudstack.api.command.admin.network.CreateNetworkOfferingCmd;
import org.apache.cloudstack.api.command.admin.network.DeleteGuestNetworkIpv6PrefixCmd; import org.apache.cloudstack.api.command.admin.network.DeleteGuestNetworkIpv6PrefixCmd;
import org.apache.cloudstack.api.command.admin.network.DeleteManagementNetworkIpRangeCmd; import org.apache.cloudstack.api.command.admin.network.DeleteManagementNetworkIpRangeCmd;
import org.apache.cloudstack.api.command.admin.network.DeleteNetworkOfferingCmd; import org.apache.cloudstack.api.command.admin.network.DeleteNetworkOfferingCmd;
import org.apache.cloudstack.api.command.admin.network.ListGuestNetworkIpv6PrefixesCmd; import org.apache.cloudstack.api.command.admin.network.ListGuestNetworkIpv6PrefixesCmd;
import org.apache.cloudstack.api.command.admin.network.NetworkOfferingBaseCmd;
import org.apache.cloudstack.api.command.admin.network.UpdateNetworkOfferingCmd; import org.apache.cloudstack.api.command.admin.network.UpdateNetworkOfferingCmd;
import org.apache.cloudstack.api.command.admin.network.UpdatePodManagementNetworkIpRangeCmd; import org.apache.cloudstack.api.command.admin.network.UpdatePodManagementNetworkIpRangeCmd;
import org.apache.cloudstack.api.command.admin.offering.CloneDiskOfferingCmd;
import org.apache.cloudstack.api.command.admin.offering.CloneServiceOfferingCmd;
import org.apache.cloudstack.api.command.admin.offering.CreateDiskOfferingCmd; import org.apache.cloudstack.api.command.admin.offering.CreateDiskOfferingCmd;
import org.apache.cloudstack.api.command.admin.offering.CreateServiceOfferingCmd; import org.apache.cloudstack.api.command.admin.offering.CreateServiceOfferingCmd;
import org.apache.cloudstack.api.command.admin.offering.DeleteDiskOfferingCmd; import org.apache.cloudstack.api.command.admin.offering.DeleteDiskOfferingCmd;
@ -105,6 +108,33 @@ public interface ConfigurationService {
*/ */
ServiceOffering createServiceOffering(CreateServiceOfferingCmd cmd); ServiceOffering createServiceOffering(CreateServiceOfferingCmd cmd);
/**
* Clones a service offering with optional parameter overrides
*
* @param cmd
* the command object that specifies the source offering ID and optional parameter overrides
* @return the newly created service offering cloned from source, null otherwise
*/
ServiceOffering cloneServiceOffering(CloneServiceOfferingCmd cmd);
/**
* Clones a disk offering with optional parameter overrides
*
* @param cmd
* the command object that specifies the source offering ID and optional parameter overrides
* @return the newly created disk offering cloned from source, null otherwise
*/
DiskOffering cloneDiskOffering(CloneDiskOfferingCmd cmd);
/**
* Clones a network offering with optional parameter overrides
*
* @param cmd
* the command object that specifies the source offering ID and optional parameter overrides
* @return the newly created network offering cloned from source, null otherwise
*/
NetworkOffering cloneNetworkOffering(CloneNetworkOfferingCmd cmd);
/** /**
* Updates a service offering * Updates a service offering
* *
@ -282,7 +312,7 @@ public interface ConfigurationService {
boolean releasePublicIpRange(ReleasePublicIpRangeCmd cmd); boolean releasePublicIpRange(ReleasePublicIpRangeCmd cmd);
NetworkOffering createNetworkOffering(CreateNetworkOfferingCmd cmd); NetworkOffering createNetworkOffering(NetworkOfferingBaseCmd cmd);
NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd); NetworkOffering updateNetworkOffering(UpdateNetworkOfferingCmd cmd);

View File

@ -22,7 +22,8 @@ public class CPU {
public enum CPUArch { public enum CPUArch {
x86("i686", 32), x86("i686", 32),
amd64("x86_64", 64), amd64("x86_64", 64),
arm64("aarch64", 64); arm64("aarch64", 64),
s390x("s390x", 64);
private final String type; private final String type;
private final int bits; private final int bits;

View File

@ -62,11 +62,11 @@ public interface DeploymentClusterPlanner extends DeploymentPlanner {
"vm.allocation.algorithm", "vm.allocation.algorithm",
"Advanced", "Advanced",
"random", "random",
"Order in which hosts within a cluster will be considered for VM allocation. The value can be 'random', 'firstfit', 'userdispersing', 'userconcentratedpod_random', 'userconcentratedpod_firstfit', or 'firstfitleastconsumed'.", "Order in which hosts within a cluster will be considered for VM allocation. The value can be 'random', 'firstfit', 'userdispersing', or 'firstfitleastconsumed'.",
true, true,
ConfigKey.Scope.Global, null, null, null, null, null, ConfigKey.Scope.Global, null, null, null, null, null,
ConfigKey.Kind.Select, ConfigKey.Kind.Select,
"random,firstfit,userdispersing,userconcentratedpod_random,userconcentratedpod_firstfit,firstfitleastconsumed"); "random,firstfit,userdispersing,firstfitleastconsumed");
/** /**
* This is called to determine list of possible clusters where a virtual * This is called to determine list of possible clusters where a virtual

View File

@ -70,7 +70,7 @@ public interface DeploymentPlanner extends Adapter {
boolean canHandle(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid); boolean canHandle(VirtualMachineProfile vm, DeploymentPlan plan, ExcludeList avoid);
public enum AllocationAlgorithm { public enum AllocationAlgorithm {
random, firstfit, userdispersing, userconcentratedpod_random, userconcentratedpod_firstfit; random, firstfit, userdispersing, firstfitleastconsumed;
} }
public enum PlannerResourceUsage { public enum PlannerResourceUsage {

View File

@ -298,8 +298,9 @@ public class EventTypes {
public static final String EVENT_REGISTER_CNI_CONFIG = "REGISTER.CNI.CONFIG"; public static final String EVENT_REGISTER_CNI_CONFIG = "REGISTER.CNI.CONFIG";
public static final String EVENT_DELETE_CNI_CONFIG = "DELETE.CNI.CONFIG"; public static final String EVENT_DELETE_CNI_CONFIG = "DELETE.CNI.CONFIG";
//register for user API and secret keys //user API and secret keys
public static final String EVENT_REGISTER_FOR_SECRET_API_KEY = "REGISTER.USER.KEY"; public static final String EVENT_REGISTER_FOR_SECRET_API_KEY = "REGISTER.USER.KEY";
public static final String EVENT_DELETE_SECRET_API_KEY = "DELETE.USER.KEY";
public static final String API_KEY_ACCESS_UPDATE = "API.KEY.ACCESS.UPDATE"; public static final String API_KEY_ACCESS_UPDATE = "API.KEY.ACCESS.UPDATE";
// Template Events // Template Events
@ -374,11 +375,13 @@ public class EventTypes {
// Service Offerings // Service Offerings
public static final String EVENT_SERVICE_OFFERING_CREATE = "SERVICE.OFFERING.CREATE"; public static final String EVENT_SERVICE_OFFERING_CREATE = "SERVICE.OFFERING.CREATE";
public static final String EVENT_SERVICE_OFFERING_CLONE = "SERVICE.OFFERING.CLONE";
public static final String EVENT_SERVICE_OFFERING_EDIT = "SERVICE.OFFERING.EDIT"; public static final String EVENT_SERVICE_OFFERING_EDIT = "SERVICE.OFFERING.EDIT";
public static final String EVENT_SERVICE_OFFERING_DELETE = "SERVICE.OFFERING.DELETE"; public static final String EVENT_SERVICE_OFFERING_DELETE = "SERVICE.OFFERING.DELETE";
// Disk Offerings // Disk Offerings
public static final String EVENT_DISK_OFFERING_CREATE = "DISK.OFFERING.CREATE"; public static final String EVENT_DISK_OFFERING_CREATE = "DISK.OFFERING.CREATE";
public static final String EVENT_DISK_OFFERING_CLONE = "DISK.OFFERING.CLONE";
public static final String EVENT_DISK_OFFERING_EDIT = "DISK.OFFERING.EDIT"; public static final String EVENT_DISK_OFFERING_EDIT = "DISK.OFFERING.EDIT";
public static final String EVENT_DISK_OFFERING_DELETE = "DISK.OFFERING.DELETE"; public static final String EVENT_DISK_OFFERING_DELETE = "DISK.OFFERING.DELETE";
@ -399,6 +402,7 @@ public class EventTypes {
// Network offerings // Network offerings
public static final String EVENT_NETWORK_OFFERING_CREATE = "NETWORK.OFFERING.CREATE"; public static final String EVENT_NETWORK_OFFERING_CREATE = "NETWORK.OFFERING.CREATE";
public static final String EVENT_NETWORK_OFFERING_CLONE = "NETWORK.OFFERING.CLONE";
public static final String EVENT_NETWORK_OFFERING_ASSIGN = "NETWORK.OFFERING.ASSIGN"; public static final String EVENT_NETWORK_OFFERING_ASSIGN = "NETWORK.OFFERING.ASSIGN";
public static final String EVENT_NETWORK_OFFERING_EDIT = "NETWORK.OFFERING.EDIT"; public static final String EVENT_NETWORK_OFFERING_EDIT = "NETWORK.OFFERING.EDIT";
public static final String EVENT_NETWORK_OFFERING_REMOVE = "NETWORK.OFFERING.REMOVE"; public static final String EVENT_NETWORK_OFFERING_REMOVE = "NETWORK.OFFERING.REMOVE";
@ -503,6 +507,7 @@ public class EventTypes {
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE = "VPN.S2S.CUSTOMER.GATEWAY.CREATE"; public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE = "VPN.S2S.CUSTOMER.GATEWAY.CREATE";
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE = "VPN.S2S.CUSTOMER.GATEWAY.DELETE"; public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE = "VPN.S2S.CUSTOMER.GATEWAY.DELETE";
public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE = "VPN.S2S.CUSTOMER.GATEWAY.UPDATE"; public static final String EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE = "VPN.S2S.CUSTOMER.GATEWAY.UPDATE";
public static final String EVENT_S2S_VPN_GATEWAY_OBSOLETE_PARAMS = "VPN.S2S.GATEWAY.OBSOLETE.PARAMS";
public static final String EVENT_S2S_VPN_CONNECTION_CREATE = "VPN.S2S.CONNECTION.CREATE"; public static final String EVENT_S2S_VPN_CONNECTION_CREATE = "VPN.S2S.CONNECTION.CREATE";
public static final String EVENT_S2S_VPN_CONNECTION_DELETE = "VPN.S2S.CONNECTION.DELETE"; public static final String EVENT_S2S_VPN_CONNECTION_DELETE = "VPN.S2S.CONNECTION.DELETE";
public static final String EVENT_S2S_VPN_CONNECTION_RESET = "VPN.S2S.CONNECTION.RESET"; public static final String EVENT_S2S_VPN_CONNECTION_RESET = "VPN.S2S.CONNECTION.RESET";
@ -582,6 +587,7 @@ public class EventTypes {
// Network ACL // Network ACL
public static final String EVENT_NETWORK_ACL_CREATE = "NETWORK.ACL.CREATE"; public static final String EVENT_NETWORK_ACL_CREATE = "NETWORK.ACL.CREATE";
public static final String EVENT_NETWORK_ACL_IMPORT = "NETWORK.ACL.IMPORT";
public static final String EVENT_NETWORK_ACL_DELETE = "NETWORK.ACL.DELETE"; public static final String EVENT_NETWORK_ACL_DELETE = "NETWORK.ACL.DELETE";
public static final String EVENT_NETWORK_ACL_REPLACE = "NETWORK.ACL.REPLACE"; public static final String EVENT_NETWORK_ACL_REPLACE = "NETWORK.ACL.REPLACE";
public static final String EVENT_NETWORK_ACL_UPDATE = "NETWORK.ACL.UPDATE"; public static final String EVENT_NETWORK_ACL_UPDATE = "NETWORK.ACL.UPDATE";
@ -596,6 +602,7 @@ public class EventTypes {
// VPC offerings // VPC offerings
public static final String EVENT_VPC_OFFERING_CREATE = "VPC.OFFERING.CREATE"; public static final String EVENT_VPC_OFFERING_CREATE = "VPC.OFFERING.CREATE";
public static final String EVENT_VPC_OFFERING_CLONE = "VPC.OFFERING.CLONE";
public static final String EVENT_VPC_OFFERING_UPDATE = "VPC.OFFERING.UPDATE"; public static final String EVENT_VPC_OFFERING_UPDATE = "VPC.OFFERING.UPDATE";
public static final String EVENT_VPC_OFFERING_DELETE = "VPC.OFFERING.DELETE"; public static final String EVENT_VPC_OFFERING_DELETE = "VPC.OFFERING.DELETE";
@ -628,6 +635,7 @@ public class EventTypes {
// Backup and Recovery events // Backup and Recovery events
public static final String EVENT_VM_BACKUP_IMPORT_OFFERING = "BACKUP.IMPORT.OFFERING"; public static final String EVENT_VM_BACKUP_IMPORT_OFFERING = "BACKUP.IMPORT.OFFERING";
public static final String EVENT_VM_BACKUP_OFFERING_CLONE = "BACKUP.OFFERING.CLONE";
public static final String EVENT_VM_BACKUP_OFFERING_ASSIGN = "BACKUP.OFFERING.ASSIGN"; public static final String EVENT_VM_BACKUP_OFFERING_ASSIGN = "BACKUP.OFFERING.ASSIGN";
public static final String EVENT_VM_BACKUP_OFFERING_REMOVE = "BACKUP.OFFERING.REMOVE"; public static final String EVENT_VM_BACKUP_OFFERING_REMOVE = "BACKUP.OFFERING.REMOVE";
public static final String EVENT_VM_BACKUP_CREATE = "BACKUP.CREATE"; public static final String EVENT_VM_BACKUP_CREATE = "BACKUP.CREATE";
@ -1043,11 +1051,13 @@ public class EventTypes {
// Service Offerings // Service Offerings
entityEventDetails.put(EVENT_SERVICE_OFFERING_CREATE, ServiceOffering.class); entityEventDetails.put(EVENT_SERVICE_OFFERING_CREATE, ServiceOffering.class);
entityEventDetails.put(EVENT_SERVICE_OFFERING_CLONE, ServiceOffering.class);
entityEventDetails.put(EVENT_SERVICE_OFFERING_EDIT, ServiceOffering.class); entityEventDetails.put(EVENT_SERVICE_OFFERING_EDIT, ServiceOffering.class);
entityEventDetails.put(EVENT_SERVICE_OFFERING_DELETE, ServiceOffering.class); entityEventDetails.put(EVENT_SERVICE_OFFERING_DELETE, ServiceOffering.class);
// Disk Offerings // Disk Offerings
entityEventDetails.put(EVENT_DISK_OFFERING_CREATE, DiskOffering.class); entityEventDetails.put(EVENT_DISK_OFFERING_CREATE, DiskOffering.class);
entityEventDetails.put(EVENT_DISK_OFFERING_CLONE, DiskOffering.class);
entityEventDetails.put(EVENT_DISK_OFFERING_EDIT, DiskOffering.class); entityEventDetails.put(EVENT_DISK_OFFERING_EDIT, DiskOffering.class);
entityEventDetails.put(EVENT_DISK_OFFERING_DELETE, DiskOffering.class); entityEventDetails.put(EVENT_DISK_OFFERING_DELETE, DiskOffering.class);
@ -1068,6 +1078,7 @@ public class EventTypes {
// Network offerings // Network offerings
entityEventDetails.put(EVENT_NETWORK_OFFERING_CREATE, NetworkOffering.class); entityEventDetails.put(EVENT_NETWORK_OFFERING_CREATE, NetworkOffering.class);
entityEventDetails.put(EVENT_NETWORK_OFFERING_CLONE, NetworkOffering.class);
entityEventDetails.put(EVENT_NETWORK_OFFERING_ASSIGN, NetworkOffering.class); entityEventDetails.put(EVENT_NETWORK_OFFERING_ASSIGN, NetworkOffering.class);
entityEventDetails.put(EVENT_NETWORK_OFFERING_EDIT, NetworkOffering.class); entityEventDetails.put(EVENT_NETWORK_OFFERING_EDIT, NetworkOffering.class);
entityEventDetails.put(EVENT_NETWORK_OFFERING_REMOVE, NetworkOffering.class); entityEventDetails.put(EVENT_NETWORK_OFFERING_REMOVE, NetworkOffering.class);
@ -1151,6 +1162,7 @@ public class EventTypes {
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE, Site2SiteCustomerGateway.class); entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_CREATE, Site2SiteCustomerGateway.class);
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE, Site2SiteCustomerGateway.class); entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_DELETE, Site2SiteCustomerGateway.class);
entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE, Site2SiteCustomerGateway.class); entityEventDetails.put(EVENT_S2S_VPN_CUSTOMER_GATEWAY_UPDATE, Site2SiteCustomerGateway.class);
entityEventDetails.put(EVENT_S2S_VPN_GATEWAY_OBSOLETE_PARAMS, Site2SiteCustomerGateway.class);
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_CREATE, Site2SiteVpnConnection.class); entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_CREATE, Site2SiteVpnConnection.class);
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_DELETE, Site2SiteVpnConnection.class); entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_DELETE, Site2SiteVpnConnection.class);
entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_RESET, Site2SiteVpnConnection.class); entityEventDetails.put(EVENT_S2S_VPN_CONNECTION_RESET, Site2SiteVpnConnection.class);

View File

@ -26,17 +26,19 @@ public interface Investigator extends Adapter {
* Returns if the vm is still alive. * Returns if the vm is still alive.
* *
* @param vm to work on. * @param vm to work on.
* @return true if vm is alive, otherwise false
*/ */
public boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM; boolean isVmAlive(VirtualMachine vm, Host host) throws UnknownVM;
public Status isAgentAlive(Host agent); /**
* Returns the agent status of the host.
*
* @param host
* @return status of the host agent
*/
Status getHostAgentStatus(Host host);
class UnknownVM extends Exception { class UnknownVM extends Exception {
/**
*
*/
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
}; };
} }

View File

@ -57,8 +57,14 @@ public interface Host extends StateObject<Status>, Identity, Partition, HAResour
String HOST_UEFI_ENABLE = "host.uefi.enable"; String HOST_UEFI_ENABLE = "host.uefi.enable";
String HOST_VOLUME_ENCRYPTION = "host.volume.encryption"; String HOST_VOLUME_ENCRYPTION = "host.volume.encryption";
String HOST_INSTANCE_CONVERSION = "host.instance.conversion"; String HOST_INSTANCE_CONVERSION = "host.instance.conversion";
String HOST_VDDK_SUPPORT = "host.vddk.support";
String HOST_VDDK_LIB_DIR = "vddk.lib.dir";
String HOST_VDDK_VERSION = "host.vddk.version";
String HOST_OVFTOOL_VERSION = "host.ovftool.version"; String HOST_OVFTOOL_VERSION = "host.ovftool.version";
String HOST_VIRTV2V_VERSION = "host.virtv2v.version"; String HOST_VIRTV2V_VERSION = "host.virtv2v.version";
String HOST_SSH_PORT = "host.ssh.port";
int DEFAULT_SSH_PORT = 22;
/** /**
* @return name of the machine. * @return name of the machine.

View File

@ -36,5 +36,4 @@ public interface HostStats {
public HostStats getHostStats(); public HostStats getHostStats();
public double getLoadAverage(); public double getLoadAverage();
// public double getXapiMemoryUsageKBs();
} }

View File

@ -98,7 +98,7 @@ public interface KubernetesCluster extends ControlledEntity, com.cloud.utils.fsm
s_fsm.addTransition(State.Running, Event.ScaleDownRequested, State.Scaling); s_fsm.addTransition(State.Running, Event.ScaleDownRequested, State.Scaling);
s_fsm.addTransition(State.Stopped, Event.ScaleUpRequested, State.ScalingStoppedCluster); s_fsm.addTransition(State.Stopped, Event.ScaleUpRequested, State.ScalingStoppedCluster);
s_fsm.addTransition(State.Scaling, Event.OperationSucceeded, State.Running); s_fsm.addTransition(State.Scaling, Event.OperationSucceeded, State.Running);
s_fsm.addTransition(State.Scaling, Event.OperationFailed, State.Alert); s_fsm.addTransition(State.Scaling, Event.OperationFailed, State.Running);
s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationSucceeded, State.Stopped); s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationSucceeded, State.Stopped);
s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationFailed, State.Alert); s_fsm.addTransition(State.ScalingStoppedCluster, Event.OperationFailed, State.Alert);

View File

@ -18,6 +18,7 @@ package com.cloud.kubernetes.cluster;
import org.apache.cloudstack.acl.ControlledEntity; import org.apache.cloudstack.acl.ControlledEntity;
import java.util.List;
import java.util.Map; import java.util.Map;
import com.cloud.user.Account; import com.cloud.user.Account;
@ -33,8 +34,10 @@ public interface KubernetesServiceHelper extends Adapter {
ControlledEntity findByUuid(String uuid); ControlledEntity findByUuid(String uuid);
ControlledEntity findByVmId(long vmId); ControlledEntity findByVmId(long vmId);
void checkVmCanBeDestroyed(UserVm userVm); void checkVmCanBeDestroyed(UserVm userVm);
void checkVmAffinityGroupsCanBeUpdated(UserVm userVm);
boolean isValidNodeType(String nodeType); boolean isValidNodeType(String nodeType);
Map<String, Long> getServiceOfferingNodeTypeMap(Map<String, Map<String, String>> serviceOfferingNodeTypeMap); Map<String, Long> getServiceOfferingNodeTypeMap(Map<String, Map<String, String>> serviceOfferingNodeTypeMap);
Map<String, Long> getTemplateNodeTypeMap(Map<String, Map<String, String>> templateNodeTypeMap); Map<String, Long> getTemplateNodeTypeMap(Map<String, Map<String, String>> templateNodeTypeMap);
Map<String, List<Long>> getAffinityGroupNodeTypeMap(Map<String, Map<String, String>> affinityGroupNodeTypeMap);
void cleanupForAccount(Account account); void cleanupForAccount(Account account);
} }

View File

@ -45,7 +45,7 @@ public interface Ipv6Service extends PluggableService, Configurable {
static final ConfigKey<Boolean> Ipv6OfferingCreationEnabled = new ConfigKey<Boolean>("Advanced", Boolean.class, static final ConfigKey<Boolean> Ipv6OfferingCreationEnabled = new ConfigKey<Boolean>("Advanced", Boolean.class,
"ipv6.offering.enabled", "ipv6.offering.enabled",
"false", "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); true);
static final ConfigKey<Integer> Ipv6PrefixSubnetCleanupInterval = new ConfigKey<Integer>("Advanced", Integer.class, static final ConfigKey<Integer> Ipv6PrefixSubnetCleanupInterval = new ConfigKey<Integer>("Advanced", Integer.class,

View File

@ -325,9 +325,9 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
public enum State { public enum State {
Allocated("Indicates the network configuration is in allocated but not setup"), Setup("Indicates the network configuration is setup"), Implementing( 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 implemented"), Implemented("Indicates the Network configuration is in use"), Shutdown(
"Indicates the network configuration is being destroyed"), Destroy("Indicates that the network is destroyed"); "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>(); protected static final StateMachine2<State, Network.Event, Network> s_fsm = new StateMachine2<State, Network.Event, Network>();
@ -510,4 +510,6 @@ public interface Network extends ControlledEntity, StateObject<Network.State>, I
Integer getPrivateMtu(); Integer getPrivateMtu();
Integer getNetworkCidrSize(); Integer getNetworkCidrSize();
boolean getKeepMacAddressOnPublicNic();
} }

View File

@ -125,6 +125,10 @@ public interface NetworkModel {
*/ */
String getNextAvailableMacAddressInNetwork(long networkConfigurationId) throws InsufficientAddressCapacityException; 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); PublicIpAddress getPublicIpAddress(long ipAddressId);
List<? extends Vlan> listPodVlans(long podId); List<? extends Vlan> listPodVlans(long podId);
@ -364,4 +368,8 @@ public interface NetworkModel {
boolean checkSecurityGroupSupportForNetwork(Account account, DataCenter zone, List<Long> networkIds, boolean checkSecurityGroupSupportForNetwork(Account account, DataCenter zone, List<Long> networkIds,
List<Long> securityGroupsIds); List<Long> securityGroupsIds);
default long getMacIdentifier(Long dataCenterId) {
return 0;
}
} }

View File

@ -385,6 +385,11 @@ public class NetworkProfile implements Network {
return networkCidrSize; return networkCidrSize;
} }
@Override
public boolean getKeepMacAddressOnPublicNic() {
return true;
}
@Override @Override
public String toString() { public String toString() {
return String.format("NetworkProfile %s", return String.format("NetworkProfile %s",

View File

@ -81,7 +81,7 @@ public interface NetworkService {
true, ConfigKey.Scope.Zone); true, ConfigKey.Scope.Zone);
public static final ConfigKey<Boolean> AllowUsersToSpecifyVRMtu = new ConfigKey<>("Advanced", Boolean.class, 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); true, ConfigKey.Scope.Zone);
List<? extends Network> getIsolatedNetworksOwnedByAccountInZone(long zoneId, Account owner); List<? extends Network> getIsolatedNetworksOwnedByAccountInZone(long zoneId, Account owner);
@ -108,6 +108,10 @@ public interface NetworkService {
PhysicalNetwork physicalNetwork, long zoneId, ControlledEntity.ACLType aclType) throws PhysicalNetwork physicalNetwork, long zoneId, ControlledEntity.ACLType aclType) throws
InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException; InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException;
Network createGuestNetwork(long networkOfferingId, String name, String displayText, Account owner,
PhysicalNetwork physicalNetwork, long zoneId, ControlledEntity.ACLType aclType, Pair<Integer, Integer> vrIfaceMTUs) throws
InsufficientCapacityException, ConcurrentOperationException, ResourceAllocationException;
Pair<List<? extends Network>, Integer> searchForNetworks(ListNetworksCmd cmd); Pair<List<? extends Network>, Integer> searchForNetworks(ListNetworksCmd cmd);
boolean deleteNetwork(long networkId, boolean forced); boolean deleteNetwork(long networkId, boolean forced);
@ -275,4 +279,6 @@ public interface NetworkService {
IpAddresses getIpAddressesFromIps(String ipAddress, String ip6Address, String macAddress); IpAddresses getIpAddressesFromIps(String ipAddress, String ip6Address, String macAddress);
String getNicVlanValueForExternalVm(NicTO nic); String getNicVlanValueForExternalVm(NicTO nic);
Long getPreferredNetworkIdForPublicIpRuleAssignment(IpAddress ip, Long networkId);
} }

View File

@ -78,7 +78,7 @@ public class Networks {
} }
@Override @Override
public String getValueFrom(URI uri) { public String getValueFrom(URI uri) {
return uri.getAuthority(); return uri == null ? null : uri.getAuthority();
} }
}, },
Vswitch("vs", String.class), LinkLocal(null, null), Vnet("vnet", Long.class), Storage("storage", Integer.class), Lswitch("lswitch", String.class) { 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 @Override
public String getValueFrom(URI uri) { public String getValueFrom(URI uri) {
return uri.getSchemeSpecificPart(); return uri == null ? null : uri.getSchemeSpecificPart();
} }
}, },
Mido("mido", String.class), Pvlan("pvlan", String.class), Mido("mido", String.class), Pvlan("pvlan", String.class),
@ -177,7 +177,7 @@ public class Networks {
* @return the scheme as BroadcastDomainType * @return the scheme as BroadcastDomainType
*/ */
public static BroadcastDomainType getSchemeValue(URI uri) { public static BroadcastDomainType getSchemeValue(URI uri) {
return toEnumValue(uri.getScheme()); return toEnumValue(uri == null ? null : uri.getScheme());
} }
/** /**
@ -191,7 +191,7 @@ public class Networks {
if (com.cloud.dc.Vlan.UNTAGGED.equalsIgnoreCase(str)) { if (com.cloud.dc.Vlan.UNTAGGED.equalsIgnoreCase(str)) {
return Native; return Native;
} }
return getSchemeValue(new URI(str)); return getSchemeValue(str == null ? null : new URI(str));
} }
/** /**
@ -220,7 +220,7 @@ public class Networks {
* @return the host part as String * @return the host part as String
*/ */
public String getValueFrom(URI uri) { public String getValueFrom(URI uri) {
return uri.getHost(); return uri == null ? null : uri.getHost();
} }
/** /**
@ -243,7 +243,7 @@ public class Networks {
* @throws URISyntaxException the string is not even an uri * @throws URISyntaxException the string is not even an uri
*/ */
public static String getValue(String uriString) throws URISyntaxException { public static String getValue(String uriString) throws URISyntaxException {
return getValue(new URI(uriString)); return getValue(uriString == null ? null : new URI(uriString));
} }
/** /**

View File

@ -41,4 +41,6 @@ public interface PhysicalNetworkTrafficType extends InternalIdentity, Identity {
String getHypervNetworkLabel(); String getHypervNetworkLabel();
String getOvm3NetworkLabel(); String getOvm3NetworkLabel();
String getVlan();
} }

View File

@ -43,7 +43,7 @@ public interface AutoScaleVmGroup extends ControlledEntity, InternalIdentity, Di
} else if (state.equalsIgnoreCase("scaling")) { } else if (state.equalsIgnoreCase("scaling")) {
return SCALING; return SCALING;
} else { } else {
throw new IllegalArgumentException("Unexpected AutoScale VM group state : " + state); throw new IllegalArgumentException("Unexpected AutoScale Instance group state : " + state);
} }
} }
} }

View File

@ -108,7 +108,7 @@ public interface LoadBalancingRulesService {
/** /**
* Assign a virtual machine or list of virtual machines, or Map of <vmId vmIp> to a load balancer. * Assign a virtual machine or list of virtual machines, or Map of <vmId vmIp> to a load balancer.
*/ */
boolean assignToLoadBalancer(long lbRuleId, List<Long> vmIds, Map<Long, List<String>> vmIdIpMap, boolean isAutoScaleVM); boolean assignToLoadBalancer(long lbRuleId, List<Long> vmIds, Map<Long, List<String>> vmIdIpMap, Map<Long, Long> vmIdNetworkMap, boolean isAutoScaleVM);
boolean assignSSLCertToLoadBalancerRule(Long lbRuleId, String certName, String publicCert, String privateKey); boolean assignSSLCertToLoadBalancerRule(Long lbRuleId, String certName, String publicCert, String privateKey);

View File

@ -108,8 +108,7 @@ public class LbStickinessMethod {
} }
public void addParam(String name, Boolean required, String description, Boolean isFlag) { public void addParam(String name, Boolean required, String description, Boolean isFlag) {
/* FIXME : UI is breaking if the capability string length is larger , temporarily description is commented out */ /* is this still a valid comment: FIXME : UI is breaking if the capability string length is larger , temporarily description is commented out */
// LbStickinessMethodParam param = new LbStickinessMethodParam(name, required, description);
LbStickinessMethodParam param = new LbStickinessMethodParam(name, required, " ", isFlag); LbStickinessMethodParam param = new LbStickinessMethodParam(name, required, " ", isFlag);
_paramList.add(param); _paramList.add(param);
return; return;
@ -133,7 +132,6 @@ public class LbStickinessMethod {
public void setDescription(String description) { public void setDescription(String description) {
/* FIXME : UI is breaking if the capability string length is larger , temporarily description is commented out */ /* FIXME : UI is breaking if the capability string length is larger , temporarily description is commented out */
//this.description = description;
this._description = " "; this._description = " ";
} }
} }

View File

@ -19,6 +19,7 @@ package com.cloud.network.vpc;
import java.util.List; import java.util.List;
import org.apache.cloudstack.api.command.user.network.CreateNetworkACLCmd; import org.apache.cloudstack.api.command.user.network.CreateNetworkACLCmd;
import org.apache.cloudstack.api.command.user.network.ImportNetworkACLCmd;
import org.apache.cloudstack.api.command.user.network.ListNetworkACLListsCmd; import org.apache.cloudstack.api.command.user.network.ListNetworkACLListsCmd;
import org.apache.cloudstack.api.command.user.network.ListNetworkACLsCmd; import org.apache.cloudstack.api.command.user.network.ListNetworkACLsCmd;
import org.apache.cloudstack.api.command.user.network.MoveNetworkAclItemCmd; import org.apache.cloudstack.api.command.user.network.MoveNetworkAclItemCmd;
@ -98,4 +99,6 @@ public interface NetworkACLService {
NetworkACLItem moveNetworkAclRuleToNewPosition(MoveNetworkAclItemCmd moveNetworkAclItemCmd); NetworkACLItem moveNetworkAclRuleToNewPosition(MoveNetworkAclItemCmd moveNetworkAclItemCmd);
NetworkACLItem moveRuleToTheTopInACLList(NetworkACLItem ruleBeingMoved); NetworkACLItem moveRuleToTheTopInACLList(NetworkACLItem ruleBeingMoved);
List<NetworkACLItem> importNetworkACLRules(ImportNetworkACLCmd cmd) throws ResourceUnavailableException;
} }

View File

@ -107,4 +107,6 @@ public interface Vpc extends ControlledEntity, Identity, InternalIdentity {
String getIp6Dns2(); String getIp6Dns2();
boolean useRouterIpAsResolver(); boolean useRouterIpAsResolver();
boolean getKeepMacAddressOnPublicNic();
} }

View File

@ -84,4 +84,6 @@ public interface VpcOffering extends InternalIdentity, Identity {
NetworkOffering.RoutingMode getRoutingMode(); NetworkOffering.RoutingMode getRoutingMode();
Boolean isSpecifyAsNumber(); Boolean isSpecifyAsNumber();
boolean isConserveMode();
} }

View File

@ -20,6 +20,7 @@ package com.cloud.network.vpc;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import org.apache.cloudstack.api.command.admin.vpc.CloneVPCOfferingCmd;
import org.apache.cloudstack.api.command.admin.vpc.CreateVPCOfferingCmd; import org.apache.cloudstack.api.command.admin.vpc.CreateVPCOfferingCmd;
import org.apache.cloudstack.api.command.admin.vpc.UpdateVPCOfferingCmd; import org.apache.cloudstack.api.command.admin.vpc.UpdateVPCOfferingCmd;
import org.apache.cloudstack.api.command.user.vpc.ListVPCOfferingsCmd; import org.apache.cloudstack.api.command.user.vpc.ListVPCOfferingsCmd;
@ -34,12 +35,14 @@ public interface VpcProvisioningService {
VpcOffering createVpcOffering(CreateVPCOfferingCmd cmd); VpcOffering createVpcOffering(CreateVPCOfferingCmd cmd);
VpcOffering cloneVPCOffering(CloneVPCOfferingCmd cmd);
VpcOffering createVpcOffering(String name, String displayText, List<String> supportedServices, VpcOffering createVpcOffering(String name, String displayText, List<String> supportedServices,
Map<String, List<String>> serviceProviders, Map<String, List<String>> serviceProviders,
Map serviceCapabilitystList, NetUtils.InternetProtocol internetProtocol, Map serviceCapabilitystList, NetUtils.InternetProtocol internetProtocol,
Long serviceOfferingId, String externalProvider, NetworkOffering.NetworkMode networkMode, Long serviceOfferingId, String externalProvider, NetworkOffering.NetworkMode networkMode,
List<Long> domainIds, List<Long> zoneIds, VpcOffering.State state, List<Long> domainIds, List<Long> zoneIds, VpcOffering.State state,
NetworkOffering.RoutingMode routingMode, boolean specifyAsNumber); NetworkOffering.RoutingMode routingMode, boolean specifyAsNumber, boolean conserveMode);
Pair<List<? extends VpcOffering>,Integer> listVpcOfferings(ListVPCOfferingsCmd cmd); Pair<List<? extends VpcOffering>,Integer> listVpcOfferings(ListVPCOfferingsCmd cmd);

View File

@ -58,7 +58,7 @@ public interface VpcService {
*/ */
Vpc createVpc(long zoneId, long vpcOffId, long vpcOwnerId, String vpcName, String displayText, String cidr, String networkDomain, Vpc createVpc(long zoneId, long vpcOffId, long vpcOwnerId, String vpcName, String displayText, String cidr, String networkDomain,
String ip4Dns1, String ip4Dns2, String ip6Dns1, String ip6Dns2, Boolean displayVpc, Integer publicMtu, Integer cidrSize, String ip4Dns1, String ip4Dns2, String ip6Dns1, String ip6Dns2, Boolean displayVpc, Integer publicMtu, Integer cidrSize,
Long asNumber, List<Long> bgpPeerIds, Boolean useVrIpResolver) throws ResourceAllocationException; Long asNumber, List<Long> bgpPeerIds, Boolean useVrIpResolver, boolean keepMacAddressOnPublicNic) throws ResourceAllocationException;
/** /**
* Persists VPC record in the database * Persists VPC record in the database
@ -104,7 +104,7 @@ public interface VpcService {
* @throws ResourceUnavailableException if during restart some resources may not be available * @throws ResourceUnavailableException if during restart some resources may not be available
* @throws InsufficientCapacityException if for instance no address space, compute or storage is sufficiently available * @throws InsufficientCapacityException if for instance no address space, compute or storage is sufficiently available
*/ */
Vpc updateVpc(long vpcId, String vpcName, String displayText, String customId, Boolean displayVpc, Integer mtu, String sourceNatIp) throws ResourceUnavailableException, InsufficientCapacityException; Vpc updateVpc(long vpcId, String vpcName, String displayText, String customId, Boolean displayVpc, Integer mtu, String sourceNatIp, Boolean keepMacAddressOnPublicNic) throws ResourceUnavailableException, InsufficientCapacityException;
/** /**
* Lists VPC(s) based on the parameters passed to the API call * Lists VPC(s) based on the parameters passed to the API call

View File

@ -71,12 +71,13 @@ import org.apache.cloudstack.api.command.user.vm.GetVMPasswordCmd;
import org.apache.cloudstack.api.command.user.vmgroup.UpdateVMGroupCmd; import org.apache.cloudstack.api.command.user.vmgroup.UpdateVMGroupCmd;
import org.apache.cloudstack.config.Configuration; import org.apache.cloudstack.config.Configuration;
import org.apache.cloudstack.config.ConfigurationGroup; import org.apache.cloudstack.config.ConfigurationGroup;
import org.apache.cloudstack.framework.config.ConfigKey;
import com.cloud.alert.Alert; import com.cloud.alert.Alert;
import com.cloud.capacity.Capacity; import com.cloud.capacity.Capacity;
import com.cloud.dc.Pod; import com.cloud.dc.Pod;
import com.cloud.dc.Vlan; 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.ConcurrentOperationException;
import com.cloud.exception.ManagementServerException; import com.cloud.exception.ManagementServerException;
import com.cloud.exception.ResourceUnavailableException; import com.cloud.exception.ResourceUnavailableException;
@ -97,6 +98,7 @@ import com.cloud.utils.Ternary;
import com.cloud.vm.InstanceGroup; import com.cloud.vm.InstanceGroup;
import com.cloud.vm.VirtualMachine; import com.cloud.vm.VirtualMachine;
import com.cloud.vm.VirtualMachine.Type; import com.cloud.vm.VirtualMachine.Type;
import com.cloud.vm.VirtualMachineProfile;
/** /**
* Hopefully this is temporary. * Hopefully this is temporary.
@ -105,14 +107,6 @@ import com.cloud.vm.VirtualMachine.Type;
public interface ManagementService { public interface ManagementService {
static final String Name = "management-server"; static final String Name = "management-server";
ConfigKey<Boolean> JsInterpretationEnabled = new ConfigKey<>("Hidden"
, Boolean.class
, "js.interpretation.enabled"
, "false"
, "Enable/Disable all JavaScript interpretation related functionalities to create or update Javascript rules."
, false
, ConfigKey.Scope.Global);
/** /**
* returns the a map of the names/values in the configuration table * returns the a map of the names/values in the configuration table
* *
@ -478,6 +472,19 @@ 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); 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 * 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, * volume can be migrated. Current pool is not included in the list. In case of vSphere datastore cluster storage pools,
@ -518,6 +525,4 @@ public interface ManagementService {
boolean removeManagementServer(RemoveManagementServerCmd cmd); boolean removeManagementServer(RemoveManagementServerCmd cmd);
void checkJsInterpretationAllowedIfNeededForParameterValue(String paramName, boolean paramValue);
} }

View File

@ -16,14 +16,14 @@
// under the License. // under the License.
package com.cloud.server; package com.cloud.server;
import org.apache.cloudstack.acl.ControlledEntity;
import org.apache.cloudstack.api.Identity;
import org.apache.cloudstack.api.InternalIdentity;
import java.util.HashMap; import java.util.HashMap;
import java.util.Locale; import java.util.Locale;
import java.util.Map; import java.util.Map;
import org.apache.cloudstack.acl.ControlledEntity;
import org.apache.cloudstack.api.Identity;
import org.apache.cloudstack.api.InternalIdentity;
public interface ResourceTag extends ControlledEntity, Identity, InternalIdentity { public interface ResourceTag extends ControlledEntity, Identity, InternalIdentity {
// FIXME - extract enum to another interface as its used both by resourceTags and resourceMetaData code // FIXME - extract enum to another interface as its used both by resourceTags and resourceMetaData code
@ -70,7 +70,7 @@ public interface ResourceTag extends ControlledEntity, Identity, InternalIdentit
GuestOs(false, true), GuestOs(false, true),
NetworkOffering(false, true), NetworkOffering(false, true),
VpcOffering(true, false), VpcOffering(true, false),
Domain(false, false, true), Domain(true, false, true),
ObjectStore(false, false, true); ObjectStore(false, false, true);

View File

@ -128,7 +128,7 @@ public class Storage {
public static enum TemplateType { public static enum TemplateType {
ROUTING, // Router template ROUTING, // Router template
SYSTEM, /* routing, system vm template */ SYSTEM, /* routing, system vm template */
BUILTIN, /* buildin template */ BUILTIN, /* builtin template */
PERHOST, /* every host has this template, don't need to install it in secondary storage */ PERHOST, /* every host has this template, don't need to install it in secondary storage */
USER, /* User supplied template/iso */ USER, /* User supplied template/iso */
VNF, /* VNFs (virtual network functions) template */ VNF, /* VNFs (virtual network functions) template */

View File

@ -56,9 +56,9 @@ public interface VolumeApiService {
Boolean.class, Boolean.class,
"use.https.to.upload", "use.https.to.upload",
"true", "true",
"Determines the protocol (HTTPS or HTTP) ACS will use to generate links to upload ISOs, volumes, and templates. When set as 'true', ACS will use protocol HTTPS, otherwise, it will use protocol HTTP. Default value is 'true'.", "Controls whether upload links for ISOs, volumes, and templates use HTTPS (true, default) or HTTP (false). After changing this setting, the Secondary Storage VM (SSVM) must be recreated",
true, true,
ConfigKey.Scope.StoragePool); ConfigKey.Scope.Zone);
/** /**
* Creates the database object for a volume based on the given criteria * Creates the database object for a volume based on the given criteria

View File

@ -21,12 +21,13 @@ import java.util.Map;
import com.cloud.utils.Pair; import com.cloud.utils.Pair;
import org.apache.cloudstack.acl.ControlledEntity; import org.apache.cloudstack.acl.ControlledEntity;
import org.apache.cloudstack.acl.RolePermissionEntity;
import org.apache.cloudstack.acl.RoleType; import org.apache.cloudstack.acl.RoleType;
import org.apache.cloudstack.acl.SecurityChecker.AccessType; import org.apache.cloudstack.acl.SecurityChecker.AccessType;
import org.apache.cloudstack.acl.apikeypair.ApiKeyPair;
import org.apache.cloudstack.acl.apikeypair.ApiKeyPairPermission;
import org.apache.cloudstack.api.BaseCmd;
import org.apache.cloudstack.api.command.admin.account.CreateAccountCmd; import org.apache.cloudstack.api.command.admin.account.CreateAccountCmd;
import org.apache.cloudstack.api.command.admin.user.GetUserKeysCmd;
import org.apache.cloudstack.api.command.admin.user.RegisterCmd;
import org.apache.cloudstack.api.command.admin.user.UpdateUserCmd;
import com.cloud.dc.DataCenter; import com.cloud.dc.DataCenter;
import com.cloud.domain.Domain; import com.cloud.domain.Domain;
@ -35,7 +36,16 @@ import com.cloud.network.vpc.VpcOffering;
import com.cloud.offering.DiskOffering; import com.cloud.offering.DiskOffering;
import com.cloud.offering.NetworkOffering; import com.cloud.offering.NetworkOffering;
import com.cloud.offering.ServiceOffering; import com.cloud.offering.ServiceOffering;
import org.apache.cloudstack.api.command.admin.user.DeleteUserKeysCmd;
import org.apache.cloudstack.api.command.admin.user.GetUserKeysCmd;
import org.apache.cloudstack.api.command.admin.user.ListUserKeyRulesCmd;
import org.apache.cloudstack.api.command.admin.user.ListUserKeysCmd;
import org.apache.cloudstack.api.command.admin.user.RegisterUserKeysCmd;
import org.apache.cloudstack.api.command.admin.user.UpdateUserCmd;
import org.apache.cloudstack.api.response.ApiKeyPairResponse;
import org.apache.cloudstack.api.response.ListResponse;
import org.apache.cloudstack.auth.UserTwoFactorAuthenticator; import org.apache.cloudstack.auth.UserTwoFactorAuthenticator;
import org.apache.cloudstack.backup.BackupOffering;
public interface AccountService { public interface AccountService {
@ -58,7 +68,8 @@ public interface AccountService {
User getSystemUser(); User getSystemUser();
User createUser(String userName, String password, String firstName, String lastName, String email, String timeZone, String accountName, Long domainId, String userUUID); User createUser(String userName, String password, String firstName, String lastName, String email, String timeZone,
String accountName, Long domainId, String userUUID, boolean isPasswordChangeRequired);
User createUser(String userName, String password, String firstName, String lastName, String email, String timeZone, String accountName, Long domainId, String userUUID, User createUser(String userName, String password, String firstName, String lastName, String email, String timeZone, String accountName, Long domainId, String userUUID,
User.Source source); User.Source source);
@ -95,7 +106,7 @@ public interface AccountService {
void markUserRegistered(long userId); void markUserRegistered(long userId);
public String[] createApiKeyAndSecretKey(RegisterCmd cmd); ApiKeyPair createApiKeyAndSecretKey(RegisterUserKeysCmd cmd);
public String[] createApiKeyAndSecretKey(final long userId); public String[] createApiKeyAndSecretKey(final long userId);
@ -115,13 +126,19 @@ public interface AccountService {
void checkAccess(Account account, VpcOffering vof, DataCenter zone) throws PermissionDeniedException; void checkAccess(Account account, VpcOffering vof, DataCenter zone) throws PermissionDeniedException;
void checkAccess(Account account, BackupOffering bof) throws PermissionDeniedException;
void checkAccess(User user, ControlledEntity entity); void checkAccess(User user, ControlledEntity entity);
void checkAccess(Account account, AccessType accessType, boolean sameOwner, String apiName, ControlledEntity... entities) throws PermissionDeniedException; void checkAccess(Account account, AccessType accessType, boolean sameOwner, String apiName, ControlledEntity... entities) throws PermissionDeniedException;
void validateAccountHasAccessToResource(Account account, AccessType accessType, Object resource); void validateAccountHasAccessToResource(Account account, AccessType accessType, Object resource);
Long finalyzeAccountId(String accountName, Long domainId, Long projectId, boolean enabledOnly); void validateCallingUserHasAccessToDesiredUser(Long userId);
Long finalizeAccountId(String accountName, Long domainId, Long projectId, boolean enabledOnly);
Long finalizeAccountId(Long accountId, String accountName, Long domainId, Long projectId);
/** /**
* returns the user account object for a given user id * returns the user account object for a given user id
@ -130,9 +147,15 @@ public interface AccountService {
*/ */
UserAccount getUserAccountById(Long userId); UserAccount getUserAccountById(Long userId);
public Pair<Boolean, Map<String, String>> getKeys(GetUserKeysCmd cmd); Pair<Boolean, Map<String, String>> getKeys(GetUserKeysCmd cmd);
public Pair<Boolean, Map<String, String>> getKeys(Long userId); ListResponse<ApiKeyPairResponse> listKeys(ListUserKeysCmd cmd);
List<ApiKeyPairPermission> listKeyRules(ListUserKeyRulesCmd cmd);
void deleteApiKey(DeleteUserKeysCmd cmd);
void deleteApiKey(ApiKeyPair id);
/** /**
* Lists user two-factor authentication provider plugins * Lists user two-factor authentication provider plugins
@ -147,4 +170,13 @@ public interface AccountService {
*/ */
UserTwoFactorAuthenticator getUserTwoFactorAuthenticationProvider(final Long domainId); UserTwoFactorAuthenticator getUserTwoFactorAuthenticationProvider(final Long domainId);
ApiKeyPair getLatestUserKeyPair(Long userId);
ApiKeyPair getKeyPairById(Long id);
ApiKeyPair getKeyPairByApiKey(String apiKey);
String getAccessingApiKey(BaseCmd cmd);
List<RolePermissionEntity> getAllKeypairPermissions(String apiKey);
} }

View File

@ -0,0 +1,21 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package com.cloud.user;
public enum ApiKeyPairState {
ENABLED, REMOVED, EXPIRED
}

View File

@ -35,7 +35,7 @@ import org.apache.cloudstack.resourcelimit.Reserver;
public interface ResourceLimitService { public interface ResourceLimitService {
static final ConfigKey<Long> MaxAccountSecondaryStorage = new ConfigKey<>("Account Defaults", Long.class, "max.account.secondary.storage", "400", 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", 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); "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", static final ConfigKey<Long> ResourceCountCheckInterval = new ConfigKey<>("Advanced", Long.class, "resourcecount.check.interval", "300",

View File

@ -65,14 +65,6 @@ public interface User extends OwnedBy, InternalIdentity {
public void setState(Account.State state); public void setState(Account.State state);
public String getApiKey();
public void setApiKey(String apiKey);
public String getSecretKey();
public void setSecretKey(String secretKey);
public String getTimezone(); public String getTimezone();
public void setTimezone(String timezone); public void setTimezone(String timezone);

View File

@ -39,10 +39,6 @@ public interface UserAccount extends InternalIdentity {
String getState(); String getState();
String getApiKey();
String getSecretKey();
Date getCreated(); Date getCreated();
Date getRemoved(); Date getRemoved();

View File

@ -162,4 +162,6 @@ public interface Nic extends Identity, InternalIdentity {
String getIPv6Address(); String getIPv6Address();
Integer getMtu(); Integer getMtu();
boolean isEnabled();
} }

View File

@ -52,6 +52,7 @@ public class NicProfile implements InternalIdentity, Serializable {
boolean defaultNic; boolean defaultNic;
Integer networkRate; Integer networkRate;
boolean isSecurityGroupEnabled; boolean isSecurityGroupEnabled;
boolean enabled;
Integer orderIndex; Integer orderIndex;
@ -87,6 +88,7 @@ public class NicProfile implements InternalIdentity, Serializable {
broadcastType = network.getBroadcastDomainType(); broadcastType = network.getBroadcastDomainType();
trafficType = network.getTrafficType(); trafficType = network.getTrafficType();
format = nic.getAddressFormat(); format = nic.getAddressFormat();
enabled = nic.isEnabled();
iPv4Address = nic.getIPv4Address(); iPv4Address = nic.getIPv4Address();
iPv4Netmask = nic.getIPv4Netmask(); iPv4Netmask = nic.getIPv4Netmask();
@ -414,6 +416,14 @@ public class NicProfile implements InternalIdentity, Serializable {
this.ipv4AllocationRaceCheck = ipv4AllocationRaceCheck; this.ipv4AllocationRaceCheck = ipv4AllocationRaceCheck;
} }
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
// //
// OTHER METHODS // OTHER METHODS
// //

View File

@ -40,6 +40,7 @@ import org.apache.cloudstack.api.command.user.vm.ScaleVMCmd;
import org.apache.cloudstack.api.command.user.vm.StartVMCmd; import org.apache.cloudstack.api.command.user.vm.StartVMCmd;
import org.apache.cloudstack.api.command.user.vm.UpdateDefaultNicForVMCmd; import org.apache.cloudstack.api.command.user.vm.UpdateDefaultNicForVMCmd;
import org.apache.cloudstack.api.command.user.vm.UpdateVMCmd; import org.apache.cloudstack.api.command.user.vm.UpdateVMCmd;
import org.apache.cloudstack.api.command.user.vm.UpdateVmNicCmd;
import org.apache.cloudstack.api.command.user.vm.UpdateVmNicIpCmd; import org.apache.cloudstack.api.command.user.vm.UpdateVmNicIpCmd;
import org.apache.cloudstack.api.command.user.vm.UpgradeVMCmd; import org.apache.cloudstack.api.command.user.vm.UpgradeVMCmd;
import org.apache.cloudstack.api.command.user.vmgroup.CreateVMGroupCmd; import org.apache.cloudstack.api.command.user.vmgroup.CreateVMGroupCmd;
@ -152,6 +153,8 @@ public interface UserVmService {
*/ */
UserVm updateNicIpForVirtualMachine(UpdateVmNicIpCmd cmd); UserVm updateNicIpForVirtualMachine(UpdateVmNicIpCmd cmd);
UserVm updateVirtualMachineNic(UpdateVmNicCmd cmd);
UserVm recoverVirtualMachine(RecoverVMCmd cmd) throws ResourceAllocationException; UserVm recoverVirtualMachine(RecoverVMCmd cmd) throws ResourceAllocationException;
/** /**
@ -524,6 +527,7 @@ public interface UserVmService {
* @param userId user ID * @param userId user ID
* @param serviceOffering service offering for the imported VM * @param serviceOffering service offering for the imported VM
* @param sshPublicKey ssh key for the imported VM * @param sshPublicKey ssh key for the imported VM
* @param guestOsId guest OS ID for the imported VM (if not passed, then the guest OS of the template will be used)
* @param hostName the name for the imported VM * @param hostName the name for the imported VM
* @param hypervisorType hypervisor type for the imported VM * @param hypervisorType hypervisor type for the imported VM
* @param customParameters details for the imported VM * @param customParameters details for the imported VM
@ -533,7 +537,7 @@ public interface UserVmService {
* @throws InsufficientCapacityException in case of errors * @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 instanceNameInternal, 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 long accountId, final long userId, final ServiceOffering serviceOffering, final String sshPublicKey, final Long guestOsId,
final String hostName, final HypervisorType hypervisorType, final Map<String, String> customParameters, final String hostName, final HypervisorType hypervisorType, final Map<String, String> customParameters,
final VirtualMachine.PowerState powerState, final LinkedHashMap<String, List<NicProfile>> networkNicMap) throws InsufficientCapacityException; final VirtualMachine.PowerState powerState, final LinkedHashMap<String, List<NicProfile>> networkNicMap) throws InsufficientCapacityException;

View File

@ -124,6 +124,9 @@ public interface VirtualMachine extends RunningOn, ControlledEntity, Partition,
s_fsm.addTransition(new Transition<State, Event>(State.Stopping, VirtualMachine.Event.StopRequested, State.Stopping, null)); s_fsm.addTransition(new Transition<State, Event>(State.Stopping, VirtualMachine.Event.StopRequested, State.Stopping, null));
s_fsm.addTransition(new Transition<State, Event>(State.Stopping, VirtualMachine.Event.AgentReportShutdowned, State.Stopped, Arrays.asList(new Impact[]{Impact.USAGE}))); s_fsm.addTransition(new Transition<State, Event>(State.Stopping, VirtualMachine.Event.AgentReportShutdowned, State.Stopped, Arrays.asList(new Impact[]{Impact.USAGE})));
s_fsm.addTransition(new Transition<State, Event>(State.Expunging, VirtualMachine.Event.OperationFailed, State.Expunging,null)); s_fsm.addTransition(new Transition<State, Event>(State.Expunging, VirtualMachine.Event.OperationFailed, State.Expunging,null));
// Note: In addition to the Stopped -> Error transition for failed VM creation,
// a VM can also transition from Expunging to Error on OperationFailedToError.
s_fsm.addTransition(new Transition<State, Event>(State.Expunging, VirtualMachine.Event.OperationFailedToError, State.Error, null));
s_fsm.addTransition(new Transition<State, Event>(State.Expunging, VirtualMachine.Event.ExpungeOperation, State.Expunging,null)); s_fsm.addTransition(new Transition<State, Event>(State.Expunging, VirtualMachine.Event.ExpungeOperation, State.Expunging,null));
s_fsm.addTransition(new Transition<State, Event>(State.Error, VirtualMachine.Event.DestroyRequested, State.Expunging, null)); s_fsm.addTransition(new Transition<State, Event>(State.Error, VirtualMachine.Event.DestroyRequested, State.Expunging, null));
s_fsm.addTransition(new Transition<State, Event>(State.Error, VirtualMachine.Event.ExpungeOperation, State.Expunging, null)); s_fsm.addTransition(new Transition<State, Event>(State.Error, VirtualMachine.Event.ExpungeOperation, State.Expunging, null));

View File

@ -55,6 +55,9 @@ public interface VmDetailConstants {
String NIC_MULTIQUEUE_NUMBER = "nic.multiqueue.number"; String NIC_MULTIQUEUE_NUMBER = "nic.multiqueue.number";
String NIC_PACKED_VIRTQUEUES_ENABLED = "nic.packed.virtqueues.enabled"; 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) // Mac OSX guest specific (internal)
String SMC_PRESENT = "smc.present"; String SMC_PRESENT = "smc.present";
String FIRMWARE = "firmware"; String FIRMWARE = "firmware";
@ -93,6 +96,7 @@ public interface VmDetailConstants {
String CKS_NODE_TYPE = "node"; String CKS_NODE_TYPE = "node";
String OFFERING = "offering"; String OFFERING = "offering";
String TEMPLATE = "template"; String TEMPLATE = "template";
String AFFINITY_GROUP = "affinitygroup";
// VMware to KVM VM migrations specific // VMware to KVM VM migrations specific
String VMWARE_TO_KVM_PREFIX = "vmware-to-kvm"; String VMWARE_TO_KVM_PREFIX = "vmware-to-kvm";

View File

@ -29,10 +29,10 @@ import com.cloud.utils.fsm.StateObject;
public interface VMSnapshot extends ControlledEntity, Identity, InternalIdentity, StateObject<VMSnapshot.State> { public interface VMSnapshot extends ControlledEntity, Identity, InternalIdentity, StateObject<VMSnapshot.State> {
enum State { enum State {
Allocated("The VM snapshot is allocated but has not been created yet."), Creating("The VM snapshot is being created."), Ready( Allocated("The Instance Snapshot is allocated but has not been created yet."), Creating("The Instance 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 Instance Snapshot is ready to be used."), Reverting("The Instance Snapshot is being used to revert"), Expunging("The volume is being expunging"), Removed(
"The volume is destroyed, and can't be recovered."), Error("The volume is in error state, and can't be recovered"), "The volume is destroyed, and can't be recovered."), Error("The volume is in error state, and can't be recovered"),
Hidden("The VM snapshot is hidden from the user and cannot be recovered."); Hidden("The Instance snapshot is hidden from the user and cannot be recovered.");
String _description; String _description;

View File

@ -20,6 +20,7 @@ import com.cloud.exception.PermissionDeniedException;
import com.cloud.user.Account; import com.cloud.user.Account;
import com.cloud.user.User; import com.cloud.user.User;
import com.cloud.utils.component.Adapter; import com.cloud.utils.component.Adapter;
import org.apache.cloudstack.acl.apikeypair.ApiKeyPairPermission;
import java.util.List; import java.util.List;
@ -31,8 +32,8 @@ public interface APIChecker extends Adapter {
// If true, apiChecker has checked the operation // If true, apiChecker has checked the operation
// If false, apiChecker is unable to handle the operation or not implemented // If false, apiChecker is unable to handle the operation or not implemented
// On exception, checkAccess failed don't allow // On exception, checkAccess failed don't allow
boolean checkAccess(User user, String apiCommandName) throws PermissionDeniedException; boolean checkAccess(User user, String apiCommandName, ApiKeyPairPermission... apiKeyPairPermissions) throws PermissionDeniedException;
boolean checkAccess(Account account, String apiCommandName) throws PermissionDeniedException; boolean checkAccess(Account account, String apiCommandName, ApiKeyPairPermission... apiKeyPairPermissions) throws PermissionDeniedException;
/** /**
* Verifies if the account has permission for the given list of APIs and returns only the allowed ones. * Verifies if the account has permission for the given list of APIs and returns only the allowed ones.
* *
@ -43,4 +44,5 @@ public interface APIChecker extends Adapter {
*/ */
List<String> getApisAllowedToUser(Role role, User user, List<String> apiNames) throws PermissionDeniedException; List<String> getApisAllowedToUser(Role role, User user, List<String> apiNames) throws PermissionDeniedException;
boolean isEnabled(); boolean isEnabled();
List<RolePermissionEntity> getImplicitRolePermissions(RoleType roleType);
} }

View File

@ -21,7 +21,7 @@ import org.apache.cloudstack.api.Identity;
import org.apache.cloudstack.api.InternalIdentity; import org.apache.cloudstack.api.InternalIdentity;
public interface RolePermissionEntity extends InternalIdentity, Identity { public interface RolePermissionEntity extends InternalIdentity, Identity {
public enum Permission { enum Permission {
ALLOW, DENY ALLOW, DENY
} }
Rule getRule(); Rule getRule();

View File

@ -104,5 +104,26 @@ public interface RoleService {
List<RolePermission> findAllPermissionsBy(Long roleId); List<RolePermission> findAllPermissionsBy(Long roleId);
List<RolePermissionEntity> findAllRolePermissionsEntityBy(Long roleId, boolean considerImplicitRules);
Permission getRolePermission(String permission); Permission getRolePermission(String permission);
int removeRolesIfNeeded(List<? extends Role> roles);
/**
* Checks if the role of the caller account has compatible permissions of the specified role permissions.
* For each permission of the {@param rolePermissionsToAccess}, the role of the caller needs to contain the same permission.
*
* @param rolePermissions the permissions of the caller role.
* @param rolePermissionsToAccess the permissions for the role that the caller role wants to access.
* @return True if the role can be accessed with the given permissions; false otherwise.
*/
boolean roleHasPermission(Map<String, RolePermissionEntity> rolePermissions, List<RolePermissionEntity> rolePermissionsToAccess);
/**
* Given a list of role permissions, returns a {@link Map} containing the API name as the key and the {@link RolePermissionEntity} for the API as the value.
*
* @param rolePermissions Permissions for the role from role.
*/
Map<String, RolePermissionEntity> getRoleRulesAndPermissions(List<RolePermissionEntity> rolePermissions);
} }

View File

@ -132,10 +132,10 @@ public enum RoleType {
* */ * */
public static Account.Type getAccountTypeByRole(final Role role, final Account.Type defautAccountType) { public static Account.Type getAccountTypeByRole(final Role role, final Account.Type defautAccountType) {
if (role != null) { if (role != null) {
LOGGER.debug(String.format("Role [%s] is not null; therefore, we use its account type [%s].", role, defautAccountType)); LOGGER.debug("Role [{}] is not null; therefore, we use its Account type [{}].", role, defautAccountType);
return role.getRoleType().getAccountType(); return role.getRoleType().getAccountType();
} }
LOGGER.debug(String.format("Role is null; therefore, we use the default account type [%s] value.", defautAccountType)); LOGGER.debug("Role is null; therefore, we use the default Account type [{}] value.", defautAccountType);
return defautAccountType; return defautAccountType;
} }
} }

View File

@ -25,16 +25,18 @@ import org.apache.commons.lang3.StringUtils;
public final class Rule { public final class Rule {
private final String rule; private final String rule;
private final Pattern matchingPattern;
private final static Pattern ALLOWED_PATTERN = Pattern.compile("^[a-zA-Z0-9*]+$"); private final static Pattern ALLOWED_PATTERN = Pattern.compile("^[a-zA-Z0-9*]+$");
public Rule(final String rule) { public Rule(final String rule) {
validate(rule); validate(rule);
this.rule = rule; this.rule = rule;
matchingPattern = Pattern.compile(rule.toLowerCase().replace("*", "(\\w*\\*?)+"));
} }
public boolean matches(final String commandName) { public boolean matches(final String commandName) {
return StringUtils.isNotEmpty(commandName) return StringUtils.isNotEmpty(commandName) &&
&& commandName.toLowerCase().matches(rule.toLowerCase().replace("*", "\\w*")); matchingPattern.matcher(commandName.toLowerCase()).matches();
} }
public String getRuleString() { public String getRuleString() {

View File

@ -27,6 +27,8 @@ import com.cloud.user.Account;
import com.cloud.user.User; import com.cloud.user.User;
import com.cloud.utils.component.Adapter; import com.cloud.utils.component.Adapter;
import org.apache.cloudstack.backup.BackupOffering;
/** /**
* SecurityChecker checks the ownership and access control to objects within * SecurityChecker checks the ownership and access control to objects within
*/ */
@ -145,4 +147,6 @@ public interface SecurityChecker extends Adapter {
boolean checkAccess(Account account, NetworkOffering nof, DataCenter zone) throws PermissionDeniedException; boolean checkAccess(Account account, NetworkOffering nof, DataCenter zone) throws PermissionDeniedException;
boolean checkAccess(Account account, VpcOffering vof, DataCenter zone) throws PermissionDeniedException; boolean checkAccess(Account account, VpcOffering vof, DataCenter zone) throws PermissionDeniedException;
boolean checkAccess(Account account, BackupOffering bof) throws PermissionDeniedException;
} }

View File

@ -0,0 +1,38 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.acl.apikeypair;
import org.apache.cloudstack.acl.ControlledEntity;
import org.apache.cloudstack.api.Identity;
import org.apache.cloudstack.api.InternalIdentity;
import java.util.Date;
public interface ApiKeyPair extends ControlledEntity, InternalIdentity, Identity {
Long getUserId();
Date getStartDate();
Date getEndDate();
Date getCreated();
String getDescription();
String getApiKey();
String getSecretKey();
String getName();
Date getRemoved();
void setRemoved(Date date);
void validateDate();
boolean hasEndDatePassed();
}

View File

@ -0,0 +1,23 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.acl.apikeypair;
import org.apache.cloudstack.acl.RolePermissionEntity;
public interface ApiKeyPairPermission extends RolePermissionEntity {
long getApiKeyPairId();
}

View File

@ -0,0 +1,27 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.
package org.apache.cloudstack.acl.apikeypair;
import java.util.List;
public interface ApiKeyPairService {
List<ApiKeyPairPermission> findAllPermissionsByKeyPairId(Long apiKeyPairId, Long roleId);
ApiKeyPair findByApiKey(String apiKey);
ApiKeyPair findById(Long id);
}

View File

@ -34,27 +34,27 @@ import com.cloud.serializer.Param;
public class AffinityGroupResponse extends BaseResponse implements ControlledViewEntityResponse { public class AffinityGroupResponse extends BaseResponse implements ControlledViewEntityResponse {
@SerializedName(ApiConstants.ID) @SerializedName(ApiConstants.ID)
@Param(description = "the ID of the affinity group") @Param(description = "The ID of the affinity group")
private String id; private String id;
@SerializedName(ApiConstants.NAME) @SerializedName(ApiConstants.NAME)
@Param(description = "the name of the affinity group") @Param(description = "The name of the affinity group")
private String name; private String name;
@SerializedName(ApiConstants.DESCRIPTION) @SerializedName(ApiConstants.DESCRIPTION)
@Param(description = "the description of the affinity group") @Param(description = "The description of the affinity group")
private String description; private String description;
@SerializedName(ApiConstants.ACCOUNT) @SerializedName(ApiConstants.ACCOUNT)
@Param(description = "the account owning the affinity group") @Param(description = "The account owning the affinity group")
private String accountName; private String accountName;
@SerializedName(ApiConstants.DOMAIN_ID) @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; private String domainId;
@SerializedName(ApiConstants.DOMAIN) @SerializedName(ApiConstants.DOMAIN)
@Param(description = "the domain name of the affinity group") @Param(description = "The domain name of the affinity group")
private String domainName; private String domainName;
@SerializedName(ApiConstants.DOMAIN_PATH) @SerializedName(ApiConstants.DOMAIN_PATH)
@ -62,19 +62,19 @@ public class AffinityGroupResponse extends BaseResponse implements ControlledVie
private String domainPath; private String domainPath;
@SerializedName(ApiConstants.PROJECT_ID) @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; private String projectId;
@SerializedName(ApiConstants.PROJECT) @SerializedName(ApiConstants.PROJECT)
@Param(description = "the project name of the affinity group") @Param(description = "The project name of the affinity group")
private String projectName; private String projectName;
@SerializedName(ApiConstants.TYPE) @SerializedName(ApiConstants.TYPE)
@Param(description = "the type of the affinity group") @Param(description = "The type of the affinity group")
private String type; private String type;
@SerializedName("virtualmachineIds") @SerializedName("virtualmachineIds")
@Param(description = "virtual machine IDs associated with this affinity group") @Param(description = "Instance IDs associated with this affinity group")
private List<String> vmIdList; private List<String> vmIdList;
@SerializedName("dedicatedresources") @SerializedName("dedicatedresources")

View File

@ -66,5 +66,4 @@ public interface AffinityGroupService {
boolean isAffinityGroupAvailableInDomain(long affinityGroupId, long domainId); boolean isAffinityGroupAvailableInDomain(long affinityGroupId, long domainId);
} }

View File

@ -29,7 +29,7 @@ import com.cloud.serializer.Param;
public class AffinityGroupTypeResponse extends BaseResponse { public class AffinityGroupTypeResponse extends BaseResponse {
@SerializedName(ApiConstants.TYPE) @SerializedName(ApiConstants.TYPE)
@Param(description = "the type of the affinity group") @Param(description = "The type of the affinity group")
private String type; private String type;
public AffinityGroupTypeResponse() { public AffinityGroupTypeResponse() {

View File

@ -29,6 +29,9 @@ import java.util.List;
public class AffinityProcessorBase extends AdapterBase implements AffinityGroupProcessor { public class AffinityProcessorBase extends AdapterBase implements AffinityGroupProcessor {
public static final String AFFINITY_TYPE_HOST = "host affinity";
public static final String AFFINITY_TYPE_HOST_ANTI = "host anti-affinity";
protected String _type; protected String _type;
@Override @Override

View File

@ -24,18 +24,24 @@ import com.cloud.exception.InvalidParameterValueException;
public interface AlertService { public interface AlertService {
public static class AlertType { public static class AlertType {
private static Set<AlertType> defaultAlertTypes = new HashSet<AlertType>(); private static final Set<AlertType> defaultAlertTypes = new HashSet<>();
private final String name; private final String name;
private final short type; private final short type;
private final boolean repetitionAllowed;
private AlertType(short type, String name, boolean isDefault) { private AlertType(short type, String name, boolean isDefault, boolean repetitionAllowed) {
this.name = name; this.name = name;
this.type = type; this.type = type;
this.repetitionAllowed = repetitionAllowed;
if (isDefault) { if (isDefault) {
defaultAlertTypes.add(this); defaultAlertTypes.add(this);
} }
} }
private AlertType(short type, String name, boolean isDefault) {
this(type, name, isDefault, false);
}
public static final AlertType ALERT_TYPE_MEMORY = new AlertType(Capacity.CAPACITY_TYPE_MEMORY, "ALERT.MEMORY", true); public static final AlertType ALERT_TYPE_MEMORY = new AlertType(Capacity.CAPACITY_TYPE_MEMORY, "ALERT.MEMORY", true);
public static final AlertType ALERT_TYPE_CPU = new AlertType(Capacity.CAPACITY_TYPE_CPU, "ALERT.CPU", true); public static final AlertType ALERT_TYPE_CPU = new AlertType(Capacity.CAPACITY_TYPE_CPU, "ALERT.CPU", true);
public static final AlertType ALERT_TYPE_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_STORAGE, "ALERT.STORAGE", true); public static final AlertType ALERT_TYPE_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_STORAGE, "ALERT.STORAGE", true);
@ -45,35 +51,36 @@ public interface AlertService {
public static final AlertType ALERT_TYPE_VIRTUAL_NETWORK_IPV6_SUBNET = new AlertType(Capacity.CAPACITY_TYPE_VIRTUAL_NETWORK_IPV6_SUBNET, "ALERT.NETWORK.IPV6SUBNET", true); public static final AlertType ALERT_TYPE_VIRTUAL_NETWORK_IPV6_SUBNET = new AlertType(Capacity.CAPACITY_TYPE_VIRTUAL_NETWORK_IPV6_SUBNET, "ALERT.NETWORK.IPV6SUBNET", true);
public static final AlertType ALERT_TYPE_PRIVATE_IP = new AlertType(Capacity.CAPACITY_TYPE_PRIVATE_IP, "ALERT.NETWORK.PRIVATEIP", true); public static final AlertType ALERT_TYPE_PRIVATE_IP = new AlertType(Capacity.CAPACITY_TYPE_PRIVATE_IP, "ALERT.NETWORK.PRIVATEIP", true);
public static final AlertType ALERT_TYPE_SECONDARY_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_SECONDARY_STORAGE, "ALERT.STORAGE.SECONDARY", true); public static final AlertType ALERT_TYPE_SECONDARY_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_SECONDARY_STORAGE, "ALERT.STORAGE.SECONDARY", true);
public static final AlertType ALERT_TYPE_HOST = new AlertType((short)7, "ALERT.COMPUTE.HOST", true); public static final AlertType ALERT_TYPE_HOST = new AlertType((short)7, "ALERT.COMPUTE.HOST", true, true);
public static final AlertType ALERT_TYPE_USERVM = new AlertType((short)8, "ALERT.USERVM", true); public static final AlertType ALERT_TYPE_USERVM = new AlertType((short)8, "ALERT.USERVM", true, true);
public static final AlertType ALERT_TYPE_DOMAIN_ROUTER = new AlertType((short)9, "ALERT.SERVICE.DOMAINROUTER", true); public static final AlertType ALERT_TYPE_DOMAIN_ROUTER = new AlertType((short)9, "ALERT.SERVICE.DOMAINROUTER", true, true);
public static final AlertType ALERT_TYPE_CONSOLE_PROXY = new AlertType((short)10, "ALERT.SERVICE.CONSOLEPROXY", true); public static final AlertType ALERT_TYPE_CONSOLE_PROXY = new AlertType((short)10, "ALERT.SERVICE.CONSOLEPROXY", true, true);
public static final AlertType ALERT_TYPE_ROUTING = new AlertType((short)11, "ALERT.NETWORK.ROUTING", true); public static final AlertType ALERT_TYPE_ROUTING = new AlertType((short)11, "ALERT.NETWORK.ROUTING", true);
public static final AlertType ALERT_TYPE_STORAGE_MISC = new AlertType((short)12, "ALERT.STORAGE.MISC", true); public static final AlertType ALERT_TYPE_STORAGE_MISC = new AlertType((short)12, "ALERT.STORAGE.MISC", true, true);
public static final AlertType ALERT_TYPE_USAGE_SERVER = new AlertType((short)13, "ALERT.USAGE", true); public static final AlertType ALERT_TYPE_USAGE_SERVER = new AlertType((short)13, "ALERT.USAGE", true);
public static final AlertType ALERT_TYPE_MANAGEMENT_NODE = new AlertType((short)14, "ALERT.MANAGEMENT", true); public static final AlertType ALERT_TYPE_MANAGEMENT_NODE = new AlertType((short)14, "ALERT.MANAGEMENT", true, true);
public static final AlertType ALERT_TYPE_DOMAIN_ROUTER_MIGRATE = new AlertType((short)15, "ALERT.NETWORK.DOMAINROUTERMIGRATE", true); public static final AlertType ALERT_TYPE_DOMAIN_ROUTER_MIGRATE = new AlertType((short)15, "ALERT.NETWORK.DOMAINROUTERMIGRATE", true);
public static final AlertType ALERT_TYPE_CONSOLE_PROXY_MIGRATE = new AlertType((short)16, "ALERT.SERVICE.CONSOLEPROXYMIGRATE", true); public static final AlertType ALERT_TYPE_CONSOLE_PROXY_MIGRATE = new AlertType((short)16, "ALERT.SERVICE.CONSOLEPROXYMIGRATE", true);
public static final AlertType ALERT_TYPE_USERVM_MIGRATE = new AlertType((short)17, "ALERT.USERVM.MIGRATE", true); public static final AlertType ALERT_TYPE_USERVM_MIGRATE = new AlertType((short)17, "ALERT.USERVM.MIGRATE", true);
public static final AlertType ALERT_TYPE_VLAN = new AlertType((short)18, "ALERT.NETWORK.VLAN", true); public static final AlertType ALERT_TYPE_VLAN = new AlertType((short)18, "ALERT.NETWORK.VLAN", true);
public static final AlertType ALERT_TYPE_SSVM = new AlertType((short)19, "ALERT.SERVICE.SSVM", true); public static final AlertType ALERT_TYPE_SSVM = new AlertType((short)19, "ALERT.SERVICE.SSVM", true, true);
public static final AlertType ALERT_TYPE_USAGE_SERVER_RESULT = new AlertType((short)20, "ALERT.USAGE.RESULT", true); public static final AlertType ALERT_TYPE_USAGE_SERVER_RESULT = new AlertType((short)20, "ALERT.USAGE.RESULT", true);
public static final AlertType ALERT_TYPE_STORAGE_DELETE = new AlertType((short)21, "ALERT.STORAGE.DELETE", true); public static final AlertType ALERT_TYPE_STORAGE_DELETE = new AlertType((short)21, "ALERT.STORAGE.DELETE", true);
public static final AlertType ALERT_TYPE_UPDATE_RESOURCE_COUNT = new AlertType((short)22, "ALERT.RESOURCE.COUNT", true); public static final AlertType ALERT_TYPE_UPDATE_RESOURCE_COUNT = new AlertType((short)22, "ALERT.RESOURCE.COUNT", true);
public static final AlertType ALERT_TYPE_USAGE_SANITY_RESULT = new AlertType((short)23, "ALERT.USAGE.SANITY", true); public static final AlertType ALERT_TYPE_USAGE_SANITY_RESULT = new AlertType((short)23, "ALERT.USAGE.SANITY", true);
public static final AlertType ALERT_TYPE_DIRECT_ATTACHED_PUBLIC_IP = new AlertType((short)24, "ALERT.NETWORK.DIRECTPUBLICIP", true); public static final AlertType ALERT_TYPE_DIRECT_ATTACHED_PUBLIC_IP = new AlertType((short)24, "ALERT.NETWORK.DIRECTPUBLICIP", true);
public static final AlertType ALERT_TYPE_LOCAL_STORAGE = new AlertType((short)25, "ALERT.STORAGE.LOCAL", true); public static final AlertType ALERT_TYPE_LOCAL_STORAGE = new AlertType((short)25, "ALERT.STORAGE.LOCAL", true);
public static final AlertType ALERT_TYPE_RESOURCE_LIMIT_EXCEEDED = new AlertType((short)26, "ALERT.RESOURCE.EXCEED", true); public static final AlertType ALERT_TYPE_RESOURCE_LIMIT_EXCEEDED = new AlertType((short)26, "ALERT.RESOURCE.EXCEED", true, true);
public static final AlertType ALERT_TYPE_SYNC = new AlertType((short)27, "ALERT.TYPE.SYNC", true); public static final AlertType ALERT_TYPE_SYNC = new AlertType((short)27, "ALERT.TYPE.SYNC", true);
public static final AlertType ALERT_TYPE_UPLOAD_FAILED = new AlertType((short)28, "ALERT.UPLOAD.FAILED", true); public static final AlertType ALERT_TYPE_UPLOAD_FAILED = new AlertType((short)28, "ALERT.UPLOAD.FAILED", true, true);
public static final AlertType ALERT_TYPE_OOBM_AUTH_ERROR = new AlertType((short)29, "ALERT.OOBM.AUTHERROR", true); public static final AlertType ALERT_TYPE_OOBM_AUTH_ERROR = new AlertType((short)29, "ALERT.OOBM.AUTHERROR", true, true);
public static final AlertType ALERT_TYPE_HA_ACTION = new AlertType((short)30, "ALERT.HA.ACTION", true); public static final AlertType ALERT_TYPE_HA_ACTION = new AlertType((short)30, "ALERT.HA.ACTION", true, true);
public static final AlertType ALERT_TYPE_CA_CERT = new AlertType((short)31, "ALERT.CA.CERT", true); public static final AlertType ALERT_TYPE_CA_CERT = new AlertType((short)31, "ALERT.CA.CERT", true, true);
public static final AlertType ALERT_TYPE_VM_SNAPSHOT = new AlertType((short)32, "ALERT.VM.SNAPSHOT", true); public static final AlertType ALERT_TYPE_VM_SNAPSHOT = new AlertType((short)32, "ALERT.VM.SNAPSHOT", true);
public static final AlertType ALERT_TYPE_VR_PUBLIC_IFACE_MTU = new AlertType((short)32, "ALERT.VR.PUBLIC.IFACE.MTU", true); public static final AlertType ALERT_TYPE_VR_PUBLIC_IFACE_MTU = new AlertType((short)33, "ALERT.VR.PUBLIC.IFACE.MTU", true);
public static final AlertType ALERT_TYPE_VR_PRIVATE_IFACE_MTU = new AlertType((short)32, "ALERT.VR.PRIVATE.IFACE.MTU", true); public static final AlertType ALERT_TYPE_VR_PRIVATE_IFACE_MTU = new AlertType((short)34, "ALERT.VR.PRIVATE.IFACE.MTU", true);
public static final AlertType ALERT_TYPE_EXTENSION_PATH_NOT_READY = new AlertType((short)33, "ALERT.TYPE.EXTENSION.PATH.NOT.READY", true); public static final AlertType ALERT_TYPE_EXTENSION_PATH_NOT_READY = new AlertType((short)33, "ALERT.TYPE.EXTENSION.PATH.NOT.READY", true, true);
public static final AlertType ALERT_TYPE_VPN_GATEWAY_OBSOLETE_PARAMETERS = new AlertType((short)34, "ALERT.S2S.VPN.GATEWAY.OBSOLETE.PARAMETERS", true, true);
public static final AlertType ALERT_TYPE_BACKUP_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_BACKUP_STORAGE, "ALERT.STORAGE.BACKUP", true); public static final AlertType ALERT_TYPE_BACKUP_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_BACKUP_STORAGE, "ALERT.STORAGE.BACKUP", true);
public static final AlertType ALERT_TYPE_OBJECT_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_OBJECT_STORAGE, "ALERT.STORAGE.OBJECT", true); public static final AlertType ALERT_TYPE_OBJECT_STORAGE = new AlertType(Capacity.CAPACITY_TYPE_OBJECT_STORAGE, "ALERT.STORAGE.OBJECT", true);
@ -85,6 +92,10 @@ public interface AlertService {
return name; return name;
} }
public boolean isRepetitionAllowed() {
return repetitionAllowed;
}
private static AlertType getAlertType(short type) { private static AlertType getAlertType(short type) {
for (AlertType alertType : defaultAlertTypes) { for (AlertType alertType : defaultAlertTypes) {
if (alertType.getType() == type) { if (alertType.getType() == type) {
@ -108,7 +119,7 @@ public interface AlertService {
if (defaultAlert != null && !defaultAlert.getName().equalsIgnoreCase(name)) { if (defaultAlert != null && !defaultAlert.getName().equalsIgnoreCase(name)) {
throw new InvalidParameterValueException("There is a default alert having type " + type + " and name " + defaultAlert.getName()); throw new InvalidParameterValueException("There is a default alert having type " + type + " and name " + defaultAlert.getName());
} else { } else {
return new AlertType(type, name, false); return new AlertType(type, name, false, false);
} }
} }
} }

Some files were not shown because too many files have changed in this diff Show More