enables to set keys not present in existing config (#69399)

((cherry picked from commit 95525030e2)

Co-authored-by: satunnainen <satunnainen@users.noreply.github.com>
pull/69999/head
Chih-Hsuan Yen 5 years ago committed by GitHub
parent 4670c3bab8
commit c57ca3fbf2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,2 @@
bugfixes:
- lxd_container - enables to set keys not present in existing config

@ -502,6 +502,8 @@ class LXDContainerManagement(object):
if key == 'config':
old_configs = dict((k, v) for k, v in self.old_container_json['metadata'][key].items() if not k.startswith('volatile.'))
for k, v in self.config['config'].items():
if k not in old_configs:
return True
if old_configs[k] != v:
return True
return False

Loading…
Cancel
Save