storage::Container Class Reference

#include <Container.h>

Inheritance diagram for storage::Container:

storage::Disk storage::LoopCo storage::MdCo storage::NfsCo storage::PeContainer storage::Dasd storage::DmCo storage::DmPartCo storage::EvmsCo storage::LvmVg storage::DmraidCo

List of all members.

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
virtual string getDiffString (const Container &c) const
virtual void logDifference (const Container &c) const
virtual void getCommitActions (std::list< storage::commitAction * > &l) const
virtual int getToCommit (storage::CommitStage stage, std::list< Container * > &col, std::list< Volume * > &vol)
virtual int commitChanges (storage::CommitStage stage)
virtual int commitChanges (storage::CommitStage stage, Volume *vol)
virtual void changeDeviceName (const string &old, const string &nw)
unsigned numVolumes () const
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 *const, const string &Name, storage::CType typ)
 Container (const Container &)
StoragegetStorage () const
virtual ~Container ()
const string & name () const
const string & device () const
storage::CType type () const
bool deleted () const
bool created () const
void setDeleted (bool val=true)
void setCreated (bool val=true)
void setSilent (bool val=true)
void setUsedBy (storage::UsedByType t, const string &name)
const storage::usedBygetUsedBy () const
storage::UsedByType getUsedByType () const
const string & usedByName () const
bool readonly () const
unsigned long minorNr () const
unsigned long majorNr () const
unsigned long long sizeK () const
virtual string removeText (bool doing=true) const
virtual string createText (bool doing=true) const
virtual int resizeVolume (Volume *v, unsigned long long newSize)
virtual int removeVolume (Volume *v)
virtual ContainergetCopy () const
bool compareContainer (const Container *c, bool verbose) const
void setExtError (const string &txt) const
void setExtError (const SystemCmd &cmd, bool serr=true) const

Static Public Member Functions

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)
Containeroperator= (const Container &)

Static Protected Member Functions

static bool stageDecrease (const Volume &v)
static bool stageCreate (const Volume &v)

Protected Attributes

Storage *const sto
storage::CType typ
string nm
string dev
bool del
bool create
bool silent
bool ronly
storage::usedBy uby
unsigned long long size_k
unsigned long mnr
unsigned long mjr
VCont vols
storage::ContainerInfo info

Static Protected Attributes

static string type_names [COTYPE_LAST_ENTRY]
static unsigned order [COTYPE_LAST_ENTRY]

Friends

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

Classes

struct  ConstVolumeI
struct  ConstVolumePI
struct  VolCondIPair
struct  VolumeI
struct  VolumePI


Member Typedef Documentation

typedef std::list<Volume*> storage::Container::VCont [protected]

typedef VCont::iterator storage::Container::VIter [protected]

typedef VCont::const_iterator storage::Container::CVIter [protected]

typedef VCont::reverse_iterator storage::Container::RVIter [protected]

typedef VCont::const_reverse_iterator storage::Container::CRVIter [protected]

typedef CheckFnc<const Volume> storage::Container::CheckFncVol [protected]


Constructor & Destructor Documentation

Container::Container ( Storage * const  s,
const string &  Name,
storage::CType  typ 
)

References create, del, dev, mjr, mnr, nm, ronly, silent, size_k, typ, and y2debug.

Referenced by getCopy().

Container::Container ( const Container rhs  ) 

References nm, and y2debug.

Container::~Container (  )  [virtual]

References begin(), dev, end(), and y2debug.


Member Function Documentation

bool storage::Container::operator== ( const Container rhs  )  const [inline]

References del, nm, and typ.

bool storage::Container::operator!= ( const Container rhs  )  const [inline]

bool storage::Container::operator< ( const Container rhs  )  const [inline]

References del, nm, and typ.

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]

bool Container::equalContent ( const Container rhs  )  const [virtual]

string Container::getDiffString ( const Container c  )  const [virtual]

void Container::logDifference ( const Container c  )  const [virtual]

virtual void storage::Container::getCommitActions ( std::list< storage::commitAction * > &  l  )  const [virtual]

virtual int storage::Container::getToCommit ( storage::CommitStage  stage,
std::list< Container * > &  col,
std::list< Volume * > &  vol 
) [virtual]

int Container::commitChanges ( storage::CommitStage  stage  )  [virtual]

int Container::commitChanges ( storage::CommitStage  stage,
Volume vol 
) [virtual]

virtual void storage::Container::changeDeviceName ( const string &  old,
const string &  nw 
) [inline, virtual]

unsigned Container::numVolumes (  )  const

bool Container::isEmpty (  )  const

void Container::getInfo ( storage::ContainerInfo info  )  const

bool Container::findVolume ( const string &  device,
Volume *&  vol 
)

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

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

References vols.

Referenced by volPair().

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

References vols.

Referenced by volPair().

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

References volCondBegin(), and volCondEnd().

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().

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

References vBegin(), and vEnd().

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().

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

References sto.

