diff --git a/conversion_rules_export/csv/ibm.csv b/conversion_rules_export/csv/ibm.csv new file mode 100644 index 00000000..bb54ea65 --- /dev/null +++ b/conversion_rules_export/csv/ibm.csv @@ -0,0 +1,49 @@ +FOCUS Dimension,Transform Step,Source Column,Source Column Type,Transform Type,Filters/Process/Etc. +AvailabilityZone,0,Not Defined,Not Defined,Not Defined,Not Defined +ChargeDescription,0,Not Defined,Not Defined,Not Defined,Not Defined +CommitmentDiscountCategory,0,Not Defined,Not Defined,Not Defined,Not Defined +CommitmentDiscountName,0,Not Defined,Not Defined,Not Defined,Not Defined +CommitmentDiscountType,0,Not Defined,Not Defined,Not Defined,Not Defined +ConsumedQuantity,0,Not Defined,Not Defined,Not Defined,Not Defined +ConsumedUnit,0,Not Defined,Not Defined,Not Defined,Not Defined +EffectiveCost,0,Not Defined,Not Defined,Not Defined,Not Defined +ListUnitPrice,0,Not Defined,Not Defined,Not Defined,Not Defined +SkuId,0,Not Defined,Not Defined,Not Defined,Not Defined +SkuPriceId,0,Not Defined,Not Defined,Not Defined,Not Defined +BilledCost,1,Volume Cost,Not Defined,RENAME_COLUMN, +BillingAccountId,1,Account Owner ID,Not Defined,RENAME_COLUMN, +BillingAccountName,1,Account Name,Not Defined,RENAME_COLUMN, +BillingCurrency,1,Currency,Not Defined,RENAME_COLUMN, +BillingPeriodEnd,1,BillingPeriodStart,Not Defined,MONTH_END, +BillingPeriodStart,1,Billing Month,Not Defined,PARSE_DATETIME,%Y-%m +BillingPeriodStart,2,BillingPeriodStart,Not Defined,ASSIGN_UTC_TIMEZONE, +ChargeCategory,1,NA,Not Defined,ASSIGN_STATIC_VALUE,"static_value: Usage +" +ChargeFrequency,1,NA,Not Defined,ASSIGN_STATIC_VALUE,"static_value: Usage-Based +" +ChargePeriodEnd,1,Created Time,Not Defined,RENAME_COLUMN, +ChargePeriodStart,1,Billing Month,Not Defined,PARSE_DATETIME,%Y-%m +ChargePeriodStart,2,ChargePeriodStart,Not Defined,ASSIGN_UTC_TIMEZONE, +CommitmentDiscountId,1,Discount ID,Not Defined,RENAME_COLUMN, +InvoiceIssuer,1,NA,Not Defined,ASSIGN_STATIC_VALUE,"static_value: IBM Cloud +" +ListCost,1,Original Cost,Not Defined,RENAME_COLUMN, +PricingCategory,1,NA,Not Defined,ASSIGN_STATIC_VALUE,"static_value: Standard +" +PricingQuantity,1,Usage Quantity,Not Defined,RENAME_COLUMN, +PricingUnit,1,Usage Unit,Not Defined,RENAME_COLUMN, +Provider,1,NA,Not Defined,ASSIGN_STATIC_VALUE,"static_value: IBM Cloud +" +Publisher,1,NA,Not Defined,ASSIGN_STATIC_VALUE,"static_value: IBM Cloud +" +RegionId,1,Region,Not Defined,RENAME_COLUMN, +ResourceId,1,Instance ID,Not Defined,RENAME_COLUMN, +ResourceName,1,Instance Name,Not Defined,RENAME_COLUMN, +ResourceType,1,ResourceId,Not Defined,STRING_FUNCTIONS,"{'steps': [{'operation_type': 'split', 'split_by': ':', 'index': 4}]}" +ServiceCategory,1,ResourceType,Not Defined,LOOKUP,"destination_value: ServiceCategory +reference_dataset_path: conversion_configs/ibm/mapping_files/ibm_category_mapping.csv +source_value: ResourceType +" +ServiceName,1,Service Name,Not Defined,RENAME_COLUMN, +SubAccountId,1,Account Owner ID,Not Defined,RENAME_COLUMN, +SubAccountName,1,Account Name,Not Defined,RENAME_COLUMN, diff --git a/conversion_rules_export/markdown/ibm.md b/conversion_rules_export/markdown/ibm.md new file mode 100644 index 00000000..0edbc4b4 --- /dev/null +++ b/conversion_rules_export/markdown/ibm.md @@ -0,0 +1,43 @@ +| FOCUS Dimension | Transform Step | Source Column | Source Column Type | Transform Type | Filters/Process/Etc. | +|:---------------------------|-----------------:|:-------------------|:---------------------|:--------------------|:--------------------------------------------------------------------------------------| +| AvailabilityZone | 0 | Not Defined | Not Defined | Not Defined | Not Defined | +| ChargeDescription | 0 | Not Defined | Not Defined | Not Defined | Not Defined | +| CommitmentDiscountCategory | 0 | Not Defined | Not Defined | Not Defined | Not Defined | +| CommitmentDiscountName | 0 | Not Defined | Not Defined | Not Defined | Not Defined | +| CommitmentDiscountType | 0 | Not Defined | Not Defined | Not Defined | Not Defined | +| ConsumedQuantity | 0 | Not Defined | Not Defined | Not Defined | Not Defined | +| ConsumedUnit | 0 | Not Defined | Not Defined | Not Defined | Not Defined | +| EffectiveCost | 0 | Not Defined | Not Defined | Not Defined | Not Defined | +| ListUnitPrice | 0 | Not Defined | Not Defined | Not Defined | Not Defined | +| SkuId | 0 | Not Defined | Not Defined | Not Defined | Not Defined | +| SkuPriceId | 0 | Not Defined | Not Defined | Not Defined | Not Defined | +| BilledCost | 1 | Volume Cost | Not Defined | RENAME_COLUMN | | +| BillingAccountId | 1 | Account Owner ID | Not Defined | RENAME_COLUMN | | +| BillingAccountName | 1 | Account Name | Not Defined | RENAME_COLUMN | | +| BillingCurrency | 1 | Currency | Not Defined | RENAME_COLUMN | | +| BillingPeriodEnd | 1 | BillingPeriodStart | Not Defined | MONTH_END | | +| BillingPeriodStart | 1 | Billing Month | Not Defined | PARSE_DATETIME | %Y-%m | +| BillingPeriodStart | 2 | BillingPeriodStart | Not Defined | ASSIGN_UTC_TIMEZONE | | +| ChargeCategory | 1 | NA | Not Defined | ASSIGN_STATIC_VALUE | static_value: Usage | +| ChargeFrequency | 1 | NA | Not Defined | ASSIGN_STATIC_VALUE | static_value: Usage-Based | +| ChargePeriodEnd | 1 | Created Time | Not Defined | RENAME_COLUMN | | +| ChargePeriodStart | 1 | Billing Month | Not Defined | PARSE_DATETIME | %Y-%m | +| ChargePeriodStart | 2 | ChargePeriodStart | Not Defined | ASSIGN_UTC_TIMEZONE | | +| CommitmentDiscountId | 1 | Discount ID | Not Defined | RENAME_COLUMN | | +| InvoiceIssuer | 1 | NA | Not Defined | ASSIGN_STATIC_VALUE | static_value: IBM Cloud | +| ListCost | 1 | Original Cost | Not Defined | RENAME_COLUMN | | +| PricingCategory | 1 | NA | Not Defined | ASSIGN_STATIC_VALUE | static_value: Standard | +| PricingQuantity | 1 | Usage Quantity | Not Defined | RENAME_COLUMN | | +| PricingUnit | 1 | Usage Unit | Not Defined | RENAME_COLUMN | | +| Provider | 1 | NA | Not Defined | ASSIGN_STATIC_VALUE | static_value: IBM Cloud | +| Publisher | 1 | NA | Not Defined | ASSIGN_STATIC_VALUE | static_value: IBM Cloud | +| RegionId | 1 | Region | Not Defined | RENAME_COLUMN | | +| ResourceId | 1 | Instance ID | Not Defined | RENAME_COLUMN | | +| ResourceName | 1 | Instance Name | Not Defined | RENAME_COLUMN | | +| ResourceType | 1 | ResourceId | Not Defined | STRING_FUNCTIONS | {'steps': [{'operation_type': 'split', 'split_by': ':', 'index': 4}]} | +| ServiceCategory | 1 | ResourceType | Not Defined | LOOKUP | destination_value: ServiceCategory | +| | | | | | reference_dataset_path: conversion_configs/ibm/mapping_files/ibm_category_mapping.csv | +| | | | | | source_value: ResourceType | +| ServiceName | 1 | Service Name | Not Defined | RENAME_COLUMN | | +| SubAccountId | 1 | Account Owner ID | Not Defined | RENAME_COLUMN | | +| SubAccountName | 1 | Account Name | Not Defined | RENAME_COLUMN | | \ No newline at end of file diff --git a/focus_converter_base/README.md b/focus_converter_base/README.md index 5f155872..a90eb49f 100644 --- a/focus_converter_base/README.md +++ b/focus_converter_base/README.md @@ -1,7 +1,7 @@ # FOCUS Converter The FOCUS Converter is a command-line utility to convert billing data files from popular public cloud providers, -such as **Amazon Web Services**, **Microsoft Azure**, **Google Cloud** and **Oracle Cloud**, into the common +such as **Amazon Web Services**, **Microsoft Azure**, **Google Cloud**, **IBM Cloud** and **Oracle Cloud**, into the common schema known as FOCUS. You can read the specification at [FinOps-Open-Cost-and-Usage-Spec/FOCUS_Spec]. The converter is optimized for: @@ -16,6 +16,7 @@ The converter is optimized for: * [Amazon Web Services] * [Google Cloud] * [Microsoft Azure] +* [IBM Cloud] * [Oracle Cloud] Want to add your own? See [CONTRIBUTING.md] @@ -89,6 +90,8 @@ We're excited to work together. Please see [CONTRIBUTING.md] for information on [Microsoft Azure]: https://github.com/finopsfoundation/focus_converters/tree/master/focus_converter_base/focus_converter/conversion_configs/azure +[IBM Cloud]: https://github.com/finopsfoundation/focus_converters/tree/master/focus_converter_base/focus_converter/conversion_configs/ibm + [Oracle Cloud]: https://github.com/finopsfoundation/focus_converters/tree/master/focus_converter_base/focus_converter/conversion_configs/oci [Rules Export Markdown]: https://github.com/finopsfoundation/focus_converters/tree/master/conversion_rules_export/markdown diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_billed_cost_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_billed_cost_S001.yaml new file mode 100644 index 00000000..c06d1b71 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_billed_cost_S001.yaml @@ -0,0 +1,4 @@ +plan_name: rename Volume Cost to BilledCost +conversion_type: rename_column +column: Volume Cost +focus_column: BilledCost diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_billing_account_id_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_billing_account_id_S001.yaml new file mode 100644 index 00000000..cc604bbb --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_billing_account_id_S001.yaml @@ -0,0 +1,4 @@ +plan_name: rename Account Owner ID to BillingAccountId +conversion_type: rename_column +column: Account Owner ID +focus_column: BillingAccountId diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_billing_account_name_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_billing_account_name_S001.yaml new file mode 100644 index 00000000..14ce15bf --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_billing_account_name_S001.yaml @@ -0,0 +1,4 @@ +plan_name: rename Account Name to BillingAccountName +conversion_type: rename_column +column: Account Name +focus_column: BillingAccountName diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_billing_currency_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_billing_currency_S001.yaml new file mode 100644 index 00000000..8d417b59 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_billing_currency_S001.yaml @@ -0,0 +1,4 @@ +plan_name: rename Currency to BillingCurrency +conversion_type: rename_column +column: Currency +focus_column: BillingCurrency diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_billing_period_start_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_billing_period_start_S001.yaml new file mode 100644 index 00000000..a56216af --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_billing_period_start_S001.yaml @@ -0,0 +1,5 @@ +plan_name: parse YYYY-mm from Billing Month +conversion_type: parse_datetime +column: Billing Month +focus_column: BillingPeriodStart +conversion_args: "%Y-%m" diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_billing_period_start_S002.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_billing_period_start_S002.yaml new file mode 100644 index 00000000..48850af7 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_billing_period_start_S002.yaml @@ -0,0 +1,4 @@ +plan_name: set BillingPeriodStart as UTC +conversion_type: assign_utc_timezone +column: BillingPeriodStart +focus_column: BillingPeriodStart diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_charge_category_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_charge_category_S001.yaml new file mode 100644 index 00000000..ae24a2e4 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_charge_category_S001.yaml @@ -0,0 +1,6 @@ +plan_name: Assign ChargeCategory +conversion_type: static_value +conversion_args: + static_value: Usage +column: NA +focus_column: ChargeCategory diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_charge_frequency_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_charge_frequency_S001.yaml new file mode 100644 index 00000000..0b6baa76 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_charge_frequency_S001.yaml @@ -0,0 +1,6 @@ +plan_name: Assign ChargeFrequency +conversion_type: static_value +conversion_args: + static_value: Usage-Based +column: NA +focus_column: ChargeFrequency diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_charge_period_end_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_charge_period_end_S001.yaml new file mode 100644 index 00000000..18b0b9dd --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_charge_period_end_S001.yaml @@ -0,0 +1,4 @@ +plan_name: rename Created Time for ChargePeriodEnd +conversion_type: rename_column +column: Created Time +focus_column: ChargePeriodEnd diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_charge_period_start_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_charge_period_start_S001.yaml new file mode 100644 index 00000000..19013022 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_charge_period_start_S001.yaml @@ -0,0 +1,5 @@ +plan_name: parse YYYY-mm from Billing Month for ChargePeriodStart +conversion_type: parse_datetime +column: Billing Month +focus_column: ChargePeriodStart +conversion_args: "%Y-%m" diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_charge_period_start_S002.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_charge_period_start_S002.yaml new file mode 100644 index 00000000..8f2a4dea --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_charge_period_start_S002.yaml @@ -0,0 +1,4 @@ +plan_name: set ChargePeriodStart as UTC +conversion_type: assign_utc_timezone +column: ChargePeriodStart +focus_column: ChargePeriodStart diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_commitment_discount_id_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_commitment_discount_id_S001.yaml new file mode 100644 index 00000000..7fcddb02 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_commitment_discount_id_S001.yaml @@ -0,0 +1,4 @@ +plan_name: rename Discount ID to CommitmentDiscountID +conversion_type: rename_column +column: Discount ID +focus_column: CommitmentDiscountId diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_invoice_issuer_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_invoice_issuer_S001.yaml new file mode 100644 index 00000000..e23f949d --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_invoice_issuer_S001.yaml @@ -0,0 +1,7 @@ +# Use a lookup for third parties +plan_name: Assign InvoiceIssuer +conversion_type: static_value +conversion_args: + static_value: IBM Cloud +column: NA +focus_column: InvoiceIssuer diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_list_cost_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_list_cost_S001.yaml new file mode 100644 index 00000000..79fccc6d --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_list_cost_S001.yaml @@ -0,0 +1,4 @@ +plan_name: rename Original Cost to ListCost +conversion_type: rename_column +column: Original Cost +focus_column: ListCost diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_pricing_category_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_pricing_category_S001.yaml new file mode 100644 index 00000000..3aabef3e --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_pricing_category_S001.yaml @@ -0,0 +1,6 @@ +plan_name: Assign PricingCategory +conversion_type: static_value +conversion_args: + static_value: Standard +column: NA +focus_column: PricingCategory diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_pricing_quantity_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_pricing_quantity_S001.yaml new file mode 100644 index 00000000..63e53633 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_pricing_quantity_S001.yaml @@ -0,0 +1,4 @@ +plan_name: rename Usage Quantity to PricingQuantity +conversion_type: rename_column +column: Usage Quantity +focus_column: PricingQuantity diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_pricing_unit_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_pricing_unit_S001.yaml new file mode 100644 index 00000000..69dcf65c --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_pricing_unit_S001.yaml @@ -0,0 +1,4 @@ +plan_name: rename Usage Unit to PricingUnit +conversion_type: rename_column +column: Usage Unit +focus_column: PricingUnit diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_provider_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_provider_S001.yaml new file mode 100644 index 00000000..44d9c141 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_provider_S001.yaml @@ -0,0 +1,6 @@ +plan_name: Assign provider +conversion_type: static_value +conversion_args: + static_value: IBM Cloud +column: NA +focus_column: Provider diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_publisher_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_publisher_S001.yaml new file mode 100644 index 00000000..9704e5f7 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_publisher_S001.yaml @@ -0,0 +1,6 @@ +plan_name: Assign Publisher +conversion_type: static_value +conversion_args: + static_value: IBM Cloud +column: NA +focus_column: Publisher diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_region_id_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_region_id_S001.yaml new file mode 100644 index 00000000..2f9ac140 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_region_id_S001.yaml @@ -0,0 +1,4 @@ +plan_name: rename Instance ID to ResourceID +conversion_type: rename_column +column: Region +focus_column: RegionId diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_resource_id_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_resource_id_S001.yaml new file mode 100644 index 00000000..3db39f54 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_resource_id_S001.yaml @@ -0,0 +1,4 @@ +plan_name: rename Instance ID to ResourceID +conversion_type: rename_column +column: Instance ID +focus_column: ResourceId diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_resource_name_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_resource_name_S001.yaml new file mode 100644 index 00000000..27d3aa14 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_resource_name_S001.yaml @@ -0,0 +1,4 @@ +plan_name: rename Instance Name to ResourceName +conversion_type: rename_column +column: Instance Name +focus_column: ResourceName diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_service_name_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_service_name_S001.yaml new file mode 100644 index 00000000..d57da2a7 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_service_name_S001.yaml @@ -0,0 +1,4 @@ +plan_name: Rename Service Name to ServiceName +conversion_type: rename_column +column: Service Name +focus_column: ServiceName diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_sub_account_id_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_sub_account_id_S001.yaml new file mode 100644 index 00000000..fdd7f08f --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_sub_account_id_S001.yaml @@ -0,0 +1,4 @@ +plan_name: rename Account Owner ID to SubAccountID +conversion_type: rename_column +column: Account Owner ID +focus_column: SubAccountId diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/1_sub_account_name_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/1_sub_account_name_S001.yaml new file mode 100644 index 00000000..63b8a06a --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/1_sub_account_name_S001.yaml @@ -0,0 +1,4 @@ +plan_name: rename Account Name to SubAccountName +conversion_type: rename_column +column: Account Name +focus_column: SubAccountName diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/2_billing_period_end_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/2_billing_period_end_S001.yaml new file mode 100644 index 00000000..d7d45c13 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/2_billing_period_end_S001.yaml @@ -0,0 +1,5 @@ +plan_name: compute BillingPeriodEnd +conversion_type: month_end +column: BillingPeriodStart +focus_column: BillingPeriodEnd + diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/2_resource_type_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/2_resource_type_S001.yaml new file mode 100644 index 00000000..7de78922 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/2_resource_type_S001.yaml @@ -0,0 +1,9 @@ +plan_name: Get resource type from resource Id +conversion_type: string_functions +column: ResourceId +focus_column: ResourceType +conversion_args: + steps: + - operation_type: split + split_by: ":" + index: 4 diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/3_service_category_S001.yaml b/focus_converter_base/focus_converter/conversion_configs/ibm/3_service_category_S001.yaml new file mode 100644 index 00000000..b83d335b --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/3_service_category_S001.yaml @@ -0,0 +1,8 @@ +plan_name: Generate ServiceCategory for ibm data using a lookup. +column: ResourceType +conversion_type: lookup +focus_column: ServiceCategory +conversion_args: + reference_dataset_path: "conversion_configs/ibm/mapping_files/ibm_category_mapping.csv" + source_value: ResourceType + destination_value: ServiceCategory diff --git a/focus_converter_base/focus_converter/conversion_configs/ibm/mapping_files/ibm_category_mapping.csv b/focus_converter_base/focus_converter/conversion_configs/ibm/mapping_files/ibm_category_mapping.csv new file mode 100644 index 00000000..071122a5 --- /dev/null +++ b/focus_converter_base/focus_converter/conversion_configs/ibm/mapping_files/ibm_category_mapping.csv @@ -0,0 +1,147 @@ +ResourceType,ServiceCategory +containers-kubernetes,Compute +is.instance,Compute +power-iaas,Compute +logdna,Management and Governance +is.volume,Storage +cloud-object-storage,Storage +conversation,AI and Machine Learning +sysdig-monitor,Management and Governance +vmware-solutions,Compute +dashDB,Databases +cloudantNoSQLDB,Databases +dashDB For Transactions,Databases +discovery,AI and Machine Learning +internet-svcs,Networking +databases-for-postgresql,Databases +is.bare-metal-server,Compute +messagehub,Databases +vmware.directorsite,Compute +databases-for-mongodb,Databases +automated-testing-and-monitoring-for-voice-and-chat,Other +is-floating-ip,Networking +databases-for-elasticsearch,Databases +is.dedicated-host,Compute +is.vpc,Compute +hs-crypto,Security +codeengine,Compute +datacatalog,Management and Governance +dizziondaas,Compute +secrets-manager,Identity +speech_to_text,AI and Machine Learning +kms,Security +lakehouse,Databases +data-science-experience,AI and Machine Learning +data-virtualization,Analytics +consult-with-icg-wes,Business Applications +directlink.connect,Networking +databases-for-redis,Databases +continuous-delivery,Developer Tools +data-warehouse,Other +pm-20,Analytics +transit.gateway,Networking +natural-language-understanding,AI and Machine Learning +is.share,Storage +logdnaat,Management and Governance +dns-svcs,Other +skytap,Compute +directlink.dedicated,Networking +container-registry,Compute +is.snapshot,Storage +databases-for-etcd,Databases +dizzion-managed,Compute +is.load-balancer,Networking +databases-for-mysql,Databases +vmware.vdc,Other +compliance,Security +wanclouds-inc-powervs-migration-as-a-service,Migration +databases-for-enterprisedb,Databases +messages-for-rabbitmq,Databases +portworx,Other +text_to_speech,AI and Machine Learning +cyberstrong,Security +language_translator,AI and Machine Learning +datastage,Analytics +IBMAnalyticsEngine,AI and Machine Learning +knowledge-studio,AI and Machine Learning +satellite,Multicloud +quantum-computing,Compute +is.vpn,Compute +mqcloud,Databases +is.vpn-server,Compute +openpages,Business Applications +dizzion-complete,Compute +dizzion-flex,Compute +SecureGateway,Identity +AppID,Identity +aiopenscale,AI and Machine Learning +AppConnect,Developer Tools +ibm-Cloud-platform-runtime,Compute +px-backup,Compute +wanclouds-custom-migration-as-a-service,Migration +neuralseek,AI and Machine Learning +APIConnect,Integration +fnts-managed-services-for-powervs-cloud,Multicloud +privileged-access-gateway,Identity +databases-for-cassandra,Databases +dreadnought,Other +blockchain,Other +sql-query,Analytics +is.image,Networking +sysdig-secure,Management and Governance +komprise-intelligent-data-management-suite,Analytics +code-assistant,AI and Machine Learning +komprise-elastic-data-migration,Migration +f5-networks-f5-big-ip-1g-best-w-ext-hsm-paygo-licensing-for-vpc,Compute +functions,Compute +apprapp,Developer Tools +dizzion-digitalworkspaces-complete,Compute +primaryio-protectio-managed-service,Other +pmf-pl-prod-appserverdb,Migration +event-notifications,Analytics +hpvs,Compute +data-product-hub,Analytics +sdk-for-nodejs,Compute +dizzion-complete-horizon,Compute +liberty-for-java,Compute +primaryio-hdm-cloud-connect-nsx-v-to-nsx-t,Migration +logs,Management and Governance +hyperp-dbaas-postgresql,Databases +is.flow-log-collector,Networking +first-national-technology-solutions-fnts-data-encryption,Networking +akasiafinopsmodeler,AI and Machine Learning +falconstor-software-storsafe-vtl-for-power,Security +hyperp-dbaas-mongodb,Compute +converlistics,Other +minio,Storage +pmf-pl-dev-appserverdb,Migration +primaryio-protectio,Compute +crushbank-crushbank,Business Applications +primaryio-hdm-workload-migrator,Migration +anycloud-365-backup,Storage +iotf-service,Business Applications +pmf-profsvc-remote,Business Applications +qroc,Management and Governance +3p-wanclds-draas-vpcplus,Networking +education,Business Applications +openwhisk,Compute +bigipve-ltm,Other +wanclouds-inc--vpc-coaas-vpc-cost-optimization-as-a-service-,Management and Governance +tsp-bus4i-system-copy-migrate-23-for-power-i,Migration +dotnet-core,Compute +swift_buildpack,Compute +dynamic-dashboard-embedded,Analytics +insight-specialist-ltd--email-surveillance,Analytics +insight-specialist-ltd--trade-surveillance,Analytics +insight-specialist-ltd--msp-human-intelligence,AI and Machine Learning +eticloud-secure-digital-agile-workplace,Multicloud +compass,Integration +api-bridge,Compute +insight-specialist-ltd--stocks-and-crypto-intelligence,Analytics +aisolved,AI and Machine Learning +cloudsway-cdn-global,Business Applications +is.private-path-service-gateway,Networking +data-replication,Other +is.endpoint-gateway,Networking +dizzion-digitalworkspaces-managed,Compute +mdm-oc,Business Applications diff --git a/focus_converter_base/focus_converter/data_loaders/data_loader.py b/focus_converter_base/focus_converter/data_loaders/data_loader.py index fc076d00..b74224b1 100644 --- a/focus_converter_base/focus_converter/data_loaders/data_loader.py +++ b/focus_converter_base/focus_converter/data_loaders/data_loader.py @@ -1,3 +1,4 @@ +import io from enum import Enum from typing import Iterable @@ -64,10 +65,44 @@ def load_parquet_file(self) -> Iterable[pl.LazyFrame]: def load_csv(self) -> Iterable[pl.LazyFrame]: # reads csv from data path and returns a lazy object + # IBM Cloud CSV's contain multiple sections separated by `\n\n`. Data contained in the first section acts as meta data. + # To "normalize" the IBM Cloud CSV we duplicate the rows so that the data is concatenated for every row of the csv + + # Read the content of the file first to first figure out how many sections there are + with open(self.__data_path__, "r") as f: + content = f.read() + + # Split the CSV content into sections + sections = content.split("\n\n") + + # Process the last section separately. Which contains the main content. In the case of a a traditional CSV this is what gets returned + df_last_section = pl.read_csv( + io.StringIO(sections[len(sections) - 1]), + try_parse_dates=False, + ignore_errors=True, + truncate_ragged_lines=True, + ) + + # For each section before the final section. Duplicate the rows and concatenate the data to the main content from the last section + for i in range(0, len(sections) - 1): + # Parse the new section + df_current_section = pl.read_csv( + io.StringIO(sections[i]), + try_parse_dates=False, + ignore_errors=True, + truncate_ragged_lines=True, + ) + # duplicate the data + df_current_section_repeated = df_current_section.select( + pl.all().repeat_by(df_last_section.height).explode() + ) + + # Concatenate the data with the last section + df_last_section = pl.concat( + [df_current_section_repeated, df_last_section], how="horizontal" + ) - yield pl.read_csv( - self.__data_path__, try_parse_dates=False, ignore_errors=True - ).lazy() + yield df_last_section.lazy() def data_scanner(self) -> Iterable[pl.LazyFrame]: # helper function to read from different data formats and create an iterator of lazy frames diff --git a/focus_converter_base/tests/provider_config_tests/ibm/sample-anonymous-ea-export-dataset.csv b/focus_converter_base/tests/provider_config_tests/ibm/sample-anonymous-ea-export-dataset.csv new file mode 100644 index 00000000..6e2b884e --- /dev/null +++ b/focus_converter_base/tests/provider_config_tests/ibm/sample-anonymous-ea-export-dataset.csv @@ -0,0 +1,32 @@ +"Account Owner ID","Account Name","Billing Month","Currency Rate","Created Time","Version" +"03d0d5ba1d4a4f8fb16eb210e198ee32","dn-prod-s-finops","2024-08",1,"2024-08-16T13:04:56.152Z","1.2" + +"Service Name","Service ID","Instance Name","Instance ID","Plan Name","Plan ID","Region","Consumer ID","Resource Group Name","Resource Group ID","CF Org","Org ID","CF Space","Space ID","Currency","Billable","Usage Metric","Usage Unit","Usage Quantity","Original Cost","Volume Discount","Volume Cost","Cost","Pending","Discount(%)","Discount ID","Non Chargeable","Classic Infrastructure Product ID","Classic Infrastructure Package ID","Parent Resource Instance ID","Other Tags","schematics","service_tag::project::config_id","service_tag::project::da_locator","service_tag::project::project_id" +"Code Engine","c22a4219-3d4f-4795-b6b2-ef95044263e7","my-code-engine-instance","crn:v1:bluemix:public:codeengine:us-south:a/03d0d5ba1d4a4f8fb16eb210e198ee32:aabde552-5936-48b7-8b21-9f5b723bdea2::","Standard","480bed27-be0a-458c-8e4f-a31d8d4e6d08","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"GIGABYTE_HOURS","GIGABYTE-HOUR",2.492495,0.031903936,100,0.031903936,0,false,"",,false,"","","","",,,, +"Code Engine","c22a4219-3d4f-4795-b6b2-ef95044263e7","my-code-engine-instance","crn:v1:bluemix:public:codeengine:us-south:a/03d0d5ba1d4a4f8fb16eb210e198ee32:aabde552-5936-48b7-8b21-9f5b723bdea2::","Standard","480bed27-be0a-458c-8e4f-a31d8d4e6d08","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"VIRTUAL_PROCESSOR_CORE_HOURS","VIRTUAL_PROCESSOR_CORE-HOUR",1.246259,0.1539129865,100,0.1539129865,0,false,"",,false,"","","","",,,, +"Continuous Delivery","db790a79-33d5-4df0-83e2-f806b9131a01","my-cd-pipeline","crn:v1:bluemix:public:continuous-delivery:us-east:a/03d0d5ba1d4a4f8fb16eb210e198ee32:197600a7-d31f-484c-9960-88f6ad9859ef::","Professional","e68ff8f5-d197-43fd-a63a-7b3a87fed73b","us-east",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"AUTHORIZED_USERS_PER_MONTH","Authorized User",2.064516129032258,77.83225806451613,0,77.83225806451613,77.83225806451613,false,"",,false,"","","","",,,, +"Continuous Delivery","db790a79-33d5-4df0-83e2-f806b9131a01","my-cd-pipeline","crn:v1:bluemix:public:continuous-delivery:us-east:a/03d0d5ba1d4a4f8fb16eb210e198ee32:197600a7-d31f-484c-9960-88f6ad9859ef::","Professional","e68ff8f5-d197-43fd-a63a-7b3a87fed73b","us-east",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"JOB_EXECUTIONS_PER_MONTH","Job Execution",295,0,0,0,0,false,"","",false,"","","","",,,, +"Cloud Activity Tracker","32414bc6-c28c-4a31-b22c-71aad62c4416","activity-tracker-eu-de","crn:v1:bluemix:public:logdnaat:eu-de:a/03d0d5ba1d4a4f8fb16eb210e198ee32:4321097a-e56a-4f9a-ba5d-80891ad04e65::","30 Day Event Search","613ee45b-3354-483c-a079-80851b0a6c5a","eu-de",,"another-rg-name","d48ec286-47b7-4c52-8e9d-b8ebbda1d388",,,,,"USD",true,"GIGABYTE_MONTHS","GIGABYTE_MONTH",0.111,0.35842455,0,0.35842455,0.35842455,false,"",,false,"","","","","us-east.workspace.projects-service.ffba5841","59ea6e39-a212-47d7-8b10-14f86dd419d1","59ea6e39-a212-47d7-8b10-14f86dd419d1.530beade-5b56-4014-805e-395f42e0b008","e157dcdd-db64-4b9c-b1ee-b0d59748c5dc" +"Cloud Activity Tracker","32414bc6-c28c-4a31-b22c-71aad62c4416","activity-tracker-us-east","crn:v1:bluemix:public:logdnaat:us-east:a/03d0d5ba1d4a4f8fb16eb210e198ee32:01f887da-51d1-4bb1-9ae8-9d42044a141b::","30 Day Event Search","613ee45b-3354-483c-a079-80851b0a6c5a","us-east",,"another-rg-name","d48ec286-47b7-4c52-8e9d-b8ebbda1d388",,,,,"USD",true,"GIGABYTE_MONTHS","GIGABYTE_MONTH",0,0,0,0,0,false,"","",false,"","","","","us-east.workspace.projects-service.ffba5841","59ea6e39-a212-47d7-8b10-14f86dd419d1","59ea6e39-a212-47d7-8b10-14f86dd419d1.530beade-5b56-4014-805e-395f42e0b008","e157dcdd-db64-4b9c-b1ee-b0d59748c5dc" +"Cloud Activity Tracker","32414bc6-c28c-4a31-b22c-71aad62c4416","activity-tracker-us-south","crn:v1:bluemix:public:logdnaat:us-south:a/03d0d5ba1d4a4f8fb16eb210e198ee32:bdd09fda-ef7e-4b44-bdae-a30b1dbed077::","30 Day Event Search","613ee45b-3354-483c-a079-80851b0a6c5a","us-south",,"another-rg-name","d48ec286-47b7-4c52-8e9d-b8ebbda1d388",,,,,"USD",true,"GIGABYTE_MONTHS","GIGABYTE_MONTH",0.02,0.064581,0,0.064581,0.064581,false,"",,false,"","","","","us-east.workspace.projects-service.ffba5841","59ea6e39-a212-47d7-8b10-14f86dd419d1","59ea6e39-a212-47d7-8b10-14f86dd419d1.530beade-5b56-4014-805e-395f42e0b008","e157dcdd-db64-4b9c-b1ee-b0d59748c5dc" +"Cloud Object Storage","a96664f3-deb5-42ea-b2dd-97e115476ff8","my-cos-instance","crn:v1:bluemix:public:cloud-object-storage:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:d7433bb3-38fc-41ff-9150-131b71bf76c9::","Standard","3d9028ba-8be3-4196-b6c0-6ff61a2c590b","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"STANDARD_BANDWIDTH","GIGABYTE",0.0015193047001957893,0.00013673742301762104,0,0.00013673742301762104,0.00013673742301762104,false,"",,false,"","","","stage","us-south.workspace.my-project-3.9fdaffae",,, +"Cloud Object Storage","a96664f3-deb5-42ea-b2dd-97e115476ff8","my-cos-instance","crn:v1:bluemix:public:cloud-object-storage:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:d7433bb3-38fc-41ff-9150-131b71bf76c9::","Standard","3d9028ba-8be3-4196-b6c0-6ff61a2c590b","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"STANDARD_CLASS_A_CALLS","API_CALLS",144,0.0007524,0,0.0007524,0.0007524,false,"",,false,"","","","stage","us-south.workspace.my-project-3.9fdaffae",,, +"Cloud Object Storage","a96664f3-deb5-42ea-b2dd-97e115476ff8","my-cos-instance","crn:v1:bluemix:public:cloud-object-storage:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:d7433bb3-38fc-41ff-9150-131b71bf76c9::","Standard","3d9028ba-8be3-4196-b6c0-6ff61a2c590b","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"STANDARD_CLASS_B_CALLS","API_CALLS",124,0.000051832,0,0.000051832,0.000051832,false,"",,false,"","","","stage","us-south.workspace.my-project-3.9fdaffae",,, +"Cloud Object Storage","a96664f3-deb5-42ea-b2dd-97e115476ff8","my-cos-instance","crn:v1:bluemix:public:cloud-object-storage:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:d7433bb3-38fc-41ff-9150-131b71bf76c9::","Standard","3d9028ba-8be3-4196-b6c0-6ff61a2c590b","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"STANDARD_STORAGE","GIGABYTE",0.0005915399430499926,0.00001359950329071933,0,0.00001359950329071933,0.00001359950329071933,,false,"",,false,"","","","stage","us-south.workspace.my-project-3.9fdaffae",,, +"Cloud Object Storage","a96664f3-deb5-42ea-b2dd-97e115476ff8","my-2nd-cos-instance","crn:v1:bluemix:public:cloud-object-storage:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:385aa280-d3e6-4b0e-b1f0-a771b1f12b4d::","Standard","3d9028ba-8be3-4196-b6c0-6ff61a2c590b","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"ARCHIVE_STORAGE","GIGABYTE",0.03837454042607738,0.00005002247980522593,0,0.00005002247980522593,0.00005002247980522593,false,"",,false,"","","","dev","us-south.workspace.my-project.0004b528",,, +"Cloud Object Storage","a96664f3-deb5-42ea-b2dd-97e115476ff8","my-2nd-cos-instance","crn:v1:bluemix:public:cloud-object-storage:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:385aa280-d3e6-4b0e-b1f0-a771b1f12b4d::","Standard","3d9028ba-8be3-4196-b6c0-6ff61a2c590b","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"STANDARD_BANDWIDTH","GIGABYTE",0.025414640083909035,0.002287317607551813,-1.4210854715202004e-14,0.002287317607551813,0.002287317607551813,false,"",,false,"","","","dev","us-south.workspace.my-project.0004b528",,, +"Cloud Object Storage","a96664f3-deb5-42ea-b2dd-97e115476ff8","my-2nd-cos-instance","crn:v1:bluemix:public:cloud-object-storage:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:385aa280-d3e6-4b0e-b1f0-a771b1f12b4d::","Standard","3d9028ba-8be3-4196-b6c0-6ff61a2c590b","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"STANDARD_CLASS_A_CALLS","API_CALLS",5481,0.028638225,0,0.028638225,0.028638225,false,"",,false,"","","","dev","us-south.workspace.my-project.0004b528",,, +"Cloud Object Storage","a96664f3-deb5-42ea-b2dd-97e115476ff8","my-2nd-cos-instance","crn:v1:bluemix:public:cloud-object-storage:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:385aa280-d3e6-4b0e-b1f0-a771b1f12b4d::","Standard","3d9028ba-8be3-4196-b6c0-6ff61a2c590b","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"STANDARD_CLASS_B_CALLS","API_CALLS",4685,0.00195833,0,0.00195833,0.00195833,false,"",,false,"","","","dev","us-south.workspace.my-project.0004b528",,, +"Cloud Object Storage","a96664f3-deb5-42ea-b2dd-97e115476ff8","my-2nd-cos-instance","crn:v1:bluemix:public:cloud-object-storage:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:385aa280-d3e6-4b0e-b1f0-a771b1f12b4d::","Standard","3d9028ba-8be3-4196-b6c0-6ff61a2c590b","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"STANDARD_STORAGE","GIGABYTE",0.11319587279551777,0.0026023731155689536,0,0.0026023731155689536,0.0026023731155689536,false,"",,false,"","","","dev","us-south.workspace.my-project.0004b528",,, +"Cloud Object Storage","a96664f3-deb5-42ea-b2dd-97e115476ff8","my-3rd-cos-instance","crn:v1:bluemix:public:cloud-object-storage:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:99b4a2ae-1d21-485b-a941-b02ac597ba0c::","Standard","3d9028ba-8be3-4196-b6c0-6ff61a2c590b","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"ARCHIVE_STORAGE","GIGABYTE",0.002633745311408915,0.0000034331739270168,0,0.0000034331739270168,0.0000034331739270168,false,"",,false,"","","","prod","us-south.workspace.my-project-2.6330378c",,, +"Cloud Object Storage","a96664f3-deb5-42ea-b2dd-97e115476ff8","my-3rd-cos-instance","crn:v1:bluemix:public:cloud-object-storage:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:99b4a2ae-1d21-485b-a941-b02ac597ba0c::","Standard","3d9028ba-8be3-4196-b6c0-6ff61a2c590b","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"STANDARD_BANDWIDTH","GIGABYTE",0.010662402957677841,0.0009596162661910057,-1.4210854715202004e-14,0.0009596162661910058,0.0009596162661910057,false,"",,false,"","","","prod","us-south.workspace.my-project-2.6330378c",,, +"Cloud Object Storage","a96664f3-deb5-42ea-b2dd-97e115476ff8","my-3rd-cos-instance","crn:v1:bluemix:public:cloud-object-storage:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:99b4a2ae-1d21-485b-a941-b02ac597ba0c::","Standard","3d9028ba-8be3-4196-b6c0-6ff61a2c590b","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"STANDARD_CLASS_A_CALLS","API_CALLS",1594,0.00832865,0,0.00832865,0.00832865,false,"",,false,"","","","prod","us-south.workspace.my-project-2.6330378c",,, +"Cloud Object Storage","a96664f3-deb5-42ea-b2dd-97e115476ff8","my-3rd-cos-instance","crn:v1:bluemix:public:cloud-object-storage:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:99b4a2ae-1d21-485b-a941-b02ac597ba0c::","Standard","3d9028ba-8be3-4196-b6c0-6ff61a2c590b","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"STANDARD_CLASS_B_CALLS","API_CALLS",1570,0.00065626,0,0.00065626,0.00065626,false,"",,false,"","","","prod","us-south.workspace.my-project-2.6330378c",,, +"Cloud Object Storage","a96664f3-deb5-42ea-b2dd-97e115476ff8","my-3rd-cos-instance","crn:v1:bluemix:public:cloud-object-storage:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:99b4a2ae-1d21-485b-a941-b02ac597ba0c::","Standard","3d9028ba-8be3-4196-b6c0-6ff61a2c590b","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"STANDARD_STORAGE","GIGABYTE",0.02013159008516419,0.00046282525605792474,0,0.00046282525605792474,0.00046282525605792474,false,"",,false,"","","","prod","us-south.workspace.my-project-2.6330378c",,, +"Log Analysis","e5bd9c00-baef-4fc7-9414-ed9fcf77420f","my-platform-logs","crn:v1:bluemix:public:logdna:us-south:a/03d0d5ba1d4a4f8fb16eb210e198ee32:04344603-de7a-4319-9283-8600438fa620::","7 Day Log Search","6e980e40-d2aa-4ece-9658-86b5022db7f1","us-south",,"another-rg-name","d48ec286-47b7-4c52-8e9d-b8ebbda1d388",,,,,"USD",true,"GIGABYTE_MONTHS","GIGABYTE_MONTH",0.04,0.06,0,0.06,0.06,false,"",,false,"","","","","us-east.workspace.projects-service.ffba5841","59ea6e39-a212-47d7-8b10-14f86dd419d1","59ea6e39-a212-47d7-8b10-14f86dd419d1.530beade-5b56-4014-805e-395f42e0b008","e157dcdd-db64-4b9c-b1ee-b0d59748c5dc" +"Secrets Manager","243f6114-b71a-45a7-a3b4-2c0a35e64b51","my-secrets","crn:v1:bluemix:public:secrets-manager:us-south:a/03d0d5ba1d4a4f8fb16eb210e198ee32:c71d1525-b9dc-41d3-b575-c8dc0a37285f::","Standard","a4fb6a74-b4fd-4ada-9457-69b9261435ca","us-south",,"another-rg-name","d48ec286-47b7-4c52-8e9d-b8ebbda1d388",,,,,"USD",true,"ACTIVE_SECRETS","ACTIVE_SECRETS",17,3.655,0,3.655,3.655,false,"",,false,"","","","","us-east.workspace.projects-service.199e9bef",,, +"Secrets Manager","243f6114-b71a-45a7-a3b4-2c0a35e64b51","my-secrets","crn:v1:bluemix:public:secrets-manager:us-south:a/03d0d5ba1d4a4f8fb16eb210e198ee32:c71d1525-b9dc-41d3-b575-c8dc0a37285f::","Standard","a4fb6a74-b4fd-4ada-9457-69b9261435ca","us-south",,"another-rg-name","d48ec286-47b7-4c52-8e9d-b8ebbda1d388",,,,,"USD",true,"INSTANCES","INSTANCE",1,321,0,321,321,false,"",,false,"","","","","us-east.workspace.projects-service.199e9bef",,, +"Key Protect","27bd8dc7-09d5-41ef-9a88-df0568d58a31","my-encryption-keys","crn:v1:bluemix:public:kms:us-south:a/03d0d5ba1d4a4f8fb16eb210e198ee32:66eefa2a-0abe-4f6d-9454-2ea9d314c169::","Graduated Tier Pricing","b6975273-ad94-43c4-b3f4-c044bd9db05d","us-south",,"my-resource-group-name","0db18cb5-e0c7-40e8-bc2e-36f211e2f0cd",,,,,"USD",true,"KEY_VERSIONS_PER_MONTH","KEY_VERSION",22,23.6797,0,23.6797,23.6797,false,"",,false,"","","","","us-east.workspace.projects-service.a5de9711","fa486184-651e-4f35-b101-0518e39927a6","e6ce9318-abee-4515-b941-94589235282a.52a85ca8-92ef-4091-ae33-5de99d5b78f4","e157dcdd-db64-4b9c-b1ee-b0d59748c5dc" +"Container Registry","public.bluemix.container.registry","Container Registry","crn:v1:bluemix:public:container-registry:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:0c05e651-1b24-4df6-83e4-feebd6f9c062::","Standard","public.bluemix.container.registry.standard","global",,"Default","c812f417-b124-4f71-8853-125ff8862f1e",,,,,"USD",true,"STORAGE","Storage Gigabyte-Months",2.1748390524505754,0.11722382492708601,22.92840974265009,0.09034626603179695,0.09034626603179695,false,"",,false,"","","","",,,, +"Container Registry","public.bluemix.container.registry","Container Registry","crn:v1:bluemix:public:container-registry:global:a/03d0d5ba1d4a4f8fb16eb210e198ee32:0c05e651-1b24-4df6-83e4-feebd6f9c062::","Standard","public.bluemix.container.registry.standard","global",,"Default","c812f417-b124-4f71-8853-125ff8862f1e",,,,,"USD",true,"TRAFFIC","Traffic Gigabytes",3.7062075128778815,0.3191044668587856,100,0.3191044668587856,0,false,"",,false,"","","","",,,, +--this is the end of report-- diff --git a/focus_converter_base/tests/provider_config_tests/ibm/test_ibm_sample_csv.py b/focus_converter_base/tests/provider_config_tests/ibm/test_ibm_sample_csv.py new file mode 100644 index 00000000..1e2f1aa8 --- /dev/null +++ b/focus_converter_base/tests/provider_config_tests/ibm/test_ibm_sample_csv.py @@ -0,0 +1,33 @@ +import pathlib +import tempfile +from unittest import TestCase + +from focus_converter.converter import FocusConverter +from focus_converter.data_loaders.data_loader import DataFormats +from focus_converter.utils.profiler import Profiler + + +class TestIBMSampleCSV(TestCase): + def test_sample_csv_dataset(self): + with tempfile.TemporaryDirectory() as temp_dir: + export_path = pathlib.Path(temp_dir) / "ibm_sample_csv_dataset" + + converter = FocusConverter( + column_prefix=None # Optional column prefix if needed else can be set to None + ) + converter.load_provider_conversion_configs() + converter.load_data( + data_path="tests/provider_config_tests/ibm/sample-anonymous-ea-export-dataset.csv", + data_format=DataFormats.CSV, + parquet_data_format=None, + ) + converter.configure_data_export( + export_path=export_path, + export_include_source_columns=False, + ) + converter.prepare_horizontal_conversion_plan(provider="ibm") + self.execute_converter(converter) + + @Profiler(csv_format=True) + def execute_converter(self, converter): + converter.convert() diff --git a/progress/README.md b/progress/README.md index 4fe8cd49..1ebce9af 100644 --- a/progress/README.md +++ b/progress/README.md @@ -31,6 +31,12 @@ Information about native support can be found here: https://azure.microsoft.com/ --- +#### IBM Cloud + +![alt text](ibm_progress_pie_chart.png) + +--- + #### Oracle Cloud ![alt text](oci_progress_pie_chart.png) diff --git a/progress/ibm_progress_pie_chart.png b/progress/ibm_progress_pie_chart.png new file mode 100644 index 00000000..e1209345 Binary files /dev/null and b/progress/ibm_progress_pie_chart.png differ