yast2-storage
Classes | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Private Member Functions | Friends

storage::Container Class Reference

#include <Container.h>

Inheritance diagram for storage::Container:
storage::Device storage::BtrfsCo storage::Disk storage::LoopCo storage::MdCo storage::MdPartCo storage::NfsCo storage::PeContainer storage::TmpfsCo

List of all members.

Classes

struct  ConstVolumeI
struct  ConstVolumePI
struct  VolCondIPair
struct  VolumeI
struct  VolumePI

Public Types

typedef DerefIterator
< ConstVolPIterator, const
Volume
ConstVolIterator
typedef IterPair
< ConstVolIterator
ConstVolPair

Public Member Functions

bool operator== (const Container &rhs) const
bool operator!= (const Container &rhs) const
bool operator< (const Container &rhs) const
bool operator<= (const Container &rhs) const
bool operator>= (const Container &rhs) const
bool operator> (const Container &rhs) const
virtual bool equalContent (const Container &rhs) const
void logDifference (std::ostream &log, const Container &rhs) const
virtual void logDifferenceWithVolumes (std::ostream &log, const Container &rhs) const =0
virtual void getCommitActions (list< commitAction > &l) const
virtual void getToCommit (storage::CommitStage stage, list< const Container * > &col, list< const Volume * > &vol) const
virtual int commitChanges (storage::CommitStage stage)
virtual int commitChanges (storage::CommitStage stage, Volume *vol)
virtual void changeDeviceName (const string &old, const string &nw)
bool isEmpty () const
void getInfo (storage::ContainerInfo &info) const
bool findVolume (const string &device, Volume *&vol)
ConstVolPair volPair (bool(*CheckFnc)(const Volume &)=NULL) const
ConstVolIterator volBegin (bool(*CheckFnc)(const Volume &)=NULL) const
ConstVolIterator volEnd (bool(*CheckFnc)(const Volume &)=NULL) const
template<class Pred >
VolCondIPair< Pred >::type volCondPair (const Pred &p) const
template<class Pred >
ConstVolumeI< Pred >::type volCondBegin (const Pred &p) const
template<class Pred >
ConstVolumeI< Pred >::type volCondEnd (const Pred &p) const
 Container (Storage *s, const string &name, const string &device, CType typ)
 Container (Storage *s, const string &name, const string &device, CType typ, SystemInfo &systemInfo)
 Container (Storage *s, CType typ, const xmlNode *node)
 Container (const Container &c)
virtual ~Container ()
void saveData (xmlNode *node) const
StoragegetStorage () const
const StoragegetStorageConst () const
CType type () const
bool isPartitionable () const
bool isDeviceUsable () const
bool readonly () const
virtual Text removeText (bool doing) const
virtual Text createText (bool doing) const
virtual int resizeVolume (Volume *v, unsigned long long newSize)
virtual int removeVolume (Volume *v)
virtual ContainergetCopy () const =0
bool compareContainer (const Container &rhs, bool verbose) const
void setExtError (const string &txt) const
void setExtError (const SystemCmd &cmd, bool serr=true) const

Static Public Member Functions

static bool notDeleted (const Container &c)
static bool Partitionable (const Container &d)
static bool DeviceUsable (const Container &d)
static storage::CType staticType ()

Protected Types

typedef std::list< Volume * > VCont
typedef VCont::iterator VIter
typedef VCont::const_iterator CVIter
typedef VCont::reverse_iterator RVIter
typedef
VCont::const_reverse_iterator 
CRVIter
typedef CheckFnc< const VolumeCheckFncVol
typedef CheckerIterator
< CheckFncVol, ConstVolumePI
< CheckFncVol >::type, CVIter,
Volume
ConstVolPIterator
typedef CheckerIterator
< CheckFncVol, VolumePI
< CheckFncVol >::type, VIter,
Volume
VolPIterator
typedef DerefIterator
< VolPIterator, Volume
VolIterator
typedef IterPair< VolIteratorVolPair
typedef CVIter ConstPlainIterator
typedef VIter PlainIterator

Protected Member Functions

VolPair volPair (bool(*CheckFnc)(const Volume &)=NULL)
VolIterator vBegin (bool(*CheckFnc)(const Volume &)=NULL)
VolIterator vEnd (bool(*CheckFnc)(const Volume &)=NULL)
ConstPlainIterator begin () const
ConstPlainIterator end () const
PlainIterator begin ()
PlainIterator end ()
virtual void print (std::ostream &s) const
void addToList (Volume *e)
bool removeFromList (Volume *e)
virtual int doCreate (Volume *v)
virtual int doRemove (Volume *v)
virtual int doResize (Volume *v)
virtual void logData (const string &Dir) const

