diff options
| author | Ethan Jackson <ethan@nicira.com> | 2011-01-17 11:31:46 -0800 |
|---|---|---|
| committer | Ethan Jackson <ethan@nicira.com> | 2011-01-18 14:57:08 -0800 |
| commit | 3dfa61ca3dd40021bbcf9db66b8bb57f5efafb71 (patch) | |
| tree | 7d619ec7ea546583b300d52e0ea15f39b2ceace5 /xenserver/opt_xensource_libexec_InterfaceReconfigure.py | |
| parent | f67e3b6637ae6d2fcc7dd1ad1ae30c1ac91447b4 (diff) | |
| download | openvswitch-3dfa61ca3dd40021bbcf9db66b8bb57f5efafb71.tar.gz | |
xenserver: Allow unknown other-config attributes.
When saving the database cache, InterfaceReconfigure can crash if
unexpected attributes are in an object's other-config column. This
commit causes it to skip that attribute and log a warning.
Signed-off-by: Ethan Jackson <ethan@nicira.com>
CC: Ian Campbell <Ian.Campbell@citrix.com>
CC: Dominic Curran <Dominic.Curran@citrix.com>
Diffstat (limited to 'xenserver/opt_xensource_libexec_InterfaceReconfigure.py')
| -rw-r--r-- | xenserver/opt_xensource_libexec_InterfaceReconfigure.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xenserver/opt_xensource_libexec_InterfaceReconfigure.py b/xenserver/opt_xensource_libexec_InterfaceReconfigure.py index 48b39389a..7204032c0 100644 --- a/xenserver/opt_xensource_libexec_InterfaceReconfigure.py +++ b/xenserver/opt_xensource_libexec_InterfaceReconfigure.py @@ -245,9 +245,10 @@ def _map_to_xml(xml, parent, tag, val, attrs): e = xml.createElement(tag) parent.appendChild(e) for n,v in val.items(): - if not n in attrs: - raise Error("Unknown other-config attribute: %s" % n) - _str_to_xml(xml, e, n, v) + if n in attrs: + _str_to_xml(xml, e, n, v) + else: + log("Unknown other-config attribute: %s" % n) def _map_from_xml(n, attrs): ret = {} |
