From 77477d309c41cba6a7f56a94874bdb4a81322f54 Mon Sep 17 00:00:00 2001 From: Hampapur Ajay Date: Fri, 21 Oct 2016 15:11:59 -0700 Subject: [PATCH] Convert fq-name-to-uuid in case of 'uuid' key specified but None. Change-Id: Id61624c0a8617d5e3522dc38cf37650d5c046b99 Closes-Bug: 1635728 (cherry picked from commit db27cd07d560d106ccb91f43ac8e5bc5f79c8ce8) --- src/config/api-server/vnc_cfg_types.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/config/api-server/vnc_cfg_types.py b/src/config/api-server/vnc_cfg_types.py index 351dd482825..9d767085d03 100644 --- a/src/config/api-server/vnc_cfg_types.py +++ b/src/config/api-server/vnc_cfg_types.py @@ -974,9 +974,8 @@ def _check_ipam_network_subnets(cls, obj_dict, db_conn, vn_uuid, ipam_subnets_list = [] for ipam in ipam_refs: ipam_fq_name = ipam['to'] - if 'uuid' in ipam: - ipam_uuid = ipam['uuid'] - else: + ipam_uuid = ipam.get('uuid') + if not ipam_uuid: ipam_uuid = db_conn.fq_name_to_uuid('network_ipam', ipam_fq_name)