Static Protected Member Functions

static bool stageDecrease (const Volume &v)
static bool stageIncrease (const Volume &v)
static bool stageFormat (const Volume &v)
static bool stageMount (const Volume &v)

Protected Attributes

Storage *const sto
const CType typ
bool ronly
VCont vols
storage::ContainerInfo info

Private Member Functions

Containeroperator= (const Container &)

Friends

class Storage
class ListListIterator
std::ostream & operator<< (std::ostream &s, const Container &c)

Member Typedef Documentation

typedef CheckFnc<const Volume> storage::Container::CheckFncVol [protected]
typedef VCont::const_reverse_iterator storage::Container::CRVIter [protected]
typedef VCont::const_iterator storage::Container::CVIter [protected]
typedef VCont::reverse_iterator storage::Container::RVIter [protected]
typedef std::list<Volume*> storage::Container::VCont [protected]
typedef VCont::iterator storage::Container::VIter [protected]

Constructor & Destructor Documentation

storage::Container::Container ( Storage s,
const string &  name,
const string &  device,
CType  typ 
)

References y2deb.

storage::Container::Container ( Storage s,
const string &  name,
const string &  device,
CType  typ,
SystemInfo systemInfo 
)
storage::Container::Container ( Storage s,
CType  typ,
const xmlNode *  node 
)
storage::Container::Container ( const Container c)

References y2deb.

storage::Container::~Container ( ) [virtual]

Member Function Documentation

void storage::Container::addToList ( Volume e) [protected]
ConstPlainIterator storage::Container::begin ( ) const [inline, protected]
PlainIterator storage::Container::begin ( ) [inline, protected]

References vols.

virtual void storage::Container::changeDeviceName ( const string &  old,
const string &  nw 
) [inline, virtual]
int storage::Container::commitChanges ( storage::CommitStage  stage) [virtual]
int storage::Container::commitChanges ( storage::CommitStage  stage,
Volume vol 
) [virtual]
bool storage::Container::compareContainer ( const Container rhs,
bool  verbose 
) const
Text storage::Container::createText ( bool  doing) const [virtual]
static bool storage::Container::DeviceUsable ( const Container d) [inline, static]
int storage::Container::doCreate ( Volume v) [protected, virtual]
int storage::Container::doRemove ( Volume v) [protected, virtual]
int storage::Container::doResize ( Volume v) [protected, virtual]
ConstPlainIterator storage::Container::end ( ) const [inline, protected]
PlainIterator storage::Container::end ( ) [inline, protected]

References vols.

bool storage::Container::equalContent ( const Container rhs) const [virtual]
bool storage::Container::findVolume ( const string &  device,
Volume *&  vol 
)
void storage::Container::getCommitActions ( list< commitAction > &  l) const [virtual]
virtual Container* storage::Container::getCopy ( ) const [pure virtual]
void storage::Container::getInfo ( storage::ContainerInfo info) const
Storage* storage::Container::getStorage ( ) const [inline]

References sto.

Referenced by storage::PeContainer::addPv(), storage::LvmVg::addPv(), storage::DmraidCo::addPv(), storage::DmmultipathCo::addPv(), storage::Btrfs::clearSignature(), storage::MdPartCo::createDisk(), storage::DmPartCo::createDisk(), storage::MdPartCo::destroyPartitionTable(), storage::DmPartCo::destroyPartitionTable(), storage::MdPartCo::doCreate(), storage::LvmVg::doCreate(), storage::DmPartCo::doCreate(), storage::MdPartCo::doCreateLabel(), storage::DmPartCo::doCreateLabel(), storage::LvmVg::doCreatePv(), storage::LvmVg::doCreateVg(), storage::Dasd::doDasdfmt(), storage::LvmVg::doExtendVg(), storage::LvmVg::doReduceVg(), storage::TmpfsCo::doRemove(), storage::MdPartCo::doRemove(), storage::LvmVg::doRemove(), storage::DmraidCo::doRemove(), storage::DmPartCo::doRemove(), storage::BtrfsCo::doRemove(), storage::LvmVg::doRemoveVg(), storage::MdPartCo::doResize(), storage::LvmVg::doResize(), storage::DmPartCo::doResize(), storage::MdPartCo::doSetType(), storage::DmPartCo::doSetType(), storage::LvmVg::extendVg(), storage::PeContainer::findPe(), storage::BtrfsCo::getBtrfsData(), storage::PeContainer::getDeviceByNumber(), storage::Volume::getStorage(), storage::MdPartCo::getToCommit(), storage::DmPartCo::getToCommit(), storage::LvmVg::getVgData(), storage::MdPartCo::initMd(), storage::LvmVg::instSysString(), storage::TmpfsCo::logData(), storage::LvmVg::logData(), storage::LvmVg::normalizeDmDevices(), storage::LvmVg::removeLv(), storage::LvmVg::removeVg(), storage::MdPartCo::removeVolume(), storage::DmPartCo::removeVolume(), storage::PeContainer::tryUnusePe(), storage::PeContainer::unuseDev(), storage::MdPartCo::unuseDevs(), and storage::Partition::zeroIfNeeded().

