Skip to content
This repository was archived by the owner on Mar 1, 2024. It is now read-only.

Disable restart action in VM import status #237

Merged
merged 1 commit into from
Apr 2, 2019

Conversation

pcbailey
Copy link

@pcbailey pcbailey commented Mar 22, 2019

@kubevirt-bot kubevirt-bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. size/S labels Mar 22, 2019
@pcbailey pcbailey force-pushed the disable-actions-on-vm-import branch from 1d2744c to d709a09 Compare March 27, 2019 13:41
@pcbailey pcbailey force-pushed the disable-actions-on-vm-import branch from d709a09 to ca4e68c Compare March 28, 2019 15:08
@pcbailey pcbailey force-pushed the disable-actions-on-vm-import branch from ca4e68c to f038780 Compare March 28, 2019 15:12
@pcbailey pcbailey requested review from rawagner and mareklibra March 28, 2019 15:13
@pcbailey pcbailey changed the title WIP: Disable restart action in VM import status Disable restart action in VM import status Mar 28, 2019
@kubevirt-bot kubevirt-bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Mar 28, 2019
@kubevirt-bot kubevirt-bot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 30, 2019
@pcbailey pcbailey force-pushed the disable-actions-on-vm-import branch from f038780 to da3c1b9 Compare March 31, 2019 20:57
@kubevirt-bot kubevirt-bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 31, 2019
}

const pods = actionArgs[PodModel.kind];
const importerPods= getVmImporterPods(actionArgs[PodModel.kind], vm);

Choose a reason for hiding this comment

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

you do not have to supply importerPods anymore if you supply all pods. Please see getVmStatus


const isImporting = (vm, actionArgs) => {
const status = getStatusForVm(vm, actionArgs);
return status ? status.status === VM_STATUS_IMPORTING : false;

Choose a reason for hiding this comment

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

shorthand? status && status.status === VM_STATUS_IMPORTING

@@ -69,6 +69,7 @@ const VMRow = ({obj: vm}) => {
resources={[
getResource(VirtualMachineInstanceModel, {name, namespace, isList: false}),
migrationResources,
getResource(PodModel, {namespace, matchLabels: {[CDI_KUBEVIRT_IO]: 'importer'}}),

Choose a reason for hiding this comment

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

I think it would be better to select just pods without the importer labels. Because it might be confusing when somebody gets to use getVmStatus method in menu-actions

@mareklibra mareklibra merged commit 0733c8e into kubevirt:master Apr 2, 2019
@pcbailey pcbailey deleted the disable-actions-on-vm-import branch October 26, 2022 12:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants