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

storage::Dm Class Reference

#include <Dm.h>

Inheritance diagram for storage::Dm:
storage::Volume storage::Device storage::DmPart storage::LvmLv storage::Dmmultipath storage::Dmraid

List of all members.

Public Types

typedef std::map< string,
unsigned long > 
PeMap

Public Member Functions

 Dm (const PeContainer &c, const string &name, const string &device, const string &tname)
 Dm (const PeContainer &c, const string &name, const string &device, const string &tname, SystemInfo &systeminfo)
 Dm (const PeContainer &c, const xmlNode *node)
 Dm (const PeContainer &c, const Dm &v)
virtual ~Dm ()
void saveData (xmlNode *node) const
const string & getTableName () const
void setTableName (const string &name)
const string & getTargetName () const
void setTargetName (const string &name)
bool inactive () const
unsigned long long getLe () const
void setLe (unsigned long long le)
void modifyPeSize (unsigned long long old, unsigned long long neww)
bool removeTable ()
virtual void calcSize ()
const PeMapgetPeMap () const
void setPeMap (const PeMap &m)
unsigned long long usingPe (const string &dev) const
bool mapsTo (const string &dev) const
void getTableInfo ()
virtual bool checkConsistency () const
unsigned stripes () const
unsigned setStripes (unsigned long val)
unsigned long long stripeSize () const
void setStripeSize (unsigned long long val)
virtual string procName () const
virtual string sysfsPath () const
void setUdevData (SystemInfo &systeminfo)
void updateMajorMinor ()
virtual void print (std::ostream &s) const
virtual Text removeText (bool doing) const
virtual Text formatText (bool doing) const
void getInfo (storage::DmInfo &info) const
void changeDeviceName (const string &old, const string &nw)
virtual list< string > getUsing () const
bool equalContent (const Dm &rhs) const
void logDifference (std::ostream &log, const Dm &rhs) const

Static Public Member Functions

static bool notDeleted (const Dm &l)
static bool isDeleted (const Dm &l)
static void activate (bool val)
static bool isActive ()
static string devToTable (const string &dev)
static string lvmTableToDev (const string &table)
static unsigned dmMajor ()
static string dmDeviceName (unsigned long num)

Protected Member Functions

void init ()
const PeContainerpec () const
virtual const string shortPrintedName () const
unsigned long computeLe (const string &lestr)
void computePe (const SystemCmd &cmd, PeMap &pe)
void accumulatePe (const string &majmin, unsigned long le, PeMap &pe)
void getMapRecursive (unsigned long mi, PeMap &pe)

Static Protected Member Functions

static list< string > extractMajMin (const string &s)

Protected Attributes

string tname
string target
unsigned long long num_le
unsigned stripe
unsigned long long stripe_size
bool inactiv
bool pe_larger
PeMap pe_map
storage::DmInfo info

Static Protected Attributes

static bool active = false
static unsigned dm_major = 0
static const list< string > known_types

Private Member Functions

 Dm (const Dm &)
Dmoperator= (const Dm &)

Friends

std::ostream & operator<< (std::ostream &s, const Dm &p)

Member Typedef Documentation

typedef std::map<string,unsigned long> storage::Dm::PeMap

Constructor & Destructor Documentation

storage::Dm::Dm ( const PeContainer c,
const string &  name,
const string &  device,
const string &  tname 
)

References y2mil.

storage::Dm::Dm ( const PeContainer c,
const string &  name,
const string &  device,
const string &  tname,
SystemInfo systeminfo 
)

References y2mil.

storage::Dm::Dm ( const PeContainer c,
const xmlNode *  node 
)

References storage::getChildValue(), and y2deb.

storage::Dm::Dm ( const PeContainer c,
const Dm v 
)

References y2deb.

storage::Dm::~Dm ( ) [virtual]
storage::Dm::Dm ( const Dm ) [private]

Member Function Documentation

void storage::Dm::accumulatePe ( const string &  majmin,
unsigned long  le,
PeMap pe 
) [protected]

References y2war.

void storage::Dm::activate ( bool  val) [static]
void storage::Dm::calcSize ( ) [virtual]

Reimplemented in storage::LvmLv.

void storage::Dm::changeDeviceName ( const string &  old,
const string &  nw 
)
bool storage::Dm::checkConsistency ( ) const [virtual]

References y2war.

