do not add empty config for vim
authorMike Marchetti <mmarchetti@sandvine.com>
Wed, 15 Nov 2017 21:22:14 +0000 (16:22 -0500)
committerMike Marchetti <mmarchetti@sandvine.com>
Wed, 15 Nov 2017 21:22:14 +0000 (16:22 -0500)
- empty config will cause RO to fail vim create
Signed-off-by: Mike Marchetti <mmarchetti@sandvine.com>
osmclient/v1/vim.py

index dd6a5e0..4230cd4 100644 (file)
@@ -68,7 +68,8 @@ class Vim(object):
         if 'config' in vim_access and vim_access['config'] is not None:
            vim_config = yaml.load(vim_access['config'])
 
-        vim_account['datacenter']['config'] = vim_config
+        if vim_config:
+            vim_account['datacenter']['config'] = vim_config
 
         vim_account = self.update_vim_account_dict(vim_account, vim_access, vim_config)