storage::PeContainer Class Reference

#include <PeContainer.h>

Inheritance diagram for storage::PeContainer:

storage::Container storage::Device storage::DmCo storage::DmPartCo storage::LvmVg storage::DmmultipathCo storage::DmraidCo

List of all members.

Public Member Functions

 PeContainer (Storage *s, const string &name, const string &device, CType t)
 PeContainer (Storage *s, const string &name, const string &device, CType t, SystemInfo &systeminfo)
 PeContainer (Storage *s, CType t, const xmlNode *node)
 PeContainer (const PeContainer &c)
virtual ~PeContainer ()
void saveData (xmlNode *node) const
unsigned long long peSize () const
unsigned long peCount () const
unsigned long peFree () const
unsigned numPv () const
bool addedPv (const string &dev) const
unsigned long sizeToLe (unsigned long long sizeK) const
int setPeSize (long long unsigned, bool lvm1)
void calcSize ()
void unuseDev () const
void changeDeviceName (const string &old, const string &nw)
bool equalContent (const PeContainer &rhs, bool comp_vol=true) const
void logDifference (std::ostream &log, const PeContainer &rhs) const
string getDeviceByNumber (const string &majmin) const
virtual list< string > getUsing () const

Protected Types

typedef CastIterator< VIter, Dm * > DmInter
typedef CastIterator< CVIter,
const Dm * > 
DmCInter
typedef CheckFnc< const DmCheckFncDm
typedef CheckerIterator
< CheckFncDm, DmPI< CheckFncDm >
::type, DmInter, Dm
DmPIterator
typedef CheckerIterator
< CheckFncDm, DmCPI
< CheckFncDm >::type, DmCInter,
const Dm
DmCPIterator
typedef DerefIterator
< DmPIterator, Dm
DmIter
typedef DerefIterator
< DmCPIterator, const Dm
ConstDmIter
typedef IterPair< DmIterDmPair
typedef IterPair< ConstDmIterConstDmPair

Protected Member Functions

DmPair dmPair (bool(*Check)(const Dm &)=NULL)
DmIter dmBegin (bool(*Check)(const Dm &)=NULL)
DmIter dmEnd (bool(*Check)(const Dm &)=NULL)
ConstDmPair dmPair (bool(*Check)(const Dm &)=NULL) const
ConstDmIter dmBegin (bool(*Check)(const Dm &)=NULL) const
ConstDmIter dmEnd (bool(*Check)(const Dm &)=NULL) const
string addList () const
virtual void print (std::ostream &s) const
virtual ContainergetCopy () const =0
bool findPe (const string &dev, const list< Pv > &pl, list< Pv >::const_iterator &i) const
bool findPe (const string &dev, list< Pv > &pl, list< Pv >::iterator &i) const
unsigned long leByLvRemove () const
int tryUnusePe (const string &dev, std::list< Pv > &pl, std::list< Pv > &pladd, std::list< Pv > &plrem, unsigned long &removed_pe)
bool checkCreateConstraints ()
int remLvPeDistribution (unsigned long le, std::map< string, unsigned long > &pe_map, std::list< Pv > &pl, std::list< Pv > &pladd)
virtual bool checkConsistency () const
void addPv (const Pv &p)

Static Protected Member Functions

static int addLvPeDistribution (unsigned long le, unsigned stripe, std::list< Pv > &pl, std::list< Pv > &pladd, std::map< string, unsigned long > &pe_map)

Protected Attributes

unsigned long long pe_size
unsigned long num_pe
unsigned long free_pe
std::list< Pvpv
std::list< Pvpv_add
std::list< Pvpv_remove

Private Member Functions

PeContaineroperator= (const PeContainer &)

Friends

class Storage
std::ostream & operator<< (std::ostream &, const PeContainer &)
std::ostream & operator<< (std::ostream &, const Pv &)
void printDevList (std::ostream &, const std::list< Pv > &)

Classes

struct  DmCPI
struct  DmPI
struct  Pv


Member Typedef Documentation

typedef CastIterator<CVIter, const Dm *> storage::PeContainer::DmCInter [protected]

typedef CheckFnc<const Dm> storage::PeContainer::CheckFncDm [protected]


Constructor & Destructor Documentation

storage::PeContainer::PeContainer ( Storage s,
const string &  name,
const string &  device,
CType  t 
)

References storage::toString(), and y2deb.

storage::PeContainer::PeContainer ( Storage s,
const string &  name,
const string &  device,
CType  t,
SystemInfo systeminfo 
)

References storage::toString(), and y2deb.

storage::PeContainer::PeContainer ( Storage s,
CType  t,
const xmlNode *  node 
)

storage::PeContainer::PeContainer ( const PeContainer c  ) 

References storage::Device::dev, and y2deb.

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

References storage::Device::dev, and y2deb.


