Replace attach_ip_to_server() with add_ip_list()

In later versions of shade, attach_ip_to_server() has been
deprecated and is now a private function. Changed each call
of that function to add_ip_list().

Change-Id: I2dcd0699b3969a03d43d794f156bdc48e213deff
This commit is contained in:
Caleb Boylan
2015-11-03 13:09:28 -08:00
committed by Diane Fleming
parent f86b100e68
commit b150e7408b
3 changed files with 5 additions and 5 deletions

View File

@@ -88,7 +88,7 @@ testing_instance = conn.create_server(wait=True, auto_ip=False,
f_ip = conn.available_floating_ip()
#step-14
conn.attach_ip_to_server(testing_instance['id'], f_ip['id'])
conn.add_ip_list(testing_instance, [f_ip['floating_ip_address']])
#step-15
print('The Fractals app will be deployed to http://%s' % f_ip['floating_ip_address'] )

View File

@@ -44,7 +44,7 @@ unused_floating_ip = conn.available_floating_ip()
# step-9
# step-10
conn.attach_ip_to_server(testing_instance['id'], unused_floating_ip['id'])
conn.add_ip_list(testing_instance, [unused_floating_ip['floating_ip_address']])
# step-11
worker_group = conn.create_security_group('worker', 'for services that run on a worker node')
@@ -70,7 +70,7 @@ instance_controller_1 = conn.create_server(wait=True, auto_ip=False,
unused_floating_ip = conn.available_floating_ip()
conn.attach_ip_to_server(instance_controller_1['id'], unused_floating_ip['id'])
conn.add_ip_list(instance_controller_1, [unused_floating_ip['floating_ip_address']])
print('Application will be deployed to http://%s' % unused_floating_ip['floating_ip_address'])
# step-12
@@ -96,7 +96,7 @@ instance_worker_1 = conn.create_server(wait=True, auto_ip=False,
unused_floating_ip = conn.available_floating_ip()
conn.attach_ip_to_server(instance_worker_1['id'], unused_floating_ip['id'], wait=True)
conn.add_ip_list(instance_worker_1, [unused_floating_ip['floating_ip_address']])
print('The worker will be available for SSH at %s' % unused_floating_ip['floating_ip_address'])

View File

@@ -71,7 +71,7 @@ api_2_ip = conn.get_server_private_ip(instance_api_2)
for instance in [instance_api_1, instance_api_2]:
floating_ip = get_floating_ip(conn)
conn.attach_ip_to_server(instance['id'], floating_ip['id'])
conn.add_ip_list(instance, [floating_ip['floating_ip_address']])
print('allocated %(ip)s to %(host)s' % {'ip': floating_ip['floating_ip_address'], 'host': instance['name']})
# step-6