Skip to content

Commit

Permalink
Fix Xen spice graphical console test
Browse files Browse the repository at this point in the history
Spice only works on HVM virtual machines on Xen. Don't test spice on a
PV guest. Also remove the spice choice in the UI for Xen PV and PVH
cases.
  • Loading branch information
cbosdo authored and Cedric Bosdonnat committed Oct 27, 2020
1 parent 3ab3916 commit 4133424
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 13 deletions.
23 changes: 12 additions & 11 deletions testsuite/features/secondary/minxen_guests.feature
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,6 @@ Feature: Be able to manage XEN virtual machines via the GUI
When I click on "Start" in row "test-vm"
Then I should see "test-vm" virtual machine running on "xen_server"

@virthost_xen
Scenario: Show the VNC graphical console for Xen
Given I am on the "Virtualization" page of this "xen_server"
When I click on "Graphical Console" in row "test-vm"
And I switch to last opened window
Then I wait until I see the VNC graphical console

@virthost_xen
Scenario: Suspend a Xen virtual machine
Given I am on the "Virtualization" page of this "xen_server"
Expand Down Expand Up @@ -193,7 +186,7 @@ Feature: Be able to manage XEN virtual machines via the GUI
And I enter "512" as "memory"
And I enter "/var/testsuite-data/disk-image-template-xenpv.qcow2" as "disk0_source_template"
And I select "test-net0" from "network0_source"
And I select "Spice" from "graphicsType"
And I select "VNC" from "graphicsType"
And I click on "Create"
Then I should see a "Hosted Virtual Systems" text
When I wait until I see "test-vm2" text
Expand All @@ -203,11 +196,11 @@ Feature: Be able to manage XEN virtual machines via the GUI
And "test-vm2" virtual machine on "xen_server" should have a "/var/lib/libvirt/images/test-pool0/test-vm2_system" xen disk

@virthost_xen
Scenario: Show the Spice graphical console for Xen
Scenario: Show the VNC graphical console for Xen
Given I am on the "Virtualization" page of this "xen_server"
When I click on "Graphical Console" in row "test-vm2"
And I switch to last opened window
Then I wait until I see the spice graphical console
And I wait until I see the VNC graphical console

@virthost_xen
Scenario: Create a Xen fully virtualized guest
Expand All @@ -219,14 +212,22 @@ Feature: Be able to manage XEN virtual machines via the GUI
And I enter "512" as "memory"
And I enter "/var/testsuite-data/disk-image-template.qcow2" as "disk0_source_template"
And I select "test-net0" from "network0_source"
And I select "Spice" from "graphicsType"
And I click on "Create"
Then I should see a "Hosted Virtual Systems" text
When I wait until I see "test-vm3" text
And I wait at most 500 seconds until table row for "test-vm3" contains button "Stop"
And "test-vm3" virtual machine on "xen_server" should have 512MB memory and 1 vcpus
Then "test-vm3" virtual machine on "xen_server" should have 512MB memory and 1 vcpus
And "test-vm3" virtual machine on "xen_server" should have 1 NIC using "test-net0" network
And "test-vm3" virtual machine on "xen_server" should have a "/var/lib/libvirt/images/test-pool0/test-vm3_system" xen disk

@virthost_xen
Scenario: Show the Spice graphical console for Xen
Given I am on the "Virtualization" page of this "xen_server"
When I click on "Graphical Console" in row "test-vm3"
And I switch to last opened window
And I wait until I see the spice graphical console

@virthost_xen
Scenario: Show the virtual storage pools and volumes for Xen
Given I am on the "Virtualization" page of this "xen_server"
Expand Down
6 changes: 4 additions & 2 deletions web/html/src/manager/virtualization/guests/GuestProperties.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ export function GuestProperties(props: Props) : React.Node {
const osTypesLabels = {
hvm: 'Fully Virtualized',
xen: 'Para Virtualized',
xenpvh: 'PVH',
};

return (
Expand Down Expand Up @@ -249,9 +250,10 @@ export function GuestProperties(props: Props) : React.Node {
name="graphicsType"
>
{
[{ key: 'vnc', display: 'VNC' }, { key: 'spice', display: 'Spice' }]
[{ key: 'vnc', display: 'VNC', osTypes: ['hvm', 'xen', 'xenpvh'] },
{ key: 'spice', display: 'Spice', osTypes: ['hvm'] }]
.filter(entry => caps !== undefined
&& caps.devices.graphics.type.includes(entry.key))
&& caps.devices.graphics.type.includes(entry.key) && entry.osTypes.includes(model.osType))
.map(entry => (
<option key={entry.key} value={entry.key}>
{entry.display}
Expand Down
1 change: 1 addition & 0 deletions web/spacewalk-web.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
- Don't allow selecting spice for Xen PV and PVH guests
- Allow creating a VM on Salt host using a cobbler profile
- Show cluster upgrade plan in the upgrade UI
- Enable to switch to multiple webUI theme
Expand Down

0 comments on commit 4133424

Please sign in to comment.