unsigned long storage::Dm::computeLe ( const string &  lestr) [protected]
void storage::Dm::computePe ( const SystemCmd cmd,
PeMap pe 
) [protected]
string storage::Dm::devToTable ( const string &  dev) [static]
string storage::Dm::dmDeviceName ( unsigned long  num) [static]
unsigned storage::Dm::dmMajor ( ) [static]
bool storage::Dm::equalContent ( const Dm rhs) const
list< string > storage::Dm::extractMajMin ( const string &  s) [static, protected]
Text storage::Dm::formatText ( bool  doing) const [virtual]

Reimplemented from storage::Volume.

Reimplemented in storage::Dmmultipath, storage::Dmraid, and storage::LvmLv.

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

void storage::Dm::getInfo ( storage::DmInfo info) const
unsigned long long storage::Dm::getLe ( ) const [inline]
void storage::Dm::getMapRecursive ( unsigned long  mi,
PeMap pe 
) [protected]
const PeMap& storage::Dm::getPeMap ( ) const [inline]
void storage::Dm::getTableInfo ( )
const string& storage::Dm::getTableName ( ) const [inline]
const string& storage::Dm::getTargetName ( ) const [inline]
list< string > storage::Dm::getUsing ( ) const [virtual]

Reimplemented from storage::Device.

Reimplemented in storage::DmPart, and storage::LvmLv.

bool storage::Dm::inactive ( ) const [inline]

References inactiv.

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

void storage::Dm::init ( ) [protected]

Reimplemented from storage::Volume.

Referenced by storage::DmPart::DmPart(), and storage::LvmLv::LvmLv().

static bool storage::Dm::isActive ( ) [inline, static]

References active.

static bool storage::Dm::isDeleted ( const Dm l) [inline, static]
void storage::Dm::logDifference ( std::ostream &  log,
const Dm rhs 
) const
string storage::Dm::lvmTableToDev ( const string &  table) [static]
bool storage::Dm::mapsTo ( const string &  dev) const
void storage::Dm::modifyPeSize ( unsigned long long  old,
unsigned long long  neww 
)
static bool storage::Dm::notDeleted ( const Dm l) [inline, static]
Dm& storage::Dm::operator= ( const Dm ) [private]
const PeContainer * storage::Dm::pec ( ) const [protected]
virtual void storage::Dm::print ( std::ostream &  s) const [inline, virtual]
virtual string storage::Dm::procName ( ) const [inline, virtual]

Reimplemented from storage::Device.

References storage::decString(), and storage::Device::mnr.

bool storage::Dm::removeTable ( )
Text storage::Dm::removeText ( bool  doing) const [virtual]

Reimplemented from storage::Volume.

Reimplemented in storage::Dmmultipath, storage::Dmraid, and storage::LvmLv.

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

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

Reimplemented from storage::Volume.

Reimplemented in storage::LvmLv.

void storage::Dm::setLe ( unsigned long long  le)
void storage::Dm::setPeMap ( const PeMap m)
unsigned storage::Dm::setStripes ( unsigned long  val) [inline]

References stripe.

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

void storage::Dm::setStripeSize ( unsigned long long  val) [inline]

References stripe_size.

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

void storage::Dm::setTableName ( const string &  name) [inline]
void storage::Dm::setTargetName ( const string &  name) [inline]
void storage::Dm::setUdevData ( SystemInfo systeminfo)

References y2mil.

Referenced by storage::DmPart::DmPart(), and storage::LvmLv::LvmLv().

virtual const string storage::Dm::shortPrintedName ( ) const [inline, protected, virtual]
unsigned storage::Dm::stripes ( ) const [inline]
unsigned long long storage::Dm::stripeSize ( ) const [inline]

References stripe_size.

string storage::Dm::sysfsPath ( ) const [virtual]

Reimplemented from storage::Device.

void storage::Dm::updateMajorMinor ( )
unsigned long long storage::Dm::usingPe ( const string &  dev) const

Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  s,
const Dm p 
) [friend]

Member Data Documentation

bool storage::Dm::active = false [static, protected]

Referenced by isActive().

unsigned storage::Dm::dm_major = 0 [static, protected]
bool storage::Dm::inactiv [protected]

Referenced by inactive().

storage::DmInfo storage::Dm::info [mutable, protected]

Reimplemented from storage::Volume.

Reimplemented in storage::DmPart, and storage::LvmLv.

const list< string > storage::Dm::known_types [static, protected]
unsigned long long storage::Dm::num_le [protected]

Referenced by getLe().

bool storage::Dm::pe_larger [protected]

Referenced by getPeMap().

unsigned storage::Dm::stripe [protected]

Referenced by setStripes(), and stripes().

unsigned long long storage::Dm::stripe_size [protected]

Referenced by setStripeSize(), and stripeSize().

string storage::Dm::target [protected]
string storage::Dm::tname [protected]

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