const Storage* storage::Container::getStorageConst ( ) const [inline]

References sto.

void storage::Container::getToCommit ( storage::CommitStage  stage,
list< const Container * > &  col,
list< const Volume * > &  vol 
) const [virtual]
bool storage::Container::isDeviceUsable ( ) const
bool storage::Container::isEmpty ( ) const
bool storage::Container::isPartitionable ( ) const
virtual void storage::Container::logData ( const string &  Dir) const [inline, protected, virtual]
void storage::Container::logDifference ( std::ostream &  log,
const Container rhs 
) const
virtual void storage::Container::logDifferenceWithVolumes ( std::ostream &  log,
const Container rhs 
) const [pure virtual]
static bool storage::Container::notDeleted ( const Container c) [inline, static]
bool storage::Container::operator!= ( const Container rhs) const [inline]
bool storage::Container::operator< ( const Container rhs) const [inline]
bool storage::Container::operator<= ( const Container rhs) const [inline]
Container& storage::Container::operator= ( const Container ) [private]
bool storage::Container::operator== ( const Container rhs) const [inline]
bool storage::Container::operator> ( const Container rhs) const [inline]
bool storage::Container::operator>= ( const Container rhs) const [inline]
static bool storage::Container::Partitionable ( const Container d) [inline, static]

References isPartitionable().

virtual void storage::Container::print ( std::ostream &  s) const [inline, protected, virtual]
bool storage::Container::readonly ( ) const [inline]
bool storage::Container::removeFromList ( Volume e) [protected]
Text storage::Container::removeText ( bool  doing) const [virtual]
int storage::Container::removeVolume ( Volume v) [virtual]
int storage::Container::resizeVolume ( Volume v,
unsigned long long  newSize 
) [virtual]
void storage::Container::saveData ( xmlNode *  node) const
void storage::Container::setExtError ( const SystemCmd cmd,
bool  serr = true 
) const
void storage::Container::setExtError ( const string &  txt) const
bool storage::Container::stageDecrease ( const Volume v) [static, protected]
bool storage::Container::stageFormat ( const Volume v) [static, protected]
bool storage::Container::stageIncrease ( const Volume v) [static, protected]
bool storage::Container::stageMount ( const Volume v) [static, protected]
static storage::CType storage::Container::staticType ( ) [inline, static]
CType storage::Container::type ( ) const [inline]
VolIterator storage::Container::vBegin ( bool(*)(const Volume &)  CheckFnc = NULL) [inline, protected]

References vols.

Referenced by storage::Storage::checkNfsDevice(), and volPair().

VolIterator storage::Container::vEnd ( bool(*)(const Volume &)  CheckFnc = NULL) [inline, protected]

References vols.

Referenced by volPair().

ConstVolIterator storage::Container::volBegin ( bool(*)(const Volume &)  CheckFnc = NULL) const [inline]

References vols.

Referenced by volPair().

template<class Pred >
ConstVolumeI<Pred>::type storage::Container::volCondBegin ( const Pred &  p) const [inline]

References vols.

Referenced by volCondPair().

template<class Pred >
ConstVolumeI<Pred>::type storage::Container::volCondEnd ( const Pred &  p) const [inline]

References vols.

Referenced by volCondPair().

template<class Pred >
VolCondIPair<Pred>::type storage::Container::volCondPair ( const Pred &  p) const [inline]

References volCondBegin(), and volCondEnd().

ConstVolIterator storage::Container::volEnd ( bool(*)(const Volume &)  CheckFnc = NULL) const [inline]

References vols.

Referenced by volPair().

VolPair storage::Container::volPair ( bool(*)(const Volume &)  CheckFnc = NULL) [inline, protected]

References vBegin(), and vEnd().

ConstVolPair storage::Container::volPair ( bool(*)(const Volume &)  CheckFnc = NULL) const [inline]

Friends And Related Function Documentation

friend class ListListIterator [friend]
std::ostream& operator<< ( std::ostream &  s,
const Container c 
) [friend]
friend class Storage [friend]

Member Data Documentation

bool storage::Container::ronly [protected]
Storage* const storage::Container::sto [protected]
const CType storage::Container::typ [protected]

The documentation for this class was generated from the following files: