Converted all these files from python 2 to python 3 syntax usong 2to3 library (demo3-microservices.py,demo4-scale-out-add-worker.py,demo4-scale-out.py,demo5-1-durable-storage.py,demo5-2-backup-fractals.py,destroy-all-demo-instances.py)
This commit is contained in:
@ -109,7 +109,7 @@ def main():
|
||||
keypair_exists = True
|
||||
|
||||
if keypair_exists:
|
||||
print('Keypair ' + keypair_name + ' already exists. Skipping import.')
|
||||
print(('Keypair ' + keypair_name + ' already exists. Skipping import.'))
|
||||
else:
|
||||
print('adding keypair...')
|
||||
conn.import_key_pair_from_file(keypair_name, pub_key_file)
|
||||
@ -133,7 +133,7 @@ def main():
|
||||
security_group_exists = True
|
||||
|
||||
if security_group_exists:
|
||||
print('Worker Security Group ' + worker_security_group.name + ' already exists. Skipping creation.')
|
||||
print(('Worker Security Group ' + worker_security_group.name + ' already exists. Skipping creation.'))
|
||||
else:
|
||||
worker_security_group = conn.ex_create_security_group('worker', 'for services that run on a worker node')
|
||||
conn.ex_create_security_group_rule(worker_security_group, 'TCP', 22, 22)
|
||||
@ -148,7 +148,7 @@ def main():
|
||||
security_group_exists = True
|
||||
|
||||
if security_group_exists:
|
||||
print('Controller Security Group ' + controller_security_group.name + ' already exists. Skipping creation.')
|
||||
print(('Controller Security Group ' + controller_security_group.name + ' already exists. Skipping creation.'))
|
||||
else:
|
||||
controller_security_group = conn.ex_create_security_group('control', 'for services that run on a control node')
|
||||
conn.ex_create_security_group_rule(controller_security_group, 'TCP', 22, 22)
|
||||
@ -205,11 +205,11 @@ def main():
|
||||
|
||||
if not unused_floating_ip:
|
||||
pool = conn.ex_list_floating_ip_pools()[0]
|
||||
print('Allocating new Floating IP from pool: {}'.format(pool))
|
||||
print(('Allocating new Floating IP from pool: {}'.format(pool)))
|
||||
unused_floating_ip = pool.create_floating_ip()
|
||||
|
||||
conn.ex_attach_floating_ip_to_node(instance_controller_1, unused_floating_ip)
|
||||
print('Controller Application will be deployed to http://%s' % unused_floating_ip.ip_address)
|
||||
print(('Controller Application will be deployed to http://%s' % unused_floating_ip.ip_address))
|
||||
|
||||
###########################################################################
|
||||
#
|
||||
@ -261,11 +261,11 @@ def main():
|
||||
|
||||
if not unused_floating_ip:
|
||||
pool = conn.ex_list_floating_ip_pools()[0]
|
||||
print('Allocating new Floating IP from pool: {}'.format(pool))
|
||||
print(('Allocating new Floating IP from pool: {}'.format(pool)))
|
||||
unused_floating_ip = pool.create_floating_ip()
|
||||
|
||||
conn.ex_attach_floating_ip_to_node(instance_worker_1, unused_floating_ip)
|
||||
print('The worker will be available for SSH at %s' % unused_floating_ip.ip_address)
|
||||
print(('The worker will be available for SSH at %s' % unused_floating_ip.ip_address))
|
||||
|
||||
print('You can use ssh to login to the controller using your private key. After login, you can list available '
|
||||
'fractals using "faafo list". To request the generation of new fractals, you can use "faafo create". '
|
||||
|
Reference in New Issue
Block a user