From 1f138011f9ddd6683453aa9ed057394afbdad30e Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 3 Apr 2018 12:45:59 -0500 Subject: [PATCH] Update connection construction in launch_node The dns.py file uses openstack.connect to make the Connection but launch_node.py was still using shade.OpenStackCloud, so when the connection was passed to dns.py it was trying to use an SDK property but getting a Shade object. This is because while sdk has been updated with all of the shade objects, we haven't updated shade yet to provide the sdk version of the object, so shade objects from sdk have things shade objects from shade don't yet have. Update launch_node.py to use the same Connection construction that dns.py does. Change-Id: I1c6bfe54f94effe0e592280ba179f61a6d983e7a --- launch/launch-node.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/launch/launch-node.py b/launch/launch-node.py index 4fe75a2ac1..87ab7cd2ac 100755 --- a/launch/launch-node.py +++ b/launch/launch-node.py @@ -31,9 +31,9 @@ import traceback import dns import utils +import openstack import os_client_config import paramiko -import shade SCRIPT_DIR = os.path.dirname(sys.argv[0]) @@ -343,15 +343,12 @@ def main(): help="AZ to boot in.") options = parser.parse_args() - shade.simple_logging(debug=options.verbose) + openstack.enable_logging(debug=options.verbose) cloud_kwargs = {} if options.region: cloud_kwargs['region_name'] = options.region - cloud_config = os_client_config.OpenStackConfig().get_one_cloud( - options.cloud, **cloud_kwargs) - - cloud = shade.OpenStackCloud(cloud_config) + cloud = openstack.connect(cloud=options.cloud, **cloud_kwargs) flavor = cloud.get_flavor(options.flavor) if flavor: