Commit 6dbe7726 by Diego Lima

Fazer download do catalogo de precos

1 parent 8a510c9e
Showing with 4 additions and 4 deletions
...@@ -35,10 +35,10 @@ GCE_REGIONS = [ ...@@ -35,10 +35,10 @@ GCE_REGIONS = [
GCE_OS = ['linux', 'win', 'rhel', 'suse', 'suse-sap', 'sql-standard', 'sql-web', 'sql-enterprise'] GCE_OS = ['linux', 'win', 'rhel', 'suse', 'suse-sap', 'sql-standard', 'sql-web', 'sql-enterprise']
#TODO: Download & decompress the gzipped current catalog #TODO: Download & decompress the gzipped current catalog
#with urllib.request.urlopen(CATALOG) as url: with urllib.request.urlopen(CATALOG) as url:
# DATA = json.loads(url.read().decode()) DATA = json.loads(url.read().decode())
with open(FCATALOG) as url: #with open(FCATALOG) as url:
DATA = json.load(url) # DATA = json.load(url)
for product in DATA['gcp_price_list']: for product in DATA['gcp_price_list']:
if 'CUSTOM-VM-' not in product: if 'CUSTOM-VM-' not in product:
if PRODUCT_FAMILY in product: # Discard non-product entries if PRODUCT_FAMILY in product: # Discard non-product entries
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!