diff --git a/src/cloudforet/cost_analysis/connector/azure_cost_mgmt_connector.py b/src/cloudforet/cost_analysis/connector/azure_cost_mgmt_connector.py index 0537578..2aaaf9f 100644 --- a/src/cloudforet/cost_analysis/connector/azure_cost_mgmt_connector.py +++ b/src/cloudforet/cost_analysis/connector/azure_cost_mgmt_connector.py @@ -92,9 +92,10 @@ def begin_create_operation(self, scope, parameters): response = self.cost_mgmt_client.generate_cost_details_report.begin_create_operation(scope=scope, parameters=parameters, content_type=content_type) - result = self.convert_nested_dictionary(response.result()) - blobs = result.get('blobs', []) + _LOGGER.info(f'[begin_create_operation] result : {result} status : {response.status()}') + + blobs = result.get('blobs', []) or [] _LOGGER.debug(f'[begin_create_operation] csv_file_link: {blobs}') return blobs diff --git a/src/cloudforet/cost_analysis/manager/cost_manager.py b/src/cloudforet/cost_analysis/manager/cost_manager.py index ef9dd17..b1540a1 100644 --- a/src/cloudforet/cost_analysis/manager/cost_manager.py +++ b/src/cloudforet/cost_analysis/manager/cost_manager.py @@ -98,8 +98,8 @@ def _get_additional_info(self, result, options, tenant_id=None): meter_category = result.get('metercategory', '') tenant_id = result.get('customertenantid') if result.get('customertenantid') else tenant_id - additional_info['Tenant ID'] = tenant_id - additional_info['Subscription ID'] = result.get('subscriptionid', 'Shared') + additional_info['Tenant Id'] = tenant_id + additional_info['Subscription Id'] = result.get('subscriptionid', 'Shared') if meter_category == 'Virtual Machines' and 'Meter' in result: additional_info['Instance Type'] = result['meter'] @@ -142,7 +142,7 @@ def _get_additional_info(self, result, options, tenant_id=None): collect_resource_id = options.get('collect_resource_id', False) if collect_resource_id and result.get('resourceid') != '' and result.get('resourceid'): - additional_info['Resource ID'] = result['resourceid'] + additional_info['Resource Id'] = result['resourceid'] additional_info['Resource Name'] = result['resourceid'].split('/')[-1] if result.get('productname'):