cloudstack icon indicating copy to clipboard operation
cloudstack copied to clipboard

api,server,ui: support tags for domains

Open shwstppr opened this issue 1 month ago • 7 comments

Description

Fixes #11608

Types of changes

  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] New feature (non-breaking change which adds functionality)
  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] Enhancement (improves an existing feature and functionality)
  • [ ] Cleanup (Code refactoring and cleanup, that may add test cases)
  • [ ] Build/CI
  • [ ] Test (unit or integration test code)

Feature/Enhancement Scale or Bug Severity

Feature/Enhancement Scale

  • [ ] Major
  • [ ] Minor

Bug Severity

  • [ ] BLOCKER
  • [ ] Critical
  • [ ] Major
  • [ ] Minor
  • [ ] Trivial

Screenshots (if appropriate):

image

How Has This Been Tested?

> list  domains id=e1190923-d037-4464-9b97-ad912a242952
{
  "count": 1,
  "domain": [
    {
      "backupavailable": "Unlimited",
      "backuplimit": "Unlimited",
      "backupstorageavailable": "800",
      "backupstoragelimit": "Unlimited",
      "backupstoragetotal": 0,
      "backuptotal": 0,
      "bucketavailable": "Unlimited",
      "bucketlimit": "Unlimited",
      "buckettotal": 0,
      "cpuavailable": "Unlimited",
      "cpulimit": "Unlimited",
      "cputotal": 0,
      "created": "2025-10-13T13:06:28+0530",
      "gpuavailable": "Unlimited",
      "gpulimit": "Unlimited",
      "gputotal": 0,
      "hasannotations": false,
      "haschild": false,
      "id": "e1190923-d037-4464-9b97-ad912a242952",
      "ipavailable": "Unlimited",
      "iplimit": "Unlimited",
      "iptotal": 0,
      "level": 1,
      "memoryavailable": "Unlimited",
      "memorylimit": "Unlimited",
      "memorytotal": 0,
      "name": "d1",
      "networkavailable": "Unlimited",
      "networklimit": "Unlimited",
      "networktotal": 1,
      "objectstorageavailable": "Unlimited",
      "objectstoragelimit": "Unlimited",
      "objectstoragetotal": 0,
      "parentdomainid": "27c065d7-a514-11f0-ade4-a02942fcdd70",
      "parentdomainname": "ROOT",
      "path": "ROOT/d1",
      "primarystorageavailable": "Unlimited",
      "primarystoragelimit": "Unlimited",
      "primarystoragetotal": 0,
      "projectavailable": "Unlimited",
      "projectlimit": "Unlimited",
      "projecttotal": 0,
      "secondarystorageavailable": "Unlimited",
      "secondarystoragelimit": "Unlimited",
      "secondarystoragetotal": 0,
      "snapshotavailable": "Unlimited",
      "snapshotlimit": "Unlimited",
      "snapshottotal": 0,
      "state": "Active",
      "tags": [
        {
          "key": "abc",
          "value": "xyz"
        }
      ],
      "templateavailable": "Unlimited",
      "templatelimit": "Unlimited",
      "templatetotal": 0,
      "vmavailable": "Unlimited",
      "vmlimit": "Unlimited",
      "vmtotal": 0,
      "volumeavailable": "Unlimited",
      "volumelimit": "Unlimited",
      "volumetotal": 0,
      "vpcavailable": "Unlimited",
      "vpclimit": "Unlimited",
      "vpctotal": 0
    }
  ]
}

How did you try to break this feature and the system with this change?

shwstppr avatar Nov 03 '25 13:11 shwstppr

Codecov Report

:x: Patch coverage is 5.55556% with 17 lines in your changes missing coverage. Please review. :white_check_mark: Project coverage is 17.46%. Comparing base (f417c6b) to head (b1fb682).

Files with missing lines Patch % Lines
...src/main/java/com/cloud/api/ApiResponseHelper.java 0.00% 12 Missing :warning:
...apache/cloudstack/api/response/DomainResponse.java 0.00% 4 Missing :warning:
...ava/com/cloud/api/query/dao/DomainJoinDaoImpl.java 0.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11964      +/-   ##
============================================
- Coverage     17.46%   17.46%   -0.01%     
+ Complexity    15516    15515       -1     
============================================
  Files          5913     5913              
  Lines        529385   529401      +16     
  Branches      64679    64681       +2     
============================================
+ Hits          92448    92449       +1     
- Misses       426518   426533      +15     
  Partials      10419    10419              
Flag Coverage Δ
uitests 3.58% <ø> (ø)
unittests 18.52% <5.55%> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Nov 03 '25 13:11 codecov[bot]

@blueorangutan package

DaanHoogland avatar Dec 11 '25 07:12 DaanHoogland

@DaanHoogland a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

blueorangutan avatar Dec 11 '25 07:12 blueorangutan

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16002

blueorangutan avatar Dec 11 '25 09:12 blueorangutan

@blueorangutan test

DaanHoogland avatar Dec 11 '25 12:12 DaanHoogland

@DaanHoogland a [SL] Trillian-Jenkins test job (ol8 mgmt + kvm-ol8) has been kicked to run smoke tests

blueorangutan avatar Dec 11 '25 12:12 blueorangutan

[SF] Trillian test result (tid-14970) Environment: kvm-ol8 (x2), zone: Advanced Networking with Mgmt server ol8 Total time taken: 55598 seconds Marvin logs: https://github.com/blueorangutan/acs-prs/releases/download/trillian/pr11964-t14970-kvm-ol8.zip Smoke tests completed. 147 look OK, 3 have errors, 0 did not run Only failed and skipped tests results shown below:

Test Result Time (s) Test File
test_uservm_host_control_state Failure 16.96 test_host_control_state.py
test_02_unsecure_vm_migration Error 333.76 test_vm_life_cycle.py
test_02_unsecure_vm_migration Error 333.77 test_vm_life_cycle.py
test_08_migrate_vm Error 20.27 test_vm_life_cycle.py
test_01_migrate_vm_strict_tags_success Error 71.61 test_vm_strict_host_tags.py

blueorangutan avatar Dec 12 '25 05:12 blueorangutan

Addressed comments from Copilot

@blueorangutan package

shwstppr avatar Dec 12 '25 11:12 shwstppr

@shwstppr a [SL] Jenkins job has been kicked to build packages. It will be bundled with KVM, XenServer and VMware SystemVM templates. I'll keep you posted as I make progress.

blueorangutan avatar Dec 12 '25 11:12 blueorangutan

Packaging result [SF]: ✔️ el8 ✔️ el9 ✔️ el10 ✔️ debian ✔️ suse15. SL-JID 16025

blueorangutan avatar Dec 12 '25 13:12 blueorangutan