Fix minor issues with the driver sync logic
Update the if check in nova sync code to return instance flavor from powervc, if the call to get the same from db failed for some reasons. Also, update the keystone version check in the common package. Change-Id: Iafc489ad723ef6732bddda029f1976204deef37d Closes-Bug: #1742377
This commit is contained in:
parent
782def6a98
commit
9ed13036de
@ -779,10 +779,10 @@ class Utils(object):
|
||||
constants.DEFAULT_STAGING_PROJECT_NAME
|
||||
try:
|
||||
projects = []
|
||||
if hasattr(ks_client, 'tenants'):
|
||||
if hasattr(ks_client, 'v2') or hasattr(ks_client, 'v2.0'):
|
||||
# For keystone V2
|
||||
projects = ks_client.tenants.list()
|
||||
elif hasattr(ks_client, 'projects'):
|
||||
elif hasattr(ks_client, 'v3') or hasattr(ks_client, 'v3.0'):
|
||||
# For keystone V3
|
||||
projects = ks_client.projects.list()
|
||||
for tenant in projects:
|
||||
|
@ -881,7 +881,7 @@ class PowerVCCloudManager(manager.Manager):
|
||||
# Check whether the instance has been resized
|
||||
pvc_flavor_dict = pvc_flavor.__dict__
|
||||
|
||||
if (db_instance_flavor['memory_mb'] ==
|
||||
if (db_instance_flavor and db_instance_flavor['memory_mb'] ==
|
||||
pvc_flavor_dict['ram'] and
|
||||
db_instance_flavor['vcpus'] ==
|
||||
pvc_flavor_dict['vcpus'] and
|
||||
|
Loading…
x
Reference in New Issue
Block a user