Skip to content

Commit

Permalink
Merge pull request #1389 from sgratch/replace-vddk-help-msg-example-w…
Browse files Browse the repository at this point in the history
…ith-format

For VDDK help text - replace the example with a format
  • Loading branch information
sgratch authored Nov 21, 2024
2 parents de8df09 + 621f86a commit 7036ecd
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const validateVDDKImage = (vddkImage: string | number): ValidationMsg =>
// For a newly opened form where the field is not set yet, set the validation type to default.
if (vddkImage === undefined)
return {
msg: 'The VDDK image is empty, it is recommended to provide an image, for example: quay.io/kubev2v/vddk:latest .',
msg: 'The VDDK image is empty. It is recommended to provide an image in the format of <registry_route_or_server_path>/vddk:<tag> .',
type: 'default',
};

Expand All @@ -18,19 +18,19 @@ export const validateVDDKImage = (vddkImage: string | number): ValidationMsg =>

if (trimmedVddkImage === '')
return {
msg: 'The VDDK image is empty, it is recommended to provide an image, for example: quay.io/kubev2v/vddk:latest .',
msg: 'The VDDK image is empty. It is recommended to provide an image in the format of <registry_route_or_server_path>/vddk:<tag> .',
type: 'error',
};

if (!isValidTrimmedVddkImage) {
return {
type: 'error',
msg: 'The VDDK image is invalid. VDDK image should be a valid container image, for example: quay.io/kubev2v/vddk:latest .',
msg: 'The VDDK image is invalid. VDDK image should be a valid container image in the format of <registry_route_or_server_path>/vddk:<tag> .',
};
}

return {
type: 'success',
msg: 'VMware Virtual Disk Development Kit (VDDK) image, for example: quay.io/kubev2v/vddk:latest .',
msg: 'VMware Virtual Disk Development Kit (VDDK) image in the format of <registry_route_or_server_path>/vddk:<tag> .',
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export function vsphereProviderValidator(provider: V1beta1Provider): ValidationM

if (emptyVddkInitImage === 'yes' && vddkInitImage === '') {
return {
msg: 'The VDDK image is empty, it is recommended to provide an image, for example: quay.io/kubev2v/vddk:latest .',
msg: 'The VDDK image is empty. It is recommended to provide an image in the format of <registry_route_or_server_path>/vddk:<tag> .',
type: 'warning',
};
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ export const VDDKDetailsItem: React.FC<ProviderDetailsItemProps> = ({
valid container image path in the format of{' '}
<strong>registry_route_or_server_path/vddk:&#8249;tag&#8250;</strong>.<br />
<br />
For example: <strong>quay.io/kubev2v/example:latest</strong>.<br />
<br />
It is strongly recommended to specify a VDDK init image to accelerate migrations.
</ForkliftTrans>
);
Expand Down

0 comments on commit 7036ecd

Please sign in to comment.