Re: [PATCH 08/19] Make all StorageDevice-s support .vendor and .model

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> diff --git a/storage/devices.py b/storage/devices.py
> index 6b19fd8..8d74fa7 100644
> --- a/storage/devices.py
> +++ b/storage/devices.py
> @@ -737,6 +742,19 @@ class StorageDevice(Device):
>      def partitioned(self):
>          return self.format.type == "disklabel" and self.partitionable
>  
> +    @property
> +    def serial(self):
> +        return self._serial
> +
> +    @property
> +    def model(self):
> +        if not self._model:
> +            self._model = getattr(self.partedDevice, "model", None)
> +        return self._model
> +
> +    @property
> +    def vendor(self):
> +        return self._vendor

In this model you return None as the default...

> @@ -2969,6 +2985,18 @@ class MultipathDevice(DMDevice):
>          return ":".join(ret)
>  
>      @property
> +    def model(self):
> +        if not self.parents:
> +            return ""
> +        return self.parents[0].model
> +
> +    @property
> +    def vendor(self):
> +        if not self.parents:
> +            return ""
> +        return self.parents[0].vendor
> +
> +    @property
>      def description(self):
>          return "WWID %s" % (self.wwid,)

...but in this model you return "".

- Chris

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

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux