Commit b08cfaad by diegolima

Receber product type como parametro

1 parent 5eef6ecc
Showing with 8 additions and 2 deletions
......@@ -2,8 +2,7 @@ import urllib.request
import json
import sys
PRODUCT_TYPE = 'compute'
PRODUCT_TYPE = sys.argv[1]
if PRODUCT_TYPE == 'compute':
FCATALOG = 'examples/azure.json'
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':
FCATALOG = 'examples/azure.json'
CATALOG = 'https://azure.microsoft.com/api/v2/pricing/sql-database/calculator/?culture=en-us&discount=mosp'
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 = [
'redhat-ondemand', 'sles-basic', 'sles-premium', 'sles-sap',
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!