Skip to content

Commit

Permalink
Fixed some bugs and added Terminate Instance option
Browse files Browse the repository at this point in the history
  • Loading branch information
gaius-r committed Nov 7, 2020
1 parent 396901d commit b756e9b
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions menu.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ def launchInstance():
if rc != 0:
return

exitflag = 0
print("\n1. Amazon Linux 2 AMI 64-bit (x86)\t2. RHEL 8 64-bit (x86)\t 3. Custom Image ID\t 4. Exit Instance Creation")
for i in range(5):
amiChoice = input("Enter choice (1-4) : ")
Expand All @@ -33,12 +32,10 @@ def launchInstance():
return
else:
if i == 4:
exitflag = 1
break
print("Entered wrong option 5 times. Exiting...")
return
print("Invalid choice!!! Choose from 1-4\n")
if exitflag == 1:
print("Entered wrong option 5 times. Exiting...")
return


print("Create Instance with instanceID : {}, type : t2.micro, key-name : {}, security-group : {} ?".format(imageID, keyname, securityGroup))
create = input("Enter Y to confirm : ")
Expand Down

0 comments on commit b756e9b

Please sign in to comment.