Skip to content

Commit f9285f0

Browse files
committed
Removing. disk_size.
1 parent 264072a commit f9285f0

File tree

3 files changed

+0
-15
lines changed

3 files changed

+0
-15
lines changed

Diff for: nise/generators/gcp/compute_engine_generator.py

-2
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ def _update_data(self, row): # noqa: C901
126126
row["labels"] = self.determine_labels(self.LABELS)
127127
row["system_labels"] = self.determine_system_labels(sku[3])
128128
row["price.effective_price"] = choice(self.EFFECTIVE_PRICE)
129-
row["disk_size"] = self._generate_disk_size(row["cost"], row["price.effective_price"])
130129

131130
if self.resource_level:
132131
resource = self._generate_resource(
@@ -190,7 +189,6 @@ def _update_data(self, row): # noqa: C901
190189
row["invoice"] = invoice
191190
effective_price = choice(self.EFFECTIVE_PRICE)
192191
row["price"] = {"effective_price": effective_price}
193-
row["disk_size"] = self._generate_disk_size(row["cost"], row["price"]["effective_price"])
194192

195193
if self.resource_level:
196194
resource = self._generate_resource()

Diff for: nise/generators/gcp/gcp_generator.py

-12
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757
"cost_type",
5858
"partition_date",
5959
"price.effective_price",
60-
"disk_size",
6160
)
6261

6362
GCP_RESOURCE_COLUMNS = ("resource.name", "resource.global_name")
@@ -321,14 +320,3 @@ def _generate_hourly_data(self, **kwargs):
321320
row = self._init_data_row(start, end)
322321
row = self._update_data(row)
323322
yield row
324-
325-
def _generate_disk_size(self, cost, effective_price):
326-
"""Generate disk size."""
327-
hours_in_month = 744
328-
disk_size = 0
329-
330-
if cost and effective_price:
331-
rate = float(effective_price) / hours_in_month
332-
disk_size = float(cost) / rate
333-
334-
return disk_size

Diff for: nise/upload.py

-1
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,6 @@ def gcp_bucket_to_dataset(gcp_bucket_name, file_name, dataset_name, table_name,
275275
"fields": [{"name": "effective_price", "type": "STRING", "mode": "NULLABLE"}],
276276
"mode": "NULLABLE",
277277
},
278-
{"name": "disk_size", "type": "STRING", "mode": "NULLABLE"},
279278
{
280279
"name": "adjustment_info",
281280
"type": "RECORD",

0 commit comments

Comments
 (0)