Skip to content
This repository has been archived by the owner on Aug 9, 2024. It is now read-only.

Commit

Permalink
ex2.py : Added new format of AWS_AMIS config
Browse files Browse the repository at this point in the history
  • Loading branch information
nishant-mor committed Jan 31, 2016
1 parent 5a1c7ab commit 05452ed
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions fedimg/services/ec2.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,27 @@ def __init__(self, raw_url, virt_type='hvm', vol_type='standard'):
# strip line to avoid any newlines or spaces from sneaking in
attrs = line.strip().split('|')

info = {'region': attrs[0],
'driver': region_to_driver(attrs[0]),
'arch': attrs[3],
'ami': attrs[4],
'aki': attrs[5]}
# old configuration
if len(attrs)==6:

info = {'region': attrs[0],
'driver': region_to_driver(attrs[0]),
'os': attrs[1],
'ver': attrs[2],
'arch': attrs[3],
'ami': attrs[4],
'aki': attrs[5]}

# new configuration
elif len(attrs)==4:

info = {'region': attrs[0],
'driver': region_to_driver(attrs[0]),
'arch': attrs[1],
'ami': attrs[2],
'aki': attrs[3]}



# For now, read in all AMIs to these lists, and narrow
# down later. TODO: This could be made a bit nicer...
Expand Down

0 comments on commit 05452ed

Please sign in to comment.