From c006d7357e7a005b62d3800f929e3636a04eee3f Mon Sep 17 00:00:00 2001 From: CD Cabrera Date: Tue, 26 Sep 2023 13:34:49 -0400 Subject: [PATCH] feat(config): sw-1695 activate rhel for sap x86 (#1200) --- public/locales/en-US.json | 17 +++++++++-------- .../__snapshots__/rhsmConstants.test.js.snap | 8 ++++++++ src/services/rhsm/rhsmConstants.js | 19 ++++++++++--------- tests/__snapshots__/dist.test.js.snap | 13 +++++++++++++ 4 files changed, 40 insertions(+), 17 deletions(-) diff --git a/public/locales/en-US.json b/public/locales/en-US.json index bae3928d7..f4f060415 100644 --- a/public/locales/en-US.json +++ b/public/locales/en-US.json @@ -123,6 +123,7 @@ "legendTooltip_Sockets_hypervisor_RHEL for IBM Power": "$t(curiosity-graph.legendTooltip_Sockets_hypervisor_RHEL)", "legendTooltip_Sockets_hypervisor_RHEL for IBM z": "$t(curiosity-graph.legendTooltip_Sockets_hypervisor_RHEL)", "legendTooltip_Sockets_hypervisor_RHEL for x86": "$t(curiosity-graph.legendTooltip_Sockets_hypervisor_RHEL)", + "legendTooltip_Sockets_hypervisor_rhel-for-sap-x86": "$t(curiosity-graph.legendTooltip_Sockets_hypervisor_RHEL)", "legendTooltip_Sockets_physical": "{{product}} CPU socket usage, per socket pair.", "legendTooltip_Sockets_physical_rhel": "$t(curiosity-graph.legendTooltip_Sockets_physical_RHEL)", "legendTooltip_Sockets_physical_RHEL": "Physical {{product}} CPU usage, per socket pair. Each system's socket count is rounded upward to the next even number.", @@ -130,6 +131,7 @@ "legendTooltip_Sockets_physical_RHEL for IBM Power": "$t(curiosity-graph.legendTooltip_Sockets_physical_RHEL)", "legendTooltip_Sockets_physical_RHEL for IBM z": "$t(curiosity-graph.legendTooltip_Sockets_physical_RHEL)", "legendTooltip_Sockets_physical_RHEL for x86": "$t(curiosity-graph.legendTooltip_Sockets_physical_RHEL)", + "legendTooltip_Sockets_physical_rhel-for-sap-x86": "$t(curiosity-graph.legendTooltip_Sockets_physical_RHEL)", "legendTooltip_Sockets_virtual": "{{product}} CPU socket usage, per socket pair.", "legendTooltip_Sockets_virtual_rhel": "$t(curiosity-graph.legendTooltip_Sockets_virtual_RHEL)", "legendTooltip_Sockets_virtual_RHEL": "Virtual {{product}} CPU usage, per socket. Each virtual machine without host-guest mapping is considered a single socket.", @@ -137,6 +139,7 @@ "legendTooltip_Sockets_virtual_RHEL for IBM Power": "$t(curiosity-graph.legendTooltip_Sockets_virtual_RHEL)", "legendTooltip_Sockets_virtual_RHEL for IBM z": "$t(curiosity-graph.legendTooltip_Sockets_virtual_RHEL)", "legendTooltip_Sockets_virtual_RHEL for x86": "$t(curiosity-graph.legendTooltip_Sockets_virtual_RHEL)", + "legendTooltip_Sockets_virtual_rhel-for-sap-x86": "$t(curiosity-graph.legendTooltip_Sockets_virtual_RHEL)", "legendTooltip_Storage-gibibytes": "Data storage usage", "legendTooltip_Storage-gibibyte-months": "Data storage usage", "legendTooltip_threshold_Cores_OpenShift Container Platform": "Maximum capacity, as CPU cores, based on total {{product}} Annual subscriptions in this account.", @@ -150,6 +153,7 @@ "legendTooltip_threshold_Sockets_RHEL for IBM Power": "$t(curiosity-graph.legendTooltip_threshold_Sockets_RHEL)", "legendTooltip_threshold_Sockets_RHEL for IBM z": "$t(curiosity-graph.legendTooltip_threshold_Sockets_RHEL)", "legendTooltip_threshold_Sockets_RHEL for x86": "$t(curiosity-graph.legendTooltip_threshold_Sockets_RHEL)", + "legendTooltip_threshold_Sockets_rhel-for-sap-x86": "$t(curiosity-graph.legendTooltip_threshold_Sockets_RHEL)", "legendTooltip_Transfer-gibibytes": "Data transfer usage", "tooltipSummary": "Your subscription data facets. With one level of column and row headers." }, @@ -163,6 +167,7 @@ "tabInstances_RHEL for IBM Power": "$t(curiosity-inventory.tabInstances_RHEL)", "tabInstances_RHEL for IBM z": "$t(curiosity-inventory.tabInstances_RHEL)", "tabInstances_RHEL for x86": "$t(curiosity-inventory.tabInstances_RHEL)", + "tabInstances_rhel-for-sap-x86": "$t(curiosity-inventory.tabInstances_RHEL)", "tabInstances_OpenShift Container Platform": "$t(curiosity-inventory.tabInstances_RHEL)", "tabInstances_Satellite": "$t(curiosity-inventory.tabInstances_RHEL)", "tabInstances_Satellite Capsule": "$t(curiosity-inventory.tabInstances_RHEL)", @@ -302,6 +307,7 @@ "label_groupVariant_RHEL for IBM Power": "RHEL for IBM Power", "label_groupVariant_RHEL for IBM z": "RHEL for IBM z", "label_groupVariant_RHEL for x86": "RHEL for x86", + "label_groupVariant_rhel-for-sap-x86": "RHEL for SAP x86", "label_groupVariant_rosa": "ROSA Hosted Control Planes", "label_groupVariant_Satellite Capsule": "Satellite Capsule", "label_groupVariant_Satellite Server": "Satellite Server", @@ -319,14 +325,6 @@ "label_usage_Development/Test": "Development/Test", "label_usage_Disaster Recovery": "Disaster Recovery", "label_usage_Production": "Production", - "label_variant": "", - "label_variant_none": "None", - "label_variant_RHEL for ARM": "ARM", - "label_variant_RHEL for IBM Power": "IBM Power", - "label_variant_RHEL for IBM z": "IBM z", - "label_variant_RHEL for x86": "x86", - "label_variant_Satellite Capsule": "Satellite Capsule", - "label_variant_Satellite Server": "Satellite Server", "placeholder": "Select", "placeholder_billing_provider": "Select purchased through", "placeholder_granularity": "Select date range", @@ -412,6 +410,9 @@ "title_RHEL for x86": "$t(curiosity-view.title_RHEL)", "subtitle_RHEL for x86": "$t(curiosity-view.title_RHEL)", "description_RHEL for x86": "$t(curiosity-view.description_RHEL)", + "title_rhel-for-sap-x86": "$t(curiosity-view.title_RHEL)", + "subtitle_rhel-for-sap-x86": "$t(curiosity-view.title_RHEL)", + "description_rhel-for-sap-x86": "$t(curiosity-view.description_RHEL)", "title_rosa": "ROSA Hosted Control Planes", "subtitle_rosa": "Monitor your Red Hat OpenShift Service on AWS Hosted Control Planes usage for monthly pre-paid and On-Demand subscriptions. <0>Learn more about {{appName}} reporting", "description_rosa": "Monitor your Red Hat OpenShift Service on AWS Hosted Control Planes usage for monthly pre-paid and On-Demand subscriptions.", diff --git a/src/services/rhsm/__tests__/__snapshots__/rhsmConstants.test.js.snap b/src/services/rhsm/__tests__/__snapshots__/rhsmConstants.test.js.snap index b34859bbd..2cafb3248 100644 --- a/src/services/rhsm/__tests__/__snapshots__/rhsmConstants.test.js.snap +++ b/src/services/rhsm/__tests__/__snapshots__/rhsmConstants.test.js.snap @@ -22,6 +22,7 @@ exports[`RHSM Constants should have specific properties: all exported constants "RHEL_IBM_Z": "RHEL for IBM z", "RHEL_WORKSTATION": "RHEL Workstation", "RHEL_X86": "RHEL for x86", + "RHEL_X86_SAP": "rhel-for-sap-x86", "RHODS": "rhods", "ROSA": "rosa", "SATELLITE_CAPSULE": "Satellite Capsule", @@ -32,6 +33,7 @@ exports[`RHSM Constants should have specific properties: all exported constants "RHEL_IBM_POWER": "RHEL for IBM Power", "RHEL_IBM_Z": "RHEL for IBM z", "RHEL_X86": "RHEL for x86", + "RHEL_X86_SAP": "rhel-for-sap-x86", }, "RHSM_API_PATH_PRODUCT_VARIANT_SATELLITE_TYPES": { "SATELLITE_CAPSULE": "Satellite Capsule", @@ -276,6 +278,7 @@ exports[`RHSM Constants should have specific properties: all exported constants "RHEL_IBM_Z": "RHEL for IBM z", "RHEL_WORKSTATION": "RHEL Workstation", "RHEL_X86": "RHEL for x86", + "RHEL_X86_SAP": "rhel-for-sap-x86", "RHODS": "rhods", "ROSA": "rosa", "SATELLITE_CAPSULE": "Satellite Capsule", @@ -286,6 +289,7 @@ exports[`RHSM Constants should have specific properties: all exported constants "RHEL_IBM_POWER": "RHEL for IBM Power", "RHEL_IBM_Z": "RHEL for IBM z", "RHEL_X86": "RHEL for x86", + "RHEL_X86_SAP": "rhel-for-sap-x86", }, "RHSM_API_PATH_PRODUCT_VARIANT_SATELLITE_TYPES": { "SATELLITE_CAPSULE": "Satellite Capsule", @@ -531,6 +535,7 @@ exports[`RHSM Constants should have specific properties: all exported constants "RHEL_IBM_Z": "RHEL for IBM z", "RHEL_WORKSTATION": "RHEL Workstation", "RHEL_X86": "RHEL for x86", + "RHEL_X86_SAP": "rhel-for-sap-x86", "RHODS": "rhods", "ROSA": "rosa", "SATELLITE_CAPSULE": "Satellite Capsule", @@ -541,6 +546,7 @@ exports[`RHSM Constants should have specific properties: all exported constants "RHEL_IBM_POWER": "RHEL for IBM Power", "RHEL_IBM_Z": "RHEL for IBM z", "RHEL_X86": "RHEL for x86", + "RHEL_X86_SAP": "rhel-for-sap-x86", }, "RHSM_API_PATH_PRODUCT_VARIANT_SATELLITE_TYPES": { "SATELLITE_CAPSULE": "Satellite Capsule", @@ -790,6 +796,7 @@ exports[`RHSM Constants should have specific properties: specific constants 1`] "RHEL_IBM_Z": "RHEL for IBM z", "RHEL_WORKSTATION": "RHEL Workstation", "RHEL_X86": "RHEL for x86", + "RHEL_X86_SAP": "rhel-for-sap-x86", "RHODS": "rhods", "ROSA": "rosa", "SATELLITE_CAPSULE": "Satellite Capsule", @@ -800,6 +807,7 @@ exports[`RHSM Constants should have specific properties: specific constants 1`] "RHEL_IBM_POWER": "RHEL for IBM Power", "RHEL_IBM_Z": "RHEL for IBM z", "RHEL_X86": "RHEL for x86", + "RHEL_X86_SAP": "rhel-for-sap-x86", }, "RHSM_API_PATH_PRODUCT_VARIANT_SATELLITE_TYPES": { "SATELLITE_CAPSULE": "Satellite Capsule", diff --git a/src/services/rhsm/rhsmConstants.js b/src/services/rhsm/rhsmConstants.js index c55404c52..8f0fa8018 100644 --- a/src/services/rhsm/rhsmConstants.js +++ b/src/services/rhsm/rhsmConstants.js @@ -6,13 +6,14 @@ /** * RHSM path IDs for product RHEL variants. * - * @type {{RHEL_ARM: string, RHEL_IBM_Z: string, RHEL_IBM_POWER: string, RHEL_X86: string}} + * @type {{RHEL_ARM: string, RHEL_X86_SAP: string, RHEL_IBM_Z: string, RHEL_IBM_POWER: string, RHEL_X86: string}} */ const RHSM_API_PATH_PRODUCT_VARIANT_RHEL_TYPES = { RHEL_ARM: 'RHEL for ARM', RHEL_IBM_POWER: 'RHEL for IBM Power', RHEL_IBM_Z: 'RHEL for IBM z', - RHEL_X86: 'RHEL for x86' + RHEL_X86: 'RHEL for x86', + RHEL_X86_SAP: 'rhel-for-sap-x86' }; /** @@ -423,8 +424,8 @@ const RHSM_INTERNAL_PRODUCT_DISPLAY_TYPES = { * * @type {{RHSM_API_QUERY_SET_TALLY_CAPACITY_TYPES: {GRANULARITY: string, USAGE: string, CATEGORY: string, END_DATE: string, SLA: string, * START_DATE: string, BILLING_PROVIDER: string, USE_RUNNING_TOTALS_FORMAT: string, BILLING_CATEGORY: string}, - * RHSM_API_RESPONSE_DATA: string, RHSM_API_RESPONSE_SUBSCRIPTIONS_META_TYPES: {PRODUCT: string, SUBSCRIPTION_TYPE: string, - * COUNT: string}, RHSM_API_PATH_PRODUCT_VARIANT_SATELLITE_TYPES: {SATELLITE_SERVER: string, SATELLITE_CAPSULE: string}, + * RHSM_API_RESPONSE_DATA: string, RHSM_API_RESPONSE_SUBSCRIPTIONS_META_TYPES: {PRODUCT: string, SUBSCRIPTION_TYPE: string, COUNT: string}, + * RHSM_API_PATH_PRODUCT_VARIANT_SATELLITE_TYPES: {SATELLITE_SERVER: string, SATELLITE_CAPSULE: string}, * RHSM_API_PATH_METRIC_TYPES: {CORES: string, STORAGE_GIBIBYTES: string, SOCKETS: string, INSTANCE_HOURS: string, * TRANSFER_GIBIBYTES: string, CORE_SECONDS: string, STORAGE_GIBIBYTE_MONTHS: string}, * RHSM_API_RESPONSE_INSTANCES_META_TYPES: {MEASUREMENTS: string, UOM: string, PRODUCT: string, COUNT: string}, @@ -434,11 +435,11 @@ const RHSM_INTERNAL_PRODUCT_DISPLAY_TYPES = { * NONE: string, STANDARD: string}, RHSM_API_RESPONSE_META_TYPES: {PRODUCT: string, COUNT: string}, * RHSM_API_RESPONSE_ERRORS_CODE_TYPES: {GENERIC: string, OPTIN: string}, RHSM_API_QUERY_GRANULARITY_TYPES: {WEEKLY: string, * QUARTERLY: string, DAILY: string, MONTHLY: string}, RHSM_API_RESPONSE_UOM_TYPES: {CORES: string, SOCKETS: string}, - * RHSM_API_PATH_PRODUCT_VARIANT_RHEL_TYPES: {RHEL_ARM: string, RHEL_IBM_Z: string, RHEL_IBM_POWER: string, RHEL_X86: string}, - * RHSM_API_RESPONSE_SUBSCRIPTIONS_DATA_TYPES: {BILLING_ACCOUNT_ID: string, QUANTITY: string, SUBSCRIPTION_MANAGER_ID: string, - * INVENTORY_ID: string, NUMBER_OF_GUESTS: string, HAS_INFINITE_QUANTITY: string, TOTAL_CAPACITY: string, PRODUCT_NAME: string, - * SERVICE_LEVEL: string, DISPLAY_NAME: string, MEASUREMENTS: string, UOM: string, CATEGORY: string, NEXT_EVENT_DATE: string, - * BILLING_PROVIDER: string, LAST_SEEN: string}, RHSM_API_QUERY_INVENTORY_SORT_DIRECTION_TYPES: {ASCENDING: string, + * RHSM_API_PATH_PRODUCT_VARIANT_RHEL_TYPES: {RHEL_ARM: string, RHEL_X86_SAP: string, RHEL_IBM_Z: string, RHEL_IBM_POWER: string, + * RHEL_X86: string}, RHSM_API_RESPONSE_SUBSCRIPTIONS_DATA_TYPES: {BILLING_ACCOUNT_ID: string, QUANTITY: string, + * SUBSCRIPTION_MANAGER_ID: string, INVENTORY_ID: string, NUMBER_OF_GUESTS: string, HAS_INFINITE_QUANTITY: string, TOTAL_CAPACITY: string, + * PRODUCT_NAME: string, SERVICE_LEVEL: string, DISPLAY_NAME: string, MEASUREMENTS: string, UOM: string, CATEGORY: string, + * NEXT_EVENT_DATE: string, BILLING_PROVIDER: string, LAST_SEEN: string}, RHSM_API_QUERY_INVENTORY_SORT_DIRECTION_TYPES: {ASCENDING: string, * DESCENDING: string}, RHSM_API_RESPONSE_SUBSCRIPTION_TYPES: {ANNUAL: string, ON_DEMAND: string}, * RHSM_API_QUERY_INVENTORY_SORT_TYPES: {CORES: string, STORAGE_GIBIBYTES: string, CATEGORY: string, SOCKETS: string, * INSTANCE_HOURS: string, NUMBER_OF_GUESTS: string, TRANSFER_GIBIBYTES: string, BILLING_PROVIDER: string, CORE_SECONDS: string, diff --git a/tests/__snapshots__/dist.test.js.snap b/tests/__snapshots__/dist.test.js.snap index c50153e86..78635818e 100644 --- a/tests/__snapshots__/dist.test.js.snap +++ b/tests/__snapshots__/dist.test.js.snap @@ -213,6 +213,7 @@ exports[`Build distribution should have a predictable ephemeral navigation based "RHEL for IBM Power", "RHEL for IBM z", "RHEL for x86", + "rhel-for-sap-x86", "Satellite Capsule", "Satellite Server", ], @@ -232,6 +233,7 @@ exports[`Build distribution should have a predictable ephemeral navigation based "RHEL for IBM Power", "RHEL for IBM z", "RHEL for x86", + "rhel-for-sap-x86", "Satellite Capsule", "Satellite Server", ], @@ -251,6 +253,7 @@ exports[`Build distribution should have a predictable ephemeral navigation based "RHEL for IBM Power", "RHEL for IBM z", "RHEL for x86", + "rhel-for-sap-x86", "Satellite Capsule", "Satellite Server", ], @@ -270,6 +273,7 @@ exports[`Build distribution should have a predictable ephemeral navigation based "RHEL for IBM Power", "RHEL for IBM z", "RHEL for x86", + "rhel-for-sap-x86", "Satellite Capsule", "Satellite Server", ], @@ -289,6 +293,7 @@ exports[`Build distribution should have a predictable ephemeral navigation based "RHEL for IBM Power", "RHEL for IBM z", "RHEL for x86", + "rhel-for-sap-x86", "Satellite Capsule", "Satellite Server", ], @@ -308,6 +313,7 @@ exports[`Build distribution should have a predictable ephemeral navigation based "RHEL for IBM Power", "RHEL for IBM z", "RHEL for x86", + "rhel-for-sap-x86", "Satellite Capsule", "Satellite Server", ], @@ -327,6 +333,7 @@ exports[`Build distribution should have a predictable ephemeral navigation based "RHEL for IBM Power", "RHEL for IBM z", "RHEL for x86", + "rhel-for-sap-x86", "Satellite Capsule", "Satellite Server", ], @@ -346,6 +353,7 @@ exports[`Build distribution should have a predictable ephemeral navigation based "RHEL for IBM Power", "RHEL for IBM z", "RHEL for x86", + "rhel-for-sap-x86", "Satellite Capsule", "Satellite Server", ], @@ -365,6 +373,7 @@ exports[`Build distribution should have a predictable ephemeral navigation based "RHEL for IBM Power", "RHEL for IBM z", "RHEL for x86", + "rhel-for-sap-x86", "Satellite Capsule", "Satellite Server", ], @@ -384,6 +393,7 @@ exports[`Build distribution should have a predictable ephemeral navigation based "RHEL for IBM Power", "RHEL for IBM z", "RHEL for x86", + "rhel-for-sap-x86", "Satellite Capsule", "Satellite Server", ], @@ -403,6 +413,7 @@ exports[`Build distribution should have a predictable ephemeral navigation based "RHEL for IBM Power", "RHEL for IBM z", "RHEL for x86", + "rhel-for-sap-x86", "Satellite Capsule", "Satellite Server", ], @@ -493,6 +504,7 @@ exports[`Build distribution should have a predictable ephemeral navigation based "RHEL for IBM Power", "RHEL for IBM z", "RHEL for x86", + "rhel-for-sap-x86", "Satellite Capsule", "Satellite Server", ], @@ -547,6 +559,7 @@ exports[`Build distribution should have a predictable ephemeral navigation based "RHEL for IBM Power", "RHEL for IBM z", "RHEL for x86", + "rhel-for-sap-x86", "Satellite Capsule", "Satellite Server", ],