Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Diego Lima
/
aws-price-parser
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 6dbe7726
authored
Feb 20, 2018
by
Diego Lima
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fazer download do catalogo de precos
1 parent
8a510c9e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
gce_parser.py
gce_parser.py
View file @
6dbe772
...
...
@@ -35,10 +35,10 @@ GCE_REGIONS = [
GCE_OS
=
[
'linux'
,
'win'
,
'rhel'
,
'suse'
,
'suse-sap'
,
'sql-standard'
,
'sql-web'
,
'sql-enterprise'
]
#TODO: Download & decompress the gzipped current catalog
#
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
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment