Skip to content

Clarify KVM import template requirement#13126

Open
andrijapanicsb wants to merge 2 commits into
mainfrom
fix/clarify-kvm-import-templateid-requirement
Open

Clarify KVM import template requirement#13126
andrijapanicsb wants to merge 2 commits into
mainfrom
fix/clarify-kvm-import-templateid-requirement

Conversation

@andrijapanicsb
Copy link
Copy Markdown
Contributor

@andrijapanicsb andrijapanicsb commented May 7, 2026

Description

importUnmanagedInstance documents templateid as an optional parameter, but KVM unmanaged instance import currently requires a template and fails when one is not supplied.

This updates the generated API parameter description for templateid to explicitly mention that it is required when importing an unmanaged KVM instance. It avoids the current mismatch between API docs and runtime behavior without changing import semantics.

Fixes #13067

Tests

Added ImportUnmanagedInstanceCmdTest coverage to verify the templateid API parameter description includes the KVM requirement. Deleted

@codecov
Copy link
Copy Markdown

codecov Bot commented May 7, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 18.46%. Comparing base (f6efda5) to head (d6444de).
⚠️ Report is 48 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #13126      +/-   ##
============================================
+ Coverage     18.09%   18.46%   +0.36%     
- Complexity    16721    17263     +542     
============================================
  Files          6037     6037              
  Lines        542546   553970   +11424     
  Branches      66431    70938    +4507     
============================================
+ Hits          98159   102275    +4116     
- Misses       433368   440467    +7099     
- Partials      11019    11228     +209     
Flag Coverage Δ
uitests 4.18% <ø> (+0.66%) ⬆️
unittests 19.59% <ø> (+0.33%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

@andrijapanicsb
Copy link
Copy Markdown
Contributor Author

@blueorangutan package kvm

@blueorangutan
Copy link
Copy Markdown

@andrijapanicsb a [SL] Jenkins job has been kicked to build packages. It will be bundled withkvm SystemVM template(s). I'll keep you posted as I make progress.

@blueorangutan
Copy link
Copy Markdown

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

@andrijapanicsb
Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@andrijapanicsb
Copy link
Copy Markdown
Contributor Author

@blueorangutan test ol8 kvm-ol8 keepEnv

@apache apache deleted a comment from blueorangutan May 25, 2026
@apache apache deleted a comment from blueorangutan May 25, 2026
@andrijapanicsb
Copy link
Copy Markdown
Contributor Author

@blueorangutan test

@blueorangutan
Copy link
Copy Markdown

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

@andrijapanicsb andrijapanicsb added this to the 4.23.0 milestone May 26, 2026
@blueorangutan
Copy link
Copy Markdown

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

Test Result Time (s) Test File

Parameter parameter = templateIdField.getAnnotation(Parameter.class);

Assert.assertNotNull(parameter);
Assert.assertTrue(parameter.description().contains("Required when importing an unmanaged KVM Instance."));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is testing static code. not sure if we need this test.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Deleted

Copy link
Copy Markdown
Contributor

@nvazquez nvazquez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrijapanicsb the text on the description looks good, IMO the API must also check the hypervisor type and the importing operation and fail in case it is not passed for KVM import unmanaged instance.

Parameter parameter = templateIdField.getAnnotation(Parameter.class);

Assert.assertNotNull(parameter);
Assert.assertTrue(parameter.description().contains("Required when importing an unmanaged KVM Instance."));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

@andrijapanicsb
Copy link
Copy Markdown
Contributor Author

@andrijapanicsb the text on the description looks good, IMO the API must also check the hypervisor type and the importing operation and fail in case it is not passed for KVM import unmanaged instance.

In the UI for Migrating from VMware to KVM etc - there is no option to even select a template - seems we always (or UI does ot) assign the dummy template

image

@sonarqubecloud
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Optional templateid param fails for KVM VM import

4 participants