Skip to content

Commit

Permalink
add Microsoft office V8 option for veeam configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanMarcMilletScality committed Sep 9, 2024
1 parent 22903a7 commit 31dc829
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/react/databrowser/buckets/details/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,8 @@ function Overview({ bucket, ingestionStates }: Props) {
tags.status === 'success' && tags.value?.[BUCKET_TAG_VEEAM_APPLICATION];
const isVeeamBucket =
(veeamTagApplication === VeeamApplicationType.VEEAM_BACKUP_REPLICATION ||
veeamTagApplication === VeeamApplicationType.VEEAM_OFFICE_365) &&
veeamTagApplication === VeeamApplicationType.VEEAM_OFFICE_365 ||
veeamTagApplication === VeeamApplicationType.VEEAM_OFFICE_365_V8) &&
VEEAM_FEATURE_FLAG_ENABLED;
useEffect(() => {
dispatch(getBucketInfo(bucket.name));
Expand Down
13 changes: 11 additions & 2 deletions src/react/ui-elements/Veeam/VeeamConfiguration.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ import {
VEEAM_BACKUP_REPLICATION_XML_VALUE,
VEEAM_DEFAULT_ACCOUNT_NAME,
VEEAM_OFFICE_365,
VEEAM_OFFICE_365_V8,
unitChoices,
} from './VeeamConstants';
import { VeeamSkipModal } from './VeeamSkipModal';
Expand Down Expand Up @@ -187,7 +188,8 @@ const Configuration = () => {
application,
capacityBytes: getCapacityBytes(capacity, capacityUnit),
enableImmutableBackup:
application === VEEAM_BACKUP_REPLICATION_XML_VALUE
application === VEEAM_BACKUP_REPLICATION_XML_VALUE ||
application === VEEAM_OFFICE_365_V8
? enableImmutableBackup
: false,
accountName,
Expand Down Expand Up @@ -298,6 +300,12 @@ const Configuration = () => {
>
{VEEAM_OFFICE_365}
</Select.Option>
<Select.Option
key={VEEAM_OFFICE_365_V8}
value={VEEAM_OFFICE_365_V8}
>
{VEEAM_OFFICE_365_V8}
</Select.Option>
</Select>
);
}}
Expand All @@ -321,7 +329,8 @@ const Configuration = () => {
/>
}
/>
{application === VEEAM_BACKUP_REPLICATION_XML_VALUE ? (
{application === VEEAM_BACKUP_REPLICATION_XML_VALUE ||
application === VEEAM_OFFICE_365_V8 ? (
<FormGroup
id="enableImmutableBackup"
label="Immutable backup"
Expand Down
6 changes: 4 additions & 2 deletions src/react/ui-elements/Veeam/VeeamConstants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ export const BUCKET_TAG_VEEAM_APPLICATION = 'X-Scality-Veeam-Application';
export const VEEAM_BACKUP_REPLICATION = 'Veeam Backup & Replication';
export const VEEAM_BACKUP_REPLICATION_XML_VALUE =
'Veeam Backup &#38; Replication';
export const VEEAM_OFFICE_365 = 'Veeam Backup for Microsoft 365';
export const VEEAM_OFFICE_365 = 'Veeam Backup for Microsoft 365 (pre-v8)';
export const VEEAM_OFFICE_365_V8 = 'Veeam Backup for Microsoft 365 (v8)';
export const VEEAM_IMMUTABLE_POLICY_NAME = 'Scality-Veeam-Immutable-Policy';
export const GET_VEEAM_IMMUTABLE_POLICY = (bucketName: string) =>
JSON.stringify({
Expand Down Expand Up @@ -46,7 +47,8 @@ export const GET_CAPACITY_XML_CONTENT = (capacity: string) =>
export const VEEAM_DEFAULT_ACCOUNT_NAME = 'Veeam';
export enum VeeamApplicationType {
VEEAM_BACKUP_REPLICATION = 'Veeam Backup & Replication',
VEEAM_OFFICE_365 = 'Veeam Backup for Microsoft 365',
VEEAM_OFFICE_365 = 'Veeam Backup for Microsoft 365 (pre-v8)',
VEEAM_OFFICE_365_V8 = 'Veeam Backup for Microsoft 365 (v8)',
}
export const unitChoices = {
GiB: 1024 ** 3,
Expand Down
9 changes: 6 additions & 3 deletions src/react/ui-elements/Veeam/useMutationTableData.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ import {
GET_VEEAM_NON_IMMUTABLE_POLICY,
SYSTEM_XML_CONTENT,
VEEAM_BACKUP_REPLICATION_XML_VALUE,
VEEAM_OFFICE_365_V8,
VEEAM_XML_PREFIX,
} from './VeeamConstants';
import { useCreateBucket } from '../../next-architecture/domain/business/buckets';
Expand Down Expand Up @@ -109,6 +110,7 @@ export const useMutationTableData = ({

const isVeeamVBR =
propsConfiguration.application === VEEAM_BACKUP_REPLICATION_XML_VALUE;
const isVeeamVBOV8 = propsConfiguration.application === VEEAM_OFFICE_365_V8;
const mutations = isVeeamVBR ? mutationsVBR : mutationsVBO;

const instanceId = useInstanceId();
Expand Down Expand Up @@ -140,9 +142,10 @@ export const useMutationTableData = ({
createBucketMutation: () => {
return {
Bucket: propsConfiguration.bucketName,
ObjectLockEnabledForBucket: isVeeamVBR
? propsConfiguration.enableImmutableBackup
: false,
ObjectLockEnabledForBucket:
isVeeamVBR || isVeeamVBOV8
? propsConfiguration.enableImmutableBackup
: false,
};
},
createIAMUserMutation: () => {
Expand Down

0 comments on commit 31dc829

Please sign in to comment.