FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora Development

 
 
LinkBack Thread Tools
 
Old 01-22-2010, 08:24 AM
Hans de Goede
 
Default Add isDisk property to MDRaidArrayDevice

And make it return True for BIOS RAID sets (but not for containers).
---
storage/devices.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index bddf055..52e0466 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -2836,6 +2836,10 @@ class MDRaidArrayDevice(StorageDevice):
def partitionable(self):
return self.devices and self.devices[0].type == "mdcontainer"

+ @property
+ def isDisk(self):
+ return self.devices and self.devices[0].type == "mdcontainer"
+
def dracutSetupString(self):
return "rd_MD_UUID=%s" % self.uuid

--
1.6.5.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-22-2010, 03:21 PM
David Lehman
 
Default Add isDisk property to MDRaidArrayDevice

On Fri, 2010-01-22 at 10:24 +0100, Hans de Goede wrote:
> And make it return True for BIOS RAID sets (but not for containers).
> ---
> storage/devices.py | 4 ++++
> 1 files changed, 4 insertions(+), 0 deletions(-)
>
> diff --git a/storage/devices.py b/storage/devices.py
> index bddf055..52e0466 100644
> --- a/storage/devices.py
> +++ b/storage/devices.py
> @@ -2836,6 +2836,10 @@ class MDRaidArrayDevice(StorageDevice):
> def partitionable(self):
> return self.devices and self.devices[0].type == "mdcontainer"
>
> + @property
> + def isDisk(self):
> + return self.devices and self.devices[0].type == "mdcontainer"
> +

It's better if you make this always return a boolean. (use
len(self.devices) != 0)

Dave

> def dracutSetupString(self):
> return "rd_MD_UUID=%s" % self.uuid
>


_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 01-22-2010, 03:27 PM
Hans de Goede
 
Default Add isDisk property to MDRaidArrayDevice

Hi,

On 01/22/2010 05:21 PM, David Lehman wrote:

On Fri, 2010-01-22 at 10:24 +0100, Hans de Goede wrote:

And make it return True for BIOS RAID sets (but not for containers).
---
storage/devices.py | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/storage/devices.py b/storage/devices.py
index bddf055..52e0466 100644
--- a/storage/devices.py
+++ b/storage/devices.py
@@ -2836,6 +2836,10 @@ class MDRaidArrayDevice(StorageDevice):
def partitionable(self):
return self.devices and self.devices[0].type == "mdcontainer"

+ @property
+ def isDisk(self):
+ return self.devices and self.devices[0].type == "mdcontainer"
+


It's better if you make this always return a boolean. (use
len(self.devices) != 0)



Ok I'll fix this before committing

Regards,

Hans

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

Thread Tools




All times are GMT. The time now is 06:13 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org