@@ -92,22 +92,13 @@ def launch_basic(ec2, daily):
92
92
print (instance .availability_zone )
93
93
94
94
95
- def launch_pro (ec2 , daily ):
96
- """Show basic functionality on PRO instances."""
97
- print ("Launching Pro instance..." )
98
- with ec2 .launch (daily ) as instance :
99
- instance .wait ()
100
- print (instance .execute ("sudo ua status --wait" ))
101
- print ("Deleting Pro instance..." )
102
-
103
-
104
- def launch_pro_fips (ec2 , daily ):
105
- """Show basic functionality on PRO instances."""
106
- print ("Launching Pro FIPS instance..." )
107
- with ec2 .launch (daily ) as instance :
95
+ def launch_pro (ec2 , name , image ):
96
+ """Show basic functionality on Pro instances."""
97
+ print ("Launching {} instance..." .format (name ))
98
+ with ec2 .launch (image ) as instance :
108
99
instance .wait ()
109
- print (instance .execute ("sudo ua status --wait" ))
110
- print ("Deleting Pro FIPS instance..." )
100
+ print (instance .execute ("sudo pro status --wait" ))
101
+ print ("Deleting {} instance..." . format ( name ) )
111
102
112
103
113
104
def handle_ssh_key (ec2 , key_name ):
@@ -140,13 +131,17 @@ def demo():
140
131
key_name = "test-ec2"
141
132
handle_ssh_key (ec2 , key_name )
142
133
143
- daily = ec2 .daily_image (release = "bionic" )
144
- daily_pro = ec2 .daily_image (release = "bionic" , image_type = ImageType .PRO )
145
- daily_pro_fips = ec2 .daily_image (release = "bionic" , image_type = ImageType .PRO_FIPS )
134
+ daily = ec2 .daily_image (release = "focal" )
135
+ daily_pro = ec2 .daily_image (release = "focal" , image_type = ImageType .PRO )
136
+ daily_pro_fips = ec2 .daily_image (release = "focal" , image_type = ImageType .PRO_FIPS )
137
+ daily_pro_fips_updates = ec2 .daily_image (
138
+ release = "focal" , image_type = ImageType .PRO_FIPS_UPDATES
139
+ )
146
140
147
141
launch_basic (ec2 , daily )
148
- launch_pro (ec2 , daily_pro )
149
- launch_pro_fips (ec2 , daily_pro_fips )
142
+ launch_pro (ec2 , "PRO" , daily_pro )
143
+ launch_pro (ec2 , "PRO FIPS" , daily_pro_fips )
144
+ launch_pro (ec2 , "PRO FIPS UPDATES" , daily_pro_fips_updates )
150
145
custom_vpc (ec2 , daily )
151
146
snapshot (ec2 , daily )
152
147
launch_multiple (ec2 , daily )
0 commit comments