mirror of
https://github.com/openvswitch/ovs
synced 2025-10-27 15:18:06 +00:00
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>
This commit is contained in:
@@ -245,9 +245,10 @@ def _map_to_xml(xml, parent, tag, val, attrs):
|
|||||||
e = xml.createElement(tag)
|
e = xml.createElement(tag)
|
||||||
parent.appendChild(e)
|
parent.appendChild(e)
|
||||||
for n,v in val.items():
|
for n,v in val.items():
|
||||||
if not n in attrs:
|
if n in attrs:
|
||||||
raise Error("Unknown other-config attribute: %s" % n)
|
|
||||||
_str_to_xml(xml, e, n, v)
|
_str_to_xml(xml, e, n, v)
|
||||||
|
else:
|
||||||
|
log("Unknown other-config attribute: %s" % n)
|
||||||
|
|
||||||
def _map_from_xml(n, attrs):
|
def _map_from_xml(n, attrs):
|
||||||
ret = {}
|
ret = {}
|
||||||
|
|||||||
Reference in New Issue
Block a user