Referenced by storage::PeContainer::addPv(), storage::LvmVg::addPv(), storage::EvmsCo::addPv(), storage::DmraidCo::addPv(), storage::Volume::canResize(), storage::Volume::changeMountBy(), storage::Partition::changeNumber(), storage::Dasd::checkFdasdOutput(), storage::Disk::checkPartedOutput(), storage::MdCo::checkUse(), storage::Md::computeSize(), storage::DmPartCo::createDisk(), storage::Volume::defaultMountBy(), storage::DmPartCo::destroyPartitionTable(), storage::Disk::destroyPartitionTable(), storage::Volume::detectEncryption(), storage::DmPartCo::DmPartCo(), storage::MdCo::doCreate(), storage::LvmVg::doCreate(), storage::LoopCo::doCreate(), storage::EvmsCo::doCreate(), storage::DmPartCo::doCreate(), storage::Disk::doCreate(), storage::EvmsCo::doCreateCo(), storage::DmPartCo::doCreateLabel(), storage::Disk::doCreateLabel(), storage::LvmVg::doCreatePv(), storage::LvmVg::doCreateVg(), storage::Volume::doCryptsetup(), storage::Dasd::doDasdfmt(), storage::EvmsCo::doExtendCo(), storage::LvmVg::doExtendVg(), storage::Dasd::doFdasd(), storage::Volume::doFormat(), storage::Volume::doFstabUpdate(), storage::Volume::doLosetup(), storage::Volume::doMount(), storage::EvmsCo::doReduceCo(), storage::LvmVg::doReduceVg(), storage::NfsCo::doRemove(), storage::MdCo::doRemove(), storage::LvmVg::doRemove(), storage::LoopCo::doRemove(), storage::EvmsCo::doRemove(), storage::DmraidCo::doRemove(), storage::DmPartCo::doRemove(), storage::DmCo::doRemove(), storage::Disk::doRemove(), storage::EvmsCo::doRemoveCo(), storage::LvmVg::doRemoveVg(), storage::LvmVg::doResize(), storage::EvmsCo::doResize(), storage::DmPartCo::doResize(), storage::Disk::doResize(), storage::Volume::doSetLabel(), storage::DmPartCo::doSetType(), storage::Disk::doSetType(), storage::EvmsCo::EvmsCo(), storage::EvmsCo::evmsNormalizeDevice(), storage::Disk::execCheckFailed(), storage::MdCo::extendMd(), storage::PeContainer::findPe(), storage::Volume::fstabUpdateText(), storage::Dm::getDevice(), storage::DmCo::getDmData(), storage::LoopCo::getLoopData(), storage::MdCo::getMdData(), storage::NfsCo::getNfsData(), storage::EvmsCo::getNormalVolumes(), storage::Disk::getPartedSectors(), storage::Disk::getPartedValues(), storage::MdCo::initTab(), storage::LvmVg::instSysString(), storage::Loop::lfileRealPath(), storage::Disk::logData(), storage::LvmVg::LvmVg(), storage::Volume::mount(), storage::Volume::mountText(), storage::Volume::needFstabUpdate(), storage::LvmVg::normalizeDmDevices(), storage::Volume::prepareRemove(), storage::DmCo::removeDm(), storage::LvmVg::removeLv(), storage::MdCo::removeMd(), storage::Disk::removePartition(), storage::EvmsCo::removeVol(), storage::DmPartCo::removeVolume(), storage::Volume::resizeFs(), storage::Volume::setFormat(), storage::Volume::setLabel(), storage::EvmsCo::setUsed(), storage::MdCo::shrinkMd(), storage::MdCo::syncRaidtab(), storage::Volume::triggerUdevUpdate(), storage::PeContainer::unuseDev(), and storage::Evms::updateMd().

const string& storage::Container::name (  )  const [inline]

References nm.

Referenced by storage::LvmVg::addPv(), storage::EvmsCo::addPv(), storage::DmraidCo::addPv(), storage::Disk::availablePartNumber(), storage::PeContainer::checkConsistency(), storage::LvmVg::commitChanges(), storage::EvmsCo::commitChanges(), storage::DmPartCo::commitChanges(), storage::Disk::commitChanges(), storage::Dasd::commitChanges(), commitChanges(), storage::EvmsCo::createCoText(), storage::LvmVg::createVgText(), storage::DmPart::DmPart(), storage::Dmraid::Dmraid(), storage::LvmVg::doCreate(), storage::EvmsCo::doCreate(), storage::DmPartCo::doCreate(), storage::Disk::doCreate(), doCreate(), storage::EvmsCo::doCreateCo(), storage::LvmVg::doCreateVg(), storage::EvmsCo::doExtendCo(), storage::LvmVg::doExtendVg(), storage::EvmsCo::doReduceCo(), storage::LvmVg::doReduceVg(), storage::NfsCo::doRemove(), storage::LvmVg::doRemove(), storage::EvmsCo::doRemove(), storage::DmraidCo::doRemove(), storage::DmPartCo::doRemove(), storage::Disk::doRemove(), doRemove(), storage::EvmsCo::doRemoveCo(), storage::LvmVg::doRemoveVg(), storage::LvmVg::doResize(), storage::EvmsCo::doResize(), storage::DmPartCo::doResize(), storage::Disk::doResize(), doResize(), storage::DmPartCo::doSetType(), storage::Disk::doSetType(), storage::Evms::Evms(), storage::EvmsCo::extendCoText(), storage::LvmVg::extendVgText(), getInfo(), storage::Evms::getMapperName(), storage::Storage::handleEvmsRemoveDevice(), storage::LvmLv::init(), storage::Evms::init(), isEvmsContainer(), storage::LvmLv::LvmLv(), storage::Disk::maxSizeLabelK(), storage::operator<<(), storage::Partition::Partition(), storage::EvmsCo::reduceCoText(), storage::LvmVg::reduceVgText(), storage::Storage::removeContainer(), storage::EvmsCo::removeCoText(), storage::DmraidCo::removeText(), storage::DmPartCo::removeText(), storage::LvmVg::removeVgText(), removeVolume(), storage::Disk::setLabelData(), and storage::Volume::Volume().

