From 7860af5badaf26881be3107818665fc018907dff Mon Sep 17 00:00:00 2001 From: Marc PERREAUT Date: Mon, 23 Dec 2024 15:58:44 +0100 Subject: [PATCH] Enable the addition of product info for default product (#28) * Minor fixes * Enable the addition of product info for default product --- cloud_cost_allocation/cloud_cost_allocator.py | 48 +++++++++------- tests/test.py | 56 +++++++++++++++++-- tests/test1/test1_allocated_cost.csv | 36 ++++++------ tests/test2/test2_allocated_cost.csv | 52 ++++++++--------- tests/test3/test3_allocated_cost.csv | 42 +++++++------- tests/test4/test4_allocated_cost.csv | 38 ++++++------- tests/test5/test5_allocated_cost.csv | 14 ++--- tests/test6/test6_allocated_cost.csv | 32 +++++------ tests/test7/test7_allocated_cost.csv | 14 ++--- tests/test7/test7_further_allocated_cost.csv | 14 ++--- tests/test8/test8_allocated_cost.csv | 52 ++++++++--------- tests/test8/test8_cost_allocation_keys.csv | 54 +++++++++--------- 12 files changed, 252 insertions(+), 200 deletions(-) diff --git a/cloud_cost_allocation/cloud_cost_allocator.py b/cloud_cost_allocation/cloud_cost_allocator.py index f4f6dd5..ce186cf 100644 --- a/cloud_cost_allocation/cloud_cost_allocator.py +++ b/cloud_cost_allocation/cloud_cost_allocator.py @@ -467,16 +467,10 @@ def process_cloud_tag_selectors(self, cloud_tag_dict.clear() new_consumer_cost_items.clear() - def reset_instances(self, cost_items: list[CostItem]): - self.service_instances = {} - for cost_item in cost_items: - if not cost_item.is_consumer_cost_item_removed_for_cycle(): - cost_item.set_instance_links(self) - def process_default_products(self, cost_items: list[CostItem], default_product_consumer_cost_items: dict[str, list[ConsumerCostItem]], - default_product_allocation_keys: dict[str, float]): + default_product_allocation_total_keys: dict[str, float]): # Reset instances self.reset_instances(cost_items) @@ -493,18 +487,17 @@ def process_default_products(self, new_consumer_cost_item = self.cost_item_factory.create_consumer_cost_item() new_consumer_cost_item.copy(cost_item) new_consumer_cost_item.provider_cost_allocation_type += "+DefaultProduct" + default_product_total_keys = default_product_allocation_total_keys[cost_item.provider_service] default_product_allocation_key_ratio =\ - default_product_consumer_cost_item.allocation_keys[0] /\ - default_product_allocation_keys[cost_item.provider_service] + default_product_consumer_cost_item.allocation_keys[0] / default_product_total_keys for provider_meter in new_consumer_cost_item.provider_meters: if "Value" in provider_meter: value = provider_meter["Value"] if is_float(value): provider_meter["Value"] = str(float(value) * default_product_allocation_key_ratio) - new_consumer_cost_item.product = default_product_consumer_cost_item.product - new_consumer_cost_item.product_dimensions =\ - default_product_consumer_cost_item.product_dimensions.copy() - new_consumer_cost_item.allocation_keys[0] *= default_product_allocation_key_ratio + self.update_default_product_from_consumer_cost_item(new_consumer_cost_item, + default_product_consumer_cost_item) + new_consumer_cost_item.allocation_keys[0] /= default_product_total_keys new_cost_items.append(new_consumer_cost_item) else: new_cost_items.append(cost_item) @@ -515,8 +508,8 @@ def process_default_products(self, for cost_item in new_cost_items: if cost_item.is_self_consumption(): if not cost_item.get_product(): - cost_item.set_product(default_product) cost_item.provider_cost_allocation_type += "+DefaultProduct" + self.update_default_product_from_config(cost_item) # Add consumer cost items with default products for final service instances with no product for service_instance in self.service_instances.values(): @@ -528,25 +521,38 @@ def process_default_products(self, new_consumer_cost_item.service = service_instance.service new_consumer_cost_item.instance = service_instance.instance new_consumer_cost_item.provider_cost_allocation_type = "DefaultProduct" + new_consumer_cost_item.allocation_keys[0] = 1.0 if service_instance.service in default_product_consumer_cost_items: for default_product_consumer_cost_item\ in default_product_consumer_cost_items[service_instance.service]: new_consumer_cost_item_with_product = self.cost_item_factory.create_consumer_cost_item() new_consumer_cost_item_with_product.copy(new_consumer_cost_item) - new_consumer_cost_item_with_product.product = default_product_consumer_cost_item.product - new_consumer_cost_item_with_product.product_dimensions =\ - default_product_consumer_cost_item.product_dimensions.copy() - new_consumer_cost_item_with_product.allocation_keys[0] =\ - default_product_consumer_cost_item.allocation_keys[0] + self.update_default_product_from_consumer_cost_item(new_consumer_cost_item_with_product, + default_product_consumer_cost_item) new_cost_items.append(new_consumer_cost_item_with_product) elif default_product: - new_consumer_cost_item.product = default_product - new_consumer_cost_item.allocation_keys[0] = 1.0 + self.update_default_product_from_config(new_consumer_cost_item) new_cost_items.append(new_consumer_cost_item) # Return return new_cost_items + def reset_instances(self, cost_items: list[CostItem]): + self.service_instances = {} + for cost_item in cost_items: + if not cost_item.is_consumer_cost_item_removed_for_cycle(): + cost_item.set_instance_links(self) + + def update_default_product_from_config(self, new_consumer_cost_item: ConsumerCostItem): + new_consumer_cost_item.product = self.cost_item_factory.config.default_product + + def update_default_product_from_consumer_cost_item(self, + new_consumer_cost_item: ConsumerCostItem, + default_product_consumer_cost_item: ConsumerCostItem): + new_consumer_cost_item.product = default_product_consumer_cost_item.product + new_consumer_cost_item.product_dimensions = default_product_consumer_cost_item.product_dimensions.copy() + new_consumer_cost_item.allocation_keys[0] *= default_product_consumer_cost_item.allocation_keys[0] + def visit_for_allocation(self, ignore_cost_as_key: bool, increment_amounts: bool, diff --git a/tests/test.py b/tests/test.py index 43a5123..91808e5 100644 --- a/tests/test.py +++ b/tests/test.py @@ -52,6 +52,14 @@ class TestConsumerCostItem(ConsumerCostItem): Tests the enhancements of consumer cost items """ + __slots__ = ( + 'product_info', # type: str + ) + + def __init__(self): + super().__init__() + self.product_info = "" + def get_cost_allocation_key(self, index): return self.allocation_keys[index] @@ -83,6 +91,19 @@ def read_item(self, line) -> TestCloudCostItem: return cost_item +class TestCostAllocationKeysReader(CSV_CostAllocationKeysReader): + + def __init__(self, cost_item_factory: CostItemFactory): + super().__init__(cost_item_factory) + + def read_item(self, line) -> TestCloudCostItem: + cost_item = super().read_item(line) + # Set product info + if 'ProductInfo' in line: + cost_item.product_info = line['ProductInfo'].lower() + return cost_item + + class TestCsvAllocatedCostReader(CSV_AllocatedCostReader): def __init__(self, cost_item_factory: CostItemFactory): @@ -94,6 +115,12 @@ def read_cloud_cost_item(self, line) -> TestCloudCostItem: cost_item.cloud = line['Cloud'] return cost_item + def read_consumer_cost_item(self, line) -> TestConsumerCostItem: + cost_item = super().read_consumer_cost_item(line) + # Set product info + cost_item.product_info = line['ProductInfo'] + return cost_item + class TestCsvAllocatedCostWriter(CSV_AllocatedCostWriter): @@ -105,21 +132,24 @@ def get_headers(self) -> list[str]: # - Cloud: the cloud provider name, filled for a cloud cost item # - IsFinalConsumption: value is Y if the cost item is a leave in the cost allocation graph, N otherwise headers = super().get_headers() - headers.extend(['Cloud', 'IsFinalConsumption']) + headers.extend(['Cloud', 'IsFinalConsumption', 'ProductInfo']) return headers def export_item_base(self, cost_item, service_instance) -> dict[str]: data = super().export_item_base(cost_item, service_instance) - has_consumer = service_instance.is_provider() data['IsFinalConsumption'] = "Y" if not has_consumer or cost_item.is_self_consumption() else "N" - return data def export_item_cloud(self, cost_item, service_instance) -> dict[str]: data = super().export_item_cloud(cost_item, service_instance) data['Cloud'] = cost_item.cloud + return data + def export_item_consumer(self, cost_item, service_instance) -> dict[str]: + data = super().export_item_consumer(cost_item, service_instance) + if cost_item.product_info: + data['ProductInfo'] = cost_item.product_info return data @@ -139,6 +169,22 @@ def create_consumer_cost_item(self) -> ConsumerCostItem: return test_consumer_cost_item +class TestCloudCostAllocator(CloudCostAllocator): + def __init__(self, config: Config): + super().__init__(config) + + def update_default_product_from_consumer_cost_item(self, + new_consumer_cost_item: ConsumerCostItem, + default_product_consumer_cost_item: ConsumerCostItem): + super().update_default_product_from_consumer_cost_item(new_consumer_cost_item, + default_product_consumer_cost_item) + new_consumer_cost_item.product_info = default_product_consumer_cost_item.product_info + + def update_default_product_from_config(self, new_consumer_cost_item: ConsumerCostItem): + super().update_default_product_from_config(new_consumer_cost_item) + new_consumer_cost_item.product_info = "0" + + class Test(unittest.TestCase): """ Runs test cases @@ -219,12 +265,12 @@ def run_allocation(self, test: str): # Read keys consumer_cost_items = [] - cost_allocation_keys_reader = CSV_CostAllocationKeysReader(cost_item_factory) + cost_allocation_keys_reader = TestCostAllocationKeysReader(cost_item_factory) allocation_keys_filename = directory + "/" + test + "/" + test + "_cost_allocation_keys.csv" read_csv_file(allocation_keys_filename, cost_allocation_keys_reader, consumer_cost_items) # Allocate costs - cloud_cost_allocator = CloudCostAllocator(cost_item_factory) + cloud_cost_allocator = TestCloudCostAllocator(cost_item_factory) cloud_cost_allocator.date_str = consumer_cost_items[0].date_str cloud_cost_allocator.currency = "EUR" assert_message = test + ": cost allocation failed" diff --git a/tests/test1/test1_allocated_cost.csv b/tests/test1/test1_allocated_cost.csv index 5ac030a..0c8cdef 100644 --- a/tests/test1/test1_allocated_cost.csv +++ b/tests/test1/test1_allocated_cost.csv @@ -1,18 +1,18 @@ -Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,Component,Environment,ProviderMeterName1,ProviderMeterUnit1,ProviderMeterValue1,ProviderMeterName2,ProviderMeterUnit2,ProviderMeterValue2,ProductMeterName,ProductMeterUnit,ProductMeterValue,Cloud,IsFinalConsumption -2022-03-09,container,container,"service:container,component:compute,environment:prd1,partition:0,hello\,world:hello\:\\nworld,cloud_resource_id:/az/virtualmachines/vm1,",80.0,80.0,EUR,,,,,,,,,,compute,prd1,,,,,,,,,,az,N -2022-03-09,container,container,"service2:container,component:storage,environment:prd2,partition:1,cloud_resource_id:/az/disks/disk1,",20.0,20.0,EUR,,,,,,,,,,storage,prd2,,,,,,,,,,az,N -2022-03-09,history,history,,5.0,5.0,EUR,container,container,"'cloud_resource_id' in globals() and __import__('re').match('/az/virtualmachines/.*',cloud_resource_id)",Key,0.25,,,,,,,cpu,core,0.25,memory,gb,0.5,,,,,N -2022-03-09,history,history,,18.0,18.0,EUR,container,container,"'cloud_resource_id' in globals() and __import__('re').match('/az/disks/.*',cloud_resource_id)",Key,9.0,,,,,,,disk,gb,9,,,,,,,,N -2022-03-09,history,history,,1.0,1.0,EUR,monitoring,monitoring,,Key,10.0,,,,,,,time-series,ts,10,,,,,,,,N -2022-03-09,monitoring,monitoring,,5.0,5.0,EUR,container,container,"'cloud_resource_id' in globals() and __import__('re').match('/az/virtualmachines/.*',cloud_resource_id)",Key,0.25,,,,,grafana,,cpu,core,0.25,memory,gb,0.5,,,,,N -2022-03-09,monitoring,monitoring,,2.0,2.0,EUR,container,container,"'cloud_resource_id' in globals() and __import__('re').match('/az/disks/.*',cloud_resource_id)",Key,1.0,,,,,prometheus,,disk,gb,1,,,,,,,,N -2022-03-09,reporting,reporting,"service:reporting,component:batch,environment:prd,cost_center:5678,",10.0,10.0,EUR,container,container,"'cloud_resource_id' in globals() and __import__('re').match('/az/virtualmachines/.*',cloud_resource_id)",Key,0.5,,,,,batch,prd,cpu,core,0.5,memory,gb,1,,,,,N -2022-03-09,reporting,reporting,,1.0,1.0,EUR,monitoring,monitoring,,Key,10.0,,,,,,,time-series,ts,10,,,,,,,,N -2022-03-09,reporting,reporting,,12.0,12.0,EUR,history,history,,Key,1.0,,,,,,,records,rec,500,,,,,,,,N -2022-03-09,reporting,reporting,,20.700000000000003,20.700000000000003,EUR,reporting,reporting,,Key,9.0,,b2b,20.700000000000003,20.700000000000003,,,reports,rep,9,,,,monthly active users,usr,100,,Y -2022-03-09,reporting,reporting,,2.3000000000000003,2.3000000000000003,EUR,reporting,reporting,,Key,1.0,,b2c,2.3000000000000003,2.3000000000000003,,,reports,rep,1,,,,monthly active users,usr,900,,Y -2022-03-09,web,web,"cost_center:1234,",60.0,60.0,EUR,container,container,"'cloud_resource_id' in globals() and __import__('re').match('/az/virtualmachines/.*',cloud_resource_id)",Key,3.0,,,,,apache,prd,cpu,core,3,memory,gb,6,,,,,N -2022-03-09,web,web,,5.0,5.0,EUR,monitoring,monitoring,,Key,50.0,,,,,,,time-series,ts,50,,,,,,,,N -2022-03-09,web,web,,12.0,12.0,EUR,history,history,,Key,1.0,,,,,,,records,rec,500,,,,,,,,N -2022-03-09,web,web,,7.699999999999999,7.699999999999999,EUR,web,web,,Key,100.0,,b2b,7.699999999999999,7.699999999999999,,,http requests,req,100,,,,monthly active users,,,,Y -2022-03-09,web,web,,69.3,69.3,EUR,web,web,,Key,900.0,,b2c,69.3,69.3,,,http requests,req,900,,,,monthly active users,,,,Y +Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,Component,Environment,ProviderMeterName1,ProviderMeterUnit1,ProviderMeterValue1,ProviderMeterName2,ProviderMeterUnit2,ProviderMeterValue2,ProductMeterName,ProductMeterUnit,ProductMeterValue,Cloud,IsFinalConsumption,ProductInfo +2022-03-09,container,container,"service:container,component:compute,environment:prd1,partition:0,hello\,world:hello\:\\nworld,cloud_resource_id:/az/virtualmachines/vm1,",80.0,80.0,EUR,,,,,,,,,,compute,prd1,,,,,,,,,,az,N, +2022-03-09,container,container,"service2:container,component:storage,environment:prd2,partition:1,cloud_resource_id:/az/disks/disk1,",20.0,20.0,EUR,,,,,,,,,,storage,prd2,,,,,,,,,,az,N, +2022-03-09,history,history,,5.0,5.0,EUR,container,container,"'cloud_resource_id' in globals() and __import__('re').match('/az/virtualmachines/.*',cloud_resource_id)",Key,0.25,,,,,,,cpu,core,0.25,memory,gb,0.5,,,,,N, +2022-03-09,history,history,,18.0,18.0,EUR,container,container,"'cloud_resource_id' in globals() and __import__('re').match('/az/disks/.*',cloud_resource_id)",Key,9.0,,,,,,,disk,gb,9,,,,,,,,N, +2022-03-09,history,history,,1.0,1.0,EUR,monitoring,monitoring,,Key,10.0,,,,,,,time-series,ts,10,,,,,,,,N, +2022-03-09,monitoring,monitoring,,5.0,5.0,EUR,container,container,"'cloud_resource_id' in globals() and __import__('re').match('/az/virtualmachines/.*',cloud_resource_id)",Key,0.25,,,,,grafana,,cpu,core,0.25,memory,gb,0.5,,,,,N, +2022-03-09,monitoring,monitoring,,2.0,2.0,EUR,container,container,"'cloud_resource_id' in globals() and __import__('re').match('/az/disks/.*',cloud_resource_id)",Key,1.0,,,,,prometheus,,disk,gb,1,,,,,,,,N, +2022-03-09,reporting,reporting,"service:reporting,component:batch,environment:prd,cost_center:5678,",10.0,10.0,EUR,container,container,"'cloud_resource_id' in globals() and __import__('re').match('/az/virtualmachines/.*',cloud_resource_id)",Key,0.5,,,,,batch,prd,cpu,core,0.5,memory,gb,1,,,,,N, +2022-03-09,reporting,reporting,,1.0,1.0,EUR,monitoring,monitoring,,Key,10.0,,,,,,,time-series,ts,10,,,,,,,,N, +2022-03-09,reporting,reporting,,12.0,12.0,EUR,history,history,,Key,1.0,,,,,,,records,rec,500,,,,,,,,N, +2022-03-09,reporting,reporting,,20.700000000000003,20.700000000000003,EUR,reporting,reporting,,Key,9.0,,b2b,20.700000000000003,20.700000000000003,,,reports,rep,9,,,,monthly active users,usr,100,,Y, +2022-03-09,reporting,reporting,,2.3000000000000003,2.3000000000000003,EUR,reporting,reporting,,Key,1.0,,b2c,2.3000000000000003,2.3000000000000003,,,reports,rep,1,,,,monthly active users,usr,900,,Y, +2022-03-09,web,web,"cost_center:1234,",60.0,60.0,EUR,container,container,"'cloud_resource_id' in globals() and __import__('re').match('/az/virtualmachines/.*',cloud_resource_id)",Key,3.0,,,,,apache,prd,cpu,core,3,memory,gb,6,,,,,N, +2022-03-09,web,web,,5.0,5.0,EUR,monitoring,monitoring,,Key,50.0,,,,,,,time-series,ts,50,,,,,,,,N, +2022-03-09,web,web,,12.0,12.0,EUR,history,history,,Key,1.0,,,,,,,records,rec,500,,,,,,,,N, +2022-03-09,web,web,,7.699999999999999,7.699999999999999,EUR,web,web,,Key,100.0,,b2b,7.699999999999999,7.699999999999999,,,http requests,req,100,,,,monthly active users,,,,Y, +2022-03-09,web,web,,69.3,69.3,EUR,web,web,,Key,900.0,,b2c,69.3,69.3,,,http requests,req,900,,,,monthly active users,,,,Y, diff --git a/tests/test2/test2_allocated_cost.csv b/tests/test2/test2_allocated_cost.csv index cf1bb91..ea7b431 100644 --- a/tests/test2/test2_allocated_cost.csv +++ b/tests/test2/test2_allocated_cost.csv @@ -1,26 +1,26 @@ -Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,ProviderMeterName1,ProviderMeterUnit1,ProviderMeterValue1,ProductMeterName,ProductMeterUnit,ProductMeterValue,Cloud,IsFinalConsumption -2022-03-10,application1,application1,"service:application1,cloud_resource_id:resourceid1,",10.0,10.0,EUR,,,,,,,,,,,,,,,,az,N -2022-03-10,application1,application1,,137.0,137.0,EUR,application1,application1,,Key,2.0,,product1,4.0,4.0,a,trx,2,x,trx,2,,Y -2022-03-10,application1,application1,,133.0,133.0,EUR,application2,application2,,Key,2.0,,product1,111.0,111.0,b,trx,2,x,,,,N -2022-03-10,application1,application1,,792.0,792.0,EUR,application1,application1,,Key,3.0,,product1,6.0,6.0,a,trx,3,y,trx,3,,Y -2022-03-10,application1,application1,,786.0,786.0,EUR,application2,application2,,Key,12.0,,product1,666.0,666.0,c,trx,3,y,,,,N -2022-03-10,application2,application2,"service:application2,cloud_resource_id:resourceid2,",1000.0,1000.0,EUR,,,,,,,,,,,,,,,,az,N -2022-03-10,application2,application2,,2.0,2.0,EUR,application3,application3,'trx' in globals() and trx == 'x',Key,2.0,,product1,2.0,2.0,d,trx,2,x,,,,N -2022-03-10,application2,application2,,20.0,20.0,EUR,application3,application3,,Key,2.0,,product1,20.0,20.0,,,,x,,,,N -2022-03-10,application2,application2,,20.0,20.0,EUR,application4,application4,,Key,2.0,,,,,e,trx,2,,,,,N -2022-03-10,application2,application2,,60.0,60.0,EUR,application3,application3,'trx' in globals() and trx == 'y',Key,6.0,,product1,60.0,60.0,d,trx,6,y,,,,N -2022-03-10,application2,application2,,60.0,60.0,EUR,application3,application3,,Key,6.0,,product1,60.0,60.0,,,,y,,,,N -2022-03-10,application2,application2,,29.999999999999996,29.999999999999996,EUR,application4,application4,,Key,3.0,,,,,e,trx,3,,,,,N -2022-03-10,application2,application2,,993.0,993.0,EUR,application2,application2,,Key,6.0,,product2,333.0,333.0,b,trx,6,z,trx,6,,Y -2022-03-10,application2,application2,,600.0,600.0,EUR,application3,application3,'trx' in globals() and trx == 'z',Key,6.0,,product2,600.0,600.0,d,trx,6,z,,,,N -2022-03-10,application2,application2,,60.0,60.0,EUR,application3,application3,,Key,6.0,,product2,60.0,60.0,,,,z,,,,N -2022-03-10,application2,application2,,59.99999999999999,59.99999999999999,EUR,application4,application4,,Key,6.0,,,,,e,trx,6,,,,,N -2022-03-10,application3,application3,"service:application3,trx:x,cloud_resource_id:resourceid3x,",2.0,2.0,EUR,,,,,,,,,,,,,,,,az,N -2022-03-10,application3,application3,"service:application3,trx:y,cloud_resource_id:resourceid3y,",60.0,60.0,EUR,,,,,,,,,,,,,,,,az,N -2022-03-10,application3,application3,"service:application3,trx:z,cloud_resource_id:resourceid3z,",600.0,600.0,EUR,,,,,,,,,,,,,,,,az,N -2022-03-10,application3,application3,"service:application3,cloud_resource_id:resourceid3xyz,",140.0,140.0,EUR,,,,,,,,,,,,,,,,az,N -2022-03-10,application4,application4,"service:application4,cloud_resource_id:resourceid4,",110.0,110.0,EUR,,,,,,,,,,,,,,,,az,N -2022-03-10,application5,application5,"service:application5,cloud_resource_id:resourceid5,",7.0,7.0,EUR,,,,,,,,,,,,,,,,az,N -2022-03-10,application5,application5,,4.0,4.0,EUR,application5,application5,,Key,4.0,,product3,4.0,4.0,f,trx,4,,,,,Y -2022-03-10,application6,application6,,3.0,3.0,EUR,application5,application5,,Key,3.0,,,,,f,trx,3,,,,,N -2022-03-10,application7,application7,,3.0,3.0,EUR,application6,application6,,Key,1.0,,product4,3.0,3.0,e,trx,1,,,,,Y +Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,ProviderMeterName1,ProviderMeterUnit1,ProviderMeterValue1,ProductMeterName,ProductMeterUnit,ProductMeterValue,Cloud,IsFinalConsumption,ProductInfo +2022-03-10,application1,application1,"service:application1,cloud_resource_id:resourceid1,",10.0,10.0,EUR,,,,,,,,,,,,,,,,az,N, +2022-03-10,application1,application1,,137.0,137.0,EUR,application1,application1,,Key,2.0,,product1,4.0,4.0,a,trx,2,x,trx,2,,Y, +2022-03-10,application1,application1,,133.0,133.0,EUR,application2,application2,,Key,2.0,,product1,111.0,111.0,b,trx,2,x,,,,N, +2022-03-10,application1,application1,,792.0,792.0,EUR,application1,application1,,Key,3.0,,product1,6.0,6.0,a,trx,3,y,trx,3,,Y, +2022-03-10,application1,application1,,786.0,786.0,EUR,application2,application2,,Key,12.0,,product1,666.0,666.0,c,trx,3,y,,,,N, +2022-03-10,application2,application2,"service:application2,cloud_resource_id:resourceid2,",1000.0,1000.0,EUR,,,,,,,,,,,,,,,,az,N, +2022-03-10,application2,application2,,2.0,2.0,EUR,application3,application3,'trx' in globals() and trx == 'x',Key,2.0,,product1,2.0,2.0,d,trx,2,x,,,,N, +2022-03-10,application2,application2,,20.0,20.0,EUR,application3,application3,,Key,2.0,,product1,20.0,20.0,,,,x,,,,N, +2022-03-10,application2,application2,,20.0,20.0,EUR,application4,application4,,Key,2.0,,,,,e,trx,2,,,,,N, +2022-03-10,application2,application2,,60.0,60.0,EUR,application3,application3,'trx' in globals() and trx == 'y',Key,6.0,,product1,60.0,60.0,d,trx,6,y,,,,N, +2022-03-10,application2,application2,,60.0,60.0,EUR,application3,application3,,Key,6.0,,product1,60.0,60.0,,,,y,,,,N, +2022-03-10,application2,application2,,29.999999999999996,29.999999999999996,EUR,application4,application4,,Key,3.0,,,,,e,trx,3,,,,,N, +2022-03-10,application2,application2,,993.0,993.0,EUR,application2,application2,,Key,6.0,,product2,333.0,333.0,b,trx,6,z,trx,6,,Y, +2022-03-10,application2,application2,,600.0,600.0,EUR,application3,application3,'trx' in globals() and trx == 'z',Key,6.0,,product2,600.0,600.0,d,trx,6,z,,,,N, +2022-03-10,application2,application2,,60.0,60.0,EUR,application3,application3,,Key,6.0,,product2,60.0,60.0,,,,z,,,,N, +2022-03-10,application2,application2,,59.99999999999999,59.99999999999999,EUR,application4,application4,,Key,6.0,,,,,e,trx,6,,,,,N, +2022-03-10,application3,application3,"service:application3,trx:x,cloud_resource_id:resourceid3x,",2.0,2.0,EUR,,,,,,,,,,,,,,,,az,N, +2022-03-10,application3,application3,"service:application3,trx:y,cloud_resource_id:resourceid3y,",60.0,60.0,EUR,,,,,,,,,,,,,,,,az,N, +2022-03-10,application3,application3,"service:application3,trx:z,cloud_resource_id:resourceid3z,",600.0,600.0,EUR,,,,,,,,,,,,,,,,az,N, +2022-03-10,application3,application3,"service:application3,cloud_resource_id:resourceid3xyz,",140.0,140.0,EUR,,,,,,,,,,,,,,,,az,N, +2022-03-10,application4,application4,"service:application4,cloud_resource_id:resourceid4,",110.0,110.0,EUR,,,,,,,,,,,,,,,,az,N, +2022-03-10,application5,application5,"service:application5,cloud_resource_id:resourceid5,",7.0,7.0,EUR,,,,,,,,,,,,,,,,az,N, +2022-03-10,application5,application5,,4.0,4.0,EUR,application5,application5,,Key,4.0,,product3,4.0,4.0,f,trx,4,,,,,Y, +2022-03-10,application6,application6,,3.0,3.0,EUR,application5,application5,,Key,3.0,,,,,f,trx,3,,,,,N, +2022-03-10,application7,application7,,3.0,3.0,EUR,application6,application6,,Key,1.0,,product4,3.0,3.0,e,trx,1,,,,,Y, diff --git a/tests/test3/test3_allocated_cost.csv b/tests/test3/test3_allocated_cost.csv index 080b31a..f8a0e97 100644 --- a/tests/test3/test3_allocated_cost.csv +++ b/tests/test3/test3_allocated_cost.csv @@ -1,21 +1,21 @@ -Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,Component,Cloud,IsFinalConsumption -2022-03-11,application1,instance1,,33.0,45.0,EUR,shared2,instance1,'consumer_service' in globals() and consumer_service=='application1' and 'consumer_instance' in globals() and consumer_instance=='instance1',ConsumerTag,1.0,,,,,component1,,Y -2022-03-11,application2,instance2,,132.0,180.0,EUR,shared2,instance2,'consumer_service' in globals() and consumer_service=='application2' and 'consumer_instance' in globals() and consumer_instance=='instance2',ConsumerTag,1.0,,,,,,,Y -2022-03-11,finops,reservation,,10.0,0.0,EUR,,,,,,,,,,unused,az,N -2022-03-11,finops,reservation,,5.0,0.0,EUR,,,,,,,,,,unused,az,N -2022-03-11,finops,reservation,,5.0,0.0,EUR,,,,,,,,,,unused,az,N -2022-03-11,finops,reservation,,10.0,0.0,EUR,,,,,,,,,,unused,az,N -2022-03-11,finops,savings-plan,,5.0,0.0,EUR,,,,,,,,,,unused,az,Y -2022-03-11,shared1,shared1,"service:shared1,reservation_zone:green,cloud_resource_id:resourceid1,",100.0,150.0,EUR,,,,,,,,,,,az,N -2022-03-11,shared1,shared1,,10.0,0.0,EUR,finops,reservation,,CloudTagSelector,100.0,'reservation_zone' in globals() and reservation_zone == 'green',,,,,,N -2022-03-11,shared2,instance1,"service:shared2,instance:instance1,reservation_zone:green,cloud_resource_id:resourceid2,",10.0,15.0,EUR,,,,,,,,,,,az,N -2022-03-11,shared2,instance1,"service:shared2,instance:instance1,reservation_zone:green,cloud_resource_id:resourceid3,",10.0,15.0,EUR,,,,,,,,,,,az,N -2022-03-11,shared2,instance1,"consumer_service:application1,consumer_instance:instance1,consumer_component:component1,",11.0,15.0,EUR,shared1,shared1,,Cost,22.0,,,,,,,N -2022-03-11,shared2,instance1,,2.0,0.0,EUR,finops,reservation,,CloudTagSelector,20.0,'reservation_zone' in globals() and reservation_zone == 'green',,,,,,N -2022-03-11,shared2,instance2,"service:shared2,instance:instance2,reservation_zone:green,cloud_resource_id:resourceid4,",80.0,120.0,EUR,,,,,,,,,,,az,N -2022-03-11,shared2,instance2,"consumer_service:application2,consumer_instance:instance2,",44.0,60.0,EUR,shared1,shared1,,Cost,88.0,,,,,,,N -2022-03-11,shared2,instance2,,8.0,0.0,EUR,finops,reservation,,CloudTagSelector,80.0,'reservation_zone' in globals() and reservation_zone == 'green',,,,,,N -2022-03-11,x,x,"cloud_resource_id:resourceid0,",100.0,150.0,EUR,,,,,,,,,,,az,Y -2022-03-11,x,x,,10.0,0.0,EUR,finops,reservation,,Key,100.0,,,,,,,Y -2022-03-11,x,x,"consumer_service:n/a,consumer_instance:-,",55.0,75.0,EUR,shared1,shared1,,Cost,110.0,,,,,,,Y -2022-03-11,y,y,"service:y,cloud_resource_id:resourceid5,",120.0,150.0,EUR,,,,,,,,,,,az,Y +Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,Component,Cloud,IsFinalConsumption,ProductInfo +2022-03-11,application1,instance1,,33.0,45.0,EUR,shared2,instance1,'consumer_service' in globals() and consumer_service=='application1' and 'consumer_instance' in globals() and consumer_instance=='instance1',ConsumerTag,1.0,,,,,component1,,Y, +2022-03-11,application2,instance2,,132.0,180.0,EUR,shared2,instance2,'consumer_service' in globals() and consumer_service=='application2' and 'consumer_instance' in globals() and consumer_instance=='instance2',ConsumerTag,1.0,,,,,,,Y, +2022-03-11,finops,reservation,,10.0,0.0,EUR,,,,,,,,,,unused,az,N, +2022-03-11,finops,reservation,,5.0,0.0,EUR,,,,,,,,,,unused,az,N, +2022-03-11,finops,reservation,,5.0,0.0,EUR,,,,,,,,,,unused,az,N, +2022-03-11,finops,reservation,,10.0,0.0,EUR,,,,,,,,,,unused,az,N, +2022-03-11,finops,savings-plan,,5.0,0.0,EUR,,,,,,,,,,unused,az,Y, +2022-03-11,shared1,shared1,"service:shared1,reservation_zone:green,cloud_resource_id:resourceid1,",100.0,150.0,EUR,,,,,,,,,,,az,N, +2022-03-11,shared1,shared1,,10.0,0.0,EUR,finops,reservation,,CloudTagSelector,100.0,'reservation_zone' in globals() and reservation_zone == 'green',,,,,,N, +2022-03-11,shared2,instance1,"service:shared2,instance:instance1,reservation_zone:green,cloud_resource_id:resourceid2,",10.0,15.0,EUR,,,,,,,,,,,az,N, +2022-03-11,shared2,instance1,"service:shared2,instance:instance1,reservation_zone:green,cloud_resource_id:resourceid3,",10.0,15.0,EUR,,,,,,,,,,,az,N, +2022-03-11,shared2,instance1,"consumer_service:application1,consumer_instance:instance1,consumer_component:component1,",11.0,15.0,EUR,shared1,shared1,,Cost,22.0,,,,,,,N, +2022-03-11,shared2,instance1,,2.0,0.0,EUR,finops,reservation,,CloudTagSelector,20.0,'reservation_zone' in globals() and reservation_zone == 'green',,,,,,N, +2022-03-11,shared2,instance2,"service:shared2,instance:instance2,reservation_zone:green,cloud_resource_id:resourceid4,",80.0,120.0,EUR,,,,,,,,,,,az,N, +2022-03-11,shared2,instance2,"consumer_service:application2,consumer_instance:instance2,",44.0,60.0,EUR,shared1,shared1,,Cost,88.0,,,,,,,N, +2022-03-11,shared2,instance2,,8.0,0.0,EUR,finops,reservation,,CloudTagSelector,80.0,'reservation_zone' in globals() and reservation_zone == 'green',,,,,,N, +2022-03-11,x,x,"cloud_resource_id:resourceid0,",100.0,150.0,EUR,,,,,,,,,,,az,Y, +2022-03-11,x,x,,10.0,0.0,EUR,finops,reservation,,Key,100.0,,,,,,,Y, +2022-03-11,x,x,"consumer_service:n/a,consumer_instance:-,",55.0,75.0,EUR,shared1,shared1,,Cost,110.0,,,,,,,Y, +2022-03-11,y,y,"service:y,cloud_resource_id:resourceid5,",120.0,150.0,EUR,,,,,,,,,,,az,Y, diff --git a/tests/test4/test4_allocated_cost.csv b/tests/test4/test4_allocated_cost.csv index 9d2dea5..deb184a 100644 --- a/tests/test4/test4_allocated_cost.csv +++ b/tests/test4/test4_allocated_cost.csv @@ -1,19 +1,19 @@ -Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,Cloud,IsFinalConsumption -2022-03-17,application1,application1,"product:product1,",21.0,21.0,EUR,shared1,shared1,'t' in globals() and k == 'x',Key,2.0,,,,,,N -2022-03-17,application1,application1,,21.0,21.0,EUR,application1,application1,'product' in globals() and product=='product1',ConsumerTag,1.0,,product1,21.0,21.0,,Y -2022-03-17,application2,application2,"product:product1,",84.0,84.0,EUR,shared1,shared1,'t' in globals() and k == 'x',Key,8.0,,,,,,N -2022-03-17,application2,application2,,84.0,84.0,EUR,application2,application2,'product' in globals() and product=='product1',ConsumerTag,1.0,,product1,84.0,84.0,,Y -2022-03-17,application3,application3,"product:product1,",105.0,105.0,EUR,shared1,shared1,'t' in globals() and (k == 'x' or k == 'y'),Key,1.0,,,,,,N -2022-03-17,application3,application3,,105.0,105.0,EUR,application3,application3,'product' in globals() and product=='product1',ConsumerTag,1.0,,product1,105.0,105.0,,Y -2022-03-17,application4,application4,"consumer_service:application7,product:product2,",21.0,21.0,EUR,shared2,shared2,'t' in globals() and k == 't',Key,2.0,,,,,,N -2022-03-17,application5,application5,"consumer_service:application8,product:product2,",84.0,84.0,EUR,shared2,shared2,'t' in globals() and k == 't',Key,8.0,,,,,,N -2022-03-17,application6,application6,"consumer_service:application9,product:product2,",105.0,105.0,EUR,shared2,shared2,'t' in globals() and (k == 't' or k == 'u'),Key,1.0,,,,,,N -2022-03-17,application7,application7,,21.0,21.0,EUR,application4,application4,'consumer_service' in globals() and consumer_service=='application7' and 'product' in globals() and product=='product2',ConsumerTag,1.0,,product2,21.0,21.0,,Y -2022-03-17,application8,application8,,84.0,84.0,EUR,application5,application5,'consumer_service' in globals() and consumer_service=='application8' and 'product' in globals() and product=='product2',ConsumerTag,1.0,,product2,84.0,84.0,,Y -2022-03-17,application9,application9,,105.0,105.0,EUR,application6,application6,'consumer_service' in globals() and consumer_service=='application9' and 'product' in globals() and product=='product2',ConsumerTag,1.0,,product2,105.0,105.0,,Y -2022-03-17,shared1,shared1,"service:shared1,k:x,cloud_resource_id:resourceid1,",100.0,100.0,EUR,,,,,,,,,,az,N -2022-03-17,shared1,shared1,"service:shared1,k:y,cloud_resource_id:resourceid2,",100.0,100.0,EUR,,,,,,,,,,az,N -2022-03-17,shared1,shared1,"service:shared1,k:z,cloud_resource_id:resourceid3,",10.0,10.0,EUR,,,,,,,,,,az,N -2022-03-17,shared2,shared2,"service:shared2,k:x,cloud_resource_id:resourceid4,",100.0,100.0,EUR,,,,,,,,,,az,N -2022-03-17,shared2,shared2,"service:shared2,k:y,cloud_resource_id:resourceid5,",100.0,100.0,EUR,,,,,,,,,,az,N -2022-03-17,shared2,shared2,"service:shared2,k:z,cloud_resource_id:resourceid6,",10.0,10.0,EUR,,,,,,,,,,az,N +Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,Cloud,IsFinalConsumption,ProductInfo +2022-03-17,application1,application1,"product:product1,",21.0,21.0,EUR,shared1,shared1,'t' in globals() and k == 'x',Key,2.0,,,,,,N, +2022-03-17,application1,application1,,21.0,21.0,EUR,application1,application1,'product' in globals() and product=='product1',ConsumerTag,1.0,,product1,21.0,21.0,,Y, +2022-03-17,application2,application2,"product:product1,",84.0,84.0,EUR,shared1,shared1,'t' in globals() and k == 'x',Key,8.0,,,,,,N, +2022-03-17,application2,application2,,84.0,84.0,EUR,application2,application2,'product' in globals() and product=='product1',ConsumerTag,1.0,,product1,84.0,84.0,,Y, +2022-03-17,application3,application3,"product:product1,",105.0,105.0,EUR,shared1,shared1,'t' in globals() and (k == 'x' or k == 'y'),Key,1.0,,,,,,N, +2022-03-17,application3,application3,,105.0,105.0,EUR,application3,application3,'product' in globals() and product=='product1',ConsumerTag,1.0,,product1,105.0,105.0,,Y, +2022-03-17,application4,application4,"consumer_service:application7,product:product2,",21.0,21.0,EUR,shared2,shared2,'t' in globals() and k == 't',Key,2.0,,,,,,N, +2022-03-17,application5,application5,"consumer_service:application8,product:product2,",84.0,84.0,EUR,shared2,shared2,'t' in globals() and k == 't',Key,8.0,,,,,,N, +2022-03-17,application6,application6,"consumer_service:application9,product:product2,",105.0,105.0,EUR,shared2,shared2,'t' in globals() and (k == 't' or k == 'u'),Key,1.0,,,,,,N, +2022-03-17,application7,application7,,21.0,21.0,EUR,application4,application4,'consumer_service' in globals() and consumer_service=='application7' and 'product' in globals() and product=='product2',ConsumerTag,1.0,,product2,21.0,21.0,,Y, +2022-03-17,application8,application8,,84.0,84.0,EUR,application5,application5,'consumer_service' in globals() and consumer_service=='application8' and 'product' in globals() and product=='product2',ConsumerTag,1.0,,product2,84.0,84.0,,Y, +2022-03-17,application9,application9,,105.0,105.0,EUR,application6,application6,'consumer_service' in globals() and consumer_service=='application9' and 'product' in globals() and product=='product2',ConsumerTag,1.0,,product2,105.0,105.0,,Y, +2022-03-17,shared1,shared1,"service:shared1,k:x,cloud_resource_id:resourceid1,",100.0,100.0,EUR,,,,,,,,,,az,N, +2022-03-17,shared1,shared1,"service:shared1,k:y,cloud_resource_id:resourceid2,",100.0,100.0,EUR,,,,,,,,,,az,N, +2022-03-17,shared1,shared1,"service:shared1,k:z,cloud_resource_id:resourceid3,",10.0,10.0,EUR,,,,,,,,,,az,N, +2022-03-17,shared2,shared2,"service:shared2,k:x,cloud_resource_id:resourceid4,",100.0,100.0,EUR,,,,,,,,,,az,N, +2022-03-17,shared2,shared2,"service:shared2,k:y,cloud_resource_id:resourceid5,",100.0,100.0,EUR,,,,,,,,,,az,N, +2022-03-17,shared2,shared2,"service:shared2,k:z,cloud_resource_id:resourceid6,",10.0,10.0,EUR,,,,,,,,,,az,N, diff --git a/tests/test5/test5_allocated_cost.csv b/tests/test5/test5_allocated_cost.csv index 69f8e4d..466eed7 100644 --- a/tests/test5/test5_allocated_cost.csv +++ b/tests/test5/test5_allocated_cost.csv @@ -1,7 +1,7 @@ -Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,Cloud,IsFinalConsumption -2022-04-15,a,a,"service:a,cloud_resource_id:resourceid1,",90.0,90.0,EUR,,,,,,,,,,az,N -2022-04-15,b,b,,40.0,40.0,EUR,a,a,,Key,4.0,,,,,,N -2022-04-15,c,c,,50.0,50.0,EUR,a,a,,Key,5.0,,,,,,N -2022-04-15,c,c,,10.0,10.0,EUR,b,b,,Key,1.0,,,,,,N -2022-04-15,d,d,,30.0,30.0,EUR,b,b,,Key,3.0,,,,,,Y -2022-04-15,d,d,,60.0,60.0,EUR,c,c,,Key,4.0,,,,,,Y +Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,Cloud,IsFinalConsumption,ProductInfo +2022-04-15,a,a,"service:a,cloud_resource_id:resourceid1,",90.0,90.0,EUR,,,,,,,,,,az,N, +2022-04-15,b,b,,40.0,40.0,EUR,a,a,,Key,4.0,,,,,,N, +2022-04-15,c,c,,50.0,50.0,EUR,a,a,,Key,5.0,,,,,,N, +2022-04-15,c,c,,10.0,10.0,EUR,b,b,,Key,1.0,,,,,,N, +2022-04-15,d,d,,30.0,30.0,EUR,b,b,,Key,3.0,,,,,,Y, +2022-04-15,d,d,,60.0,60.0,EUR,c,c,,Key,4.0,,,,,,Y, diff --git a/tests/test6/test6_allocated_cost.csv b/tests/test6/test6_allocated_cost.csv index 151fcfb..2f23e77 100644 --- a/tests/test6/test6_allocated_cost.csv +++ b/tests/test6/test6_allocated_cost.csv @@ -1,16 +1,16 @@ -Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,ProductDimensionName1,ProductDimensionElement1,ProductDimensionName2,ProductDimensionElement2,ProductMeterName,ProductMeterUnit,ProductMeterValue,ProductMeterName2,ProductMeterUnit2,ProductMeterValue2,Cloud,IsFinalConsumption -2022-07-22,a,a,"service:a,cloud_resource_id:resourceid1,",1000.0,1000.0,EUR,,,,,,,,,,,,,,,,,,,,az,N -2022-07-22,b,b,,250.0,250.0,EUR,a,a,,Key,2.0,,p,250.0,250.0,d1,e1,,,,,,,,,,N -2022-07-22,b,b,,250.0,250.0,EUR,a,a,,Key,2.0,,p,250.0,250.0,d1,e2,,,,,,,,,,N -2022-07-22,b,b,,125.0,125.0,EUR,b,b,,Key,1.0,,p,0.0,0.0,d1,e1,,,x,trx,1,,,,,Y -2022-07-22,b,b,,125.0,125.0,EUR,b,b,,Key,1.0,,p,0.0,0.0,d1,e1,,,y,trx,1,,,,,Y -2022-07-22,b,b,,250.0,250.0,EUR,b,b,,Key,1.0,,p,0.0,0.0,d1,e2,,,z,trx,1,,,,,Y -2022-07-22,c,c,,125.0,125.0,EUR,a,a,,Key,1.0,,p,125.0,125.0,d2,f1,d3,f2,x0,trx,1,y0,trx,1,,N -2022-07-22,c,c,,125.0,125.0,EUR,a,a,,Key,1.0,,p,125.0,125.0,d2,f1,d3,f2,x0,trx,1,y1,trx,1,,N -2022-07-22,c,c,,125.0,125.0,EUR,a,a,,Key,1.0,,p,125.0,125.0,d2,f1,d3,f2,x1,trx,1,,,,,N -2022-07-22,c,c,,125.0,125.0,EUR,a,a,,Key,1.0,,p,125.0,125.0,d2,f1,d3,f3,,,,,,,,N -2022-07-22,c,c,,125.0,125.0,EUR,c,c,,Key,1.0,,p,0.0,0.0,d2,f1,d3,f2,x0,trx,1,y0,trx,1,,Y -2022-07-22,c,c,,125.0,125.0,EUR,c,c,,Key,1.0,,p,0.0,0.0,d2,f1,d3,f2,x0,trx,1,y1,trx,1,,Y -2022-07-22,c,c,,62.5,62.5,EUR,c,c,,Key,1.0,,p,0.0,0.0,d2,f1,d3,f2,x1,trx,1,y0,trx,1,,Y -2022-07-22,c,c,,62.5,62.5,EUR,c,c,,Key,1.0,,p,0.0,0.0,d2,f1,d3,f2,x1,trx,1,y1,trx,1,,Y -2022-07-22,c,c,,125.0,125.0,EUR,c,c,,Key,1.0,,p,0.0,0.0,d2,f1,d3,f3,x,trx,1,y,trx,1,,Y +Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,ProductDimensionName1,ProductDimensionElement1,ProductDimensionName2,ProductDimensionElement2,ProductMeterName,ProductMeterUnit,ProductMeterValue,ProductMeterName2,ProductMeterUnit2,ProductMeterValue2,Cloud,IsFinalConsumption,ProductInfo +2022-07-22,a,a,"service:a,cloud_resource_id:resourceid1,",1000.0,1000.0,EUR,,,,,,,,,,,,,,,,,,,,az,N, +2022-07-22,b,b,,250.0,250.0,EUR,a,a,,Key,2.0,,p,250.0,250.0,d1,e1,,,,,,,,,,N, +2022-07-22,b,b,,250.0,250.0,EUR,a,a,,Key,2.0,,p,250.0,250.0,d1,e2,,,,,,,,,,N, +2022-07-22,b,b,,125.0,125.0,EUR,b,b,,Key,1.0,,p,0.0,0.0,d1,e1,,,x,trx,1,,,,,Y, +2022-07-22,b,b,,125.0,125.0,EUR,b,b,,Key,1.0,,p,0.0,0.0,d1,e1,,,y,trx,1,,,,,Y, +2022-07-22,b,b,,250.0,250.0,EUR,b,b,,Key,1.0,,p,0.0,0.0,d1,e2,,,z,trx,1,,,,,Y, +2022-07-22,c,c,,125.0,125.0,EUR,a,a,,Key,1.0,,p,125.0,125.0,d2,f1,d3,f2,x0,trx,1,y0,trx,1,,N, +2022-07-22,c,c,,125.0,125.0,EUR,a,a,,Key,1.0,,p,125.0,125.0,d2,f1,d3,f2,x0,trx,1,y1,trx,1,,N, +2022-07-22,c,c,,125.0,125.0,EUR,a,a,,Key,1.0,,p,125.0,125.0,d2,f1,d3,f2,x1,trx,1,,,,,N, +2022-07-22,c,c,,125.0,125.0,EUR,a,a,,Key,1.0,,p,125.0,125.0,d2,f1,d3,f3,,,,,,,,N, +2022-07-22,c,c,,125.0,125.0,EUR,c,c,,Key,1.0,,p,0.0,0.0,d2,f1,d3,f2,x0,trx,1,y0,trx,1,,Y, +2022-07-22,c,c,,125.0,125.0,EUR,c,c,,Key,1.0,,p,0.0,0.0,d2,f1,d3,f2,x0,trx,1,y1,trx,1,,Y, +2022-07-22,c,c,,62.5,62.5,EUR,c,c,,Key,1.0,,p,0.0,0.0,d2,f1,d3,f2,x1,trx,1,y0,trx,1,,Y, +2022-07-22,c,c,,62.5,62.5,EUR,c,c,,Key,1.0,,p,0.0,0.0,d2,f1,d3,f2,x1,trx,1,y1,trx,1,,Y, +2022-07-22,c,c,,125.0,125.0,EUR,c,c,,Key,1.0,,p,0.0,0.0,d2,f1,d3,f3,x,trx,1,y,trx,1,,Y, diff --git a/tests/test7/test7_allocated_cost.csv b/tests/test7/test7_allocated_cost.csv index a5f1dc2..e4cdf34 100644 --- a/tests/test7/test7_allocated_cost.csv +++ b/tests/test7/test7_allocated_cost.csv @@ -1,7 +1,7 @@ -Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationCloudTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,Product,ProductAmortizedCost,ProductOnDemandCost,Cloud,IsFinalConsumption -26/09/2023,application1,application1,"""hello\,world"": ""hello\:\\nworld""",80,80,EUR,container,container,,,,80,,,,,N -26/09/2023,application1,application1,,64,64,EUR,application1,application1,,,,80,product1,64,64,,Y -26/09/2023,application1,application1,,16,16,EUR,application1,application1,,,,20,product2,16,16,,Y -26/09/2023,application2,application2,,20,20,EUR,container,container,,,,20,,,,,N -26/09/2023,application2,application2,,20,20,EUR,application2,application2,,,,1,product3,20,20,,Y -26/09/2023,container,container,"service:container,cloud_resource_id:/az/virtualmachines/vm1,",100,100,EUR,,,,,,,,,,az,N +Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationCloudTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,Product,ProductAmortizedCost,ProductOnDemandCost,Cloud,IsFinalConsumption,ProductInfo +26/09/2023,application1,application1,"""hello\,world"": ""hello\:\\nworld""",80,80,EUR,container,container,,,,80,,,,,N, +26/09/2023,application1,application1,,64,64,EUR,application1,application1,,,,80,product1,64,64,,Y,1 +26/09/2023,application1,application1,,16,16,EUR,application1,application1,,,,20,product2,16,16,,Y,2 +26/09/2023,application2,application2,,20,20,EUR,container,container,,,,20,,,,,N, +26/09/2023,application2,application2,,20,20,EUR,application2,application2,,,,1,product3,20,20,,Y,3 +26/09/2023,container,container,"service:container,cloud_resource_id:/az/virtualmachines/vm1,",100,100,EUR,,,,,,,,,,az,N, diff --git a/tests/test7/test7_further_allocated_cost.csv b/tests/test7/test7_further_allocated_cost.csv index c2f8143..ec5b718 100644 --- a/tests/test7/test7_further_allocated_cost.csv +++ b/tests/test7/test7_further_allocated_cost.csv @@ -1,7 +1,7 @@ -Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,Co2,ElectricityPower,ProductCo2,ProductElectricityPower,Co2Key,Cloud,IsFinalConsumption -26/09/2023,application1,application1,"""hello\,world"":""hello\:\\nworld"",",80.0,80.0,EUR,container,container,,,80.0,,,,,6.0,0.6,,,60,,N -26/09/2023,application1,application1,,64.0,64.0,EUR,application1,application1,,,80.0,,product1,64.0,64.0,4.800000000000001,0.48,4.800000000000001,0.48,80.0,,Y -26/09/2023,application1,application1,,16.0,16.0,EUR,application1,application1,,,20.0,,product2,16.0,16.0,1.2000000000000002,0.12,1.2000000000000002,0.12,20.0,,Y -26/09/2023,application2,application2,,20.0,20.0,EUR,container,container,,,20.0,,,,,4.0,0.4,,,40,,N -26/09/2023,application2,application2,,20.0,20.0,EUR,application2,application2,,,1.0,,product3,20.0,20.0,4.0,0.4000000000000001,4.0,0.4000000000000001,1.0,,Y -26/09/2023,container,container,"service:container,cloud_resource_id:/az/virtualmachines/vm1,",100.0,100.0,EUR,,,,,,,,,,10,0.0,,,,az,N +Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,Co2,ElectricityPower,ProductCo2,ProductElectricityPower,Co2Key,Cloud,IsFinalConsumption,ProductInfo +26/09/2023,application1,application1,"""hello\,world"":""hello\:\\nworld"",",80.0,80.0,EUR,container,container,,,80.0,,,,,6.0,0.6,,,60,,N, +26/09/2023,application1,application1,,64.0,64.0,EUR,application1,application1,,,80.0,,product1,64.0,64.0,4.800000000000001,0.48,4.800000000000001,0.48,80.0,,Y,1 +26/09/2023,application1,application1,,16.0,16.0,EUR,application1,application1,,,20.0,,product2,16.0,16.0,1.2000000000000002,0.12,1.2000000000000002,0.12,20.0,,Y,2 +26/09/2023,application2,application2,,20.0,20.0,EUR,container,container,,,20.0,,,,,4.0,0.4,,,40,,N, +26/09/2023,application2,application2,,20.0,20.0,EUR,application2,application2,,,1.0,,product3,20.0,20.0,4.0,0.4000000000000001,4.0,0.4000000000000001,1.0,,Y,3 +26/09/2023,container,container,"service:container,cloud_resource_id:/az/virtualmachines/vm1,",100.0,100.0,EUR,,,,,,,,,,10,0.0,,,,az,N, diff --git a/tests/test8/test8_allocated_cost.csv b/tests/test8/test8_allocated_cost.csv index e633db9..f34d70a 100644 --- a/tests/test8/test8_allocated_cost.csv +++ b/tests/test8/test8_allocated_cost.csv @@ -1,26 +1,26 @@ -Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,ProviderMeterName1,ProviderMeterUnit1,ProviderMeterValue1,ProviderMeterName2,ProviderMeterUnit2,ProviderMeterValue2,ProductDimensionName1,ProductDimensionElement1,ProductDimensionName2,ProductDimensionElement2,Cloud,IsFinalConsumption -2024-01-25,app1,app1,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N -2024-01-25,app1,app1,,128.0,128.0,EUR,app1,app1,,Key,1.0,,p1,128.0,128.0,transactions,trx,1000,documents,doc,100,,,,,,Y -2024-01-25,app2,app2,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N -2024-01-25,app2,app2,,128.0,128.0,EUR,app2,app2,,DefaultProduct,1.0,,p0,128.0,128.0,,,,,,,,,,,,Y -2024-01-25,app3,a3i1,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N -2024-01-25,app3,a3i1,,64.0,64.0,EUR,plf1,plf1,,Key+DefaultProduct,1.0,,p9,64.0,64.0,meter1,unit1,10.0,,,,p9d1,pd9e1,p9d2,p9e2,,N -2024-01-25,app3,a3i1,,192.0,192.0,EUR,app3,a3i1,,Key,1.0,,p3,128.0,128.0,transactions,trx,1000,documents,doc,100,,,,,,Y -2024-01-25,app3,a3i2,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N -2024-01-25,app3,a3i2,,64.0,64.0,EUR,plf1,plf1,,Key+DefaultProduct,1.0,,p9,64.0,64.0,meter1,unit2,10.0,,,,p9d1,pd9e1,p9d2,p9e2,,N -2024-01-25,app4,app4,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N -2024-01-25,app4,app4,,192.0,192.0,EUR,app3,a3i2,,Key,1.0,,,,,transactions,trx,1000,documents,doc,100,,,,,,N -2024-01-25,app4,app4,,160.0,160.0,EUR,app4,app4,,DefaultProduct,1.0,,p4,128.0,128.0,,,,,,,p4d1,pd4e1,p4d2,p4e2,,Y -2024-01-25,app4,app4,,160.0,160.0,EUR,app4,app4,,DefaultProduct,1.0,,p5,128.0,128.0,,,,,,,p5d1,pd5e1,p5d2,p5e2,,Y -2024-01-25,app5,app5,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N -2024-01-25,app5,app5,,64.0,64.0,EUR,plf2,plf2,,Key,1.0,,p2,64.0,64.0,meter2,unit2,10,,,,,,,,,N -2024-01-25,app5,app5,,96.0,96.0,EUR,app5,app5,,Key+DefaultProduct,1.0,,p6,64.0,64.0,transactions,trx,1000.0,documents,doc,100.0,p6d1,pd6e1,p6d2,p6e2,,Y -2024-01-25,app6,app6,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N -2024-01-25,app6,app6,,64.0,64.0,EUR,plf2,plf2,,Key,1.0,,p2,64.0,64.0,meter2,unit2,10,,,,,,,,,N -2024-01-25,app6,app6,,96.0,96.0,EUR,app5,app5,,Key+DefaultProduct,1.0,,p6,64.0,64.0,transactions,trx,1000.0,documents,doc,100.0,p6d1,pd6e1,p6d2,p6e2,,N -2024-01-25,app6,app6,,144.0,144.0,EUR,app6,app6,,Key+DefaultProduct,0.5,,p7,64.0,64.0,transactions,trx,500.0,documents,doc,50.0,p7d1,pd7e1,p7d2,p7e2,,Y -2024-01-25,app6,app6,,144.0,144.0,EUR,app6,app6,,Key+DefaultProduct,0.5,,p8,64.0,64.0,transactions,trx,500.0,documents,doc,50.0,p8d1,pd8e1,p8d2,p8e2,,Y -2024-01-25,container,container,"service:container,cloud_resource_id:/az/virtualmachines/vm1,",1280.0,1280.0,EUR,,,,,,,,,,,,,,,,,,,,az,N -2024-01-25,container,container,,128.0,128.0,EUR,container,container,,Key+DefaultProduct,1.0,,p0,128.0,128.0,cpu,vcpu,1,memory,gb,4,,,,,,Y -2024-01-25,plf1,plf1,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N -2024-01-25,plf2,plf2,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N +Date,Service,Instance,Tags,AmortizedCost,OnDemandCost,Currency,ProviderService,ProviderInstance,ProviderTagSelector,ProviderCostAllocationType,ProviderCostAllocationKey,ProviderCostAllocationCloudTagSelector,Product,ProductAmortizedCost,ProductOnDemandCost,ProviderMeterName1,ProviderMeterUnit1,ProviderMeterValue1,ProviderMeterName2,ProviderMeterUnit2,ProviderMeterValue2,ProductDimensionName1,ProductDimensionElement1,ProductDimensionName2,ProductDimensionElement2,Cloud,IsFinalConsumption,ProductInfo +2024-01-25,app1,app1,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N, +2024-01-25,app1,app1,,128.0,128.0,EUR,app1,app1,,Key,1.0,,p1,128.0,128.0,transactions,trx,1000,documents,doc,100,,,,,,Y,1 +2024-01-25,app2,app2,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N, +2024-01-25,app2,app2,,128.0,128.0,EUR,app2,app2,,DefaultProduct,1.0,,p0,128.0,128.0,,,,,,,,,,,,Y,0 +2024-01-25,app3,a3i1,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N, +2024-01-25,app3,a3i1,,64.0,64.0,EUR,plf1,plf1,,Key+DefaultProduct,1.0,,p9,64.0,64.0,meter1,unit1,10.0,,,,p9d1,pd9e1,p9d2,p9e2,,N,9 +2024-01-25,app3,a3i1,,192.0,192.0,EUR,app3,a3i1,,Key,1.0,,p3,128.0,128.0,transactions,trx,1000,documents,doc,100,,,,,,Y,3 +2024-01-25,app3,a3i2,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N, +2024-01-25,app3,a3i2,,64.0,64.0,EUR,plf1,plf1,,Key+DefaultProduct,1.0,,p9,64.0,64.0,meter1,unit2,10.0,,,,p9d1,pd9e1,p9d2,p9e2,,N,9 +2024-01-25,app4,app4,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N, +2024-01-25,app4,app4,,192.0,192.0,EUR,app3,a3i2,,Key,1.0,,,,,transactions,trx,1000,documents,doc,100,,,,,,N, +2024-01-25,app4,app4,,160.0,160.0,EUR,app4,app4,,DefaultProduct,1.0,,p4,128.0,128.0,,,,,,,p4d1,pd4e1,p4d2,p4e2,,Y,4 +2024-01-25,app4,app4,,160.0,160.0,EUR,app4,app4,,DefaultProduct,1.0,,p5,128.0,128.0,,,,,,,p5d1,pd5e1,p5d2,p5e2,,Y,5 +2024-01-25,app5,app5,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N, +2024-01-25,app5,app5,,64.0,64.0,EUR,plf2,plf2,,Key,1.0,,p2,64.0,64.0,meter2,unit2,10,,,,,,,,,N,2 +2024-01-25,app5,app5,,96.0,96.0,EUR,app5,app5,,Key+DefaultProduct,1.0,,p6,64.0,64.0,transactions,trx,1000.0,documents,doc,100.0,p6d1,pd6e1,p6d2,p6e2,,Y,6 +2024-01-25,app6,app6,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N, +2024-01-25,app6,app6,,64.0,64.0,EUR,plf2,plf2,,Key,1.0,,p2,64.0,64.0,meter2,unit2,10,,,,,,,,,N,2 +2024-01-25,app6,app6,,96.0,96.0,EUR,app5,app5,,Key+DefaultProduct,1.0,,p6,64.0,64.0,transactions,trx,1000.0,documents,doc,100.0,p6d1,pd6e1,p6d2,p6e2,,N,6 +2024-01-25,app6,app6,,144.0,144.0,EUR,app6,app6,,Key+DefaultProduct,0.5,,p7,64.0,64.0,transactions,trx,500.0,documents,doc,50.0,p7d1,pd7e1,p7d2,p7e2,,Y,7 +2024-01-25,app6,app6,,144.0,144.0,EUR,app6,app6,,Key+DefaultProduct,0.5,,p8,64.0,64.0,transactions,trx,500.0,documents,doc,50.0,p8d1,pd8e1,p8d2,p8e2,,Y,8 +2024-01-25,container,container,"service:container,cloud_resource_id:/az/virtualmachines/vm1,",1280.0,1280.0,EUR,,,,,,,,,,,,,,,,,,,,az,N, +2024-01-25,container,container,,128.0,128.0,EUR,container,container,,Key+DefaultProduct,1.0,,p0,128.0,128.0,cpu,vcpu,1,memory,gb,4,,,,,,Y,0 +2024-01-25,plf1,plf1,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N, +2024-01-25,plf2,plf2,,128.0,128.0,EUR,container,container,,Key,1.0,,,,,cpu,vcpu,1,memory,gb,4,,,,,,N, diff --git a/tests/test8/test8_cost_allocation_keys.csv b/tests/test8/test8_cost_allocation_keys.csv index 8950b14..7fd950f 100644 --- a/tests/test8/test8_cost_allocation_keys.csv +++ b/tests/test8/test8_cost_allocation_keys.csv @@ -1,27 +1,27 @@ -Date,ProviderService,ProviderInstance,ProviderMeterName1,ProviderMeterUnit1,ProviderMeterValue1,ProviderMeterName2,ProviderMeterUnit2,ProviderMeterValue2,ProviderCostAllocationKey,ConsumerService,ConsumerInstance,Product,ProductDimensionName1,ProductDimensionElement1,ProductDimensionName2,ProductDimensionElement2,ProviderCostAllocationType -2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,app1,app1,,,,,,Key -2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,app2,app2,,,,,,Key -2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,app3,a3i1,,,,,,Key -2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,app3,a3i2,,,,,,Key -2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,app4,app4,,,,,,Key -2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,app5,app5,,,,,,Key -2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,app6,app6,,,,,,Key -2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,plf1,plf1,,,,,,Key -2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,plf2,plf2,,,,,,Key -2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,container,container,,,,,,Key -2024-01-25,app1,app1,transactions,trx,1000,documents,doc,100,1,app1,app1,p1,,,,,Key -2024-01-25,plf1,plf1,meter1,unit1,10,,,,1,app3,a3i1,,,,,,Key -2024-01-25,plf1,plf1,meter1,unit2,10,,,,1,app3,a3i2,,,,,,Key -2024-01-25,app3,a3i1,transactions,trx,1000,documents,doc,100,1,app3,a3i1,p3,,,,,Key -2024-01-25,app3,a3i2,transactions,trx,1000,documents,doc,100,1,app4,app4,,,,,,Key -2024-01-25,plf2,plf2,meter2,unit2,10,,,,1,app5,app5,p2,,,,,Key -2024-01-25,plf2,plf2,meter2,unit2,10,,,,1,app6,app6,p2,,,,,Key -2024-01-25,app5,app5,transactions,trx,1000,documents,doc,100,1,app5,app5,,,,,,Key -2024-01-25,app5,app5,transactions,trx,1000,documents,doc,100,1,app6,app6,,,,,,Key -2024-01-25,app6,app6,transactions,trx,1000,documents,doc,100,1,app6,app6,,,,,,Key -2024-01-25,app4,,,,,,,,1,,,p4,p4d1,pd4e1,p4d2,p4e2,DefaultProduct -2024-01-25,app4,,,,,,,,1,,,p5,p5d1,pd5e1,p5d2,p5e2,DefaultProduct -2024-01-25,app5,,,,,,,,1,,,p6,p6d1,pd6e1,p6d2,p6e2,DefaultProduct -2024-01-25,app6,,,,,,,,1,,,p7,p7d1,pd7e1,p7d2,p7e2,DefaultProduct -2024-01-25,app6,,,,,,,,1,,,p8,p8d1,pd8e1,p8d2,p8e2,DefaultProduct -2024-01-25,plf1,,,,,,,,1,,,p9,p9d1,pd9e1,p9d2,p9e2,DefaultProduct +Date,ProviderService,ProviderInstance,ProviderMeterName1,ProviderMeterUnit1,ProviderMeterValue1,ProviderMeterName2,ProviderMeterUnit2,ProviderMeterValue2,ProviderCostAllocationKey,ConsumerService,ConsumerInstance,Product,ProductDimensionName1,ProductDimensionElement1,ProductDimensionName2,ProductDimensionElement2,ProviderCostAllocationType,ProductInfo +2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,app1,app1,,,,,,Key, +2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,app2,app2,,,,,,Key, +2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,app3,a3i1,,,,,,Key, +2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,app3,a3i2,,,,,,Key, +2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,app4,app4,,,,,,Key, +2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,app5,app5,,,,,,Key, +2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,app6,app6,,,,,,Key, +2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,plf1,plf1,,,,,,Key, +2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,plf2,plf2,,,,,,Key, +2024-01-25,container,container,cpu,vcpu,1,memory,gb,4,1,container,container,,,,,,Key, +2024-01-25,app1,app1,transactions,trx,1000,documents,doc,100,1,app1,app1,p1,,,,,Key,1 +2024-01-25,plf1,plf1,meter1,unit1,10,,,,1,app3,a3i1,,,,,,Key, +2024-01-25,plf1,plf1,meter1,unit2,10,,,,1,app3,a3i2,,,,,,Key, +2024-01-25,app3,a3i1,transactions,trx,1000,documents,doc,100,1,app3,a3i1,p3,,,,,Key,3 +2024-01-25,app3,a3i2,transactions,trx,1000,documents,doc,100,1,app4,app4,,,,,,Key, +2024-01-25,plf2,plf2,meter2,unit2,10,,,,1,app5,app5,p2,,,,,Key,2 +2024-01-25,plf2,plf2,meter2,unit2,10,,,,1,app6,app6,p2,,,,,Key,2 +2024-01-25,app5,app5,transactions,trx,1000,documents,doc,100,1,app5,app5,,,,,,Key, +2024-01-25,app5,app5,transactions,trx,1000,documents,doc,100,1,app6,app6,,,,,,Key, +2024-01-25,app6,app6,transactions,trx,1000,documents,doc,100,1,app6,app6,,,,,,Key, +2024-01-25,app4,,,,,,,,1,,,p4,p4d1,pd4e1,p4d2,p4e2,DefaultProduct,4 +2024-01-25,app4,,,,,,,,1,,,p5,p5d1,pd5e1,p5d2,p5e2,DefaultProduct,5 +2024-01-25,app5,,,,,,,,1,,,p6,p6d1,pd6e1,p6d2,p6e2,DefaultProduct,6 +2024-01-25,app6,,,,,,,,1,,,p7,p7d1,pd7e1,p7d2,p7e2,DefaultProduct,7 +2024-01-25,app6,,,,,,,,1,,,p8,p8d1,pd8e1,p8d2,p8e2,DefaultProduct,8 +2024-01-25,plf1,,,,,,,,1,,,p9,p9d1,pd9e1,p9d2,p9e2,DefaultProduct,9