Skip to content

Commit

Permalink
2 todos implemented - ssh group, regions
Browse files Browse the repository at this point in the history
  • Loading branch information
vergiliu committed Nov 21, 2015
1 parent 66049dc commit b27ced0
Showing 1 changed file with 8 additions and 12 deletions.
20 changes: 8 additions & 12 deletions aws/start_ami_instance.py
Expand Up @@ -48,19 +48,13 @@ def get_ssh_security_group():


if __name__ == "__main__":
# todo 1 region see/select
# import pprint
# pprint.pprint(ec2_client.describe_regions())

# todo 2 instance type ???

# todo 3 object(s)

# todo 4 add new security group which allows SSH

# todo 5 check ResponseMetadata

instances = None
# list by default
# magic by default
option = sys.argv[1] if len(sys.argv) > 1 else "magic"

ami_image = 'ami-60b6c60a' # Amazon Linux
Expand All @@ -71,13 +65,15 @@ def get_ssh_security_group():
image = ec2.Image(ami_image)
# print("AMI name= {} [{}]".format(image.name, image.virtualization_type))
# print("block device= {}".format(image.block_device_mappings))

# region see/select
regions = ec2_client.describe_regions()
# import pprint
# pprint.pprint(regions)

if option == "magic":
# todo check_if_allow_ssh_group_is_present
default_vpc = None
print(get_ssh_security_group())
# todo create_group
# todo get_group_name?!?
print("ssh group = {}".format(get_ssh_security_group()))

if option == "start":
se_groups = get_ssh_security_group()
Expand Down

0 comments on commit b27ced0

Please sign in to comment.