Re: [PATCH 1/2] Make the fcoe, iscsi and zfcp classes singletons

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

 



> The fcoe, iscsi and zfcp classes are designed to be instantiated only once,
> currently this is not enforced. This is causing trouble as their single
> instantiation currently is done in storage.__init__, which means they cannot
> be used before instData is instantiated, as that instantiates storage.
> 
> However we need them to connect to fcoe, iscsi and/or zfcp drives while
> parsing kickstart files (so the drivers can be referenced by UUID /
> /dev/disk/by-path / whatever), and instData is not yet instantiated at that
> time.
> 
> So this patch uses a very simple Singleton design pattern, so that we can
> instantiate them where ever we need them, and all references returned will
> will point to one shared global instance.
> ---
>  storage/fcoe.py  |   19 +++++++++++++++++++
>  storage/iscsi.py |   20 ++++++++++++++++++++
>  storage/zfcp.py  |   18 ++++++++++++++++++
>  3 files changed, 57 insertions(+), 0 deletions(-)

Looks fine.

- 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