#include <EvmsCo.h>

Public Member Functions | |
| EvmsCo (Storage *const s, const EvmsTree &data) | |
| EvmsCo (Storage *const s, const EvmsCont &cont, const EvmsTree &data) | |
| EvmsCo (Storage *const s, const string &name, bool lvm1) | |
| EvmsCo (const EvmsCo &c) | |
| virtual | ~EvmsCo () |
| unsigned | numVol () const |
| bool | lvm2 () const |
| bool | isContainer () const |
| bool | isValid () const |
| int | removeCo () |
| int | extendCo (const std::list< string > &dl) |
| int | extendCo (const string &device) |
| int | reduceCo (const std::list< string > &dl) |
| int | reduceCo (const string &device) |
| int | modifyCo (const string &name, long long unsigned peSizeK, bool lvm1) |
| int | createVol (const string &name, unsigned long long sizeK, unsigned stripe, string &device) |
| int | removeVol (const string &name) |
| int | changeStripe (const string &name, unsigned long stripe) |
| int | changeStripeSize (const string &name, unsigned long long stripeSize) |
| int | setPeSize (long long unsigned peSizeK) |
| void | getCommitActions (std::list< storage::commitAction * > &l) const |
| int | commitChanges (storage::CommitStage stage) |
| int | getToCommit (storage::CommitStage stage, std::list< Container * > &col, std::list< Volume * > &vol) |
| int | resizeVolume (Volume *v, unsigned long long newSize) |
| int | removeVolume (Volume *v) |
| void | addVolume (Evms *v) |
| void | getInfo (storage::EvmsCoInfo &info) const |
| bool | equalContent (const Container &rhs) const |
| void | logDifference (const Container &d) const |
| bool | checkConsistency () const |
| void | updateMd () |
| void | changeDeviceName (const string &old, const string &nw) |
Static Public Member Functions | |
| static storage::CType | staticType () |
| static void | activate (bool val=true) |
| static int | activateDevices () |
| static bool | canDoEvms () |
| static void | getEvmsList (EvmsTree &data) |
| static bool | lvNotDeleted (const Evms &l) |
Protected Types | |
| typedef CastIterator< VIter, Evms * > | EvmsInter |
| typedef CastIterator< CVIter, const Evms * > | EvmsCInter |
| typedef CheckFnc< const Evms > | CheckFncEvms |
| typedef CheckerIterator < CheckFncEvms, EvmsPI < CheckFncEvms >::type, EvmsInter, Evms > | EvmsPIterator |
| typedef CheckerIterator < CheckFncEvms, EvmsCPI < CheckFncEvms >::type, EvmsCInter, const Evms > | EvmsCPIterator |
| typedef DerefIterator < EvmsPIterator, Evms > | EvmsIter |
| typedef DerefIterator < EvmsCPIterator, const Evms > | ConstEvmsIter |
| typedef IterPair< EvmsIter > | EvmsPair |
| typedef IterPair< ConstEvmsIter > | ConstEvmsPair |
Protected Member Functions | |
| EvmsPair | evmsPair (bool(*Check)(const Evms &)=NULL) |
| EvmsIter | evmsBegin (bool(*Check)(const Evms &)=NULL) |
| EvmsIter | evmsEnd (bool(*Check)(const Evms &)=NULL) |
| ConstEvmsPair | evmsPair (bool(*Check)(const Evms &)=NULL) const |
| ConstEvmsIter | evmsBegin (bool(*Check)(const Evms &)=NULL) const |
| ConstEvmsIter | evmsEnd (bool(*Check)(const Evms &)=NULL) const |
| EvmsCo (Storage *const s, const string &File, int) | |
| bool | getCoData (const string &name, const EvmsTree &data, bool check=false) |
| void | getNormalVolumes (const EvmsTree &data) |
| void | setUsed (const string &device, storage::UsedByType typ, const string &name) |
| void | init () |
| virtual void | print (std::ostream &s) const |
| virtual Container * | getCopy () const |
| string | createCoText (bool doing) const |
| string | removeCoText (bool doing) const |
| string | extendCoText (bool doing, const string &dev) const |
| string | reduceCoText (bool doing, const string &dev) const |
| int | doCreateCo () |
| int | doRemoveCo () |
| int | doExtendCo () |
| int | doReduceCo () |
| int | doCreate (Volume *v) |
| int | doRemove (Volume *v) |
| int | doResize (Volume *v) |
| void | logData (const string &Dir) |
| void | addLv (unsigned long le, const string &name, bool native) |
| void | addPv (const Pv *p) |
| string | evmsNormalizeDevice (const string &dev) const |
Static Protected Member Functions | |
| static bool | attachToSocket (bool attach=true) |
| static bool | sendCommand (const string &cmd, bool one_line, std::list< string > &lines) |
| static int | getSocketFd () |
| static bool | startHelper (bool retry=false) |
| static int | executeCmd (const string &cmd) |
| static string | devToEvms (const string &dev) |
| static string | evmsToDev (const string &edev) |
Protected Attributes | |
| string | uuid |
| bool | lvm1 |
| bool | container |
| bool | valid |
| storage::EvmsCoInfo | info |
Static Protected Attributes | |
| static bool | active = false |
| static int | sockfd = -1 |
Friends | |
| class | Storage |
| std::ostream & | operator<< (std::ostream &, const EvmsCo &) |
Classes | |
| struct | EvmsCPI |
| struct | EvmsPI |
typedef CastIterator<VIter, Evms *> storage::EvmsCo::EvmsInter [protected] |
typedef CastIterator<CVIter, const Evms *> storage::EvmsCo::EvmsCInter [protected] |
typedef CheckFnc<const Evms> storage::EvmsCo::CheckFncEvms [protected] |
typedef CheckerIterator< CheckFncEvms, EvmsPI<CheckFncEvms>::type, EvmsInter, Evms > storage::EvmsCo::EvmsPIterator [protected] |
typedef CheckerIterator< CheckFncEvms, EvmsCPI<CheckFncEvms>::type, EvmsCInter, const Evms > storage::EvmsCo::EvmsCPIterator [protected] |
typedef DerefIterator<EvmsPIterator,Evms> storage::EvmsCo::EvmsIter [protected] |
typedef DerefIterator<EvmsCPIterator,const Evms> storage::EvmsCo::ConstEvmsIter [protected] |
typedef IterPair<EvmsIter> storage::EvmsCo::EvmsPair [protected] |
typedef IterPair<ConstEvmsIter> storage::EvmsCo::ConstEvmsPair [protected] |
References getNormalVolumes(), init(), storage::Container::nm, and y2debug.
Referenced by getCopy().
References storage::IterPair< Iter >::begin(), container, storage::IterPair< Iter >::empty(), evmsPair(), getCoData(), storage::Container::getStorage(), init(), lvm1, storage::EvmsCont::lvm1, lvNotCreated(), storage::EvmsCont::name, storage::Container::nm, valid, storage::Storage::waitForDevice(), and y2debug.
| EvmsCo::EvmsCo | ( | Storage *const | s, | |
| const string & | name, | |||
| bool | lvm1 | |||
| ) |
References container, init(), lvm1, storage::Container::nm, and y2debug.
| EvmsCo::EvmsCo | ( | const EvmsCo & | c | ) |
| EvmsCo::~EvmsCo | ( | ) | [virtual] |
References storage::Container::dev, and y2debug.
| EvmsCo::EvmsCo | ( | Storage *const | s, | |
| const string & | File, | |||
| int | ||||
| ) | [protected] |
References storage::Container::dev, and y2debug.
| unsigned storage::EvmsCo::numVol | ( | ) | const [inline] |
References storage::Container::vols.
| bool storage::EvmsCo::isValid | ( | ) | const [inline] |
| static storage::CType storage::EvmsCo::staticType | ( | ) | [inline, static] |
| int EvmsCo::removeCo | ( | ) |
References storage::IterPair< Iter >::begin(), storage::Container::created(), storage::IterPair< Iter >::end(), storage::EVMS_CHANGE_READONLY, evmsPair(), lvNotDeleted(), storage::PeContainer::pv, storage::PeContainer::pv_add, storage::Container::readonly(), removeVol(), storage::Container::setDeleted(), setUsed(), storage::UB_NONE, and y2milestone.
| int storage::EvmsCo::extendCo | ( | const std::list< string > & | dl | ) |
Referenced by storage::Storage::createEvmsContainer(), and extendCo().
| int EvmsCo::extendCo | ( | const string & | device | ) |
References extendCo().
| int storage::EvmsCo::reduceCo | ( | const std::list< string > & | dl | ) |
Referenced by reduceCo().
| int EvmsCo::reduceCo | ( | const string & | device | ) |
References reduceCo().
| int EvmsCo::modifyCo | ( | const string & | name, | |
| long long unsigned | peSizeK, | |||
| bool | lvm1 | |||
| ) |
| int EvmsCo::createVol | ( | const string & | name, | |
| unsigned long long | sizeK, | |||
| unsigned | stripe, | |||
| string & | device | |||
| ) |
References storage::PeContainer::addLvPeDistribution(), storage::Container::addToList(), storage::IterPair< Iter >::begin(), checkConsistency(), storage::Volume::device(), storage::IterPair< Iter >::end(), storage::EVMS_CHANGE_READONLY, storage::EVMS_LV_DUPLICATE_NAME, storage::EVMS_LV_INVALID_NAME, storage::EVMS_LV_NO_SPACE, evmsPair(), storage::PeContainer::free_pe, lvNotDeleted(), storage::PeContainer::pe_size, storage::PeContainer::pv, storage::PeContainer::pv_add, storage::Container::readonly(), storage::Volume::setCreated(), storage::Dm::setPeMap(), and y2milestone.
| int EvmsCo::removeVol | ( | const string & | name | ) |
References storage::IterPair< Iter >::begin(), checkConsistency(), storage::IterPair< Iter >::end(), storage::EVMS_CHANGE_READONLY, storage::EVMS_LV_NOT_IN_LIST, storage::EVMS_LV_REMOVE_USED_BY, storage::EVMS_LV_UNKNOWN_NAME, evmsPair(), storage::PeContainer::free_pe, storage::Storage::getRecursiveRemoval(), storage::Container::getStorage(), lvNotDeleted(), storage::PeContainer::pv, storage::PeContainer::pv_add, storage::Container::readonly(), storage::PeContainer::remLvPeDistribution(), storage::Container::removeFromList(), storage::Storage::removeUsing(), storage::UB_NONE, and y2milestone.
Referenced by removeCo(), and removeVolume().
| int EvmsCo::changeStripe | ( | const string & | name, | |
| unsigned long | stripe | |||
| ) |
References storage::PeContainer::addLvPeDistribution(), storage::IterPair< Iter >::begin(), checkConsistency(), storage::IterPair< Iter >::end(), storage::EVMS_CHANGE_READONLY, storage::EVMS_LV_ALREADY_ON_DISK, storage::EVMS_LV_UNKNOWN_NAME, evmsPair(), storage::PeContainer::free_pe, lvNotDeleted(), storage::PeContainer::pv, storage::PeContainer::pv_add, storage::Container::readonly(), storage::PeContainer::remLvPeDistribution(), storage::PeContainer::sizeToLe(), and y2milestone.
| int EvmsCo::changeStripeSize | ( | const string & | name, | |
| unsigned long long | stripeSize | |||
| ) |
References storage::IterPair< Iter >::begin(), checkConsistency(), storage::IterPair< Iter >::end(), storage::EVMS_CHANGE_READONLY, storage::EVMS_LV_ALREADY_ON_DISK, storage::EVMS_LV_NO_STRIPE_SIZE, storage::EVMS_LV_UNKNOWN_NAME, evmsPair(), lvNotDeleted(), storage::Container::readonly(), and y2milestone.
| int EvmsCo::setPeSize | ( | long long unsigned | peSizeK | ) |
References storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), evmsPair(), lvm1, storage::PeContainer::pe_size, storage::PeContainer::setPeSize(), and y2milestone.
Referenced by modifyCo().
| void storage::EvmsCo::getCommitActions | ( | std::list< storage::commitAction * > & | l | ) | const [virtual] |
Reimplemented from storage::Container.
| int EvmsCo::commitChanges | ( | storage::CommitStage | stage | ) | [virtual] |
Reimplemented from storage::Container.
References storage::Container::created(), storage::DECREASE, storage::Container::deleted(), doCreateCo(), doExtendCo(), doReduceCo(), doRemoveCo(), storage::EVMS_COMMIT_NOTHING_TODO, getEvmsList(), storage::INCREASE, storage::Container::name(), storage::PeContainer::pv_add, storage::PeContainer::pv_remove, y2mil, and y2milestone.
| int storage::EvmsCo::getToCommit | ( | storage::CommitStage | stage, | |
| std::list< Container * > & | col, | |||
| std::list< Volume * > & | vol | |||
| ) | [virtual] |
Reimplemented from storage::Container.
| int EvmsCo::resizeVolume | ( | Volume * | v, | |
| unsigned long long | newSize | |||
| ) | [virtual] |
Reimplemented from storage::Container.
References storage::PeContainer::addLvPeDistribution(), storage::Dm::calcSize(), storage::Volume::canResize(), checkConsistency(), storage::Volume::created(), storage::EVMS_CHANGE_READONLY, storage::EVMS_CHECK_RESIZE_INVALID_VOLUME, storage::PeContainer::free_pe, storage::Dm::getLe(), storage::Dm::getPeMap(), storage::Volume::name(), storage::PeContainer::pe_size, storage::PeContainer::pv, storage::PeContainer::pv_add, storage::Container::readonly(), storage::PeContainer::remLvPeDistribution(), storage::Dm::setLe(), storage::Dm::setPeMap(), storage::Volume::setResizedSize(), storage::PeContainer::sizeToLe(), storage::Dm::stripes(), and y2milestone.
| int EvmsCo::removeVolume | ( | Volume * | v | ) | [virtual] |
| void EvmsCo::addVolume | ( | Evms * | v | ) |
References storage::Container::addToList(), and y2mil.
Referenced by storage::Storage::handleEvmsCreateDevice().
| void EvmsCo::getInfo | ( | storage::EvmsCoInfo & | info | ) | const |
References storage::EvmsCoInfo::create, storage::Container::created(), storage::EvmsCoInfo::devices, storage::EvmsCoInfo::devices_add, storage::EvmsCoInfo::devices_rem, info, lvm2(), storage::EvmsCoInfo::lvm2, storage::Container::nm, storage::PeContainer::peCount(), storage::EvmsCoInfo::peCount, storage::PeContainer::peFree(), storage::EvmsCoInfo::peFree, storage::PeContainer::peSize(), storage::EvmsCoInfo::peSize, storage::PeContainer::pv, storage::PeContainer::pv_add, storage::PeContainer::pv_remove, storage::EvmsCoInfo::realContainer, storage::PeContainer::sizeK(), storage::EvmsCoInfo::sizeK, uuid, storage::EvmsCoInfo::uuid, and y2mil.
| bool EvmsCo::equalContent | ( | const Container & | rhs | ) | const [virtual] |
Reimplemented from storage::Container.
References storage::IterPair< Iter >::begin(), container, storage::IterPair< Iter >::end(), storage::PeContainer::equalContent(), storage::Container::equalContent(), evmsPair(), lvm1, uuid, and valid.
| void EvmsCo::logDifference | ( | const Container & | d | ) | const [virtual] |
Reimplemented from storage::Container.
References storage::IterPair< Iter >::begin(), container, storage::IterPair< Iter >::end(), evmsPair(), storage::Container::getDiffString(), storage::PeContainer::getDiffString(), lvm1, uuid, valid, y2mil, and y2milestone.
| bool EvmsCo::checkConsistency | ( | ) | const [virtual] |
Reimplemented from storage::PeContainer.
References storage::PeContainer::checkConsistency(), and storage::Container::nm.
Referenced by changeStripe(), changeStripeSize(), createVol(), storage::Storage::detectEvms(), doCreate(), doCreateCo(), doExtendCo(), doReduceCo(), doRemove(), doResize(), removeVol(), and resizeVolume().
| void EvmsCo::updateMd | ( | ) |
| void EvmsCo::changeDeviceName | ( | const string & | old, | |
| const string & | nw | |||
| ) | [virtual] |
Reimplemented from storage::PeContainer.
References storage::IterPair< Iter >::begin(), storage::PeContainer::changeDeviceName(), container, devToEvms(), storage::IterPair< Iter >::end(), evmsPair(), lvNotDeleted(), storage::Container::nm, storage::undevDevice(), and y2mil.
| void EvmsCo::activate | ( | bool | val = true |
) | [static] |
References storage::Dm::activate(), active, attachToSocket(), and y2milestone.
Referenced by storage::Storage::activateHld(), storage::Storage::detectEvms(), and storage::Storage::detectObjects().
| int EvmsCo::activateDevices | ( | ) | [static] |
References storage::EVMS_ACTIVATE_FAILED, executeCmd(), and y2milestone.
Referenced by storage::Storage::evmsActivate(), and storage::Storage::evmsActivateDevices().
| bool EvmsCo::canDoEvms | ( | ) | [static] |
References EXEC_PATH, storage::Storage::getNoEv(), and y2mil.
Referenced by storage::Storage::detectEvms(), storage::Storage::detectObjects(), and startHelper().
| void EvmsCo::getEvmsList | ( | EvmsTree & | data | ) | [static] |
References storage::EvmsTree::cont, storage::EvmsVol::device, storage::EvmsCont::peinfo::free, storage::EvmsCont::peinfo::id, storage::EvmsVol::id, storage::EvmsObj::id, storage::makeMap(), storage::EvmsVol::name, storage::EvmsObj::name, storage::EvmsVol::native, storage::EvmsTree::objects, sendCommand(), storage::EvmsCont::peinfo::size, storage::EvmsVol::sizeK, storage::splitString(), storage::EvmsVol::uses, storage::EvmsCont::peinfo::uuid, storage::EvmsObj::vol, storage::EvmsTree::volumes, y2mil, and y2milestone.
Referenced by commitChanges(), storage::Storage::detectEvms(), doCreate(), doCreateCo(), doExtendCo(), doReduceCo(), doRemove(), and doResize().
| static bool storage::EvmsCo::lvNotDeleted | ( | const Evms & | l | ) | [inline, static] |
References storage::Volume::deleted().
Referenced by changeDeviceName(), changeStripe(), changeStripeSize(), createVol(), storage::Storage::evmsActivate(), storage::Storage::getEvmsInfo(), getNormalVolumes(), removeCo(), and removeVol().
References evmsBegin(), and evmsEnd().
Referenced by addLv(), changeDeviceName(), changeStripe(), changeStripeSize(), createVol(), equalContent(), EvmsCo(), getCoData(), getNormalVolumes(), logDifference(), removeCo(), removeVol(), setPeSize(), and updateMd().
| ConstEvmsPair storage::EvmsCo::evmsPair | ( | bool(*)(const Evms &) | Check = NULL |
) | const [inline, protected] |
References evmsBegin(), and evmsEnd().
| ConstEvmsIter storage::EvmsCo::evmsBegin | ( | bool(*)(const Evms &) | Check = NULL |
) | const [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
| ConstEvmsIter storage::EvmsCo::evmsEnd | ( | bool(*)(const Evms &) | Check = NULL |
) | const [inline, protected] |
References storage::Container::begin(), and storage::Container::end().
| bool EvmsCo::getCoData | ( | const string & | name, | |
| const EvmsTree & | data, | |||
| bool | check = false | |||
| ) | [protected] |
References addLv(), storage::PeContainer::addLvPeDistribution(), addPv(), storage::IterPair< Iter >::begin(), storage::EvmsTree::cont, storage::Container::dev, storage::PeContainer::Pv::device, storage::IterPair< Iter >::end(), evmsPair(), evmsToDev(), storage::PeContainer::Pv::free_pe, storage::PeContainer::free_pe, lvCreated(), lvDeleted(), lvm1, lvResized(), storage::PeContainer::Pv::num_pe, storage::PeContainer::num_pe, storage::EvmsTree::objects, storage::PeContainer::pe_size, storage::PeContainer::pv, storage::PeContainer::pv_add, storage::PeContainer::remLvPeDistribution(), storage::PeContainer::sizeToLe(), storage::PeContainer::Pv::status, storage::PeContainer::Pv::uuid, uuid, storage::EvmsTree::volumes, y2error, y2mil, y2milestone, and y2warning.
Referenced by doCreate(), doCreateCo(), doExtendCo(), doReduceCo(), doRemove(), doResize(), and EvmsCo().
| void EvmsCo::getNormalVolumes | ( | const EvmsTree & | data | ) | [protected] |
References addLv(), storage::IterPair< Iter >::begin(), storage::Storage::diskPair(), storage::IterPair< Iter >::end(), evmsPair(), storage::Container::getStorage(), lvNotDeleted(), storage::Regex::match(), storage::EvmsTree::objects, storage::PeContainer::pe_size, setUsed(), storage::UB_EVMS, storage::EvmsTree::volumes, y2mil, and y2milestone.
Referenced by EvmsCo().
| void EvmsCo::setUsed | ( | const string & | device, | |
| storage::UsedByType | typ, | |||
| const string & | name | |||
| ) | [protected] |
References storage::Storage::changeFormatVolume(), storage::FSNONE, storage::Container::getStorage(), storage::normalizeDevice(), storage::Storage::setUsedBy(), storage::UB_LVM, and storage::UB_NONE.
Referenced by addPv(), getNormalVolumes(), modifyCo(), and removeCo().
| void EvmsCo::init | ( | ) | [protected] |
Reimplemented from storage::PeContainer.
References container, storage::Container::dev, storage::PeContainer::init(), lvm1, storage::Container::nm, storage::normalizeDevice(), and valid.
Referenced by EvmsCo().
| virtual void storage::EvmsCo::print | ( | std::ostream & | s | ) | const [inline, protected, virtual] |
Reimplemented from storage::PeContainer.
| virtual Container* storage::EvmsCo::getCopy | ( | ) | const [inline, protected, virtual] |
| string EvmsCo::createCoText | ( | bool | doing | ) | const [protected] |
References storage::_(), storage::PeContainer::addList(), storage::Container::name(), and storage::sformat().
Referenced by doCreateCo().
| string EvmsCo::removeCoText | ( | bool | doing | ) | const [protected] |
References storage::_(), storage::Container::name(), and storage::sformat().
Referenced by doRemoveCo().
| string EvmsCo::extendCoText | ( | bool | doing, | |
| const string & | dev | |||
| ) | const [protected] |
References storage::_(), storage::Container::name(), and storage::sformat().
Referenced by doExtendCo().
| string EvmsCo::reduceCoText | ( | bool | doing, | |
| const string & | dev | |||
| ) | const [protected] |
References storage::_(), storage::Container::name(), and storage::sformat().
Referenced by doReduceCo().
| int EvmsCo::doCreateCo | ( | ) | [protected] |
References checkConsistency(), storage::PeContainer::checkCreateConstraints(), createCoText(), storage::Container::created(), storage::decString(), storage::EVMS_PV_STILL_ADDED, executeCmd(), getCoData(), getEvmsList(), storage::Container::getStorage(), lvm1, storage::Container::name(), storage::PeContainer::pe_size, storage::PeContainer::pv_add, storage::Container::setCreated(), storage::Storage::showInfoCb(), storage::Container::silent, y2err, y2mil, and y2milestone.
Referenced by commitChanges().
| int EvmsCo::doRemoveCo | ( | ) | [protected] |
| int EvmsCo::doExtendCo | ( | ) | [protected] |
References checkConsistency(), storage::PeContainer::checkCreateConstraints(), storage::EVMS_PV_STILL_ADDED, executeCmd(), extendCoText(), getCoData(), getEvmsList(), storage::Container::getStorage(), storage::Container::name(), storage::PeContainer::pv_add, storage::Storage::showInfoCb(), storage::Container::silent, and y2milestone.
Referenced by commitChanges().
| int EvmsCo::doReduceCo | ( | ) | [protected] |
References checkConsistency(), storage::EVMS_PV_REMOVE_NOT_FOUND, executeCmd(), getCoData(), getEvmsList(), storage::Container::getStorage(), storage::Container::name(), storage::PeContainer::pv_remove, reduceCoText(), storage::Storage::showInfoCb(), storage::Container::silent, and y2milestone.
Referenced by commitChanges().
| int EvmsCo::doCreate | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
References checkConsistency(), storage::decString(), storage::EVMS_CREATE_LV_INVALID_VOLUME, executeCmd(), getCoData(), getEvmsList(), storage::Container::getStorage(), storage::Volume::name(), storage::Container::name(), storage::Storage::showInfoCb(), storage::Volume::silent(), storage::Container::silent, storage::Storage::waitForDevice(), and y2milestone.
| int EvmsCo::doRemove | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
References checkConsistency(), storage::EVMS_LV_NOT_IN_LIST, storage::EVMS_REMOVE_LV_INVALID_VOLUME, executeCmd(), getCoData(), getEvmsList(), storage::Container::getStorage(), storage::Volume::name(), storage::Container::name(), storage::Container::nm, storage::Volume::prepareRemove(), storage::Container::removeFromList(), storage::Storage::showInfoCb(), storage::Volume::silent(), storage::Container::silent, and y2milestone.
| int EvmsCo::doResize | ( | Volume * | v | ) | [protected, virtual] |
Reimplemented from storage::Container.
References checkConsistency(), storage::decString(), storage::EVMS_RESIZE_LV_INVALID_VOLUME, executeCmd(), storage::FSNONE, getCoData(), getEvmsList(), storage::Storage::getFsCapabilities(), storage::Container::getStorage(), storage::FsCapabilities::isExtendableWhileMounted, storage::Volume::isMounted(), storage::FsCapabilities::isReduceableWhileMounted, storage::Volume::mount(), storage::Volume::name(), storage::Container::name(), storage::Volume::origSizeK(), storage::Volume::resizeFs(), storage::Storage::showInfoCb(), storage::Container::silent, storage::PeContainer::sizeToLe(), storage::Volume::umount(), and y2milestone.
| void EvmsCo::logData | ( | const string & | Dir | ) | [protected, virtual] |
Reimplemented from storage::Container.
| void EvmsCo::addLv | ( | unsigned long | le, | |
| const string & | name, | |||
| bool | native | |||
| ) | [protected] |
References storage::Container::addToList(), storage::IterPair< Iter >::begin(), storage::IterPair< Iter >::end(), evmsPair(), lvNotCreated(), lvNotDeletedCreated(), lvResized(), storage::Container::nm, and y2milestone.
Referenced by getCoData(), getNormalVolumes(), and storage::Storage::handleEvmsRemoveDevice().
| void EvmsCo::addPv | ( | const Pv * | p | ) | [protected] |
Reimplemented from storage::PeContainer.
References storage::PeContainer::addPv(), storage::Container::deleted(), storage::PeContainer::Pv::device, evmsToDev(), storage::Container::getStorage(), storage::Container::name(), storage::PeContainer::pv_add, storage::PeContainer::pv_remove, setUsed(), storage::UB_EVMS, storage::UB_NONE, and storage::Storage::usedBy().
Referenced by getCoData().
| string EvmsCo::evmsNormalizeDevice | ( | const string & | dev | ) | const [protected] |
References storage::Container::getStorage(), storage::normalizeDevice(), and y2mil.
| bool EvmsCo::attachToSocket | ( | bool | attach = true |
) | [static, protected] |
References EXEC_PATH, getSocketFd(), IPC_PROJ_ID, semid, SOCKET_PATH, sockfd, startHelper(), y2error, and y2milestone.
Referenced by activate().
| static bool storage::EvmsCo::sendCommand | ( | const string & | cmd, | |
| bool | one_line, | |||
| std::list< string > & | lines | |||
| ) | [static, protected] |
Referenced by executeCmd(), and getEvmsList().
| int EvmsCo::getSocketFd | ( | ) | [static, protected] |
References SOCKET_PATH, sockfd, startHelper(), y2error, and y2milestone.
Referenced by attachToSocket().
| bool EvmsCo::startHelper | ( | bool | retry = false |
) | [static, protected] |
References canDoEvms(), EXEC_PATH, storage::SystemCmd::executeBackground(), SOCKET_PATH, y2error, y2mil, and y2milestone.
Referenced by attachToSocket(), and getSocketFd().
| int EvmsCo::executeCmd | ( | const string & | cmd | ) | [static, protected] |
References storage::EVMS_COMMUNICATION_FAILED, sendCommand(), and y2milestone.
Referenced by activateDevices(), doCreate(), doCreateCo(), doExtendCo(), doReduceCo(), doRemove(), doRemoveCo(), and doResize().
| string EvmsCo::devToEvms | ( | const string & | dev | ) | [static, protected] |
| string EvmsCo::evmsToDev | ( | const string & | edev | ) | [static, protected] |
Referenced by addPv(), storage::Storage::evmsActivate(), and getCoData().
friend class Storage [friend] |
Reimplemented from storage::PeContainer.
| std::ostream& operator<< | ( | std::ostream & | s, | |
| const EvmsCo & | d | |||
| ) | [friend] |
string storage::EvmsCo::uuid [protected] |
Referenced by equalContent(), EvmsCo(), getCoData(), getInfo(), logDifference(), and storage::operator<<().
bool storage::EvmsCo::lvm1 [protected] |
Referenced by doCreateCo(), equalContent(), EvmsCo(), getCoData(), init(), logDifference(), lvm2(), modifyCo(), storage::operator<<(), and setPeSize().
bool storage::EvmsCo::container [protected] |
Referenced by changeDeviceName(), equalContent(), EvmsCo(), init(), isContainer(), logDifference(), and storage::operator<<().
bool storage::EvmsCo::valid [protected] |
Referenced by equalContent(), EvmsCo(), init(), isValid(), logDifference(), and storage::operator<<().
bool EvmsCo::active = false [static, protected] |
Referenced by activate().
int EvmsCo::sockfd = -1 [static, protected] |
Referenced by attachToSocket(), and getSocketFd().
storage::EvmsCoInfo storage::EvmsCo::info [mutable, protected] |
1.5.5