Skip to content

Commit

Permalink
Fixed issue in handling annotations in SecurityGroupKM
Browse files Browse the repository at this point in the history
Since the annotations value are sent in the second update,
it is possible to get the none value for the first update.
using empty dict on those cases would fix the issue.

Change-Id: I35ca83fccaaa86f43779a085273231b2685885d3
Closes-bug: #1677439
  • Loading branch information
ymariappan committed Mar 31, 2017
1 parent e73c69f commit a7cbf01
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/container/kube-manager/kube_manager/vnc/config_db.py
Expand Up @@ -726,7 +726,7 @@ def update(self, obj=None):
self.name = obj['fq_name'][-1]
self.fq_name = obj['fq_name']
self.build_fq_name_to_uuid(self.uuid, obj)
self.annotations = obj.get('annotations', None)
self.annotations = obj.get('annotations', {})
for kvp in self.annotations.get('key_value_pair', []):
if kvp.get('key') == 'namespace':
self.namespace = kvp.get('value')
Expand Down

0 comments on commit a7cbf01

Please sign in to comment.