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 b08cfaad
authored
7 years ago
by
diegolima
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Receber product type como parametro
1 parent
5eef6ecc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
azure_parser.py
azure_parser.py
View file @
b08cfaa
...
@@ -2,8 +2,7 @@ import urllib.request
...
@@ -2,8 +2,7 @@ import urllib.request
import
json
import
json
import
sys
import
sys
PRODUCT_TYPE
=
sys
.
argv
[
1
]
PRODUCT_TYPE
=
'compute'
if
PRODUCT_TYPE
==
'compute'
:
if
PRODUCT_TYPE
==
'compute'
:
FCATALOG
=
'examples/azure.json'
FCATALOG
=
'examples/azure.json'
CATALOG
=
'https://azure.microsoft.com/api/v2/pricing/virtual-machines-base/calculator/?culture=pt-br&discount=mosp'
CATALOG
=
'https://azure.microsoft.com/api/v2/pricing/virtual-machines-base/calculator/?culture=pt-br&discount=mosp'
...
@@ -12,6 +11,13 @@ elif PRODUCT_TYPE == 'database':
...
@@ -12,6 +11,13 @@ elif PRODUCT_TYPE == 'database':
FCATALOG
=
'examples/azure.json'
FCATALOG
=
'examples/azure.json'
CATALOG
=
'https://azure.microsoft.com/api/v2/pricing/sql-database/calculator/?culture=en-us&discount=mosp'
CATALOG
=
'https://azure.microsoft.com/api/v2/pricing/sql-database/calculator/?culture=en-us&discount=mosp'
PRODUCT_FAMILY
=
'Database Instance'
PRODUCT_FAMILY
=
'Database Instance'
elif
PRODUCT_TYPE
==
'disk'
:
CATALOG
=
'https://azure.microsoft.com/api/v2/pricing/managed-disks/calculator/?culture=en-us&discount=mosp'
print
(
"Coming Soon®"
)
sys
.
exit
(
1
)
else
:
print
(
"Product type not supported"
)
sys
.
exit
(
1
)
OSLIST
=
[
OSLIST
=
[
'redhat-ondemand'
,
'sles-basic'
,
'sles-premium'
,
'sles-sap'
,
'redhat-ondemand'
,
'sles-basic'
,
'sles-premium'
,
'sles-sap'
,
...
...
This diff is collapsed.
Click to expand it.
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