Skip to content

Commit a88a277

Browse files
authored
_gather_config: update config.json billing_provider_params *before* it gets saved to tarball (#217)
Issue: AAP-54267
1 parent 2cc08b0 commit a88a277

File tree

1 file changed

+12
-7
lines changed

1 file changed

+12
-7
lines changed

metrics_utility/automation_controller_billing/collector.py

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -66,13 +66,6 @@ def gather(self, dest=None, subset=None, since=None, until=None, billing_provide
6666

6767
self._gather_json_collections()
6868

69-
# Extend the config collection to contain billing specific info:
70-
config_collection = self.collections['config']
71-
data = json.loads(config_collection.data)
72-
data['billing_provider_params'] = billing_provider_params
73-
config_collection._save_gathering(data)
74-
# End of extension
75-
7669
self._gather_csv_collections()
7770

7871
self._process_packages()
@@ -83,6 +76,18 @@ def gather(self, dest=None, subset=None, since=None, until=None, billing_provide
8376

8477
return self.all_tar_paths()
8578

79+
def _gather_config(self):
80+
if not super()._gather_config():
81+
return False
82+
83+
# Extend the config collection to contain billing specific info:
84+
config_collection = self.collections['config']
85+
data = json.loads(config_collection.data)
86+
data['billing_provider_params'] = self.billing_provider_params
87+
config_collection._save_gathering(data)
88+
89+
return True
90+
8691
def _is_valid_license(self):
8792
# TODO: which license to check? Any license will do?
8893
return True

0 commit comments

Comments
 (0)