Linux Archive

Linux Archive (http://www.linux-archive.org/)
-   Ubuntu Kernel Team (http://www.linux-archive.org/ubuntu-kernel-team/)
-   -   Add missing log_method_call()s. (http://www.linux-archive.org/ubuntu-kernel-team/309970-add-missing-log_method_call-s.html)

Peter Jones 01-15-2010 08:23 PM

Add missing log_method_call()s.
 
Call log_method_call() in MultipathDevice.addParent() and
Device.setupParents()
---
storage/devices.py | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index d31ceae..ead7ae8 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -305,6 +305,7 @@ class Device(object):

def setupParents(self):
""" Run setup method of all parent devices. """
+ log_method_call(self, name=self.name, kids=self.kids)
for parent in self.parents:
parent.setup()

@@ -2972,6 +2973,8 @@ class MultipathDevice(DMDevice):
return "WWID %s" % (self.wwid,)

def addParent(self, parent):
+ """ Add a parent device to the mpath. """
+ log_method_call(self, self.name, status=self.status)
if self.status:
self.teardown()
self.parents.append(parent)
--
1.6.5.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

Chris Lumens 01-20-2010 03:07 PM

Add missing log_method_call()s.
 
> diff --git a/storage/devices.py b/storage/devices.py
> index d31ceae..ead7ae8 100644
> --- a/storage/devices.py
> +++ b/storage/devices.py
> @@ -305,6 +305,7 @@ class Device(object):
>
> def setupParents(self):
> """ Run setup method of all parent devices. """
> + log_method_call(self, name=self.name, kids=self.kids)
> for parent in self.parents:
> parent.setup()
>
> @@ -2972,6 +2973,8 @@ class MultipathDevice(DMDevice):
> return "WWID %s" % (self.wwid,)
>
> def addParent(self, parent):
> + """ Add a parent device to the mpath. """
> + log_method_call(self, self.name, status=self.status)
> if self.status:
> self.teardown()
> self.parents.append(parent)

Looks obviously right.

- Chris

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


All times are GMT. The time now is 11:49 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.