Commit e3eac6a1 by diegolima

Remover pg- dos nomes de instancias postgres

1 parent db842ad8
Showing with 6 additions and 4 deletions
......@@ -29,10 +29,10 @@ GCE_REGIONS = [
]
GCE_OS = ['linux', 'win', 'rhel', 'suse', 'suse-sap', 'sql-standard', 'sql-web', 'sql-enterprise']
with urllib.request.urlopen(CATALOG) as url:
DATA = json.loads(url.read().decode())
#with open(FCATALOG) as url:
# DATA = json.load(url)
#with urllib.request.urlopen(CATALOG) as url:
# DATA = json.loads(url.read().decode())
with open(FCATALOG) as url:
DATA = json.load(url)
for product in DATA['gcp_price_list']:
if 'CUSTOM-VM-' not in product:
if PRODUCT_FAMILY in product: # Discard non-product entries
......@@ -97,4 +97,5 @@ with urllib.request.urlopen(CATALOG) as url:
realcpu = cpu
print('google,%s,%s,%s,%s,%s,%s,%s' % (name, realcpu, memory, cost, region, os, sharedcores))
else:
realname = realname.replace('pg-','')
print('google,%s,%s,%s,%s,%s,%s' % (realname, cpu, memory, cost, region, os))
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!