|
|
|
|
|
|
|
|
|
|
xen-api
[Xen-API] [PATCH 02 of 33] interface-reconfigure: Rework log_pif_action
Signed-off-by: Ian Campbell <ian.campbell@xxxxxxxxxx>
diff -r ace851d24f2b -r ee79e2b286b1 scripts/interface-reconfigure
--- a/scripts/interface-reconfigure Fri Dec 18 14:16:32 2009 +0000
+++ b/scripts/interface-reconfigure Fri Dec 18 14:16:32 2009 +0000
@@ -506,13 +506,13 @@
def log_pif_action(action, pif):
pifrec = db.get_pif_record(pif)
- pifrec['action'] = action
- pifrec['interface-name'] = interface_name(pif)
- if action == "rewrite":
- pifrec['message'] = "Rewrite PIF %(uuid)s configuration" % pifrec
- else:
- pifrec['message'] = "Bring %(action)s PIF %(uuid)s" % pifrec
- log("%(message)s: %(interface-name)s configured as
%(ip_configuration_mode)s" % pifrec)
+ rec = {}
+ rec['uuid'] = pifrec['uuid']
+ rec['ip_configuration_mode'] = pifrec['ip_configuration_mode']
+ rec['action'] = action
+ rec['pif_netdev_name'] = interface_name(pif)
+ rec['message'] = "Bring %(action)s PIF %(uuid)s" % rec
+ log("%(message)s: %(pif_netdev_name)s configured as
%(ip_configuration_mode)s" % rec)
def load_bonding_driver():
log("Loading bonding driver")
_______________________________________________
xen-api mailing list
xen-api@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/mailman/listinfo/xen-api
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- [Xen-API] [PATCH 00 of 33] Rework interface reconfigure, Ian Campbell
- [Xen-API] [PATCH 01 of 33] interface-reconfigure: drop debug mode, Ian Campbell
- [Xen-API] [PATCH 02 of 33] interface-reconfigure: Rework log_pif_action to not abuse the pifrec dict,
Ian Campbell <=
- [Xen-API] [PATCH 03 of 33] interface-reconfigure: drop default path from ConfigurationFile object, Ian Campbell
- [Xen-API] [PATCH 04 of 33] interface-reconfigure: Only include objects on the current host in the DatabaseCache, Ian Campbell
- [Xen-API] [PATCH 05 of 33] interface-reconfigure: Restrict the fields pulled from XenAPI into DatabaseCache, Ian Campbell
- [Xen-API] [PATCH 06 of 33] interface-reconfigure: Explicity cache database configuration in /var/xapi/network.dbcache, Ian Campbell
- [Xen-API] [PATCH 07 of 33] interface-reconfigure: Cleanup whitespace, Ian Campbell
- [Xen-API] [PATCH 08 of 33] interface-reconfigure: drop "--force all down", Ian Campbell
- [Xen-API] [PATCH 09 of 33] interface-reconfigure: Reimplement forced rewrite, Ian Campbell
- [Xen-API] [PATCH 10 of 33] interface-reconfigure: Reformat some comments slightly, move logging function to top of file, Ian Campbell
- [Xen-API] [PATCH 11 of 33] interface-reconfigure: Add run_command utility to encapsulate os.spawnl usage, Ian Campbell
- [Xen-API] [PATCH 12 of 33] interface-reconfigure: Add pif_is_vlan utility function, Ian Campbell
|
|
|
|
|