projects
/
openvswitch
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ovsdbmonitor: Put temporary file in ovsdb/ovsdbmonitor directory.
[openvswitch]
/
xenserver
/
opt_xensource_libexec_InterfaceReconfigure.py
diff --git
a/xenserver/opt_xensource_libexec_InterfaceReconfigure.py
b/xenserver/opt_xensource_libexec_InterfaceReconfigure.py
index 3c3a0195a6687fe8977f0094451fcb019a5489f7..2b709ad03194270b9a46ad5d43245e3004c73592 100644
(file)
--- a/
xenserver/opt_xensource_libexec_InterfaceReconfigure.py
+++ b/
xenserver/opt_xensource_libexec_InterfaceReconfigure.py
@@
-402,6
+402,10
@@
class DatabaseCache(object):
if f == "PIFs":
# drop PIFs on other hosts
self.__networks[n][f] = [p for p in rec[f] if self.__pif_on_host(p)]
if f == "PIFs":
# drop PIFs on other hosts
self.__networks[n][f] = [p for p in rec[f] if self.__pif_on_host(p)]
+ elif f == "MTU" and f not in rec:
+ # XenServer 5.5 network records did not have an
+ # MTU field, so allow this to be missing.
+ pass
else:
self.__networks[n][f] = rec[f]
self.__networks[n]['other_config'] = {}
else:
self.__networks[n][f] = rec[f]
self.__networks[n]['other_config'] = {}
@@
-799,6
+803,12
@@
class Datapath(object):
def __init__(self, pif):
self._pif = pif
def __init__(self, pif):
self._pif = pif
+ @classmethod
+ def rewrite(cls):
+ """Class method called when write action is called. Can be used
+ to update any backend specific configuration."""
+ pass
+
def configure_ipdev(self, cfg):
"""Write ifcfg TYPE field for an IPdev, plus any type specific
fields to cfg
def configure_ipdev(self, cfg):
"""Write ifcfg TYPE field for an IPdev, plus any type specific
fields to cfg
@@
-846,7
+856,7
@@
class Datapath(object):
"""
raise NotImplementedError
"""
raise NotImplementedError
-def DatapathFactory(
pif
):
+def DatapathFactory():
# XXX Need a datapath object for bridgeless PIFs
try:
# XXX Need a datapath object for bridgeless PIFs
try:
@@
-858,9
+868,9
@@
def DatapathFactory(pif):
if network_backend == "bridge":
from InterfaceReconfigureBridge import DatapathBridge
if network_backend == "bridge":
from InterfaceReconfigureBridge import DatapathBridge
- return DatapathBridge
(pif)
- elif network_backend
== "vswitch"
:
+ return DatapathBridge
+ elif network_backend
in ["openvswitch", "vswitch"]
:
from InterfaceReconfigureVswitch import DatapathVswitch
from InterfaceReconfigureVswitch import DatapathVswitch
- return DatapathVswitch
(pif)
+ return DatapathVswitch
else:
raise Error("unknown network backend %s" % network_backend)
else:
raise Error("unknown network backend %s" % network_backend)