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
This commit is contained in:
parent
5d071b7fcc
commit
1f138011f9
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user