const string& storage::Container::device (  )  const [inline]

storage::CType storage::Container::type (  )  const [inline]

bool storage::Container::deleted (  )  const [inline]

bool storage::Container::created (  )  const [inline]

void storage::Container::setDeleted ( bool  val = true  )  [inline]

void storage::Container::setCreated ( bool  val = true  )  [inline]

void storage::Container::setSilent ( bool  val = true  )  [inline]

void storage::Container::setUsedBy ( storage::UsedByType  t,
const string &  name 
) [inline]

References storage::usedBy::set(), and uby.

const storage::usedBy& storage::Container::getUsedBy (  )  const [inline]

storage::UsedByType storage::Container::getUsedByType (  )  const [inline]

const string& storage::Container::usedByName (  )  const [inline]

References storage::usedBy::name(), and uby.

Referenced by getInfo().

bool storage::Container::readonly (  )  const [inline]

unsigned long storage::Container::minorNr (  )  const [inline]

unsigned long storage::Container::majorNr (  )  const [inline]

unsigned long long storage::Container::sizeK (  )  const [inline]

string Container::removeText ( bool  doing = true  )  const [virtual]

Reimplemented in storage::DmPartCo, and storage::DmraidCo.

References storage::_(), dev, and storage::sformat().

string Container::createText ( bool  doing = true  )  const [virtual]

References storage::_(), dev, and storage::sformat().

int Container::resizeVolume ( Volume v,
unsigned long long  newSize 
) [virtual]

int Container::removeVolume ( Volume v  )  [virtual]

static storage::CType storage::Container::staticType (  )  [inline, static]

virtual Container* storage::Container::getCopy (  )  const [inline, virtual]

bool Container::compareContainer ( const Container c,
bool  verbose 
) const

void Container::setExtError ( const string &  txt  )  const

void Container::setExtError ( const SystemCmd cmd,
bool  serr = true 
) const

ConstPlainIterator storage::Container::begin (  )  const [inline, protected]

ConstPlainIterator storage::Container::end (  )  const [inline, protected]

PlainIterator storage::Container::begin (  )  [inline, protected]

References vols.

PlainIterator storage::Container::end (  )  [inline, protected]

References vols.

virtual void storage::Container::print ( std::ostream &  s  )  const [inline, protected, virtual]

void storage::Container::addToList ( Volume e  )  [inline, protected]

bool Container::removeFromList ( Volume e  )  [protected]

int Container::doCreate ( Volume v  )  [protected, virtual]

int Container::doRemove ( Volume v  )  [protected, virtual]

int Container::doResize ( Volume v  )  [protected, virtual]

virtual void storage::Container::logData ( const string &  Dir  )  [inline, protected, virtual]

Container & Container::operator= ( const Container rhs  )  [protected]

References create, del, dev, mjr, mnr, nm, ronly, silent, size_k, typ, uby, and y2debug.

static bool storage::Container::stageDecrease ( const Volume v  )  [inline, static, protected]

static bool storage::Container::stageCreate ( const Volume v  )  [inline, static, protected]


Friends And Related Function Documentation

friend class Storage [friend]

friend class ListListIterator [friend]

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


Member Data Documentation

string Container::type_names [static, protected]

Initial value:

 { "UNKNOWN", "DISK", "MD", "LOOP", "LVM", 
                                   "DM", "EVMS", "DMRAID", "NFS" }

Referenced by doCreate(), doRemove(), doResize(), getDiffString(), storage::operator<<(), and removeVolume().

unsigned storage::Container::order[COTYPE_LAST_ENTRY] [static, protected]

Storage* const storage::Container::sto [protected]

Referenced by getStorage(), and setExtError().

string storage::Container::nm [protected]

string storage::Container::dev [protected]

bool storage::Container::del [protected]

bool storage::Container::create [protected]

bool storage::Container::silent [protected]

bool storage::Container::ronly [protected]

unsigned long long storage::Container::size_k [protected]

unsigned long storage::Container::mnr [protected]

unsigned long storage::Container::mjr [protected]


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

Generated on Sun Jun 8 10:48:03 2008 for yast2-storage by  doxygen 1.5.5