kubevirt / web-ui

OpenShift Cluster Console UI
https://www.openshift.org
Apache License 2.0
26 stars 11 forks source link

VM Wizard refactoring and introduction of Models #212

Closed rhrazdil closed 5 years ago

rhrazdil commented 5 years ago

In this PR I have redesigned the way we interact with wizard to avoid duplicating code for future test coverage.

Wizard is now a class located in models/wizard.ts where additional models can be placed (vm, template, etc.) Provision type, Network and storage resources now have specified type in utils.ts and can be used to create a VM with arbitrary number of NICs and Disks.

For example the following object shows how can we define provision source, network interfaces and disks that will be added to a VM using the wizard:

{
    provision: {
        method: 'URL',
        source: sourceURL,
    },
    networkOptions: [networkInterface],
    storageOptions: [hddDisk, glusterfsDisk],
}

Additionaly, new environment variable FAIL_FAST is used to disable failFast execution strategy, Thanks to @vojtechszocs for help with that. Example of usage:

FAIL_FAST=false yarn run test-suite --suite kubevirt --params.kubevirt true
mareklibra commented 5 years ago

@suomiy , feel free to merge if you agree with the comment above