Skip to content

Commit

Permalink
remove zone from azure
Browse files Browse the repository at this point in the history
  • Loading branch information
Michaelvll committed Oct 9, 2022
1 parent 42d51d3 commit 652ac5c
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions sky/clouds/service_catalog/data_fetchers/fetch_azure.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,23 +102,14 @@ def get_sku_df() -> pd.DataFrame:
)
print(f'Done fetching SKUs')
items = json.loads(proc.stdout.decode('ascii'))
new_items = []
for item in items:
zones = item['locationInfo'][0]['zones']
# zones = item['locationInfo'][0]['zones']
region = item['locations'][0]
if region not in REGION_SET:
continue
if len(zones) == 0:
# The default zone is '0'.
zones = ['0']
item['Region'] = region

for zone in zones:
new_item = item.copy()
new_item['Region'] = region
new_item['AvailabilityZone'] = f'{region}-{zone}'
new_items.append(new_item)

df = pd.DataFrame(new_items)
df = pd.DataFrame(items)
df = df[(df['resourceType'] == 'virtualMachines')]
return df

Expand Down

0 comments on commit 652ac5c

Please sign in to comment.