Skip to content
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

Kubevirt: add basic actions to VM list #1761

Merged

Conversation

atiratree
Copy link
Member

@atiratree atiratree commented Jun 19, 2019

@openshift-ci-robot openshift-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 19, 2019
@openshift-ci-robot
Copy link
Contributor

Hi @suomiy. Thanks for your PR.

I'm waiting for a openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@openshift-ci-robot openshift-ci-robot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Jun 19, 2019
@atiratree atiratree force-pushed the kubevirt.vm-actions branch 2 times, most recently from 7aaf32b to f0bad12 Compare June 19, 2019 16:40
Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

I've only reviewed the actions commit, but here are my comments.

);
};

const menuActionStart = (kind, vm, actionArgs) => {
Copy link
Member

Choose a reason for hiding this comment

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

import { getName, getNamespace } from '@console/shared';
import { VirtualMachineModel } from '../../models';

class StartStopVmModal extends PromiseComponent<StartStopVmModalProps, PromiseComponentState> {
Copy link
Member

Choose a reason for hiding this comment

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

Prefer functional components for new components

<ModalTitle>{action} Virtual Machine</ModalTitle>
<ModalBody>
Are you sure you want to {action.toLowerCase()} <strong>{getName(vm)}</strong>
<span>
Copy link
Member

Choose a reason for hiding this comment

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

Unnecessary span?

vm: V1VirtualMachine;
start: boolean;
cancel: (e?: Event) => void;
close: (e?: Event) => void;
Copy link
Member

Choose a reason for hiding this comment

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

I don't see us passing the event to these callbacks in the implementation. We should take it out if we're not using it.


import { V1VirtualMachine } from 'kubevirt-typescript-api/esm';

export const isVmRunning = (value: V1VirtualMachine) => get(value, (v) => v.spec.running, false);
Copy link
Member

Choose a reason for hiding this comment

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

isVMRunning etc

@spadgett spadgett added this to the v4.2 milestone Jun 19, 2019
@atiratree atiratree force-pushed the kubevirt.vm-actions branch from f0bad12 to 18f90d3 Compare June 20, 2019 15:37
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Jun 20, 2019
@atiratree
Copy link
Member Author

atiratree commented Jun 20, 2019

addressed all the comments

import { asAccessReview, Kebab } from '@console/internal/components/utils';
import { isVMRunning } from '../../selectors/vm';
import { startStopVmModal } from '../modals/start-stop-vm-modal';
import { K8sKind, PodKind } from '../../../../../public/module/k8s';

Choose a reason for hiding this comment

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

Suggested change
import { K8sKind, PodKind } from '../../../../../public/module/k8s';
import { K8sKind, PodKind } from '@console/internal/module/k8s';

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks, fixed.

} from '../../models';

import { VMKind } from '../../types';
import { menuActions } from './menu-actions';
import { PodKind } from '../../../../../public/module/k8s';

Choose a reason for hiding this comment

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

Suggested change
import { PodKind } from '../../../../../public/module/k8s';
import { PodKind } from '@console/internal/module/k8s';

@atiratree atiratree force-pushed the kubevirt.vm-actions branch from 60d37f0 to fbaf526 Compare June 25, 2019 16:38
@jelkosz
Copy link

jelkosz commented Jun 26, 2019

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 26, 2019
@atiratree atiratree force-pushed the kubevirt.vm-actions branch from fbaf526 to 341d43e Compare June 26, 2019 08:59
@atiratree atiratree force-pushed the kubevirt.vm-actions branch from 341d43e to 8010a29 Compare June 26, 2019 12:25
@atiratree
Copy link
Member Author

fixed

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 26, 2019
@atiratree atiratree force-pushed the kubevirt.vm-actions branch from 8010a29 to ead6e8a Compare June 26, 2019 14:11
@openshift-ci-robot openshift-ci-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 26, 2019
@atiratree atiratree force-pushed the kubevirt.vm-actions branch from ead6e8a to 2ae37fe Compare June 26, 2019 14:12
@atiratree atiratree mentioned this pull request Jun 26, 2019
@atiratree
Copy link
Member Author

added types and new PR dependency

@atiratree
Copy link
Member Author

/retest

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 26, 2019
@atiratree atiratree force-pushed the kubevirt.vm-actions branch from 2ae37fe to 7e5f703 Compare June 27, 2019 10:23
@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Jun 27, 2019
@atiratree
Copy link
Member Author

/retest

@rawagner
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 27, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rawagner, suomiy

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-merge-robot openshift-merge-robot merged commit 8deb1a5 into openshift:master Jun 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants