Skip to content

Commit 4b2dea6

Browse files
committed
feat(pci-file-storage): fix deployment mode pricing
ref: #TAPC-6078 Signed-off-by: aTurmo <adrien.turmo.ext@ovhcloud.com>
1 parent 7cc7c0f commit 4b2dea6

21 files changed

+458
-125
lines changed

packages/manager/apps/pci-file-storage/public/translations/create/Messages_de_DE.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"label": "3-AZ Region",
2727
"description": "Hochresiliente und hochverfügbare Bereitstellung in 3 Zonen."
2828
}
29-
}
29+
},
30+
"leastPrice": "Ab {{price}} {{unit}}"
3031
},
3132
"macroRegion": {
3233
"title": "Standort auswählen"

packages/manager/apps/pci-file-storage/public/translations/create/Messages_en_GB.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"label": "3-AZ Region",
2727
"description": "High-resilience, high-availability deployment in 3 zones."
2828
}
29-
}
29+
},
30+
"leastPrice": "From {{price}} {{unit}}"
3031
},
3132
"macroRegion": {
3233
"title": "Choose a location"

packages/manager/apps/pci-file-storage/public/translations/create/Messages_es_ES.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"label": "Región 3-AZ",
2727
"description": "Despliegue de alta resiliencia y alta disponibilidad en 3 zonas."
2828
}
29-
}
29+
},
30+
"leastPrice": "Desde {{price}} {{unit}}"
3031
},
3132
"macroRegion": {
3233
"title": "Seleccione una localización"

packages/manager/apps/pci-file-storage/public/translations/create/Messages_fr_CA.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"label": "Région 3-AZ",
2929
"description": "Déploiement haute résilience et haute disponibilité sur 3 zones."
3030
}
31-
}
31+
},
32+
"leastPrice": "À partir de {{price}} {{unit}}"
3233
},
3334
"macroRegion": {
3435
"title": "Choisissez une localisation"

packages/manager/apps/pci-file-storage/public/translations/create/Messages_fr_FR.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@
2828
"label": "Région 3-AZ",
2929
"description": "Déploiement haute résilience et haute disponibilité sur 3 zones."
3030
}
31-
}
31+
},
32+
"leastPrice": "À partir de {{price}} {{unit}}"
3233
},
3334
"macroRegion": {
3435
"title": "Choisissez une localisation"

packages/manager/apps/pci-file-storage/public/translations/create/Messages_it_IT.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"label": "Region 3-AZ",
2727
"description": "Deploy a resilienza elevata e alta disponibilità su 3 zone."
2828
}
29-
}
29+
},
30+
"leastPrice": "A partire da {{price}} {{unit}}"
3031
},
3132
"macroRegion": {
3233
"title": "Scegli una localizzazione"

packages/manager/apps/pci-file-storage/public/translations/create/Messages_pl_PL.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"label": "Region 3-AZ",
2727
"description": "Wdrożenia zapewniające odporność infrastruktury i wysoką dostępność w 3 strefach."
2828
}
29-
}
29+
},
30+
"leastPrice": "Od {{price}} {{unit}}"
3031
},
3132
"macroRegion": {
3233
"title": "Wybierz lokalizację"

packages/manager/apps/pci-file-storage/public/translations/create/Messages_pt_PT.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
"label": "Região 3-AZ",
2727
"description": "Implementação de alta resiliência e alta disponibilidade em 3 zonas."
2828
}
29-
}
29+
},
30+
"leastPrice": "A partir de {{price}} {{unit}}"
3031
},
3132
"macroRegion": {
3233
"title": "Escolha uma localização"

packages/manager/apps/pci-file-storage/src/__mocks__/dto/catalog.dto.mocks.ts

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,7 @@ export const CATALOG_SHARE = {
8787
},
8888
pricings: [
8989
{
90-
regions: [
91-
'RBX-A',
92-
'SGP1',
93-
'BHS5',
94-
'DE1',
95-
],
90+
regions: ['RBX-A', 'SGP1', 'BHS5', 'DE1'],
9691
price: 11900,
9792
interval: 'hour',
9893
specs: {
@@ -121,13 +116,7 @@ export const CATALOG_SHARE = {
121116
},
122117
},
123118
{
124-
regions: [
125-
'GRA7',
126-
'GRA9',
127-
'GRA11',
128-
'SBG7',
129-
'SBG5',
130-
],
119+
regions: ['GRA7', 'GRA9', 'GRA11', 'SBG7', 'SBG5'],
131120
price: 22900,
132121
interval: 'hour',
133122
specs: {
@@ -147,7 +136,7 @@ export const CATALOG_SHARE = {
147136
},
148137
bandwidth: {
149138
guaranteed: false,
150-
level: 0.30,
139+
level: 0.3,
151140
min: 30,
152141
max: 1000,
153142
maxUnit: 'MB/s',

packages/manager/apps/pci-file-storage/src/adapters/catalog/right/__tests__/mapper.spec.ts

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -191,12 +191,26 @@ describe('mapCatalogDTOToCatalog', () => {
191191
const standard1azVariantRBX = {
192192
capacity: { min: 150, max: 10240 },
193193
iops: { guaranteed: false, level: 24, max: 16_000, maxUnit: 'IOPS', unit: 'IOPS/GB' },
194-
bandwidth: { guaranteed: false, level: 0.25, min: 25, max: 128, maxUnit: 'MB/s', unit: 'MB/s/GB' },
194+
bandwidth: {
195+
guaranteed: false,
196+
level: 0.25,
197+
min: 25,
198+
max: 128,
199+
maxUnit: 'MB/s',
200+
unit: 'MB/s/GB',
201+
},
195202
};
196203
const standard1azVariantGRA = {
197204
capacity: { min: 150, max: 20480 },
198205
iops: { guaranteed: false, level: 48, max: 20_000, maxUnit: 'IOPS', unit: 'IOPS/GB' },
199-
bandwidth: { guaranteed: false, level: 0.3, min: 30, max: 1000, maxUnit: 'MB/s', unit: 'MB/s/GB' },
206+
bandwidth: {
207+
guaranteed: false,
208+
level: 0.3,
209+
min: 30,
210+
max: 1000,
211+
maxUnit: 'MB/s',
212+
unit: 'MB/s/GB',
213+
},
200214
};
201215
const standard2VariantData = { ...standard1azVariantRBX };
202216

@@ -220,8 +234,12 @@ describe('mapCatalogDTOToCatalog', () => {
220234
expect(result.entities.shareSpecs.byId.get('publiccloud-share-standard2')).toEqual({
221235
name: 'publiccloud-share-standard2',
222236
microRegionIds: [
223-
'EU-WEST-LZ-MRS-A', 'EU-CENTRAL-LZ-BUH-A', 'EU-SOUTH-LZ-MIL-A',
224-
'EU-NORTH-LZ-CPH-A', 'EU-WEST-PAR', 'EU-SOUTH-MIL',
237+
'EU-WEST-LZ-MRS-A',
238+
'EU-CENTRAL-LZ-BUH-A',
239+
'EU-SOUTH-LZ-MIL-A',
240+
'EU-NORTH-LZ-CPH-A',
241+
'EU-WEST-PAR',
242+
'EU-SOUTH-MIL',
225243
],
226244
});
227245

@@ -259,7 +277,9 @@ describe('mapCatalogDTOToCatalog', () => {
259277
...standard1azVariantGRA,
260278
pricing: { price: 22900, interval: 'hour' },
261279
});
262-
expect(result.relations.shareSpecVariants.get('publiccloud-share-standard2::EU-WEST-LZ-MRS-A')).toEqual({
280+
expect(
281+
result.relations.shareSpecVariants.get('publiccloud-share-standard2::EU-WEST-LZ-MRS-A'),
282+
).toEqual({
263283
...standard2VariantData,
264284
pricing: { price: 22900, interval: 'hour' },
265285
});

0 commit comments

Comments
 (0)