-
Notifications
You must be signed in to change notification settings - Fork 0
/
menu_file.py
48 lines (43 loc) · 1.71 KB
/
menu_file.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import instanceFile
import bucketFile
import run_newwebserver
import sys
def webserverMenu():
print('[[+++++++++++++++++++++++++++++++++++++++++++++++++++++++]]')
print('[[========== WELCOME TO THE AWS WEBSERVER MENU ==========}]')
print('[[+++++++++++++++++++++++++++++++++++++++++++++++++++++++]]')
print('[[ Please choose from one of the following options: ]]')
print('[[ 1) Create Instance & Bucket ]]')
print('[[ 2) List Instances ]]')
print('[[ 3) Stop Instances ]]')
print('[[ 4) Terminate All Instances ]]')
print('[[ 5) View CPU Average Utilization Time of an Instance ]]')
print('[[-------------------------------------------------------]]')
print('[[-------------------------------------------------------]]')
print('[[ 6) List e3 Buckets ]]')
print('[[ 7) Delete contents in e3 Bucket ]]')
print('[[ 8) Delete e3 Bucket ]]')
print('[[ 0) Exit ]]')
option = input(" >>> ")
if (option == '1'):
run_newwebserver.webserver()
elif (option =='2'):
instanceFile.list_inst()
elif (option =='3'):
instanceFile.stop_inst()
elif (option == '4'):
instanceFile.term_inst()
elif (option == '5'):
instanceFile.cloudWatch()
elif (option == '6'):
bucketFile.list_buckets_and_contents()
elif (option =='7'):
bucketFile.delete_contents()
elif (option == '8'):
bucketFile.delete_bucket()
elif (option == '0'):
sys.exit()
return
if __name__ == '__main__':
#runs main routine
webserverMenu()