Member Function Documentation

void storage::PeContainer::saveData ( xmlNode *  node  )  const

unsigned long long storage::PeContainer::peSize (  )  const [inline]

unsigned long storage::PeContainer::peCount (  )  const [inline]

References num_pe.

Referenced by storage::LvmVg::getInfo(), and saveData().

unsigned long storage::PeContainer::peFree (  )  const [inline]

References free_pe.

Referenced by storage::LvmVg::getInfo(), and saveData().

unsigned storage::PeContainer::numPv (  )  const [inline]

References pv.

bool storage::PeContainer::addedPv ( const string &  dev  )  const

References findPe(), pv_add, and y2mil.

Referenced by storage::Dm::mapsTo().

unsigned long storage::PeContainer::sizeToLe ( unsigned long long  sizeK  )  const

int storage::PeContainer::setPeSize ( long long  unsigned,
bool  lvm1 
)

void storage::PeContainer::calcSize (  )  [inline]

void storage::PeContainer::unuseDev (  )  const

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

Reimplemented from storage::Container.

References dmPair(), and pv_add.

bool storage::PeContainer::equalContent ( const PeContainer rhs,
bool  comp_vol = true 
) const

void storage::PeContainer::logDifference ( std::ostream &  log,
const PeContainer rhs 
) const

string storage::PeContainer::getDeviceByNumber ( const string &  majmin  )  const

list< string > storage::PeContainer::getUsing (  )  const [virtual]

Reimplemented from storage::Device.

References pv, pv_add, and pv_remove.

DmPair storage::PeContainer::dmPair ( bool(*)(const Dm &)  Check = NULL  )  [inline, protected]

DmIter storage::PeContainer::dmBegin ( bool(*)(const Dm &)  Check = NULL  )  [inline, protected]

DmIter storage::PeContainer::dmEnd ( bool(*)(const Dm &)  Check = NULL  )  [inline, protected]

ConstDmPair storage::PeContainer::dmPair ( bool(*)(const Dm &)  Check = NULL  )  const [inline, protected]

References dmBegin(), and dmEnd().

ConstDmIter storage::PeContainer::dmBegin ( bool(*)(const Dm &)  Check = NULL  )  const [inline, protected]

ConstDmIter storage::PeContainer::dmEnd ( bool(*)(const Dm &)  Check = NULL  )  const [inline, protected]

string storage::PeContainer::addList (  )  const [protected]

References pv_add.

Referenced by storage::LvmVg::createText().

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

virtual Container* storage::PeContainer::getCopy (  )  const [protected, pure virtual]

bool storage::PeContainer::findPe ( const string &  dev,
const list< Pv > &  pl,
list< Pv >::const_iterator &  i 
) const [protected]

bool storage::PeContainer::findPe ( const string &  dev,
list< Pv > &  pl,
list< Pv >::iterator i 
) const [protected]

unsigned long storage::PeContainer::leByLvRemove (  )  const [protected]

int storage::PeContainer::tryUnusePe ( const string &  dev,
std::list< Pv > &  pl,
std::list< Pv > &  pladd,
std::list< Pv > &  plrem,
unsigned long &  removed_pe 
) [protected]

bool storage::PeContainer::checkCreateConstraints (  )  [protected]

int storage::PeContainer::addLvPeDistribution ( unsigned long  le,
unsigned  stripe,
std::list< Pv > &  pl,
std::list< Pv > &  pladd,
std::map< string, unsigned long > &  pe_map 
) [static, protected]

int storage::PeContainer::remLvPeDistribution ( unsigned long  le,
std::map< string, unsigned long > &  pe_map,
std::list< Pv > &  pl,
std::list< Pv > &  pladd 
) [protected]

bool storage::PeContainer::checkConsistency (  )  const [protected, virtual]

void storage::PeContainer::addPv ( const Pv p  )  [protected]

PeContainer& storage::PeContainer::operator= ( const PeContainer  )  [private]


Friends And Related Function Documentation

friend class Storage [friend]

std::ostream& operator<< ( std::ostream &  s,
const PeContainer d 
) [friend]

std::ostream& operator<< ( std::ostream &  s,
const Pv v 
) [friend]

void printDevList ( std::ostream &  s,
const std::list< Pv > &  l 
) [friend]

Referenced by storage::operator<<().


Member Data Documentation

unsigned long long storage::PeContainer::pe_size [protected]

unsigned long storage::PeContainer::num_pe [protected]

unsigned long storage::PeContainer::free_pe [protected]

std::list<Pv> storage::PeContainer::pv [protected]

std::list<Pv> storage::PeContainer::pv_add [protected]

std::list<Pv> storage::PeContainer::pv_remove [protected]


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

Generated on Mon Feb 6 10:42:58 2012 for yast2-storage by  doxygen 1.5.6