Skip to content

UI support for deploy a VM from volume/snapshot #11164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

slavkap
Copy link
Contributor

@slavkap slavkap commented Jul 8, 2025

Description

This PR adds a UI option to deploy a virtual machine with an existing volume or a disk snapshot

These changes depend on #10503

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)
  • 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

  • Major
  • Minor

Screenshots (if appropriate):

The users will have the option to choose how to deploy a new virtual machine - Template/ISO/Volume/Snapshot
image
image

How Has This Been Tested?

manual tests

ui support to deploy a virtual machine with existing volume or a disk
snapshot
Copy link

codecov bot commented Jul 8, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 16.57%. Comparing base (8e4fe1c) to head (f10ea9a).

Additional details and impacted files
@@             Coverage Diff              @@
##               main   #11164      +/-   ##
============================================
- Coverage     16.57%   16.57%   -0.01%     
  Complexity    13988    13988              
============================================
  Files          5745     5745              
  Lines        510847   510984     +137     
  Branches      62140    62169      +29     
============================================
  Hits          84696    84696              
- Misses       416677   416814     +137     
  Partials       9474     9474              
Flag Coverage Δ
uitests 3.89% <ø> (-0.02%) ⬇️
unittests 17.47% <ø> (ø)

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.

@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti 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
Copy link

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

@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti 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.

@sureshanaparti
Copy link
Contributor

@blueorangutan ui

@blueorangutan
Copy link

@sureshanaparti a Jenkins job has been kicked to build UI QA env. I'll keep you posted as I make progress.

@vishesh92 vishesh92 requested a review from Copilot July 26, 2025 08:22
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds UI functionality to deploy virtual machines from existing volumes and disk snapshots, expanding beyond the existing template and ISO options.

Key changes:

  • Added volume and snapshot radio button options in the image selection UI
  • Implemented volume and snapshot fetching logic with filtering for unattached volumes and root snapshots
  • Added form handling and validation for volume and snapshot deployment parameters

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
ui/src/views/compute/wizard/OsBasedImageSelection.vue Added radio buttons for volume and snapshot selection options
ui/src/views/compute/DeployVM.vue Core implementation including form fields, data fetching, validation, and deployment logic for volumes and snapshots
ui/public/locales/en.json Added localization strings for volume and snapshot descriptions

@@ -1381,6 +1391,12 @@ export default {
queryArchId () {
return this.$route.query.arch || null
},
querySnapshotId () {
return this.$route.query.snapshotid | null
Copy link
Preview

Copilot AI Jul 26, 2025

Choose a reason for hiding this comment

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

The bitwise OR operator '|' should be the logical OR operator '||' to match the pattern used in other query methods.

Suggested change
return this.$route.query.snapshotid | null
return this.$route.query.snapshotid || null

Copilot uses AI. Check for mistakes.

this.imageSearchFilters = params
const volumeFilters = this.getImageFilters(params)
volumeFilters.forEach((filter) => {
volumes[filter] = { count: 0, iso: [] }
Copy link
Preview

Copilot AI Jul 26, 2025

Choose a reason for hiding this comment

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

The property name should be 'volume' instead of 'iso' to match the volume context and be consistent with the response structure.

Suggested change
volumes[filter] = { count: 0, iso: [] }
volumes[filter] = { count: 0, volume: [] }

Copilot uses AI. Check for mistakes.

this.imageSearchFilters = params
const snapshotFilters = this.getImageFilters(params)
snapshotFilters.forEach((filter) => {
snapshots[filter] = { count: 0, iso: [] }
Copy link
Preview

Copilot AI Jul 26, 2025

Choose a reason for hiding this comment

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

The property name should be 'snapshot' instead of 'iso' to match the snapshot context and be consistent with the response structure.

Suggested change
snapshots[filter] = { count: 0, iso: [] }
snapshots[filter] = { count: 0, snapshot: [] }

Copilot uses AI. Check for mistakes.

@sureshanaparti
Copy link
Contributor

@slavkap can you check the Copilot comments, are they relevant?

@blueorangutan
Copy link

UI build: ✔️
Live QA URL: https://qa.cloudstack.cloud/simulator/pr/11164 (QA-JID-691)

@blueorangutan
Copy link

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

@sureshanaparti
Copy link
Contributor

@blueorangutan package

@blueorangutan
Copy link

@sureshanaparti 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
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

4 participants
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy