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

Bug 2000935: add volume mode selection in storage creation #9971

Merged

Conversation

shdn-ibm
Copy link
Contributor

@shdn-ibm shdn-ibm commented Sep 2, 2021

add a volume mode selection, to provide an option to use thin or thick volume
default setting is thick mode

image

@openshift-ci openshift-ci bot added the component/ceph Related to ceph-storage-plugin label Sep 2, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 2, 2021

Hi @shdn-ibm. 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 openshift-ci bot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Sep 2, 2021
@@ -89,6 +103,18 @@ export const FlashSystemConnectionDetails: React.FC<ExternalComponentProps<Flash
isRequired
/>
</FormGroup>
<FormGroup label={t('ceph-storage-plugin~Volume Mode')} fieldId="volmode-input">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<FormGroup label={t('ceph-storage-plugin~Volume Mode')} fieldId="volmode-input">
<FormGroup label={t('ceph-storage-plugin~Volume Mode')} fieldId="volume-mode-input">

Comment on lines 37 to 39
const volModeOptions = volModeList.map((mode) => {
return <SelectOption key={mode} value={mode} />;
});
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const volModeOptions = volModeList.map((mode) => {
return <SelectOption key={mode} value={mode} />;
});
const volModeOptions = VOLUME_MODES.map((mode) => <SelectOption key={mode} value={mode} />;

@@ -31,6 +33,18 @@ export const FlashSystemConnectionDetails: React.FC<ExternalComponentProps<Flash
: setEndpointValid(ValidatedOptions.error);
};

const volModeList = ['thick', 'thin'];
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const volModeList = ['thick', 'thin'];
const VOLUME_MODES = ['thick', 'thin'];

Define it outside the component

const volModeOptions = volModeList.map((mode) => {
return <SelectOption key={mode} value={mode} />;
});
const [isOpen, setIsOpen] = React.useState(false);
Copy link
Contributor

@afreen23 afreen23 Sep 2, 2021

Choose a reason for hiding this comment

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

Move it above with rest of the hooks.
Hooks should always be at the top

Comment on lines 41 to 44
const onToggle = () => setIsOpen(!isOpen);
const onModeSelect = (event, value) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Add a space

Suggested change
const onToggle = () => setIsOpen(!isOpen);
const onModeSelect = (event, value) => {
const onToggle = () => setIsOpen(!isOpen);
const onModeSelect = (event, value) => {

@@ -37,4 +37,5 @@ export type FlashSystemState = {
password: string;
endpoint: string;
poolname: string;
volmode?: string;
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
volmode?: string;
volmode: string;

state should not have optional types

@afreen23
Copy link
Contributor

afreen23 commented Sep 2, 2021

/ok-to-test

@openshift-ci openshift-ci bot 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 Sep 2, 2021
Copy link
Contributor

@afreen23 afreen23 left a comment

Choose a reason for hiding this comment

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

Just some minors

@@ -31,6 +34,16 @@ export const FlashSystemConnectionDetails: React.FC<ExternalComponentProps<Flash
: setEndpointValid(ValidatedOptions.error);
};

const VOLUME_MODES = ['thick', 'thin'];
Copy link
Contributor

Choose a reason for hiding this comment

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

define this outside the component

isDisabled={false}
placeholderText={VOLUME_MODES[0]}
>
{volModeOptions}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{volModeOptions}
{VOLUME_MODES.map((mode) => <SelectOption key={mode} value={mode} />)}

@@ -31,6 +34,16 @@ export const FlashSystemConnectionDetails: React.FC<ExternalComponentProps<Flash
: setEndpointValid(ValidatedOptions.error);
};

const VOLUME_MODES = ['thick', 'thin'];
const volModeOptions = VOLUME_MODES.map((mode) => <SelectOption key={mode} value={mode} />);
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
const volModeOptions = VOLUME_MODES.map((mode) => <SelectOption key={mode} value={mode} />);
const volModeOptions = VOLUME_MODES.map((mode) => <SelectOption key={mode} value={mode} />);
Suggested change
const volModeOptions = VOLUME_MODES.map((mode) => <SelectOption key={mode} value={mode} />);

@openshift-ci openshift-ci bot added the kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated label Sep 3, 2021
Copy link
Contributor

@afreen23 afreen23 left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Sep 3, 2021
@@ -89,6 +105,21 @@ export const FlashSystemConnectionDetails: React.FC<ExternalComponentProps<Flash
isRequired
/>
</FormGroup>
<FormGroup label={t('ceph-storage-plugin~Volume Mode')} fieldId="volume-mode-input">
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
<FormGroup label={t('ceph-storage-plugin~Volume Mode')} fieldId="volume-mode-input">
<FormGroup label={t('ceph-storage-plugin~Volume mode')} fieldId="volume-mode-input">

@SanjalKatiyar
Copy link
Contributor

/retitle Bug 2000935: add volume mode selection in storage creation

@openshift-ci openshift-ci bot changed the title fix: add volume mode selection in storage creation Bug 2000935: add volume mode selection in storage creation Sep 3, 2021
@openshift-ci openshift-ci bot added the bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. label Sep 3, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 3, 2021

@shdn-ibm: This pull request references Bugzilla bug 2000935, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker.

3 validation(s) were run on this bug
  • bug is open, matching expected state (open)
  • bug target release (4.9.0) matches configured target release for branch (4.9.0)
  • bug is in the state NEW, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

No GitHub users were found matching the public email listed for the QA contact in Bugzilla (ratamir@redhat.com), skipping review request.

In response to this:

Bug 2000935: add volume mode selection in storage creation

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 openshift-ci bot added the bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. label Sep 3, 2021
@openshift-ci openshift-ci bot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed lgtm Indicates that a PR is ready to be merged. labels Sep 3, 2021
fix: add volume mode selection

Update index.tsx
update string

Update ceph-storage-plugin.json
@openshift-ci openshift-ci bot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Sep 3, 2021
@SanjalKatiyar
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Sep 3, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 3, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: afreen23, SanjalKatiyar, shdn-ibm

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

@shdn-ibm
Copy link
Contributor Author

shdn-ibm commented Sep 3, 2021

/retest

@openshift-merge-robot openshift-merge-robot merged commit 7a4de50 into openshift:master Sep 3, 2021
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Sep 3, 2021

@shdn-ibm: All pull requests linked via external trackers have merged:

Bugzilla bug 2000935 has been moved to the MODIFIED state.

In response to this:

Bug 2000935: add volume mode selection in storage creation

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.

@spadgett spadgett added this to the v4.9 milestone Sep 4, 2021
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. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/ceph Related to ceph-storage-plugin kind/i18n Indicates issue or PR relates to internationalization or has content that needs to be translated 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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants